From f45604ee13214a37b1061a9cb2cd74d5e48ce161 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 23 Nov 2024 18:05:15 +1300 Subject: [PATCH 01/12] genbindings: move QAccessibleWidget hack into standard config --- cmd/genbindings/config-allowlist.go | 18 ++++++++++++++++++ cmd/genbindings/intermediate.go | 11 +---------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/cmd/genbindings/config-allowlist.go b/cmd/genbindings/config-allowlist.go index 36c9b34a..a391fd5a 100644 --- a/cmd/genbindings/config-allowlist.go +++ b/cmd/genbindings/config-allowlist.go @@ -196,6 +196,24 @@ func AllowVirtual(mm CppMethod) bool { return true // AllowSignal(mm) } +func AllowVirtualForClass(className string) bool { + + // 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 className == "QAccessibleWidget" { + return false + } + + return true +} + func AllowMethod(className string, mm CppMethod) error { for _, p := range mm.Parameters { diff --git a/cmd/genbindings/intermediate.go b/cmd/genbindings/intermediate.go index 2de8067c..d6c30637 100644 --- a/cmd/genbindings/intermediate.go +++ b/cmd/genbindings/intermediate.go @@ -413,16 +413,7 @@ func (c *CppClass) VirtualMethods() []CppMethod { 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" { + if !AllowVirtualForClass(c.ClassName) { return nil } From c6018d1c07c0b7ddad9ed31bdcb4e1ebf78b58e6 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 23 Nov 2024 18:33:04 +1300 Subject: [PATCH 02/12] examples/subclass: also test KeyPressEvent --- examples/subclass/main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/subclass/main.go b/examples/subclass/main.go index 66d34933..b400cd39 100644 --- a/examples/subclass/main.go +++ b/examples/subclass/main.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "os" "github.com/mappu/miqt/qt" @@ -48,6 +49,12 @@ func main() { w.Update() // repaints in next event loop tick }) + w.OnKeyPressEvent(func(super func(ev *qt.QKeyEvent), ev *qt.QKeyEvent) { + super(ev) + + w.SetTitle(fmt.Sprintf("Keypress %d", ev.Key())) + }) + w.Show() qt.QApplication_Exec() From b643477cca198f213c34c4ced54ef54cb34444e3 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 23 Nov 2024 18:33:34 +1300 Subject: [PATCH 03/12] cflags: remove -fPIC from all cflags --- cmd/handbindings/binding.go | 1 - qt/cbor/cflags.go | 2 +- qt/cflags.go | 2 +- qt/multimedia/cflags.go | 2 +- qt/network/cflags.go | 2 +- qt/printsupport/cflags.go | 1 - qt6/cbor/cflags.go | 1 - qt6/cflags.go | 1 - qt6/multimedia/cflags.go | 1 - qt6/network/cflags.go | 1 - qt6/printsupport/cflags.go | 1 - qt6/spatialaudio/cflags.go | 1 - 12 files changed, 4 insertions(+), 12 deletions(-) diff --git a/cmd/handbindings/binding.go b/cmd/handbindings/binding.go index 16d05e44..5af119f1 100644 --- a/cmd/handbindings/binding.go +++ b/cmd/handbindings/binding.go @@ -2,7 +2,6 @@ package main /* -#cgo CFLAGS: -fPIC #cgo pkg-config: Qt5Widgets #include "binding.h" diff --git a/qt/cbor/cflags.go b/qt/cbor/cflags.go index 0c326444..55521b7e 100644 --- a/qt/cbor/cflags.go +++ b/qt/cbor/cflags.go @@ -2,7 +2,7 @@ package cbor /* #cgo CXXFLAGS: -std=c++11 -#cgo CFLAGS: -std=gnu11 -fPIC +#cgo CFLAGS: -std=gnu11 #cgo pkg-config: Qt5Core */ import "C" diff --git a/qt/cflags.go b/qt/cflags.go index 27de3be3..696a7616 100644 --- a/qt/cflags.go +++ b/qt/cflags.go @@ -2,7 +2,7 @@ package qt /* #cgo CXXFLAGS: -std=c++11 -#cgo CFLAGS: -std=gnu11 -fPIC +#cgo CFLAGS: -std=gnu11 #cgo pkg-config: Qt5Widgets */ import "C" diff --git a/qt/multimedia/cflags.go b/qt/multimedia/cflags.go index e2f6f0f9..15abb4e6 100644 --- a/qt/multimedia/cflags.go +++ b/qt/multimedia/cflags.go @@ -2,7 +2,7 @@ package multimedia /* #cgo CXXFLAGS: -std=c++11 -#cgo CFLAGS: -std=gnu11 -fPIC +#cgo CFLAGS: -std=gnu11 #cgo pkg-config: Qt5MultimediaWidgets */ import "C" diff --git a/qt/network/cflags.go b/qt/network/cflags.go index acbc0c20..d82a86cb 100644 --- a/qt/network/cflags.go +++ b/qt/network/cflags.go @@ -2,7 +2,7 @@ package network /* #cgo CXXFLAGS: -std=c++11 -#cgo CFLAGS: -std=gnu11 -fPIC +#cgo CFLAGS: -std=gnu11 #cgo pkg-config: Qt5Network */ import "C" diff --git a/qt/printsupport/cflags.go b/qt/printsupport/cflags.go index db88bf07..9781b75b 100644 --- a/qt/printsupport/cflags.go +++ b/qt/printsupport/cflags.go @@ -1,7 +1,6 @@ package printsupport /* -#cgo CFLAGS: -fPIC #cgo pkg-config: Qt5PrintSupport */ import "C" diff --git a/qt6/cbor/cflags.go b/qt6/cbor/cflags.go index e1e55d76..1742dc87 100644 --- a/qt6/cbor/cflags.go +++ b/qt6/cbor/cflags.go @@ -1,7 +1,6 @@ package cbor /* -#cgo CFLAGS: -fPIC #cgo pkg-config: Qt6Core */ import "C" diff --git a/qt6/cflags.go b/qt6/cflags.go index 72615143..bdfc5344 100644 --- a/qt6/cflags.go +++ b/qt6/cflags.go @@ -1,7 +1,6 @@ package qt6 /* -#cgo CFLAGS: -fPIC #cgo pkg-config: Qt6Widgets */ import "C" diff --git a/qt6/multimedia/cflags.go b/qt6/multimedia/cflags.go index 0ee9daa0..e17468ab 100644 --- a/qt6/multimedia/cflags.go +++ b/qt6/multimedia/cflags.go @@ -1,7 +1,6 @@ package multimedia /* -#cgo CFLAGS: -fPIC #cgo pkg-config: Qt6MultimediaWidgets */ import "C" diff --git a/qt6/network/cflags.go b/qt6/network/cflags.go index 4f3acb96..43683141 100644 --- a/qt6/network/cflags.go +++ b/qt6/network/cflags.go @@ -1,7 +1,6 @@ package qt6 /* -#cgo CFLAGS: -fPIC #cgo pkg-config: Qt6Network */ import "C" diff --git a/qt6/printsupport/cflags.go b/qt6/printsupport/cflags.go index f2df1089..91dfe3fa 100644 --- a/qt6/printsupport/cflags.go +++ b/qt6/printsupport/cflags.go @@ -1,7 +1,6 @@ package printsupport /* -#cgo CFLAGS: -fPIC #cgo pkg-config: Qt6PrintSupport */ import "C" diff --git a/qt6/spatialaudio/cflags.go b/qt6/spatialaudio/cflags.go index c58a2d09..ec01d583 100644 --- a/qt6/spatialaudio/cflags.go +++ b/qt6/spatialaudio/cflags.go @@ -1,7 +1,6 @@ package spatialaudio /* -#cgo CFLAGS: -fPIC #cgo pkg-config: Qt6SpatialAudio */ import "C" From 49976413275dca1b9520d41db8ab07cf82e5c3b4 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 23 Nov 2024 19:31:27 +1300 Subject: [PATCH 04/12] genbindings: allow subclassing abstract classes --- cmd/genbindings/clang2il.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index e8747a5b..d465d513 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -373,10 +373,6 @@ nextMethod: continue // Skip private/protected } - if ret.Abstract { - continue // The bindings can't construct an abstract class - } - // Check if this is `= delete` if isExplicitlyDeleted(node) { continue From c36d14c540603cbcef2cc25e99522be6066f405f Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 23 Nov 2024 19:32:09 +1300 Subject: [PATCH 05/12] genbindings: allow some classes to inherit from QList<> --- cmd/genbindings/config-allowlist.go | 8 +++--- cmd/genbindings/emitgo.go | 12 ++++----- cmd/genbindings/intermediate.go | 42 ++++++++++++++++++++--------- 3 files changed, 40 insertions(+), 22 deletions(-) diff --git a/cmd/genbindings/config-allowlist.go b/cmd/genbindings/config-allowlist.go index a391fd5a..9c124e3c 100644 --- a/cmd/genbindings/config-allowlist.go +++ b/cmd/genbindings/config-allowlist.go @@ -146,10 +146,10 @@ func AllowClass(className string) bool { switch className { case - "QTextStreamManipulator", // Only seems to contain garbage methods - "QException", // Extends std::exception, too hard - "QUnhandledException", // As above (child class) - "QItemSelection", // Extends a QList<>, too hard + "QTextStreamManipulator", // Only seems to contain garbage methods + "QException", // Extends std::exception, too hard + "QUnhandledException", // As above (child class) + // "QItemSelection", // Extends a QList<>, too hard "QXmlStreamAttributes", // Extends a QList<>, too hard "QPolygon", // Extends a QVector template class, too hard "QPolygonF", // Extends a QVector template class, too hard diff --git a/cmd/genbindings/emitgo.go b/cmd/genbindings/emitgo.go index 03f69ff0..2eaf9b27 100644 --- a/cmd/genbindings/emitgo.go +++ b/cmd/genbindings/emitgo.go @@ -738,7 +738,10 @@ import "C" // on these types already for _, base := range c.DirectInherits { - if pkg, ok := KnownClassnames[base]; ok && pkg.PackageName != gfs.currentPackageName { + if strings.HasPrefix(base, `QList<`) { + ret.WriteString("/* Also inherits unprojectable " + base + " */\n") + + } else if pkg, ok := KnownClassnames[base]; ok && pkg.PackageName != gfs.currentPackageName { // Cross-package parent class ret.WriteString("*" + path.Base(pkg.PackageName) + "." + cabiClassName(base) + "\n") gfs.imports[importPathForQtPackage(pkg.PackageName)] = struct{}{} @@ -788,12 +791,9 @@ import "C" extraUnsafeArgs += ", h_" + cabiClassName(base) + " unsafe.Pointer" } - for _, base := range c.DirectInherits { + for _, pkg := range c.DirectInheritClassInfo() { ctorPrefix := "" - pkg, ok := KnownClassnames[base] - if !ok { - panic("Class " + c.ClassName + " has unknown parent " + base) - } + base := pkg.Class.ClassName constructRequiresParams := pkg.Class.AllInherits() var ixxParams []string = make([]string, 0, len(constructRequiresParams)+1) diff --git a/cmd/genbindings/intermediate.go b/cmd/genbindings/intermediate.go index d6c30637..9346f788 100644 --- a/cmd/genbindings/intermediate.go +++ b/cmd/genbindings/intermediate.go @@ -435,10 +435,12 @@ func (c *CppClass) VirtualMethods() []CppMethod { // 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) + for _, cinfo := range c.DirectInheritClassInfo() { + + // If a base class is permanently unprojectable, the child classes + // should be too + if !AllowVirtualForClass(cinfo.Class.ClassName) { + return nil } for _, m := range cinfo.Class.Methods { @@ -491,15 +493,9 @@ func (c *CppClass) AllInherits() []string { // FIXME prevent duplicates arising from diamond inheritance - for _, baseClass := range c.DirectInherits { + for _, baseClassInfo := range c.DirectInheritClassInfo() { - 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) - } + ret = append(ret, baseClassInfo.Class.ClassName) recurseInfo := baseClassInfo.Class.AllInherits() for _, childClass := range recurseInfo { @@ -510,6 +506,28 @@ func (c *CppClass) AllInherits() []string { return ret } +// DirectInheritClassInfo looks up the CppClass for each entry in DirectInherits. +func (c *CppClass) DirectInheritClassInfo() []lookupResultClass { + var ret []lookupResultClass + + for _, inh := range c.DirectInherits { // AllInherits() { + cinfo, ok := KnownClassnames[inh] + if !ok { + if strings.HasPrefix(inh, `QList<`) { + // OK, allow this one to slip through + // e.g. QItemSelection extends a QList<> + continue + } else { + panic("Class " + c.ClassName + " inherits from unknown class " + inh) + } + } + + ret = append(ret, cinfo) + } + + return ret +} + type CppTypedef struct { Alias string UnderlyingType CppParameter From 756086cd5022f9fdf1daa0d9267fe7c4ca7e0b1c Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 23 Nov 2024 19:34:05 +1300 Subject: [PATCH 06/12] genbindings: enforce AllowVirtualForClass at construction time --- cmd/genbindings/transformblocklist.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/genbindings/transformblocklist.go b/cmd/genbindings/transformblocklist.go index eb14acd5..7d9294a3 100644 --- a/cmd/genbindings/transformblocklist.go +++ b/cmd/genbindings/transformblocklist.go @@ -27,6 +27,12 @@ func astTransformBlocklist(parsed *CppParsedHeader) { continue } + // If this class is abstract, but we return !AllowVirtualForClass, then + // delete its constructors + if c.Abstract && !AllowVirtualForClass(c.ClassName) { + c.Ctors = nil + } + // Keep parsed.Classes[j] = c j++ From a5dafbf132a07ccf758f069bdd0e266422ea5876 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 23 Nov 2024 19:34:22 +1300 Subject: [PATCH 07/12] genbindings: fix trying to add super parameters for pure virtual methods --- cmd/genbindings/emitgo.go | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/cmd/genbindings/emitgo.go b/cmd/genbindings/emitgo.go index 2eaf9b27..0c835ae5 100644 --- a/cmd/genbindings/emitgo.go +++ b/cmd/genbindings/emitgo.go @@ -965,8 +965,9 @@ import "C" // Add a package-private function to call the C++ base class method // QWidget_virtualbase_PaintEvent + // This is only possible if the function is not pure-virtual - { + if !m.IsPureVirtual { preamble, forwarding := gfs.emitParametersGo2CABIForwarding(m) forwarding = "unsafe.Pointer(this.h)" + strings.TrimPrefix(forwarding, `this.h`) // TODO integrate properly @@ -989,7 +990,10 @@ import "C" { var cgoNamedParams []string - var paramNames []string = []string{"(&" + goClassName + "{h: self}).callVirtualBase_" + m.SafeMethodName()} + var paramNames []string + if !m.IsPureVirtual { + paramNames = append(paramNames, "(&"+goClassName+"{h: self}).callVirtualBase_"+m.SafeMethodName()) + } conversion := "" if len(m.Parameters) > 0 { @@ -1009,10 +1013,14 @@ import "C" 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 := `func(` + if !m.IsPureVirtual { + goCbType += `super ` + superCbType + if len(m.Parameters) > 0 { + goCbType += `, ` + } } + goCbType += gfs.emitParametersGo(m.Parameters) goCbType += `) ` + m.ReturnType.renderReturnTypeGo(&gfs) ret.WriteString(`func (this *` + goClassName + `) On` + m.SafeMethodName() + `(slot ` + goCbType + `) { From 7f2e4d07df34dae421c0ed232a252423c1a52f93 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 23 Nov 2024 19:34:38 +1300 Subject: [PATCH 08/12] genbindings/config: prevent some classes from subclassing --- cmd/genbindings/config-allowlist.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmd/genbindings/config-allowlist.go b/cmd/genbindings/config-allowlist.go index 9c124e3c..2273cb28 100644 --- a/cmd/genbindings/config-allowlist.go +++ b/cmd/genbindings/config-allowlist.go @@ -211,6 +211,20 @@ func AllowVirtualForClass(className string) bool { return false } + // Pure virtual method futureInterface() returns an unprojectable template type + if className == "QFutureWatcherBase" { + return false + } + + // Pure virtual dtor (should be possible to support) + if className == "QObjectData" { + return false + } + + if className == "QAccessibleObject" { + return false // undefined reference to `vtable for MiqtVirtualQAccessibleObject' + } + return true } From 26fc94d421e05b1da743ff40b278afbc84ee084a Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 23 Nov 2024 19:34:52 +1300 Subject: [PATCH 09/12] qt: rebuild (extended subclassing support) --- qt-extras/scintillaedit/gen_ScintillaEdit.cpp | 1087 ++++- qt-extras/scintillaedit/gen_ScintillaEdit.go | 1036 ++++ qt-extras/scintillaedit/gen_ScintillaEdit.h | 104 + .../qscintilla/gen_qsciabstractapis.cpp | 397 +- .../qscintilla/gen_qsciabstractapis.go | 295 ++ .../qscintilla/gen_qsciabstractapis.h | 29 + .../qscintilla/gen_qscilexer.cpp | 1347 +++++- .../qscintilla/gen_qscilexer.go | 1058 +++++ .../qscintilla/gen_qscilexer.h | 92 + .../qscintilla/gen_qscilexeravs.go | 27 +- .../qscintilla/gen_qscilexerbash.go | 27 +- .../qscintilla/gen_qscilexerbatch.go | 27 +- .../qscintilla/gen_qscilexercmake.go | 27 +- .../qscintilla/gen_qscilexercoffeescript.go | 27 +- .../qscintilla/gen_qscilexercpp.go | 27 +- .../qscintilla/gen_qscilexercss.go | 27 +- .../qscintilla/gen_qscilexercustom.cpp | 1133 ++++- .../qscintilla/gen_qscilexercustom.go | 914 ++++ .../qscintilla/gen_qscilexercustom.h | 78 + .../qscintilla/gen_qscilexerd.go | 27 +- .../qscintilla/gen_qscilexerdiff.go | 27 +- .../qscintilla/gen_qscilexeredifact.go | 27 +- .../qscintilla/gen_qscilexerfortran77.go | 27 +- .../qscintilla/gen_qscilexerhtml.go | 27 +- .../qscintilla/gen_qscilexerjson.go | 27 +- .../qscintilla/gen_qscilexerlua.go | 27 +- .../qscintilla/gen_qscilexermakefile.go | 27 +- .../qscintilla/gen_qscilexermarkdown.go | 27 +- .../qscintilla/gen_qscilexermatlab.go | 27 +- .../qscintilla/gen_qscilexerpascal.go | 27 +- .../qscintilla/gen_qscilexerperl.go | 27 +- .../qscintilla/gen_qscilexerpo.go | 27 +- .../qscintilla/gen_qscilexerpostscript.go | 27 +- .../qscintilla/gen_qscilexerpov.go | 27 +- .../qscintilla/gen_qscilexerproperties.go | 27 +- .../qscintilla/gen_qscilexerpython.go | 27 +- .../qscintilla/gen_qscilexerruby.go | 27 +- .../qscintilla/gen_qscilexerspice.go | 27 +- .../qscintilla/gen_qscilexersql.go | 27 +- .../qscintilla/gen_qscilexertcl.go | 27 +- .../qscintilla/gen_qscilexertex.go | 27 +- .../qscintilla/gen_qscilexerverilog.go | 27 +- .../qscintilla/gen_qscilexervhdl.go | 27 +- .../qscintilla/gen_qscilexeryaml.go | 27 +- .../qscintilla6/gen_qsciabstractapis.cpp | 397 +- .../qscintilla6/gen_qsciabstractapis.go | 295 ++ .../qscintilla6/gen_qsciabstractapis.h | 29 + .../qscintilla6/gen_qscilexer.cpp | 1347 +++++- .../qscintilla6/gen_qscilexer.go | 1058 +++++ .../qscintilla6/gen_qscilexer.h | 92 + .../qscintilla6/gen_qscilexeravs.go | 27 +- .../qscintilla6/gen_qscilexerbash.go | 27 +- .../qscintilla6/gen_qscilexerbatch.go | 27 +- .../qscintilla6/gen_qscilexercmake.go | 27 +- .../qscintilla6/gen_qscilexercoffeescript.go | 27 +- .../qscintilla6/gen_qscilexercpp.go | 27 +- .../qscintilla6/gen_qscilexercss.go | 27 +- .../qscintilla6/gen_qscilexercustom.cpp | 1133 ++++- .../qscintilla6/gen_qscilexercustom.go | 914 ++++ .../qscintilla6/gen_qscilexercustom.h | 78 + .../qscintilla6/gen_qscilexerd.go | 27 +- .../qscintilla6/gen_qscilexerdiff.go | 27 +- .../qscintilla6/gen_qscilexeredifact.go | 27 +- .../qscintilla6/gen_qscilexerfortran77.go | 27 +- .../qscintilla6/gen_qscilexerhtml.go | 27 +- .../qscintilla6/gen_qscilexerjson.go | 27 +- .../qscintilla6/gen_qscilexerlua.go | 27 +- .../qscintilla6/gen_qscilexermakefile.go | 27 +- .../qscintilla6/gen_qscilexermarkdown.go | 27 +- .../qscintilla6/gen_qscilexermatlab.go | 27 +- .../qscintilla6/gen_qscilexerpascal.go | 27 +- .../qscintilla6/gen_qscilexerperl.go | 27 +- .../qscintilla6/gen_qscilexerpo.go | 27 +- .../qscintilla6/gen_qscilexerpostscript.go | 27 +- .../qscintilla6/gen_qscilexerpov.go | 27 +- .../qscintilla6/gen_qscilexerproperties.go | 27 +- .../qscintilla6/gen_qscilexerpython.go | 27 +- .../qscintilla6/gen_qscilexerruby.go | 27 +- .../qscintilla6/gen_qscilexerspice.go | 27 +- .../qscintilla6/gen_qscilexersql.go | 27 +- .../qscintilla6/gen_qscilexertcl.go | 27 +- .../qscintilla6/gen_qscilexertex.go | 27 +- .../qscintilla6/gen_qscilexerverilog.go | 27 +- .../qscintilla6/gen_qscilexervhdl.go | 27 +- .../qscintilla6/gen_qscilexeryaml.go | 27 +- qt/gen_qabstractanimation.cpp | 366 +- qt/gen_qabstractanimation.go | 269 ++ qt/gen_qabstractanimation.h | 24 + qt/gen_qabstractbutton.cpp | 1474 +++++- qt/gen_qabstractbutton.go | 1075 +++++ qt/gen_qabstractbutton.h | 128 + qt/gen_qabstracteventdispatcher.cpp | 568 ++- qt/gen_qabstracteventdispatcher.go | 444 ++ qt/gen_qabstracteventdispatcher.h | 52 + qt/gen_qabstractitemdelegate.cpp | 615 ++- qt/gen_qabstractitemdelegate.go | 442 ++ qt/gen_qabstractitemdelegate.h | 42 + qt/gen_qabstractitemmodel.cpp | 3890 ++++++++++++++- qt/gen_qabstractitemmodel.go | 3196 +++++++++++++ qt/gen_qabstractitemmodel.h | 222 + qt/gen_qabstractitemview.cpp | 2094 ++++++++- qt/gen_qabstractitemview.go | 1545 ++++++ qt/gen_qabstractitemview.h | 144 + qt/gen_qabstractnativeeventfilter.cpp | 43 +- qt/gen_qabstractnativeeventfilter.go | 36 + qt/gen_qabstractnativeeventfilter.h | 3 + qt/gen_qabstractproxymodel.cpp | 1414 +++++- qt/gen_qabstractproxymodel.go | 1181 +++++ qt/gen_qabstractproxymodel.h | 86 + qt/gen_qabstracttextdocumentlayout.cpp | 519 +- qt/gen_qabstracttextdocumentlayout.go | 399 ++ qt/gen_qabstracttextdocumentlayout.h | 43 + qt/gen_qabstracttransition.cpp | 294 +- qt/gen_qabstracttransition.go | 225 + qt/gen_qabstracttransition.h | 26 + qt/gen_qaccessiblebridge.cpp | 282 +- qt/gen_qaccessiblebridge.go | 211 + qt/gen_qaccessiblebridge.h | 26 + qt/gen_qaccessibleobject.cpp | 460 +- qt/gen_qaccessibleobject.go | 339 -- qt/gen_qaccessibleobject.h | 28 - qt/gen_qaccessibleplugin.cpp | 283 +- qt/gen_qaccessibleplugin.go | 212 + qt/gen_qaccessibleplugin.h | 26 + qt/gen_qanimationgroup.cpp | 164 +- qt/gen_qanimationgroup.go | 131 + qt/gen_qanimationgroup.h | 12 + qt/gen_qcolumnview.cpp | 72 + qt/gen_qcolumnview.go | 52 + qt/gen_qcolumnview.h | 9 + qt/gen_qgenericplugin.cpp | 290 +- qt/gen_qgenericplugin.go | 215 + qt/gen_qgenericplugin.h | 26 + qt/gen_qgesturerecognizer.cpp | 101 +- qt/gen_qgesturerecognizer.go | 79 + qt/gen_qgesturerecognizer.h | 7 + qt/gen_qgraphicseffect.cpp | 343 +- qt/gen_qgraphicseffect.go | 256 + qt/gen_qgraphicseffect.h | 30 + qt/gen_qgraphicsitem.cpp | 3632 +++++++++++++- qt/gen_qgraphicsitem.go | 2731 +++++++++++ qt/gen_qgraphicsitem.h | 236 + qt/gen_qgraphicslayout.cpp | 276 +- qt/gen_qgraphicslayout.go | 211 + qt/gen_qgraphicslayout.h | 24 + qt/gen_qgraphicslayoutitem.cpp | 156 +- qt/gen_qgraphicslayoutitem.go | 124 + qt/gen_qgraphicslayoutitem.h | 11 + qt/gen_qgraphicstransform.cpp | 275 +- qt/gen_qgraphicstransform.go | 205 + qt/gen_qgraphicstransform.h | 26 + qt/gen_qheaderview.cpp | 72 + qt/gen_qheaderview.go | 52 + qt/gen_qheaderview.h | 9 + qt/gen_qiconengine.cpp | 451 +- qt/gen_qiconengine.go | 353 ++ qt/gen_qiconengine.h | 26 + qt/gen_qiconengineplugin.cpp | 282 +- qt/gen_qiconengineplugin.go | 211 + qt/gen_qiconengineplugin.h | 26 + qt/gen_qidentityproxymodel.cpp | 75 + qt/gen_qidentityproxymodel.go | 70 + qt/gen_qidentityproxymodel.h | 8 + qt/gen_qimageiohandler.cpp | 742 ++- qt/gen_qimageiohandler.go | 570 +++ qt/gen_qimageiohandler.h | 57 + qt/gen_qiodevice.cpp | 746 ++- qt/gen_qiodevice.go | 558 +++ qt/gen_qiodevice.h | 56 + qt/gen_qitemselectionmodel.cpp | 112 + qt/gen_qitemselectionmodel.go | 161 + qt/gen_qitemselectionmodel.h | 18 + qt/gen_qlayout.cpp | 815 +++- qt/gen_qlayout.go | 622 +++ qt/gen_qlayout.h | 64 + qt/gen_qlayoutitem.cpp | 408 +- qt/gen_qlayoutitem.go | 320 ++ qt/gen_qlayoutitem.h | 33 + qt/gen_qlistview.cpp | 72 + qt/gen_qlistview.go | 52 + qt/gen_qlistview.h | 10 + qt/gen_qlistwidget.cpp | 72 + qt/gen_qlistwidget.go | 52 + qt/gen_qlistwidget.h | 8 + qt/gen_qpagedpaintdevice.cpp | 314 +- qt/gen_qpagedpaintdevice.go | 228 + qt/gen_qpagedpaintdevice.h | 27 + qt/gen_qpaintengine.cpp | 649 ++- qt/gen_qpaintengine.go | 473 ++ qt/gen_qpaintengine.h | 42 + qt/gen_qpictureformatplugin.cpp | 382 +- qt/gen_qpictureformatplugin.go | 293 ++ qt/gen_qpictureformatplugin.h | 30 + qt/gen_qrunnable.cpp | 35 +- qt/gen_qrunnable.go | 25 + qt/gen_qrunnable.h | 3 + qt/gen_qsortfilterproxymodel.cpp | 75 + qt/gen_qsortfilterproxymodel.go | 70 + qt/gen_qsortfilterproxymodel.h | 8 + qt/gen_qstyle.cpp | 931 +++- qt/gen_qstyle.go | 747 +++ qt/gen_qstyle.h | 69 + qt/gen_qstyleplugin.cpp | 282 +- qt/gen_qstyleplugin.go | 211 + qt/gen_qstyleplugin.h | 26 + qt/gen_qsyntaxhighlighter.cpp | 282 +- qt/gen_qsyntaxhighlighter.go | 209 + qt/gen_qsyntaxhighlighter.h | 26 + qt/gen_qtableview.cpp | 72 + qt/gen_qtableview.go | 52 + qt/gen_qtableview.h | 10 + qt/gen_qtablewidget.cpp | 72 + qt/gen_qtablewidget.go | 52 + qt/gen_qtablewidget.h | 8 + qt/gen_qtransposeproxymodel.cpp | 67 + qt/gen_qtransposeproxymodel.go | 56 + qt/gen_qtransposeproxymodel.h | 6 + qt/gen_qtreeview.cpp | 72 + qt/gen_qtreeview.go | 52 + qt/gen_qtreeview.h | 10 + qt/gen_qtreewidget.cpp | 72 + qt/gen_qtreewidget.go | 52 + qt/gen_qtreewidget.h | 8 + qt/gen_qundoview.cpp | 72 + qt/gen_qundoview.go | 52 + qt/gen_qundoview.h | 8 + qt/gen_qvalidator.cpp | 325 +- qt/gen_qvalidator.go | 241 + qt/gen_qvalidator.h | 28 + qt/multimedia/gen_qabstractvideobuffer.cpp | 289 +- qt/multimedia/gen_qabstractvideobuffer.go | 224 + qt/multimedia/gen_qabstractvideobuffer.h | 22 + qt/multimedia/gen_qabstractvideofilter.cpp | 276 +- qt/multimedia/gen_qabstractvideofilter.go | 204 + qt/multimedia/gen_qabstractvideofilter.h | 26 + qt/multimedia/gen_qabstractvideosurface.cpp | 442 +- qt/multimedia/gen_qabstractvideosurface.go | 330 ++ qt/multimedia/gen_qabstractvideosurface.h | 36 + qt/multimedia/gen_qaudiosystemplugin.cpp | 362 +- qt/multimedia/gen_qaudiosystemplugin.go | 286 ++ qt/multimedia/gen_qaudiosystemplugin.h | 32 + qt/network/gen_qnetworkproxy.cpp | 44 +- qt/network/gen_qnetworkproxy.go | 36 + qt/network/gen_qnetworkproxy.h | 3 + qt6/gen_qabstractanimation.cpp | 366 +- qt6/gen_qabstractanimation.go | 269 ++ qt6/gen_qabstractanimation.h | 24 + qt6/gen_qabstractbutton.cpp | 1476 +++++- qt6/gen_qabstractbutton.go | 1075 +++++ qt6/gen_qabstractbutton.h | 130 + qt6/gen_qabstracteventdispatcher.cpp | 531 ++- qt6/gen_qabstracteventdispatcher.go | 414 ++ qt6/gen_qabstracteventdispatcher.h | 48 + qt6/gen_qabstractitemdelegate.cpp | 615 ++- qt6/gen_qabstractitemdelegate.go | 442 ++ qt6/gen_qabstractitemdelegate.h | 42 + qt6/gen_qabstractitemmodel.cpp | 4187 ++++++++++++++++- qt6/gen_qabstractitemmodel.go | 3412 ++++++++++++++ qt6/gen_qabstractitemmodel.h | 240 + qt6/gen_qabstractitemview.cpp | 2129 ++++++++- qt6/gen_qabstractitemview.go | 1567 ++++++ qt6/gen_qabstractitemview.h | 146 + qt6/gen_qabstractnativeeventfilter.cpp | 44 +- qt6/gen_qabstractnativeeventfilter.go | 36 + qt6/gen_qabstractnativeeventfilter.h | 3 + qt6/gen_qabstractproxymodel.cpp | 1513 +++++- qt6/gen_qabstractproxymodel.go | 1253 +++++ qt6/gen_qabstractproxymodel.h | 92 + qt6/gen_qabstracttextdocumentlayout.cpp | 519 +- qt6/gen_qabstracttextdocumentlayout.go | 399 ++ qt6/gen_qabstracttextdocumentlayout.h | 43 + qt6/gen_qaccessiblebridge.cpp | 282 +- qt6/gen_qaccessiblebridge.go | 211 + qt6/gen_qaccessiblebridge.h | 26 + qt6/gen_qaccessibleobject.cpp | 460 +- qt6/gen_qaccessibleobject.go | 339 -- qt6/gen_qaccessibleobject.h | 28 - qt6/gen_qaccessibleplugin.cpp | 283 +- qt6/gen_qaccessibleplugin.go | 212 + qt6/gen_qaccessibleplugin.h | 26 + qt6/gen_qanimationgroup.cpp | 164 +- qt6/gen_qanimationgroup.go | 131 + qt6/gen_qanimationgroup.h | 12 + qt6/gen_qcolumnview.cpp | 72 + qt6/gen_qcolumnview.go | 52 + qt6/gen_qcolumnview.h | 9 + qt6/gen_qgenericplugin.cpp | 290 +- qt6/gen_qgenericplugin.go | 215 + qt6/gen_qgenericplugin.h | 26 + qt6/gen_qgesturerecognizer.cpp | 101 +- qt6/gen_qgesturerecognizer.go | 79 + qt6/gen_qgesturerecognizer.h | 7 + qt6/gen_qgraphicseffect.cpp | 343 +- qt6/gen_qgraphicseffect.go | 256 + qt6/gen_qgraphicseffect.h | 30 + qt6/gen_qgraphicsitem.cpp | 3632 +++++++++++++- qt6/gen_qgraphicsitem.go | 2731 +++++++++++ qt6/gen_qgraphicsitem.h | 236 + qt6/gen_qgraphicslayout.cpp | 306 +- qt6/gen_qgraphicslayout.go | 233 + qt6/gen_qgraphicslayout.h | 26 + qt6/gen_qgraphicslayoutitem.cpp | 186 +- qt6/gen_qgraphicslayoutitem.go | 146 + qt6/gen_qgraphicslayoutitem.h | 13 + qt6/gen_qgraphicstransform.cpp | 275 +- qt6/gen_qgraphicstransform.go | 205 + qt6/gen_qgraphicstransform.h | 26 + qt6/gen_qheaderview.cpp | 72 + qt6/gen_qheaderview.go | 52 + qt6/gen_qheaderview.h | 9 + qt6/gen_qiconengine.cpp | 514 +- qt6/gen_qiconengine.go | 398 ++ qt6/gen_qiconengine.h | 29 + qt6/gen_qiconengineplugin.cpp | 282 +- qt6/gen_qiconengineplugin.go | 211 + qt6/gen_qiconengineplugin.h | 26 + qt6/gen_qidentityproxymodel.cpp | 75 + qt6/gen_qidentityproxymodel.go | 70 + qt6/gen_qidentityproxymodel.h | 8 + qt6/gen_qimageiohandler.cpp | 706 ++- qt6/gen_qimageiohandler.go | 543 +++ qt6/gen_qimageiohandler.h | 55 + qt6/gen_qiodevice.cpp | 781 ++- qt6/gen_qiodevice.go | 585 +++ qt6/gen_qiodevice.h | 58 + qt6/gen_qitemselectionmodel.cpp | 113 + qt6/gen_qitemselectionmodel.go | 167 + qt6/gen_qitemselectionmodel.h | 18 + qt6/gen_qlayout.cpp | 942 +++- qt6/gen_qlayout.go | 718 +++ qt6/gen_qlayout.h | 72 + qt6/gen_qlayoutitem.cpp | 408 +- qt6/gen_qlayoutitem.go | 320 ++ qt6/gen_qlayoutitem.h | 33 + qt6/gen_qlistview.cpp | 72 + qt6/gen_qlistview.go | 52 + qt6/gen_qlistview.h | 10 + qt6/gen_qlistwidget.cpp | 72 + qt6/gen_qlistwidget.go | 52 + qt6/gen_qlistwidget.h | 8 + qt6/gen_qpaintengine.cpp | 713 ++- qt6/gen_qpaintengine.go | 537 +++ qt6/gen_qpaintengine.h | 46 + qt6/gen_qrunnable.cpp | 35 +- qt6/gen_qrunnable.go | 25 + qt6/gen_qrunnable.h | 3 + qt6/gen_qsortfilterproxymodel.cpp | 75 + qt6/gen_qsortfilterproxymodel.go | 70 + qt6/gen_qsortfilterproxymodel.h | 8 + qt6/gen_qstyle.cpp | 931 +++- qt6/gen_qstyle.go | 747 +++ qt6/gen_qstyle.h | 69 + qt6/gen_qstyleplugin.cpp | 282 +- qt6/gen_qstyleplugin.go | 211 + qt6/gen_qstyleplugin.h | 26 + qt6/gen_qsyntaxhighlighter.cpp | 282 +- qt6/gen_qsyntaxhighlighter.go | 209 + qt6/gen_qsyntaxhighlighter.h | 26 + qt6/gen_qtableview.cpp | 72 + qt6/gen_qtableview.go | 52 + qt6/gen_qtableview.h | 10 + qt6/gen_qtablewidget.cpp | 72 + qt6/gen_qtablewidget.go | 52 + qt6/gen_qtablewidget.h | 8 + qt6/gen_qtransposeproxymodel.cpp | 67 + qt6/gen_qtransposeproxymodel.go | 56 + qt6/gen_qtransposeproxymodel.h | 6 + qt6/gen_qtreeview.cpp | 72 + qt6/gen_qtreeview.go | 52 + qt6/gen_qtreeview.h | 10 + qt6/gen_qtreewidget.cpp | 72 + qt6/gen_qtreewidget.go | 52 + qt6/gen_qtreewidget.h | 8 + qt6/gen_qundoview.cpp | 72 + qt6/gen_qundoview.go | 52 + qt6/gen_qundoview.h | 8 + qt6/gen_qvalidator.cpp | 325 +- qt6/gen_qvalidator.go | 241 + qt6/gen_qvalidator.h | 28 + qt6/network/gen_qnetworkproxy.cpp | 44 +- qt6/network/gen_qnetworkproxy.go | 36 + qt6/network/gen_qnetworkproxy.h | 3 + 382 files changed, 106449 insertions(+), 3211 deletions(-) diff --git a/qt-extras/scintillaedit/gen_ScintillaEdit.cpp b/qt-extras/scintillaedit/gen_ScintillaEdit.cpp index 4ea6f64d..3eefa1bd 100644 --- a/qt-extras/scintillaedit/gen_ScintillaEdit.cpp +++ b/qt-extras/scintillaedit/gen_ScintillaEdit.cpp @@ -695,6 +695,558 @@ void Scintilla__Internal__SurfaceMode_Delete(Scintilla__Internal__SurfaceMode* s } } +class MiqtVirtualScintillaInternalSurface : public virtual Scintilla::Internal::Surface { +public: + + MiqtVirtualScintillaInternalSurface(): Scintilla::Internal::Surface() {}; + + virtual ~MiqtVirtualScintillaInternalSurface() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Init = 0; + + // Subclass to allow providing a Go implementation + virtual void Init(Scintilla::Internal::WindowID wid) override { + if (handle__Init == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla::Internal::WindowID wid_ret = wid; + void* sigval1 = static_cast(wid_ret); + + miqt_exec_callback_Scintilla__Internal__Surface_Init(this, handle__Init, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Init2 = 0; + + // Subclass to allow providing a Go implementation + virtual void Init(Scintilla::Internal::SurfaceID sid, Scintilla::Internal::WindowID wid) override { + if (handle__Init2 == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla::Internal::SurfaceID sid_ret = sid; + void* sigval1 = static_cast(sid_ret); + Scintilla::Internal::WindowID wid_ret = wid; + void* sigval2 = static_cast(wid_ret); + + miqt_exec_callback_Scintilla__Internal__Surface_Init2(this, handle__Init2, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetMode = 0; + + // Subclass to allow providing a Go implementation + virtual void SetMode(Scintilla::Internal::SurfaceMode mode) override { + if (handle__SetMode == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__SurfaceMode* sigval1 = new Scintilla::Internal::SurfaceMode(mode); + + miqt_exec_callback_Scintilla__Internal__Surface_SetMode(this, handle__SetMode, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Release = 0; + + // Subclass to allow providing a Go implementation + virtual void Release() override { + if (handle__Release == 0) { + return; // Pure virtual, there is no base we can call + } + + + miqt_exec_callback_Scintilla__Internal__Surface_Release(this, handle__Release); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsFeature = 0; + + // Subclass to allow providing a Go implementation + virtual int SupportsFeature(Scintilla::Supports feature) override { + if (handle__SupportsFeature == 0) { + return 0; // Pure virtual, there is no base we can call + } + + Scintilla::Supports feature_ret = feature; + int sigval1 = static_cast(feature_ret); + + int callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_SupportsFeature(this, handle__SupportsFeature, sigval1); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Initialised = 0; + + // Subclass to allow providing a Go implementation + virtual bool Initialised() override { + if (handle__Initialised == 0) { + return false; // Pure virtual, there is no base we can call + } + + + bool callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_Initialised(this, handle__Initialised); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LogPixelsY = 0; + + // Subclass to allow providing a Go implementation + virtual int LogPixelsY() override { + if (handle__LogPixelsY == 0) { + return 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_LogPixelsY(this, handle__LogPixelsY); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PixelDivisions = 0; + + // Subclass to allow providing a Go implementation + virtual int PixelDivisions() override { + if (handle__PixelDivisions == 0) { + return 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_PixelDivisions(this, handle__PixelDivisions); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DeviceHeightFont = 0; + + // Subclass to allow providing a Go implementation + virtual int DeviceHeightFont(int points) override { + if (handle__DeviceHeightFont == 0) { + return 0; // Pure virtual, there is no base we can call + } + + int sigval1 = points; + + int callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_DeviceHeightFont(this, handle__DeviceHeightFont, sigval1); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LineDraw = 0; + + // Subclass to allow providing a Go implementation + virtual void LineDraw(Scintilla::Internal::Point start, Scintilla::Internal::Point end, Scintilla::Internal::Stroke stroke) override { + if (handle__LineDraw == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__Point* sigval1 = new Scintilla::Internal::Point(start); + Scintilla__Internal__Point* sigval2 = new Scintilla::Internal::Point(end); + Scintilla__Internal__Stroke* sigval3 = new Scintilla::Internal::Stroke(stroke); + + miqt_exec_callback_Scintilla__Internal__Surface_LineDraw(this, handle__LineDraw, sigval1, sigval2, sigval3); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolyLine = 0; + + // Subclass to allow providing a Go implementation + virtual void PolyLine(const Scintilla::Internal::Point* pts, size_t npts, Scintilla::Internal::Stroke stroke) override { + if (handle__PolyLine == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__Point* sigval1 = (Scintilla__Internal__Point*) pts; + size_t sigval2 = npts; + Scintilla__Internal__Stroke* sigval3 = new Scintilla::Internal::Stroke(stroke); + + miqt_exec_callback_Scintilla__Internal__Surface_PolyLine(this, handle__PolyLine, sigval1, sigval2, sigval3); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Polygon = 0; + + // Subclass to allow providing a Go implementation + virtual void Polygon(const Scintilla::Internal::Point* pts, size_t npts, Scintilla::Internal::FillStroke fillStroke) override { + if (handle__Polygon == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__Point* sigval1 = (Scintilla__Internal__Point*) pts; + size_t sigval2 = npts; + Scintilla__Internal__FillStroke* sigval3 = new Scintilla::Internal::FillStroke(fillStroke); + + miqt_exec_callback_Scintilla__Internal__Surface_Polygon(this, handle__Polygon, sigval1, sigval2, sigval3); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RectangleDraw = 0; + + // Subclass to allow providing a Go implementation + virtual void RectangleDraw(Scintilla::Internal::PRectangle rc, Scintilla::Internal::FillStroke fillStroke) override { + if (handle__RectangleDraw == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); + Scintilla__Internal__FillStroke* sigval2 = new Scintilla::Internal::FillStroke(fillStroke); + + miqt_exec_callback_Scintilla__Internal__Surface_RectangleDraw(this, handle__RectangleDraw, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RectangleFrame = 0; + + // Subclass to allow providing a Go implementation + virtual void RectangleFrame(Scintilla::Internal::PRectangle rc, Scintilla::Internal::Stroke stroke) override { + if (handle__RectangleFrame == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); + Scintilla__Internal__Stroke* sigval2 = new Scintilla::Internal::Stroke(stroke); + + miqt_exec_callback_Scintilla__Internal__Surface_RectangleFrame(this, handle__RectangleFrame, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FillRectangle = 0; + + // Subclass to allow providing a Go implementation + virtual void FillRectangle(Scintilla::Internal::PRectangle rc, Scintilla::Internal::Fill fill) override { + if (handle__FillRectangle == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); + Scintilla__Internal__Fill* sigval2 = new Scintilla::Internal::Fill(fill); + + miqt_exec_callback_Scintilla__Internal__Surface_FillRectangle(this, handle__FillRectangle, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FillRectangleAligned = 0; + + // Subclass to allow providing a Go implementation + virtual void FillRectangleAligned(Scintilla::Internal::PRectangle rc, Scintilla::Internal::Fill fill) override { + if (handle__FillRectangleAligned == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); + Scintilla__Internal__Fill* sigval2 = new Scintilla::Internal::Fill(fill); + + miqt_exec_callback_Scintilla__Internal__Surface_FillRectangleAligned(this, handle__FillRectangleAligned, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FillRectangle2 = 0; + + // Subclass to allow providing a Go implementation + virtual void FillRectangle(Scintilla::Internal::PRectangle rc, Scintilla::Internal::Surface& surfacePattern) override { + if (handle__FillRectangle2 == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); + Scintilla::Internal::Surface& surfacePattern_ret = surfacePattern; + // Cast returned reference into pointer + Scintilla__Internal__Surface* sigval2 = &surfacePattern_ret; + + miqt_exec_callback_Scintilla__Internal__Surface_FillRectangle2(this, handle__FillRectangle2, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RoundedRectangle = 0; + + // Subclass to allow providing a Go implementation + virtual void RoundedRectangle(Scintilla::Internal::PRectangle rc, Scintilla::Internal::FillStroke fillStroke) override { + if (handle__RoundedRectangle == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); + Scintilla__Internal__FillStroke* sigval2 = new Scintilla::Internal::FillStroke(fillStroke); + + miqt_exec_callback_Scintilla__Internal__Surface_RoundedRectangle(this, handle__RoundedRectangle, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AlphaRectangle = 0; + + // Subclass to allow providing a Go implementation + virtual void AlphaRectangle(Scintilla::Internal::PRectangle rc, Scintilla::Internal::XYPOSITION cornerSize, Scintilla::Internal::FillStroke fillStroke) override { + if (handle__AlphaRectangle == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); + Scintilla::Internal::XYPOSITION cornerSize_ret = cornerSize; + double sigval2 = static_cast(cornerSize_ret); + Scintilla__Internal__FillStroke* sigval3 = new Scintilla::Internal::FillStroke(fillStroke); + + miqt_exec_callback_Scintilla__Internal__Surface_AlphaRectangle(this, handle__AlphaRectangle, sigval1, sigval2, sigval3); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawRGBAImage = 0; + + // Subclass to allow providing a Go implementation + virtual void DrawRGBAImage(Scintilla::Internal::PRectangle rc, int width, int height, const unsigned char* pixelsImage) override { + if (handle__DrawRGBAImage == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); + int sigval2 = width; + int sigval3 = height; + const unsigned char* sigval4 = (const unsigned char*) pixelsImage; + + miqt_exec_callback_Scintilla__Internal__Surface_DrawRGBAImage(this, handle__DrawRGBAImage, sigval1, sigval2, sigval3, sigval4); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Ellipse = 0; + + // Subclass to allow providing a Go implementation + virtual void Ellipse(Scintilla::Internal::PRectangle rc, Scintilla::Internal::FillStroke fillStroke) override { + if (handle__Ellipse == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); + Scintilla__Internal__FillStroke* sigval2 = new Scintilla::Internal::FillStroke(fillStroke); + + miqt_exec_callback_Scintilla__Internal__Surface_Ellipse(this, handle__Ellipse, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Stadium = 0; + + // Subclass to allow providing a Go implementation + virtual void Stadium(Scintilla::Internal::PRectangle rc, Scintilla::Internal::FillStroke fillStroke, Scintilla::Internal::Surface::Ends ends) override { + if (handle__Stadium == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); + Scintilla__Internal__FillStroke* sigval2 = new Scintilla::Internal::FillStroke(fillStroke); + Scintilla::Internal::Surface::Ends ends_ret = ends; + int sigval3 = static_cast(ends_ret); + + miqt_exec_callback_Scintilla__Internal__Surface_Stadium(this, handle__Stadium, sigval1, sigval2, sigval3); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Copy = 0; + + // Subclass to allow providing a Go implementation + virtual void Copy(Scintilla::Internal::PRectangle rc, Scintilla::Internal::Point from, Scintilla::Internal::Surface& surfaceSource) override { + if (handle__Copy == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); + Scintilla__Internal__Point* sigval2 = new Scintilla::Internal::Point(from); + Scintilla::Internal::Surface& surfaceSource_ret = surfaceSource; + // Cast returned reference into pointer + Scintilla__Internal__Surface* sigval3 = &surfaceSource_ret; + + miqt_exec_callback_Scintilla__Internal__Surface_Copy(this, handle__Copy, sigval1, sigval2, sigval3); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Ascent = 0; + + // Subclass to allow providing a Go implementation + virtual Scintilla::Internal::XYPOSITION Ascent(const Scintilla::Internal::Font* font_) override { + if (handle__Ascent == 0) { + return 0; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__Font* sigval1 = (Scintilla__Internal__Font*) font_; + + double callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_Ascent(this, handle__Ascent, sigval1); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Descent = 0; + + // Subclass to allow providing a Go implementation + virtual Scintilla::Internal::XYPOSITION Descent(const Scintilla::Internal::Font* font_) override { + if (handle__Descent == 0) { + return 0; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__Font* sigval1 = (Scintilla__Internal__Font*) font_; + + double callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_Descent(this, handle__Descent, sigval1); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InternalLeading = 0; + + // Subclass to allow providing a Go implementation + virtual Scintilla::Internal::XYPOSITION InternalLeading(const Scintilla::Internal::Font* font_) override { + if (handle__InternalLeading == 0) { + return 0; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__Font* sigval1 = (Scintilla__Internal__Font*) font_; + + double callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_InternalLeading(this, handle__InternalLeading, sigval1); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Height = 0; + + // Subclass to allow providing a Go implementation + virtual Scintilla::Internal::XYPOSITION Height(const Scintilla::Internal::Font* font_) override { + if (handle__Height == 0) { + return 0; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__Font* sigval1 = (Scintilla__Internal__Font*) font_; + + double callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_Height(this, handle__Height, sigval1); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AverageCharWidth = 0; + + // Subclass to allow providing a Go implementation + virtual Scintilla::Internal::XYPOSITION AverageCharWidth(const Scintilla::Internal::Font* font_) override { + if (handle__AverageCharWidth == 0) { + return 0; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__Font* sigval1 = (Scintilla__Internal__Font*) font_; + + double callback_return_value = miqt_exec_callback_Scintilla__Internal__Surface_AverageCharWidth(this, handle__AverageCharWidth, sigval1); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetClip = 0; + + // Subclass to allow providing a Go implementation + virtual void SetClip(Scintilla::Internal::PRectangle rc) override { + if (handle__SetClip == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__PRectangle* sigval1 = new Scintilla::Internal::PRectangle(rc); + + miqt_exec_callback_Scintilla__Internal__Surface_SetClip(this, handle__SetClip, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PopClip = 0; + + // Subclass to allow providing a Go implementation + virtual void PopClip() override { + if (handle__PopClip == 0) { + return; // Pure virtual, there is no base we can call + } + + + miqt_exec_callback_Scintilla__Internal__Surface_PopClip(this, handle__PopClip); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FlushCachedState = 0; + + // Subclass to allow providing a Go implementation + virtual void FlushCachedState() override { + if (handle__FlushCachedState == 0) { + return; // Pure virtual, there is no base we can call + } + + + miqt_exec_callback_Scintilla__Internal__Surface_FlushCachedState(this, handle__FlushCachedState); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FlushDrawing = 0; + + // Subclass to allow providing a Go implementation + virtual void FlushDrawing() override { + if (handle__FlushDrawing == 0) { + return; // Pure virtual, there is no base we can call + } + + + miqt_exec_callback_Scintilla__Internal__Surface_FlushDrawing(this, handle__FlushDrawing); + + + } + +}; + +void Scintilla__Internal__Surface_new(Scintilla__Internal__Surface** outptr_Scintilla__Internal__Surface) { + MiqtVirtualScintillaInternalSurface* ret = new MiqtVirtualScintillaInternalSurface(); + *outptr_Scintilla__Internal__Surface = ret; +} + void Scintilla__Internal__Surface_Init(Scintilla__Internal__Surface* self, void* wid) { self->Init(wid); } @@ -828,9 +1380,137 @@ void Scintilla__Internal__Surface_FlushDrawing(Scintilla__Internal__Surface* sel self->FlushDrawing(); } +void Scintilla__Internal__Surface_override_virtual_Init(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__Init = slot; +} + +void Scintilla__Internal__Surface_override_virtual_Init2(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__Init2 = slot; +} + +void Scintilla__Internal__Surface_override_virtual_SetMode(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__SetMode = slot; +} + +void Scintilla__Internal__Surface_override_virtual_Release(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__Release = slot; +} + +void Scintilla__Internal__Surface_override_virtual_SupportsFeature(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__SupportsFeature = slot; +} + +void Scintilla__Internal__Surface_override_virtual_Initialised(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__Initialised = slot; +} + +void Scintilla__Internal__Surface_override_virtual_LogPixelsY(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__LogPixelsY = slot; +} + +void Scintilla__Internal__Surface_override_virtual_PixelDivisions(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__PixelDivisions = slot; +} + +void Scintilla__Internal__Surface_override_virtual_DeviceHeightFont(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__DeviceHeightFont = slot; +} + +void Scintilla__Internal__Surface_override_virtual_LineDraw(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__LineDraw = slot; +} + +void Scintilla__Internal__Surface_override_virtual_PolyLine(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__PolyLine = slot; +} + +void Scintilla__Internal__Surface_override_virtual_Polygon(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__Polygon = slot; +} + +void Scintilla__Internal__Surface_override_virtual_RectangleDraw(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__RectangleDraw = slot; +} + +void Scintilla__Internal__Surface_override_virtual_RectangleFrame(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__RectangleFrame = slot; +} + +void Scintilla__Internal__Surface_override_virtual_FillRectangle(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__FillRectangle = slot; +} + +void Scintilla__Internal__Surface_override_virtual_FillRectangleAligned(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__FillRectangleAligned = slot; +} + +void Scintilla__Internal__Surface_override_virtual_FillRectangle2(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__FillRectangle2 = slot; +} + +void Scintilla__Internal__Surface_override_virtual_RoundedRectangle(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__RoundedRectangle = slot; +} + +void Scintilla__Internal__Surface_override_virtual_AlphaRectangle(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__AlphaRectangle = slot; +} + +void Scintilla__Internal__Surface_override_virtual_DrawRGBAImage(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__DrawRGBAImage = slot; +} + +void Scintilla__Internal__Surface_override_virtual_Ellipse(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__Ellipse = slot; +} + +void Scintilla__Internal__Surface_override_virtual_Stadium(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__Stadium = slot; +} + +void Scintilla__Internal__Surface_override_virtual_Copy(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__Copy = slot; +} + +void Scintilla__Internal__Surface_override_virtual_Ascent(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__Ascent = slot; +} + +void Scintilla__Internal__Surface_override_virtual_Descent(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__Descent = slot; +} + +void Scintilla__Internal__Surface_override_virtual_InternalLeading(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__InternalLeading = slot; +} + +void Scintilla__Internal__Surface_override_virtual_Height(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__Height = slot; +} + +void Scintilla__Internal__Surface_override_virtual_AverageCharWidth(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__AverageCharWidth = slot; +} + +void Scintilla__Internal__Surface_override_virtual_SetClip(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__SetClip = slot; +} + +void Scintilla__Internal__Surface_override_virtual_PopClip(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__PopClip = slot; +} + +void Scintilla__Internal__Surface_override_virtual_FlushCachedState(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__FlushCachedState = slot; +} + +void Scintilla__Internal__Surface_override_virtual_FlushDrawing(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__Surface*)(self) )->handle__FlushDrawing = slot; +} + void Scintilla__Internal__Surface_Delete(Scintilla__Internal__Surface* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } @@ -943,6 +1623,333 @@ void Scintilla__Internal__ListOptions_Delete(Scintilla__Internal__ListOptions* s } } +class MiqtVirtualScintillaInternalListBox : public virtual Scintilla::Internal::ListBox { +public: + + MiqtVirtualScintillaInternalListBox(): Scintilla::Internal::ListBox() {}; + + virtual ~MiqtVirtualScintillaInternalListBox() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetFont = 0; + + // Subclass to allow providing a Go implementation + virtual void SetFont(const Scintilla::Internal::Font* font) override { + if (handle__SetFont == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__Font* sigval1 = (Scintilla__Internal__Font*) font; + + miqt_exec_callback_Scintilla__Internal__ListBox_SetFont(this, handle__SetFont, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Create = 0; + + // Subclass to allow providing a Go implementation + virtual void Create(Scintilla::Internal::Window& parent, int ctrlID, Scintilla::Internal::Point location, int lineHeight_, bool unicodeMode_, Scintilla::Technology technology_) override { + if (handle__Create == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla::Internal::Window& parent_ret = parent; + // Cast returned reference into pointer + Scintilla__Internal__Window* sigval1 = &parent_ret; + int sigval2 = ctrlID; + Scintilla__Internal__Point* sigval3 = new Scintilla::Internal::Point(location); + int sigval4 = lineHeight_; + bool sigval5 = unicodeMode_; + Scintilla::Technology technology__ret = technology_; + int sigval6 = static_cast(technology__ret); + + miqt_exec_callback_Scintilla__Internal__ListBox_Create(this, handle__Create, sigval1, sigval2, sigval3, sigval4, sigval5, sigval6); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetAverageCharWidth = 0; + + // Subclass to allow providing a Go implementation + virtual void SetAverageCharWidth(int width) override { + if (handle__SetAverageCharWidth == 0) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = width; + + miqt_exec_callback_Scintilla__Internal__ListBox_SetAverageCharWidth(this, handle__SetAverageCharWidth, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetVisibleRows = 0; + + // Subclass to allow providing a Go implementation + virtual void SetVisibleRows(int rows) override { + if (handle__SetVisibleRows == 0) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = rows; + + miqt_exec_callback_Scintilla__Internal__ListBox_SetVisibleRows(this, handle__SetVisibleRows, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GetVisibleRows = 0; + + // Subclass to allow providing a Go implementation + virtual int GetVisibleRows() const override { + if (handle__GetVisibleRows == 0) { + return 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_Scintilla__Internal__ListBox_GetVisibleRows(const_cast(this), handle__GetVisibleRows); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GetDesiredRect = 0; + + // Subclass to allow providing a Go implementation + virtual Scintilla::Internal::PRectangle GetDesiredRect() override { + if (handle__GetDesiredRect == 0) { + return Scintilla::Internal::PRectangle(); // Pure virtual, there is no base we can call + } + + + Scintilla__Internal__PRectangle* callback_return_value = miqt_exec_callback_Scintilla__Internal__ListBox_GetDesiredRect(this, handle__GetDesiredRect); + + return *callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CaretFromEdge = 0; + + // Subclass to allow providing a Go implementation + virtual int CaretFromEdge() override { + if (handle__CaretFromEdge == 0) { + return 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_Scintilla__Internal__ListBox_CaretFromEdge(this, handle__CaretFromEdge); + + return static_cast(callback_return_value); + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + + miqt_exec_callback_Scintilla__Internal__ListBox_Clear(this, handle__Clear); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Append = 0; + + // Subclass to allow providing a Go implementation + virtual void Append(char* s, int typeVal) override { + if (handle__Append == 0) { + return; // Pure virtual, there is no base we can call + } + + char* sigval1 = s; + int sigval2 = typeVal; + + miqt_exec_callback_Scintilla__Internal__ListBox_Append(this, handle__Append, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Length = 0; + + // Subclass to allow providing a Go implementation + virtual int Length() override { + if (handle__Length == 0) { + return 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_Scintilla__Internal__ListBox_Length(this, handle__Length); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Select = 0; + + // Subclass to allow providing a Go implementation + virtual void Select(int n) override { + if (handle__Select == 0) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = n; + + miqt_exec_callback_Scintilla__Internal__ListBox_Select(this, handle__Select, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GetSelection = 0; + + // Subclass to allow providing a Go implementation + virtual int GetSelection() override { + if (handle__GetSelection == 0) { + return 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_Scintilla__Internal__ListBox_GetSelection(this, handle__GetSelection); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Find = 0; + + // Subclass to allow providing a Go implementation + virtual int Find(const char* prefix) override { + if (handle__Find == 0) { + return 0; // Pure virtual, there is no base we can call + } + + const char* sigval1 = (const char*) prefix; + + int callback_return_value = miqt_exec_callback_Scintilla__Internal__ListBox_Find(this, handle__Find, sigval1); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RegisterImage = 0; + + // Subclass to allow providing a Go implementation + virtual void RegisterImage(int typeVal, const char* xpm_data) override { + if (handle__RegisterImage == 0) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = typeVal; + const char* sigval2 = (const char*) xpm_data; + + miqt_exec_callback_Scintilla__Internal__ListBox_RegisterImage(this, handle__RegisterImage, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RegisterRGBAImage = 0; + + // Subclass to allow providing a Go implementation + virtual void RegisterRGBAImage(int typeVal, int width, int height, const unsigned char* pixelsImage) override { + if (handle__RegisterRGBAImage == 0) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = typeVal; + int sigval2 = width; + int sigval3 = height; + const unsigned char* sigval4 = (const unsigned char*) pixelsImage; + + miqt_exec_callback_Scintilla__Internal__ListBox_RegisterRGBAImage(this, handle__RegisterRGBAImage, sigval1, sigval2, sigval3, sigval4); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ClearRegisteredImages = 0; + + // Subclass to allow providing a Go implementation + virtual void ClearRegisteredImages() override { + if (handle__ClearRegisteredImages == 0) { + return; // Pure virtual, there is no base we can call + } + + + miqt_exec_callback_Scintilla__Internal__ListBox_ClearRegisteredImages(this, handle__ClearRegisteredImages); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetDelegate = 0; + + // Subclass to allow providing a Go implementation + virtual void SetDelegate(Scintilla::Internal::IListBoxDelegate* lbDelegate) override { + if (handle__SetDelegate == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__IListBoxDelegate* sigval1 = lbDelegate; + + miqt_exec_callback_Scintilla__Internal__ListBox_SetDelegate(this, handle__SetDelegate, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetList = 0; + + // Subclass to allow providing a Go implementation + virtual void SetList(const char* list, char separator, char typesep) override { + if (handle__SetList == 0) { + return; // Pure virtual, there is no base we can call + } + + const char* sigval1 = (const char*) list; + char sigval2 = separator; + char sigval3 = typesep; + + miqt_exec_callback_Scintilla__Internal__ListBox_SetList(this, handle__SetList, sigval1, sigval2, sigval3); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetOptions = 0; + + // Subclass to allow providing a Go implementation + virtual void SetOptions(Scintilla::Internal::ListOptions options_) override { + if (handle__SetOptions == 0) { + return; // Pure virtual, there is no base we can call + } + + Scintilla__Internal__ListOptions* sigval1 = new Scintilla::Internal::ListOptions(options_); + + miqt_exec_callback_Scintilla__Internal__ListBox_SetOptions(this, handle__SetOptions, sigval1); + + + } + +}; + +void Scintilla__Internal__ListBox_new(Scintilla__Internal__ListBox** outptr_Scintilla__Internal__ListBox, Scintilla__Internal__Window** outptr_Scintilla__Internal__Window) { + MiqtVirtualScintillaInternalListBox* ret = new MiqtVirtualScintillaInternalListBox(); + *outptr_Scintilla__Internal__ListBox = ret; + *outptr_Scintilla__Internal__Window = static_cast(ret); +} + void Scintilla__Internal__ListBox_SetFont(Scintilla__Internal__ListBox* self, Scintilla__Internal__Font* font) { self->SetFont(font); } @@ -1019,9 +2026,85 @@ void Scintilla__Internal__ListBox_SetOptions(Scintilla__Internal__ListBox* self, self->SetOptions(*options_); } +void Scintilla__Internal__ListBox_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__SetFont = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_Create(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__Create = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_SetAverageCharWidth(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__SetAverageCharWidth = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_SetVisibleRows(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__SetVisibleRows = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_GetVisibleRows(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__GetVisibleRows = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_GetDesiredRect(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__GetDesiredRect = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_CaretFromEdge(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__CaretFromEdge = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_Clear(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__Clear = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_Append(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__Append = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_Length(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__Length = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_Select(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__Select = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_GetSelection(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__GetSelection = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_Find(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__Find = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_RegisterImage(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__RegisterImage = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_RegisterRGBAImage(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__RegisterRGBAImage = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_ClearRegisteredImages(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__ClearRegisteredImages = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_SetDelegate(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__SetDelegate = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_SetList(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__SetList = slot; +} + +void Scintilla__Internal__ListBox_override_virtual_SetOptions(void* self, intptr_t slot) { + dynamic_cast( (Scintilla__Internal__ListBox*)(self) )->handle__SetOptions = slot; +} + void Scintilla__Internal__ListBox_Delete(Scintilla__Internal__ListBox* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt-extras/scintillaedit/gen_ScintillaEdit.go b/qt-extras/scintillaedit/gen_ScintillaEdit.go index eecb3f9a..4b3202a5 100644 --- a/qt-extras/scintillaedit/gen_ScintillaEdit.go +++ b/qt-extras/scintillaedit/gen_ScintillaEdit.go @@ -3635,6 +3635,16 @@ func UnsafeNewScintilla__Internal__Surface(h unsafe.Pointer) *Scintilla__Interna return &Scintilla__Internal__Surface{h: (*C.Scintilla__Internal__Surface)(h)} } +// NewScintilla__Internal__Surface constructs a new Scintilla::Internal::Surface object. +func NewScintilla__Internal__Surface() *Scintilla__Internal__Surface { + var outptr_Scintilla__Internal__Surface *C.Scintilla__Internal__Surface = nil + + C.Scintilla__Internal__Surface_new(&outptr_Scintilla__Internal__Surface) + ret := newScintilla__Internal__Surface(outptr_Scintilla__Internal__Surface) + ret.isSubclass = true + return ret +} + func (this *Scintilla__Internal__Surface) Init(wid unsafe.Pointer) { C.Scintilla__Internal__Surface_Init(this.h, wid) } @@ -3762,6 +3772,674 @@ func (this *Scintilla__Internal__Surface) FlushCachedState() { func (this *Scintilla__Internal__Surface) FlushDrawing() { C.Scintilla__Internal__Surface_FlushDrawing(this.h) } +func (this *Scintilla__Internal__Surface) OnInit(slot func(wid unsafe.Pointer)) { + C.Scintilla__Internal__Surface_override_virtual_Init(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_Init +func miqt_exec_callback_Scintilla__Internal__Surface_Init(self *C.Scintilla__Internal__Surface, cb C.intptr_t, wid unsafe.Pointer) { + gofunc, ok := cgo.Handle(cb).Value().(func(wid unsafe.Pointer)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (unsafe.Pointer)(wid) + + gofunc(slotval1) + +} +func (this *Scintilla__Internal__Surface) OnInit2(slot func(sid unsafe.Pointer, wid unsafe.Pointer)) { + C.Scintilla__Internal__Surface_override_virtual_Init2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_Init2 +func miqt_exec_callback_Scintilla__Internal__Surface_Init2(self *C.Scintilla__Internal__Surface, cb C.intptr_t, sid unsafe.Pointer, wid unsafe.Pointer) { + gofunc, ok := cgo.Handle(cb).Value().(func(sid unsafe.Pointer, wid unsafe.Pointer)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (unsafe.Pointer)(sid) + + slotval2 := (unsafe.Pointer)(wid) + + gofunc(slotval1, slotval2) + +} +func (this *Scintilla__Internal__Surface) OnSetMode(slot func(mode Scintilla__Internal__SurfaceMode)) { + C.Scintilla__Internal__Surface_override_virtual_SetMode(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_SetMode +func miqt_exec_callback_Scintilla__Internal__Surface_SetMode(self *C.Scintilla__Internal__Surface, cb C.intptr_t, mode *C.Scintilla__Internal__SurfaceMode) { + gofunc, ok := cgo.Handle(cb).Value().(func(mode Scintilla__Internal__SurfaceMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + mode_ret := mode + mode_goptr := newScintilla__Internal__SurfaceMode(mode_ret) + mode_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *mode_goptr + + gofunc(slotval1) + +} +func (this *Scintilla__Internal__Surface) OnRelease(slot func()) { + C.Scintilla__Internal__Surface_override_virtual_Release(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_Release +func miqt_exec_callback_Scintilla__Internal__Surface_Release(self *C.Scintilla__Internal__Surface, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() + +} +func (this *Scintilla__Internal__Surface) OnSupportsFeature(slot func(feature Scintilla__Supports) int) { + C.Scintilla__Internal__Surface_override_virtual_SupportsFeature(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_SupportsFeature +func miqt_exec_callback_Scintilla__Internal__Surface_SupportsFeature(self *C.Scintilla__Internal__Surface, cb C.intptr_t, feature C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(feature Scintilla__Supports) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (Scintilla__Supports)(feature) + + virtualReturn := gofunc(slotval1) + + return (C.int)(virtualReturn) + +} +func (this *Scintilla__Internal__Surface) OnInitialised(slot func() bool) { + C.Scintilla__Internal__Surface_override_virtual_Initialised(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_Initialised +func miqt_exec_callback_Scintilla__Internal__Surface_Initialised(self *C.Scintilla__Internal__Surface, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func() bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.bool)(virtualReturn) + +} +func (this *Scintilla__Internal__Surface) OnLogPixelsY(slot func() int) { + C.Scintilla__Internal__Surface_override_virtual_LogPixelsY(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_LogPixelsY +func miqt_exec_callback_Scintilla__Internal__Surface_LogPixelsY(self *C.Scintilla__Internal__Surface, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *Scintilla__Internal__Surface) OnPixelDivisions(slot func() int) { + C.Scintilla__Internal__Surface_override_virtual_PixelDivisions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_PixelDivisions +func miqt_exec_callback_Scintilla__Internal__Surface_PixelDivisions(self *C.Scintilla__Internal__Surface, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *Scintilla__Internal__Surface) OnDeviceHeightFont(slot func(points int) int) { + C.Scintilla__Internal__Surface_override_virtual_DeviceHeightFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_DeviceHeightFont +func miqt_exec_callback_Scintilla__Internal__Surface_DeviceHeightFont(self *C.Scintilla__Internal__Surface, cb C.intptr_t, points C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(points int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(points) + + virtualReturn := gofunc(slotval1) + + return (C.int)(virtualReturn) + +} +func (this *Scintilla__Internal__Surface) OnLineDraw(slot func(start Scintilla__Internal__Point, end Scintilla__Internal__Point, stroke Scintilla__Internal__Stroke)) { + C.Scintilla__Internal__Surface_override_virtual_LineDraw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_LineDraw +func miqt_exec_callback_Scintilla__Internal__Surface_LineDraw(self *C.Scintilla__Internal__Surface, cb C.intptr_t, start *C.Scintilla__Internal__Point, end *C.Scintilla__Internal__Point, stroke *C.Scintilla__Internal__Stroke) { + gofunc, ok := cgo.Handle(cb).Value().(func(start Scintilla__Internal__Point, end Scintilla__Internal__Point, stroke Scintilla__Internal__Stroke)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + start_ret := start + start_goptr := newScintilla__Internal__Point(start_ret) + start_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *start_goptr + + end_ret := end + end_goptr := newScintilla__Internal__Point(end_ret) + end_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *end_goptr + + stroke_ret := stroke + stroke_goptr := newScintilla__Internal__Stroke(stroke_ret) + stroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval3 := *stroke_goptr + + gofunc(slotval1, slotval2, slotval3) + +} +func (this *Scintilla__Internal__Surface) OnPolyLine(slot func(pts *Scintilla__Internal__Point, npts uint64, stroke Scintilla__Internal__Stroke)) { + C.Scintilla__Internal__Surface_override_virtual_PolyLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_PolyLine +func miqt_exec_callback_Scintilla__Internal__Surface_PolyLine(self *C.Scintilla__Internal__Surface, cb C.intptr_t, pts *C.Scintilla__Internal__Point, npts C.size_t, stroke *C.Scintilla__Internal__Stroke) { + gofunc, ok := cgo.Handle(cb).Value().(func(pts *Scintilla__Internal__Point, npts uint64, stroke Scintilla__Internal__Stroke)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewScintilla__Internal__Point(unsafe.Pointer(pts)) + slotval2 := (uint64)(npts) + + stroke_ret := stroke + stroke_goptr := newScintilla__Internal__Stroke(stroke_ret) + stroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval3 := *stroke_goptr + + gofunc(slotval1, slotval2, slotval3) + +} +func (this *Scintilla__Internal__Surface) OnPolygon(slot func(pts *Scintilla__Internal__Point, npts uint64, fillStroke Scintilla__Internal__FillStroke)) { + C.Scintilla__Internal__Surface_override_virtual_Polygon(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_Polygon +func miqt_exec_callback_Scintilla__Internal__Surface_Polygon(self *C.Scintilla__Internal__Surface, cb C.intptr_t, pts *C.Scintilla__Internal__Point, npts C.size_t, fillStroke *C.Scintilla__Internal__FillStroke) { + gofunc, ok := cgo.Handle(cb).Value().(func(pts *Scintilla__Internal__Point, npts uint64, fillStroke Scintilla__Internal__FillStroke)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewScintilla__Internal__Point(unsafe.Pointer(pts)) + slotval2 := (uint64)(npts) + + fillStroke_ret := fillStroke + fillStroke_goptr := newScintilla__Internal__FillStroke(fillStroke_ret) + fillStroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval3 := *fillStroke_goptr + + gofunc(slotval1, slotval2, slotval3) + +} +func (this *Scintilla__Internal__Surface) OnRectangleDraw(slot func(rc Scintilla__Internal__PRectangle, fillStroke Scintilla__Internal__FillStroke)) { + C.Scintilla__Internal__Surface_override_virtual_RectangleDraw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_RectangleDraw +func miqt_exec_callback_Scintilla__Internal__Surface_RectangleDraw(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, fillStroke *C.Scintilla__Internal__FillStroke) { + gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, fillStroke Scintilla__Internal__FillStroke)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + rc_ret := rc + rc_goptr := newScintilla__Internal__PRectangle(rc_ret) + rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *rc_goptr + + fillStroke_ret := fillStroke + fillStroke_goptr := newScintilla__Internal__FillStroke(fillStroke_ret) + fillStroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *fillStroke_goptr + + gofunc(slotval1, slotval2) + +} +func (this *Scintilla__Internal__Surface) OnRectangleFrame(slot func(rc Scintilla__Internal__PRectangle, stroke Scintilla__Internal__Stroke)) { + C.Scintilla__Internal__Surface_override_virtual_RectangleFrame(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_RectangleFrame +func miqt_exec_callback_Scintilla__Internal__Surface_RectangleFrame(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, stroke *C.Scintilla__Internal__Stroke) { + gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, stroke Scintilla__Internal__Stroke)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + rc_ret := rc + rc_goptr := newScintilla__Internal__PRectangle(rc_ret) + rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *rc_goptr + + stroke_ret := stroke + stroke_goptr := newScintilla__Internal__Stroke(stroke_ret) + stroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *stroke_goptr + + gofunc(slotval1, slotval2) + +} +func (this *Scintilla__Internal__Surface) OnFillRectangle(slot func(rc Scintilla__Internal__PRectangle, fill Scintilla__Internal__Fill)) { + C.Scintilla__Internal__Surface_override_virtual_FillRectangle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_FillRectangle +func miqt_exec_callback_Scintilla__Internal__Surface_FillRectangle(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, fill *C.Scintilla__Internal__Fill) { + gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, fill Scintilla__Internal__Fill)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + rc_ret := rc + rc_goptr := newScintilla__Internal__PRectangle(rc_ret) + rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *rc_goptr + + fill_ret := fill + fill_goptr := newScintilla__Internal__Fill(fill_ret) + fill_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *fill_goptr + + gofunc(slotval1, slotval2) + +} +func (this *Scintilla__Internal__Surface) OnFillRectangleAligned(slot func(rc Scintilla__Internal__PRectangle, fill Scintilla__Internal__Fill)) { + C.Scintilla__Internal__Surface_override_virtual_FillRectangleAligned(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_FillRectangleAligned +func miqt_exec_callback_Scintilla__Internal__Surface_FillRectangleAligned(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, fill *C.Scintilla__Internal__Fill) { + gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, fill Scintilla__Internal__Fill)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + rc_ret := rc + rc_goptr := newScintilla__Internal__PRectangle(rc_ret) + rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *rc_goptr + + fill_ret := fill + fill_goptr := newScintilla__Internal__Fill(fill_ret) + fill_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *fill_goptr + + gofunc(slotval1, slotval2) + +} +func (this *Scintilla__Internal__Surface) OnFillRectangle2(slot func(rc Scintilla__Internal__PRectangle, surfacePattern *Scintilla__Internal__Surface)) { + C.Scintilla__Internal__Surface_override_virtual_FillRectangle2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_FillRectangle2 +func miqt_exec_callback_Scintilla__Internal__Surface_FillRectangle2(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, surfacePattern *C.Scintilla__Internal__Surface) { + gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, surfacePattern *Scintilla__Internal__Surface)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + rc_ret := rc + rc_goptr := newScintilla__Internal__PRectangle(rc_ret) + rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *rc_goptr + + slotval2 := UnsafeNewScintilla__Internal__Surface(unsafe.Pointer(surfacePattern)) + + gofunc(slotval1, slotval2) + +} +func (this *Scintilla__Internal__Surface) OnRoundedRectangle(slot func(rc Scintilla__Internal__PRectangle, fillStroke Scintilla__Internal__FillStroke)) { + C.Scintilla__Internal__Surface_override_virtual_RoundedRectangle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_RoundedRectangle +func miqt_exec_callback_Scintilla__Internal__Surface_RoundedRectangle(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, fillStroke *C.Scintilla__Internal__FillStroke) { + gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, fillStroke Scintilla__Internal__FillStroke)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + rc_ret := rc + rc_goptr := newScintilla__Internal__PRectangle(rc_ret) + rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *rc_goptr + + fillStroke_ret := fillStroke + fillStroke_goptr := newScintilla__Internal__FillStroke(fillStroke_ret) + fillStroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *fillStroke_goptr + + gofunc(slotval1, slotval2) + +} +func (this *Scintilla__Internal__Surface) OnAlphaRectangle(slot func(rc Scintilla__Internal__PRectangle, cornerSize float64, fillStroke Scintilla__Internal__FillStroke)) { + C.Scintilla__Internal__Surface_override_virtual_AlphaRectangle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_AlphaRectangle +func miqt_exec_callback_Scintilla__Internal__Surface_AlphaRectangle(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, cornerSize C.double, fillStroke *C.Scintilla__Internal__FillStroke) { + gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, cornerSize float64, fillStroke Scintilla__Internal__FillStroke)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + rc_ret := rc + rc_goptr := newScintilla__Internal__PRectangle(rc_ret) + rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *rc_goptr + + slotval2 := (float64)(cornerSize) + + fillStroke_ret := fillStroke + fillStroke_goptr := newScintilla__Internal__FillStroke(fillStroke_ret) + fillStroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval3 := *fillStroke_goptr + + gofunc(slotval1, slotval2, slotval3) + +} +func (this *Scintilla__Internal__Surface) OnDrawRGBAImage(slot func(rc Scintilla__Internal__PRectangle, width int, height int, pixelsImage *byte)) { + C.Scintilla__Internal__Surface_override_virtual_DrawRGBAImage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_DrawRGBAImage +func miqt_exec_callback_Scintilla__Internal__Surface_DrawRGBAImage(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, width C.int, height C.int, pixelsImage *C.uchar) { + gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, width int, height int, pixelsImage *byte)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + rc_ret := rc + rc_goptr := newScintilla__Internal__PRectangle(rc_ret) + rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *rc_goptr + + slotval2 := (int)(width) + + slotval3 := (int)(height) + + slotval4 := (*byte)(unsafe.Pointer(pixelsImage)) + + gofunc(slotval1, slotval2, slotval3, slotval4) + +} +func (this *Scintilla__Internal__Surface) OnEllipse(slot func(rc Scintilla__Internal__PRectangle, fillStroke Scintilla__Internal__FillStroke)) { + C.Scintilla__Internal__Surface_override_virtual_Ellipse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_Ellipse +func miqt_exec_callback_Scintilla__Internal__Surface_Ellipse(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, fillStroke *C.Scintilla__Internal__FillStroke) { + gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, fillStroke Scintilla__Internal__FillStroke)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + rc_ret := rc + rc_goptr := newScintilla__Internal__PRectangle(rc_ret) + rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *rc_goptr + + fillStroke_ret := fillStroke + fillStroke_goptr := newScintilla__Internal__FillStroke(fillStroke_ret) + fillStroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *fillStroke_goptr + + gofunc(slotval1, slotval2) + +} +func (this *Scintilla__Internal__Surface) OnStadium(slot func(rc Scintilla__Internal__PRectangle, fillStroke Scintilla__Internal__FillStroke, ends Scintilla__Internal__Surface__Ends)) { + C.Scintilla__Internal__Surface_override_virtual_Stadium(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_Stadium +func miqt_exec_callback_Scintilla__Internal__Surface_Stadium(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, fillStroke *C.Scintilla__Internal__FillStroke, ends C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, fillStroke Scintilla__Internal__FillStroke, ends Scintilla__Internal__Surface__Ends)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + rc_ret := rc + rc_goptr := newScintilla__Internal__PRectangle(rc_ret) + rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *rc_goptr + + fillStroke_ret := fillStroke + fillStroke_goptr := newScintilla__Internal__FillStroke(fillStroke_ret) + fillStroke_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *fillStroke_goptr + + slotval3 := (Scintilla__Internal__Surface__Ends)(ends) + + gofunc(slotval1, slotval2, slotval3) + +} +func (this *Scintilla__Internal__Surface) OnCopy(slot func(rc Scintilla__Internal__PRectangle, from Scintilla__Internal__Point, surfaceSource *Scintilla__Internal__Surface)) { + C.Scintilla__Internal__Surface_override_virtual_Copy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_Copy +func miqt_exec_callback_Scintilla__Internal__Surface_Copy(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle, from *C.Scintilla__Internal__Point, surfaceSource *C.Scintilla__Internal__Surface) { + gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle, from Scintilla__Internal__Point, surfaceSource *Scintilla__Internal__Surface)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + rc_ret := rc + rc_goptr := newScintilla__Internal__PRectangle(rc_ret) + rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *rc_goptr + + from_ret := from + from_goptr := newScintilla__Internal__Point(from_ret) + from_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *from_goptr + + slotval3 := UnsafeNewScintilla__Internal__Surface(unsafe.Pointer(surfaceSource)) + + gofunc(slotval1, slotval2, slotval3) + +} +func (this *Scintilla__Internal__Surface) OnAscent(slot func(font_ *Scintilla__Internal__Font) float64) { + C.Scintilla__Internal__Surface_override_virtual_Ascent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_Ascent +func miqt_exec_callback_Scintilla__Internal__Surface_Ascent(self *C.Scintilla__Internal__Surface, cb C.intptr_t, font_ *C.Scintilla__Internal__Font) C.double { + gofunc, ok := cgo.Handle(cb).Value().(func(font_ *Scintilla__Internal__Font) float64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewScintilla__Internal__Font(unsafe.Pointer(font_)) + + virtualReturn := gofunc(slotval1) + + return (C.double)(virtualReturn) + +} +func (this *Scintilla__Internal__Surface) OnDescent(slot func(font_ *Scintilla__Internal__Font) float64) { + C.Scintilla__Internal__Surface_override_virtual_Descent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_Descent +func miqt_exec_callback_Scintilla__Internal__Surface_Descent(self *C.Scintilla__Internal__Surface, cb C.intptr_t, font_ *C.Scintilla__Internal__Font) C.double { + gofunc, ok := cgo.Handle(cb).Value().(func(font_ *Scintilla__Internal__Font) float64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewScintilla__Internal__Font(unsafe.Pointer(font_)) + + virtualReturn := gofunc(slotval1) + + return (C.double)(virtualReturn) + +} +func (this *Scintilla__Internal__Surface) OnInternalLeading(slot func(font_ *Scintilla__Internal__Font) float64) { + C.Scintilla__Internal__Surface_override_virtual_InternalLeading(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_InternalLeading +func miqt_exec_callback_Scintilla__Internal__Surface_InternalLeading(self *C.Scintilla__Internal__Surface, cb C.intptr_t, font_ *C.Scintilla__Internal__Font) C.double { + gofunc, ok := cgo.Handle(cb).Value().(func(font_ *Scintilla__Internal__Font) float64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewScintilla__Internal__Font(unsafe.Pointer(font_)) + + virtualReturn := gofunc(slotval1) + + return (C.double)(virtualReturn) + +} +func (this *Scintilla__Internal__Surface) OnHeight(slot func(font_ *Scintilla__Internal__Font) float64) { + C.Scintilla__Internal__Surface_override_virtual_Height(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_Height +func miqt_exec_callback_Scintilla__Internal__Surface_Height(self *C.Scintilla__Internal__Surface, cb C.intptr_t, font_ *C.Scintilla__Internal__Font) C.double { + gofunc, ok := cgo.Handle(cb).Value().(func(font_ *Scintilla__Internal__Font) float64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewScintilla__Internal__Font(unsafe.Pointer(font_)) + + virtualReturn := gofunc(slotval1) + + return (C.double)(virtualReturn) + +} +func (this *Scintilla__Internal__Surface) OnAverageCharWidth(slot func(font_ *Scintilla__Internal__Font) float64) { + C.Scintilla__Internal__Surface_override_virtual_AverageCharWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_AverageCharWidth +func miqt_exec_callback_Scintilla__Internal__Surface_AverageCharWidth(self *C.Scintilla__Internal__Surface, cb C.intptr_t, font_ *C.Scintilla__Internal__Font) C.double { + gofunc, ok := cgo.Handle(cb).Value().(func(font_ *Scintilla__Internal__Font) float64) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewScintilla__Internal__Font(unsafe.Pointer(font_)) + + virtualReturn := gofunc(slotval1) + + return (C.double)(virtualReturn) + +} +func (this *Scintilla__Internal__Surface) OnSetClip(slot func(rc Scintilla__Internal__PRectangle)) { + C.Scintilla__Internal__Surface_override_virtual_SetClip(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_SetClip +func miqt_exec_callback_Scintilla__Internal__Surface_SetClip(self *C.Scintilla__Internal__Surface, cb C.intptr_t, rc *C.Scintilla__Internal__PRectangle) { + gofunc, ok := cgo.Handle(cb).Value().(func(rc Scintilla__Internal__PRectangle)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + rc_ret := rc + rc_goptr := newScintilla__Internal__PRectangle(rc_ret) + rc_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *rc_goptr + + gofunc(slotval1) + +} +func (this *Scintilla__Internal__Surface) OnPopClip(slot func()) { + C.Scintilla__Internal__Surface_override_virtual_PopClip(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_PopClip +func miqt_exec_callback_Scintilla__Internal__Surface_PopClip(self *C.Scintilla__Internal__Surface, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() + +} +func (this *Scintilla__Internal__Surface) OnFlushCachedState(slot func()) { + C.Scintilla__Internal__Surface_override_virtual_FlushCachedState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_FlushCachedState +func miqt_exec_callback_Scintilla__Internal__Surface_FlushCachedState(self *C.Scintilla__Internal__Surface, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() + +} +func (this *Scintilla__Internal__Surface) OnFlushDrawing(slot func()) { + C.Scintilla__Internal__Surface_override_virtual_FlushDrawing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__Surface_FlushDrawing +func miqt_exec_callback_Scintilla__Internal__Surface_FlushDrawing(self *C.Scintilla__Internal__Surface, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() + +} // Delete this object from C++ memory. func (this *Scintilla__Internal__Surface) Delete() { @@ -4109,6 +4787,17 @@ func UnsafeNewScintilla__Internal__ListBox(h unsafe.Pointer, h_Scintilla__Intern Scintilla__Internal__Window: UnsafeNewScintilla__Internal__Window(h_Scintilla__Internal__Window)} } +// NewScintilla__Internal__ListBox constructs a new Scintilla::Internal::ListBox object. +func NewScintilla__Internal__ListBox() *Scintilla__Internal__ListBox { + var outptr_Scintilla__Internal__ListBox *C.Scintilla__Internal__ListBox = nil + var outptr_Scintilla__Internal__Window *C.Scintilla__Internal__Window = nil + + C.Scintilla__Internal__ListBox_new(&outptr_Scintilla__Internal__ListBox, &outptr_Scintilla__Internal__Window) + ret := newScintilla__Internal__ListBox(outptr_Scintilla__Internal__ListBox, outptr_Scintilla__Internal__Window) + ret.isSubclass = true + return ret +} + func (this *Scintilla__Internal__ListBox) SetFont(font *Scintilla__Internal__Font) { C.Scintilla__Internal__ListBox_SetFont(this.h, font.cPointer()) } @@ -4195,6 +4884,353 @@ func (this *Scintilla__Internal__ListBox) SetList(list string, separator int8, t func (this *Scintilla__Internal__ListBox) SetOptions(options_ Scintilla__Internal__ListOptions) { C.Scintilla__Internal__ListBox_SetOptions(this.h, options_.cPointer()) } +func (this *Scintilla__Internal__ListBox) OnSetFont(slot func(font *Scintilla__Internal__Font)) { + C.Scintilla__Internal__ListBox_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_SetFont +func miqt_exec_callback_Scintilla__Internal__ListBox_SetFont(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, font *C.Scintilla__Internal__Font) { + gofunc, ok := cgo.Handle(cb).Value().(func(font *Scintilla__Internal__Font)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewScintilla__Internal__Font(unsafe.Pointer(font)) + + gofunc(slotval1) + +} +func (this *Scintilla__Internal__ListBox) OnCreate(slot func(parent *Scintilla__Internal__Window, ctrlID int, location Scintilla__Internal__Point, lineHeight_ int, unicodeMode_ bool, technology_ Scintilla__Technology)) { + C.Scintilla__Internal__ListBox_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_Create +func miqt_exec_callback_Scintilla__Internal__ListBox_Create(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, parent *C.Scintilla__Internal__Window, ctrlID C.int, location *C.Scintilla__Internal__Point, lineHeight_ C.int, unicodeMode_ C.bool, technology_ C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(parent *Scintilla__Internal__Window, ctrlID int, location Scintilla__Internal__Point, lineHeight_ int, unicodeMode_ bool, technology_ Scintilla__Technology)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewScintilla__Internal__Window(unsafe.Pointer(parent)) + slotval2 := (int)(ctrlID) + + location_ret := location + location_goptr := newScintilla__Internal__Point(location_ret) + location_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval3 := *location_goptr + + slotval4 := (int)(lineHeight_) + + slotval5 := (bool)(unicodeMode_) + + slotval6 := (Scintilla__Technology)(technology_) + + gofunc(slotval1, slotval2, slotval3, slotval4, slotval5, slotval6) + +} +func (this *Scintilla__Internal__ListBox) OnSetAverageCharWidth(slot func(width int)) { + C.Scintilla__Internal__ListBox_override_virtual_SetAverageCharWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_SetAverageCharWidth +func miqt_exec_callback_Scintilla__Internal__ListBox_SetAverageCharWidth(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, width C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(width int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(width) + + gofunc(slotval1) + +} +func (this *Scintilla__Internal__ListBox) OnSetVisibleRows(slot func(rows int)) { + C.Scintilla__Internal__ListBox_override_virtual_SetVisibleRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_SetVisibleRows +func miqt_exec_callback_Scintilla__Internal__ListBox_SetVisibleRows(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, rows C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(rows int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(rows) + + gofunc(slotval1) + +} +func (this *Scintilla__Internal__ListBox) OnGetVisibleRows(slot func() int) { + C.Scintilla__Internal__ListBox_override_virtual_GetVisibleRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_GetVisibleRows +func miqt_exec_callback_Scintilla__Internal__ListBox_GetVisibleRows(self *C.Scintilla__Internal__ListBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *Scintilla__Internal__ListBox) OnGetDesiredRect(slot func() *Scintilla__Internal__PRectangle) { + C.Scintilla__Internal__ListBox_override_virtual_GetDesiredRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_GetDesiredRect +func miqt_exec_callback_Scintilla__Internal__ListBox_GetDesiredRect(self *C.Scintilla__Internal__ListBox, cb C.intptr_t) *C.Scintilla__Internal__PRectangle { + gofunc, ok := cgo.Handle(cb).Value().(func() *Scintilla__Internal__PRectangle) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} +func (this *Scintilla__Internal__ListBox) OnCaretFromEdge(slot func() int) { + C.Scintilla__Internal__ListBox_override_virtual_CaretFromEdge(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_CaretFromEdge +func miqt_exec_callback_Scintilla__Internal__ListBox_CaretFromEdge(self *C.Scintilla__Internal__ListBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *Scintilla__Internal__ListBox) OnClear(slot func()) { + C.Scintilla__Internal__ListBox_override_virtual_Clear(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_Clear +func miqt_exec_callback_Scintilla__Internal__ListBox_Clear(self *C.Scintilla__Internal__ListBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() + +} +func (this *Scintilla__Internal__ListBox) OnAppend(slot func(s string, typeVal int)) { + C.Scintilla__Internal__ListBox_override_virtual_Append(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_Append +func miqt_exec_callback_Scintilla__Internal__ListBox_Append(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, s *C.char, typeVal C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(s string, typeVal int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + s_ret := s + slotval1 := C.GoString(s_ret) + + slotval2 := (int)(typeVal) + + gofunc(slotval1, slotval2) + +} +func (this *Scintilla__Internal__ListBox) OnLength(slot func() int) { + C.Scintilla__Internal__ListBox_override_virtual_Length(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_Length +func miqt_exec_callback_Scintilla__Internal__ListBox_Length(self *C.Scintilla__Internal__ListBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *Scintilla__Internal__ListBox) OnSelect(slot func(n int)) { + C.Scintilla__Internal__ListBox_override_virtual_Select(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_Select +func miqt_exec_callback_Scintilla__Internal__ListBox_Select(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, n C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(n int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(n) + + gofunc(slotval1) + +} +func (this *Scintilla__Internal__ListBox) OnGetSelection(slot func() int) { + C.Scintilla__Internal__ListBox_override_virtual_GetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_GetSelection +func miqt_exec_callback_Scintilla__Internal__ListBox_GetSelection(self *C.Scintilla__Internal__ListBox, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *Scintilla__Internal__ListBox) OnFind(slot func(prefix string) int) { + C.Scintilla__Internal__ListBox_override_virtual_Find(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_Find +func miqt_exec_callback_Scintilla__Internal__ListBox_Find(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, prefix *C.const_char) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(prefix string) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + prefix_ret := prefix + slotval1 := C.GoString(prefix_ret) + + virtualReturn := gofunc(slotval1) + + return (C.int)(virtualReturn) + +} +func (this *Scintilla__Internal__ListBox) OnRegisterImage(slot func(typeVal int, xpm_data string)) { + C.Scintilla__Internal__ListBox_override_virtual_RegisterImage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_RegisterImage +func miqt_exec_callback_Scintilla__Internal__ListBox_RegisterImage(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, typeVal C.int, xpm_data *C.const_char) { + gofunc, ok := cgo.Handle(cb).Value().(func(typeVal int, xpm_data string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(typeVal) + + xpm_data_ret := xpm_data + slotval2 := C.GoString(xpm_data_ret) + + gofunc(slotval1, slotval2) + +} +func (this *Scintilla__Internal__ListBox) OnRegisterRGBAImage(slot func(typeVal int, width int, height int, pixelsImage *byte)) { + C.Scintilla__Internal__ListBox_override_virtual_RegisterRGBAImage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_RegisterRGBAImage +func miqt_exec_callback_Scintilla__Internal__ListBox_RegisterRGBAImage(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, typeVal C.int, width C.int, height C.int, pixelsImage *C.uchar) { + gofunc, ok := cgo.Handle(cb).Value().(func(typeVal int, width int, height int, pixelsImage *byte)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(typeVal) + + slotval2 := (int)(width) + + slotval3 := (int)(height) + + slotval4 := (*byte)(unsafe.Pointer(pixelsImage)) + + gofunc(slotval1, slotval2, slotval3, slotval4) + +} +func (this *Scintilla__Internal__ListBox) OnClearRegisteredImages(slot func()) { + C.Scintilla__Internal__ListBox_override_virtual_ClearRegisteredImages(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_ClearRegisteredImages +func miqt_exec_callback_Scintilla__Internal__ListBox_ClearRegisteredImages(self *C.Scintilla__Internal__ListBox, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() + +} +func (this *Scintilla__Internal__ListBox) OnSetDelegate(slot func(lbDelegate *Scintilla__Internal__IListBoxDelegate)) { + C.Scintilla__Internal__ListBox_override_virtual_SetDelegate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_SetDelegate +func miqt_exec_callback_Scintilla__Internal__ListBox_SetDelegate(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, lbDelegate *C.Scintilla__Internal__IListBoxDelegate) { + gofunc, ok := cgo.Handle(cb).Value().(func(lbDelegate *Scintilla__Internal__IListBoxDelegate)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewScintilla__Internal__IListBoxDelegate(unsafe.Pointer(lbDelegate)) + + gofunc(slotval1) + +} +func (this *Scintilla__Internal__ListBox) OnSetList(slot func(list string, separator int8, typesep int8)) { + C.Scintilla__Internal__ListBox_override_virtual_SetList(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_SetList +func miqt_exec_callback_Scintilla__Internal__ListBox_SetList(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, list *C.const_char, separator C.char, typesep C.char) { + gofunc, ok := cgo.Handle(cb).Value().(func(list string, separator int8, typesep int8)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + list_ret := list + slotval1 := C.GoString(list_ret) + + slotval2 := (int8)(separator) + + slotval3 := (int8)(typesep) + + gofunc(slotval1, slotval2, slotval3) + +} +func (this *Scintilla__Internal__ListBox) OnSetOptions(slot func(options_ Scintilla__Internal__ListOptions)) { + C.Scintilla__Internal__ListBox_override_virtual_SetOptions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_Scintilla__Internal__ListBox_SetOptions +func miqt_exec_callback_Scintilla__Internal__ListBox_SetOptions(self *C.Scintilla__Internal__ListBox, cb C.intptr_t, options_ *C.Scintilla__Internal__ListOptions) { + gofunc, ok := cgo.Handle(cb).Value().(func(options_ Scintilla__Internal__ListOptions)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + options__ret := options_ + options__goptr := newScintilla__Internal__ListOptions(options__ret) + options__goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *options__goptr + + gofunc(slotval1) + +} // Delete this object from C++ memory. func (this *Scintilla__Internal__ListBox) Delete() { diff --git a/qt-extras/scintillaedit/gen_ScintillaEdit.h b/qt-extras/scintillaedit/gen_ScintillaEdit.h index eae5a115..24647744 100644 --- a/qt-extras/scintillaedit/gen_ScintillaEdit.h +++ b/qt-extras/scintillaedit/gen_ScintillaEdit.h @@ -432,6 +432,7 @@ void Scintilla__Internal__SurfaceMode_new(Scintilla__Internal__SurfaceMode** out 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_new(Scintilla__Internal__Surface** outptr_Scintilla__Internal__Surface); void Scintilla__Internal__Surface_Init(Scintilla__Internal__Surface* self, void* wid); void Scintilla__Internal__Surface_Init2(Scintilla__Internal__Surface* self, void* sid, void* wid); void Scintilla__Internal__Surface_SetMode(Scintilla__Internal__Surface* self, Scintilla__Internal__SurfaceMode* mode); @@ -464,6 +465,70 @@ 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_override_virtual_Init(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_Init(void* self, void* wid); +void Scintilla__Internal__Surface_override_virtual_Init2(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_Init2(void* self, void* sid, void* wid); +void Scintilla__Internal__Surface_override_virtual_SetMode(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_SetMode(void* self, Scintilla__Internal__SurfaceMode* mode); +void Scintilla__Internal__Surface_override_virtual_Release(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_Release(void* self); +void Scintilla__Internal__Surface_override_virtual_SupportsFeature(void* self, intptr_t slot); +int Scintilla__Internal__Surface_virtualbase_SupportsFeature(void* self, int feature); +void Scintilla__Internal__Surface_override_virtual_Initialised(void* self, intptr_t slot); +bool Scintilla__Internal__Surface_virtualbase_Initialised(void* self); +void Scintilla__Internal__Surface_override_virtual_LogPixelsY(void* self, intptr_t slot); +int Scintilla__Internal__Surface_virtualbase_LogPixelsY(void* self); +void Scintilla__Internal__Surface_override_virtual_PixelDivisions(void* self, intptr_t slot); +int Scintilla__Internal__Surface_virtualbase_PixelDivisions(void* self); +void Scintilla__Internal__Surface_override_virtual_DeviceHeightFont(void* self, intptr_t slot); +int Scintilla__Internal__Surface_virtualbase_DeviceHeightFont(void* self, int points); +void Scintilla__Internal__Surface_override_virtual_LineDraw(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_LineDraw(void* self, Scintilla__Internal__Point* start, Scintilla__Internal__Point* end, Scintilla__Internal__Stroke* stroke); +void Scintilla__Internal__Surface_override_virtual_PolyLine(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_PolyLine(void* self, Scintilla__Internal__Point* pts, size_t npts, Scintilla__Internal__Stroke* stroke); +void Scintilla__Internal__Surface_override_virtual_Polygon(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_Polygon(void* self, Scintilla__Internal__Point* pts, size_t npts, Scintilla__Internal__FillStroke* fillStroke); +void Scintilla__Internal__Surface_override_virtual_RectangleDraw(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_RectangleDraw(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__FillStroke* fillStroke); +void Scintilla__Internal__Surface_override_virtual_RectangleFrame(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_RectangleFrame(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__Stroke* stroke); +void Scintilla__Internal__Surface_override_virtual_FillRectangle(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_FillRectangle(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__Fill* fill); +void Scintilla__Internal__Surface_override_virtual_FillRectangleAligned(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_FillRectangleAligned(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__Fill* fill); +void Scintilla__Internal__Surface_override_virtual_FillRectangle2(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_FillRectangle2(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__Surface* surfacePattern); +void Scintilla__Internal__Surface_override_virtual_RoundedRectangle(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_RoundedRectangle(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__FillStroke* fillStroke); +void Scintilla__Internal__Surface_override_virtual_AlphaRectangle(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_AlphaRectangle(void* self, Scintilla__Internal__PRectangle* rc, double cornerSize, Scintilla__Internal__FillStroke* fillStroke); +void Scintilla__Internal__Surface_override_virtual_DrawRGBAImage(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_DrawRGBAImage(void* self, Scintilla__Internal__PRectangle* rc, int width, int height, const unsigned char* pixelsImage); +void Scintilla__Internal__Surface_override_virtual_Ellipse(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_Ellipse(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__FillStroke* fillStroke); +void Scintilla__Internal__Surface_override_virtual_Stadium(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_Stadium(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__FillStroke* fillStroke, int ends); +void Scintilla__Internal__Surface_override_virtual_Copy(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_Copy(void* self, Scintilla__Internal__PRectangle* rc, Scintilla__Internal__Point* from, Scintilla__Internal__Surface* surfaceSource); +void Scintilla__Internal__Surface_override_virtual_Ascent(void* self, intptr_t slot); +double Scintilla__Internal__Surface_virtualbase_Ascent(void* self, Scintilla__Internal__Font* font_); +void Scintilla__Internal__Surface_override_virtual_Descent(void* self, intptr_t slot); +double Scintilla__Internal__Surface_virtualbase_Descent(void* self, Scintilla__Internal__Font* font_); +void Scintilla__Internal__Surface_override_virtual_InternalLeading(void* self, intptr_t slot); +double Scintilla__Internal__Surface_virtualbase_InternalLeading(void* self, Scintilla__Internal__Font* font_); +void Scintilla__Internal__Surface_override_virtual_Height(void* self, intptr_t slot); +double Scintilla__Internal__Surface_virtualbase_Height(void* self, Scintilla__Internal__Font* font_); +void Scintilla__Internal__Surface_override_virtual_AverageCharWidth(void* self, intptr_t slot); +double Scintilla__Internal__Surface_virtualbase_AverageCharWidth(void* self, Scintilla__Internal__Font* font_); +void Scintilla__Internal__Surface_override_virtual_SetClip(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_SetClip(void* self, Scintilla__Internal__PRectangle* rc); +void Scintilla__Internal__Surface_override_virtual_PopClip(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_PopClip(void* self); +void Scintilla__Internal__Surface_override_virtual_FlushCachedState(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_FlushCachedState(void* self); +void Scintilla__Internal__Surface_override_virtual_FlushDrawing(void* self, intptr_t slot); +void Scintilla__Internal__Surface_virtualbase_FlushDrawing(void* self); void Scintilla__Internal__Surface_Delete(Scintilla__Internal__Surface* self, bool isSubclass); void Scintilla__Internal__Window_new(Scintilla__Internal__Window** outptr_Scintilla__Internal__Window); @@ -492,6 +557,7 @@ void Scintilla__Internal__IListBoxDelegate_Delete(Scintilla__Internal__IListBoxD void Scintilla__Internal__ListOptions_Delete(Scintilla__Internal__ListOptions* self, bool isSubclass); +void Scintilla__Internal__ListBox_new(Scintilla__Internal__ListBox** outptr_Scintilla__Internal__ListBox, Scintilla__Internal__Window** outptr_Scintilla__Internal__Window); 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_); void Scintilla__Internal__ListBox_SetAverageCharWidth(Scintilla__Internal__ListBox* self, int width); @@ -511,6 +577,44 @@ 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_override_virtual_SetFont(void* self, intptr_t slot); +void Scintilla__Internal__ListBox_virtualbase_SetFont(void* self, Scintilla__Internal__Font* font); +void Scintilla__Internal__ListBox_override_virtual_Create(void* self, intptr_t slot); +void Scintilla__Internal__ListBox_virtualbase_Create(void* self, Scintilla__Internal__Window* parent, int ctrlID, Scintilla__Internal__Point* location, int lineHeight_, bool unicodeMode_, int technology_); +void Scintilla__Internal__ListBox_override_virtual_SetAverageCharWidth(void* self, intptr_t slot); +void Scintilla__Internal__ListBox_virtualbase_SetAverageCharWidth(void* self, int width); +void Scintilla__Internal__ListBox_override_virtual_SetVisibleRows(void* self, intptr_t slot); +void Scintilla__Internal__ListBox_virtualbase_SetVisibleRows(void* self, int rows); +void Scintilla__Internal__ListBox_override_virtual_GetVisibleRows(void* self, intptr_t slot); +int Scintilla__Internal__ListBox_virtualbase_GetVisibleRows(const void* self); +void Scintilla__Internal__ListBox_override_virtual_GetDesiredRect(void* self, intptr_t slot); +Scintilla__Internal__PRectangle* Scintilla__Internal__ListBox_virtualbase_GetDesiredRect(void* self); +void Scintilla__Internal__ListBox_override_virtual_CaretFromEdge(void* self, intptr_t slot); +int Scintilla__Internal__ListBox_virtualbase_CaretFromEdge(void* self); +void Scintilla__Internal__ListBox_override_virtual_Clear(void* self, intptr_t slot); +void Scintilla__Internal__ListBox_virtualbase_Clear(void* self); +void Scintilla__Internal__ListBox_override_virtual_Append(void* self, intptr_t slot); +void Scintilla__Internal__ListBox_virtualbase_Append(void* self, char* s, int typeVal); +void Scintilla__Internal__ListBox_override_virtual_Length(void* self, intptr_t slot); +int Scintilla__Internal__ListBox_virtualbase_Length(void* self); +void Scintilla__Internal__ListBox_override_virtual_Select(void* self, intptr_t slot); +void Scintilla__Internal__ListBox_virtualbase_Select(void* self, int n); +void Scintilla__Internal__ListBox_override_virtual_GetSelection(void* self, intptr_t slot); +int Scintilla__Internal__ListBox_virtualbase_GetSelection(void* self); +void Scintilla__Internal__ListBox_override_virtual_Find(void* self, intptr_t slot); +int Scintilla__Internal__ListBox_virtualbase_Find(void* self, const char* prefix); +void Scintilla__Internal__ListBox_override_virtual_RegisterImage(void* self, intptr_t slot); +void Scintilla__Internal__ListBox_virtualbase_RegisterImage(void* self, int typeVal, const char* xpm_data); +void Scintilla__Internal__ListBox_override_virtual_RegisterRGBAImage(void* self, intptr_t slot); +void Scintilla__Internal__ListBox_virtualbase_RegisterRGBAImage(void* self, int typeVal, int width, int height, const unsigned char* pixelsImage); +void Scintilla__Internal__ListBox_override_virtual_ClearRegisteredImages(void* self, intptr_t slot); +void Scintilla__Internal__ListBox_virtualbase_ClearRegisteredImages(void* self); +void Scintilla__Internal__ListBox_override_virtual_SetDelegate(void* self, intptr_t slot); +void Scintilla__Internal__ListBox_virtualbase_SetDelegate(void* self, Scintilla__Internal__IListBoxDelegate* lbDelegate); +void Scintilla__Internal__ListBox_override_virtual_SetList(void* self, intptr_t slot); +void Scintilla__Internal__ListBox_virtualbase_SetList(void* self, const char* list, char separator, char typesep); +void Scintilla__Internal__ListBox_override_virtual_SetOptions(void* self, intptr_t slot); +void Scintilla__Internal__ListBox_virtualbase_SetOptions(void* self, Scintilla__Internal__ListOptions* options_); void Scintilla__Internal__ListBox_Delete(Scintilla__Internal__ListBox* self, bool isSubclass); void Scintilla__Internal__Menu_new(Scintilla__Internal__Menu** outptr_Scintilla__Internal__Menu); diff --git a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.cpp b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.cpp index c3684edc..beda3260 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.cpp +++ b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.cpp @@ -1,13 +1,336 @@ +#include +#include #include +#include #include #include #include #include #include +#include #include #include "gen_qsciabstractapis.h" #include "_cgo_export.h" +class MiqtVirtualQsciAbstractAPIs : public virtual QsciAbstractAPIs { +public: + + MiqtVirtualQsciAbstractAPIs(QsciLexer* lexer): QsciAbstractAPIs(lexer) {}; + + virtual ~MiqtVirtualQsciAbstractAPIs() = 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) { + return; // Pure virtual, there is no base we can call + } + + 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_QsciAbstractAPIs_UpdateAutoCompletionList(this, handle__UpdateAutoCompletionList, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionSelected = 0; + + // Subclass to allow providing a Go implementation + virtual void autoCompletionSelected(const QString& selection) override { + if (handle__AutoCompletionSelected == 0) { + QsciAbstractAPIs::autoCompletionSelected(selection); + return; + } + + const QString selection_ret = selection; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray selection_b = selection_ret.toUtf8(); + struct miqt_string selection_ms; + selection_ms.len = selection_b.length(); + selection_ms.data = static_cast(malloc(selection_ms.len)); + memcpy(selection_ms.data, selection_b.data(), selection_ms.len); + struct miqt_string sigval1 = selection_ms; + + miqt_exec_callback_QsciAbstractAPIs_AutoCompletionSelected(this, handle__AutoCompletionSelected, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AutoCompletionSelected(struct miqt_string selection) { + QString selection_QString = QString::fromUtf8(selection.data, selection.len); + + QsciAbstractAPIs::autoCompletionSelected(selection_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 QStringList(); // Pure virtual, there is no base we can call + } + + 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_QsciAbstractAPIs_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; + } + + // 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 QsciAbstractAPIs::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QsciAbstractAPIs_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QsciAbstractAPIs::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 QsciAbstractAPIs::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QsciAbstractAPIs_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QsciAbstractAPIs::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) { + QsciAbstractAPIs::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QsciAbstractAPIs_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QsciAbstractAPIs::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) { + QsciAbstractAPIs::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QsciAbstractAPIs_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QsciAbstractAPIs::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) { + QsciAbstractAPIs::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QsciAbstractAPIs_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QsciAbstractAPIs::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) { + QsciAbstractAPIs::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QsciAbstractAPIs_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QsciAbstractAPIs::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) { + QsciAbstractAPIs::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QsciAbstractAPIs_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QsciAbstractAPIs::disconnectNotify(*signal); + + } + +}; + +void QsciAbstractAPIs_new(QsciLexer* lexer, QsciAbstractAPIs** outptr_QsciAbstractAPIs, QObject** outptr_QObject) { + MiqtVirtualQsciAbstractAPIs* ret = new MiqtVirtualQsciAbstractAPIs(lexer); + *outptr_QsciAbstractAPIs = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QsciAbstractAPIs_MetaObject(const QsciAbstractAPIs* self) { return (QMetaObject*) self->metaObject(); } @@ -142,9 +465,81 @@ struct miqt_string QsciAbstractAPIs_TrUtf83(const char* s, const char* c, int n) return _ms; } +void QsciAbstractAPIs_override_virtual_UpdateAutoCompletionList(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__UpdateAutoCompletionList = slot; +} + +void QsciAbstractAPIs_override_virtual_AutoCompletionSelected(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__AutoCompletionSelected = slot; +} + +void QsciAbstractAPIs_virtualbase_AutoCompletionSelected(void* self, struct miqt_string selection) { + ( (MiqtVirtualQsciAbstractAPIs*)(self) )->virtualbase_AutoCompletionSelected(selection); +} + +void QsciAbstractAPIs_override_virtual_CallTips(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__CallTips = slot; +} + +void QsciAbstractAPIs_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__Event = slot; +} + +bool QsciAbstractAPIs_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQsciAbstractAPIs*)(self) )->virtualbase_Event(event); +} + +void QsciAbstractAPIs_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__EventFilter = slot; +} + +bool QsciAbstractAPIs_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQsciAbstractAPIs*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QsciAbstractAPIs_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__TimerEvent = slot; +} + +void QsciAbstractAPIs_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQsciAbstractAPIs*)(self) )->virtualbase_TimerEvent(event); +} + +void QsciAbstractAPIs_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__ChildEvent = slot; +} + +void QsciAbstractAPIs_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQsciAbstractAPIs*)(self) )->virtualbase_ChildEvent(event); +} + +void QsciAbstractAPIs_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__CustomEvent = slot; +} + +void QsciAbstractAPIs_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQsciAbstractAPIs*)(self) )->virtualbase_CustomEvent(event); +} + +void QsciAbstractAPIs_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__ConnectNotify = slot; +} + +void QsciAbstractAPIs_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQsciAbstractAPIs*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QsciAbstractAPIs_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__DisconnectNotify = slot; +} + +void QsciAbstractAPIs_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQsciAbstractAPIs*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QsciAbstractAPIs_Delete(QsciAbstractAPIs* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + 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 7cabe2da..83afc00f 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.go +++ b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -53,6 +54,17 @@ func UnsafeNewQsciAbstractAPIs(h unsafe.Pointer, h_QObject unsafe.Pointer) *Qsci QObject: qt.UnsafeNewQObject(h_QObject)} } +// NewQsciAbstractAPIs constructs a new QsciAbstractAPIs object. +func NewQsciAbstractAPIs(lexer *QsciLexer) *QsciAbstractAPIs { + var outptr_QsciAbstractAPIs *C.QsciAbstractAPIs = nil + var outptr_QObject *C.QObject = nil + + C.QsciAbstractAPIs_new(lexer.cPointer(), &outptr_QsciAbstractAPIs, &outptr_QObject) + ret := newQsciAbstractAPIs(outptr_QsciAbstractAPIs, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QsciAbstractAPIs) MetaObject() *qt.QMetaObject { return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciAbstractAPIs_MetaObject(this.h))) } @@ -189,6 +201,289 @@ func QsciAbstractAPIs_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QsciAbstractAPIs) OnUpdateAutoCompletionList(slot func(context []string, list []string)) { + C.QsciAbstractAPIs_override_virtual_UpdateAutoCompletionList(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_UpdateAutoCompletionList +func miqt_exec_callback_QsciAbstractAPIs_UpdateAutoCompletionList(self *C.QsciAbstractAPIs, cb C.intptr_t, context C.struct_miqt_array, list C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + +} + +func (this *QsciAbstractAPIs) callVirtualBase_AutoCompletionSelected(selection string) { + selection_ms := C.struct_miqt_string{} + selection_ms.data = C.CString(selection) + selection_ms.len = C.size_t(len(selection)) + defer C.free(unsafe.Pointer(selection_ms.data)) + + C.QsciAbstractAPIs_virtualbase_AutoCompletionSelected(unsafe.Pointer(this.h), selection_ms) + +} +func (this *QsciAbstractAPIs) OnAutoCompletionSelected(slot func(super func(selection string), selection string)) { + C.QsciAbstractAPIs_override_virtual_AutoCompletionSelected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_AutoCompletionSelected +func miqt_exec_callback_QsciAbstractAPIs_AutoCompletionSelected(self *C.QsciAbstractAPIs, cb C.intptr_t, selection C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection string), selection string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var selection_ms C.struct_miqt_string = selection + selection_ret := C.GoStringN(selection_ms.data, C.int(int64(selection_ms.len))) + C.free(unsafe.Pointer(selection_ms.data)) + slotval1 := selection_ret + + gofunc((&QsciAbstractAPIs{h: self}).callVirtualBase_AutoCompletionSelected, slotval1) + +} +func (this *QsciAbstractAPIs) OnCallTips(slot func(context []string, commas int, style QsciScintilla__CallTipsStyle, shifts []int) []string) { + C.QsciAbstractAPIs_override_virtual_CallTips(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_CallTips +func miqt_exec_callback_QsciAbstractAPIs_CallTips(self *C.QsciAbstractAPIs, 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(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(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 *QsciAbstractAPIs) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QsciAbstractAPIs_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QsciAbstractAPIs) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QsciAbstractAPIs_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_Event +func miqt_exec_callback_QsciAbstractAPIs_Event(self *C.QsciAbstractAPIs, 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((&QsciAbstractAPIs{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciAbstractAPIs) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QsciAbstractAPIs_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QsciAbstractAPIs) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QsciAbstractAPIs_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_EventFilter +func miqt_exec_callback_QsciAbstractAPIs_EventFilter(self *C.QsciAbstractAPIs, 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((&QsciAbstractAPIs{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciAbstractAPIs) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QsciAbstractAPIs_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QsciAbstractAPIs) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QsciAbstractAPIs_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_TimerEvent +func miqt_exec_callback_QsciAbstractAPIs_TimerEvent(self *C.QsciAbstractAPIs, 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((&QsciAbstractAPIs{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QsciAbstractAPIs) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QsciAbstractAPIs_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QsciAbstractAPIs) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QsciAbstractAPIs_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_ChildEvent +func miqt_exec_callback_QsciAbstractAPIs_ChildEvent(self *C.QsciAbstractAPIs, 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((&QsciAbstractAPIs{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QsciAbstractAPIs) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QsciAbstractAPIs_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QsciAbstractAPIs) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QsciAbstractAPIs_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_CustomEvent +func miqt_exec_callback_QsciAbstractAPIs_CustomEvent(self *C.QsciAbstractAPIs, 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((&QsciAbstractAPIs{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QsciAbstractAPIs) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QsciAbstractAPIs_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QsciAbstractAPIs) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QsciAbstractAPIs_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_ConnectNotify +func miqt_exec_callback_QsciAbstractAPIs_ConnectNotify(self *C.QsciAbstractAPIs, 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((&QsciAbstractAPIs{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QsciAbstractAPIs) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QsciAbstractAPIs_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QsciAbstractAPIs) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QsciAbstractAPIs_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_DisconnectNotify +func miqt_exec_callback_QsciAbstractAPIs_DisconnectNotify(self *C.QsciAbstractAPIs, 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((&QsciAbstractAPIs{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QsciAbstractAPIs) Delete() { diff --git a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.h b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.h index f83826a7..bfd37af2 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.h +++ b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.h @@ -15,17 +15,26 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QsciAbstractAPIs; class QsciLexer; #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 QsciAbstractAPIs QsciAbstractAPIs; typedef struct QsciLexer QsciLexer; #endif +void QsciAbstractAPIs_new(QsciLexer* lexer, QsciAbstractAPIs** outptr_QsciAbstractAPIs, QObject** outptr_QObject); QMetaObject* QsciAbstractAPIs_MetaObject(const QsciAbstractAPIs* self); void* QsciAbstractAPIs_Metacast(QsciAbstractAPIs* self, const char* param1); struct miqt_string QsciAbstractAPIs_Tr(const char* s); @@ -38,6 +47,26 @@ 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_override_virtual_UpdateAutoCompletionList(void* self, intptr_t slot); +void QsciAbstractAPIs_virtualbase_UpdateAutoCompletionList(void* self, struct miqt_array /* of struct miqt_string */ context, struct miqt_array /* of struct miqt_string */ list); +void QsciAbstractAPIs_override_virtual_AutoCompletionSelected(void* self, intptr_t slot); +void QsciAbstractAPIs_virtualbase_AutoCompletionSelected(void* self, struct miqt_string selection); +void QsciAbstractAPIs_override_virtual_CallTips(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciAbstractAPIs_virtualbase_CallTips(void* self, struct miqt_array /* of struct miqt_string */ context, int commas, int style, struct miqt_array /* of int */ shifts); +void QsciAbstractAPIs_override_virtual_Event(void* self, intptr_t slot); +bool QsciAbstractAPIs_virtualbase_Event(void* self, QEvent* event); +void QsciAbstractAPIs_override_virtual_EventFilter(void* self, intptr_t slot); +bool QsciAbstractAPIs_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QsciAbstractAPIs_override_virtual_TimerEvent(void* self, intptr_t slot); +void QsciAbstractAPIs_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QsciAbstractAPIs_override_virtual_ChildEvent(void* self, intptr_t slot); +void QsciAbstractAPIs_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QsciAbstractAPIs_override_virtual_CustomEvent(void* self, intptr_t slot); +void QsciAbstractAPIs_virtualbase_CustomEvent(void* self, QEvent* event); +void QsciAbstractAPIs_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QsciAbstractAPIs_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QsciAbstractAPIs_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QsciAbstractAPIs_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QsciAbstractAPIs_Delete(QsciAbstractAPIs* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt-restricted-extras/qscintilla/gen_qscilexer.cpp b/qt-restricted-extras/qscintilla/gen_qscilexer.cpp index 250b584f..ccc631a2 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexer.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexer.cpp @@ -1,16 +1,1031 @@ +#include #include +#include #include #include +#include #include #include #include #include #include #include +#include #include #include "gen_qscilexer.h" #include "_cgo_export.h" +class MiqtVirtualQsciLexer : public virtual QsciLexer { +public: + + MiqtVirtualQsciLexer(): QsciLexer() {}; + MiqtVirtualQsciLexer(QObject* parent): QsciLexer(parent) {}; + + virtual ~MiqtVirtualQsciLexer() = 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_QsciLexer_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 QsciLexer::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexer_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexer::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 QsciLexer::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexer_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexer::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 QsciLexer::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexer_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexer::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 QsciLexer::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexer_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 = QsciLexer::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 QsciLexer::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexer_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*) QsciLexer::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 QsciLexer::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexer_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexer::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 QsciLexer::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexer_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*) QsciLexer::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 QsciLexer::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexer_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*) QsciLexer::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 QsciLexer::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexer_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexer::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 QsciLexer::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexer_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexer::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 QsciLexer::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexer_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(QsciLexer::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 QsciLexer::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexer_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexer::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 QsciLexer::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexer_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(QsciLexer::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 QsciLexer::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexer_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexer::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 QsciLexer::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexer_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*) QsciLexer::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 QsciLexer::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexer_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexer::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_QsciLexer_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 QsciLexer::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexer_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(QsciLexer::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 QsciLexer::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexer_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(QsciLexer::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 QsciLexer::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexer_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexer::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 QsciLexer::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexer_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(QsciLexer::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 QsciLexer::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexer_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(QsciLexer::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) { + QsciLexer::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexer_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexer::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) { + QsciLexer::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexer_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexer::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 QsciLexer::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexer_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexer::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 QsciLexer::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexer_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexer::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) { + QsciLexer::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexer_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexer::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) { + QsciLexer::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_QsciLexer_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexer::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) { + QsciLexer::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexer_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexer::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) { + QsciLexer::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_QsciLexer_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexer::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) { + QsciLexer::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_QsciLexer_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexer::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 QsciLexer::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_QsciLexer_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 QsciLexer::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 QsciLexer::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_QsciLexer_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 QsciLexer::writeProperties(*qs, prefix_QString); + + } + + // 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 QsciLexer::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QsciLexer_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QsciLexer::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 QsciLexer::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QsciLexer_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QsciLexer::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) { + QsciLexer::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QsciLexer_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QsciLexer::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) { + QsciLexer::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QsciLexer_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QsciLexer::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) { + QsciLexer::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QsciLexer_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QsciLexer::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) { + QsciLexer::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QsciLexer_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QsciLexer::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) { + QsciLexer::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QsciLexer_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QsciLexer::disconnectNotify(*signal); + + } + +}; + +void QsciLexer_new(QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexer* ret = new MiqtVirtualQsciLexer(); + *outptr_QsciLexer = ret; + *outptr_QObject = static_cast(ret); +} + +void QsciLexer_new2(QObject* parent, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexer* ret = new MiqtVirtualQsciLexer(parent); + *outptr_QsciLexer = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QsciLexer_MetaObject(const QsciLexer* self) { return (QMetaObject*) self->metaObject(); } @@ -245,7 +1260,7 @@ void QsciLexer_ColorChanged(QsciLexer* self, QColor* c, int style) { } void QsciLexer_connect_ColorChanged(QsciLexer* self, intptr_t slot) { - QsciLexer::connect(self, static_cast(&QsciLexer::colorChanged), self, [=](const QColor& c, int style) { + MiqtVirtualQsciLexer::connect(self, static_cast(&QsciLexer::colorChanged), self, [=](const QColor& c, int style) { const QColor& c_ret = c; // Cast returned reference into pointer QColor* sigval1 = const_cast(&c_ret); @@ -259,7 +1274,7 @@ void QsciLexer_EolFillChanged(QsciLexer* self, bool eolfilled, int style) { } void QsciLexer_connect_EolFillChanged(QsciLexer* self, intptr_t slot) { - QsciLexer::connect(self, static_cast(&QsciLexer::eolFillChanged), self, [=](bool eolfilled, int style) { + MiqtVirtualQsciLexer::connect(self, static_cast(&QsciLexer::eolFillChanged), self, [=](bool eolfilled, int style) { bool sigval1 = eolfilled; int sigval2 = style; miqt_exec_callback_QsciLexer_EolFillChanged(slot, sigval1, sigval2); @@ -271,7 +1286,7 @@ void QsciLexer_FontChanged(QsciLexer* self, QFont* f, int style) { } void QsciLexer_connect_FontChanged(QsciLexer* self, intptr_t slot) { - QsciLexer::connect(self, static_cast(&QsciLexer::fontChanged), self, [=](const QFont& f, int style) { + MiqtVirtualQsciLexer::connect(self, static_cast(&QsciLexer::fontChanged), self, [=](const QFont& f, int style) { const QFont& f_ret = f; // Cast returned reference into pointer QFont* sigval1 = const_cast(&f_ret); @@ -285,7 +1300,7 @@ void QsciLexer_PaperChanged(QsciLexer* self, QColor* c, int style) { } void QsciLexer_connect_PaperChanged(QsciLexer* self, intptr_t slot) { - QsciLexer::connect(self, static_cast(&QsciLexer::paperChanged), self, [=](const QColor& c, int style) { + MiqtVirtualQsciLexer::connect(self, static_cast(&QsciLexer::paperChanged), self, [=](const QColor& c, int style) { const QColor& c_ret = c; // Cast returned reference into pointer QColor* sigval1 = const_cast(&c_ret); @@ -299,7 +1314,7 @@ void QsciLexer_PropertyChanged(QsciLexer* self, const char* prop, const char* va } void QsciLexer_connect_PropertyChanged(QsciLexer* self, intptr_t slot) { - QsciLexer::connect(self, static_cast(&QsciLexer::propertyChanged), self, [=](const char* prop, const char* val) { + MiqtVirtualQsciLexer::connect(self, static_cast(&QsciLexer::propertyChanged), self, [=](const char* prop, const char* val) { const char* sigval1 = (const char*) prop; const char* sigval2 = (const char*) val; miqt_exec_callback_QsciLexer_PropertyChanged(slot, sigval1, sigval2); @@ -358,9 +1373,329 @@ bool QsciLexer_WriteSettings2(const QsciLexer* self, QSettings* qs, const char* return self->writeSettings(*qs, prefix); } +void QsciLexer_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__Language = slot; +} + +void QsciLexer_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexer_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_Lexer(); +} + +void QsciLexer_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__LexerId = slot; +} + +int QsciLexer_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_LexerId(); +} + +void QsciLexer_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexer_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexer_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexer_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexer_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexer_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexer_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexer_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexer_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexer_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexer_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexer_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexer_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexer_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexer_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexer_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexer_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__Color = slot; +} + +QColor* QsciLexer_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_Color(style); +} + +void QsciLexer_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__EolFill = slot; +} + +bool QsciLexer_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexer_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__Font = slot; +} + +QFont* QsciLexer_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_Font(style); +} + +void QsciLexer_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexer_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexer_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexer_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexer_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexer_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexer_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__Description = slot; +} + +void QsciLexer_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexer_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_Paper(style); +} + +void QsciLexer_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexer_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexer_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexer_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexer_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexer_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexer_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexer_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexer_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__SetEditor = slot; +} + +void QsciLexer_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexer_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexer_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexer_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexer_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexer_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexer_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexer_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexer_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexer_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__SetColor = slot; +} + +void QsciLexer_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexer_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexer_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexer_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__SetFont = slot; +} + +void QsciLexer_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexer_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__SetPaper = slot; +} + +void QsciLexer_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexer_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexer_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexer_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexer_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexer_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__Event = slot; +} + +bool QsciLexer_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_Event(event); +} + +void QsciLexer_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__EventFilter = slot; +} + +bool QsciLexer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QsciLexer_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__TimerEvent = slot; +} + +void QsciLexer_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_TimerEvent(event); +} + +void QsciLexer_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__ChildEvent = slot; +} + +void QsciLexer_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_ChildEvent(event); +} + +void QsciLexer_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__CustomEvent = slot; +} + +void QsciLexer_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_CustomEvent(event); +} + +void QsciLexer_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__ConnectNotify = slot; +} + +void QsciLexer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QsciLexer_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__DisconnectNotify = slot; +} + +void QsciLexer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QsciLexer_Delete(QsciLexer* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + 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 1da4ebec..88e20836 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexer.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexer.go @@ -54,6 +54,28 @@ func UnsafeNewQsciLexer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexer { QObject: qt.UnsafeNewQObject(h_QObject)} } +// NewQsciLexer constructs a new QsciLexer object. +func NewQsciLexer() *QsciLexer { + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexer_new(&outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexer(outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQsciLexer2 constructs a new QsciLexer object. +func NewQsciLexer2(parent *qt.QObject) *QsciLexer { + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexer(outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QsciLexer) MetaObject() *qt.QMetaObject { return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexer_MetaObject(this.h))) } @@ -473,6 +495,1042 @@ func (this *QsciLexer) WriteSettings2(qs *qt.QSettings, prefix string) bool { defer C.free(unsafe.Pointer(prefix_Cstring)) return (bool)(C.QsciLexer_WriteSettings2(this.h, (*C.QSettings)(qs.UnsafePointer()), prefix_Cstring)) } +func (this *QsciLexer) OnLanguage(slot func() string) { + C.QsciLexer_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_Language +func miqt_exec_callback_QsciLexer_Language(self *C.QsciLexer, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func() string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexer) callVirtualBase_Lexer() string { + + _ret := C.QsciLexer_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexer) OnLexer(slot func(super func() string) string) { + C.QsciLexer_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_Lexer +func miqt_exec_callback_QsciLexer_Lexer(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexer) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexer_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexer) OnLexerId(slot func(super func() int) int) { + C.QsciLexer_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_LexerId +func miqt_exec_callback_QsciLexer_LexerId(self *C.QsciLexer, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexer{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexer_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexer) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexer_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_AutoCompletionFillups +func miqt_exec_callback_QsciLexer_AutoCompletionFillups(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexer) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexer_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 *QsciLexer) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexer_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexer_AutoCompletionWordSeparators(self *C.QsciLexer, 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((&QsciLexer{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 *QsciLexer) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexer_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexer) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexer_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_BlockEnd +func miqt_exec_callback_QsciLexer_BlockEnd(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexer) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexer_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexer) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexer_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_BlockLookback +func miqt_exec_callback_QsciLexer_BlockLookback(self *C.QsciLexer, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexer{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexer_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexer) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexer_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_BlockStart +func miqt_exec_callback_QsciLexer_BlockStart(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexer) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexer_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexer) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexer_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_BlockStartKeyword +func miqt_exec_callback_QsciLexer_BlockStartKeyword(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexer) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexer_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexer) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexer_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_BraceStyle +func miqt_exec_callback_QsciLexer_BraceStyle(self *C.QsciLexer, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexer{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexer_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexer) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexer_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_CaseSensitive +func miqt_exec_callback_QsciLexer_CaseSensitive(self *C.QsciLexer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexer{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexer_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 *QsciLexer) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexer_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_Color +func miqt_exec_callback_QsciLexer_Color(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexer) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexer_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexer) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexer_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_EolFill +func miqt_exec_callback_QsciLexer_EolFill(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexer_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 *QsciLexer) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexer_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_Font +func miqt_exec_callback_QsciLexer_Font(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexer) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexer_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexer) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexer_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_IndentationGuideView +func miqt_exec_callback_QsciLexer_IndentationGuideView(self *C.QsciLexer, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexer{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexer_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexer) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexer_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_Keywords +func miqt_exec_callback_QsciLexer_Keywords(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexer) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexer_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexer) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexer_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_DefaultStyle +func miqt_exec_callback_QsciLexer_DefaultStyle(self *C.QsciLexer, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexer{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} +func (this *QsciLexer) OnDescription(slot func(style int) string) { + C.QsciLexer_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_Description +func miqt_exec_callback_QsciLexer_Description(self *C.QsciLexer, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(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(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 *QsciLexer) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexer_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 *QsciLexer) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexer_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_Paper +func miqt_exec_callback_QsciLexer_Paper(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexer) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexer_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 *QsciLexer) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexer_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_DefaultColorWithStyle +func miqt_exec_callback_QsciLexer_DefaultColorWithStyle(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexer) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexer_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexer) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexer_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_DefaultEolFill +func miqt_exec_callback_QsciLexer_DefaultEolFill(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexer_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 *QsciLexer) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexer_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_DefaultFontWithStyle +func miqt_exec_callback_QsciLexer_DefaultFontWithStyle(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexer) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexer_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 *QsciLexer) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexer_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexer_DefaultPaperWithStyle(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexer) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexer_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexer) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexer_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_SetEditor +func miqt_exec_callback_QsciLexer_SetEditor(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexer) callVirtualBase_RefreshProperties() { + + C.QsciLexer_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexer) OnRefreshProperties(slot func(super func())) { + C.QsciLexer_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_RefreshProperties +func miqt_exec_callback_QsciLexer_RefreshProperties(self *C.QsciLexer, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexer{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexer) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexer_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexer) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexer_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_StyleBitsNeeded +func miqt_exec_callback_QsciLexer_StyleBitsNeeded(self *C.QsciLexer, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexer{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexer_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexer) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexer_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_WordCharacters +func miqt_exec_callback_QsciLexer_WordCharacters(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexer) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexer_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexer) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexer_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_SetAutoIndentStyle +func miqt_exec_callback_QsciLexer_SetAutoIndentStyle(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexer) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexer_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexer) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexer_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_SetColor +func miqt_exec_callback_QsciLexer_SetColor(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexer) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexer_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexer) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexer_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_SetEolFill +func miqt_exec_callback_QsciLexer_SetEolFill(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexer) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexer_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexer) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexer_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_SetFont +func miqt_exec_callback_QsciLexer_SetFont(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexer) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexer_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexer) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexer_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_SetPaper +func miqt_exec_callback_QsciLexer_SetPaper(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexer) 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.QsciLexer_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexer) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexer_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_ReadProperties +func miqt_exec_callback_QsciLexer_ReadProperties(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexer) 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.QsciLexer_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexer) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexer_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_WriteProperties +func miqt_exec_callback_QsciLexer_WriteProperties(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QsciLexer_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QsciLexer) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QsciLexer_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_Event +func miqt_exec_callback_QsciLexer_Event(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QsciLexer_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QsciLexer) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QsciLexer_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_EventFilter +func miqt_exec_callback_QsciLexer_EventFilter(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QsciLexer_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QsciLexer) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QsciLexer_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_TimerEvent +func miqt_exec_callback_QsciLexer_TimerEvent(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QsciLexer) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QsciLexer_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QsciLexer) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QsciLexer_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_ChildEvent +func miqt_exec_callback_QsciLexer_ChildEvent(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QsciLexer) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QsciLexer_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QsciLexer) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QsciLexer_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_CustomEvent +func miqt_exec_callback_QsciLexer_CustomEvent(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QsciLexer) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QsciLexer_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QsciLexer) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QsciLexer_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_ConnectNotify +func miqt_exec_callback_QsciLexer_ConnectNotify(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QsciLexer) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QsciLexer_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QsciLexer) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QsciLexer_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_DisconnectNotify +func miqt_exec_callback_QsciLexer_DisconnectNotify(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QsciLexer) Delete() { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexer.h b/qt-restricted-extras/qscintilla/gen_qscilexer.h index de7e2de2..4b848ce8 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexer.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexer.h @@ -15,25 +15,35 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QColor; +class QEvent; class QFont; +class QMetaMethod; class QMetaObject; class QObject; class QSettings; +class QTimerEvent; class QsciAbstractAPIs; class QsciLexer; class QsciScintilla; #else +typedef struct QChildEvent QChildEvent; typedef struct QColor QColor; +typedef struct QEvent QEvent; typedef struct QFont QFont; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSettings QSettings; +typedef struct QTimerEvent QTimerEvent; typedef struct QsciAbstractAPIs QsciAbstractAPIs; typedef struct QsciLexer QsciLexer; typedef struct QsciScintilla QsciScintilla; #endif +void QsciLexer_new(QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexer_new2(QObject* parent, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexer_MetaObject(const QsciLexer* self); void* QsciLexer_Metacast(QsciLexer* self, const char* param1); struct miqt_string QsciLexer_Tr(const char* s); @@ -100,6 +110,88 @@ struct miqt_string QsciLexer_TrUtf82(const char* s, const char* c); struct miqt_string QsciLexer_TrUtf83(const char* s, const char* c, int n); bool QsciLexer_ReadSettings2(QsciLexer* self, QSettings* qs, const char* prefix); bool QsciLexer_WriteSettings2(const QsciLexer* self, QSettings* qs, const char* prefix); +void QsciLexer_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexer_virtualbase_Language(const void* self); +void QsciLexer_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexer_virtualbase_Lexer(const void* self); +void QsciLexer_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexer_virtualbase_LexerId(const void* self); +void QsciLexer_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexer_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexer_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexer_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexer_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexer_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexer_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexer_virtualbase_BlockLookback(const void* self); +void QsciLexer_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexer_virtualbase_BlockStart(const void* self, int* style); +void QsciLexer_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexer_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexer_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexer_virtualbase_BraceStyle(const void* self); +void QsciLexer_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexer_virtualbase_CaseSensitive(const void* self); +void QsciLexer_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexer_virtualbase_Color(const void* self, int style); +void QsciLexer_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexer_virtualbase_EolFill(const void* self, int style); +void QsciLexer_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexer_virtualbase_Font(const void* self, int style); +void QsciLexer_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexer_virtualbase_IndentationGuideView(const void* self); +void QsciLexer_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexer_virtualbase_Keywords(const void* self, int set); +void QsciLexer_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexer_virtualbase_DefaultStyle(const void* self); +void QsciLexer_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexer_virtualbase_Description(const void* self, int style); +void QsciLexer_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexer_virtualbase_Paper(const void* self, int style); +void QsciLexer_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexer_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexer_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexer_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexer_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexer_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexer_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexer_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexer_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexer_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexer_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexer_virtualbase_RefreshProperties(void* self); +void QsciLexer_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexer_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexer_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexer_virtualbase_WordCharacters(const void* self); +void QsciLexer_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexer_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexer_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexer_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexer_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexer_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexer_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexer_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexer_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexer_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexer_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexer_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexer_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexer_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexer_override_virtual_Event(void* self, intptr_t slot); +bool QsciLexer_virtualbase_Event(void* self, QEvent* event); +void QsciLexer_override_virtual_EventFilter(void* self, intptr_t slot); +bool QsciLexer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QsciLexer_override_virtual_TimerEvent(void* self, intptr_t slot); +void QsciLexer_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QsciLexer_override_virtual_ChildEvent(void* self, intptr_t slot); +void QsciLexer_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QsciLexer_override_virtual_CustomEvent(void* self, intptr_t slot); +void QsciLexer_virtualbase_CustomEvent(void* self, QEvent* event); +void QsciLexer_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QsciLexer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QsciLexer_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QsciLexer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QsciLexer_Delete(QsciLexer* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeravs.go b/qt-restricted-extras/qscintilla/gen_qscilexeravs.go index 537ba877..2b4f605b 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeravs.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexeravs.go @@ -280,25 +280,18 @@ func miqt_exec_callback_QsciLexerAVS_SetFoldCompact(self *C.QsciLexerAVS, cb C.i 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) { +func (this *QsciLexerAVS) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -721,21 +714,13 @@ func miqt_exec_callback_QsciLexerAVS_DefaultStyle(self *C.QsciLexerAVS, cb C.int 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) { +func (this *QsciLexerAVS) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -743,7 +728,7 @@ func miqt_exec_callback_QsciLexerAVS_Description(self *C.QsciLexerAVS, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerbash.go b/qt-restricted-extras/qscintilla/gen_qscilexerbash.go index fd245f2e..9cff7608 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerbash.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerbash.go @@ -290,25 +290,18 @@ func miqt_exec_callback_QsciLexerBash_SetFoldCompact(self *C.QsciLexerBash, cb C 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) { +func (this *QsciLexerBash) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -731,21 +724,13 @@ func miqt_exec_callback_QsciLexerBash_DefaultStyle(self *C.QsciLexerBash, cb C.i 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) { +func (this *QsciLexerBash) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -753,7 +738,7 @@ func miqt_exec_callback_QsciLexerBash_Description(self *C.QsciLexerBash, cb C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerbatch.go b/qt-restricted-extras/qscintilla/gen_qscilexerbatch.go index d1f5be97..5ced3f6e 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerbatch.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerbatch.go @@ -218,25 +218,18 @@ func QsciLexerBatch_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerBatch) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -659,21 +652,13 @@ func miqt_exec_callback_QsciLexerBatch_DefaultStyle(self *C.QsciLexerBatch, cb C 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) { +func (this *QsciLexerBatch) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -681,7 +666,7 @@ func miqt_exec_callback_QsciLexerBatch_Description(self *C.QsciLexerBatch, cb C. // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercmake.go b/qt-restricted-extras/qscintilla/gen_qscilexercmake.go index 0afa2516..7717d34f 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercmake.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercmake.go @@ -247,25 +247,18 @@ func miqt_exec_callback_QsciLexerCMake_SetFoldAtElse(self *C.QsciLexerCMake, cb 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) { +func (this *QsciLexerCMake) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -688,21 +681,13 @@ func miqt_exec_callback_QsciLexerCMake_DefaultStyle(self *C.QsciLexerCMake, cb C 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) { +func (this *QsciLexerCMake) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -710,7 +695,7 @@ func miqt_exec_callback_QsciLexerCMake_Description(self *C.QsciLexerCMake, cb C. // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.go b/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.go index d352f66c..f0cb9b1d 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.go @@ -313,25 +313,18 @@ func (this *QsciLexerCoffeeScript) BlockStartKeyword1(style *int) string { _ret := C.QsciLexerCoffeeScript_BlockStartKeyword1(this.h, (*C.int)(unsafe.Pointer(style))) 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) { +func (this *QsciLexerCoffeeScript) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -754,21 +747,13 @@ func miqt_exec_callback_QsciLexerCoffeeScript_DefaultStyle(self *C.QsciLexerCoff 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) { +func (this *QsciLexerCoffeeScript) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -776,7 +761,7 @@ func miqt_exec_callback_QsciLexerCoffeeScript_Description(self *C.QsciLexerCoffe // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercpp.go b/qt-restricted-extras/qscintilla/gen_qscilexercpp.go index 7a171170..c7d87058 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercpp.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercpp.go @@ -528,25 +528,18 @@ func miqt_exec_callback_QsciLexerCPP_SetStylePreprocessor(self *C.QsciLexerCPP, 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) { +func (this *QsciLexerCPP) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -969,21 +962,13 @@ func miqt_exec_callback_QsciLexerCPP_DefaultStyle(self *C.QsciLexerCPP, cb C.int 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) { +func (this *QsciLexerCPP) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -991,7 +976,7 @@ func miqt_exec_callback_QsciLexerCPP_Description(self *C.QsciLexerCPP, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercss.go b/qt-restricted-extras/qscintilla/gen_qscilexercss.go index 6b85bd0d..3f94e1cd 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercss.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercss.go @@ -329,25 +329,18 @@ func miqt_exec_callback_QsciLexerCSS_SetFoldCompact(self *C.QsciLexerCSS, cb C.i 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) { +func (this *QsciLexerCSS) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -770,21 +763,13 @@ func miqt_exec_callback_QsciLexerCSS_DefaultStyle(self *C.QsciLexerCSS, cb C.int 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) { +func (this *QsciLexerCSS) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -792,7 +777,7 @@ func miqt_exec_callback_QsciLexerCSS_Description(self *C.QsciLexerCSS, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercustom.cpp b/qt-restricted-extras/qscintilla/gen_qscilexercustom.cpp index 1f21684a..14ada5ee 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercustom.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexercustom.cpp @@ -1,5 +1,9 @@ +#include +#include +#include #include #include +#include #include #include #include @@ -7,6 +11,865 @@ #include "gen_qscilexercustom.h" #include "_cgo_export.h" +class MiqtVirtualQsciLexerCustom : public virtual QsciLexerCustom { +public: + + MiqtVirtualQsciLexerCustom(): QsciLexerCustom() {}; + MiqtVirtualQsciLexerCustom(QObject* parent): QsciLexerCustom(parent) {}; + + virtual ~MiqtVirtualQsciLexerCustom() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleText = 0; + + // Subclass to allow providing a Go implementation + virtual void styleText(int start, int end) override { + if (handle__StyleText == 0) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = start; + int sigval2 = end; + + miqt_exec_callback_QsciLexerCustom_StyleText(this, handle__StyleText, sigval1, sigval2); + + + } + + // 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) { + QsciLexerCustom::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerCustom_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerCustom::setEditor(editor); + + } + + // 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 QsciLexerCustom::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCustom_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerCustom::styleBitsNeeded(); + + } + + // 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_QsciLexerCustom_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 QsciLexerCustom::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCustom_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerCustom::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 QsciLexerCustom::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCustom_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerCustom::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 QsciLexerCustom::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCustom_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerCustom::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 QsciLexerCustom::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerCustom_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 = QsciLexerCustom::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 QsciLexerCustom::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCustom_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*) QsciLexerCustom::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 QsciLexerCustom::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCustom_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerCustom::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 QsciLexerCustom::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCustom_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*) QsciLexerCustom::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 QsciLexerCustom::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCustom_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*) QsciLexerCustom::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 QsciLexerCustom::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCustom_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerCustom::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 QsciLexerCustom::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerCustom_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerCustom::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 QsciLexerCustom::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCustom_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(QsciLexerCustom::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 QsciLexerCustom::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCustom_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerCustom::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 QsciLexerCustom::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCustom_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(QsciLexerCustom::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 QsciLexerCustom::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCustom_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerCustom::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 QsciLexerCustom::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCustom_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*) QsciLexerCustom::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 QsciLexerCustom::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCustom_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerCustom::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_QsciLexerCustom_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 QsciLexerCustom::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCustom_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(QsciLexerCustom::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 QsciLexerCustom::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCustom_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(QsciLexerCustom::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 QsciLexerCustom::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCustom_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerCustom::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 QsciLexerCustom::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCustom_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(QsciLexerCustom::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 QsciLexerCustom::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCustom_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(QsciLexerCustom::defaultPaper(static_cast(style))); + + } + + // 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) { + QsciLexerCustom::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerCustom_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerCustom::refreshProperties(); + + } + + // 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 QsciLexerCustom::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCustom_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerCustom::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) { + QsciLexerCustom::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerCustom_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerCustom::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) { + QsciLexerCustom::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_QsciLexerCustom_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerCustom::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) { + QsciLexerCustom::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerCustom_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerCustom::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) { + QsciLexerCustom::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_QsciLexerCustom_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerCustom::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) { + QsciLexerCustom::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_QsciLexerCustom_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerCustom::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 QsciLexerCustom::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_QsciLexerCustom_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 QsciLexerCustom::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 QsciLexerCustom::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_QsciLexerCustom_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 QsciLexerCustom::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerCustom_new(QsciLexerCustom** outptr_QsciLexerCustom, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCustom* ret = new MiqtVirtualQsciLexerCustom(); + *outptr_QsciLexerCustom = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QsciLexerCustom_new2(QObject* parent, QsciLexerCustom** outptr_QsciLexerCustom, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCustom* ret = new MiqtVirtualQsciLexerCustom(parent); + *outptr_QsciLexerCustom = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + QMetaObject* QsciLexerCustom_MetaObject(const QsciLexerCustom* self) { return (QMetaObject*) self->metaObject(); } @@ -109,9 +972,277 @@ void QsciLexerCustom_StartStyling2(QsciLexerCustom* self, int pos, int styleBits self->startStyling(static_cast(pos), static_cast(styleBits)); } +void QsciLexerCustom_override_virtual_StyleText(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__StyleText = slot; +} + +void QsciLexerCustom_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerCustom_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerCustom_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerCustom_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerCustom_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__Language = slot; +} + +void QsciLexerCustom_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerCustom_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerCustom_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__LexerId = slot; +} + +int QsciLexerCustom_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerCustom_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerCustom_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerCustom_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerCustom_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerCustom_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerCustom_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerCustom_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerCustom_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerCustom_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerCustom_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerCustom_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerCustom_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerCustom_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerCustom_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerCustom_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerCustom_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerCustom_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerCustom_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_Color(style); +} + +void QsciLexerCustom_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerCustom_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerCustom_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerCustom_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_Font(style); +} + +void QsciLexerCustom_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerCustom_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerCustom_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerCustom_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerCustom_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerCustom_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerCustom_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__Description = slot; +} + +void QsciLexerCustom_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerCustom_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerCustom_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerCustom_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerCustom_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerCustom_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerCustom_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerCustom_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerCustom_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerCustom_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerCustom_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerCustom_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerCustom_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerCustom_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerCustom_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerCustom_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerCustom_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__SetColor = slot; +} + +void QsciLexerCustom_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerCustom_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerCustom_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerCustom_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__SetFont = slot; +} + +void QsciLexerCustom_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerCustom_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerCustom_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerCustom_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerCustom_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerCustom_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerCustom_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + void QsciLexerCustom_Delete(QsciLexerCustom* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + 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 0a4a9210..9aee982f 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercustom.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercustom.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -53,6 +54,30 @@ func UnsafeNewQsciLexerCustom(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QO QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } +// NewQsciLexerCustom constructs a new QsciLexerCustom object. +func NewQsciLexerCustom() *QsciLexerCustom { + var outptr_QsciLexerCustom *C.QsciLexerCustom = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCustom_new(&outptr_QsciLexerCustom, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCustom(outptr_QsciLexerCustom, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQsciLexerCustom2 constructs a new QsciLexerCustom object. +func NewQsciLexerCustom2(parent *qt.QObject) *QsciLexerCustom { + var outptr_QsciLexerCustom *C.QsciLexerCustom = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCustom_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCustom, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCustom(outptr_QsciLexerCustom, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QsciLexerCustom) MetaObject() *qt.QMetaObject { return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerCustom_MetaObject(this.h))) } @@ -152,6 +177,895 @@ func QsciLexerCustom_TrUtf83(s string, c string, n int) string { func (this *QsciLexerCustom) StartStyling2(pos int, styleBits int) { C.QsciLexerCustom_StartStyling2(this.h, (C.int)(pos), (C.int)(styleBits)) } +func (this *QsciLexerCustom) OnStyleText(slot func(start int, end int)) { + C.QsciLexerCustom_override_virtual_StyleText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_StyleText +func miqt_exec_callback_QsciLexerCustom_StyleText(self *C.QsciLexerCustom, cb C.intptr_t, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + +} + +func (this *QsciLexerCustom) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerCustom_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerCustom) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerCustom_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_SetEditor +func miqt_exec_callback_QsciLexerCustom_SetEditor(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerCustom) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerCustom_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCustom) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerCustom_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_StyleBitsNeeded +func miqt_exec_callback_QsciLexerCustom_StyleBitsNeeded(self *C.QsciLexerCustom, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCustom{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} +func (this *QsciLexerCustom) OnLanguage(slot func() string) { + C.QsciLexerCustom_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_Language +func miqt_exec_callback_QsciLexerCustom_Language(self *C.QsciLexerCustom, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func() string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCustom) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerCustom_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCustom) OnLexer(slot func(super func() string) string) { + C.QsciLexerCustom_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_Lexer +func miqt_exec_callback_QsciLexerCustom_Lexer(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCustom) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerCustom_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCustom) OnLexerId(slot func(super func() int) int) { + C.QsciLexerCustom_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_LexerId +func miqt_exec_callback_QsciLexerCustom_LexerId(self *C.QsciLexerCustom, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCustom{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCustom) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerCustom_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCustom) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerCustom_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_AutoCompletionFillups +func miqt_exec_callback_QsciLexerCustom_AutoCompletionFillups(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCustom) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerCustom_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 *QsciLexerCustom) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerCustom_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerCustom_AutoCompletionWordSeparators(self *C.QsciLexerCustom, 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((&QsciLexerCustom{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 *QsciLexerCustom) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerCustom_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCustom) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCustom_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_BlockEnd +func miqt_exec_callback_QsciLexerCustom_BlockEnd(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCustom) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerCustom_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCustom) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerCustom_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_BlockLookback +func miqt_exec_callback_QsciLexerCustom_BlockLookback(self *C.QsciLexerCustom, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCustom{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCustom) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerCustom_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCustom) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCustom_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_BlockStart +func miqt_exec_callback_QsciLexerCustom_BlockStart(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCustom) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerCustom_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCustom) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCustom_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_BlockStartKeyword +func miqt_exec_callback_QsciLexerCustom_BlockStartKeyword(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCustom) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerCustom_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCustom) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerCustom_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_BraceStyle +func miqt_exec_callback_QsciLexerCustom_BraceStyle(self *C.QsciLexerCustom, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCustom{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCustom) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerCustom_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCustom) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerCustom_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_CaseSensitive +func miqt_exec_callback_QsciLexerCustom_CaseSensitive(self *C.QsciLexerCustom, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCustom{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCustom) callVirtualBase_Color(style int) *qt.QColor { + + _ret := C.QsciLexerCustom_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 *QsciLexerCustom) OnColor(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCustom_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_Color +func miqt_exec_callback_QsciLexerCustom_Color(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCustom) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerCustom_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCustom) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCustom_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_EolFill +func miqt_exec_callback_QsciLexerCustom_EolFill(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCustom) callVirtualBase_Font(style int) *qt.QFont { + + _ret := C.QsciLexerCustom_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 *QsciLexerCustom) OnFont(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerCustom_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_Font +func miqt_exec_callback_QsciLexerCustom_Font(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCustom) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerCustom_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCustom) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerCustom_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_IndentationGuideView +func miqt_exec_callback_QsciLexerCustom_IndentationGuideView(self *C.QsciLexerCustom, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCustom{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCustom) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerCustom_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerCustom) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerCustom_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_Keywords +func miqt_exec_callback_QsciLexerCustom_Keywords(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCustom) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerCustom_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCustom) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerCustom_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_DefaultStyle +func miqt_exec_callback_QsciLexerCustom_DefaultStyle(self *C.QsciLexerCustom, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCustom{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} +func (this *QsciLexerCustom) OnDescription(slot func(style int) string) { + C.QsciLexerCustom_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_Description +func miqt_exec_callback_QsciLexerCustom_Description(self *C.QsciLexerCustom, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(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(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 *QsciLexerCustom) callVirtualBase_Paper(style int) *qt.QColor { + + _ret := C.QsciLexerCustom_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 *QsciLexerCustom) OnPaper(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCustom_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_Paper +func miqt_exec_callback_QsciLexerCustom_Paper(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCustom) callVirtualBase_DefaultColorWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerCustom_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 *QsciLexerCustom) OnDefaultColorWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCustom_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerCustom_DefaultColorWithStyle(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCustom) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerCustom_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCustom) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCustom_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_DefaultEolFill +func miqt_exec_callback_QsciLexerCustom_DefaultEolFill(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCustom) callVirtualBase_DefaultFontWithStyle(style int) *qt.QFont { + + _ret := C.QsciLexerCustom_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 *QsciLexerCustom) OnDefaultFontWithStyle(slot func(super func(style int) *qt.QFont, style int) *qt.QFont) { + C.QsciLexerCustom_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerCustom_DefaultFontWithStyle(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCustom) callVirtualBase_DefaultPaperWithStyle(style int) *qt.QColor { + + _ret := C.QsciLexerCustom_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 *QsciLexerCustom) OnDefaultPaperWithStyle(slot func(super func(style int) *qt.QColor, style int) *qt.QColor) { + C.QsciLexerCustom_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerCustom_DefaultPaperWithStyle(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCustom) callVirtualBase_RefreshProperties() { + + C.QsciLexerCustom_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerCustom) OnRefreshProperties(slot func(super func())) { + C.QsciLexerCustom_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_RefreshProperties +func miqt_exec_callback_QsciLexerCustom_RefreshProperties(self *C.QsciLexerCustom, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerCustom{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerCustom) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerCustom_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCustom) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerCustom_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_WordCharacters +func miqt_exec_callback_QsciLexerCustom_WordCharacters(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCustom) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerCustom_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerCustom) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerCustom_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerCustom_SetAutoIndentStyle(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerCustom) callVirtualBase_SetColor(c *qt.QColor, style int) { + + C.QsciLexerCustom_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCustom) OnSetColor(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerCustom_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_SetColor +func miqt_exec_callback_QsciLexerCustom_SetColor(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerCustom) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerCustom_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerCustom) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerCustom_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_SetEolFill +func miqt_exec_callback_QsciLexerCustom_SetEolFill(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerCustom) callVirtualBase_SetFont(f *qt.QFont, style int) { + + C.QsciLexerCustom_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCustom) OnSetFont(slot func(super func(f *qt.QFont, style int), f *qt.QFont, style int)) { + C.QsciLexerCustom_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_SetFont +func miqt_exec_callback_QsciLexerCustom_SetFont(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerCustom) callVirtualBase_SetPaper(c *qt.QColor, style int) { + + C.QsciLexerCustom_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCustom) OnSetPaper(slot func(super func(c *qt.QColor, style int), c *qt.QColor, style int)) { + C.QsciLexerCustom_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_SetPaper +func miqt_exec_callback_QsciLexerCustom_SetPaper(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerCustom) 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.QsciLexerCustom_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCustom) OnReadProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerCustom_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_ReadProperties +func miqt_exec_callback_QsciLexerCustom_ReadProperties(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCustom) 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.QsciLexerCustom_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCustom) OnWriteProperties(slot func(super func(qs *qt.QSettings, prefix string) bool, qs *qt.QSettings, prefix string) bool) { + C.QsciLexerCustom_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_WriteProperties +func miqt_exec_callback_QsciLexerCustom_WriteProperties(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} // Delete this object from C++ memory. func (this *QsciLexerCustom) Delete() { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercustom.h b/qt-restricted-extras/qscintilla/gen_qscilexercustom.h index ca9924cf..9f3787c5 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercustom.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexercustom.h @@ -15,21 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QColor; +class QFont; class QMetaObject; class QObject; +class QSettings; class QsciLexer; class QsciLexerCustom; class QsciScintilla; class QsciStyle; #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 QsciLexerCustom QsciLexerCustom; typedef struct QsciScintilla QsciScintilla; typedef struct QsciStyle QsciStyle; #endif +void QsciLexerCustom_new(QsciLexerCustom** outptr_QsciLexerCustom, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerCustom_new2(QObject* parent, QsciLexerCustom** outptr_QsciLexerCustom, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerCustom_MetaObject(const QsciLexerCustom* self); void* QsciLexerCustom_Metacast(QsciLexerCustom* self, const char* param1); struct miqt_string QsciLexerCustom_Tr(const char* s); @@ -45,6 +53,76 @@ 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_override_virtual_StyleText(void* self, intptr_t slot); +void QsciLexerCustom_virtualbase_StyleText(void* self, int start, int end); +void QsciLexerCustom_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerCustom_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerCustom_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerCustom_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerCustom_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerCustom_virtualbase_Language(const void* self); +void QsciLexerCustom_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerCustom_virtualbase_Lexer(const void* self); +void QsciLexerCustom_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerCustom_virtualbase_LexerId(const void* self); +void QsciLexerCustom_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerCustom_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerCustom_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerCustom_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerCustom_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerCustom_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerCustom_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerCustom_virtualbase_BlockLookback(const void* self); +void QsciLexerCustom_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerCustom_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerCustom_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerCustom_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerCustom_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerCustom_virtualbase_BraceStyle(const void* self); +void QsciLexerCustom_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerCustom_virtualbase_CaseSensitive(const void* self); +void QsciLexerCustom_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerCustom_virtualbase_Color(const void* self, int style); +void QsciLexerCustom_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerCustom_virtualbase_EolFill(const void* self, int style); +void QsciLexerCustom_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerCustom_virtualbase_Font(const void* self, int style); +void QsciLexerCustom_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerCustom_virtualbase_IndentationGuideView(const void* self); +void QsciLexerCustom_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerCustom_virtualbase_Keywords(const void* self, int set); +void QsciLexerCustom_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerCustom_virtualbase_DefaultStyle(const void* self); +void QsciLexerCustom_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerCustom_virtualbase_Description(const void* self, int style); +void QsciLexerCustom_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerCustom_virtualbase_Paper(const void* self, int style); +void QsciLexerCustom_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCustom_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerCustom_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerCustom_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerCustom_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerCustom_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerCustom_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCustom_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerCustom_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerCustom_virtualbase_RefreshProperties(void* self); +void QsciLexerCustom_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerCustom_virtualbase_WordCharacters(const void* self); +void QsciLexerCustom_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerCustom_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerCustom_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerCustom_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerCustom_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerCustom_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerCustom_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerCustom_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerCustom_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerCustom_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerCustom_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerCustom_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCustom_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerCustom_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); void QsciLexerCustom_Delete(QsciLexerCustom* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerd.go b/qt-restricted-extras/qscintilla/gen_qscilexerd.go index 91de717e..278915a5 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerd.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerd.go @@ -373,25 +373,18 @@ func miqt_exec_callback_QsciLexerD_SetFoldCompact(self *C.QsciLexerD, cb C.intpt 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) { +func (this *QsciLexerD) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -814,21 +807,13 @@ func miqt_exec_callback_QsciLexerD_DefaultStyle(self *C.QsciLexerD, cb C.intptr_ 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) { +func (this *QsciLexerD) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -836,7 +821,7 @@ func miqt_exec_callback_QsciLexerD_Description(self *C.QsciLexerD, cb C.intptr_t // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerdiff.go b/qt-restricted-extras/qscintilla/gen_qscilexerdiff.go index 2d393a48..532322b6 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerdiff.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerdiff.go @@ -195,25 +195,18 @@ func QsciLexerDiff_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerDiff) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -636,21 +629,13 @@ func miqt_exec_callback_QsciLexerDiff_DefaultStyle(self *C.QsciLexerDiff, cb C.i 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) { +func (this *QsciLexerDiff) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -658,7 +643,7 @@ func miqt_exec_callback_QsciLexerDiff_Description(self *C.QsciLexerDiff, cb C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeredifact.go b/qt-restricted-extras/qscintilla/gen_qscilexeredifact.go index 2abfa980..08523617 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeredifact.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexeredifact.go @@ -187,25 +187,18 @@ func QsciLexerEDIFACT_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerEDIFACT) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -628,21 +621,13 @@ func miqt_exec_callback_QsciLexerEDIFACT_DefaultStyle(self *C.QsciLexerEDIFACT, 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) { +func (this *QsciLexerEDIFACT) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -650,7 +635,7 @@ func miqt_exec_callback_QsciLexerEDIFACT_Description(self *C.QsciLexerEDIFACT, c // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.go b/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.go index 48ae43c5..f4065e68 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.go @@ -255,25 +255,18 @@ func miqt_exec_callback_QsciLexerFortran77_SetFoldCompact(self *C.QsciLexerFortr 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) { +func (this *QsciLexerFortran77) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -696,21 +689,13 @@ func miqt_exec_callback_QsciLexerFortran77_DefaultStyle(self *C.QsciLexerFortran 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) { +func (this *QsciLexerFortran77) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -718,7 +703,7 @@ func miqt_exec_callback_QsciLexerFortran77_Description(self *C.QsciLexerFortran7 // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerhtml.go b/qt-restricted-extras/qscintilla/gen_qscilexerhtml.go index 0462568d..8a47d133 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerhtml.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerhtml.go @@ -450,25 +450,18 @@ func miqt_exec_callback_QsciLexerHTML_SetCaseSensitiveTags(self *C.QsciLexerHTML 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) { +func (this *QsciLexerHTML) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -891,21 +884,13 @@ func miqt_exec_callback_QsciLexerHTML_DefaultStyle(self *C.QsciLexerHTML, cb C.i 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) { +func (this *QsciLexerHTML) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -913,7 +898,7 @@ func miqt_exec_callback_QsciLexerHTML_Description(self *C.QsciLexerHTML, cb C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjson.go b/qt-restricted-extras/qscintilla/gen_qscilexerjson.go index b51a521d..365fe8c6 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjson.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjson.go @@ -243,25 +243,18 @@ func QsciLexerJSON_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerJSON) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -684,21 +677,13 @@ func miqt_exec_callback_QsciLexerJSON_DefaultStyle(self *C.QsciLexerJSON, cb C.i 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) { +func (this *QsciLexerJSON) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -706,7 +691,7 @@ func miqt_exec_callback_QsciLexerJSON_Description(self *C.QsciLexerJSON, cb C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerlua.go b/qt-restricted-extras/qscintilla/gen_qscilexerlua.go index 478220f5..b3daaa77 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerlua.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerlua.go @@ -283,25 +283,18 @@ func miqt_exec_callback_QsciLexerLua_SetFoldCompact(self *C.QsciLexerLua, cb C.i 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) { +func (this *QsciLexerLua) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -724,21 +717,13 @@ func miqt_exec_callback_QsciLexerLua_DefaultStyle(self *C.QsciLexerLua, cb C.int 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) { +func (this *QsciLexerLua) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -746,7 +731,7 @@ func miqt_exec_callback_QsciLexerLua_Description(self *C.QsciLexerLua, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermakefile.go b/qt-restricted-extras/qscintilla/gen_qscilexermakefile.go index db3c5fff..2ac1029b 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermakefile.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexermakefile.go @@ -208,25 +208,18 @@ func QsciLexerMakefile_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerMakefile) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -649,21 +642,13 @@ func miqt_exec_callback_QsciLexerMakefile_DefaultStyle(self *C.QsciLexerMakefile 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) { +func (this *QsciLexerMakefile) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -671,7 +656,7 @@ func miqt_exec_callback_QsciLexerMakefile_Description(self *C.QsciLexerMakefile, // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.go b/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.go index bfab1b1c..592508e2 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.go @@ -214,25 +214,18 @@ func QsciLexerMarkdown_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerMarkdown) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -655,21 +648,13 @@ func miqt_exec_callback_QsciLexerMarkdown_DefaultStyle(self *C.QsciLexerMarkdown 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) { +func (this *QsciLexerMarkdown) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -677,7 +662,7 @@ func miqt_exec_callback_QsciLexerMarkdown_Description(self *C.QsciLexerMarkdown, // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermatlab.go b/qt-restricted-extras/qscintilla/gen_qscilexermatlab.go index 8136a336..40b176d6 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermatlab.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexermatlab.go @@ -199,25 +199,18 @@ func QsciLexerMatlab_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerMatlab) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -640,21 +633,13 @@ func miqt_exec_callback_QsciLexerMatlab_DefaultStyle(self *C.QsciLexerMatlab, cb 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) { +func (this *QsciLexerMatlab) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -662,7 +647,7 @@ func miqt_exec_callback_QsciLexerMatlab_Description(self *C.QsciLexerMatlab, cb // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpascal.go b/qt-restricted-extras/qscintilla/gen_qscilexerpascal.go index 17650efb..7525621d 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpascal.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpascal.go @@ -368,25 +368,18 @@ func miqt_exec_callback_QsciLexerPascal_SetFoldPreprocessor(self *C.QsciLexerPas 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) { +func (this *QsciLexerPascal) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -809,21 +802,13 @@ func miqt_exec_callback_QsciLexerPascal_DefaultStyle(self *C.QsciLexerPascal, cb 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) { +func (this *QsciLexerPascal) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -831,7 +816,7 @@ func miqt_exec_callback_QsciLexerPascal_Description(self *C.QsciLexerPascal, cb // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerperl.go b/qt-restricted-extras/qscintilla/gen_qscilexerperl.go index 5a709b59..6f0f19a8 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerperl.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerperl.go @@ -374,25 +374,18 @@ func miqt_exec_callback_QsciLexerPerl_SetFoldCompact(self *C.QsciLexerPerl, cb C 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) { +func (this *QsciLexerPerl) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -815,21 +808,13 @@ func miqt_exec_callback_QsciLexerPerl_DefaultStyle(self *C.QsciLexerPerl, cb C.i 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) { +func (this *QsciLexerPerl) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -837,7 +822,7 @@ func miqt_exec_callback_QsciLexerPerl_Description(self *C.QsciLexerPerl, cb C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpo.go b/qt-restricted-extras/qscintilla/gen_qscilexerpo.go index 4f3d3f06..9c785dae 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpo.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpo.go @@ -266,25 +266,18 @@ func miqt_exec_callback_QsciLexerPO_SetFoldCompact(self *C.QsciLexerPO, cb C.int 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) { +func (this *QsciLexerPO) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -707,21 +700,13 @@ func miqt_exec_callback_QsciLexerPO_DefaultStyle(self *C.QsciLexerPO, cb C.intpt 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) { +func (this *QsciLexerPO) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -729,7 +714,7 @@ func miqt_exec_callback_QsciLexerPO_Description(self *C.QsciLexerPO, cb C.intptr // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.go b/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.go index 38bda0a6..85c726ba 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.go @@ -345,25 +345,18 @@ func miqt_exec_callback_QsciLexerPostScript_SetFoldAtElse(self *C.QsciLexerPostS 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) { +func (this *QsciLexerPostScript) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -786,21 +779,13 @@ func miqt_exec_callback_QsciLexerPostScript_DefaultStyle(self *C.QsciLexerPostSc 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) { +func (this *QsciLexerPostScript) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -808,7 +793,7 @@ func miqt_exec_callback_QsciLexerPostScript_Description(self *C.QsciLexerPostScr // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpov.go b/qt-restricted-extras/qscintilla/gen_qscilexerpov.go index 14111617..f53892bd 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpov.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpov.go @@ -324,25 +324,18 @@ func miqt_exec_callback_QsciLexerPOV_SetFoldDirectives(self *C.QsciLexerPOV, cb 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) { +func (this *QsciLexerPOV) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -765,21 +758,13 @@ func miqt_exec_callback_QsciLexerPOV_DefaultStyle(self *C.QsciLexerPOV, cb C.int 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) { +func (this *QsciLexerPOV) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -787,7 +772,7 @@ func miqt_exec_callback_QsciLexerPOV_Description(self *C.QsciLexerPOV, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerproperties.go b/qt-restricted-extras/qscintilla/gen_qscilexerproperties.go index 547bec10..0be7366d 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerproperties.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerproperties.go @@ -250,25 +250,18 @@ func miqt_exec_callback_QsciLexerProperties_SetFoldCompact(self *C.QsciLexerProp 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) { +func (this *QsciLexerProperties) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -691,21 +684,13 @@ func miqt_exec_callback_QsciLexerProperties_DefaultStyle(self *C.QsciLexerProper 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) { +func (this *QsciLexerProperties) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -713,7 +698,7 @@ func miqt_exec_callback_QsciLexerProperties_Description(self *C.QsciLexerPropert // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpython.go b/qt-restricted-extras/qscintilla/gen_qscilexerpython.go index b228a79c..3446631e 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpython.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpython.go @@ -433,25 +433,18 @@ func miqt_exec_callback_QsciLexerPython_SetIndentationWarning(self *C.QsciLexerP 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) { +func (this *QsciLexerPython) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -852,21 +845,13 @@ func miqt_exec_callback_QsciLexerPython_DefaultStyle(self *C.QsciLexerPython, cb 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) { +func (this *QsciLexerPython) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -874,7 +859,7 @@ func miqt_exec_callback_QsciLexerPython_Description(self *C.QsciLexerPython, cb // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerruby.go b/qt-restricted-extras/qscintilla/gen_qscilexerruby.go index 8f3783ad..4b4dfccd 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerruby.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerruby.go @@ -286,25 +286,18 @@ func (this *QsciLexerRuby) BlockStartKeyword1(style *int) string { _ret := C.QsciLexerRuby_BlockStartKeyword1(this.h, (*C.int)(unsafe.Pointer(style))) 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) { +func (this *QsciLexerRuby) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -727,21 +720,13 @@ func miqt_exec_callback_QsciLexerRuby_DefaultStyle(self *C.QsciLexerRuby, cb C.i 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) { +func (this *QsciLexerRuby) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -749,7 +734,7 @@ func miqt_exec_callback_QsciLexerRuby_Description(self *C.QsciLexerRuby, cb C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerspice.go b/qt-restricted-extras/qscintilla/gen_qscilexerspice.go index 3d99f0ae..0ee9ecd4 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerspice.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerspice.go @@ -203,25 +203,18 @@ func QsciLexerSpice_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerSpice) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -644,21 +637,13 @@ func miqt_exec_callback_QsciLexerSpice_DefaultStyle(self *C.QsciLexerSpice, cb C 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) { +func (this *QsciLexerSpice) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -666,7 +651,7 @@ func miqt_exec_callback_QsciLexerSpice_Description(self *C.QsciLexerSpice, cb C. // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexersql.go b/qt-restricted-extras/qscintilla/gen_qscilexersql.go index f1e6536d..95d272bf 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexersql.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexersql.go @@ -364,25 +364,18 @@ func miqt_exec_callback_QsciLexerSQL_SetFoldCompact(self *C.QsciLexerSQL, cb C.i 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) { +func (this *QsciLexerSQL) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -805,21 +798,13 @@ func miqt_exec_callback_QsciLexerSQL_DefaultStyle(self *C.QsciLexerSQL, cb C.int 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) { +func (this *QsciLexerSQL) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -827,7 +812,7 @@ func miqt_exec_callback_QsciLexerSQL_Description(self *C.QsciLexerSQL, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexertcl.go b/qt-restricted-extras/qscintilla/gen_qscilexertcl.go index 031199dd..585d8e18 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexertcl.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexertcl.go @@ -239,25 +239,18 @@ func QsciLexerTCL_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerTCL) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -680,21 +673,13 @@ func miqt_exec_callback_QsciLexerTCL_DefaultStyle(self *C.QsciLexerTCL, cb C.int 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) { +func (this *QsciLexerTCL) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -702,7 +687,7 @@ func miqt_exec_callback_QsciLexerTCL_Description(self *C.QsciLexerTCL, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexertex.go b/qt-restricted-extras/qscintilla/gen_qscilexertex.go index 992c06b2..ae9e1076 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexertex.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexertex.go @@ -230,25 +230,18 @@ func QsciLexerTeX_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerTeX) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -671,21 +664,13 @@ func miqt_exec_callback_QsciLexerTeX_DefaultStyle(self *C.QsciLexerTeX, cb C.int 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) { +func (this *QsciLexerTeX) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -693,7 +678,7 @@ func miqt_exec_callback_QsciLexerTeX_Description(self *C.QsciLexerTeX, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerverilog.go b/qt-restricted-extras/qscintilla/gen_qscilexerverilog.go index e4b75800..61761a89 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerverilog.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerverilog.go @@ -292,25 +292,18 @@ func QsciLexerVerilog_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerVerilog) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -733,21 +726,13 @@ func miqt_exec_callback_QsciLexerVerilog_DefaultStyle(self *C.QsciLexerVerilog, 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) { +func (this *QsciLexerVerilog) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -755,7 +740,7 @@ func miqt_exec_callback_QsciLexerVerilog_Description(self *C.QsciLexerVerilog, c // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexervhdl.go b/qt-restricted-extras/qscintilla/gen_qscilexervhdl.go index 6b56f73b..5467474f 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexervhdl.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexervhdl.go @@ -380,25 +380,18 @@ func miqt_exec_callback_QsciLexerVHDL_SetFoldAtParenthesis(self *C.QsciLexerVHDL 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) { +func (this *QsciLexerVHDL) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -821,21 +814,13 @@ func miqt_exec_callback_QsciLexerVHDL_DefaultStyle(self *C.QsciLexerVHDL, cb C.i 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) { +func (this *QsciLexerVHDL) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -843,7 +828,7 @@ func miqt_exec_callback_QsciLexerVHDL_Description(self *C.QsciLexerVHDL, cb C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeryaml.go b/qt-restricted-extras/qscintilla/gen_qscilexeryaml.go index 8bd2e49e..b628fc95 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeryaml.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexeryaml.go @@ -246,25 +246,18 @@ func miqt_exec_callback_QsciLexerYAML_SetFoldComments(self *C.QsciLexerYAML, cb 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) { +func (this *QsciLexerYAML) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -687,21 +680,13 @@ func miqt_exec_callback_QsciLexerYAML_DefaultStyle(self *C.QsciLexerYAML, cb C.i 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) { +func (this *QsciLexerYAML) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -709,7 +694,7 @@ func miqt_exec_callback_QsciLexerYAML_Description(self *C.QsciLexerYAML, cb C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.cpp b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.cpp index 35f3d2a5..489fd0b5 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.cpp @@ -1,13 +1,336 @@ +#include +#include #include +#include #include #include #include #include #include +#include #include #include "gen_qsciabstractapis.h" #include "_cgo_export.h" +class MiqtVirtualQsciAbstractAPIs : public virtual QsciAbstractAPIs { +public: + + MiqtVirtualQsciAbstractAPIs(QsciLexer* lexer): QsciAbstractAPIs(lexer) {}; + + virtual ~MiqtVirtualQsciAbstractAPIs() = 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) { + return; // Pure virtual, there is no base we can call + } + + 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_QsciAbstractAPIs_UpdateAutoCompletionList(this, handle__UpdateAutoCompletionList, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AutoCompletionSelected = 0; + + // Subclass to allow providing a Go implementation + virtual void autoCompletionSelected(const QString& selection) override { + if (handle__AutoCompletionSelected == 0) { + QsciAbstractAPIs::autoCompletionSelected(selection); + return; + } + + const QString selection_ret = selection; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray selection_b = selection_ret.toUtf8(); + struct miqt_string selection_ms; + selection_ms.len = selection_b.length(); + selection_ms.data = static_cast(malloc(selection_ms.len)); + memcpy(selection_ms.data, selection_b.data(), selection_ms.len); + struct miqt_string sigval1 = selection_ms; + + miqt_exec_callback_QsciAbstractAPIs_AutoCompletionSelected(this, handle__AutoCompletionSelected, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AutoCompletionSelected(struct miqt_string selection) { + QString selection_QString = QString::fromUtf8(selection.data, selection.len); + + QsciAbstractAPIs::autoCompletionSelected(selection_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 QStringList(); // Pure virtual, there is no base we can call + } + + 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_QsciAbstractAPIs_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; + } + + // 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 QsciAbstractAPIs::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QsciAbstractAPIs_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QsciAbstractAPIs::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 QsciAbstractAPIs::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QsciAbstractAPIs_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QsciAbstractAPIs::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) { + QsciAbstractAPIs::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QsciAbstractAPIs_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QsciAbstractAPIs::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) { + QsciAbstractAPIs::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QsciAbstractAPIs_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QsciAbstractAPIs::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) { + QsciAbstractAPIs::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QsciAbstractAPIs_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QsciAbstractAPIs::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) { + QsciAbstractAPIs::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QsciAbstractAPIs_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QsciAbstractAPIs::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) { + QsciAbstractAPIs::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QsciAbstractAPIs_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QsciAbstractAPIs::disconnectNotify(*signal); + + } + +}; + +void QsciAbstractAPIs_new(QsciLexer* lexer, QsciAbstractAPIs** outptr_QsciAbstractAPIs, QObject** outptr_QObject) { + MiqtVirtualQsciAbstractAPIs* ret = new MiqtVirtualQsciAbstractAPIs(lexer); + *outptr_QsciAbstractAPIs = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QsciAbstractAPIs_MetaObject(const QsciAbstractAPIs* self) { return (QMetaObject*) self->metaObject(); } @@ -109,9 +432,81 @@ struct miqt_string QsciAbstractAPIs_Tr3(const char* s, const char* c, int n) { return _ms; } +void QsciAbstractAPIs_override_virtual_UpdateAutoCompletionList(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__UpdateAutoCompletionList = slot; +} + +void QsciAbstractAPIs_override_virtual_AutoCompletionSelected(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__AutoCompletionSelected = slot; +} + +void QsciAbstractAPIs_virtualbase_AutoCompletionSelected(void* self, struct miqt_string selection) { + ( (MiqtVirtualQsciAbstractAPIs*)(self) )->virtualbase_AutoCompletionSelected(selection); +} + +void QsciAbstractAPIs_override_virtual_CallTips(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__CallTips = slot; +} + +void QsciAbstractAPIs_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__Event = slot; +} + +bool QsciAbstractAPIs_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQsciAbstractAPIs*)(self) )->virtualbase_Event(event); +} + +void QsciAbstractAPIs_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__EventFilter = slot; +} + +bool QsciAbstractAPIs_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQsciAbstractAPIs*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QsciAbstractAPIs_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__TimerEvent = slot; +} + +void QsciAbstractAPIs_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQsciAbstractAPIs*)(self) )->virtualbase_TimerEvent(event); +} + +void QsciAbstractAPIs_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__ChildEvent = slot; +} + +void QsciAbstractAPIs_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQsciAbstractAPIs*)(self) )->virtualbase_ChildEvent(event); +} + +void QsciAbstractAPIs_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__CustomEvent = slot; +} + +void QsciAbstractAPIs_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQsciAbstractAPIs*)(self) )->virtualbase_CustomEvent(event); +} + +void QsciAbstractAPIs_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__ConnectNotify = slot; +} + +void QsciAbstractAPIs_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQsciAbstractAPIs*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QsciAbstractAPIs_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QsciAbstractAPIs*)(self) )->handle__DisconnectNotify = slot; +} + +void QsciAbstractAPIs_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQsciAbstractAPIs*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QsciAbstractAPIs_Delete(QsciAbstractAPIs* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + 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 9241d7be..d3139dc3 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.go +++ b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -53,6 +54,17 @@ func UnsafeNewQsciAbstractAPIs(h unsafe.Pointer, h_QObject unsafe.Pointer) *Qsci QObject: qt6.UnsafeNewQObject(h_QObject)} } +// NewQsciAbstractAPIs constructs a new QsciAbstractAPIs object. +func NewQsciAbstractAPIs(lexer *QsciLexer) *QsciAbstractAPIs { + var outptr_QsciAbstractAPIs *C.QsciAbstractAPIs = nil + var outptr_QObject *C.QObject = nil + + C.QsciAbstractAPIs_new(lexer.cPointer(), &outptr_QsciAbstractAPIs, &outptr_QObject) + ret := newQsciAbstractAPIs(outptr_QsciAbstractAPIs, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QsciAbstractAPIs) MetaObject() *qt6.QMetaObject { return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciAbstractAPIs_MetaObject(this.h))) } @@ -158,6 +170,289 @@ func QsciAbstractAPIs_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QsciAbstractAPIs) OnUpdateAutoCompletionList(slot func(context []string, list []string)) { + C.QsciAbstractAPIs_override_virtual_UpdateAutoCompletionList(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_UpdateAutoCompletionList +func miqt_exec_callback_QsciAbstractAPIs_UpdateAutoCompletionList(self *C.QsciAbstractAPIs, cb C.intptr_t, context C.struct_miqt_array, list C.struct_miqt_array) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + +} + +func (this *QsciAbstractAPIs) callVirtualBase_AutoCompletionSelected(selection string) { + selection_ms := C.struct_miqt_string{} + selection_ms.data = C.CString(selection) + selection_ms.len = C.size_t(len(selection)) + defer C.free(unsafe.Pointer(selection_ms.data)) + + C.QsciAbstractAPIs_virtualbase_AutoCompletionSelected(unsafe.Pointer(this.h), selection_ms) + +} +func (this *QsciAbstractAPIs) OnAutoCompletionSelected(slot func(super func(selection string), selection string)) { + C.QsciAbstractAPIs_override_virtual_AutoCompletionSelected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_AutoCompletionSelected +func miqt_exec_callback_QsciAbstractAPIs_AutoCompletionSelected(self *C.QsciAbstractAPIs, cb C.intptr_t, selection C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection string), selection string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var selection_ms C.struct_miqt_string = selection + selection_ret := C.GoStringN(selection_ms.data, C.int(int64(selection_ms.len))) + C.free(unsafe.Pointer(selection_ms.data)) + slotval1 := selection_ret + + gofunc((&QsciAbstractAPIs{h: self}).callVirtualBase_AutoCompletionSelected, slotval1) + +} +func (this *QsciAbstractAPIs) OnCallTips(slot func(context []string, commas int, style QsciScintilla__CallTipsStyle, shifts []int) []string) { + C.QsciAbstractAPIs_override_virtual_CallTips(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_CallTips +func miqt_exec_callback_QsciAbstractAPIs_CallTips(self *C.QsciAbstractAPIs, 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(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(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 *QsciAbstractAPIs) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QsciAbstractAPIs_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QsciAbstractAPIs) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QsciAbstractAPIs_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_Event +func miqt_exec_callback_QsciAbstractAPIs_Event(self *C.QsciAbstractAPIs, 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((&QsciAbstractAPIs{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciAbstractAPIs) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QsciAbstractAPIs_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QsciAbstractAPIs) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QsciAbstractAPIs_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_EventFilter +func miqt_exec_callback_QsciAbstractAPIs_EventFilter(self *C.QsciAbstractAPIs, 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((&QsciAbstractAPIs{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciAbstractAPIs) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QsciAbstractAPIs_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QsciAbstractAPIs) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QsciAbstractAPIs_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_TimerEvent +func miqt_exec_callback_QsciAbstractAPIs_TimerEvent(self *C.QsciAbstractAPIs, 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((&QsciAbstractAPIs{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QsciAbstractAPIs) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QsciAbstractAPIs_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QsciAbstractAPIs) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QsciAbstractAPIs_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_ChildEvent +func miqt_exec_callback_QsciAbstractAPIs_ChildEvent(self *C.QsciAbstractAPIs, 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((&QsciAbstractAPIs{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QsciAbstractAPIs) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QsciAbstractAPIs_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QsciAbstractAPIs) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QsciAbstractAPIs_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_CustomEvent +func miqt_exec_callback_QsciAbstractAPIs_CustomEvent(self *C.QsciAbstractAPIs, 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((&QsciAbstractAPIs{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QsciAbstractAPIs) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QsciAbstractAPIs_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QsciAbstractAPIs) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QsciAbstractAPIs_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_ConnectNotify +func miqt_exec_callback_QsciAbstractAPIs_ConnectNotify(self *C.QsciAbstractAPIs, 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((&QsciAbstractAPIs{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QsciAbstractAPIs) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QsciAbstractAPIs_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QsciAbstractAPIs) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QsciAbstractAPIs_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciAbstractAPIs_DisconnectNotify +func miqt_exec_callback_QsciAbstractAPIs_DisconnectNotify(self *C.QsciAbstractAPIs, 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((&QsciAbstractAPIs{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QsciAbstractAPIs) Delete() { diff --git a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.h b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.h index 127c4193..2167818f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.h +++ b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.h @@ -15,17 +15,26 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QsciAbstractAPIs; class QsciLexer; #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 QsciAbstractAPIs QsciAbstractAPIs; typedef struct QsciLexer QsciLexer; #endif +void QsciAbstractAPIs_new(QsciLexer* lexer, QsciAbstractAPIs** outptr_QsciAbstractAPIs, QObject** outptr_QObject); QMetaObject* QsciAbstractAPIs_MetaObject(const QsciAbstractAPIs* self); void* QsciAbstractAPIs_Metacast(QsciAbstractAPIs* self, const char* param1); struct miqt_string QsciAbstractAPIs_Tr(const char* s); @@ -35,6 +44,26 @@ 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_override_virtual_UpdateAutoCompletionList(void* self, intptr_t slot); +void QsciAbstractAPIs_virtualbase_UpdateAutoCompletionList(void* self, struct miqt_array /* of struct miqt_string */ context, struct miqt_array /* of struct miqt_string */ list); +void QsciAbstractAPIs_override_virtual_AutoCompletionSelected(void* self, intptr_t slot); +void QsciAbstractAPIs_virtualbase_AutoCompletionSelected(void* self, struct miqt_string selection); +void QsciAbstractAPIs_override_virtual_CallTips(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciAbstractAPIs_virtualbase_CallTips(void* self, struct miqt_array /* of struct miqt_string */ context, int commas, int style, struct miqt_array /* of int */ shifts); +void QsciAbstractAPIs_override_virtual_Event(void* self, intptr_t slot); +bool QsciAbstractAPIs_virtualbase_Event(void* self, QEvent* event); +void QsciAbstractAPIs_override_virtual_EventFilter(void* self, intptr_t slot); +bool QsciAbstractAPIs_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QsciAbstractAPIs_override_virtual_TimerEvent(void* self, intptr_t slot); +void QsciAbstractAPIs_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QsciAbstractAPIs_override_virtual_ChildEvent(void* self, intptr_t slot); +void QsciAbstractAPIs_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QsciAbstractAPIs_override_virtual_CustomEvent(void* self, intptr_t slot); +void QsciAbstractAPIs_virtualbase_CustomEvent(void* self, QEvent* event); +void QsciAbstractAPIs_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QsciAbstractAPIs_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QsciAbstractAPIs_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QsciAbstractAPIs_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QsciAbstractAPIs_Delete(QsciAbstractAPIs* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexer.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexer.cpp index eef5ce06..815f1348 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexer.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexer.cpp @@ -1,16 +1,1031 @@ +#include #include +#include #include #include +#include #include #include #include #include #include #include +#include #include #include "gen_qscilexer.h" #include "_cgo_export.h" +class MiqtVirtualQsciLexer : public virtual QsciLexer { +public: + + MiqtVirtualQsciLexer(): QsciLexer() {}; + MiqtVirtualQsciLexer(QObject* parent): QsciLexer(parent) {}; + + virtual ~MiqtVirtualQsciLexer() = 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_QsciLexer_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 QsciLexer::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexer_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexer::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 QsciLexer::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexer_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexer::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 QsciLexer::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexer_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexer::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 QsciLexer::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexer_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 = QsciLexer::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 QsciLexer::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexer_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*) QsciLexer::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 QsciLexer::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexer_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexer::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 QsciLexer::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexer_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*) QsciLexer::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 QsciLexer::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexer_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*) QsciLexer::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 QsciLexer::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexer_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexer::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 QsciLexer::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexer_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexer::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 QsciLexer::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexer_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(QsciLexer::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 QsciLexer::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexer_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexer::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 QsciLexer::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexer_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(QsciLexer::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 QsciLexer::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexer_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexer::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 QsciLexer::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexer_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*) QsciLexer::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 QsciLexer::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexer_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexer::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_QsciLexer_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 QsciLexer::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexer_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(QsciLexer::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 QsciLexer::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexer_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(QsciLexer::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 QsciLexer::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexer_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexer::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 QsciLexer::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexer_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(QsciLexer::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 QsciLexer::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexer_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(QsciLexer::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) { + QsciLexer::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexer_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexer::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) { + QsciLexer::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexer_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexer::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 QsciLexer::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexer_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexer::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 QsciLexer::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexer_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexer::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) { + QsciLexer::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexer_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexer::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) { + QsciLexer::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_QsciLexer_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexer::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) { + QsciLexer::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexer_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexer::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) { + QsciLexer::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_QsciLexer_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexer::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) { + QsciLexer::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_QsciLexer_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexer::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 QsciLexer::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_QsciLexer_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 QsciLexer::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 QsciLexer::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_QsciLexer_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 QsciLexer::writeProperties(*qs, prefix_QString); + + } + + // 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 QsciLexer::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QsciLexer_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QsciLexer::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 QsciLexer::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QsciLexer_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QsciLexer::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) { + QsciLexer::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QsciLexer_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QsciLexer::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) { + QsciLexer::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QsciLexer_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QsciLexer::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) { + QsciLexer::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QsciLexer_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QsciLexer::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) { + QsciLexer::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QsciLexer_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QsciLexer::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) { + QsciLexer::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QsciLexer_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QsciLexer::disconnectNotify(*signal); + + } + +}; + +void QsciLexer_new(QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexer* ret = new MiqtVirtualQsciLexer(); + *outptr_QsciLexer = ret; + *outptr_QObject = static_cast(ret); +} + +void QsciLexer_new2(QObject* parent, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexer* ret = new MiqtVirtualQsciLexer(parent); + *outptr_QsciLexer = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QsciLexer_MetaObject(const QsciLexer* self) { return (QMetaObject*) self->metaObject(); } @@ -234,7 +1249,7 @@ void QsciLexer_ColorChanged(QsciLexer* self, QColor* c, int style) { } void QsciLexer_connect_ColorChanged(QsciLexer* self, intptr_t slot) { - QsciLexer::connect(self, static_cast(&QsciLexer::colorChanged), self, [=](const QColor& c, int style) { + MiqtVirtualQsciLexer::connect(self, static_cast(&QsciLexer::colorChanged), self, [=](const QColor& c, int style) { const QColor& c_ret = c; // Cast returned reference into pointer QColor* sigval1 = const_cast(&c_ret); @@ -248,7 +1263,7 @@ void QsciLexer_EolFillChanged(QsciLexer* self, bool eolfilled, int style) { } void QsciLexer_connect_EolFillChanged(QsciLexer* self, intptr_t slot) { - QsciLexer::connect(self, static_cast(&QsciLexer::eolFillChanged), self, [=](bool eolfilled, int style) { + MiqtVirtualQsciLexer::connect(self, static_cast(&QsciLexer::eolFillChanged), self, [=](bool eolfilled, int style) { bool sigval1 = eolfilled; int sigval2 = style; miqt_exec_callback_QsciLexer_EolFillChanged(slot, sigval1, sigval2); @@ -260,7 +1275,7 @@ void QsciLexer_FontChanged(QsciLexer* self, QFont* f, int style) { } void QsciLexer_connect_FontChanged(QsciLexer* self, intptr_t slot) { - QsciLexer::connect(self, static_cast(&QsciLexer::fontChanged), self, [=](const QFont& f, int style) { + MiqtVirtualQsciLexer::connect(self, static_cast(&QsciLexer::fontChanged), self, [=](const QFont& f, int style) { const QFont& f_ret = f; // Cast returned reference into pointer QFont* sigval1 = const_cast(&f_ret); @@ -274,7 +1289,7 @@ void QsciLexer_PaperChanged(QsciLexer* self, QColor* c, int style) { } void QsciLexer_connect_PaperChanged(QsciLexer* self, intptr_t slot) { - QsciLexer::connect(self, static_cast(&QsciLexer::paperChanged), self, [=](const QColor& c, int style) { + MiqtVirtualQsciLexer::connect(self, static_cast(&QsciLexer::paperChanged), self, [=](const QColor& c, int style) { const QColor& c_ret = c; // Cast returned reference into pointer QColor* sigval1 = const_cast(&c_ret); @@ -288,7 +1303,7 @@ void QsciLexer_PropertyChanged(QsciLexer* self, const char* prop, const char* va } void QsciLexer_connect_PropertyChanged(QsciLexer* self, intptr_t slot) { - QsciLexer::connect(self, static_cast(&QsciLexer::propertyChanged), self, [=](const char* prop, const char* val) { + MiqtVirtualQsciLexer::connect(self, static_cast(&QsciLexer::propertyChanged), self, [=](const char* prop, const char* val) { const char* sigval1 = (const char*) prop; const char* sigval2 = (const char*) val; miqt_exec_callback_QsciLexer_PropertyChanged(slot, sigval1, sigval2); @@ -325,9 +1340,329 @@ bool QsciLexer_WriteSettings2(const QsciLexer* self, QSettings* qs, const char* return self->writeSettings(*qs, prefix); } +void QsciLexer_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__Language = slot; +} + +void QsciLexer_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexer_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_Lexer(); +} + +void QsciLexer_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__LexerId = slot; +} + +int QsciLexer_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_LexerId(); +} + +void QsciLexer_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexer_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexer_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexer_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexer_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexer_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexer_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexer_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexer_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexer_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexer_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexer_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexer_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexer_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexer_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexer_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexer_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__Color = slot; +} + +QColor* QsciLexer_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_Color(style); +} + +void QsciLexer_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__EolFill = slot; +} + +bool QsciLexer_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexer_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__Font = slot; +} + +QFont* QsciLexer_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_Font(style); +} + +void QsciLexer_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexer_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexer_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexer_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexer_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexer_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexer_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__Description = slot; +} + +void QsciLexer_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexer_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_Paper(style); +} + +void QsciLexer_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexer_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexer_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexer_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexer_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexer_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexer_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexer_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexer_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__SetEditor = slot; +} + +void QsciLexer_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexer_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexer_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexer_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexer_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexer_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexer_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexer_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexer_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexer_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__SetColor = slot; +} + +void QsciLexer_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexer_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexer_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexer_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__SetFont = slot; +} + +void QsciLexer_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexer_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__SetPaper = slot; +} + +void QsciLexer_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexer_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexer_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexer_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexer_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexer*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + +void QsciLexer_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__Event = slot; +} + +bool QsciLexer_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_Event(event); +} + +void QsciLexer_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__EventFilter = slot; +} + +bool QsciLexer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QsciLexer_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__TimerEvent = slot; +} + +void QsciLexer_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_TimerEvent(event); +} + +void QsciLexer_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__ChildEvent = slot; +} + +void QsciLexer_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_ChildEvent(event); +} + +void QsciLexer_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__CustomEvent = slot; +} + +void QsciLexer_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_CustomEvent(event); +} + +void QsciLexer_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__ConnectNotify = slot; +} + +void QsciLexer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QsciLexer_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QsciLexer*)(self) )->handle__DisconnectNotify = slot; +} + +void QsciLexer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQsciLexer*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QsciLexer_Delete(QsciLexer* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + 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 4fdfefb5..24805744 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexer.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexer.go @@ -54,6 +54,28 @@ func UnsafeNewQsciLexer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexer { QObject: qt6.UnsafeNewQObject(h_QObject)} } +// NewQsciLexer constructs a new QsciLexer object. +func NewQsciLexer() *QsciLexer { + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexer_new(&outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexer(outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQsciLexer2 constructs a new QsciLexer object. +func NewQsciLexer2(parent *qt6.QObject) *QsciLexer { + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexer(outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QsciLexer) MetaObject() *qt6.QMetaObject { return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexer_MetaObject(this.h))) } @@ -442,6 +464,1042 @@ func (this *QsciLexer) WriteSettings2(qs *qt6.QSettings, prefix string) bool { defer C.free(unsafe.Pointer(prefix_Cstring)) return (bool)(C.QsciLexer_WriteSettings2(this.h, (*C.QSettings)(qs.UnsafePointer()), prefix_Cstring)) } +func (this *QsciLexer) OnLanguage(slot func() string) { + C.QsciLexer_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_Language +func miqt_exec_callback_QsciLexer_Language(self *C.QsciLexer, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func() string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexer) callVirtualBase_Lexer() string { + + _ret := C.QsciLexer_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexer) OnLexer(slot func(super func() string) string) { + C.QsciLexer_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_Lexer +func miqt_exec_callback_QsciLexer_Lexer(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexer) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexer_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexer) OnLexerId(slot func(super func() int) int) { + C.QsciLexer_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_LexerId +func miqt_exec_callback_QsciLexer_LexerId(self *C.QsciLexer, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexer{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexer_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexer) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexer_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_AutoCompletionFillups +func miqt_exec_callback_QsciLexer_AutoCompletionFillups(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexer) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexer_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 *QsciLexer) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexer_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexer_AutoCompletionWordSeparators(self *C.QsciLexer, 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((&QsciLexer{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 *QsciLexer) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexer_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexer) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexer_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_BlockEnd +func miqt_exec_callback_QsciLexer_BlockEnd(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexer) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexer_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexer) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexer_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_BlockLookback +func miqt_exec_callback_QsciLexer_BlockLookback(self *C.QsciLexer, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexer{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexer_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexer) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexer_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_BlockStart +func miqt_exec_callback_QsciLexer_BlockStart(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexer) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexer_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexer) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexer_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_BlockStartKeyword +func miqt_exec_callback_QsciLexer_BlockStartKeyword(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexer) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexer_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexer) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexer_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_BraceStyle +func miqt_exec_callback_QsciLexer_BraceStyle(self *C.QsciLexer, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexer{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexer_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexer) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexer_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_CaseSensitive +func miqt_exec_callback_QsciLexer_CaseSensitive(self *C.QsciLexer, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexer{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexer_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 *QsciLexer) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexer_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_Color +func miqt_exec_callback_QsciLexer_Color(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexer) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexer_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexer) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexer_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_EolFill +func miqt_exec_callback_QsciLexer_EolFill(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexer_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 *QsciLexer) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexer_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_Font +func miqt_exec_callback_QsciLexer_Font(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexer) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexer_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexer) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexer_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_IndentationGuideView +func miqt_exec_callback_QsciLexer_IndentationGuideView(self *C.QsciLexer, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexer{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexer_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexer) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexer_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_Keywords +func miqt_exec_callback_QsciLexer_Keywords(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexer) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexer_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexer) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexer_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_DefaultStyle +func miqt_exec_callback_QsciLexer_DefaultStyle(self *C.QsciLexer, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexer{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} +func (this *QsciLexer) OnDescription(slot func(style int) string) { + C.QsciLexer_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_Description +func miqt_exec_callback_QsciLexer_Description(self *C.QsciLexer, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(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(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 *QsciLexer) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexer_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 *QsciLexer) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexer_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_Paper +func miqt_exec_callback_QsciLexer_Paper(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexer) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexer_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 *QsciLexer) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexer_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_DefaultColorWithStyle +func miqt_exec_callback_QsciLexer_DefaultColorWithStyle(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexer) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexer_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexer) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexer_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_DefaultEolFill +func miqt_exec_callback_QsciLexer_DefaultEolFill(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexer_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 *QsciLexer) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexer_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_DefaultFontWithStyle +func miqt_exec_callback_QsciLexer_DefaultFontWithStyle(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexer) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexer_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 *QsciLexer) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexer_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexer_DefaultPaperWithStyle(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexer) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexer_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexer) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexer_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_SetEditor +func miqt_exec_callback_QsciLexer_SetEditor(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexer) callVirtualBase_RefreshProperties() { + + C.QsciLexer_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexer) OnRefreshProperties(slot func(super func())) { + C.QsciLexer_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_RefreshProperties +func miqt_exec_callback_QsciLexer_RefreshProperties(self *C.QsciLexer, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexer{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexer) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexer_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexer) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexer_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_StyleBitsNeeded +func miqt_exec_callback_QsciLexer_StyleBitsNeeded(self *C.QsciLexer, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexer{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexer_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexer) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexer_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_WordCharacters +func miqt_exec_callback_QsciLexer_WordCharacters(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexer) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexer_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexer) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexer_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_SetAutoIndentStyle +func miqt_exec_callback_QsciLexer_SetAutoIndentStyle(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexer) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexer_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexer) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexer_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_SetColor +func miqt_exec_callback_QsciLexer_SetColor(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexer) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexer_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexer) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexer_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_SetEolFill +func miqt_exec_callback_QsciLexer_SetEolFill(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexer) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexer_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexer) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexer_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_SetFont +func miqt_exec_callback_QsciLexer_SetFont(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexer) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexer_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexer) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexer_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_SetPaper +func miqt_exec_callback_QsciLexer_SetPaper(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexer) 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.QsciLexer_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexer) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexer_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_ReadProperties +func miqt_exec_callback_QsciLexer_ReadProperties(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexer) 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.QsciLexer_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexer) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexer_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_WriteProperties +func miqt_exec_callback_QsciLexer_WriteProperties(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QsciLexer_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QsciLexer) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QsciLexer_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_Event +func miqt_exec_callback_QsciLexer_Event(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QsciLexer_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QsciLexer) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QsciLexer_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_EventFilter +func miqt_exec_callback_QsciLexer_EventFilter(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexer) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QsciLexer_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QsciLexer) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QsciLexer_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_TimerEvent +func miqt_exec_callback_QsciLexer_TimerEvent(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QsciLexer) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QsciLexer_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QsciLexer) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QsciLexer_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_ChildEvent +func miqt_exec_callback_QsciLexer_ChildEvent(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QsciLexer) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QsciLexer_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QsciLexer) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QsciLexer_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_CustomEvent +func miqt_exec_callback_QsciLexer_CustomEvent(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QsciLexer) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QsciLexer_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QsciLexer) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QsciLexer_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_ConnectNotify +func miqt_exec_callback_QsciLexer_ConnectNotify(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QsciLexer) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QsciLexer_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QsciLexer) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QsciLexer_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexer_DisconnectNotify +func miqt_exec_callback_QsciLexer_DisconnectNotify(self *C.QsciLexer, 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((&QsciLexer{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QsciLexer) Delete() { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexer.h b/qt-restricted-extras/qscintilla6/gen_qscilexer.h index b782844f..c0f57f11 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexer.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexer.h @@ -15,25 +15,35 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QColor; +class QEvent; class QFont; +class QMetaMethod; class QMetaObject; class QObject; class QSettings; +class QTimerEvent; class QsciAbstractAPIs; class QsciLexer; class QsciScintilla; #else +typedef struct QChildEvent QChildEvent; typedef struct QColor QColor; +typedef struct QEvent QEvent; typedef struct QFont QFont; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSettings QSettings; +typedef struct QTimerEvent QTimerEvent; typedef struct QsciAbstractAPIs QsciAbstractAPIs; typedef struct QsciLexer QsciLexer; typedef struct QsciScintilla QsciScintilla; #endif +void QsciLexer_new(QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexer_new2(QObject* parent, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexer_MetaObject(const QsciLexer* self); void* QsciLexer_Metacast(QsciLexer* self, const char* param1); struct miqt_string QsciLexer_Tr(const char* s); @@ -97,6 +107,88 @@ struct miqt_string QsciLexer_Tr2(const char* s, const char* c); struct miqt_string QsciLexer_Tr3(const char* s, const char* c, int n); bool QsciLexer_ReadSettings2(QsciLexer* self, QSettings* qs, const char* prefix); bool QsciLexer_WriteSettings2(const QsciLexer* self, QSettings* qs, const char* prefix); +void QsciLexer_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexer_virtualbase_Language(const void* self); +void QsciLexer_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexer_virtualbase_Lexer(const void* self); +void QsciLexer_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexer_virtualbase_LexerId(const void* self); +void QsciLexer_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexer_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexer_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexer_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexer_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexer_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexer_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexer_virtualbase_BlockLookback(const void* self); +void QsciLexer_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexer_virtualbase_BlockStart(const void* self, int* style); +void QsciLexer_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexer_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexer_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexer_virtualbase_BraceStyle(const void* self); +void QsciLexer_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexer_virtualbase_CaseSensitive(const void* self); +void QsciLexer_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexer_virtualbase_Color(const void* self, int style); +void QsciLexer_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexer_virtualbase_EolFill(const void* self, int style); +void QsciLexer_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexer_virtualbase_Font(const void* self, int style); +void QsciLexer_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexer_virtualbase_IndentationGuideView(const void* self); +void QsciLexer_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexer_virtualbase_Keywords(const void* self, int set); +void QsciLexer_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexer_virtualbase_DefaultStyle(const void* self); +void QsciLexer_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexer_virtualbase_Description(const void* self, int style); +void QsciLexer_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexer_virtualbase_Paper(const void* self, int style); +void QsciLexer_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexer_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexer_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexer_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexer_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexer_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexer_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexer_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexer_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexer_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexer_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexer_virtualbase_RefreshProperties(void* self); +void QsciLexer_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexer_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexer_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexer_virtualbase_WordCharacters(const void* self); +void QsciLexer_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexer_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexer_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexer_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexer_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexer_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexer_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexer_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexer_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexer_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexer_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexer_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexer_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexer_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexer_override_virtual_Event(void* self, intptr_t slot); +bool QsciLexer_virtualbase_Event(void* self, QEvent* event); +void QsciLexer_override_virtual_EventFilter(void* self, intptr_t slot); +bool QsciLexer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QsciLexer_override_virtual_TimerEvent(void* self, intptr_t slot); +void QsciLexer_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QsciLexer_override_virtual_ChildEvent(void* self, intptr_t slot); +void QsciLexer_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QsciLexer_override_virtual_CustomEvent(void* self, intptr_t slot); +void QsciLexer_virtualbase_CustomEvent(void* self, QEvent* event); +void QsciLexer_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QsciLexer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QsciLexer_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QsciLexer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QsciLexer_Delete(QsciLexer* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeravs.go b/qt-restricted-extras/qscintilla6/gen_qscilexeravs.go index 5402a301..0dfead6c 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeravs.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeravs.go @@ -249,25 +249,18 @@ func miqt_exec_callback_QsciLexerAVS_SetFoldCompact(self *C.QsciLexerAVS, cb C.i 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) { +func (this *QsciLexerAVS) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -690,21 +683,13 @@ func miqt_exec_callback_QsciLexerAVS_DefaultStyle(self *C.QsciLexerAVS, cb C.int 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) { +func (this *QsciLexerAVS) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -712,7 +697,7 @@ func miqt_exec_callback_QsciLexerAVS_Description(self *C.QsciLexerAVS, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerAVS{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerbash.go b/qt-restricted-extras/qscintilla6/gen_qscilexerbash.go index 7e8612f8..345c2651 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerbash.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerbash.go @@ -259,25 +259,18 @@ func miqt_exec_callback_QsciLexerBash_SetFoldCompact(self *C.QsciLexerBash, cb C 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) { +func (this *QsciLexerBash) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -700,21 +693,13 @@ func miqt_exec_callback_QsciLexerBash_DefaultStyle(self *C.QsciLexerBash, cb C.i 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) { +func (this *QsciLexerBash) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -722,7 +707,7 @@ func miqt_exec_callback_QsciLexerBash_Description(self *C.QsciLexerBash, cb C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerBash{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.go b/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.go index 17668186..f2e0da2b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.go @@ -187,25 +187,18 @@ func QsciLexerBatch_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerBatch) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -628,21 +621,13 @@ func miqt_exec_callback_QsciLexerBatch_DefaultStyle(self *C.QsciLexerBatch, cb C 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) { +func (this *QsciLexerBatch) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -650,7 +635,7 @@ func miqt_exec_callback_QsciLexerBatch_Description(self *C.QsciLexerBatch, cb C. // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerBatch{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercmake.go b/qt-restricted-extras/qscintilla6/gen_qscilexercmake.go index e0c8acb9..b78e2062 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercmake.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercmake.go @@ -216,25 +216,18 @@ func miqt_exec_callback_QsciLexerCMake_SetFoldAtElse(self *C.QsciLexerCMake, cb 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) { +func (this *QsciLexerCMake) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -657,21 +650,13 @@ func miqt_exec_callback_QsciLexerCMake_DefaultStyle(self *C.QsciLexerCMake, cb C 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) { +func (this *QsciLexerCMake) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -679,7 +664,7 @@ func miqt_exec_callback_QsciLexerCMake_Description(self *C.QsciLexerCMake, cb C. // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerCMake{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.go b/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.go index 65bb941e..0dd2c5d5 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.go @@ -282,25 +282,18 @@ func (this *QsciLexerCoffeeScript) BlockStartKeyword1(style *int) string { _ret := C.QsciLexerCoffeeScript_BlockStartKeyword1(this.h, (*C.int)(unsafe.Pointer(style))) 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) { +func (this *QsciLexerCoffeeScript) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -723,21 +716,13 @@ func miqt_exec_callback_QsciLexerCoffeeScript_DefaultStyle(self *C.QsciLexerCoff 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) { +func (this *QsciLexerCoffeeScript) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -745,7 +730,7 @@ func miqt_exec_callback_QsciLexerCoffeeScript_Description(self *C.QsciLexerCoffe // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercpp.go b/qt-restricted-extras/qscintilla6/gen_qscilexercpp.go index 9999d644..8ecf86a8 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercpp.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercpp.go @@ -497,25 +497,18 @@ func miqt_exec_callback_QsciLexerCPP_SetStylePreprocessor(self *C.QsciLexerCPP, 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) { +func (this *QsciLexerCPP) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -938,21 +931,13 @@ func miqt_exec_callback_QsciLexerCPP_DefaultStyle(self *C.QsciLexerCPP, cb C.int 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) { +func (this *QsciLexerCPP) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -960,7 +945,7 @@ func miqt_exec_callback_QsciLexerCPP_Description(self *C.QsciLexerCPP, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerCPP{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercss.go b/qt-restricted-extras/qscintilla6/gen_qscilexercss.go index eab8f506..3a0b5de8 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercss.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercss.go @@ -298,25 +298,18 @@ func miqt_exec_callback_QsciLexerCSS_SetFoldCompact(self *C.QsciLexerCSS, cb C.i 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) { +func (this *QsciLexerCSS) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -739,21 +732,13 @@ func miqt_exec_callback_QsciLexerCSS_DefaultStyle(self *C.QsciLexerCSS, cb C.int 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) { +func (this *QsciLexerCSS) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -761,7 +746,7 @@ func miqt_exec_callback_QsciLexerCSS_Description(self *C.QsciLexerCSS, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerCSS{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.cpp index e41a9cdc..27696e08 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.cpp @@ -1,5 +1,9 @@ +#include +#include +#include #include #include +#include #include #include #include @@ -7,6 +11,865 @@ #include "gen_qscilexercustom.h" #include "_cgo_export.h" +class MiqtVirtualQsciLexerCustom : public virtual QsciLexerCustom { +public: + + MiqtVirtualQsciLexerCustom(): QsciLexerCustom() {}; + MiqtVirtualQsciLexerCustom(QObject* parent): QsciLexerCustom(parent) {}; + + virtual ~MiqtVirtualQsciLexerCustom() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleText = 0; + + // Subclass to allow providing a Go implementation + virtual void styleText(int start, int end) override { + if (handle__StyleText == 0) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = start; + int sigval2 = end; + + miqt_exec_callback_QsciLexerCustom_StyleText(this, handle__StyleText, sigval1, sigval2); + + + } + + // 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) { + QsciLexerCustom::setEditor(editor); + return; + } + + QsciScintilla* sigval1 = editor; + + miqt_exec_callback_QsciLexerCustom_SetEditor(this, handle__SetEditor, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditor(QsciScintilla* editor) { + + QsciLexerCustom::setEditor(editor); + + } + + // 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 QsciLexerCustom::styleBitsNeeded(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCustom_StyleBitsNeeded(const_cast(this), handle__StyleBitsNeeded); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_StyleBitsNeeded() const { + + return QsciLexerCustom::styleBitsNeeded(); + + } + + // 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_QsciLexerCustom_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 QsciLexerCustom::lexer(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCustom_Lexer(const_cast(this), handle__Lexer); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_Lexer() const { + + return (const char*) QsciLexerCustom::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 QsciLexerCustom::lexerId(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCustom_LexerId(const_cast(this), handle__LexerId); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LexerId() const { + + return QsciLexerCustom::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 QsciLexerCustom::autoCompletionFillups(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCustom_AutoCompletionFillups(const_cast(this), handle__AutoCompletionFillups); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_AutoCompletionFillups() const { + + return (const char*) QsciLexerCustom::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 QsciLexerCustom::autoCompletionWordSeparators(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QsciLexerCustom_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 = QsciLexerCustom::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 QsciLexerCustom::blockEnd(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCustom_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*) QsciLexerCustom::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 QsciLexerCustom::blockLookback(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCustom_BlockLookback(const_cast(this), handle__BlockLookback); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BlockLookback() const { + + return QsciLexerCustom::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 QsciLexerCustom::blockStart(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCustom_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*) QsciLexerCustom::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 QsciLexerCustom::blockStartKeyword(style); + } + + int* sigval1 = style; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCustom_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*) QsciLexerCustom::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 QsciLexerCustom::braceStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCustom_BraceStyle(const_cast(this), handle__BraceStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_BraceStyle() const { + + return QsciLexerCustom::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 QsciLexerCustom::caseSensitive(); + } + + + bool callback_return_value = miqt_exec_callback_QsciLexerCustom_CaseSensitive(const_cast(this), handle__CaseSensitive); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CaseSensitive() const { + + return QsciLexerCustom::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 QsciLexerCustom::color(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCustom_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(QsciLexerCustom::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 QsciLexerCustom::eolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCustom_EolFill(const_cast(this), handle__EolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EolFill(int style) const { + + return QsciLexerCustom::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 QsciLexerCustom::font(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCustom_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(QsciLexerCustom::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 QsciLexerCustom::indentationGuideView(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCustom_IndentationGuideView(const_cast(this), handle__IndentationGuideView); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndentationGuideView() const { + + return QsciLexerCustom::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 QsciLexerCustom::keywords(set); + } + + int sigval1 = set; + + const char* callback_return_value = miqt_exec_callback_QsciLexerCustom_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*) QsciLexerCustom::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 QsciLexerCustom::defaultStyle(); + } + + + int callback_return_value = miqt_exec_callback_QsciLexerCustom_DefaultStyle(const_cast(this), handle__DefaultStyle); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DefaultStyle() const { + + return QsciLexerCustom::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_QsciLexerCustom_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 QsciLexerCustom::paper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCustom_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(QsciLexerCustom::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 QsciLexerCustom::defaultColor(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCustom_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(QsciLexerCustom::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 QsciLexerCustom::defaultEolFill(style); + } + + int sigval1 = style; + + bool callback_return_value = miqt_exec_callback_QsciLexerCustom_DefaultEolFill(const_cast(this), handle__DefaultEolFill, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_DefaultEolFill(int style) const { + + return QsciLexerCustom::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 QsciLexerCustom::defaultFont(style); + } + + int sigval1 = style; + + QFont* callback_return_value = miqt_exec_callback_QsciLexerCustom_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(QsciLexerCustom::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 QsciLexerCustom::defaultPaper(style); + } + + int sigval1 = style; + + QColor* callback_return_value = miqt_exec_callback_QsciLexerCustom_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(QsciLexerCustom::defaultPaper(static_cast(style))); + + } + + // 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) { + QsciLexerCustom::refreshProperties(); + return; + } + + + miqt_exec_callback_QsciLexerCustom_RefreshProperties(this, handle__RefreshProperties); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshProperties() { + + QsciLexerCustom::refreshProperties(); + + } + + // 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 QsciLexerCustom::wordCharacters(); + } + + + const char* callback_return_value = miqt_exec_callback_QsciLexerCustom_WordCharacters(const_cast(this), handle__WordCharacters); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + const char* virtualbase_WordCharacters() const { + + return (const char*) QsciLexerCustom::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) { + QsciLexerCustom::setAutoIndentStyle(autoindentstyle); + return; + } + + int sigval1 = autoindentstyle; + + miqt_exec_callback_QsciLexerCustom_SetAutoIndentStyle(this, handle__SetAutoIndentStyle, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetAutoIndentStyle(int autoindentstyle) { + + QsciLexerCustom::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) { + QsciLexerCustom::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_QsciLexerCustom_SetColor(this, handle__SetColor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetColor(QColor* c, int style) { + + QsciLexerCustom::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) { + QsciLexerCustom::setEolFill(eoffill, style); + return; + } + + bool sigval1 = eoffill; + int sigval2 = style; + + miqt_exec_callback_QsciLexerCustom_SetEolFill(this, handle__SetEolFill, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEolFill(bool eoffill, int style) { + + QsciLexerCustom::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) { + QsciLexerCustom::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_QsciLexerCustom_SetFont(this, handle__SetFont, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetFont(QFont* f, int style) { + + QsciLexerCustom::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) { + QsciLexerCustom::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_QsciLexerCustom_SetPaper(this, handle__SetPaper, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPaper(QColor* c, int style) { + + QsciLexerCustom::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 QsciLexerCustom::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_QsciLexerCustom_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 QsciLexerCustom::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 QsciLexerCustom::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_QsciLexerCustom_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 QsciLexerCustom::writeProperties(*qs, prefix_QString); + + } + +}; + +void QsciLexerCustom_new(QsciLexerCustom** outptr_QsciLexerCustom, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCustom* ret = new MiqtVirtualQsciLexerCustom(); + *outptr_QsciLexerCustom = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QsciLexerCustom_new2(QObject* parent, QsciLexerCustom** outptr_QsciLexerCustom, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { + MiqtVirtualQsciLexerCustom* ret = new MiqtVirtualQsciLexerCustom(parent); + *outptr_QsciLexerCustom = ret; + *outptr_QsciLexer = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + QMetaObject* QsciLexerCustom_MetaObject(const QsciLexerCustom* self) { return (QMetaObject*) self->metaObject(); } @@ -76,9 +939,277 @@ void QsciLexerCustom_StartStyling2(QsciLexerCustom* self, int pos, int styleBits self->startStyling(static_cast(pos), static_cast(styleBits)); } +void QsciLexerCustom_override_virtual_StyleText(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__StyleText = slot; +} + +void QsciLexerCustom_override_virtual_SetEditor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__SetEditor = slot; +} + +void QsciLexerCustom_virtualbase_SetEditor(void* self, QsciScintilla* editor) { + ( (MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_SetEditor(editor); +} + +void QsciLexerCustom_override_virtual_StyleBitsNeeded(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__StyleBitsNeeded = slot; +} + +int QsciLexerCustom_virtualbase_StyleBitsNeeded(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_StyleBitsNeeded(); +} + +void QsciLexerCustom_override_virtual_Language(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__Language = slot; +} + +void QsciLexerCustom_override_virtual_Lexer(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__Lexer = slot; +} + +const char* QsciLexerCustom_virtualbase_Lexer(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_Lexer(); +} + +void QsciLexerCustom_override_virtual_LexerId(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__LexerId = slot; +} + +int QsciLexerCustom_virtualbase_LexerId(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_LexerId(); +} + +void QsciLexerCustom_override_virtual_AutoCompletionFillups(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__AutoCompletionFillups = slot; +} + +const char* QsciLexerCustom_virtualbase_AutoCompletionFillups(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_AutoCompletionFillups(); +} + +void QsciLexerCustom_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__AutoCompletionWordSeparators = slot; +} + +struct miqt_array /* of struct miqt_string */ QsciLexerCustom_virtualbase_AutoCompletionWordSeparators(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_AutoCompletionWordSeparators(); +} + +void QsciLexerCustom_override_virtual_BlockEnd(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__BlockEnd = slot; +} + +const char* QsciLexerCustom_virtualbase_BlockEnd(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_BlockEnd(style); +} + +void QsciLexerCustom_override_virtual_BlockLookback(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__BlockLookback = slot; +} + +int QsciLexerCustom_virtualbase_BlockLookback(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_BlockLookback(); +} + +void QsciLexerCustom_override_virtual_BlockStart(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__BlockStart = slot; +} + +const char* QsciLexerCustom_virtualbase_BlockStart(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_BlockStart(style); +} + +void QsciLexerCustom_override_virtual_BlockStartKeyword(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__BlockStartKeyword = slot; +} + +const char* QsciLexerCustom_virtualbase_BlockStartKeyword(const void* self, int* style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_BlockStartKeyword(style); +} + +void QsciLexerCustom_override_virtual_BraceStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__BraceStyle = slot; +} + +int QsciLexerCustom_virtualbase_BraceStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_BraceStyle(); +} + +void QsciLexerCustom_override_virtual_CaseSensitive(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__CaseSensitive = slot; +} + +bool QsciLexerCustom_virtualbase_CaseSensitive(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_CaseSensitive(); +} + +void QsciLexerCustom_override_virtual_Color(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__Color = slot; +} + +QColor* QsciLexerCustom_virtualbase_Color(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_Color(style); +} + +void QsciLexerCustom_override_virtual_EolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__EolFill = slot; +} + +bool QsciLexerCustom_virtualbase_EolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_EolFill(style); +} + +void QsciLexerCustom_override_virtual_Font(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__Font = slot; +} + +QFont* QsciLexerCustom_virtualbase_Font(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_Font(style); +} + +void QsciLexerCustom_override_virtual_IndentationGuideView(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__IndentationGuideView = slot; +} + +int QsciLexerCustom_virtualbase_IndentationGuideView(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_IndentationGuideView(); +} + +void QsciLexerCustom_override_virtual_Keywords(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__Keywords = slot; +} + +const char* QsciLexerCustom_virtualbase_Keywords(const void* self, int set) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_Keywords(set); +} + +void QsciLexerCustom_override_virtual_DefaultStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__DefaultStyle = slot; +} + +int QsciLexerCustom_virtualbase_DefaultStyle(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_DefaultStyle(); +} + +void QsciLexerCustom_override_virtual_Description(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__Description = slot; +} + +void QsciLexerCustom_override_virtual_Paper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__Paper = slot; +} + +QColor* QsciLexerCustom_virtualbase_Paper(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_Paper(style); +} + +void QsciLexerCustom_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__DefaultColorWithStyle = slot; +} + +QColor* QsciLexerCustom_virtualbase_DefaultColorWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_DefaultColorWithStyle(style); +} + +void QsciLexerCustom_override_virtual_DefaultEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__DefaultEolFill = slot; +} + +bool QsciLexerCustom_virtualbase_DefaultEolFill(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_DefaultEolFill(style); +} + +void QsciLexerCustom_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__DefaultFontWithStyle = slot; +} + +QFont* QsciLexerCustom_virtualbase_DefaultFontWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_DefaultFontWithStyle(style); +} + +void QsciLexerCustom_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__DefaultPaperWithStyle = slot; +} + +QColor* QsciLexerCustom_virtualbase_DefaultPaperWithStyle(const void* self, int style) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_DefaultPaperWithStyle(style); +} + +void QsciLexerCustom_override_virtual_RefreshProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__RefreshProperties = slot; +} + +void QsciLexerCustom_virtualbase_RefreshProperties(void* self) { + ( (MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_RefreshProperties(); +} + +void QsciLexerCustom_override_virtual_WordCharacters(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__WordCharacters = slot; +} + +const char* QsciLexerCustom_virtualbase_WordCharacters(const void* self) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_WordCharacters(); +} + +void QsciLexerCustom_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__SetAutoIndentStyle = slot; +} + +void QsciLexerCustom_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle) { + ( (MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_SetAutoIndentStyle(autoindentstyle); +} + +void QsciLexerCustom_override_virtual_SetColor(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__SetColor = slot; +} + +void QsciLexerCustom_virtualbase_SetColor(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_SetColor(c, style); +} + +void QsciLexerCustom_override_virtual_SetEolFill(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__SetEolFill = slot; +} + +void QsciLexerCustom_virtualbase_SetEolFill(void* self, bool eoffill, int style) { + ( (MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_SetEolFill(eoffill, style); +} + +void QsciLexerCustom_override_virtual_SetFont(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__SetFont = slot; +} + +void QsciLexerCustom_virtualbase_SetFont(void* self, QFont* f, int style) { + ( (MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_SetFont(f, style); +} + +void QsciLexerCustom_override_virtual_SetPaper(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__SetPaper = slot; +} + +void QsciLexerCustom_virtualbase_SetPaper(void* self, QColor* c, int style) { + ( (MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_SetPaper(c, style); +} + +void QsciLexerCustom_override_virtual_ReadProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__ReadProperties = slot; +} + +bool QsciLexerCustom_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix) { + return ( (MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_ReadProperties(qs, prefix); +} + +void QsciLexerCustom_override_virtual_WriteProperties(void* self, intptr_t slot) { + dynamic_cast( (QsciLexerCustom*)(self) )->handle__WriteProperties = slot; +} + +bool QsciLexerCustom_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix) { + return ( (const MiqtVirtualQsciLexerCustom*)(self) )->virtualbase_WriteProperties(qs, prefix); +} + void QsciLexerCustom_Delete(QsciLexerCustom* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + 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 ab211b62..001bb104 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -53,6 +54,30 @@ func UnsafeNewQsciLexerCustom(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QO QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} } +// NewQsciLexerCustom constructs a new QsciLexerCustom object. +func NewQsciLexerCustom() *QsciLexerCustom { + var outptr_QsciLexerCustom *C.QsciLexerCustom = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCustom_new(&outptr_QsciLexerCustom, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCustom(outptr_QsciLexerCustom, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQsciLexerCustom2 constructs a new QsciLexerCustom object. +func NewQsciLexerCustom2(parent *qt6.QObject) *QsciLexerCustom { + var outptr_QsciLexerCustom *C.QsciLexerCustom = nil + var outptr_QsciLexer *C.QsciLexer = nil + var outptr_QObject *C.QObject = nil + + C.QsciLexerCustom_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCustom, &outptr_QsciLexer, &outptr_QObject) + ret := newQsciLexerCustom(outptr_QsciLexerCustom, outptr_QsciLexer, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QsciLexerCustom) MetaObject() *qt6.QMetaObject { return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QsciLexerCustom_MetaObject(this.h))) } @@ -121,6 +146,895 @@ func QsciLexerCustom_Tr3(s string, c string, n int) string { func (this *QsciLexerCustom) StartStyling2(pos int, styleBits int) { C.QsciLexerCustom_StartStyling2(this.h, (C.int)(pos), (C.int)(styleBits)) } +func (this *QsciLexerCustom) OnStyleText(slot func(start int, end int)) { + C.QsciLexerCustom_override_virtual_StyleText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_StyleText +func miqt_exec_callback_QsciLexerCustom_StyleText(self *C.QsciLexerCustom, cb C.intptr_t, start C.int, end C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + +} + +func (this *QsciLexerCustom) callVirtualBase_SetEditor(editor *QsciScintilla) { + + C.QsciLexerCustom_virtualbase_SetEditor(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QsciLexerCustom) OnSetEditor(slot func(super func(editor *QsciScintilla), editor *QsciScintilla)) { + C.QsciLexerCustom_override_virtual_SetEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_SetEditor +func miqt_exec_callback_QsciLexerCustom_SetEditor(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_SetEditor, slotval1) + +} + +func (this *QsciLexerCustom) callVirtualBase_StyleBitsNeeded() int { + + return (int)(C.QsciLexerCustom_virtualbase_StyleBitsNeeded(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCustom) OnStyleBitsNeeded(slot func(super func() int) int) { + C.QsciLexerCustom_override_virtual_StyleBitsNeeded(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_StyleBitsNeeded +func miqt_exec_callback_QsciLexerCustom_StyleBitsNeeded(self *C.QsciLexerCustom, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCustom{h: self}).callVirtualBase_StyleBitsNeeded) + + return (C.int)(virtualReturn) + +} +func (this *QsciLexerCustom) OnLanguage(slot func() string) { + C.QsciLexerCustom_override_virtual_Language(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_Language +func miqt_exec_callback_QsciLexerCustom_Language(self *C.QsciLexerCustom, cb C.intptr_t) *C.const_char { + gofunc, ok := cgo.Handle(cb).Value().(func() string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCustom) callVirtualBase_Lexer() string { + + _ret := C.QsciLexerCustom_virtualbase_Lexer(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCustom) OnLexer(slot func(super func() string) string) { + C.QsciLexerCustom_override_virtual_Lexer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_Lexer +func miqt_exec_callback_QsciLexerCustom_Lexer(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_Lexer) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCustom) callVirtualBase_LexerId() int { + + return (int)(C.QsciLexerCustom_virtualbase_LexerId(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCustom) OnLexerId(slot func(super func() int) int) { + C.QsciLexerCustom_override_virtual_LexerId(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_LexerId +func miqt_exec_callback_QsciLexerCustom_LexerId(self *C.QsciLexerCustom, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCustom{h: self}).callVirtualBase_LexerId) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCustom) callVirtualBase_AutoCompletionFillups() string { + + _ret := C.QsciLexerCustom_virtualbase_AutoCompletionFillups(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCustom) OnAutoCompletionFillups(slot func(super func() string) string) { + C.QsciLexerCustom_override_virtual_AutoCompletionFillups(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_AutoCompletionFillups +func miqt_exec_callback_QsciLexerCustom_AutoCompletionFillups(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_AutoCompletionFillups) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCustom) callVirtualBase_AutoCompletionWordSeparators() []string { + + var _ma C.struct_miqt_array = C.QsciLexerCustom_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 *QsciLexerCustom) OnAutoCompletionWordSeparators(slot func(super func() []string) []string) { + C.QsciLexerCustom_override_virtual_AutoCompletionWordSeparators(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_AutoCompletionWordSeparators +func miqt_exec_callback_QsciLexerCustom_AutoCompletionWordSeparators(self *C.QsciLexerCustom, 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((&QsciLexerCustom{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 *QsciLexerCustom) callVirtualBase_BlockEnd(style *int) string { + + _ret := C.QsciLexerCustom_virtualbase_BlockEnd(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCustom) OnBlockEnd(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCustom_override_virtual_BlockEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_BlockEnd +func miqt_exec_callback_QsciLexerCustom_BlockEnd(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_BlockEnd, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCustom) callVirtualBase_BlockLookback() int { + + return (int)(C.QsciLexerCustom_virtualbase_BlockLookback(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCustom) OnBlockLookback(slot func(super func() int) int) { + C.QsciLexerCustom_override_virtual_BlockLookback(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_BlockLookback +func miqt_exec_callback_QsciLexerCustom_BlockLookback(self *C.QsciLexerCustom, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCustom{h: self}).callVirtualBase_BlockLookback) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCustom) callVirtualBase_BlockStart(style *int) string { + + _ret := C.QsciLexerCustom_virtualbase_BlockStart(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCustom) OnBlockStart(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCustom_override_virtual_BlockStart(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_BlockStart +func miqt_exec_callback_QsciLexerCustom_BlockStart(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_BlockStart, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCustom) callVirtualBase_BlockStartKeyword(style *int) string { + + _ret := C.QsciLexerCustom_virtualbase_BlockStartKeyword(unsafe.Pointer(this.h), (*C.int)(unsafe.Pointer(style))) + return C.GoString(_ret) + +} +func (this *QsciLexerCustom) OnBlockStartKeyword(slot func(super func(style *int) string, style *int) string) { + C.QsciLexerCustom_override_virtual_BlockStartKeyword(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_BlockStartKeyword +func miqt_exec_callback_QsciLexerCustom_BlockStartKeyword(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_BlockStartKeyword, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCustom) callVirtualBase_BraceStyle() int { + + return (int)(C.QsciLexerCustom_virtualbase_BraceStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCustom) OnBraceStyle(slot func(super func() int) int) { + C.QsciLexerCustom_override_virtual_BraceStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_BraceStyle +func miqt_exec_callback_QsciLexerCustom_BraceStyle(self *C.QsciLexerCustom, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCustom{h: self}).callVirtualBase_BraceStyle) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCustom) callVirtualBase_CaseSensitive() bool { + + return (bool)(C.QsciLexerCustom_virtualbase_CaseSensitive(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCustom) OnCaseSensitive(slot func(super func() bool) bool) { + C.QsciLexerCustom_override_virtual_CaseSensitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_CaseSensitive +func miqt_exec_callback_QsciLexerCustom_CaseSensitive(self *C.QsciLexerCustom, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCustom{h: self}).callVirtualBase_CaseSensitive) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCustom) callVirtualBase_Color(style int) *qt6.QColor { + + _ret := C.QsciLexerCustom_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 *QsciLexerCustom) OnColor(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCustom_override_virtual_Color(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_Color +func miqt_exec_callback_QsciLexerCustom_Color(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_Color, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCustom) callVirtualBase_EolFill(style int) bool { + + return (bool)(C.QsciLexerCustom_virtualbase_EolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCustom) OnEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCustom_override_virtual_EolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_EolFill +func miqt_exec_callback_QsciLexerCustom_EolFill(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_EolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCustom) callVirtualBase_Font(style int) *qt6.QFont { + + _ret := C.QsciLexerCustom_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 *QsciLexerCustom) OnFont(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerCustom_override_virtual_Font(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_Font +func miqt_exec_callback_QsciLexerCustom_Font(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_Font, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCustom) callVirtualBase_IndentationGuideView() int { + + return (int)(C.QsciLexerCustom_virtualbase_IndentationGuideView(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCustom) OnIndentationGuideView(slot func(super func() int) int) { + C.QsciLexerCustom_override_virtual_IndentationGuideView(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_IndentationGuideView +func miqt_exec_callback_QsciLexerCustom_IndentationGuideView(self *C.QsciLexerCustom, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCustom{h: self}).callVirtualBase_IndentationGuideView) + + return (C.int)(virtualReturn) + +} + +func (this *QsciLexerCustom) callVirtualBase_Keywords(set int) string { + + _ret := C.QsciLexerCustom_virtualbase_Keywords(unsafe.Pointer(this.h), (C.int)(set)) + return C.GoString(_ret) + +} +func (this *QsciLexerCustom) OnKeywords(slot func(super func(set int) string, set int) string) { + C.QsciLexerCustom_override_virtual_Keywords(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_Keywords +func miqt_exec_callback_QsciLexerCustom_Keywords(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_Keywords, slotval1) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCustom) callVirtualBase_DefaultStyle() int { + + return (int)(C.QsciLexerCustom_virtualbase_DefaultStyle(unsafe.Pointer(this.h))) + +} +func (this *QsciLexerCustom) OnDefaultStyle(slot func(super func() int) int) { + C.QsciLexerCustom_override_virtual_DefaultStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_DefaultStyle +func miqt_exec_callback_QsciLexerCustom_DefaultStyle(self *C.QsciLexerCustom, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QsciLexerCustom{h: self}).callVirtualBase_DefaultStyle) + + return (C.int)(virtualReturn) + +} +func (this *QsciLexerCustom) OnDescription(slot func(style int) string) { + C.QsciLexerCustom_override_virtual_Description(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_Description +func miqt_exec_callback_QsciLexerCustom_Description(self *C.QsciLexerCustom, cb C.intptr_t, style C.int) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(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(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 *QsciLexerCustom) callVirtualBase_Paper(style int) *qt6.QColor { + + _ret := C.QsciLexerCustom_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 *QsciLexerCustom) OnPaper(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCustom_override_virtual_Paper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_Paper +func miqt_exec_callback_QsciLexerCustom_Paper(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_Paper, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCustom) callVirtualBase_DefaultColorWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerCustom_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 *QsciLexerCustom) OnDefaultColorWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCustom_override_virtual_DefaultColorWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_DefaultColorWithStyle +func miqt_exec_callback_QsciLexerCustom_DefaultColorWithStyle(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_DefaultColorWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCustom) callVirtualBase_DefaultEolFill(style int) bool { + + return (bool)(C.QsciLexerCustom_virtualbase_DefaultEolFill(unsafe.Pointer(this.h), (C.int)(style))) + +} +func (this *QsciLexerCustom) OnDefaultEolFill(slot func(super func(style int) bool, style int) bool) { + C.QsciLexerCustom_override_virtual_DefaultEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_DefaultEolFill +func miqt_exec_callback_QsciLexerCustom_DefaultEolFill(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_DefaultEolFill, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCustom) callVirtualBase_DefaultFontWithStyle(style int) *qt6.QFont { + + _ret := C.QsciLexerCustom_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 *QsciLexerCustom) OnDefaultFontWithStyle(slot func(super func(style int) *qt6.QFont, style int) *qt6.QFont) { + C.QsciLexerCustom_override_virtual_DefaultFontWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_DefaultFontWithStyle +func miqt_exec_callback_QsciLexerCustom_DefaultFontWithStyle(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_DefaultFontWithStyle, slotval1) + + return (*C.QFont)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCustom) callVirtualBase_DefaultPaperWithStyle(style int) *qt6.QColor { + + _ret := C.QsciLexerCustom_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 *QsciLexerCustom) OnDefaultPaperWithStyle(slot func(super func(style int) *qt6.QColor, style int) *qt6.QColor) { + C.QsciLexerCustom_override_virtual_DefaultPaperWithStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_DefaultPaperWithStyle +func miqt_exec_callback_QsciLexerCustom_DefaultPaperWithStyle(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_DefaultPaperWithStyle, slotval1) + + return (*C.QColor)(virtualReturn.UnsafePointer()) + +} + +func (this *QsciLexerCustom) callVirtualBase_RefreshProperties() { + + C.QsciLexerCustom_virtualbase_RefreshProperties(unsafe.Pointer(this.h)) + +} +func (this *QsciLexerCustom) OnRefreshProperties(slot func(super func())) { + C.QsciLexerCustom_override_virtual_RefreshProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_RefreshProperties +func miqt_exec_callback_QsciLexerCustom_RefreshProperties(self *C.QsciLexerCustom, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QsciLexerCustom{h: self}).callVirtualBase_RefreshProperties) + +} + +func (this *QsciLexerCustom) callVirtualBase_WordCharacters() string { + + _ret := C.QsciLexerCustom_virtualbase_WordCharacters(unsafe.Pointer(this.h)) + return C.GoString(_ret) + +} +func (this *QsciLexerCustom) OnWordCharacters(slot func(super func() string) string) { + C.QsciLexerCustom_override_virtual_WordCharacters(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_WordCharacters +func miqt_exec_callback_QsciLexerCustom_WordCharacters(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_WordCharacters) + virtualReturn_Cstring := C.CString(virtualReturn) + defer C.free(unsafe.Pointer(virtualReturn_Cstring)) + + return virtualReturn_Cstring + +} + +func (this *QsciLexerCustom) callVirtualBase_SetAutoIndentStyle(autoindentstyle int) { + + C.QsciLexerCustom_virtualbase_SetAutoIndentStyle(unsafe.Pointer(this.h), (C.int)(autoindentstyle)) + +} +func (this *QsciLexerCustom) OnSetAutoIndentStyle(slot func(super func(autoindentstyle int), autoindentstyle int)) { + C.QsciLexerCustom_override_virtual_SetAutoIndentStyle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_SetAutoIndentStyle +func miqt_exec_callback_QsciLexerCustom_SetAutoIndentStyle(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_SetAutoIndentStyle, slotval1) + +} + +func (this *QsciLexerCustom) callVirtualBase_SetColor(c *qt6.QColor, style int) { + + C.QsciLexerCustom_virtualbase_SetColor(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCustom) OnSetColor(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerCustom_override_virtual_SetColor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_SetColor +func miqt_exec_callback_QsciLexerCustom_SetColor(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_SetColor, slotval1, slotval2) + +} + +func (this *QsciLexerCustom) callVirtualBase_SetEolFill(eoffill bool, style int) { + + C.QsciLexerCustom_virtualbase_SetEolFill(unsafe.Pointer(this.h), (C.bool)(eoffill), (C.int)(style)) + +} +func (this *QsciLexerCustom) OnSetEolFill(slot func(super func(eoffill bool, style int), eoffill bool, style int)) { + C.QsciLexerCustom_override_virtual_SetEolFill(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_SetEolFill +func miqt_exec_callback_QsciLexerCustom_SetEolFill(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_SetEolFill, slotval1, slotval2) + +} + +func (this *QsciLexerCustom) callVirtualBase_SetFont(f *qt6.QFont, style int) { + + C.QsciLexerCustom_virtualbase_SetFont(unsafe.Pointer(this.h), (*C.QFont)(f.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCustom) OnSetFont(slot func(super func(f *qt6.QFont, style int), f *qt6.QFont, style int)) { + C.QsciLexerCustom_override_virtual_SetFont(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_SetFont +func miqt_exec_callback_QsciLexerCustom_SetFont(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_SetFont, slotval1, slotval2) + +} + +func (this *QsciLexerCustom) callVirtualBase_SetPaper(c *qt6.QColor, style int) { + + C.QsciLexerCustom_virtualbase_SetPaper(unsafe.Pointer(this.h), (*C.QColor)(c.UnsafePointer()), (C.int)(style)) + +} +func (this *QsciLexerCustom) OnSetPaper(slot func(super func(c *qt6.QColor, style int), c *qt6.QColor, style int)) { + C.QsciLexerCustom_override_virtual_SetPaper(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_SetPaper +func miqt_exec_callback_QsciLexerCustom_SetPaper(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_SetPaper, slotval1, slotval2) + +} + +func (this *QsciLexerCustom) 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.QsciLexerCustom_virtualbase_ReadProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCustom) OnReadProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerCustom_override_virtual_ReadProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_ReadProperties +func miqt_exec_callback_QsciLexerCustom_ReadProperties(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_ReadProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QsciLexerCustom) 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.QsciLexerCustom_virtualbase_WriteProperties(unsafe.Pointer(this.h), (*C.QSettings)(qs.UnsafePointer()), prefix_ms)) + +} +func (this *QsciLexerCustom) OnWriteProperties(slot func(super func(qs *qt6.QSettings, prefix string) bool, qs *qt6.QSettings, prefix string) bool) { + C.QsciLexerCustom_override_virtual_WriteProperties(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QsciLexerCustom_WriteProperties +func miqt_exec_callback_QsciLexerCustom_WriteProperties(self *C.QsciLexerCustom, 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((&QsciLexerCustom{h: self}).callVirtualBase_WriteProperties, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} // Delete this object from C++ memory. func (this *QsciLexerCustom) Delete() { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.h b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.h index aa99c60f..03abd91b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.h @@ -15,21 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QColor; +class QFont; class QMetaObject; class QObject; +class QSettings; class QsciLexer; class QsciLexerCustom; class QsciScintilla; class QsciStyle; #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 QsciLexerCustom QsciLexerCustom; typedef struct QsciScintilla QsciScintilla; typedef struct QsciStyle QsciStyle; #endif +void QsciLexerCustom_new(QsciLexerCustom** outptr_QsciLexerCustom, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +void QsciLexerCustom_new2(QObject* parent, QsciLexerCustom** outptr_QsciLexerCustom, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); QMetaObject* QsciLexerCustom_MetaObject(const QsciLexerCustom* self); void* QsciLexerCustom_Metacast(QsciLexerCustom* self, const char* param1); struct miqt_string QsciLexerCustom_Tr(const char* s); @@ -42,6 +50,76 @@ 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_override_virtual_StyleText(void* self, intptr_t slot); +void QsciLexerCustom_virtualbase_StyleText(void* self, int start, int end); +void QsciLexerCustom_override_virtual_SetEditor(void* self, intptr_t slot); +void QsciLexerCustom_virtualbase_SetEditor(void* self, QsciScintilla* editor); +void QsciLexerCustom_override_virtual_StyleBitsNeeded(void* self, intptr_t slot); +int QsciLexerCustom_virtualbase_StyleBitsNeeded(const void* self); +void QsciLexerCustom_override_virtual_Language(void* self, intptr_t slot); +const char* QsciLexerCustom_virtualbase_Language(const void* self); +void QsciLexerCustom_override_virtual_Lexer(void* self, intptr_t slot); +const char* QsciLexerCustom_virtualbase_Lexer(const void* self); +void QsciLexerCustom_override_virtual_LexerId(void* self, intptr_t slot); +int QsciLexerCustom_virtualbase_LexerId(const void* self); +void QsciLexerCustom_override_virtual_AutoCompletionFillups(void* self, intptr_t slot); +const char* QsciLexerCustom_virtualbase_AutoCompletionFillups(const void* self); +void QsciLexerCustom_override_virtual_AutoCompletionWordSeparators(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QsciLexerCustom_virtualbase_AutoCompletionWordSeparators(const void* self); +void QsciLexerCustom_override_virtual_BlockEnd(void* self, intptr_t slot); +const char* QsciLexerCustom_virtualbase_BlockEnd(const void* self, int* style); +void QsciLexerCustom_override_virtual_BlockLookback(void* self, intptr_t slot); +int QsciLexerCustom_virtualbase_BlockLookback(const void* self); +void QsciLexerCustom_override_virtual_BlockStart(void* self, intptr_t slot); +const char* QsciLexerCustom_virtualbase_BlockStart(const void* self, int* style); +void QsciLexerCustom_override_virtual_BlockStartKeyword(void* self, intptr_t slot); +const char* QsciLexerCustom_virtualbase_BlockStartKeyword(const void* self, int* style); +void QsciLexerCustom_override_virtual_BraceStyle(void* self, intptr_t slot); +int QsciLexerCustom_virtualbase_BraceStyle(const void* self); +void QsciLexerCustom_override_virtual_CaseSensitive(void* self, intptr_t slot); +bool QsciLexerCustom_virtualbase_CaseSensitive(const void* self); +void QsciLexerCustom_override_virtual_Color(void* self, intptr_t slot); +QColor* QsciLexerCustom_virtualbase_Color(const void* self, int style); +void QsciLexerCustom_override_virtual_EolFill(void* self, intptr_t slot); +bool QsciLexerCustom_virtualbase_EolFill(const void* self, int style); +void QsciLexerCustom_override_virtual_Font(void* self, intptr_t slot); +QFont* QsciLexerCustom_virtualbase_Font(const void* self, int style); +void QsciLexerCustom_override_virtual_IndentationGuideView(void* self, intptr_t slot); +int QsciLexerCustom_virtualbase_IndentationGuideView(const void* self); +void QsciLexerCustom_override_virtual_Keywords(void* self, intptr_t slot); +const char* QsciLexerCustom_virtualbase_Keywords(const void* self, int set); +void QsciLexerCustom_override_virtual_DefaultStyle(void* self, intptr_t slot); +int QsciLexerCustom_virtualbase_DefaultStyle(const void* self); +void QsciLexerCustom_override_virtual_Description(void* self, intptr_t slot); +struct miqt_string QsciLexerCustom_virtualbase_Description(const void* self, int style); +void QsciLexerCustom_override_virtual_Paper(void* self, intptr_t slot); +QColor* QsciLexerCustom_virtualbase_Paper(const void* self, int style); +void QsciLexerCustom_override_virtual_DefaultColorWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCustom_virtualbase_DefaultColorWithStyle(const void* self, int style); +void QsciLexerCustom_override_virtual_DefaultEolFill(void* self, intptr_t slot); +bool QsciLexerCustom_virtualbase_DefaultEolFill(const void* self, int style); +void QsciLexerCustom_override_virtual_DefaultFontWithStyle(void* self, intptr_t slot); +QFont* QsciLexerCustom_virtualbase_DefaultFontWithStyle(const void* self, int style); +void QsciLexerCustom_override_virtual_DefaultPaperWithStyle(void* self, intptr_t slot); +QColor* QsciLexerCustom_virtualbase_DefaultPaperWithStyle(const void* self, int style); +void QsciLexerCustom_override_virtual_RefreshProperties(void* self, intptr_t slot); +void QsciLexerCustom_virtualbase_RefreshProperties(void* self); +void QsciLexerCustom_override_virtual_WordCharacters(void* self, intptr_t slot); +const char* QsciLexerCustom_virtualbase_WordCharacters(const void* self); +void QsciLexerCustom_override_virtual_SetAutoIndentStyle(void* self, intptr_t slot); +void QsciLexerCustom_virtualbase_SetAutoIndentStyle(void* self, int autoindentstyle); +void QsciLexerCustom_override_virtual_SetColor(void* self, intptr_t slot); +void QsciLexerCustom_virtualbase_SetColor(void* self, QColor* c, int style); +void QsciLexerCustom_override_virtual_SetEolFill(void* self, intptr_t slot); +void QsciLexerCustom_virtualbase_SetEolFill(void* self, bool eoffill, int style); +void QsciLexerCustom_override_virtual_SetFont(void* self, intptr_t slot); +void QsciLexerCustom_virtualbase_SetFont(void* self, QFont* f, int style); +void QsciLexerCustom_override_virtual_SetPaper(void* self, intptr_t slot); +void QsciLexerCustom_virtualbase_SetPaper(void* self, QColor* c, int style); +void QsciLexerCustom_override_virtual_ReadProperties(void* self, intptr_t slot); +bool QsciLexerCustom_virtualbase_ReadProperties(void* self, QSettings* qs, struct miqt_string prefix); +void QsciLexerCustom_override_virtual_WriteProperties(void* self, intptr_t slot); +bool QsciLexerCustom_virtualbase_WriteProperties(const void* self, QSettings* qs, struct miqt_string prefix); void QsciLexerCustom_Delete(QsciLexerCustom* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerd.go b/qt-restricted-extras/qscintilla6/gen_qscilexerd.go index 724652a4..a8f658d0 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerd.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerd.go @@ -342,25 +342,18 @@ func miqt_exec_callback_QsciLexerD_SetFoldCompact(self *C.QsciLexerD, cb C.intpt 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) { +func (this *QsciLexerD) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -783,21 +776,13 @@ func miqt_exec_callback_QsciLexerD_DefaultStyle(self *C.QsciLexerD, cb C.intptr_ 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) { +func (this *QsciLexerD) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -805,7 +790,7 @@ func miqt_exec_callback_QsciLexerD_Description(self *C.QsciLexerD, cb C.intptr_t // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerD{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.go b/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.go index facb746f..0ff362f4 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.go @@ -164,25 +164,18 @@ func QsciLexerDiff_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerDiff) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -605,21 +598,13 @@ func miqt_exec_callback_QsciLexerDiff_DefaultStyle(self *C.QsciLexerDiff, cb C.i 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) { +func (this *QsciLexerDiff) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -627,7 +612,7 @@ func miqt_exec_callback_QsciLexerDiff_Description(self *C.QsciLexerDiff, cb C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerDiff{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.go b/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.go index aa15cb52..ea41a16c 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.go @@ -156,25 +156,18 @@ func QsciLexerEDIFACT_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerEDIFACT) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -597,21 +590,13 @@ func miqt_exec_callback_QsciLexerEDIFACT_DefaultStyle(self *C.QsciLexerEDIFACT, 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) { +func (this *QsciLexerEDIFACT) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -619,7 +604,7 @@ func miqt_exec_callback_QsciLexerEDIFACT_Description(self *C.QsciLexerEDIFACT, c // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.go b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.go index 2212cdff..0a9f42f6 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.go @@ -224,25 +224,18 @@ func miqt_exec_callback_QsciLexerFortran77_SetFoldCompact(self *C.QsciLexerFortr 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) { +func (this *QsciLexerFortran77) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -665,21 +658,13 @@ func miqt_exec_callback_QsciLexerFortran77_DefaultStyle(self *C.QsciLexerFortran 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) { +func (this *QsciLexerFortran77) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -687,7 +672,7 @@ func miqt_exec_callback_QsciLexerFortran77_Description(self *C.QsciLexerFortran7 // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.go b/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.go index daed8f6b..443a1c99 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.go @@ -419,25 +419,18 @@ func miqt_exec_callback_QsciLexerHTML_SetCaseSensitiveTags(self *C.QsciLexerHTML 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) { +func (this *QsciLexerHTML) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -860,21 +853,13 @@ func miqt_exec_callback_QsciLexerHTML_DefaultStyle(self *C.QsciLexerHTML, cb C.i 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) { +func (this *QsciLexerHTML) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -882,7 +867,7 @@ func miqt_exec_callback_QsciLexerHTML_Description(self *C.QsciLexerHTML, cb C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerHTML{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjson.go b/qt-restricted-extras/qscintilla6/gen_qscilexerjson.go index 81f7dfd7..22f70530 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjson.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjson.go @@ -212,25 +212,18 @@ func QsciLexerJSON_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerJSON) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -653,21 +646,13 @@ func miqt_exec_callback_QsciLexerJSON_DefaultStyle(self *C.QsciLexerJSON, cb C.i 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) { +func (this *QsciLexerJSON) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -675,7 +660,7 @@ func miqt_exec_callback_QsciLexerJSON_Description(self *C.QsciLexerJSON, cb C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerJSON{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerlua.go b/qt-restricted-extras/qscintilla6/gen_qscilexerlua.go index 2a72d89e..a13279eb 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerlua.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerlua.go @@ -252,25 +252,18 @@ func miqt_exec_callback_QsciLexerLua_SetFoldCompact(self *C.QsciLexerLua, cb C.i 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) { +func (this *QsciLexerLua) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -693,21 +686,13 @@ func miqt_exec_callback_QsciLexerLua_DefaultStyle(self *C.QsciLexerLua, cb C.int 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) { +func (this *QsciLexerLua) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -715,7 +700,7 @@ func miqt_exec_callback_QsciLexerLua_Description(self *C.QsciLexerLua, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerLua{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.go b/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.go index 9e68005b..d13d0e93 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.go @@ -177,25 +177,18 @@ func QsciLexerMakefile_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerMakefile) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -618,21 +611,13 @@ func miqt_exec_callback_QsciLexerMakefile_DefaultStyle(self *C.QsciLexerMakefile 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) { +func (this *QsciLexerMakefile) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -640,7 +625,7 @@ func miqt_exec_callback_QsciLexerMakefile_Description(self *C.QsciLexerMakefile, // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.go b/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.go index 41bfb4b5..2886a36c 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.go @@ -183,25 +183,18 @@ func QsciLexerMarkdown_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerMarkdown) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -624,21 +617,13 @@ func miqt_exec_callback_QsciLexerMarkdown_DefaultStyle(self *C.QsciLexerMarkdown 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) { +func (this *QsciLexerMarkdown) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -646,7 +631,7 @@ func miqt_exec_callback_QsciLexerMarkdown_Description(self *C.QsciLexerMarkdown, // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.go b/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.go index 58f2f05f..e9c5fc7d 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.go @@ -168,25 +168,18 @@ func QsciLexerMatlab_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerMatlab) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -609,21 +602,13 @@ func miqt_exec_callback_QsciLexerMatlab_DefaultStyle(self *C.QsciLexerMatlab, cb 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) { +func (this *QsciLexerMatlab) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -631,7 +616,7 @@ func miqt_exec_callback_QsciLexerMatlab_Description(self *C.QsciLexerMatlab, cb // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.go b/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.go index 70aef7c4..8fb0568c 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.go @@ -337,25 +337,18 @@ func miqt_exec_callback_QsciLexerPascal_SetFoldPreprocessor(self *C.QsciLexerPas 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) { +func (this *QsciLexerPascal) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -778,21 +771,13 @@ func miqt_exec_callback_QsciLexerPascal_DefaultStyle(self *C.QsciLexerPascal, cb 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) { +func (this *QsciLexerPascal) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -800,7 +785,7 @@ func miqt_exec_callback_QsciLexerPascal_Description(self *C.QsciLexerPascal, cb // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerPascal{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerperl.go b/qt-restricted-extras/qscintilla6/gen_qscilexerperl.go index 68faaf30..fd2b9746 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerperl.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerperl.go @@ -343,25 +343,18 @@ func miqt_exec_callback_QsciLexerPerl_SetFoldCompact(self *C.QsciLexerPerl, cb C 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) { +func (this *QsciLexerPerl) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -784,21 +777,13 @@ func miqt_exec_callback_QsciLexerPerl_DefaultStyle(self *C.QsciLexerPerl, cb C.i 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) { +func (this *QsciLexerPerl) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -806,7 +791,7 @@ func miqt_exec_callback_QsciLexerPerl_Description(self *C.QsciLexerPerl, cb C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerPerl{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpo.go b/qt-restricted-extras/qscintilla6/gen_qscilexerpo.go index 4b6eb0a6..70bd6fd4 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpo.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpo.go @@ -235,25 +235,18 @@ func miqt_exec_callback_QsciLexerPO_SetFoldCompact(self *C.QsciLexerPO, cb C.int 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) { +func (this *QsciLexerPO) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -676,21 +669,13 @@ func miqt_exec_callback_QsciLexerPO_DefaultStyle(self *C.QsciLexerPO, cb C.intpt 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) { +func (this *QsciLexerPO) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -698,7 +683,7 @@ func miqt_exec_callback_QsciLexerPO_Description(self *C.QsciLexerPO, cb C.intptr // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerPO{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.go b/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.go index e5ae638e..32bd5db4 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.go @@ -314,25 +314,18 @@ func miqt_exec_callback_QsciLexerPostScript_SetFoldAtElse(self *C.QsciLexerPostS 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) { +func (this *QsciLexerPostScript) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -755,21 +748,13 @@ func miqt_exec_callback_QsciLexerPostScript_DefaultStyle(self *C.QsciLexerPostSc 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) { +func (this *QsciLexerPostScript) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -777,7 +762,7 @@ func miqt_exec_callback_QsciLexerPostScript_Description(self *C.QsciLexerPostScr // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpov.go b/qt-restricted-extras/qscintilla6/gen_qscilexerpov.go index 2b1ca658..29f893c0 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpov.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpov.go @@ -293,25 +293,18 @@ func miqt_exec_callback_QsciLexerPOV_SetFoldDirectives(self *C.QsciLexerPOV, cb 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) { +func (this *QsciLexerPOV) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -734,21 +727,13 @@ func miqt_exec_callback_QsciLexerPOV_DefaultStyle(self *C.QsciLexerPOV, cb C.int 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) { +func (this *QsciLexerPOV) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -756,7 +741,7 @@ func miqt_exec_callback_QsciLexerPOV_Description(self *C.QsciLexerPOV, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerPOV{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.go b/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.go index c4a6a330..55086f05 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.go @@ -219,25 +219,18 @@ func miqt_exec_callback_QsciLexerProperties_SetFoldCompact(self *C.QsciLexerProp 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) { +func (this *QsciLexerProperties) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -660,21 +653,13 @@ func miqt_exec_callback_QsciLexerProperties_DefaultStyle(self *C.QsciLexerProper 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) { +func (this *QsciLexerProperties) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -682,7 +667,7 @@ func miqt_exec_callback_QsciLexerProperties_Description(self *C.QsciLexerPropert // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerProperties{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpython.go b/qt-restricted-extras/qscintilla6/gen_qscilexerpython.go index 48404ff3..6ba19ea0 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpython.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpython.go @@ -402,25 +402,18 @@ func miqt_exec_callback_QsciLexerPython_SetIndentationWarning(self *C.QsciLexerP 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) { +func (this *QsciLexerPython) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -821,21 +814,13 @@ func miqt_exec_callback_QsciLexerPython_DefaultStyle(self *C.QsciLexerPython, cb 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) { +func (this *QsciLexerPython) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -843,7 +828,7 @@ func miqt_exec_callback_QsciLexerPython_Description(self *C.QsciLexerPython, cb // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerPython{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerruby.go b/qt-restricted-extras/qscintilla6/gen_qscilexerruby.go index 27772223..33ed70ca 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerruby.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerruby.go @@ -255,25 +255,18 @@ func (this *QsciLexerRuby) BlockStartKeyword1(style *int) string { _ret := C.QsciLexerRuby_BlockStartKeyword1(this.h, (*C.int)(unsafe.Pointer(style))) 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) { +func (this *QsciLexerRuby) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -696,21 +689,13 @@ func miqt_exec_callback_QsciLexerRuby_DefaultStyle(self *C.QsciLexerRuby, cb C.i 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) { +func (this *QsciLexerRuby) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -718,7 +703,7 @@ func miqt_exec_callback_QsciLexerRuby_Description(self *C.QsciLexerRuby, cb C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerRuby{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerspice.go b/qt-restricted-extras/qscintilla6/gen_qscilexerspice.go index 3bd46823..f386e6c8 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerspice.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerspice.go @@ -172,25 +172,18 @@ func QsciLexerSpice_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerSpice) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -613,21 +606,13 @@ func miqt_exec_callback_QsciLexerSpice_DefaultStyle(self *C.QsciLexerSpice, cb C 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) { +func (this *QsciLexerSpice) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -635,7 +620,7 @@ func miqt_exec_callback_QsciLexerSpice_Description(self *C.QsciLexerSpice, cb C. // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerSpice{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexersql.go b/qt-restricted-extras/qscintilla6/gen_qscilexersql.go index 53c4429a..bb135e10 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexersql.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexersql.go @@ -333,25 +333,18 @@ func miqt_exec_callback_QsciLexerSQL_SetFoldCompact(self *C.QsciLexerSQL, cb C.i 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) { +func (this *QsciLexerSQL) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -774,21 +767,13 @@ func miqt_exec_callback_QsciLexerSQL_DefaultStyle(self *C.QsciLexerSQL, cb C.int 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) { +func (this *QsciLexerSQL) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -796,7 +781,7 @@ func miqt_exec_callback_QsciLexerSQL_Description(self *C.QsciLexerSQL, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerSQL{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexertcl.go b/qt-restricted-extras/qscintilla6/gen_qscilexertcl.go index d1e4d08b..68cf5102 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexertcl.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexertcl.go @@ -208,25 +208,18 @@ func QsciLexerTCL_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerTCL) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -649,21 +642,13 @@ func miqt_exec_callback_QsciLexerTCL_DefaultStyle(self *C.QsciLexerTCL, cb C.int 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) { +func (this *QsciLexerTCL) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -671,7 +656,7 @@ func miqt_exec_callback_QsciLexerTCL_Description(self *C.QsciLexerTCL, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerTCL{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexertex.go b/qt-restricted-extras/qscintilla6/gen_qscilexertex.go index 09479030..19450402 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexertex.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexertex.go @@ -199,25 +199,18 @@ func QsciLexerTeX_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerTeX) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -640,21 +633,13 @@ func miqt_exec_callback_QsciLexerTeX_DefaultStyle(self *C.QsciLexerTeX, cb C.int 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) { +func (this *QsciLexerTeX) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -662,7 +647,7 @@ func miqt_exec_callback_QsciLexerTeX_Description(self *C.QsciLexerTeX, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerTeX{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.go b/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.go index ccebb9d9..910fc13b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.go @@ -261,25 +261,18 @@ func QsciLexerVerilog_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) 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) { +func (this *QsciLexerVerilog) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -702,21 +695,13 @@ func miqt_exec_callback_QsciLexerVerilog_DefaultStyle(self *C.QsciLexerVerilog, 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) { +func (this *QsciLexerVerilog) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -724,7 +709,7 @@ func miqt_exec_callback_QsciLexerVerilog_Description(self *C.QsciLexerVerilog, c // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.go b/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.go index 03bf13a0..bdb12735 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.go @@ -349,25 +349,18 @@ func miqt_exec_callback_QsciLexerVHDL_SetFoldAtParenthesis(self *C.QsciLexerVHDL 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) { +func (this *QsciLexerVHDL) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -790,21 +783,13 @@ func miqt_exec_callback_QsciLexerVHDL_DefaultStyle(self *C.QsciLexerVHDL, cb C.i 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) { +func (this *QsciLexerVHDL) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -812,7 +797,7 @@ func miqt_exec_callback_QsciLexerVHDL_Description(self *C.QsciLexerVHDL, cb C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.go b/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.go index 1e19fb7b..e3a6f9ea 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.go @@ -215,25 +215,18 @@ func miqt_exec_callback_QsciLexerYAML_SetFoldComments(self *C.QsciLexerYAML, cb 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) { +func (this *QsciLexerYAML) OnLanguage(slot func() 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) + gofunc, ok := cgo.Handle(cb).Value().(func() string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } - virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Language) + virtualReturn := gofunc() virtualReturn_Cstring := C.CString(virtualReturn) defer C.free(unsafe.Pointer(virtualReturn_Cstring)) @@ -656,21 +649,13 @@ func miqt_exec_callback_QsciLexerYAML_DefaultStyle(self *C.QsciLexerYAML, cb C.i 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) { +func (this *QsciLexerYAML) OnDescription(slot func(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) + gofunc, ok := cgo.Handle(cb).Value().(func(style int) string) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } @@ -678,7 +663,7 @@ func miqt_exec_callback_QsciLexerYAML_Description(self *C.QsciLexerYAML, cb C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(style) - virtualReturn := gofunc((&QsciLexerYAML{h: self}).callVirtualBase_Description, slotval1) + virtualReturn := gofunc(slotval1) virtualReturn_ms := C.struct_miqt_string{} virtualReturn_ms.data = C.CString(virtualReturn) virtualReturn_ms.len = C.size_t(len(virtualReturn)) diff --git a/qt/gen_qabstractanimation.cpp b/qt/gen_qabstractanimation.cpp index 7a9b3ae7..ca36dff6 100644 --- a/qt/gen_qabstractanimation.cpp +++ b/qt/gen_qabstractanimation.cpp @@ -14,6 +14,282 @@ #include "gen_qabstractanimation.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractAnimation : public virtual QAbstractAnimation { +public: + + MiqtVirtualQAbstractAnimation(): QAbstractAnimation() {}; + MiqtVirtualQAbstractAnimation(QObject* parent): QAbstractAnimation(parent) {}; + + virtual ~MiqtVirtualQAbstractAnimation() = 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 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QAbstractAnimation_Duration(const_cast(this), handle__Duration); + + return static_cast(callback_return_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 QAbstractAnimation::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractAnimation_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAbstractAnimation::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) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = currentTime; + + miqt_exec_callback_QAbstractAnimation_UpdateCurrentTime(this, handle__UpdateCurrentTime, sigval1); + + + } + + // 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) { + QAbstractAnimation::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_QAbstractAnimation_UpdateState(this, handle__UpdateState, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateState(int newState, int oldState) { + + QAbstractAnimation::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) { + QAbstractAnimation::updateDirection(direction); + return; + } + + QAbstractAnimation::Direction direction_ret = direction; + int sigval1 = static_cast(direction_ret); + + miqt_exec_callback_QAbstractAnimation_UpdateDirection(this, handle__UpdateDirection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateDirection(int direction) { + + QAbstractAnimation::updateDirection(static_cast(direction)); + + } + + // 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 QAbstractAnimation::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractAnimation_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAbstractAnimation::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) { + QAbstractAnimation::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractAnimation_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractAnimation::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) { + QAbstractAnimation::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAbstractAnimation_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAbstractAnimation::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) { + QAbstractAnimation::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractAnimation_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAbstractAnimation::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) { + QAbstractAnimation::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractAnimation_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAbstractAnimation::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) { + QAbstractAnimation::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractAnimation_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAbstractAnimation::disconnectNotify(*signal); + + } + +}; + +void QAbstractAnimation_new(QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQAbstractAnimation* ret = new MiqtVirtualQAbstractAnimation(); + *outptr_QAbstractAnimation = ret; + *outptr_QObject = static_cast(ret); +} + +void QAbstractAnimation_new2(QObject* parent, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQAbstractAnimation* ret = new MiqtVirtualQAbstractAnimation(parent); + *outptr_QAbstractAnimation = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractAnimation_MetaObject(const QAbstractAnimation* self) { return (QMetaObject*) self->metaObject(); } @@ -95,7 +371,7 @@ void QAbstractAnimation_Finished(QAbstractAnimation* self) { } void QAbstractAnimation_connect_Finished(QAbstractAnimation* self, intptr_t slot) { - QAbstractAnimation::connect(self, static_cast(&QAbstractAnimation::finished), self, [=]() { + MiqtVirtualQAbstractAnimation::connect(self, static_cast(&QAbstractAnimation::finished), self, [=]() { miqt_exec_callback_QAbstractAnimation_Finished(slot); }); } @@ -105,7 +381,7 @@ void QAbstractAnimation_StateChanged(QAbstractAnimation* self, int newState, int } void QAbstractAnimation_connect_StateChanged(QAbstractAnimation* self, intptr_t slot) { - QAbstractAnimation::connect(self, static_cast(&QAbstractAnimation::stateChanged), self, [=](QAbstractAnimation::State newState, QAbstractAnimation::State oldState) { + MiqtVirtualQAbstractAnimation::connect(self, static_cast(&QAbstractAnimation::stateChanged), self, [=](QAbstractAnimation::State newState, QAbstractAnimation::State oldState) { QAbstractAnimation::State newState_ret = newState; int sigval1 = static_cast(newState_ret); QAbstractAnimation::State oldState_ret = oldState; @@ -119,7 +395,7 @@ void QAbstractAnimation_CurrentLoopChanged(QAbstractAnimation* self, int current } void QAbstractAnimation_connect_CurrentLoopChanged(QAbstractAnimation* self, intptr_t slot) { - QAbstractAnimation::connect(self, static_cast(&QAbstractAnimation::currentLoopChanged), self, [=](int currentLoop) { + MiqtVirtualQAbstractAnimation::connect(self, static_cast(&QAbstractAnimation::currentLoopChanged), self, [=](int currentLoop) { int sigval1 = currentLoop; miqt_exec_callback_QAbstractAnimation_CurrentLoopChanged(slot, sigval1); }); @@ -130,7 +406,7 @@ void QAbstractAnimation_DirectionChanged(QAbstractAnimation* self, int param1) { } void QAbstractAnimation_connect_DirectionChanged(QAbstractAnimation* self, intptr_t slot) { - QAbstractAnimation::connect(self, static_cast(&QAbstractAnimation::directionChanged), self, [=](QAbstractAnimation::Direction param1) { + MiqtVirtualQAbstractAnimation::connect(self, static_cast(&QAbstractAnimation::directionChanged), self, [=](QAbstractAnimation::Direction param1) { QAbstractAnimation::Direction param1_ret = param1; int sigval1 = static_cast(param1_ret); miqt_exec_callback_QAbstractAnimation_DirectionChanged(slot, sigval1); @@ -209,9 +485,89 @@ void QAbstractAnimation_Start1(QAbstractAnimation* self, int policy) { self->start(static_cast(policy)); } +void QAbstractAnimation_override_virtual_Duration(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__Duration = slot; +} + +void QAbstractAnimation_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__Event = slot; +} + +bool QAbstractAnimation_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_Event(event); +} + +void QAbstractAnimation_override_virtual_UpdateCurrentTime(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__UpdateCurrentTime = slot; +} + +void QAbstractAnimation_override_virtual_UpdateState(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__UpdateState = slot; +} + +void QAbstractAnimation_virtualbase_UpdateState(void* self, int newState, int oldState) { + ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_UpdateState(newState, oldState); +} + +void QAbstractAnimation_override_virtual_UpdateDirection(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__UpdateDirection = slot; +} + +void QAbstractAnimation_virtualbase_UpdateDirection(void* self, int direction) { + ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_UpdateDirection(direction); +} + +void QAbstractAnimation_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractAnimation_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAbstractAnimation_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractAnimation_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractAnimation_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__ChildEvent = slot; +} + +void QAbstractAnimation_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_ChildEvent(event); +} + +void QAbstractAnimation_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__CustomEvent = slot; +} + +void QAbstractAnimation_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_CustomEvent(event); +} + +void QAbstractAnimation_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__ConnectNotify = slot; +} + +void QAbstractAnimation_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAbstractAnimation_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__DisconnectNotify = slot; +} + +void QAbstractAnimation_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAbstractAnimation_Delete(QAbstractAnimation* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qabstractanimation.go b/qt/gen_qabstractanimation.go index 7b269b8a..95205712 100644 --- a/qt/gen_qabstractanimation.go +++ b/qt/gen_qabstractanimation.go @@ -75,6 +75,28 @@ func UnsafeNewQAbstractAnimation(h unsafe.Pointer, h_QObject unsafe.Pointer) *QA QObject: UnsafeNewQObject(h_QObject)} } +// NewQAbstractAnimation constructs a new QAbstractAnimation object. +func NewQAbstractAnimation() *QAbstractAnimation { + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractAnimation_new(&outptr_QAbstractAnimation, &outptr_QObject) + ret := newQAbstractAnimation(outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractAnimation2 constructs a new QAbstractAnimation object. +func NewQAbstractAnimation2(parent *QObject) *QAbstractAnimation { + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractAnimation_new2(parent.cPointer(), &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQAbstractAnimation(outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractAnimation) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractAnimation_MetaObject(this.h))) } @@ -297,6 +319,253 @@ func QAbstractAnimation_TrUtf83(s string, c string, n int) string { func (this *QAbstractAnimation) Start1(policy QAbstractAnimation__DeletionPolicy) { C.QAbstractAnimation_Start1(this.h, (C.int)(policy)) } +func (this *QAbstractAnimation) OnDuration(slot func() int) { + C.QAbstractAnimation_override_virtual_Duration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_Duration +func miqt_exec_callback_QAbstractAnimation_Duration(self *C.QAbstractAnimation, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractAnimation) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAbstractAnimation_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractAnimation) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractAnimation_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_Event +func miqt_exec_callback_QAbstractAnimation_Event(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QAbstractAnimation) OnUpdateCurrentTime(slot func(currentTime int)) { + C.QAbstractAnimation_override_virtual_UpdateCurrentTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_UpdateCurrentTime +func miqt_exec_callback_QAbstractAnimation_UpdateCurrentTime(self *C.QAbstractAnimation, cb C.intptr_t, currentTime C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(currentTime int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(currentTime) + + gofunc(slotval1) + +} + +func (this *QAbstractAnimation) callVirtualBase_UpdateState(newState QAbstractAnimation__State, oldState QAbstractAnimation__State) { + + C.QAbstractAnimation_virtualbase_UpdateState(unsafe.Pointer(this.h), (C.int)(newState), (C.int)(oldState)) + +} +func (this *QAbstractAnimation) OnUpdateState(slot func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) { + C.QAbstractAnimation_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_UpdateState +func miqt_exec_callback_QAbstractAnimation_UpdateState(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_UpdateState, slotval1, slotval2) + +} + +func (this *QAbstractAnimation) callVirtualBase_UpdateDirection(direction QAbstractAnimation__Direction) { + + C.QAbstractAnimation_virtualbase_UpdateDirection(unsafe.Pointer(this.h), (C.int)(direction)) + +} +func (this *QAbstractAnimation) OnUpdateDirection(slot func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) { + C.QAbstractAnimation_override_virtual_UpdateDirection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_UpdateDirection +func miqt_exec_callback_QAbstractAnimation_UpdateDirection(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_UpdateDirection, slotval1) + +} + +func (this *QAbstractAnimation) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAbstractAnimation_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAbstractAnimation) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAbstractAnimation_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_EventFilter +func miqt_exec_callback_QAbstractAnimation_EventFilter(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractAnimation) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAbstractAnimation_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractAnimation) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAbstractAnimation_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_TimerEvent +func miqt_exec_callback_QAbstractAnimation_TimerEvent(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractAnimation) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAbstractAnimation_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractAnimation) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAbstractAnimation_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_ChildEvent +func miqt_exec_callback_QAbstractAnimation_ChildEvent(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAbstractAnimation) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAbstractAnimation_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractAnimation) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractAnimation_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_CustomEvent +func miqt_exec_callback_QAbstractAnimation_CustomEvent(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAbstractAnimation) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAbstractAnimation_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractAnimation) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractAnimation_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_ConnectNotify +func miqt_exec_callback_QAbstractAnimation_ConnectNotify(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAbstractAnimation) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAbstractAnimation_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractAnimation) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractAnimation_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_DisconnectNotify +func miqt_exec_callback_QAbstractAnimation_DisconnectNotify(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QAbstractAnimation) Delete() { diff --git a/qt/gen_qabstractanimation.h b/qt/gen_qabstractanimation.h index 3b7db252..080e51fb 100644 --- a/qt/gen_qabstractanimation.h +++ b/qt/gen_qabstractanimation.h @@ -36,6 +36,8 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif +void QAbstractAnimation_new(QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QAbstractAnimation_new2(QObject* parent, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); QMetaObject* QAbstractAnimation_MetaObject(const QAbstractAnimation* self); void* QAbstractAnimation_Metacast(QAbstractAnimation* self, const char* param1); struct miqt_string QAbstractAnimation_Tr(const char* s); @@ -74,6 +76,28 @@ 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_override_virtual_Duration(void* self, intptr_t slot); +int QAbstractAnimation_virtualbase_Duration(const void* self); +void QAbstractAnimation_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractAnimation_virtualbase_Event(void* self, QEvent* event); +void QAbstractAnimation_override_virtual_UpdateCurrentTime(void* self, intptr_t slot); +void QAbstractAnimation_virtualbase_UpdateCurrentTime(void* self, int currentTime); +void QAbstractAnimation_override_virtual_UpdateState(void* self, intptr_t slot); +void QAbstractAnimation_virtualbase_UpdateState(void* self, int newState, int oldState); +void QAbstractAnimation_override_virtual_UpdateDirection(void* self, intptr_t slot); +void QAbstractAnimation_virtualbase_UpdateDirection(void* self, int direction); +void QAbstractAnimation_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractAnimation_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAbstractAnimation_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractAnimation_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractAnimation_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAbstractAnimation_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAbstractAnimation_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAbstractAnimation_virtualbase_CustomEvent(void* self, QEvent* event); +void QAbstractAnimation_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAbstractAnimation_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAbstractAnimation_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAbstractAnimation_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractAnimation_Delete(QAbstractAnimation* self, bool isSubclass); void QAnimationDriver_new(QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject); diff --git a/qt/gen_qabstractbutton.cpp b/qt/gen_qabstractbutton.cpp index dc6b4c24..955e013a 100644 --- a/qt/gen_qabstractbutton.cpp +++ b/qt/gen_qabstractbutton.cpp @@ -1,26 +1,1132 @@ #include +#include #include +#include +#include +#include +#include +#include +#include +#include #include #include +#include #include +#include #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_qabstractbutton.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractButton : public virtual QAbstractButton { +public: + + MiqtVirtualQAbstractButton(QWidget* parent): QAbstractButton(parent) {}; + MiqtVirtualQAbstractButton(): QAbstractButton() {}; + + virtual ~MiqtVirtualQAbstractButton() = default; + + // 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) { + return; // Pure virtual, there is no base we can call + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // 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 QAbstractButton::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_QAbstractButton_HitButton(const_cast(this), handle__HitButton, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HitButton(QPoint* pos) const { + + return QAbstractButton::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) { + QAbstractButton::checkStateSet(); + return; + } + + + miqt_exec_callback_QAbstractButton_CheckStateSet(this, handle__CheckStateSet); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CheckStateSet() { + + QAbstractButton::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) { + QAbstractButton::nextCheckState(); + return; + } + + + miqt_exec_callback_QAbstractButton_NextCheckState(this, handle__NextCheckState); + + + } + + // Wrapper to allow calling protected method + void virtualbase_NextCheckState() { + + QAbstractButton::nextCheckState(); + + } + + // 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 QAbstractButton::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QAbstractButton_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QAbstractButton::event(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) { + QAbstractButton::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QAbstractButton::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) { + QAbstractButton::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QAbstractButton::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) { + QAbstractButton::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QAbstractButton::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) { + QAbstractButton::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QAbstractButton::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) { + QAbstractButton::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QAbstractButton::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) { + QAbstractButton::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QAbstractButton::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) { + QAbstractButton::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QAbstractButton::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) { + QAbstractButton::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QAbstractButton::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) { + QAbstractButton::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QAbstractButton::timerEvent(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 QAbstractButton::devType(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractButton_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QAbstractButton::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) { + QAbstractButton::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QAbstractButton_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QAbstractButton::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 QAbstractButton::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractButton_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QAbstractButton::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 QAbstractButton::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractButton_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QAbstractButton::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 QAbstractButton::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QAbstractButton_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 QAbstractButton::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 QAbstractButton::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractButton_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QAbstractButton::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 QAbstractButton::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QAbstractButton_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QAbstractButton::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) { + QAbstractButton::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QAbstractButton::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) { + QAbstractButton::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QAbstractButton::wheelEvent(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) { + QAbstractButton::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QAbstractButton::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) { + QAbstractButton::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QAbstractButton::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) { + QAbstractButton::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QAbstractButton::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) { + QAbstractButton::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QAbstractButton::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) { + QAbstractButton::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QAbstractButton::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) { + QAbstractButton::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QAbstractButton::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) { + QAbstractButton::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QAbstractButton::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) { + QAbstractButton::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QAbstractButton::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) { + QAbstractButton::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QAbstractButton::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) { + QAbstractButton::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QAbstractButton::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) { + QAbstractButton::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QAbstractButton::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) { + QAbstractButton::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QAbstractButton::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) { + QAbstractButton::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QAbstractButton::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) { + QAbstractButton::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QAbstractButton::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 QAbstractButton::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_QAbstractButton_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 QAbstractButton::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 QAbstractButton::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QAbstractButton_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 QAbstractButton::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) { + QAbstractButton::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QAbstractButton_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QAbstractButton::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 QAbstractButton::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QAbstractButton_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QAbstractButton::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 QAbstractButton::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QAbstractButton_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QAbstractButton::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) { + QAbstractButton::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractButton_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QAbstractButton::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 QAbstractButton::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QAbstractButton_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(QAbstractButton::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 QAbstractButton::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QAbstractButton_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QAbstractButton::focusNextPrevChild(next); + + } + +}; + +void QAbstractButton_new(QWidget* parent, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractButton* ret = new MiqtVirtualQAbstractButton(parent); + *outptr_QAbstractButton = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QAbstractButton_new2(QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractButton* ret = new MiqtVirtualQAbstractButton(); + *outptr_QAbstractButton = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + QMetaObject* QAbstractButton_MetaObject(const QAbstractButton* self) { return (QMetaObject*) self->metaObject(); } @@ -168,7 +1274,7 @@ void QAbstractButton_Pressed(QAbstractButton* self) { } void QAbstractButton_connect_Pressed(QAbstractButton* self, intptr_t slot) { - QAbstractButton::connect(self, static_cast(&QAbstractButton::pressed), self, [=]() { + MiqtVirtualQAbstractButton::connect(self, static_cast(&QAbstractButton::pressed), self, [=]() { miqt_exec_callback_QAbstractButton_Pressed(slot); }); } @@ -178,7 +1284,7 @@ void QAbstractButton_Released(QAbstractButton* self) { } void QAbstractButton_connect_Released(QAbstractButton* self, intptr_t slot) { - QAbstractButton::connect(self, static_cast(&QAbstractButton::released), self, [=]() { + MiqtVirtualQAbstractButton::connect(self, static_cast(&QAbstractButton::released), self, [=]() { miqt_exec_callback_QAbstractButton_Released(slot); }); } @@ -188,7 +1294,7 @@ void QAbstractButton_Clicked(QAbstractButton* self) { } void QAbstractButton_connect_Clicked(QAbstractButton* self, intptr_t slot) { - QAbstractButton::connect(self, static_cast(&QAbstractButton::clicked), self, [=]() { + MiqtVirtualQAbstractButton::connect(self, static_cast(&QAbstractButton::clicked), self, [=]() { miqt_exec_callback_QAbstractButton_Clicked(slot); }); } @@ -198,7 +1304,7 @@ void QAbstractButton_Toggled(QAbstractButton* self, bool checked) { } void QAbstractButton_connect_Toggled(QAbstractButton* self, intptr_t slot) { - QAbstractButton::connect(self, static_cast(&QAbstractButton::toggled), self, [=](bool checked) { + MiqtVirtualQAbstractButton::connect(self, static_cast(&QAbstractButton::toggled), self, [=](bool checked) { bool sigval1 = checked; miqt_exec_callback_QAbstractButton_Toggled(slot, sigval1); }); @@ -257,15 +1363,371 @@ void QAbstractButton_Clicked1(QAbstractButton* self, bool checked) { } void QAbstractButton_connect_Clicked1(QAbstractButton* self, intptr_t slot) { - QAbstractButton::connect(self, static_cast(&QAbstractButton::clicked), self, [=](bool checked) { + MiqtVirtualQAbstractButton::connect(self, static_cast(&QAbstractButton::clicked), self, [=](bool checked) { bool sigval1 = checked; miqt_exec_callback_QAbstractButton_Clicked1(slot, sigval1); }); } +void QAbstractButton_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__PaintEvent = slot; +} + +void QAbstractButton_override_virtual_HitButton(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__HitButton = slot; +} + +bool QAbstractButton_virtualbase_HitButton(const void* self, QPoint* pos) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_HitButton(pos); +} + +void QAbstractButton_override_virtual_CheckStateSet(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__CheckStateSet = slot; +} + +void QAbstractButton_virtualbase_CheckStateSet(void* self) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_CheckStateSet(); +} + +void QAbstractButton_override_virtual_NextCheckState(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__NextCheckState = slot; +} + +void QAbstractButton_virtualbase_NextCheckState(void* self) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_NextCheckState(); +} + +void QAbstractButton_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__Event = slot; +} + +bool QAbstractButton_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_Event(e); +} + +void QAbstractButton_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__KeyPressEvent = slot; +} + +void QAbstractButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QAbstractButton_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QAbstractButton_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QAbstractButton_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__MousePressEvent = slot; +} + +void QAbstractButton_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_MousePressEvent(e); +} + +void QAbstractButton_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QAbstractButton_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QAbstractButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__MouseMoveEvent = slot; +} + +void QAbstractButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QAbstractButton_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__FocusInEvent = slot; +} + +void QAbstractButton_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_FocusInEvent(e); +} + +void QAbstractButton_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__FocusOutEvent = slot; +} + +void QAbstractButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_FocusOutEvent(e); +} + +void QAbstractButton_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__ChangeEvent = slot; +} + +void QAbstractButton_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_ChangeEvent(e); +} + +void QAbstractButton_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractButton_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_TimerEvent(e); +} + +void QAbstractButton_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__DevType = slot; +} + +int QAbstractButton_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_DevType(); +} + +void QAbstractButton_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__SetVisible = slot; +} + +void QAbstractButton_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_SetVisible(visible); +} + +void QAbstractButton_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__SizeHint = slot; +} + +QSize* QAbstractButton_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_SizeHint(); +} + +void QAbstractButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QAbstractButton_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QAbstractButton_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__HeightForWidth = slot; +} + +int QAbstractButton_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QAbstractButton_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QAbstractButton_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QAbstractButton_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QAbstractButton_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_PaintEngine(); +} + +void QAbstractButton_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QAbstractButton_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QAbstractButton_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__WheelEvent = slot; +} + +void QAbstractButton_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_WheelEvent(event); +} + +void QAbstractButton_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__EnterEvent = slot; +} + +void QAbstractButton_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_EnterEvent(event); +} + +void QAbstractButton_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__LeaveEvent = slot; +} + +void QAbstractButton_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_LeaveEvent(event); +} + +void QAbstractButton_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__MoveEvent = slot; +} + +void QAbstractButton_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_MoveEvent(event); +} + +void QAbstractButton_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__ResizeEvent = slot; +} + +void QAbstractButton_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_ResizeEvent(event); +} + +void QAbstractButton_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__CloseEvent = slot; +} + +void QAbstractButton_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_CloseEvent(event); +} + +void QAbstractButton_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__ContextMenuEvent = slot; +} + +void QAbstractButton_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QAbstractButton_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__TabletEvent = slot; +} + +void QAbstractButton_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_TabletEvent(event); +} + +void QAbstractButton_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__ActionEvent = slot; +} + +void QAbstractButton_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_ActionEvent(event); +} + +void QAbstractButton_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__DragEnterEvent = slot; +} + +void QAbstractButton_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QAbstractButton_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__DragMoveEvent = slot; +} + +void QAbstractButton_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QAbstractButton_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__DragLeaveEvent = slot; +} + +void QAbstractButton_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QAbstractButton_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__DropEvent = slot; +} + +void QAbstractButton_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_DropEvent(event); +} + +void QAbstractButton_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__ShowEvent = slot; +} + +void QAbstractButton_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_ShowEvent(event); +} + +void QAbstractButton_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__HideEvent = slot; +} + +void QAbstractButton_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_HideEvent(event); +} + +void QAbstractButton_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__NativeEvent = slot; +} + +bool QAbstractButton_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QAbstractButton_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__Metric = slot; +} + +int QAbstractButton_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_Metric(param1); +} + +void QAbstractButton_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__InitPainter = slot; +} + +void QAbstractButton_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_InitPainter(painter); +} + +void QAbstractButton_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QAbstractButton_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_Redirected(offset); +} + +void QAbstractButton_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QAbstractButton_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_SharedPainter(); +} + +void QAbstractButton_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__InputMethodEvent = slot; +} + +void QAbstractButton_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QAbstractButton_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QAbstractButton_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QAbstractButton_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QAbstractButton_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_FocusNextPrevChild(next); +} + void QAbstractButton_Delete(QAbstractButton* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qabstractbutton.go b/qt/gen_qabstractbutton.go index 1b02ab77..b3d7aac9 100644 --- a/qt/gen_qabstractbutton.go +++ b/qt/gen_qabstractbutton.go @@ -53,6 +53,32 @@ func UnsafeNewQAbstractButton(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObj QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } +// NewQAbstractButton constructs a new QAbstractButton object. +func NewQAbstractButton(parent *QWidget) *QAbstractButton { + 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.QAbstractButton_new(parent.cPointer(), &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractButton(outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQAbstractButton2 constructs a new QAbstractButton object. +func NewQAbstractButton2() *QAbstractButton { + 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.QAbstractButton_new2(&outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractButton(outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + func (this *QAbstractButton) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractButton_MetaObject(this.h))) } @@ -340,6 +366,1055 @@ func miqt_exec_callback_QAbstractButton_Clicked1(cb C.intptr_t, checked C.bool) gofunc(slotval1) } +func (this *QAbstractButton) OnPaintEvent(slot func(e *QPaintEvent)) { + C.QAbstractButton_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_PaintEvent +func miqt_exec_callback_QAbstractButton_PaintEvent(self *C.QAbstractButton, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_HitButton(pos *QPoint) bool { + + return (bool)(C.QAbstractButton_virtualbase_HitButton(unsafe.Pointer(this.h), pos.cPointer())) + +} +func (this *QAbstractButton) OnHitButton(slot func(super func(pos *QPoint) bool, pos *QPoint) bool) { + C.QAbstractButton_override_virtual_HitButton(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_HitButton +func miqt_exec_callback_QAbstractButton_HitButton(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_HitButton, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractButton) callVirtualBase_CheckStateSet() { + + C.QAbstractButton_virtualbase_CheckStateSet(unsafe.Pointer(this.h)) + +} +func (this *QAbstractButton) OnCheckStateSet(slot func(super func())) { + C.QAbstractButton_override_virtual_CheckStateSet(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_CheckStateSet +func miqt_exec_callback_QAbstractButton_CheckStateSet(self *C.QAbstractButton, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractButton{h: self}).callVirtualBase_CheckStateSet) + +} + +func (this *QAbstractButton) callVirtualBase_NextCheckState() { + + C.QAbstractButton_virtualbase_NextCheckState(unsafe.Pointer(this.h)) + +} +func (this *QAbstractButton) OnNextCheckState(slot func(super func())) { + C.QAbstractButton_override_virtual_NextCheckState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_NextCheckState +func miqt_exec_callback_QAbstractButton_NextCheckState(self *C.QAbstractButton, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractButton{h: self}).callVirtualBase_NextCheckState) + +} + +func (this *QAbstractButton) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QAbstractButton_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QAbstractButton) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QAbstractButton_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_Event +func miqt_exec_callback_QAbstractButton_Event(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractButton) callVirtualBase_KeyPressEvent(e *QKeyEvent) { + + C.QAbstractButton_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnKeyPressEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QAbstractButton_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_KeyPressEvent +func miqt_exec_callback_QAbstractButton_KeyPressEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QAbstractButton_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QAbstractButton_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_KeyReleaseEvent +func miqt_exec_callback_QAbstractButton_KeyReleaseEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QAbstractButton_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QAbstractButton_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_MousePressEvent +func miqt_exec_callback_QAbstractButton_MousePressEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QAbstractButton_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QAbstractButton_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_MouseReleaseEvent +func miqt_exec_callback_QAbstractButton_MouseReleaseEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QAbstractButton_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QAbstractButton_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_MouseMoveEvent +func miqt_exec_callback_QAbstractButton_MouseMoveEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QAbstractButton_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QAbstractButton_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_FocusInEvent +func miqt_exec_callback_QAbstractButton_FocusInEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_FocusOutEvent(e *QFocusEvent) { + + C.QAbstractButton_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnFocusOutEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QAbstractButton_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_FocusOutEvent +func miqt_exec_callback_QAbstractButton_FocusOutEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QAbstractButton_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QAbstractButton_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_ChangeEvent +func miqt_exec_callback_QAbstractButton_ChangeEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QAbstractButton_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QAbstractButton_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_TimerEvent +func miqt_exec_callback_QAbstractButton_TimerEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_DevType() int { + + return (int)(C.QAbstractButton_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QAbstractButton) OnDevType(slot func(super func() int) int) { + C.QAbstractButton_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_DevType +func miqt_exec_callback_QAbstractButton_DevType(self *C.QAbstractButton, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractButton{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractButton) callVirtualBase_SetVisible(visible bool) { + + C.QAbstractButton_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QAbstractButton) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QAbstractButton_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_SetVisible +func miqt_exec_callback_QAbstractButton_SetVisible(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_SizeHint() *QSize { + + _ret := C.QAbstractButton_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 *QAbstractButton) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractButton_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_SizeHint +func miqt_exec_callback_QAbstractButton_SizeHint(self *C.QAbstractButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractButton{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractButton) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QAbstractButton_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 *QAbstractButton) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractButton_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_MinimumSizeHint +func miqt_exec_callback_QAbstractButton_MinimumSizeHint(self *C.QAbstractButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractButton{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractButton) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QAbstractButton_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QAbstractButton) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QAbstractButton_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_HeightForWidth +func miqt_exec_callback_QAbstractButton_HeightForWidth(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractButton) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QAbstractButton_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QAbstractButton) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QAbstractButton_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_HasHeightForWidth +func miqt_exec_callback_QAbstractButton_HasHeightForWidth(self *C.QAbstractButton, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractButton{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractButton) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QAbstractButton_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QAbstractButton) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QAbstractButton_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_PaintEngine +func miqt_exec_callback_QAbstractButton_PaintEngine(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractButton) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QAbstractButton_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractButton_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_MouseDoubleClickEvent +func miqt_exec_callback_QAbstractButton_MouseDoubleClickEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QAbstractButton_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QAbstractButton_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_WheelEvent +func miqt_exec_callback_QAbstractButton_WheelEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_EnterEvent(event *QEvent) { + + C.QAbstractButton_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnEnterEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractButton_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_EnterEvent +func miqt_exec_callback_QAbstractButton_EnterEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QAbstractButton_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractButton_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_LeaveEvent +func miqt_exec_callback_QAbstractButton_LeaveEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QAbstractButton_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QAbstractButton_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_MoveEvent +func miqt_exec_callback_QAbstractButton_MoveEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QAbstractButton_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QAbstractButton_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_ResizeEvent +func miqt_exec_callback_QAbstractButton_ResizeEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QAbstractButton_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QAbstractButton_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_CloseEvent +func miqt_exec_callback_QAbstractButton_CloseEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QAbstractButton_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QAbstractButton_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_ContextMenuEvent +func miqt_exec_callback_QAbstractButton_ContextMenuEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QAbstractButton_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QAbstractButton_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_TabletEvent +func miqt_exec_callback_QAbstractButton_TabletEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QAbstractButton_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QAbstractButton_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_ActionEvent +func miqt_exec_callback_QAbstractButton_ActionEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QAbstractButton_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QAbstractButton_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_DragEnterEvent +func miqt_exec_callback_QAbstractButton_DragEnterEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QAbstractButton_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QAbstractButton_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_DragMoveEvent +func miqt_exec_callback_QAbstractButton_DragMoveEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QAbstractButton_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QAbstractButton_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_DragLeaveEvent +func miqt_exec_callback_QAbstractButton_DragLeaveEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QAbstractButton_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QAbstractButton_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_DropEvent +func miqt_exec_callback_QAbstractButton_DropEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QAbstractButton_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QAbstractButton_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_ShowEvent +func miqt_exec_callback_QAbstractButton_ShowEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QAbstractButton_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QAbstractButton_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_HideEvent +func miqt_exec_callback_QAbstractButton_HideEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QAbstractButton) 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.QAbstractButton_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QAbstractButton) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QAbstractButton_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_NativeEvent +func miqt_exec_callback_QAbstractButton_NativeEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractButton) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QAbstractButton_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QAbstractButton) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QAbstractButton_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_Metric +func miqt_exec_callback_QAbstractButton_Metric(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractButton) callVirtualBase_InitPainter(painter *QPainter) { + + C.QAbstractButton_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QAbstractButton) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QAbstractButton_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_InitPainter +func miqt_exec_callback_QAbstractButton_InitPainter(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QAbstractButton_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QAbstractButton) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QAbstractButton_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_Redirected +func miqt_exec_callback_QAbstractButton_Redirected(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractButton) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QAbstractButton_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QAbstractButton) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QAbstractButton_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_SharedPainter +func miqt_exec_callback_QAbstractButton_SharedPainter(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractButton) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QAbstractButton_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractButton) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QAbstractButton_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_InputMethodEvent +func miqt_exec_callback_QAbstractButton_InputMethodEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QAbstractButton_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 *QAbstractButton) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QAbstractButton_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_InputMethodQuery +func miqt_exec_callback_QAbstractButton_InputMethodQuery(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractButton) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QAbstractButton_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QAbstractButton) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QAbstractButton_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_FocusNextPrevChild +func miqt_exec_callback_QAbstractButton_FocusNextPrevChild(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QAbstractButton) Delete() { C.QAbstractButton_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qabstractbutton.h b/qt/gen_qabstractbutton.h index 78c6d8d4..01952961 100644 --- a/qt/gen_qabstractbutton.h +++ b/qt/gen_qabstractbutton.h @@ -16,40 +16,78 @@ extern "C" { #ifdef __cplusplus class QAbstractButton; +class QActionEvent; class QButtonGroup; +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 QKeySequence; 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 QAbstractButton QAbstractButton; +typedef struct QActionEvent QActionEvent; typedef struct QButtonGroup QButtonGroup; +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 QKeySequence QKeySequence; 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 +void QAbstractButton_new(QWidget* parent, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QAbstractButton_new2(QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QAbstractButton_MetaObject(const QAbstractButton* self); void* QAbstractButton_Metacast(QAbstractButton* self, const char* param1); struct miqt_string QAbstractButton_Tr(const char* s); @@ -109,6 +147,96 @@ 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_override_virtual_PaintEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QAbstractButton_override_virtual_HitButton(void* self, intptr_t slot); +bool QAbstractButton_virtualbase_HitButton(const void* self, QPoint* pos); +void QAbstractButton_override_virtual_CheckStateSet(void* self, intptr_t slot); +void QAbstractButton_virtualbase_CheckStateSet(void* self); +void QAbstractButton_override_virtual_NextCheckState(void* self, intptr_t slot); +void QAbstractButton_virtualbase_NextCheckState(void* self); +void QAbstractButton_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractButton_virtualbase_Event(void* self, QEvent* e); +void QAbstractButton_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QAbstractButton_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QAbstractButton_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QAbstractButton_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QAbstractButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QAbstractButton_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QAbstractButton_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QAbstractButton_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_ChangeEvent(void* self, QEvent* e); +void QAbstractButton_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QAbstractButton_override_virtual_DevType(void* self, intptr_t slot); +int QAbstractButton_virtualbase_DevType(const void* self); +void QAbstractButton_override_virtual_SetVisible(void* self, intptr_t slot); +void QAbstractButton_virtualbase_SetVisible(void* self, bool visible); +void QAbstractButton_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QAbstractButton_virtualbase_SizeHint(const void* self); +void QAbstractButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QAbstractButton_virtualbase_MinimumSizeHint(const void* self); +void QAbstractButton_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QAbstractButton_virtualbase_HeightForWidth(const void* self, int param1); +void QAbstractButton_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QAbstractButton_virtualbase_HasHeightForWidth(const void* self); +void QAbstractButton_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QAbstractButton_virtualbase_PaintEngine(const void* self); +void QAbstractButton_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QAbstractButton_override_virtual_WheelEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QAbstractButton_override_virtual_EnterEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_EnterEvent(void* self, QEvent* event); +void QAbstractButton_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_LeaveEvent(void* self, QEvent* event); +void QAbstractButton_override_virtual_MoveEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QAbstractButton_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QAbstractButton_override_virtual_CloseEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QAbstractButton_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QAbstractButton_override_virtual_TabletEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QAbstractButton_override_virtual_ActionEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QAbstractButton_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QAbstractButton_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QAbstractButton_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QAbstractButton_override_virtual_DropEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_DropEvent(void* self, QDropEvent* event); +void QAbstractButton_override_virtual_ShowEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QAbstractButton_override_virtual_HideEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_HideEvent(void* self, QHideEvent* event); +void QAbstractButton_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QAbstractButton_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QAbstractButton_override_virtual_Metric(void* self, intptr_t slot); +int QAbstractButton_virtualbase_Metric(const void* self, int param1); +void QAbstractButton_override_virtual_InitPainter(void* self, intptr_t slot); +void QAbstractButton_virtualbase_InitPainter(const void* self, QPainter* painter); +void QAbstractButton_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QAbstractButton_virtualbase_Redirected(const void* self, QPoint* offset); +void QAbstractButton_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QAbstractButton_virtualbase_SharedPainter(const void* self); +void QAbstractButton_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QAbstractButton_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QAbstractButton_virtualbase_InputMethodQuery(const void* self, int param1); +void QAbstractButton_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QAbstractButton_virtualbase_FocusNextPrevChild(void* self, bool next); void QAbstractButton_Delete(QAbstractButton* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qabstracteventdispatcher.cpp b/qt/gen_qabstracteventdispatcher.cpp index 631137dc..21696d64 100644 --- a/qt/gen_qabstracteventdispatcher.cpp +++ b/qt/gen_qabstracteventdispatcher.cpp @@ -2,7 +2,10 @@ #define WORKAROUND_INNER_CLASS_DEFINITION_QAbstractEventDispatcher__TimerInfo #include #include +#include +#include #include +#include #include #include #include @@ -10,10 +13,449 @@ #include #include #include +#include #include #include "gen_qabstracteventdispatcher.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractEventDispatcher : public virtual QAbstractEventDispatcher { +public: + + MiqtVirtualQAbstractEventDispatcher(): QAbstractEventDispatcher() {}; + MiqtVirtualQAbstractEventDispatcher(QObject* parent): QAbstractEventDispatcher(parent) {}; + + virtual ~MiqtVirtualQAbstractEventDispatcher() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ProcessEvents = 0; + + // Subclass to allow providing a Go implementation + virtual bool processEvents(QEventLoop::ProcessEventsFlags flags) override { + if (handle__ProcessEvents == 0) { + return false; // Pure virtual, there is no base we can call + } + + QEventLoop::ProcessEventsFlags flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_ProcessEvents(this, handle__ProcessEvents, sigval1); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HasPendingEvents = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasPendingEvents() override { + if (handle__HasPendingEvents == 0) { + return false; // Pure virtual, there is no base we can call + } + + + bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_HasPendingEvents(this, handle__HasPendingEvents); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RegisterSocketNotifier = 0; + + // Subclass to allow providing a Go implementation + virtual void registerSocketNotifier(QSocketNotifier* notifier) override { + if (handle__RegisterSocketNotifier == 0) { + return; // Pure virtual, there is no base we can call + } + + QSocketNotifier* sigval1 = notifier; + + miqt_exec_callback_QAbstractEventDispatcher_RegisterSocketNotifier(this, handle__RegisterSocketNotifier, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UnregisterSocketNotifier = 0; + + // Subclass to allow providing a Go implementation + virtual void unregisterSocketNotifier(QSocketNotifier* notifier) override { + if (handle__UnregisterSocketNotifier == 0) { + return; // Pure virtual, there is no base we can call + } + + QSocketNotifier* sigval1 = notifier; + + miqt_exec_callback_QAbstractEventDispatcher_UnregisterSocketNotifier(this, handle__UnregisterSocketNotifier, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RegisterTimer2 = 0; + + // Subclass to allow providing a Go implementation + virtual void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject* object) override { + if (handle__RegisterTimer2 == 0) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = timerId; + int sigval2 = interval; + Qt::TimerType timerType_ret = timerType; + int sigval3 = static_cast(timerType_ret); + QObject* sigval4 = object; + + miqt_exec_callback_QAbstractEventDispatcher_RegisterTimer2(this, handle__RegisterTimer2, sigval1, sigval2, sigval3, sigval4); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UnregisterTimer = 0; + + // Subclass to allow providing a Go implementation + virtual bool unregisterTimer(int timerId) override { + if (handle__UnregisterTimer == 0) { + return false; // Pure virtual, there is no base we can call + } + + int sigval1 = timerId; + + bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimer(this, handle__UnregisterTimer, sigval1); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UnregisterTimers = 0; + + // Subclass to allow providing a Go implementation + virtual bool unregisterTimers(QObject* object) override { + if (handle__UnregisterTimers == 0) { + return false; // Pure virtual, there is no base we can call + } + + QObject* sigval1 = object; + + bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimers(this, handle__UnregisterTimers, sigval1); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RegisteredTimers = 0; + + // Subclass to allow providing a Go implementation + virtual QList registeredTimers(QObject* object) const override { + if (handle__RegisteredTimers == 0) { + return QList(); // Pure virtual, there is no base we can call + } + + QObject* sigval1 = object; + + struct miqt_array /* of QAbstractEventDispatcher__TimerInfo* */ callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_RegisteredTimers(const_cast(this), handle__RegisteredTimers, sigval1); + QList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QAbstractEventDispatcher__TimerInfo** 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; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemainingTime = 0; + + // Subclass to allow providing a Go implementation + virtual int remainingTime(int timerId) override { + if (handle__RemainingTime == 0) { + return 0; // Pure virtual, there is no base we can call + } + + int sigval1 = timerId; + + int callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_RemainingTime(this, handle__RemainingTime, sigval1); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WakeUp = 0; + + // Subclass to allow providing a Go implementation + virtual void wakeUp() override { + if (handle__WakeUp == 0) { + return; // Pure virtual, there is no base we can call + } + + + miqt_exec_callback_QAbstractEventDispatcher_WakeUp(this, handle__WakeUp); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Interrupt = 0; + + // Subclass to allow providing a Go implementation + virtual void interrupt() override { + if (handle__Interrupt == 0) { + return; // Pure virtual, there is no base we can call + } + + + miqt_exec_callback_QAbstractEventDispatcher_Interrupt(this, handle__Interrupt); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Flush = 0; + + // Subclass to allow providing a Go implementation + virtual void flush() override { + if (handle__Flush == 0) { + return; // Pure virtual, there is no base we can call + } + + + miqt_exec_callback_QAbstractEventDispatcher_Flush(this, handle__Flush); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartingUp = 0; + + // Subclass to allow providing a Go implementation + virtual void startingUp() override { + if (handle__StartingUp == 0) { + QAbstractEventDispatcher::startingUp(); + return; + } + + + miqt_exec_callback_QAbstractEventDispatcher_StartingUp(this, handle__StartingUp); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartingUp() { + + QAbstractEventDispatcher::startingUp(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ClosingDown = 0; + + // Subclass to allow providing a Go implementation + virtual void closingDown() override { + if (handle__ClosingDown == 0) { + QAbstractEventDispatcher::closingDown(); + return; + } + + + miqt_exec_callback_QAbstractEventDispatcher_ClosingDown(this, handle__ClosingDown); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ClosingDown() { + + QAbstractEventDispatcher::closingDown(); + + } + + // 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 QAbstractEventDispatcher::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAbstractEventDispatcher::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 QAbstractEventDispatcher::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAbstractEventDispatcher::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) { + QAbstractEventDispatcher::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractEventDispatcher_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractEventDispatcher::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) { + QAbstractEventDispatcher::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAbstractEventDispatcher_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAbstractEventDispatcher::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) { + QAbstractEventDispatcher::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractEventDispatcher_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAbstractEventDispatcher::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) { + QAbstractEventDispatcher::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractEventDispatcher_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAbstractEventDispatcher::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) { + QAbstractEventDispatcher::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractEventDispatcher_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAbstractEventDispatcher::disconnectNotify(*signal); + + } + +}; + +void QAbstractEventDispatcher_new(QAbstractEventDispatcher** outptr_QAbstractEventDispatcher, QObject** outptr_QObject) { + MiqtVirtualQAbstractEventDispatcher* ret = new MiqtVirtualQAbstractEventDispatcher(); + *outptr_QAbstractEventDispatcher = ret; + *outptr_QObject = static_cast(ret); +} + +void QAbstractEventDispatcher_new2(QObject* parent, QAbstractEventDispatcher** outptr_QAbstractEventDispatcher, QObject** outptr_QObject) { + MiqtVirtualQAbstractEventDispatcher* ret = new MiqtVirtualQAbstractEventDispatcher(parent); + *outptr_QAbstractEventDispatcher = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractEventDispatcher_MetaObject(const QAbstractEventDispatcher* self) { return (QMetaObject*) self->metaObject(); } @@ -135,7 +577,7 @@ void QAbstractEventDispatcher_AboutToBlock(QAbstractEventDispatcher* self) { } void QAbstractEventDispatcher_connect_AboutToBlock(QAbstractEventDispatcher* self, intptr_t slot) { - QAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::aboutToBlock), self, [=]() { + MiqtVirtualQAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::aboutToBlock), self, [=]() { miqt_exec_callback_QAbstractEventDispatcher_AboutToBlock(slot); }); } @@ -145,7 +587,7 @@ void QAbstractEventDispatcher_Awake(QAbstractEventDispatcher* self) { } void QAbstractEventDispatcher_connect_Awake(QAbstractEventDispatcher* self, intptr_t slot) { - QAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::awake), self, [=]() { + MiqtVirtualQAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::awake), self, [=]() { miqt_exec_callback_QAbstractEventDispatcher_Awake(slot); }); } @@ -198,9 +640,129 @@ QAbstractEventDispatcher* QAbstractEventDispatcher_Instance1(QThread* thread) { return QAbstractEventDispatcher::instance(thread); } +void QAbstractEventDispatcher_override_virtual_ProcessEvents(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__ProcessEvents = slot; +} + +void QAbstractEventDispatcher_override_virtual_HasPendingEvents(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__HasPendingEvents = slot; +} + +void QAbstractEventDispatcher_override_virtual_RegisterSocketNotifier(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__RegisterSocketNotifier = slot; +} + +void QAbstractEventDispatcher_override_virtual_UnregisterSocketNotifier(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__UnregisterSocketNotifier = slot; +} + +void QAbstractEventDispatcher_override_virtual_RegisterTimer2(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__RegisterTimer2 = slot; +} + +void QAbstractEventDispatcher_override_virtual_UnregisterTimer(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__UnregisterTimer = slot; +} + +void QAbstractEventDispatcher_override_virtual_UnregisterTimers(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__UnregisterTimers = slot; +} + +void QAbstractEventDispatcher_override_virtual_RegisteredTimers(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__RegisteredTimers = slot; +} + +void QAbstractEventDispatcher_override_virtual_RemainingTime(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__RemainingTime = slot; +} + +void QAbstractEventDispatcher_override_virtual_WakeUp(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__WakeUp = slot; +} + +void QAbstractEventDispatcher_override_virtual_Interrupt(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__Interrupt = slot; +} + +void QAbstractEventDispatcher_override_virtual_Flush(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__Flush = slot; +} + +void QAbstractEventDispatcher_override_virtual_StartingUp(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__StartingUp = slot; +} + +void QAbstractEventDispatcher_virtualbase_StartingUp(void* self) { + ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_StartingUp(); +} + +void QAbstractEventDispatcher_override_virtual_ClosingDown(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__ClosingDown = slot; +} + +void QAbstractEventDispatcher_virtualbase_ClosingDown(void* self) { + ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_ClosingDown(); +} + +void QAbstractEventDispatcher_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__Event = slot; +} + +bool QAbstractEventDispatcher_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_Event(event); +} + +void QAbstractEventDispatcher_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractEventDispatcher_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAbstractEventDispatcher_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractEventDispatcher_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractEventDispatcher_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__ChildEvent = slot; +} + +void QAbstractEventDispatcher_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_ChildEvent(event); +} + +void QAbstractEventDispatcher_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__CustomEvent = slot; +} + +void QAbstractEventDispatcher_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_CustomEvent(event); +} + +void QAbstractEventDispatcher_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__ConnectNotify = slot; +} + +void QAbstractEventDispatcher_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAbstractEventDispatcher_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__DisconnectNotify = slot; +} + +void QAbstractEventDispatcher_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qabstracteventdispatcher.go b/qt/gen_qabstracteventdispatcher.go index 2ec38550..2486dfe0 100644 --- a/qt/gen_qabstracteventdispatcher.go +++ b/qt/gen_qabstracteventdispatcher.go @@ -53,6 +53,28 @@ func UnsafeNewQAbstractEventDispatcher(h unsafe.Pointer, h_QObject unsafe.Pointe QObject: UnsafeNewQObject(h_QObject)} } +// NewQAbstractEventDispatcher constructs a new QAbstractEventDispatcher object. +func NewQAbstractEventDispatcher() *QAbstractEventDispatcher { + var outptr_QAbstractEventDispatcher *C.QAbstractEventDispatcher = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractEventDispatcher_new(&outptr_QAbstractEventDispatcher, &outptr_QObject) + ret := newQAbstractEventDispatcher(outptr_QAbstractEventDispatcher, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractEventDispatcher2 constructs a new QAbstractEventDispatcher object. +func NewQAbstractEventDispatcher2(parent *QObject) *QAbstractEventDispatcher { + var outptr_QAbstractEventDispatcher *C.QAbstractEventDispatcher = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractEventDispatcher_new2(parent.cPointer(), &outptr_QAbstractEventDispatcher, &outptr_QObject) + ret := newQAbstractEventDispatcher(outptr_QAbstractEventDispatcher, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractEventDispatcher) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractEventDispatcher_MetaObject(this.h))) } @@ -250,6 +272,428 @@ 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())), nil) } +func (this *QAbstractEventDispatcher) OnProcessEvents(slot func(flags QEventLoop__ProcessEventsFlag) bool) { + C.QAbstractEventDispatcher_override_virtual_ProcessEvents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_ProcessEvents +func miqt_exec_callback_QAbstractEventDispatcher_ProcessEvents(self *C.QAbstractEventDispatcher, cb C.intptr_t, flags C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(flags QEventLoop__ProcessEventsFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QEventLoop__ProcessEventsFlag)(flags) + + virtualReturn := gofunc(slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QAbstractEventDispatcher) OnHasPendingEvents(slot func() bool) { + C.QAbstractEventDispatcher_override_virtual_HasPendingEvents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_HasPendingEvents +func miqt_exec_callback_QAbstractEventDispatcher_HasPendingEvents(self *C.QAbstractEventDispatcher, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func() bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.bool)(virtualReturn) + +} +func (this *QAbstractEventDispatcher) OnRegisterSocketNotifier(slot func(notifier *QSocketNotifier)) { + C.QAbstractEventDispatcher_override_virtual_RegisterSocketNotifier(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_RegisterSocketNotifier +func miqt_exec_callback_QAbstractEventDispatcher_RegisterSocketNotifier(self *C.QAbstractEventDispatcher, cb C.intptr_t, notifier *C.QSocketNotifier) { + gofunc, ok := cgo.Handle(cb).Value().(func(notifier *QSocketNotifier)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQSocketNotifier(unsafe.Pointer(notifier), nil) + + gofunc(slotval1) + +} +func (this *QAbstractEventDispatcher) OnUnregisterSocketNotifier(slot func(notifier *QSocketNotifier)) { + C.QAbstractEventDispatcher_override_virtual_UnregisterSocketNotifier(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_UnregisterSocketNotifier +func miqt_exec_callback_QAbstractEventDispatcher_UnregisterSocketNotifier(self *C.QAbstractEventDispatcher, cb C.intptr_t, notifier *C.QSocketNotifier) { + gofunc, ok := cgo.Handle(cb).Value().(func(notifier *QSocketNotifier)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQSocketNotifier(unsafe.Pointer(notifier), nil) + + gofunc(slotval1) + +} +func (this *QAbstractEventDispatcher) OnRegisterTimer2(slot func(timerId int, interval int, timerType TimerType, object *QObject)) { + C.QAbstractEventDispatcher_override_virtual_RegisterTimer2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_RegisterTimer2 +func miqt_exec_callback_QAbstractEventDispatcher_RegisterTimer2(self *C.QAbstractEventDispatcher, cb C.intptr_t, timerId C.int, interval C.int, timerType C.int, object *C.QObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(timerId int, interval int, timerType TimerType, object *QObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(timerId) + + slotval2 := (int)(interval) + + slotval3 := (TimerType)(timerType) + + slotval4 := UnsafeNewQObject(unsafe.Pointer(object)) + + gofunc(slotval1, slotval2, slotval3, slotval4) + +} +func (this *QAbstractEventDispatcher) OnUnregisterTimer(slot func(timerId int) bool) { + C.QAbstractEventDispatcher_override_virtual_UnregisterTimer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimer +func miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimer(self *C.QAbstractEventDispatcher, cb C.intptr_t, timerId C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(timerId int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(timerId) + + virtualReturn := gofunc(slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QAbstractEventDispatcher) OnUnregisterTimers(slot func(object *QObject) bool) { + C.QAbstractEventDispatcher_override_virtual_UnregisterTimers(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimers +func miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimers(self *C.QAbstractEventDispatcher, cb C.intptr_t, object *C.QObject) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(object *QObject) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + + virtualReturn := gofunc(slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QAbstractEventDispatcher) OnRegisteredTimers(slot func(object *QObject) []QAbstractEventDispatcher__TimerInfo) { + C.QAbstractEventDispatcher_override_virtual_RegisteredTimers(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_RegisteredTimers +func miqt_exec_callback_QAbstractEventDispatcher_RegisteredTimers(self *C.QAbstractEventDispatcher, cb C.intptr_t, object *C.QObject) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(object *QObject) []QAbstractEventDispatcher__TimerInfo) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + + virtualReturn := gofunc(slotval1) + virtualReturn_CArray := (*[0xffff]*C.QAbstractEventDispatcher__TimerInfo)(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 *QAbstractEventDispatcher) OnRemainingTime(slot func(timerId int) int) { + C.QAbstractEventDispatcher_override_virtual_RemainingTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_RemainingTime +func miqt_exec_callback_QAbstractEventDispatcher_RemainingTime(self *C.QAbstractEventDispatcher, cb C.intptr_t, timerId C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(timerId int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(timerId) + + virtualReturn := gofunc(slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractEventDispatcher) OnWakeUp(slot func()) { + C.QAbstractEventDispatcher_override_virtual_WakeUp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_WakeUp +func miqt_exec_callback_QAbstractEventDispatcher_WakeUp(self *C.QAbstractEventDispatcher, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() + +} +func (this *QAbstractEventDispatcher) OnInterrupt(slot func()) { + C.QAbstractEventDispatcher_override_virtual_Interrupt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_Interrupt +func miqt_exec_callback_QAbstractEventDispatcher_Interrupt(self *C.QAbstractEventDispatcher, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() + +} +func (this *QAbstractEventDispatcher) OnFlush(slot func()) { + C.QAbstractEventDispatcher_override_virtual_Flush(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_Flush +func miqt_exec_callback_QAbstractEventDispatcher_Flush(self *C.QAbstractEventDispatcher, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_StartingUp() { + + C.QAbstractEventDispatcher_virtualbase_StartingUp(unsafe.Pointer(this.h)) + +} +func (this *QAbstractEventDispatcher) OnStartingUp(slot func(super func())) { + C.QAbstractEventDispatcher_override_virtual_StartingUp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_StartingUp +func miqt_exec_callback_QAbstractEventDispatcher_StartingUp(self *C.QAbstractEventDispatcher, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractEventDispatcher{h: self}).callVirtualBase_StartingUp) + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_ClosingDown() { + + C.QAbstractEventDispatcher_virtualbase_ClosingDown(unsafe.Pointer(this.h)) + +} +func (this *QAbstractEventDispatcher) OnClosingDown(slot func(super func())) { + C.QAbstractEventDispatcher_override_virtual_ClosingDown(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_ClosingDown +func miqt_exec_callback_QAbstractEventDispatcher_ClosingDown(self *C.QAbstractEventDispatcher, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractEventDispatcher{h: self}).callVirtualBase_ClosingDown) + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAbstractEventDispatcher_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractEventDispatcher) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractEventDispatcher_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_Event +func miqt_exec_callback_QAbstractEventDispatcher_Event(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAbstractEventDispatcher_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAbstractEventDispatcher) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAbstractEventDispatcher_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_EventFilter +func miqt_exec_callback_QAbstractEventDispatcher_EventFilter(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAbstractEventDispatcher_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractEventDispatcher) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAbstractEventDispatcher_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_TimerEvent +func miqt_exec_callback_QAbstractEventDispatcher_TimerEvent(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAbstractEventDispatcher_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractEventDispatcher) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAbstractEventDispatcher_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_ChildEvent +func miqt_exec_callback_QAbstractEventDispatcher_ChildEvent(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAbstractEventDispatcher_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractEventDispatcher) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractEventDispatcher_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_CustomEvent +func miqt_exec_callback_QAbstractEventDispatcher_CustomEvent(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAbstractEventDispatcher_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractEventDispatcher) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractEventDispatcher_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_ConnectNotify +func miqt_exec_callback_QAbstractEventDispatcher_ConnectNotify(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAbstractEventDispatcher_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractEventDispatcher) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractEventDispatcher_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_DisconnectNotify +func miqt_exec_callback_QAbstractEventDispatcher_DisconnectNotify(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QAbstractEventDispatcher) Delete() { diff --git a/qt/gen_qabstracteventdispatcher.h b/qt/gen_qabstracteventdispatcher.h index 04339830..1b3e50a9 100644 --- a/qt/gen_qabstracteventdispatcher.h +++ b/qt/gen_qabstracteventdispatcher.h @@ -23,21 +23,31 @@ class QAbstractEventDispatcher__TimerInfo; #endif class QAbstractNativeEventFilter; class QByteArray; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSocketNotifier; class QThread; +class QTimerEvent; #else typedef struct QAbstractEventDispatcher QAbstractEventDispatcher; typedef struct QAbstractEventDispatcher__TimerInfo QAbstractEventDispatcher__TimerInfo; typedef struct QAbstractNativeEventFilter QAbstractNativeEventFilter; typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSocketNotifier QSocketNotifier; typedef struct QThread QThread; +typedef struct QTimerEvent QTimerEvent; #endif +void QAbstractEventDispatcher_new(QAbstractEventDispatcher** outptr_QAbstractEventDispatcher, QObject** outptr_QObject); +void QAbstractEventDispatcher_new2(QObject* parent, QAbstractEventDispatcher** outptr_QAbstractEventDispatcher, QObject** outptr_QObject); QMetaObject* QAbstractEventDispatcher_MetaObject(const QAbstractEventDispatcher* self); void* QAbstractEventDispatcher_Metacast(QAbstractEventDispatcher* self, const char* param1); struct miqt_string QAbstractEventDispatcher_Tr(const char* s); @@ -70,6 +80,48 @@ 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_override_virtual_ProcessEvents(void* self, intptr_t slot); +bool QAbstractEventDispatcher_virtualbase_ProcessEvents(void* self, int flags); +void QAbstractEventDispatcher_override_virtual_HasPendingEvents(void* self, intptr_t slot); +bool QAbstractEventDispatcher_virtualbase_HasPendingEvents(void* self); +void QAbstractEventDispatcher_override_virtual_RegisterSocketNotifier(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_RegisterSocketNotifier(void* self, QSocketNotifier* notifier); +void QAbstractEventDispatcher_override_virtual_UnregisterSocketNotifier(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_UnregisterSocketNotifier(void* self, QSocketNotifier* notifier); +void QAbstractEventDispatcher_override_virtual_RegisterTimer2(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_RegisterTimer2(void* self, int timerId, int interval, int timerType, QObject* object); +void QAbstractEventDispatcher_override_virtual_UnregisterTimer(void* self, intptr_t slot); +bool QAbstractEventDispatcher_virtualbase_UnregisterTimer(void* self, int timerId); +void QAbstractEventDispatcher_override_virtual_UnregisterTimers(void* self, intptr_t slot); +bool QAbstractEventDispatcher_virtualbase_UnregisterTimers(void* self, QObject* object); +void QAbstractEventDispatcher_override_virtual_RegisteredTimers(void* self, intptr_t slot); +struct miqt_array /* of QAbstractEventDispatcher__TimerInfo* */ QAbstractEventDispatcher_virtualbase_RegisteredTimers(const void* self, QObject* object); +void QAbstractEventDispatcher_override_virtual_RemainingTime(void* self, intptr_t slot); +int QAbstractEventDispatcher_virtualbase_RemainingTime(void* self, int timerId); +void QAbstractEventDispatcher_override_virtual_WakeUp(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_WakeUp(void* self); +void QAbstractEventDispatcher_override_virtual_Interrupt(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_Interrupt(void* self); +void QAbstractEventDispatcher_override_virtual_Flush(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_Flush(void* self); +void QAbstractEventDispatcher_override_virtual_StartingUp(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_StartingUp(void* self); +void QAbstractEventDispatcher_override_virtual_ClosingDown(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_ClosingDown(void* self); +void QAbstractEventDispatcher_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractEventDispatcher_virtualbase_Event(void* self, QEvent* event); +void QAbstractEventDispatcher_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractEventDispatcher_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAbstractEventDispatcher_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractEventDispatcher_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAbstractEventDispatcher_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_CustomEvent(void* self, QEvent* event); +void QAbstractEventDispatcher_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAbstractEventDispatcher_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubclass); void QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t, QAbstractEventDispatcher__TimerInfo** outptr_QAbstractEventDispatcher__TimerInfo); diff --git a/qt/gen_qabstractitemdelegate.cpp b/qt/gen_qabstractitemdelegate.cpp index b655bc1f..46f0b332 100644 --- a/qt/gen_qabstractitemdelegate.cpp +++ b/qt/gen_qabstractitemdelegate.cpp @@ -1,10 +1,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -14,11 +16,486 @@ #include #include #include +#include #include #include #include "gen_qabstractitemdelegate.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractItemDelegate : public virtual QAbstractItemDelegate { +public: + + MiqtVirtualQAbstractItemDelegate(): QAbstractItemDelegate() {}; + MiqtVirtualQAbstractItemDelegate(QObject* parent): QAbstractItemDelegate(parent) {}; + + virtual ~MiqtVirtualQAbstractItemDelegate() = 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) { + return; // Pure virtual, there is no base we can call + } + + 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_QAbstractItemDelegate_Paint(const_cast(this), handle__Paint, sigval1, sigval2, sigval3); + + + } + + // 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 QSize(); // Pure virtual, there is no base we can call + } + + 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_QAbstractItemDelegate_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // 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 QAbstractItemDelegate::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_QAbstractItemDelegate_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 QAbstractItemDelegate::createEditor(parent, *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) { + QAbstractItemDelegate::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_QAbstractItemDelegate_DestroyEditor(const_cast(this), handle__DestroyEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DestroyEditor(QWidget* editor, QModelIndex* index) const { + + QAbstractItemDelegate::destroyEditor(editor, *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) { + QAbstractItemDelegate::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_QAbstractItemDelegate_SetEditorData(const_cast(this), handle__SetEditorData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditorData(QWidget* editor, QModelIndex* index) const { + + QAbstractItemDelegate::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) { + QAbstractItemDelegate::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_QAbstractItemDelegate_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 { + + QAbstractItemDelegate::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) { + QAbstractItemDelegate::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_QAbstractItemDelegate_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 { + + QAbstractItemDelegate::updateEditorGeometry(editor, *option, *index); + + } + + // 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 QAbstractItemDelegate::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_QAbstractItemDelegate_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 QAbstractItemDelegate::editorEvent(event, model, *option, *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 QAbstractItemDelegate::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_QAbstractItemDelegate_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 QAbstractItemDelegate::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 QAbstractItemDelegate::paintingRoles(); + } + + + struct miqt_array /* of int */ callback_return_value = miqt_exec_callback_QAbstractItemDelegate_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 = QAbstractItemDelegate::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; + + } + + // 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 QAbstractItemDelegate::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractItemDelegate_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAbstractItemDelegate::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 QAbstractItemDelegate::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractItemDelegate_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAbstractItemDelegate::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) { + QAbstractItemDelegate::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemDelegate_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractItemDelegate::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) { + QAbstractItemDelegate::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemDelegate_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAbstractItemDelegate::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) { + QAbstractItemDelegate::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemDelegate_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAbstractItemDelegate::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) { + QAbstractItemDelegate::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractItemDelegate_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAbstractItemDelegate::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) { + QAbstractItemDelegate::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractItemDelegate_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAbstractItemDelegate::disconnectNotify(*signal); + + } + +}; + +void QAbstractItemDelegate_new(QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { + MiqtVirtualQAbstractItemDelegate* ret = new MiqtVirtualQAbstractItemDelegate(); + *outptr_QAbstractItemDelegate = ret; + *outptr_QObject = static_cast(ret); +} + +void QAbstractItemDelegate_new2(QObject* parent, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { + MiqtVirtualQAbstractItemDelegate* ret = new MiqtVirtualQAbstractItemDelegate(parent); + *outptr_QAbstractItemDelegate = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractItemDelegate_MetaObject(const QAbstractItemDelegate* self) { return (QMetaObject*) self->metaObject(); } @@ -115,7 +592,7 @@ void QAbstractItemDelegate_CommitData(QAbstractItemDelegate* self, QWidget* edit } void QAbstractItemDelegate_connect_CommitData(QAbstractItemDelegate* self, intptr_t slot) { - QAbstractItemDelegate::connect(self, static_cast(&QAbstractItemDelegate::commitData), self, [=](QWidget* editor) { + MiqtVirtualQAbstractItemDelegate::connect(self, static_cast(&QAbstractItemDelegate::commitData), self, [=](QWidget* editor) { QWidget* sigval1 = editor; miqt_exec_callback_QAbstractItemDelegate_CommitData(slot, sigval1); }); @@ -126,7 +603,7 @@ void QAbstractItemDelegate_CloseEditor(QAbstractItemDelegate* self, QWidget* edi } void QAbstractItemDelegate_connect_CloseEditor(QAbstractItemDelegate* self, intptr_t slot) { - QAbstractItemDelegate::connect(self, static_cast(&QAbstractItemDelegate::closeEditor), self, [=](QWidget* editor) { + MiqtVirtualQAbstractItemDelegate::connect(self, static_cast(&QAbstractItemDelegate::closeEditor), self, [=](QWidget* editor) { QWidget* sigval1 = editor; miqt_exec_callback_QAbstractItemDelegate_CloseEditor(slot, sigval1); }); @@ -137,7 +614,7 @@ void QAbstractItemDelegate_SizeHintChanged(QAbstractItemDelegate* self, QModelIn } void QAbstractItemDelegate_connect_SizeHintChanged(QAbstractItemDelegate* self, intptr_t slot) { - QAbstractItemDelegate::connect(self, static_cast(&QAbstractItemDelegate::sizeHintChanged), self, [=](const QModelIndex& param1) { + MiqtVirtualQAbstractItemDelegate::connect(self, static_cast(&QAbstractItemDelegate::sizeHintChanged), self, [=](const QModelIndex& param1) { const QModelIndex& param1_ret = param1; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(¶m1_ret); @@ -194,7 +671,7 @@ void QAbstractItemDelegate_CloseEditor2(QAbstractItemDelegate* self, QWidget* ed } void QAbstractItemDelegate_connect_CloseEditor2(QAbstractItemDelegate* self, intptr_t slot) { - QAbstractItemDelegate::connect(self, static_cast(&QAbstractItemDelegate::closeEditor), self, [=](QWidget* editor, QAbstractItemDelegate::EndEditHint hint) { + MiqtVirtualQAbstractItemDelegate::connect(self, static_cast(&QAbstractItemDelegate::closeEditor), self, [=](QWidget* editor, QAbstractItemDelegate::EndEditHint hint) { QWidget* sigval1 = editor; QAbstractItemDelegate::EndEditHint hint_ret = hint; int sigval2 = static_cast(hint_ret); @@ -202,9 +679,137 @@ void QAbstractItemDelegate_connect_CloseEditor2(QAbstractItemDelegate* self, int }); } +void QAbstractItemDelegate_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__Paint = slot; +} + +void QAbstractItemDelegate_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__SizeHint = slot; +} + +void QAbstractItemDelegate_override_virtual_CreateEditor(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__CreateEditor = slot; +} + +QWidget* QAbstractItemDelegate_virtualbase_CreateEditor(const void* self, QWidget* parent, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_CreateEditor(parent, option, index); +} + +void QAbstractItemDelegate_override_virtual_DestroyEditor(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__DestroyEditor = slot; +} + +void QAbstractItemDelegate_virtualbase_DestroyEditor(const void* self, QWidget* editor, QModelIndex* index) { + ( (const MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_DestroyEditor(editor, index); +} + +void QAbstractItemDelegate_override_virtual_SetEditorData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__SetEditorData = slot; +} + +void QAbstractItemDelegate_virtualbase_SetEditorData(const void* self, QWidget* editor, QModelIndex* index) { + ( (const MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_SetEditorData(editor, index); +} + +void QAbstractItemDelegate_override_virtual_SetModelData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__SetModelData = slot; +} + +void QAbstractItemDelegate_virtualbase_SetModelData(const void* self, QWidget* editor, QAbstractItemModel* model, QModelIndex* index) { + ( (const MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_SetModelData(editor, model, index); +} + +void QAbstractItemDelegate_override_virtual_UpdateEditorGeometry(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__UpdateEditorGeometry = slot; +} + +void QAbstractItemDelegate_virtualbase_UpdateEditorGeometry(const void* self, QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index) { + ( (const MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_UpdateEditorGeometry(editor, option, index); +} + +void QAbstractItemDelegate_override_virtual_EditorEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__EditorEvent = slot; +} + +bool QAbstractItemDelegate_virtualbase_EditorEvent(void* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_EditorEvent(event, model, option, index); +} + +void QAbstractItemDelegate_override_virtual_HelpEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__HelpEvent = slot; +} + +bool QAbstractItemDelegate_virtualbase_HelpEvent(void* self, QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_HelpEvent(event, view, option, index); +} + +void QAbstractItemDelegate_override_virtual_PaintingRoles(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__PaintingRoles = slot; +} + +struct miqt_array /* of int */ QAbstractItemDelegate_virtualbase_PaintingRoles(const void* self) { + return ( (const MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_PaintingRoles(); +} + +void QAbstractItemDelegate_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__Event = slot; +} + +bool QAbstractItemDelegate_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_Event(event); +} + +void QAbstractItemDelegate_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractItemDelegate_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAbstractItemDelegate_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractItemDelegate_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractItemDelegate_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__ChildEvent = slot; +} + +void QAbstractItemDelegate_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_ChildEvent(event); +} + +void QAbstractItemDelegate_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__CustomEvent = slot; +} + +void QAbstractItemDelegate_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_CustomEvent(event); +} + +void QAbstractItemDelegate_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__ConnectNotify = slot; +} + +void QAbstractItemDelegate_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAbstractItemDelegate_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__DisconnectNotify = slot; +} + +void QAbstractItemDelegate_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAbstractItemDelegate_Delete(QAbstractItemDelegate* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qabstractitemdelegate.go b/qt/gen_qabstractitemdelegate.go index ce55fac5..0a663157 100644 --- a/qt/gen_qabstractitemdelegate.go +++ b/qt/gen_qabstractitemdelegate.go @@ -63,6 +63,28 @@ func UnsafeNewQAbstractItemDelegate(h unsafe.Pointer, h_QObject unsafe.Pointer) QObject: UnsafeNewQObject(h_QObject)} } +// NewQAbstractItemDelegate constructs a new QAbstractItemDelegate object. +func NewQAbstractItemDelegate() *QAbstractItemDelegate { + var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractItemDelegate_new(&outptr_QAbstractItemDelegate, &outptr_QObject) + ret := newQAbstractItemDelegate(outptr_QAbstractItemDelegate, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractItemDelegate2 constructs a new QAbstractItemDelegate object. +func NewQAbstractItemDelegate2(parent *QObject) *QAbstractItemDelegate { + var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractItemDelegate_new2(parent.cPointer(), &outptr_QAbstractItemDelegate, &outptr_QObject) + ret := newQAbstractItemDelegate(outptr_QAbstractItemDelegate, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractItemDelegate) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractItemDelegate_MetaObject(this.h))) } @@ -276,6 +298,426 @@ func miqt_exec_callback_QAbstractItemDelegate_CloseEditor2(cb C.intptr_t, editor gofunc(slotval1, slotval2) } +func (this *QAbstractItemDelegate) OnPaint(slot func(painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex)) { + C.QAbstractItemDelegate_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_Paint +func miqt_exec_callback_QAbstractItemDelegate_Paint(self *C.QAbstractItemDelegate, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionViewItem, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + +} +func (this *QAbstractItemDelegate) OnSizeHint(slot func(option *QStyleOptionViewItem, index *QModelIndex) *QSize) { + C.QAbstractItemDelegate_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_SizeHint +func miqt_exec_callback_QAbstractItemDelegate_SizeHint(self *C.QAbstractItemDelegate, cb C.intptr_t, option *C.QStyleOptionViewItem, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemDelegate) callVirtualBase_CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer())), nil, nil) +} +func (this *QAbstractItemDelegate) OnCreateEditor(slot func(super func(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget, parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget) { + C.QAbstractItemDelegate_override_virtual_CreateEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_CreateEditor +func miqt_exec_callback_QAbstractItemDelegate_CreateEditor(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_CreateEditor, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemDelegate) callVirtualBase_DestroyEditor(editor *QWidget, index *QModelIndex) { + + C.QAbstractItemDelegate_virtualbase_DestroyEditor(unsafe.Pointer(this.h), editor.cPointer(), index.cPointer()) + +} +func (this *QAbstractItemDelegate) OnDestroyEditor(slot func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) { + C.QAbstractItemDelegate_override_virtual_DestroyEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_DestroyEditor +func miqt_exec_callback_QAbstractItemDelegate_DestroyEditor(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_DestroyEditor, slotval1, slotval2) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_SetEditorData(editor *QWidget, index *QModelIndex) { + + C.QAbstractItemDelegate_virtualbase_SetEditorData(unsafe.Pointer(this.h), editor.cPointer(), index.cPointer()) + +} +func (this *QAbstractItemDelegate) OnSetEditorData(slot func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) { + C.QAbstractItemDelegate_override_virtual_SetEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_SetEditorData +func miqt_exec_callback_QAbstractItemDelegate_SetEditorData(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_SetEditorData, slotval1, slotval2) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_SetModelData(editor *QWidget, model *QAbstractItemModel, index *QModelIndex) { + + C.QAbstractItemDelegate_virtualbase_SetModelData(unsafe.Pointer(this.h), editor.cPointer(), model.cPointer(), index.cPointer()) + +} +func (this *QAbstractItemDelegate) OnSetModelData(slot func(super func(editor *QWidget, model *QAbstractItemModel, index *QModelIndex), editor *QWidget, model *QAbstractItemModel, index *QModelIndex)) { + C.QAbstractItemDelegate_override_virtual_SetModelData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_SetModelData +func miqt_exec_callback_QAbstractItemDelegate_SetModelData(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_SetModelData, slotval1, slotval2, slotval3) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_UpdateEditorGeometry(editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex) { + + C.QAbstractItemDelegate_virtualbase_UpdateEditorGeometry(unsafe.Pointer(this.h), editor.cPointer(), option.cPointer(), index.cPointer()) + +} +func (this *QAbstractItemDelegate) OnUpdateEditorGeometry(slot func(super func(editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex), editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex)) { + C.QAbstractItemDelegate_override_virtual_UpdateEditorGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_UpdateEditorGeometry +func miqt_exec_callback_QAbstractItemDelegate_UpdateEditorGeometry(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_UpdateEditorGeometry, slotval1, slotval2, slotval3) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_EditorEvent(event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool { + + return (bool)(C.QAbstractItemDelegate_virtualbase_EditorEvent(unsafe.Pointer(this.h), event.cPointer(), model.cPointer(), option.cPointer(), index.cPointer())) + +} +func (this *QAbstractItemDelegate) OnEditorEvent(slot func(super func(event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool) { + C.QAbstractItemDelegate_override_virtual_EditorEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_EditorEvent +func miqt_exec_callback_QAbstractItemDelegate_EditorEvent(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_EditorEvent, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_HelpEvent(event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool { + + return (bool)(C.QAbstractItemDelegate_virtualbase_HelpEvent(unsafe.Pointer(this.h), event.cPointer(), view.cPointer(), option.cPointer(), index.cPointer())) + +} +func (this *QAbstractItemDelegate) OnHelpEvent(slot func(super func(event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool) { + C.QAbstractItemDelegate_override_virtual_HelpEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_HelpEvent +func miqt_exec_callback_QAbstractItemDelegate_HelpEvent(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_HelpEvent, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_PaintingRoles() []int { + + var _ma C.struct_miqt_array = C.QAbstractItemDelegate_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 *QAbstractItemDelegate) OnPaintingRoles(slot func(super func() []int) []int) { + C.QAbstractItemDelegate_override_virtual_PaintingRoles(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_PaintingRoles +func miqt_exec_callback_QAbstractItemDelegate_PaintingRoles(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{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 + +} + +func (this *QAbstractItemDelegate) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAbstractItemDelegate_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractItemDelegate) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractItemDelegate_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_Event +func miqt_exec_callback_QAbstractItemDelegate_Event(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAbstractItemDelegate_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAbstractItemDelegate) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAbstractItemDelegate_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_EventFilter +func miqt_exec_callback_QAbstractItemDelegate_EventFilter(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAbstractItemDelegate_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemDelegate) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAbstractItemDelegate_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_TimerEvent +func miqt_exec_callback_QAbstractItemDelegate_TimerEvent(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAbstractItemDelegate_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemDelegate) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAbstractItemDelegate_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_ChildEvent +func miqt_exec_callback_QAbstractItemDelegate_ChildEvent(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAbstractItemDelegate_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemDelegate) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractItemDelegate_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_CustomEvent +func miqt_exec_callback_QAbstractItemDelegate_CustomEvent(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAbstractItemDelegate_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractItemDelegate) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractItemDelegate_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_ConnectNotify +func miqt_exec_callback_QAbstractItemDelegate_ConnectNotify(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAbstractItemDelegate_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractItemDelegate) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractItemDelegate_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_DisconnectNotify +func miqt_exec_callback_QAbstractItemDelegate_DisconnectNotify(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAbstractItemDelegate) Delete() { C.QAbstractItemDelegate_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qabstractitemdelegate.h b/qt/gen_qabstractitemdelegate.h index 57cce1c1..3e53ac83 100644 --- a/qt/gen_qabstractitemdelegate.h +++ b/qt/gen_qabstractitemdelegate.h @@ -18,32 +18,40 @@ extern "C" { class QAbstractItemDelegate; class QAbstractItemModel; class QAbstractItemView; +class QChildEvent; class QEvent; class QFontMetrics; class QHelpEvent; +class QMetaMethod; class QMetaObject; class QModelIndex; class QObject; class QPainter; class QSize; class QStyleOptionViewItem; +class QTimerEvent; class QWidget; #else typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractItemView QAbstractItemView; +typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QFontMetrics QFontMetrics; typedef struct QHelpEvent QHelpEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif +void QAbstractItemDelegate_new(QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); +void QAbstractItemDelegate_new2(QObject* parent, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); QMetaObject* QAbstractItemDelegate_MetaObject(const QAbstractItemDelegate* self); void* QAbstractItemDelegate_Metacast(QAbstractItemDelegate* self, const char* param1); struct miqt_string QAbstractItemDelegate_Tr(const char* s); @@ -71,6 +79,40 @@ 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_override_virtual_Paint(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_Paint(const void* self, QPainter* painter, QStyleOptionViewItem* option, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QAbstractItemDelegate_virtualbase_SizeHint(const void* self, QStyleOptionViewItem* option, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_CreateEditor(void* self, intptr_t slot); +QWidget* QAbstractItemDelegate_virtualbase_CreateEditor(const void* self, QWidget* parent, QStyleOptionViewItem* option, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_DestroyEditor(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_DestroyEditor(const void* self, QWidget* editor, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_SetEditorData(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_SetEditorData(const void* self, QWidget* editor, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_SetModelData(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_SetModelData(const void* self, QWidget* editor, QAbstractItemModel* model, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_UpdateEditorGeometry(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_UpdateEditorGeometry(const void* self, QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_EditorEvent(void* self, intptr_t slot); +bool QAbstractItemDelegate_virtualbase_EditorEvent(void* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_HelpEvent(void* self, intptr_t slot); +bool QAbstractItemDelegate_virtualbase_HelpEvent(void* self, QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_PaintingRoles(void* self, intptr_t slot); +struct miqt_array /* of int */ QAbstractItemDelegate_virtualbase_PaintingRoles(const void* self); +void QAbstractItemDelegate_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractItemDelegate_virtualbase_Event(void* self, QEvent* event); +void QAbstractItemDelegate_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractItemDelegate_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAbstractItemDelegate_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractItemDelegate_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAbstractItemDelegate_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_CustomEvent(void* self, QEvent* event); +void QAbstractItemDelegate_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAbstractItemDelegate_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractItemDelegate_Delete(QAbstractItemDelegate* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qabstractitemmodel.cpp b/qt/gen_qabstractitemmodel.cpp index 91c62718..7f25bccc 100644 --- a/qt/gen_qabstractitemmodel.cpp +++ b/qt/gen_qabstractitemmodel.cpp @@ -2,8 +2,11 @@ #include #include #include +#include +#include #include #include +#include #include #include #include @@ -13,6 +16,7 @@ #include #include #include +#include #include #include #include "gen_qabstractitemmodel.h" @@ -211,6 +215,1172 @@ void QPersistentModelIndex_Delete(QPersistentModelIndex* self, bool isSubclass) } } +class MiqtVirtualQAbstractItemModel : public virtual QAbstractItemModel { +public: + + MiqtVirtualQAbstractItemModel(): QAbstractItemModel() {}; + MiqtVirtualQAbstractItemModel(QObject* parent): QAbstractItemModel(parent) {}; + + virtual ~MiqtVirtualQAbstractItemModel() = 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 QModelIndex(); // Pure virtual, there is no base we can call + } + + 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_QAbstractItemModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // 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 QModelIndex(); // Pure virtual, there is no base we can call + } + + const QModelIndex& child_ret = child; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&child_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QAbstractItemModel_Parent(const_cast(this), handle__Parent, sigval1); + + return *callback_return_value; + } + + // 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 QAbstractItemModel::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_QAbstractItemModel_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(QAbstractItemModel::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 0; // Pure virtual, there is no base we can call + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QAbstractItemModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // 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 0; // Pure virtual, there is no base we can call + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QAbstractItemModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // 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 QAbstractItemModel::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_QAbstractItemModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* parent) const { + + return QAbstractItemModel::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 QVariant(); // Pure virtual, there is no base we can call + } + + 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_QAbstractItemModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // 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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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(QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 = QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::setItemData(*index, roles_QMap); + + } + + // 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 QAbstractItemModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QAbstractItemModel_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 = QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractItemModel_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 = QAbstractItemModel::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 QAbstractItemModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractItemModel_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 = QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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) { + QAbstractItemModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QAbstractItemModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 = QAbstractItemModel::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) { + QAbstractItemModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QAbstractItemModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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(QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 = QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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(QAbstractItemModel::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 QAbstractItemModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QAbstractItemModel_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 = QAbstractItemModel::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 QAbstractItemModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractItemModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QAbstractItemModel::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) { + QAbstractItemModel::revert(); + return; + } + + + miqt_exec_callback_QAbstractItemModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QAbstractItemModel::revert(); + + } + + // 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 QAbstractItemModel::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractItemModel_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAbstractItemModel::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 QAbstractItemModel::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractItemModel_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAbstractItemModel::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) { + QAbstractItemModel::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemModel_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractItemModel::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) { + QAbstractItemModel::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemModel_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAbstractItemModel::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) { + QAbstractItemModel::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemModel_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAbstractItemModel::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) { + QAbstractItemModel::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractItemModel_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAbstractItemModel::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) { + QAbstractItemModel::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractItemModel_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAbstractItemModel::disconnectNotify(*signal); + + } + +}; + +void QAbstractItemModel_new(QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQAbstractItemModel* ret = new MiqtVirtualQAbstractItemModel(); + *outptr_QAbstractItemModel = ret; + *outptr_QObject = static_cast(ret); +} + +void QAbstractItemModel_new2(QObject* parent, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQAbstractItemModel* ret = new MiqtVirtualQAbstractItemModel(parent); + *outptr_QAbstractItemModel = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractItemModel_MetaObject(const QAbstractItemModel* self) { return (QMetaObject*) self->metaObject(); } @@ -479,7 +1649,7 @@ void QAbstractItemModel_DataChanged(QAbstractItemModel* self, QModelIndex* topLe } void QAbstractItemModel_connect_DataChanged(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast&)>(&QAbstractItemModel::dataChanged), self, [=](const QModelIndex& topLeft, const QModelIndex& bottomRight) { + MiqtVirtualQAbstractItemModel::connect(self, static_cast&)>(&QAbstractItemModel::dataChanged), self, [=](const QModelIndex& topLeft, const QModelIndex& bottomRight) { const QModelIndex& topLeft_ret = topLeft; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&topLeft_ret); @@ -495,7 +1665,7 @@ void QAbstractItemModel_HeaderDataChanged(QAbstractItemModel* self, int orientat } void QAbstractItemModel_connect_HeaderDataChanged(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast(&QAbstractItemModel::headerDataChanged), self, [=](Qt::Orientation orientation, int first, int last) { + MiqtVirtualQAbstractItemModel::connect(self, static_cast(&QAbstractItemModel::headerDataChanged), self, [=](Qt::Orientation orientation, int first, int last) { Qt::Orientation orientation_ret = orientation; int sigval1 = static_cast(orientation_ret); int sigval2 = first; @@ -509,7 +1679,7 @@ void QAbstractItemModel_LayoutChanged(QAbstractItemModel* self) { } void QAbstractItemModel_connect_LayoutChanged(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutChanged), self, [=]() { + MiqtVirtualQAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutChanged), self, [=]() { miqt_exec_callback_QAbstractItemModel_LayoutChanged(slot); }); } @@ -519,7 +1689,7 @@ void QAbstractItemModel_LayoutAboutToBeChanged(QAbstractItemModel* self) { } void QAbstractItemModel_connect_LayoutAboutToBeChanged(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutAboutToBeChanged), self, [=]() { + MiqtVirtualQAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutAboutToBeChanged), self, [=]() { miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged(slot); }); } @@ -611,7 +1781,7 @@ void QAbstractItemModel_DataChanged3(QAbstractItemModel* self, QModelIndex* topL } void QAbstractItemModel_connect_DataChanged3(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast&)>(&QAbstractItemModel::dataChanged), self, [=](const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) { + MiqtVirtualQAbstractItemModel::connect(self, static_cast&)>(&QAbstractItemModel::dataChanged), self, [=](const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) { const QModelIndex& topLeft_ret = topLeft; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&topLeft_ret); @@ -643,7 +1813,7 @@ void QAbstractItemModel_LayoutChanged1(QAbstractItemModel* self, struct miqt_arr } void QAbstractItemModel_connect_LayoutChanged1(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutChanged), self, [=](const QList& parents) { + MiqtVirtualQAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutChanged), self, [=](const QList& parents) { const QList& parents_ret = parents; // Convert QList<> from C++ memory to manually-managed C memory QPersistentModelIndex** parents_arr = static_cast(malloc(sizeof(QPersistentModelIndex*) * parents_ret.length())); @@ -669,7 +1839,7 @@ void QAbstractItemModel_LayoutChanged2(QAbstractItemModel* self, struct miqt_arr } void QAbstractItemModel_connect_LayoutChanged2(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutChanged), self, [=](const QList& parents, QAbstractItemModel::LayoutChangeHint hint) { + MiqtVirtualQAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutChanged), self, [=](const QList& parents, QAbstractItemModel::LayoutChangeHint hint) { const QList& parents_ret = parents; // Convert QList<> from C++ memory to manually-managed C memory QPersistentModelIndex** parents_arr = static_cast(malloc(sizeof(QPersistentModelIndex*) * parents_ret.length())); @@ -697,7 +1867,7 @@ void QAbstractItemModel_LayoutAboutToBeChanged1(QAbstractItemModel* self, struct } void QAbstractItemModel_connect_LayoutAboutToBeChanged1(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutAboutToBeChanged), self, [=](const QList& parents) { + MiqtVirtualQAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutAboutToBeChanged), self, [=](const QList& parents) { const QList& parents_ret = parents; // Convert QList<> from C++ memory to manually-managed C memory QPersistentModelIndex** parents_arr = static_cast(malloc(sizeof(QPersistentModelIndex*) * parents_ret.length())); @@ -723,7 +1893,7 @@ void QAbstractItemModel_LayoutAboutToBeChanged2(QAbstractItemModel* self, struct } void QAbstractItemModel_connect_LayoutAboutToBeChanged2(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutAboutToBeChanged), self, [=](const QList& parents, QAbstractItemModel::LayoutChangeHint hint) { + MiqtVirtualQAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutAboutToBeChanged), self, [=](const QList& parents, QAbstractItemModel::LayoutChangeHint hint) { const QList& parents_ret = parents; // Convert QList<> from C++ memory to manually-managed C memory QPersistentModelIndex** parents_arr = static_cast(malloc(sizeof(QPersistentModelIndex*) * parents_ret.length())); @@ -740,14 +1910,1283 @@ void QAbstractItemModel_connect_LayoutAboutToBeChanged2(QAbstractItemModel* self }); } +void QAbstractItemModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Index = slot; +} + +void QAbstractItemModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Parent = slot; +} + +void QAbstractItemModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QAbstractItemModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QAbstractItemModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__RowCount = slot; +} + +void QAbstractItemModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__ColumnCount = slot; +} + +void QAbstractItemModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__HasChildren = slot; +} + +bool QAbstractItemModel_virtualbase_HasChildren(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_HasChildren(parent); +} + +void QAbstractItemModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Data = slot; +} + +void QAbstractItemModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__SetData = slot; +} + +bool QAbstractItemModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QAbstractItemModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QAbstractItemModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QAbstractItemModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QAbstractItemModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QAbstractItemModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QAbstractItemModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_ItemData(index); +} + +void QAbstractItemModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__SetItemData = slot; +} + +bool QAbstractItemModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QAbstractItemModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QAbstractItemModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_MimeTypes(); +} + +void QAbstractItemModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QAbstractItemModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QAbstractItemModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QAbstractItemModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QAbstractItemModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__DropMimeData = slot; +} + +bool QAbstractItemModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QAbstractItemModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QAbstractItemModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QAbstractItemModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QAbstractItemModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QAbstractItemModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__InsertRows = slot; +} + +bool QAbstractItemModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QAbstractItemModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__InsertColumns = slot; +} + +bool QAbstractItemModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QAbstractItemModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__RemoveRows = slot; +} + +bool QAbstractItemModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QAbstractItemModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QAbstractItemModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QAbstractItemModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__MoveRows = slot; +} + +bool QAbstractItemModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QAbstractItemModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__MoveColumns = slot; +} + +bool QAbstractItemModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QAbstractItemModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__FetchMore = slot; +} + +void QAbstractItemModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QAbstractItemModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QAbstractItemModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QAbstractItemModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Flags = slot; +} + +int QAbstractItemModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Flags(index); +} + +void QAbstractItemModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Sort = slot; +} + +void QAbstractItemModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Sort(column, order); +} + +void QAbstractItemModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QAbstractItemModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Buddy(index); +} + +void QAbstractItemModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QAbstractItemModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QAbstractItemModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Span = slot; +} + +QSize* QAbstractItemModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Span(index); +} + +void QAbstractItemModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QAbstractItemModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_RoleNames(); +} + +void QAbstractItemModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Submit = slot; +} + +bool QAbstractItemModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Submit(); +} + +void QAbstractItemModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Revert = slot; +} + +void QAbstractItemModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Revert(); +} + +void QAbstractItemModel_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Event = slot; +} + +bool QAbstractItemModel_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Event(event); +} + +void QAbstractItemModel_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractItemModel_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAbstractItemModel_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractItemModel_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractItemModel_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__ChildEvent = slot; +} + +void QAbstractItemModel_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_ChildEvent(event); +} + +void QAbstractItemModel_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__CustomEvent = slot; +} + +void QAbstractItemModel_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_CustomEvent(event); +} + +void QAbstractItemModel_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__ConnectNotify = slot; +} + +void QAbstractItemModel_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAbstractItemModel_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__DisconnectNotify = slot; +} + +void QAbstractItemModel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAbstractItemModel_Delete(QAbstractItemModel* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } } +class MiqtVirtualQAbstractTableModel : public virtual QAbstractTableModel { +public: + + MiqtVirtualQAbstractTableModel(): QAbstractTableModel() {}; + MiqtVirtualQAbstractTableModel(QObject* parent): QAbstractTableModel(parent) {}; + + virtual ~MiqtVirtualQAbstractTableModel() = 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 QAbstractTableModel::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_QAbstractTableModel_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(QAbstractTableModel::index(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 QAbstractTableModel::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_QAbstractTableModel_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(QAbstractTableModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // 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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *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 QAbstractTableModel::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_QAbstractTableModel_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 = QAbstractTableModel::flags(*index); + return static_cast(_ret); + + } + + // 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 0; // Pure virtual, there is no base we can call + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QAbstractTableModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // 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 0; // Pure virtual, there is no base we can call + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QAbstractTableModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // 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 QVariant(); // Pure virtual, there is no base we can call + } + + 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_QAbstractTableModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // 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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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(QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 = QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::setItemData(*index, roles_QMap); + + } + + // 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 QAbstractTableModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QAbstractTableModel_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 = QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::canDropMimeData(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 QAbstractTableModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractTableModel_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 = QAbstractTableModel::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 QAbstractTableModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractTableModel_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 = QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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) { + QAbstractTableModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QAbstractTableModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QAbstractTableModel::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) { + QAbstractTableModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QAbstractTableModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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(QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 = QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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(QAbstractTableModel::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 QAbstractTableModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QAbstractTableModel_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 = QAbstractTableModel::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 QAbstractTableModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractTableModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QAbstractTableModel::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) { + QAbstractTableModel::revert(); + return; + } + + + miqt_exec_callback_QAbstractTableModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QAbstractTableModel::revert(); + + } + +}; + +void QAbstractTableModel_new(QAbstractTableModel** outptr_QAbstractTableModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQAbstractTableModel* ret = new MiqtVirtualQAbstractTableModel(); + *outptr_QAbstractTableModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QAbstractTableModel_new2(QObject* parent, QAbstractTableModel** outptr_QAbstractTableModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQAbstractTableModel* ret = new MiqtVirtualQAbstractTableModel(parent); + *outptr_QAbstractTableModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractTableModel_MetaObject(const QAbstractTableModel* self) { return (QMetaObject*) self->metaObject(); } @@ -839,14 +3278,1201 @@ struct miqt_string QAbstractTableModel_TrUtf83(const char* s, const char* c, int return _ms; } +void QAbstractTableModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Index = slot; +} + +QModelIndex* QAbstractTableModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Index(row, column, parent); +} + +void QAbstractTableModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QAbstractTableModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QAbstractTableModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__DropMimeData = slot; +} + +bool QAbstractTableModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QAbstractTableModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Flags = slot; +} + +int QAbstractTableModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Flags(index); +} + +void QAbstractTableModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__RowCount = slot; +} + +void QAbstractTableModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__ColumnCount = slot; +} + +void QAbstractTableModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Data = slot; +} + +void QAbstractTableModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__SetData = slot; +} + +bool QAbstractTableModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QAbstractTableModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QAbstractTableModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QAbstractTableModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QAbstractTableModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QAbstractTableModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QAbstractTableModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_ItemData(index); +} + +void QAbstractTableModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__SetItemData = slot; +} + +bool QAbstractTableModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QAbstractTableModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QAbstractTableModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_MimeTypes(); +} + +void QAbstractTableModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QAbstractTableModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QAbstractTableModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QAbstractTableModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QAbstractTableModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QAbstractTableModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QAbstractTableModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QAbstractTableModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QAbstractTableModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__InsertRows = slot; +} + +bool QAbstractTableModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QAbstractTableModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__InsertColumns = slot; +} + +bool QAbstractTableModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QAbstractTableModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__RemoveRows = slot; +} + +bool QAbstractTableModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QAbstractTableModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QAbstractTableModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QAbstractTableModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__MoveRows = slot; +} + +bool QAbstractTableModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QAbstractTableModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__MoveColumns = slot; +} + +bool QAbstractTableModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QAbstractTableModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__FetchMore = slot; +} + +void QAbstractTableModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QAbstractTableModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QAbstractTableModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QAbstractTableModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Sort = slot; +} + +void QAbstractTableModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Sort(column, order); +} + +void QAbstractTableModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QAbstractTableModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Buddy(index); +} + +void QAbstractTableModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QAbstractTableModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QAbstractTableModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Span = slot; +} + +QSize* QAbstractTableModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Span(index); +} + +void QAbstractTableModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QAbstractTableModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_RoleNames(); +} + +void QAbstractTableModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Submit = slot; +} + +bool QAbstractTableModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Submit(); +} + +void QAbstractTableModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Revert = slot; +} + +void QAbstractTableModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Revert(); +} + void QAbstractTableModel_Delete(QAbstractTableModel* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } } +class MiqtVirtualQAbstractListModel : public virtual QAbstractListModel { +public: + + MiqtVirtualQAbstractListModel(): QAbstractListModel() {}; + MiqtVirtualQAbstractListModel(QObject* parent): QAbstractListModel(parent) {}; + + virtual ~MiqtVirtualQAbstractListModel() = 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 QAbstractListModel::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_QAbstractListModel_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(QAbstractListModel::index(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 QAbstractListModel::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_QAbstractListModel_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(QAbstractListModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // 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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *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 QAbstractListModel::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_QAbstractListModel_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 = QAbstractListModel::flags(*index); + return static_cast(_ret); + + } + + // 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 0; // Pure virtual, there is no base we can call + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QAbstractListModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // 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 QVariant(); // Pure virtual, there is no base we can call + } + + 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_QAbstractListModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // 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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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(QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 = QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::setItemData(*index, roles_QMap); + + } + + // 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 QAbstractListModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QAbstractListModel_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 = QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::canDropMimeData(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 QAbstractListModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractListModel_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 = QAbstractListModel::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 QAbstractListModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractListModel_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 = QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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) { + QAbstractListModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QAbstractListModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QAbstractListModel::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) { + QAbstractListModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QAbstractListModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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(QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 = QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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(QAbstractListModel::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 QAbstractListModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QAbstractListModel_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 = QAbstractListModel::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 QAbstractListModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractListModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QAbstractListModel::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) { + QAbstractListModel::revert(); + return; + } + + + miqt_exec_callback_QAbstractListModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QAbstractListModel::revert(); + + } + +}; + +void QAbstractListModel_new(QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQAbstractListModel* ret = new MiqtVirtualQAbstractListModel(); + *outptr_QAbstractListModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QAbstractListModel_new2(QObject* parent, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQAbstractListModel* ret = new MiqtVirtualQAbstractListModel(parent); + *outptr_QAbstractListModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractListModel_MetaObject(const QAbstractListModel* self) { return (QMetaObject*) self->metaObject(); } @@ -938,9 +4564,249 @@ struct miqt_string QAbstractListModel_TrUtf83(const char* s, const char* c, int return _ms; } +void QAbstractListModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Index = slot; +} + +QModelIndex* QAbstractListModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Index(row, column, parent); +} + +void QAbstractListModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QAbstractListModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QAbstractListModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__DropMimeData = slot; +} + +bool QAbstractListModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QAbstractListModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Flags = slot; +} + +int QAbstractListModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Flags(index); +} + +void QAbstractListModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__RowCount = slot; +} + +void QAbstractListModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Data = slot; +} + +void QAbstractListModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__SetData = slot; +} + +bool QAbstractListModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QAbstractListModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QAbstractListModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QAbstractListModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QAbstractListModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QAbstractListModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QAbstractListModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_ItemData(index); +} + +void QAbstractListModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__SetItemData = slot; +} + +bool QAbstractListModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QAbstractListModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QAbstractListModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_MimeTypes(); +} + +void QAbstractListModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QAbstractListModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QAbstractListModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QAbstractListModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QAbstractListModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QAbstractListModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QAbstractListModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QAbstractListModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QAbstractListModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__InsertRows = slot; +} + +bool QAbstractListModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QAbstractListModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__InsertColumns = slot; +} + +bool QAbstractListModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QAbstractListModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__RemoveRows = slot; +} + +bool QAbstractListModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QAbstractListModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QAbstractListModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QAbstractListModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__MoveRows = slot; +} + +bool QAbstractListModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QAbstractListModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__MoveColumns = slot; +} + +bool QAbstractListModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QAbstractListModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__FetchMore = slot; +} + +void QAbstractListModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QAbstractListModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QAbstractListModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QAbstractListModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Sort = slot; +} + +void QAbstractListModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Sort(column, order); +} + +void QAbstractListModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QAbstractListModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Buddy(index); +} + +void QAbstractListModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QAbstractListModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QAbstractListModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Span = slot; +} + +QSize* QAbstractListModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Span(index); +} + +void QAbstractListModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QAbstractListModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_RoleNames(); +} + +void QAbstractListModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Submit = slot; +} + +bool QAbstractListModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Submit(); +} + +void QAbstractListModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Revert = slot; +} + +void QAbstractListModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Revert(); +} + void QAbstractListModel_Delete(QAbstractListModel* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qabstractitemmodel.go b/qt/gen_qabstractitemmodel.go index d9b29675..0c29015c 100644 --- a/qt/gen_qabstractitemmodel.go +++ b/qt/gen_qabstractitemmodel.go @@ -404,6 +404,28 @@ func UnsafeNewQAbstractItemModel(h unsafe.Pointer, h_QObject unsafe.Pointer) *QA QObject: UnsafeNewQObject(h_QObject)} } +// NewQAbstractItemModel constructs a new QAbstractItemModel object. +func NewQAbstractItemModel() *QAbstractItemModel { + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractItemModel_new(&outptr_QAbstractItemModel, &outptr_QObject) + ret := newQAbstractItemModel(outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractItemModel2 constructs a new QAbstractItemModel object. +func NewQAbstractItemModel2(parent *QObject) *QAbstractItemModel { + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractItemModel_new2(parent.cPointer(), &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQAbstractItemModel(outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractItemModel) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractItemModel_MetaObject(this.h))) } @@ -1012,6 +1034,1189 @@ func miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged2(cb C.intptr_t gofunc(slotval1, slotval2) } +func (this *QAbstractItemModel) OnIndex(slot func(row int, column int, parent *QModelIndex) *QModelIndex) { + C.QAbstractItemModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Index +func miqt_exec_callback_QAbstractItemModel_Index(self *C.QAbstractItemModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} +func (this *QAbstractItemModel) OnParent(slot func(child *QModelIndex) *QModelIndex) { + C.QAbstractItemModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Parent +func miqt_exec_callback_QAbstractItemModel_Parent(self *C.QAbstractItemModel, cb C.intptr_t, child *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QAbstractItemModel_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 *QAbstractItemModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QAbstractItemModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Sibling +func miqt_exec_callback_QAbstractItemModel_Sibling(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} +func (this *QAbstractItemModel) OnRowCount(slot func(parent *QModelIndex) int) { + C.QAbstractItemModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_RowCount +func miqt_exec_callback_QAbstractItemModel_RowCount(self *C.QAbstractItemModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractItemModel) OnColumnCount(slot func(parent *QModelIndex) int) { + C.QAbstractItemModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_ColumnCount +func miqt_exec_callback_QAbstractItemModel_ColumnCount(self *C.QAbstractItemModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_HasChildren(parent *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QAbstractItemModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QAbstractItemModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_HasChildren +func miqt_exec_callback_QAbstractItemModel_HasChildren(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QAbstractItemModel) OnData(slot func(index *QModelIndex, role int) *QVariant) { + C.QAbstractItemModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Data +func miqt_exec_callback_QAbstractItemModel_Data(self *C.QAbstractItemModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QAbstractItemModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QAbstractItemModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_SetData +func miqt_exec_callback_QAbstractItemModel_SetData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QAbstractItemModel_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 *QAbstractItemModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QAbstractItemModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_HeaderData +func miqt_exec_callback_QAbstractItemModel_HeaderData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QAbstractItemModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QAbstractItemModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_SetHeaderData +func miqt_exec_callback_QAbstractItemModel_SetHeaderData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QAbstractItemModel_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 *QAbstractItemModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QAbstractItemModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_ItemData +func miqt_exec_callback_QAbstractItemModel_ItemData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{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 *QAbstractItemModel) 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.QAbstractItemModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QAbstractItemModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QAbstractItemModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_SetItemData +func miqt_exec_callback_QAbstractItemModel_SetItemData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QAbstractItemModel_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 *QAbstractItemModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QAbstractItemModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_MimeTypes +func miqt_exec_callback_QAbstractItemModel_MimeTypes(self *C.QAbstractItemModel, 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((&QAbstractItemModel{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 *QAbstractItemModel) 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.QAbstractItemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QAbstractItemModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QAbstractItemModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_MimeData +func miqt_exec_callback_QAbstractItemModel_MimeData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QAbstractItemModel) 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.QAbstractItemModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_CanDropMimeData +func miqt_exec_callback_QAbstractItemModel_CanDropMimeData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QAbstractItemModel) 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.QAbstractItemModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_DropMimeData +func miqt_exec_callback_QAbstractItemModel_DropMimeData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QAbstractItemModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QAbstractItemModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QAbstractItemModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_SupportedDropActions +func miqt_exec_callback_QAbstractItemModel_SupportedDropActions(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QAbstractItemModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QAbstractItemModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QAbstractItemModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_SupportedDragActions +func miqt_exec_callback_QAbstractItemModel_SupportedDragActions(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractItemModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QAbstractItemModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_InsertRows +func miqt_exec_callback_QAbstractItemModel_InsertRows(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractItemModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QAbstractItemModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_InsertColumns +func miqt_exec_callback_QAbstractItemModel_InsertColumns(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractItemModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QAbstractItemModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_RemoveRows +func miqt_exec_callback_QAbstractItemModel_RemoveRows(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractItemModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QAbstractItemModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_RemoveColumns +func miqt_exec_callback_QAbstractItemModel_RemoveColumns(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QAbstractItemModel) 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.QAbstractItemModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_MoveRows +func miqt_exec_callback_QAbstractItemModel_MoveRows(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QAbstractItemModel) 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.QAbstractItemModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_MoveColumns +func miqt_exec_callback_QAbstractItemModel_MoveColumns(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QAbstractItemModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QAbstractItemModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QAbstractItemModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_FetchMore +func miqt_exec_callback_QAbstractItemModel_FetchMore(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QAbstractItemModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QAbstractItemModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QAbstractItemModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_CanFetchMore +func miqt_exec_callback_QAbstractItemModel_CanFetchMore(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QAbstractItemModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QAbstractItemModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QAbstractItemModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Flags +func miqt_exec_callback_QAbstractItemModel_Flags(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QAbstractItemModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QAbstractItemModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QAbstractItemModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Sort +func miqt_exec_callback_QAbstractItemModel_Sort(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QAbstractItemModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QAbstractItemModel_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 *QAbstractItemModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QAbstractItemModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Buddy +func miqt_exec_callback_QAbstractItemModel_Buddy(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QAbstractItemModel_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 *QAbstractItemModel) 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.QAbstractItemModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Match +func miqt_exec_callback_QAbstractItemModel_Match(self *C.QAbstractItemModel, 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((&QAbstractItemModel{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 *QAbstractItemModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QAbstractItemModel_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 *QAbstractItemModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QAbstractItemModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Span +func miqt_exec_callback_QAbstractItemModel_Span(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QAbstractItemModel_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 *QAbstractItemModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QAbstractItemModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_RoleNames +func miqt_exec_callback_QAbstractItemModel_RoleNames(self *C.QAbstractItemModel, 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((&QAbstractItemModel{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 *QAbstractItemModel) callVirtualBase_Submit() bool { + + return (bool)(C.QAbstractItemModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QAbstractItemModel) OnSubmit(slot func(super func() bool) bool) { + C.QAbstractItemModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Submit +func miqt_exec_callback_QAbstractItemModel_Submit(self *C.QAbstractItemModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractItemModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_Revert() { + + C.QAbstractItemModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QAbstractItemModel) OnRevert(slot func(super func())) { + C.QAbstractItemModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Revert +func miqt_exec_callback_QAbstractItemModel_Revert(self *C.QAbstractItemModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractItemModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QAbstractItemModel) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractItemModel) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractItemModel_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Event +func miqt_exec_callback_QAbstractItemModel_Event(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAbstractItemModel) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAbstractItemModel_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_EventFilter +func miqt_exec_callback_QAbstractItemModel_EventFilter(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAbstractItemModel_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemModel) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAbstractItemModel_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_TimerEvent +func miqt_exec_callback_QAbstractItemModel_TimerEvent(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractItemModel) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAbstractItemModel_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemModel) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAbstractItemModel_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_ChildEvent +func miqt_exec_callback_QAbstractItemModel_ChildEvent(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAbstractItemModel) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAbstractItemModel_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemModel) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractItemModel_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_CustomEvent +func miqt_exec_callback_QAbstractItemModel_CustomEvent(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAbstractItemModel) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAbstractItemModel_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractItemModel) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractItemModel_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_ConnectNotify +func miqt_exec_callback_QAbstractItemModel_ConnectNotify(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAbstractItemModel) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAbstractItemModel_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractItemModel) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractItemModel_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_DisconnectNotify +func miqt_exec_callback_QAbstractItemModel_DisconnectNotify(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAbstractItemModel) Delete() { C.QAbstractItemModel_Delete(this.h, C.bool(this.isSubclass)) @@ -1065,6 +2270,30 @@ func UnsafeNewQAbstractTableModel(h unsafe.Pointer, h_QAbstractItemModel unsafe. QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } +// NewQAbstractTableModel constructs a new QAbstractTableModel object. +func NewQAbstractTableModel() *QAbstractTableModel { + var outptr_QAbstractTableModel *C.QAbstractTableModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractTableModel_new(&outptr_QAbstractTableModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQAbstractTableModel(outptr_QAbstractTableModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractTableModel2 constructs a new QAbstractTableModel object. +func NewQAbstractTableModel2(parent *QObject) *QAbstractTableModel { + var outptr_QAbstractTableModel *C.QAbstractTableModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractTableModel_new2(parent.cPointer(), &outptr_QAbstractTableModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQAbstractTableModel(outptr_QAbstractTableModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractTableModel) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractTableModel_MetaObject(this.h))) } @@ -1159,6 +2388,987 @@ func QAbstractTableModel_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QAbstractTableModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QAbstractTableModel_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 *QAbstractTableModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QAbstractTableModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Index +func miqt_exec_callback_QAbstractTableModel_Index(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractTableModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QAbstractTableModel_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 *QAbstractTableModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QAbstractTableModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Sibling +func miqt_exec_callback_QAbstractTableModel_Sibling(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractTableModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QAbstractTableModel) 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.QAbstractTableModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_DropMimeData +func miqt_exec_callback_QAbstractTableModel_DropMimeData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QAbstractTableModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QAbstractTableModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QAbstractTableModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Flags +func miqt_exec_callback_QAbstractTableModel_Flags(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractTableModel) OnRowCount(slot func(parent *QModelIndex) int) { + C.QAbstractTableModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_RowCount +func miqt_exec_callback_QAbstractTableModel_RowCount(self *C.QAbstractTableModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractTableModel) OnColumnCount(slot func(parent *QModelIndex) int) { + C.QAbstractTableModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_ColumnCount +func miqt_exec_callback_QAbstractTableModel_ColumnCount(self *C.QAbstractTableModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractTableModel) OnData(slot func(index *QModelIndex, role int) *QVariant) { + C.QAbstractTableModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Data +func miqt_exec_callback_QAbstractTableModel_Data(self *C.QAbstractTableModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractTableModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QAbstractTableModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QAbstractTableModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_SetData +func miqt_exec_callback_QAbstractTableModel_SetData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QAbstractTableModel_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 *QAbstractTableModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QAbstractTableModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_HeaderData +func miqt_exec_callback_QAbstractTableModel_HeaderData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractTableModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QAbstractTableModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QAbstractTableModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_SetHeaderData +func miqt_exec_callback_QAbstractTableModel_SetHeaderData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QAbstractTableModel_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 *QAbstractTableModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QAbstractTableModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_ItemData +func miqt_exec_callback_QAbstractTableModel_ItemData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{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 *QAbstractTableModel) 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.QAbstractTableModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QAbstractTableModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QAbstractTableModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_SetItemData +func miqt_exec_callback_QAbstractTableModel_SetItemData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QAbstractTableModel_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 *QAbstractTableModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QAbstractTableModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_MimeTypes +func miqt_exec_callback_QAbstractTableModel_MimeTypes(self *C.QAbstractTableModel, 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((&QAbstractTableModel{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 *QAbstractTableModel) 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.QAbstractTableModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QAbstractTableModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QAbstractTableModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_MimeData +func miqt_exec_callback_QAbstractTableModel_MimeData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractTableModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QAbstractTableModel) 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.QAbstractTableModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_CanDropMimeData +func miqt_exec_callback_QAbstractTableModel_CanDropMimeData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QAbstractTableModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QAbstractTableModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QAbstractTableModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_SupportedDropActions +func miqt_exec_callback_QAbstractTableModel_SupportedDropActions(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QAbstractTableModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QAbstractTableModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QAbstractTableModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_SupportedDragActions +func miqt_exec_callback_QAbstractTableModel_SupportedDragActions(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractTableModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QAbstractTableModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_InsertRows +func miqt_exec_callback_QAbstractTableModel_InsertRows(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractTableModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QAbstractTableModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_InsertColumns +func miqt_exec_callback_QAbstractTableModel_InsertColumns(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractTableModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QAbstractTableModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_RemoveRows +func miqt_exec_callback_QAbstractTableModel_RemoveRows(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractTableModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QAbstractTableModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_RemoveColumns +func miqt_exec_callback_QAbstractTableModel_RemoveColumns(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QAbstractTableModel) 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.QAbstractTableModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_MoveRows +func miqt_exec_callback_QAbstractTableModel_MoveRows(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QAbstractTableModel) 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.QAbstractTableModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_MoveColumns +func miqt_exec_callback_QAbstractTableModel_MoveColumns(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QAbstractTableModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QAbstractTableModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QAbstractTableModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_FetchMore +func miqt_exec_callback_QAbstractTableModel_FetchMore(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QAbstractTableModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QAbstractTableModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QAbstractTableModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_CanFetchMore +func miqt_exec_callback_QAbstractTableModel_CanFetchMore(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QAbstractTableModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QAbstractTableModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QAbstractTableModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Sort +func miqt_exec_callback_QAbstractTableModel_Sort(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QAbstractTableModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QAbstractTableModel_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 *QAbstractTableModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QAbstractTableModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Buddy +func miqt_exec_callback_QAbstractTableModel_Buddy(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractTableModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QAbstractTableModel_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 *QAbstractTableModel) 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.QAbstractTableModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Match +func miqt_exec_callback_QAbstractTableModel_Match(self *C.QAbstractTableModel, 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((&QAbstractTableModel{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 *QAbstractTableModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QAbstractTableModel_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 *QAbstractTableModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QAbstractTableModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Span +func miqt_exec_callback_QAbstractTableModel_Span(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractTableModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QAbstractTableModel_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 *QAbstractTableModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QAbstractTableModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_RoleNames +func miqt_exec_callback_QAbstractTableModel_RoleNames(self *C.QAbstractTableModel, 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((&QAbstractTableModel{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 *QAbstractTableModel) callVirtualBase_Submit() bool { + + return (bool)(C.QAbstractTableModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QAbstractTableModel) OnSubmit(slot func(super func() bool) bool) { + C.QAbstractTableModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Submit +func miqt_exec_callback_QAbstractTableModel_Submit(self *C.QAbstractTableModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractTableModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_Revert() { + + C.QAbstractTableModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QAbstractTableModel) OnRevert(slot func(super func())) { + C.QAbstractTableModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Revert +func miqt_exec_callback_QAbstractTableModel_Revert(self *C.QAbstractTableModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractTableModel{h: self}).callVirtualBase_Revert) + +} + // Delete this object from C++ memory. func (this *QAbstractTableModel) Delete() { C.QAbstractTableModel_Delete(this.h, C.bool(this.isSubclass)) @@ -1212,6 +3422,30 @@ func UnsafeNewQAbstractListModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.P QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } +// NewQAbstractListModel constructs a new QAbstractListModel object. +func NewQAbstractListModel() *QAbstractListModel { + var outptr_QAbstractListModel *C.QAbstractListModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractListModel_new(&outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQAbstractListModel(outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractListModel2 constructs a new QAbstractListModel object. +func NewQAbstractListModel2(parent *QObject) *QAbstractListModel { + var outptr_QAbstractListModel *C.QAbstractListModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractListModel_new2(parent.cPointer(), &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQAbstractListModel(outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractListModel) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractListModel_MetaObject(this.h))) } @@ -1306,6 +3540,968 @@ func QAbstractListModel_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QAbstractListModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QAbstractListModel_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 *QAbstractListModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QAbstractListModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Index +func miqt_exec_callback_QAbstractListModel_Index(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractListModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QAbstractListModel_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 *QAbstractListModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QAbstractListModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Sibling +func miqt_exec_callback_QAbstractListModel_Sibling(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractListModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractListModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QAbstractListModel) 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.QAbstractListModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_DropMimeData +func miqt_exec_callback_QAbstractListModel_DropMimeData(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QAbstractListModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QAbstractListModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QAbstractListModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Flags +func miqt_exec_callback_QAbstractListModel_Flags(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractListModel) OnRowCount(slot func(parent *QModelIndex) int) { + C.QAbstractListModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_RowCount +func miqt_exec_callback_QAbstractListModel_RowCount(self *C.QAbstractListModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractListModel) OnData(slot func(index *QModelIndex, role int) *QVariant) { + C.QAbstractListModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Data +func miqt_exec_callback_QAbstractListModel_Data(self *C.QAbstractListModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractListModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QAbstractListModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QAbstractListModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QAbstractListModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_SetData +func miqt_exec_callback_QAbstractListModel_SetData(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QAbstractListModel_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 *QAbstractListModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QAbstractListModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_HeaderData +func miqt_exec_callback_QAbstractListModel_HeaderData(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractListModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QAbstractListModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QAbstractListModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QAbstractListModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_SetHeaderData +func miqt_exec_callback_QAbstractListModel_SetHeaderData(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QAbstractListModel_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 *QAbstractListModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QAbstractListModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_ItemData +func miqt_exec_callback_QAbstractListModel_ItemData(self *C.QAbstractListModel, 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((&QAbstractListModel{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 *QAbstractListModel) 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.QAbstractListModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QAbstractListModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QAbstractListModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_SetItemData +func miqt_exec_callback_QAbstractListModel_SetItemData(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QAbstractListModel_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 *QAbstractListModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QAbstractListModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_MimeTypes +func miqt_exec_callback_QAbstractListModel_MimeTypes(self *C.QAbstractListModel, 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((&QAbstractListModel{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 *QAbstractListModel) 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.QAbstractListModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QAbstractListModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QAbstractListModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_MimeData +func miqt_exec_callback_QAbstractListModel_MimeData(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractListModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractListModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QAbstractListModel) 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.QAbstractListModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_CanDropMimeData +func miqt_exec_callback_QAbstractListModel_CanDropMimeData(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QAbstractListModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QAbstractListModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QAbstractListModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_SupportedDropActions +func miqt_exec_callback_QAbstractListModel_SupportedDropActions(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QAbstractListModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QAbstractListModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QAbstractListModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_SupportedDragActions +func miqt_exec_callback_QAbstractListModel_SupportedDragActions(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractListModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractListModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QAbstractListModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_InsertRows +func miqt_exec_callback_QAbstractListModel_InsertRows(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractListModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractListModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QAbstractListModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_InsertColumns +func miqt_exec_callback_QAbstractListModel_InsertColumns(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractListModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractListModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QAbstractListModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_RemoveRows +func miqt_exec_callback_QAbstractListModel_RemoveRows(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractListModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractListModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QAbstractListModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_RemoveColumns +func miqt_exec_callback_QAbstractListModel_RemoveColumns(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QAbstractListModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QAbstractListModel) 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.QAbstractListModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_MoveRows +func miqt_exec_callback_QAbstractListModel_MoveRows(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QAbstractListModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QAbstractListModel) 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.QAbstractListModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_MoveColumns +func miqt_exec_callback_QAbstractListModel_MoveColumns(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QAbstractListModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QAbstractListModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QAbstractListModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_FetchMore +func miqt_exec_callback_QAbstractListModel_FetchMore(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QAbstractListModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QAbstractListModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QAbstractListModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QAbstractListModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_CanFetchMore +func miqt_exec_callback_QAbstractListModel_CanFetchMore(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QAbstractListModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QAbstractListModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QAbstractListModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Sort +func miqt_exec_callback_QAbstractListModel_Sort(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QAbstractListModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QAbstractListModel_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 *QAbstractListModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QAbstractListModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Buddy +func miqt_exec_callback_QAbstractListModel_Buddy(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractListModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QAbstractListModel_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 *QAbstractListModel) 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.QAbstractListModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Match +func miqt_exec_callback_QAbstractListModel_Match(self *C.QAbstractListModel, 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((&QAbstractListModel{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 *QAbstractListModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QAbstractListModel_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 *QAbstractListModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QAbstractListModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Span +func miqt_exec_callback_QAbstractListModel_Span(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractListModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QAbstractListModel_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 *QAbstractListModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QAbstractListModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_RoleNames +func miqt_exec_callback_QAbstractListModel_RoleNames(self *C.QAbstractListModel, 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((&QAbstractListModel{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 *QAbstractListModel) callVirtualBase_Submit() bool { + + return (bool)(C.QAbstractListModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QAbstractListModel) OnSubmit(slot func(super func() bool) bool) { + C.QAbstractListModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Submit +func miqt_exec_callback_QAbstractListModel_Submit(self *C.QAbstractListModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractListModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_Revert() { + + C.QAbstractListModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QAbstractListModel) OnRevert(slot func(super func())) { + C.QAbstractListModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Revert +func miqt_exec_callback_QAbstractListModel_Revert(self *C.QAbstractListModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractListModel{h: self}).callVirtualBase_Revert) + +} + // Delete this object from C++ memory. func (this *QAbstractListModel) Delete() { C.QAbstractListModel_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qabstractitemmodel.h b/qt/gen_qabstractitemmodel.h index 5a778a7a..6bb0e8ce 100644 --- a/qt/gen_qabstractitemmodel.h +++ b/qt/gen_qabstractitemmodel.h @@ -19,24 +19,32 @@ class QAbstractItemModel; class QAbstractListModel; class QAbstractTableModel; class QByteArray; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QMimeData; class QModelIndex; class QObject; class QPersistentModelIndex; class QSize; +class QTimerEvent; class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractListModel QAbstractListModel; typedef struct QAbstractTableModel QAbstractTableModel; 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 QModelIndex QModelIndex; typedef struct QObject QObject; typedef struct QPersistentModelIndex QPersistentModelIndex; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif @@ -86,6 +94,8 @@ bool QPersistentModelIndex_IsValid(const QPersistentModelIndex* self); QVariant* QPersistentModelIndex_Data1(const QPersistentModelIndex* self, int role); void QPersistentModelIndex_Delete(QPersistentModelIndex* self, bool isSubclass); +void QAbstractItemModel_new(QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QAbstractItemModel_new2(QObject* parent, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QAbstractItemModel_MetaObject(const QAbstractItemModel* self); void* QAbstractItemModel_Metacast(QAbstractItemModel* self, const char* param1); struct miqt_string QAbstractItemModel_Tr(const char* s); @@ -160,8 +170,92 @@ 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_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QAbstractItemModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QAbstractItemModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QAbstractItemModel_virtualbase_Parent(const void* self, QModelIndex* child); +void QAbstractItemModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QAbstractItemModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QAbstractItemModel_override_virtual_RowCount(void* self, intptr_t slot); +int QAbstractItemModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QAbstractItemModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QAbstractItemModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QAbstractItemModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_HasChildren(const void* self, QModelIndex* parent); +void QAbstractItemModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QAbstractItemModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QAbstractItemModel_override_virtual_SetData(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QAbstractItemModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QAbstractItemModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QAbstractItemModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QAbstractItemModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QAbstractItemModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QAbstractItemModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QAbstractItemModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QAbstractItemModel_virtualbase_MimeTypes(const void* self); +void QAbstractItemModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QAbstractItemModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QAbstractItemModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QAbstractItemModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QAbstractItemModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QAbstractItemModel_virtualbase_SupportedDropActions(const void* self); +void QAbstractItemModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QAbstractItemModel_virtualbase_SupportedDragActions(const void* self); +void QAbstractItemModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QAbstractItemModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QAbstractItemModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QAbstractItemModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QAbstractItemModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QAbstractItemModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QAbstractItemModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QAbstractItemModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QAbstractItemModel_override_virtual_Flags(void* self, intptr_t slot); +int QAbstractItemModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QAbstractItemModel_override_virtual_Sort(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_Sort(void* self, int column, int order); +void QAbstractItemModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QAbstractItemModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QAbstractItemModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QAbstractItemModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QAbstractItemModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QAbstractItemModel_virtualbase_Span(const void* self, QModelIndex* index); +void QAbstractItemModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QAbstractItemModel_virtualbase_RoleNames(const void* self); +void QAbstractItemModel_override_virtual_Submit(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_Submit(void* self); +void QAbstractItemModel_override_virtual_Revert(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_Revert(void* self); +void QAbstractItemModel_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_Event(void* self, QEvent* event); +void QAbstractItemModel_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAbstractItemModel_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractItemModel_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAbstractItemModel_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_CustomEvent(void* self, QEvent* event); +void QAbstractItemModel_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAbstractItemModel_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractItemModel_Delete(QAbstractItemModel* self, bool isSubclass); +void QAbstractTableModel_new(QAbstractTableModel** outptr_QAbstractTableModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QAbstractTableModel_new2(QObject* parent, QAbstractTableModel** outptr_QAbstractTableModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QAbstractTableModel_MetaObject(const QAbstractTableModel* self); void* QAbstractTableModel_Metacast(QAbstractTableModel* self, const char* param1); struct miqt_string QAbstractTableModel_Tr(const char* s); @@ -174,8 +268,74 @@ 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); +void QAbstractTableModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QAbstractTableModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QAbstractTableModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QAbstractTableModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QAbstractTableModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QAbstractTableModel_override_virtual_Flags(void* self, intptr_t slot); +int QAbstractTableModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QAbstractTableModel_override_virtual_RowCount(void* self, intptr_t slot); +int QAbstractTableModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QAbstractTableModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QAbstractTableModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QAbstractTableModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QAbstractTableModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QAbstractTableModel_override_virtual_SetData(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QAbstractTableModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QAbstractTableModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QAbstractTableModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QAbstractTableModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QAbstractTableModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QAbstractTableModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QAbstractTableModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QAbstractTableModel_virtualbase_MimeTypes(const void* self); +void QAbstractTableModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QAbstractTableModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QAbstractTableModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QAbstractTableModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QAbstractTableModel_virtualbase_SupportedDropActions(const void* self); +void QAbstractTableModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QAbstractTableModel_virtualbase_SupportedDragActions(const void* self); +void QAbstractTableModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QAbstractTableModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QAbstractTableModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QAbstractTableModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QAbstractTableModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QAbstractTableModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QAbstractTableModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QAbstractTableModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QAbstractTableModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QAbstractTableModel_override_virtual_Sort(void* self, intptr_t slot); +void QAbstractTableModel_virtualbase_Sort(void* self, int column, int order); +void QAbstractTableModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QAbstractTableModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QAbstractTableModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QAbstractTableModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QAbstractTableModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QAbstractTableModel_virtualbase_Span(const void* self, QModelIndex* index); +void QAbstractTableModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QAbstractTableModel_virtualbase_RoleNames(const void* self); +void QAbstractTableModel_override_virtual_Submit(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_Submit(void* self); +void QAbstractTableModel_override_virtual_Revert(void* self, intptr_t slot); +void QAbstractTableModel_virtualbase_Revert(void* self); void QAbstractTableModel_Delete(QAbstractTableModel* self, bool isSubclass); +void QAbstractListModel_new(QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QAbstractListModel_new2(QObject* parent, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QAbstractListModel_MetaObject(const QAbstractListModel* self); void* QAbstractListModel_Metacast(QAbstractListModel* self, const char* param1); struct miqt_string QAbstractListModel_Tr(const char* s); @@ -188,6 +348,68 @@ 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); +void QAbstractListModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QAbstractListModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QAbstractListModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QAbstractListModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QAbstractListModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QAbstractListModel_override_virtual_Flags(void* self, intptr_t slot); +int QAbstractListModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QAbstractListModel_override_virtual_RowCount(void* self, intptr_t slot); +int QAbstractListModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QAbstractListModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QAbstractListModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QAbstractListModel_override_virtual_SetData(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QAbstractListModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QAbstractListModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QAbstractListModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QAbstractListModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QAbstractListModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QAbstractListModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QAbstractListModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QAbstractListModel_virtualbase_MimeTypes(const void* self); +void QAbstractListModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QAbstractListModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QAbstractListModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QAbstractListModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QAbstractListModel_virtualbase_SupportedDropActions(const void* self); +void QAbstractListModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QAbstractListModel_virtualbase_SupportedDragActions(const void* self); +void QAbstractListModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QAbstractListModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QAbstractListModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QAbstractListModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QAbstractListModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QAbstractListModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QAbstractListModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QAbstractListModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QAbstractListModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QAbstractListModel_override_virtual_Sort(void* self, intptr_t slot); +void QAbstractListModel_virtualbase_Sort(void* self, int column, int order); +void QAbstractListModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QAbstractListModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QAbstractListModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QAbstractListModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QAbstractListModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QAbstractListModel_virtualbase_Span(const void* self, QModelIndex* index); +void QAbstractListModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QAbstractListModel_virtualbase_RoleNames(const void* self); +void QAbstractListModel_override_virtual_Submit(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_Submit(void* self); +void QAbstractListModel_override_virtual_Revert(void* self, intptr_t slot); +void QAbstractListModel_virtualbase_Revert(void* self); void QAbstractListModel_Delete(QAbstractListModel* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qabstractitemview.cpp b/qt/gen_qabstractitemview.cpp index 12aebb58..960e2246 100644 --- a/qt/gen_qabstractitemview.cpp +++ b/qt/gen_qabstractitemview.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -10,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -18,8 +20,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -28,11 +32,1601 @@ #include #include #include +#include #include #include #include "gen_qabstractitemview.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractItemView : public virtual QAbstractItemView { +public: + + MiqtVirtualQAbstractItemView(QWidget* parent): QAbstractItemView(parent) {}; + MiqtVirtualQAbstractItemView(): QAbstractItemView() {}; + + virtual ~MiqtVirtualQAbstractItemView() = 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) { + QAbstractItemView::setModel(model); + return; + } + + QAbstractItemModel* sigval1 = model; + + miqt_exec_callback_QAbstractItemView_SetModel(this, handle__SetModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModel(QAbstractItemModel* model) { + + QAbstractItemView::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) { + QAbstractItemView::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QAbstractItemView_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QAbstractItemView::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) { + QAbstractItemView::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_QAbstractItemView_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); + + QAbstractItemView::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 QRect(); // Pure virtual, there is no base we can call + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QAbstractItemView_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + 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_QAbstractItemView_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // 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 QModelIndex(); // Pure virtual, there is no base we can call + } + + const QPoint& point_ret = point; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&point_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QAbstractItemView_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // 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 QAbstractItemView::sizeHintForRow(row); + } + + int sigval1 = row; + + int callback_return_value = miqt_exec_callback_QAbstractItemView_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 QAbstractItemView::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 QAbstractItemView::sizeHintForColumn(column); + } + + int sigval1 = column; + + int callback_return_value = miqt_exec_callback_QAbstractItemView_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 QAbstractItemView::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 QAbstractItemView::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QAbstractItemView_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(QAbstractItemView::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) { + QAbstractItemView::reset(); + return; + } + + + miqt_exec_callback_QAbstractItemView_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QAbstractItemView::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) { + QAbstractItemView::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QAbstractItemView_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QAbstractItemView::setRootIndex(*index); + + } + + // 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) { + QAbstractItemView::doItemsLayout(); + return; + } + + + miqt_exec_callback_QAbstractItemView_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QAbstractItemView::doItemsLayout(); + + } + + // 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) { + QAbstractItemView::selectAll(); + return; + } + + + miqt_exec_callback_QAbstractItemView_SelectAll(this, handle__SelectAll); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectAll() { + + QAbstractItemView::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) { + QAbstractItemView::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_QAbstractItemView_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])); + } + + QAbstractItemView::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) { + QAbstractItemView::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_QAbstractItemView_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QAbstractItemView::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) { + QAbstractItemView::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_QAbstractItemView_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QAbstractItemView::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QAbstractItemView::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QAbstractItemView_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QAbstractItemView::selectionChanged(*selected, *deselected); + + } + + // 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) { + QAbstractItemView::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_QAbstractItemView_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { + + QAbstractItemView::currentChanged(*current, *previous); + + } + + // 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) { + QAbstractItemView::updateEditorData(); + return; + } + + + miqt_exec_callback_QAbstractItemView_UpdateEditorData(this, handle__UpdateEditorData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorData() { + + QAbstractItemView::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) { + QAbstractItemView::updateEditorGeometries(); + return; + } + + + miqt_exec_callback_QAbstractItemView_UpdateEditorGeometries(this, handle__UpdateEditorGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorGeometries() { + + QAbstractItemView::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) { + QAbstractItemView::updateGeometries(); + return; + } + + + miqt_exec_callback_QAbstractItemView_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QAbstractItemView::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) { + QAbstractItemView::verticalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QAbstractItemView_VerticalScrollbarAction(this, handle__VerticalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarAction(int action) { + + QAbstractItemView::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) { + QAbstractItemView::horizontalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QAbstractItemView_HorizontalScrollbarAction(this, handle__HorizontalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarAction(int action) { + + QAbstractItemView::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) { + QAbstractItemView::verticalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QAbstractItemView_VerticalScrollbarValueChanged(this, handle__VerticalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarValueChanged(int value) { + + QAbstractItemView::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) { + QAbstractItemView::horizontalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QAbstractItemView_HorizontalScrollbarValueChanged(this, handle__HorizontalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarValueChanged(int value) { + + QAbstractItemView::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) { + QAbstractItemView::closeEditor(editor, hint); + return; + } + + QWidget* sigval1 = editor; + QAbstractItemDelegate::EndEditHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QAbstractItemView_CloseEditor(this, handle__CloseEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEditor(QWidget* editor, int hint) { + + QAbstractItemView::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) { + QAbstractItemView::commitData(editor); + return; + } + + QWidget* sigval1 = editor; + + miqt_exec_callback_QAbstractItemView_CommitData(this, handle__CommitData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CommitData(QWidget* editor) { + + QAbstractItemView::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) { + QAbstractItemView::editorDestroyed(editor); + return; + } + + QObject* sigval1 = editor; + + miqt_exec_callback_QAbstractItemView_EditorDestroyed(this, handle__EditorDestroyed, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EditorDestroyed(QObject* editor) { + + QAbstractItemView::editorDestroyed(editor); + + } + + // 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 QModelIndex(); // Pure virtual, there is no base we can call + } + + 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_QAbstractItemView_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // 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 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QAbstractItemView_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // 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 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QAbstractItemView_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // 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 false; // Pure virtual, there is no base we can call + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractItemView_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + 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_QAbstractItemView_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QRegion(); // Pure virtual, there is no base we can call + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QAbstractItemView_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // 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 QAbstractItemView::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QAbstractItemView_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 = QAbstractItemView::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 QAbstractItemView::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_QAbstractItemView_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 QAbstractItemView::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 QAbstractItemView::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_QAbstractItemView_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 = QAbstractItemView::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) { + QAbstractItemView::startDrag(supportedActions); + return; + } + + Qt::DropActions supportedActions_ret = supportedActions; + int sigval1 = static_cast(supportedActions_ret); + + miqt_exec_callback_QAbstractItemView_StartDrag(this, handle__StartDrag, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartDrag(int supportedActions) { + + QAbstractItemView::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 QAbstractItemView::viewOptions(); + } + + + QStyleOptionViewItem* callback_return_value = miqt_exec_callback_QAbstractItemView_ViewOptions(const_cast(this), handle__ViewOptions); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QStyleOptionViewItem* virtualbase_ViewOptions() const { + + return new QStyleOptionViewItem(QAbstractItemView::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 QAbstractItemView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QAbstractItemView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QAbstractItemView::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 QAbstractItemView::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractItemView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAbstractItemView::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 QAbstractItemView::viewportEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractItemView_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* event) { + + return QAbstractItemView::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) { + QAbstractItemView::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QAbstractItemView::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 QAbstractItemView::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractItemView_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QAbstractItemView::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 QAbstractItemView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractItemView_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QAbstractItemView::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 QAbstractItemView::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractItemView_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QAbstractItemView::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 QAbstractItemView::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractItemView_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QAbstractItemView::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) { + QAbstractItemView::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_QAbstractItemView_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* viewport) { + + QAbstractItemView::setupViewport(viewport); + + } + + // 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) { + QAbstractItemView::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractItemView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QAbstractItemView::paintEvent(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) { + QAbstractItemView::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractItemView_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QAbstractItemView::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) { + QAbstractItemView::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractItemView_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QAbstractItemView::contextMenuEvent(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) { + QAbstractItemView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QAbstractItemView_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QAbstractItemView::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + +}; + +void QAbstractItemView_new(QWidget* parent, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractItemView* ret = new MiqtVirtualQAbstractItemView(parent); + *outptr_QAbstractItemView = 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 QAbstractItemView_new2(QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractItemView* ret = new MiqtVirtualQAbstractItemView(); + *outptr_QAbstractItemView = 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* QAbstractItemView_MetaObject(const QAbstractItemView* self) { return (QMetaObject*) self->metaObject(); } @@ -357,7 +1951,7 @@ void QAbstractItemView_Pressed(QAbstractItemView* self, QModelIndex* index) { } void QAbstractItemView_connect_Pressed(QAbstractItemView* self, intptr_t slot) { - QAbstractItemView::connect(self, static_cast(&QAbstractItemView::pressed), self, [=](const QModelIndex& index) { + MiqtVirtualQAbstractItemView::connect(self, static_cast(&QAbstractItemView::pressed), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); @@ -370,7 +1964,7 @@ void QAbstractItemView_Clicked(QAbstractItemView* self, QModelIndex* index) { } void QAbstractItemView_connect_Clicked(QAbstractItemView* self, intptr_t slot) { - QAbstractItemView::connect(self, static_cast(&QAbstractItemView::clicked), self, [=](const QModelIndex& index) { + MiqtVirtualQAbstractItemView::connect(self, static_cast(&QAbstractItemView::clicked), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); @@ -383,7 +1977,7 @@ void QAbstractItemView_DoubleClicked(QAbstractItemView* self, QModelIndex* index } void QAbstractItemView_connect_DoubleClicked(QAbstractItemView* self, intptr_t slot) { - QAbstractItemView::connect(self, static_cast(&QAbstractItemView::doubleClicked), self, [=](const QModelIndex& index) { + MiqtVirtualQAbstractItemView::connect(self, static_cast(&QAbstractItemView::doubleClicked), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); @@ -396,7 +1990,7 @@ void QAbstractItemView_Activated(QAbstractItemView* self, QModelIndex* index) { } void QAbstractItemView_connect_Activated(QAbstractItemView* self, intptr_t slot) { - QAbstractItemView::connect(self, static_cast(&QAbstractItemView::activated), self, [=](const QModelIndex& index) { + MiqtVirtualQAbstractItemView::connect(self, static_cast(&QAbstractItemView::activated), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); @@ -409,7 +2003,7 @@ void QAbstractItemView_Entered(QAbstractItemView* self, QModelIndex* index) { } void QAbstractItemView_connect_Entered(QAbstractItemView* self, intptr_t slot) { - QAbstractItemView::connect(self, static_cast(&QAbstractItemView::entered), self, [=](const QModelIndex& index) { + MiqtVirtualQAbstractItemView::connect(self, static_cast(&QAbstractItemView::entered), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); @@ -422,7 +2016,7 @@ void QAbstractItemView_ViewportEntered(QAbstractItemView* self) { } void QAbstractItemView_connect_ViewportEntered(QAbstractItemView* self, intptr_t slot) { - QAbstractItemView::connect(self, static_cast(&QAbstractItemView::viewportEntered), self, [=]() { + MiqtVirtualQAbstractItemView::connect(self, static_cast(&QAbstractItemView::viewportEntered), self, [=]() { miqt_exec_callback_QAbstractItemView_ViewportEntered(slot); }); } @@ -432,7 +2026,7 @@ void QAbstractItemView_IconSizeChanged(QAbstractItemView* self, QSize* size) { } void QAbstractItemView_connect_IconSizeChanged(QAbstractItemView* self, intptr_t slot) { - QAbstractItemView::connect(self, static_cast(&QAbstractItemView::iconSizeChanged), self, [=](const QSize& size) { + MiqtVirtualQAbstractItemView::connect(self, static_cast(&QAbstractItemView::iconSizeChanged), self, [=](const QSize& size) { const QSize& size_ret = size; // Cast returned reference into pointer QSize* sigval1 = const_cast(&size_ret); @@ -484,9 +2078,493 @@ struct miqt_string QAbstractItemView_TrUtf83(const char* s, const char* c, int n return _ms; } +void QAbstractItemView_override_virtual_SetModel(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SetModel = slot; +} + +void QAbstractItemView_virtualbase_SetModel(void* self, QAbstractItemModel* model) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SetModel(model); +} + +void QAbstractItemView_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SetSelectionModel = slot; +} + +void QAbstractItemView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QAbstractItemView_override_virtual_KeyboardSearch(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__KeyboardSearch = slot; +} + +void QAbstractItemView_virtualbase_KeyboardSearch(void* self, struct miqt_string search) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_KeyboardSearch(search); +} + +void QAbstractItemView_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__VisualRect = slot; +} + +void QAbstractItemView_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__ScrollTo = slot; +} + +void QAbstractItemView_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__IndexAt = slot; +} + +void QAbstractItemView_override_virtual_SizeHintForRow(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SizeHintForRow = slot; +} + +int QAbstractItemView_virtualbase_SizeHintForRow(const void* self, int row) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SizeHintForRow(row); +} + +void QAbstractItemView_override_virtual_SizeHintForColumn(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SizeHintForColumn = slot; +} + +int QAbstractItemView_virtualbase_SizeHintForColumn(const void* self, int column) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SizeHintForColumn(column); +} + +void QAbstractItemView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QAbstractItemView_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QAbstractItemView_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__Reset = slot; +} + +void QAbstractItemView_virtualbase_Reset(void* self) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_Reset(); +} + +void QAbstractItemView_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SetRootIndex = slot; +} + +void QAbstractItemView_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SetRootIndex(index); +} + +void QAbstractItemView_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__DoItemsLayout = slot; +} + +void QAbstractItemView_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_DoItemsLayout(); +} + +void QAbstractItemView_override_virtual_SelectAll(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SelectAll = slot; +} + +void QAbstractItemView_virtualbase_SelectAll(void* self) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SelectAll(); +} + +void QAbstractItemView_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__DataChanged = slot; +} + +void QAbstractItemView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); +} + +void QAbstractItemView_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__RowsInserted = slot; +} + +void QAbstractItemView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_RowsInserted(parent, start, end); +} + +void QAbstractItemView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__RowsAboutToBeRemoved = slot; +} + +void QAbstractItemView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); +} + +void QAbstractItemView_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SelectionChanged = slot; +} + +void QAbstractItemView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + +void QAbstractItemView_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__CurrentChanged = slot; +} + +void QAbstractItemView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_CurrentChanged(current, previous); +} + +void QAbstractItemView_override_virtual_UpdateEditorData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__UpdateEditorData = slot; +} + +void QAbstractItemView_virtualbase_UpdateEditorData(void* self) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_UpdateEditorData(); +} + +void QAbstractItemView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__UpdateEditorGeometries = slot; +} + +void QAbstractItemView_virtualbase_UpdateEditorGeometries(void* self) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_UpdateEditorGeometries(); +} + +void QAbstractItemView_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__UpdateGeometries = slot; +} + +void QAbstractItemView_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_UpdateGeometries(); +} + +void QAbstractItemView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__VerticalScrollbarAction = slot; +} + +void QAbstractItemView_virtualbase_VerticalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_VerticalScrollbarAction(action); +} + +void QAbstractItemView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__HorizontalScrollbarAction = slot; +} + +void QAbstractItemView_virtualbase_HorizontalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_HorizontalScrollbarAction(action); +} + +void QAbstractItemView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__VerticalScrollbarValueChanged = slot; +} + +void QAbstractItemView_virtualbase_VerticalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_VerticalScrollbarValueChanged(value); +} + +void QAbstractItemView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__HorizontalScrollbarValueChanged = slot; +} + +void QAbstractItemView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_HorizontalScrollbarValueChanged(value); +} + +void QAbstractItemView_override_virtual_CloseEditor(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__CloseEditor = slot; +} + +void QAbstractItemView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_CloseEditor(editor, hint); +} + +void QAbstractItemView_override_virtual_CommitData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__CommitData = slot; +} + +void QAbstractItemView_virtualbase_CommitData(void* self, QWidget* editor) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_CommitData(editor); +} + +void QAbstractItemView_override_virtual_EditorDestroyed(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__EditorDestroyed = slot; +} + +void QAbstractItemView_virtualbase_EditorDestroyed(void* self, QObject* editor) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_EditorDestroyed(editor); +} + +void QAbstractItemView_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__MoveCursor = slot; +} + +void QAbstractItemView_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__HorizontalOffset = slot; +} + +void QAbstractItemView_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__VerticalOffset = slot; +} + +void QAbstractItemView_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__IsIndexHidden = slot; +} + +void QAbstractItemView_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SetSelection = slot; +} + +void QAbstractItemView_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__VisualRegionForSelection = slot; +} + +void QAbstractItemView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QAbstractItemView_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SelectedIndexes(); +} + +void QAbstractItemView_override_virtual_Edit2(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__Edit2 = slot; +} + +bool QAbstractItemView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event) { + return ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_Edit2(index, trigger, event); +} + +void QAbstractItemView_override_virtual_SelectionCommand(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SelectionCommand = slot; +} + +int QAbstractItemView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SelectionCommand(index, event); +} + +void QAbstractItemView_override_virtual_StartDrag(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__StartDrag = slot; +} + +void QAbstractItemView_virtualbase_StartDrag(void* self, int supportedActions) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_StartDrag(supportedActions); +} + +void QAbstractItemView_override_virtual_ViewOptions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__ViewOptions = slot; +} + +QStyleOptionViewItem* QAbstractItemView_virtualbase_ViewOptions(const void* self) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_ViewOptions(); +} + +void QAbstractItemView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QAbstractItemView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QAbstractItemView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__Event = slot; +} + +bool QAbstractItemView_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_Event(event); +} + +void QAbstractItemView_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__ViewportEvent = slot; +} + +bool QAbstractItemView_virtualbase_ViewportEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_ViewportEvent(event); +} + +void QAbstractItemView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__MousePressEvent = slot; +} + +void QAbstractItemView_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_MousePressEvent(event); +} + +void QAbstractItemView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QAbstractItemView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QAbstractItemView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QAbstractItemView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QAbstractItemView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QAbstractItemView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QAbstractItemView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__DragEnterEvent = slot; +} + +void QAbstractItemView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QAbstractItemView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__DragMoveEvent = slot; +} + +void QAbstractItemView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QAbstractItemView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QAbstractItemView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QAbstractItemView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__DropEvent = slot; +} + +void QAbstractItemView_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_DropEvent(event); +} + +void QAbstractItemView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__FocusInEvent = slot; +} + +void QAbstractItemView_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_FocusInEvent(event); +} + +void QAbstractItemView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__FocusOutEvent = slot; +} + +void QAbstractItemView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QAbstractItemView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__KeyPressEvent = slot; +} + +void QAbstractItemView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QAbstractItemView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__ResizeEvent = slot; +} + +void QAbstractItemView_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_ResizeEvent(event); +} + +void QAbstractItemView_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractItemView_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractItemView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__InputMethodEvent = slot; +} + +void QAbstractItemView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QAbstractItemView_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractItemView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_EventFilter(object, event); +} + +void QAbstractItemView_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QAbstractItemView_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QAbstractItemView_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QAbstractItemView_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QAbstractItemView_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SizeHint = slot; +} + +QSize* QAbstractItemView_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SizeHint(); +} + +void QAbstractItemView_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SetupViewport = slot; +} + +void QAbstractItemView_virtualbase_SetupViewport(void* self, QWidget* viewport) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SetupViewport(viewport); +} + +void QAbstractItemView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__PaintEvent = slot; +} + +void QAbstractItemView_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_PaintEvent(param1); +} + +void QAbstractItemView_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__WheelEvent = slot; +} + +void QAbstractItemView_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_WheelEvent(param1); +} + +void QAbstractItemView_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__ContextMenuEvent = slot; +} + +void QAbstractItemView_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QAbstractItemView_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__ScrollContentsBy = slot; +} + +void QAbstractItemView_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + void QAbstractItemView_Delete(QAbstractItemView* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qabstractitemview.go b/qt/gen_qabstractitemview.go index a7df8822..30c8d6de 100644 --- a/qt/gen_qabstractitemview.go +++ b/qt/gen_qabstractitemview.go @@ -145,6 +145,36 @@ func UnsafeNewQAbstractItemView(h unsafe.Pointer, h_QAbstractScrollArea unsafe.P QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } +// NewQAbstractItemView constructs a new QAbstractItemView object. +func NewQAbstractItemView(parent *QWidget) *QAbstractItemView { + 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.QAbstractItemView_new(parent.cPointer(), &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractItemView(outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQAbstractItemView2 constructs a new QAbstractItemView object. +func NewQAbstractItemView2() *QAbstractItemView { + 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.QAbstractItemView_new2(&outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractItemView(outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + func (this *QAbstractItemView) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractItemView_MetaObject(this.h))) } @@ -659,6 +689,1521 @@ func QAbstractItemView_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QAbstractItemView) callVirtualBase_SetModel(model *QAbstractItemModel) { + + C.QAbstractItemView_virtualbase_SetModel(unsafe.Pointer(this.h), model.cPointer()) + +} +func (this *QAbstractItemView) OnSetModel(slot func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) { + C.QAbstractItemView_override_virtual_SetModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SetModel +func miqt_exec_callback_QAbstractItemView_SetModel(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_SetModel, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QAbstractItemView_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QAbstractItemView) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QAbstractItemView_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SetSelectionModel +func miqt_exec_callback_QAbstractItemView_SetSelectionModel(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QAbstractItemView) 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.QAbstractItemView_virtualbase_KeyboardSearch(unsafe.Pointer(this.h), search_ms) + +} +func (this *QAbstractItemView) OnKeyboardSearch(slot func(super func(search string), search string)) { + C.QAbstractItemView_override_virtual_KeyboardSearch(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_KeyboardSearch +func miqt_exec_callback_QAbstractItemView_KeyboardSearch(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_KeyboardSearch, slotval1) + +} +func (this *QAbstractItemView) OnVisualRect(slot func(index *QModelIndex) *QRect) { + C.QAbstractItemView_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_VisualRect +func miqt_exec_callback_QAbstractItemView_VisualRect(self *C.QAbstractItemView, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} +func (this *QAbstractItemView) OnScrollTo(slot func(index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QAbstractItemView_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_ScrollTo +func miqt_exec_callback_QAbstractItemView_ScrollTo(self *C.QAbstractItemView, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + +} +func (this *QAbstractItemView) OnIndexAt(slot func(point *QPoint) *QModelIndex) { + C.QAbstractItemView_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_IndexAt +func miqt_exec_callback_QAbstractItemView_IndexAt(self *C.QAbstractItemView, cb C.intptr_t, point *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemView) callVirtualBase_SizeHintForRow(row int) int { + + return (int)(C.QAbstractItemView_virtualbase_SizeHintForRow(unsafe.Pointer(this.h), (C.int)(row))) + +} +func (this *QAbstractItemView) OnSizeHintForRow(slot func(super func(row int) int, row int) int) { + C.QAbstractItemView_override_virtual_SizeHintForRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SizeHintForRow +func miqt_exec_callback_QAbstractItemView_SizeHintForRow(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_SizeHintForRow, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractItemView) callVirtualBase_SizeHintForColumn(column int) int { + + return (int)(C.QAbstractItemView_virtualbase_SizeHintForColumn(unsafe.Pointer(this.h), (C.int)(column))) + +} +func (this *QAbstractItemView) OnSizeHintForColumn(slot func(super func(column int) int, column int) int) { + C.QAbstractItemView_override_virtual_SizeHintForColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SizeHintForColumn +func miqt_exec_callback_QAbstractItemView_SizeHintForColumn(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_SizeHintForColumn, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractItemView) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QAbstractItemView_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 *QAbstractItemView) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QAbstractItemView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_InputMethodQuery +func miqt_exec_callback_QAbstractItemView_InputMethodQuery(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemView) callVirtualBase_Reset() { + + C.QAbstractItemView_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QAbstractItemView) OnReset(slot func(super func())) { + C.QAbstractItemView_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_Reset +func miqt_exec_callback_QAbstractItemView_Reset(self *C.QAbstractItemView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractItemView{h: self}).callVirtualBase_Reset) + +} + +func (this *QAbstractItemView) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QAbstractItemView_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QAbstractItemView) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QAbstractItemView_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SetRootIndex +func miqt_exec_callback_QAbstractItemView_SetRootIndex(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_DoItemsLayout() { + + C.QAbstractItemView_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QAbstractItemView) OnDoItemsLayout(slot func(super func())) { + C.QAbstractItemView_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_DoItemsLayout +func miqt_exec_callback_QAbstractItemView_DoItemsLayout(self *C.QAbstractItemView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractItemView{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QAbstractItemView) callVirtualBase_SelectAll() { + + C.QAbstractItemView_virtualbase_SelectAll(unsafe.Pointer(this.h)) + +} +func (this *QAbstractItemView) OnSelectAll(slot func(super func())) { + C.QAbstractItemView_override_virtual_SelectAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SelectAll +func miqt_exec_callback_QAbstractItemView_SelectAll(self *C.QAbstractItemView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractItemView{h: self}).callVirtualBase_SelectAll) + +} + +func (this *QAbstractItemView) 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.QAbstractItemView_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QAbstractItemView) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QAbstractItemView_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_DataChanged +func miqt_exec_callback_QAbstractItemView_DataChanged(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QAbstractItemView) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QAbstractItemView_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QAbstractItemView) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QAbstractItemView_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_RowsInserted +func miqt_exec_callback_QAbstractItemView_RowsInserted(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QAbstractItemView) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QAbstractItemView_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QAbstractItemView) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QAbstractItemView_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_RowsAboutToBeRemoved +func miqt_exec_callback_QAbstractItemView_RowsAboutToBeRemoved(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QAbstractItemView) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QAbstractItemView_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QAbstractItemView) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QAbstractItemView_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SelectionChanged +func miqt_exec_callback_QAbstractItemView_SelectionChanged(self *C.QAbstractItemView, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QAbstractItemView{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + +func (this *QAbstractItemView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QAbstractItemView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QAbstractItemView) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QAbstractItemView_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_CurrentChanged +func miqt_exec_callback_QAbstractItemView_CurrentChanged(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + +func (this *QAbstractItemView) callVirtualBase_UpdateEditorData() { + + C.QAbstractItemView_virtualbase_UpdateEditorData(unsafe.Pointer(this.h)) + +} +func (this *QAbstractItemView) OnUpdateEditorData(slot func(super func())) { + C.QAbstractItemView_override_virtual_UpdateEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_UpdateEditorData +func miqt_exec_callback_QAbstractItemView_UpdateEditorData(self *C.QAbstractItemView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractItemView{h: self}).callVirtualBase_UpdateEditorData) + +} + +func (this *QAbstractItemView) callVirtualBase_UpdateEditorGeometries() { + + C.QAbstractItemView_virtualbase_UpdateEditorGeometries(unsafe.Pointer(this.h)) + +} +func (this *QAbstractItemView) OnUpdateEditorGeometries(slot func(super func())) { + C.QAbstractItemView_override_virtual_UpdateEditorGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_UpdateEditorGeometries +func miqt_exec_callback_QAbstractItemView_UpdateEditorGeometries(self *C.QAbstractItemView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractItemView{h: self}).callVirtualBase_UpdateEditorGeometries) + +} + +func (this *QAbstractItemView) callVirtualBase_UpdateGeometries() { + + C.QAbstractItemView_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QAbstractItemView) OnUpdateGeometries(slot func(super func())) { + C.QAbstractItemView_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_UpdateGeometries +func miqt_exec_callback_QAbstractItemView_UpdateGeometries(self *C.QAbstractItemView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractItemView{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QAbstractItemView) callVirtualBase_VerticalScrollbarAction(action int) { + + C.QAbstractItemView_virtualbase_VerticalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QAbstractItemView) OnVerticalScrollbarAction(slot func(super func(action int), action int)) { + C.QAbstractItemView_override_virtual_VerticalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_VerticalScrollbarAction +func miqt_exec_callback_QAbstractItemView_VerticalScrollbarAction(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_VerticalScrollbarAction, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_HorizontalScrollbarAction(action int) { + + C.QAbstractItemView_virtualbase_HorizontalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QAbstractItemView) OnHorizontalScrollbarAction(slot func(super func(action int), action int)) { + C.QAbstractItemView_override_virtual_HorizontalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_HorizontalScrollbarAction +func miqt_exec_callback_QAbstractItemView_HorizontalScrollbarAction(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_HorizontalScrollbarAction, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_VerticalScrollbarValueChanged(value int) { + + C.QAbstractItemView_virtualbase_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QAbstractItemView) OnVerticalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QAbstractItemView_override_virtual_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_VerticalScrollbarValueChanged +func miqt_exec_callback_QAbstractItemView_VerticalScrollbarValueChanged(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_VerticalScrollbarValueChanged, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_HorizontalScrollbarValueChanged(value int) { + + C.QAbstractItemView_virtualbase_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QAbstractItemView) OnHorizontalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QAbstractItemView_override_virtual_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_HorizontalScrollbarValueChanged +func miqt_exec_callback_QAbstractItemView_HorizontalScrollbarValueChanged(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_HorizontalScrollbarValueChanged, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_CloseEditor(editor *QWidget, hint QAbstractItemDelegate__EndEditHint) { + + C.QAbstractItemView_virtualbase_CloseEditor(unsafe.Pointer(this.h), editor.cPointer(), (C.int)(hint)) + +} +func (this *QAbstractItemView) OnCloseEditor(slot func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) { + C.QAbstractItemView_override_virtual_CloseEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_CloseEditor +func miqt_exec_callback_QAbstractItemView_CloseEditor(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_CloseEditor, slotval1, slotval2) + +} + +func (this *QAbstractItemView) callVirtualBase_CommitData(editor *QWidget) { + + C.QAbstractItemView_virtualbase_CommitData(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QAbstractItemView) OnCommitData(slot func(super func(editor *QWidget), editor *QWidget)) { + C.QAbstractItemView_override_virtual_CommitData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_CommitData +func miqt_exec_callback_QAbstractItemView_CommitData(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_CommitData, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_EditorDestroyed(editor *QObject) { + + C.QAbstractItemView_virtualbase_EditorDestroyed(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QAbstractItemView) OnEditorDestroyed(slot func(super func(editor *QObject), editor *QObject)) { + C.QAbstractItemView_override_virtual_EditorDestroyed(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_EditorDestroyed +func miqt_exec_callback_QAbstractItemView_EditorDestroyed(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_EditorDestroyed, slotval1) + +} +func (this *QAbstractItemView) OnMoveCursor(slot func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QAbstractItemView_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_MoveCursor +func miqt_exec_callback_QAbstractItemView_MoveCursor(self *C.QAbstractItemView, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return virtualReturn.cPointer() + +} +func (this *QAbstractItemView) OnHorizontalOffset(slot func() int) { + C.QAbstractItemView_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_HorizontalOffset +func miqt_exec_callback_QAbstractItemView_HorizontalOffset(self *C.QAbstractItemView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *QAbstractItemView) OnVerticalOffset(slot func() int) { + C.QAbstractItemView_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_VerticalOffset +func miqt_exec_callback_QAbstractItemView_VerticalOffset(self *C.QAbstractItemView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *QAbstractItemView) OnIsIndexHidden(slot func(index *QModelIndex) bool) { + C.QAbstractItemView_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_IsIndexHidden +func miqt_exec_callback_QAbstractItemView_IsIndexHidden(self *C.QAbstractItemView, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QAbstractItemView) OnSetSelection(slot func(rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QAbstractItemView_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SetSelection +func miqt_exec_callback_QAbstractItemView_SetSelection(self *C.QAbstractItemView, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + +} +func (this *QAbstractItemView) OnVisualRegionForSelection(slot func(selection *QItemSelection) *QRegion) { + C.QAbstractItemView_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_VisualRegionForSelection +func miqt_exec_callback_QAbstractItemView_VisualRegionForSelection(self *C.QAbstractItemView, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc(slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemView) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QAbstractItemView_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 *QAbstractItemView) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QAbstractItemView_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SelectedIndexes +func miqt_exec_callback_QAbstractItemView_SelectedIndexes(self *C.QAbstractItemView, 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((&QAbstractItemView{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 *QAbstractItemView) callVirtualBase_Edit2(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool { + + return (bool)(C.QAbstractItemView_virtualbase_Edit2(unsafe.Pointer(this.h), index.cPointer(), (C.int)(trigger), event.cPointer())) + +} +func (this *QAbstractItemView) OnEdit2(slot func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) { + C.QAbstractItemView_override_virtual_Edit2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_Edit2 +func miqt_exec_callback_QAbstractItemView_Edit2(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_Edit2, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemView) callVirtualBase_SelectionCommand(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag { + + return (QItemSelectionModel__SelectionFlag)(C.QAbstractItemView_virtualbase_SelectionCommand(unsafe.Pointer(this.h), index.cPointer(), event.cPointer())) + +} +func (this *QAbstractItemView) OnSelectionCommand(slot func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) { + C.QAbstractItemView_override_virtual_SelectionCommand(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SelectionCommand +func miqt_exec_callback_QAbstractItemView_SelectionCommand(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_SelectionCommand, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractItemView) callVirtualBase_StartDrag(supportedActions DropAction) { + + C.QAbstractItemView_virtualbase_StartDrag(unsafe.Pointer(this.h), (C.int)(supportedActions)) + +} +func (this *QAbstractItemView) OnStartDrag(slot func(super func(supportedActions DropAction), supportedActions DropAction)) { + C.QAbstractItemView_override_virtual_StartDrag(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_StartDrag +func miqt_exec_callback_QAbstractItemView_StartDrag(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_StartDrag, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_ViewOptions() *QStyleOptionViewItem { + + _ret := C.QAbstractItemView_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 *QAbstractItemView) OnViewOptions(slot func(super func() *QStyleOptionViewItem) *QStyleOptionViewItem) { + C.QAbstractItemView_override_virtual_ViewOptions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_ViewOptions +func miqt_exec_callback_QAbstractItemView_ViewOptions(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_ViewOptions) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QAbstractItemView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QAbstractItemView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QAbstractItemView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_FocusNextPrevChild +func miqt_exec_callback_QAbstractItemView_FocusNextPrevChild(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemView) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAbstractItemView_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractItemView) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractItemView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_Event +func miqt_exec_callback_QAbstractItemView_Event(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemView) callVirtualBase_ViewportEvent(event *QEvent) bool { + + return (bool)(C.QAbstractItemView_virtualbase_ViewportEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractItemView) OnViewportEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractItemView_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_ViewportEvent +func miqt_exec_callback_QAbstractItemView_ViewportEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemView) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QAbstractItemView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractItemView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_MousePressEvent +func miqt_exec_callback_QAbstractItemView_MousePressEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QAbstractItemView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractItemView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_MouseMoveEvent +func miqt_exec_callback_QAbstractItemView_MouseMoveEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QAbstractItemView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractItemView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_MouseReleaseEvent +func miqt_exec_callback_QAbstractItemView_MouseReleaseEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QAbstractItemView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractItemView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_MouseDoubleClickEvent +func miqt_exec_callback_QAbstractItemView_MouseDoubleClickEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QAbstractItemView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QAbstractItemView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_DragEnterEvent +func miqt_exec_callback_QAbstractItemView_DragEnterEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QAbstractItemView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QAbstractItemView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_DragMoveEvent +func miqt_exec_callback_QAbstractItemView_DragMoveEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QAbstractItemView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QAbstractItemView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_DragLeaveEvent +func miqt_exec_callback_QAbstractItemView_DragLeaveEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QAbstractItemView_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QAbstractItemView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_DropEvent +func miqt_exec_callback_QAbstractItemView_DropEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QAbstractItemView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QAbstractItemView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_FocusInEvent +func miqt_exec_callback_QAbstractItemView_FocusInEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QAbstractItemView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QAbstractItemView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_FocusOutEvent +func miqt_exec_callback_QAbstractItemView_FocusOutEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QAbstractItemView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QAbstractItemView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_KeyPressEvent +func miqt_exec_callback_QAbstractItemView_KeyPressEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QAbstractItemView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QAbstractItemView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_ResizeEvent +func miqt_exec_callback_QAbstractItemView_ResizeEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAbstractItemView_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAbstractItemView_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_TimerEvent +func miqt_exec_callback_QAbstractItemView_TimerEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QAbstractItemView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QAbstractItemView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_InputMethodEvent +func miqt_exec_callback_QAbstractItemView_InputMethodEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QAbstractItemView_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QAbstractItemView) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QAbstractItemView_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_EventFilter +func miqt_exec_callback_QAbstractItemView_EventFilter(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemView) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QAbstractItemView_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 *QAbstractItemView) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractItemView_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_ViewportSizeHint +func miqt_exec_callback_QAbstractItemView_ViewportSizeHint(self *C.QAbstractItemView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractItemView{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemView) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QAbstractItemView_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 *QAbstractItemView) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractItemView_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_MinimumSizeHint +func miqt_exec_callback_QAbstractItemView_MinimumSizeHint(self *C.QAbstractItemView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractItemView{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemView) callVirtualBase_SizeHint() *QSize { + + _ret := C.QAbstractItemView_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 *QAbstractItemView) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractItemView_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SizeHint +func miqt_exec_callback_QAbstractItemView_SizeHint(self *C.QAbstractItemView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractItemView{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemView) callVirtualBase_SetupViewport(viewport *QWidget) { + + C.QAbstractItemView_virtualbase_SetupViewport(unsafe.Pointer(this.h), viewport.cPointer()) + +} +func (this *QAbstractItemView) OnSetupViewport(slot func(super func(viewport *QWidget), viewport *QWidget)) { + C.QAbstractItemView_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SetupViewport +func miqt_exec_callback_QAbstractItemView_SetupViewport(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QAbstractItemView_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractItemView) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QAbstractItemView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_PaintEvent +func miqt_exec_callback_QAbstractItemView_PaintEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_WheelEvent(param1 *QWheelEvent) { + + C.QAbstractItemView_virtualbase_WheelEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractItemView) OnWheelEvent(slot func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) { + C.QAbstractItemView_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_WheelEvent +func miqt_exec_callback_QAbstractItemView_WheelEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QAbstractItemView_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractItemView) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QAbstractItemView_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_ContextMenuEvent +func miqt_exec_callback_QAbstractItemView_ContextMenuEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QAbstractItemView_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QAbstractItemView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QAbstractItemView_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_ScrollContentsBy +func miqt_exec_callback_QAbstractItemView_ScrollContentsBy(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + // Delete this object from C++ memory. func (this *QAbstractItemView) Delete() { C.QAbstractItemView_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qabstractitemview.h b/qt/gen_qabstractitemview.h index 53aad1e8..dbbbcafc 100644 --- a/qt/gen_qabstractitemview.h +++ b/qt/gen_qabstractitemview.h @@ -19,6 +19,7 @@ class QAbstractItemDelegate; class QAbstractItemModel; class QAbstractItemView; class QAbstractScrollArea; +class QContextMenuEvent; class QDragEnterEvent; class QDragLeaveEvent; class QDragMoveEvent; @@ -27,6 +28,7 @@ class QEvent; class QFocusEvent; class QFrame; class QInputMethodEvent; +class QItemSelection; class QItemSelectionModel; class QKeyEvent; class QMetaObject; @@ -34,19 +36,23 @@ class QModelIndex; class QMouseEvent; class QObject; class QPaintDevice; +class QPaintEvent; class QPoint; class QRect; +class QRegion; 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 QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; typedef struct QDragLeaveEvent QDragLeaveEvent; typedef struct QDragMoveEvent QDragMoveEvent; @@ -55,6 +61,7 @@ typedef struct QEvent QEvent; typedef struct QFocusEvent QFocusEvent; typedef struct QFrame QFrame; typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; @@ -62,16 +69,21 @@ 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 QRegion QRegion; 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 +void QAbstractItemView_new(QWidget* parent, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QAbstractItemView_new2(QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QAbstractItemView_MetaObject(const QAbstractItemView* self); void* QAbstractItemView_Metacast(QAbstractItemView* self, const char* param1); struct miqt_string QAbstractItemView_Tr(const char* s); @@ -149,6 +161,7 @@ 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_SelectionChanged(QAbstractItemView* self, QItemSelection* selected, QItemSelection* deselected); void QAbstractItemView_CurrentChanged(QAbstractItemView* self, QModelIndex* current, QModelIndex* previous); void QAbstractItemView_UpdateEditorData(QAbstractItemView* self); void QAbstractItemView_UpdateEditorGeometries(QAbstractItemView* self); @@ -179,6 +192,7 @@ 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); +QRegion* QAbstractItemView_VisualRegionForSelection(const QAbstractItemView* self, QItemSelection* selection); 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); @@ -207,6 +221,136 @@ 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_override_virtual_SetModel(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_SetModel(void* self, QAbstractItemModel* model); +void QAbstractItemView_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QAbstractItemView_override_virtual_KeyboardSearch(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_KeyboardSearch(void* self, struct miqt_string search); +void QAbstractItemView_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QAbstractItemView_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QAbstractItemView_override_virtual_ScrollTo(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QAbstractItemView_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QAbstractItemView_virtualbase_IndexAt(const void* self, QPoint* point); +void QAbstractItemView_override_virtual_SizeHintForRow(void* self, intptr_t slot); +int QAbstractItemView_virtualbase_SizeHintForRow(const void* self, int row); +void QAbstractItemView_override_virtual_SizeHintForColumn(void* self, intptr_t slot); +int QAbstractItemView_virtualbase_SizeHintForColumn(const void* self, int column); +void QAbstractItemView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QAbstractItemView_virtualbase_InputMethodQuery(const void* self, int query); +void QAbstractItemView_override_virtual_Reset(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_Reset(void* self); +void QAbstractItemView_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QAbstractItemView_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_DoItemsLayout(void* self); +void QAbstractItemView_override_virtual_SelectAll(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_SelectAll(void* self); +void QAbstractItemView_override_virtual_DataChanged(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QAbstractItemView_override_virtual_RowsInserted(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QAbstractItemView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QAbstractItemView_override_virtual_SelectionChanged(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); +void QAbstractItemView_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QAbstractItemView_override_virtual_UpdateEditorData(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_UpdateEditorData(void* self); +void QAbstractItemView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_UpdateEditorGeometries(void* self); +void QAbstractItemView_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_UpdateGeometries(void* self); +void QAbstractItemView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_VerticalScrollbarAction(void* self, int action); +void QAbstractItemView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_HorizontalScrollbarAction(void* self, int action); +void QAbstractItemView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_VerticalScrollbarValueChanged(void* self, int value); +void QAbstractItemView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value); +void QAbstractItemView_override_virtual_CloseEditor(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint); +void QAbstractItemView_override_virtual_CommitData(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_CommitData(void* self, QWidget* editor); +void QAbstractItemView_override_virtual_EditorDestroyed(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_EditorDestroyed(void* self, QObject* editor); +void QAbstractItemView_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QAbstractItemView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QAbstractItemView_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QAbstractItemView_virtualbase_HorizontalOffset(const void* self); +void QAbstractItemView_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QAbstractItemView_virtualbase_VerticalOffset(const void* self); +void QAbstractItemView_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QAbstractItemView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QAbstractItemView_override_virtual_SetSelection(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QAbstractItemView_override_virtual_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QAbstractItemView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); +void QAbstractItemView_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QAbstractItemView_virtualbase_SelectedIndexes(const void* self); +void QAbstractItemView_override_virtual_Edit2(void* self, intptr_t slot); +bool QAbstractItemView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event); +void QAbstractItemView_override_virtual_SelectionCommand(void* self, intptr_t slot); +int QAbstractItemView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event); +void QAbstractItemView_override_virtual_StartDrag(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_StartDrag(void* self, int supportedActions); +void QAbstractItemView_override_virtual_ViewOptions(void* self, intptr_t slot); +QStyleOptionViewItem* QAbstractItemView_virtualbase_ViewOptions(const void* self); +void QAbstractItemView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QAbstractItemView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QAbstractItemView_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractItemView_virtualbase_Event(void* self, QEvent* event); +void QAbstractItemView_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QAbstractItemView_virtualbase_ViewportEvent(void* self, QEvent* event); +void QAbstractItemView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QAbstractItemView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QAbstractItemView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QAbstractItemView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QAbstractItemView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QAbstractItemView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QAbstractItemView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QAbstractItemView_override_virtual_DropEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_DropEvent(void* self, QDropEvent* event); +void QAbstractItemView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QAbstractItemView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QAbstractItemView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QAbstractItemView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QAbstractItemView_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractItemView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QAbstractItemView_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractItemView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QAbstractItemView_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QAbstractItemView_virtualbase_ViewportSizeHint(const void* self); +void QAbstractItemView_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QAbstractItemView_virtualbase_MinimumSizeHint(const void* self); +void QAbstractItemView_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QAbstractItemView_virtualbase_SizeHint(const void* self); +void QAbstractItemView_override_virtual_SetupViewport(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_SetupViewport(void* self, QWidget* viewport); +void QAbstractItemView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QAbstractItemView_override_virtual_WheelEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QAbstractItemView_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QAbstractItemView_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_ScrollContentsBy(void* self, int dx, int dy); void QAbstractItemView_Delete(QAbstractItemView* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qabstractnativeeventfilter.cpp b/qt/gen_qabstractnativeeventfilter.cpp index 0fe7809a..1937aece 100644 --- a/qt/gen_qabstractnativeeventfilter.cpp +++ b/qt/gen_qabstractnativeeventfilter.cpp @@ -4,14 +4,55 @@ #include "gen_qabstractnativeeventfilter.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractNativeEventFilter : public virtual QAbstractNativeEventFilter { +public: + + MiqtVirtualQAbstractNativeEventFilter(): QAbstractNativeEventFilter() {}; + + virtual ~MiqtVirtualQAbstractNativeEventFilter() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEventFilter(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEventFilter == 0) { + return false; // Pure virtual, there is no base we can call + } + + 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_QAbstractNativeEventFilter_NativeEventFilter(this, handle__NativeEventFilter, sigval1, sigval2, sigval3); + + return callback_return_value; + } + +}; + +void QAbstractNativeEventFilter_new(QAbstractNativeEventFilter** outptr_QAbstractNativeEventFilter) { + MiqtVirtualQAbstractNativeEventFilter* ret = new MiqtVirtualQAbstractNativeEventFilter(); + *outptr_QAbstractNativeEventFilter = ret; +} + bool QAbstractNativeEventFilter_NativeEventFilter(QAbstractNativeEventFilter* self, struct miqt_string eventType, void* message, long* result) { QByteArray eventType_QByteArray(eventType.data, eventType.len); return self->nativeEventFilter(eventType_QByteArray, message, static_cast(result)); } +void QAbstractNativeEventFilter_override_virtual_NativeEventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractNativeEventFilter*)(self) )->handle__NativeEventFilter = slot; +} + void QAbstractNativeEventFilter_Delete(QAbstractNativeEventFilter* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qabstractnativeeventfilter.go b/qt/gen_qabstractnativeeventfilter.go index 114b960d..06387e0b 100644 --- a/qt/gen_qabstractnativeeventfilter.go +++ b/qt/gen_qabstractnativeeventfilter.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -49,12 +50,47 @@ func UnsafeNewQAbstractNativeEventFilter(h unsafe.Pointer) *QAbstractNativeEvent return &QAbstractNativeEventFilter{h: (*C.QAbstractNativeEventFilter)(h)} } +// NewQAbstractNativeEventFilter constructs a new QAbstractNativeEventFilter object. +func NewQAbstractNativeEventFilter() *QAbstractNativeEventFilter { + var outptr_QAbstractNativeEventFilter *C.QAbstractNativeEventFilter = nil + + C.QAbstractNativeEventFilter_new(&outptr_QAbstractNativeEventFilter) + ret := newQAbstractNativeEventFilter(outptr_QAbstractNativeEventFilter) + ret.isSubclass = true + return ret +} + func (this *QAbstractNativeEventFilter) NativeEventFilter(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.QAbstractNativeEventFilter_NativeEventFilter(this.h, eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) } +func (this *QAbstractNativeEventFilter) OnNativeEventFilter(slot func(eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QAbstractNativeEventFilter_override_virtual_NativeEventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractNativeEventFilter_NativeEventFilter +func miqt_exec_callback_QAbstractNativeEventFilter_NativeEventFilter(self *C.QAbstractNativeEventFilter, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} // Delete this object from C++ memory. func (this *QAbstractNativeEventFilter) Delete() { diff --git a/qt/gen_qabstractnativeeventfilter.h b/qt/gen_qabstractnativeeventfilter.h index 0274c984..015b79ec 100644 --- a/qt/gen_qabstractnativeeventfilter.h +++ b/qt/gen_qabstractnativeeventfilter.h @@ -22,7 +22,10 @@ typedef struct QAbstractNativeEventFilter QAbstractNativeEventFilter; typedef struct QByteArray QByteArray; #endif +void QAbstractNativeEventFilter_new(QAbstractNativeEventFilter** outptr_QAbstractNativeEventFilter); bool QAbstractNativeEventFilter_NativeEventFilter(QAbstractNativeEventFilter* self, struct miqt_string eventType, void* message, long* result); +void QAbstractNativeEventFilter_override_virtual_NativeEventFilter(void* self, intptr_t slot); +bool QAbstractNativeEventFilter_virtualbase_NativeEventFilter(void* self, struct miqt_string eventType, void* message, long* result); void QAbstractNativeEventFilter_Delete(QAbstractNativeEventFilter* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qabstractproxymodel.cpp b/qt/gen_qabstractproxymodel.cpp index 6fa7214d..c598ed6f 100644 --- a/qt/gen_qabstractproxymodel.cpp +++ b/qt/gen_qabstractproxymodel.cpp @@ -1,5 +1,7 @@ #include #include +#include +#include #include #include #include @@ -15,6 +17,1120 @@ #include "gen_qabstractproxymodel.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractProxyModel : public virtual QAbstractProxyModel { +public: + + MiqtVirtualQAbstractProxyModel(): QAbstractProxyModel() {}; + MiqtVirtualQAbstractProxyModel(QObject* parent): QAbstractProxyModel(parent) {}; + + virtual ~MiqtVirtualQAbstractProxyModel() = 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) { + QAbstractProxyModel::setSourceModel(sourceModel); + return; + } + + QAbstractItemModel* sigval1 = sourceModel; + + miqt_exec_callback_QAbstractProxyModel_SetSourceModel(this, handle__SetSourceModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSourceModel(QAbstractItemModel* sourceModel) { + + QAbstractProxyModel::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 QModelIndex(); // Pure virtual, there is no base we can call + } + + const QModelIndex& proxyIndex_ret = proxyIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&proxyIndex_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QAbstractProxyModel_MapToSource(const_cast(this), handle__MapToSource, sigval1); + + return *callback_return_value; + } + + // 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 QModelIndex(); // Pure virtual, there is no base we can call + } + + const QModelIndex& sourceIndex_ret = sourceIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceIndex_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QAbstractProxyModel_MapFromSource(const_cast(this), handle__MapFromSource, sigval1); + + return *callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapSelectionToSource = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelection mapSelectionToSource(const QItemSelection& selection) const override { + if (handle__MapSelectionToSource == 0) { + return QAbstractProxyModel::mapSelectionToSource(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QItemSelection* callback_return_value = miqt_exec_callback_QAbstractProxyModel_MapSelectionToSource(const_cast(this), handle__MapSelectionToSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QItemSelection* virtualbase_MapSelectionToSource(QItemSelection* selection) const { + + return new QItemSelection(QAbstractProxyModel::mapSelectionToSource(*selection)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapSelectionFromSource = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelection mapSelectionFromSource(const QItemSelection& selection) const override { + if (handle__MapSelectionFromSource == 0) { + return QAbstractProxyModel::mapSelectionFromSource(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QItemSelection* callback_return_value = miqt_exec_callback_QAbstractProxyModel_MapSelectionFromSource(const_cast(this), handle__MapSelectionFromSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QItemSelection* virtualbase_MapSelectionFromSource(QItemSelection* selection) const { + + return new QItemSelection(QAbstractProxyModel::mapSelectionFromSource(*selection)); + + } + + // 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 QAbstractProxyModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractProxyModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QAbstractProxyModel::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) { + QAbstractProxyModel::revert(); + return; + } + + + miqt_exec_callback_QAbstractProxyModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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(QAbstractProxyModel::data(*proxyIndex, 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 QAbstractProxyModel::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_QAbstractProxyModel_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(QAbstractProxyModel::headerData(static_cast(section), static_cast(orientation), 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 QAbstractProxyModel::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_QAbstractProxyModel_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 = QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 = QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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(QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QAbstractProxyModel::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) { + QAbstractProxyModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QAbstractProxyModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QAbstractProxyModel::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) { + QAbstractProxyModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QAbstractProxyModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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(QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* parent) const { + + return QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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(QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QAbstractProxyModel_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 = QAbstractProxyModel::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 QAbstractProxyModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractProxyModel_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 = QAbstractProxyModel::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 QAbstractProxyModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractProxyModel_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 = QAbstractProxyModel::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 QModelIndex(); // Pure virtual, there is no base we can call + } + + 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_QAbstractProxyModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // 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 QModelIndex(); // Pure virtual, there is no base we can call + } + + const QModelIndex& child_ret = child; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&child_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QAbstractProxyModel_Parent(const_cast(this), handle__Parent, sigval1); + + return *callback_return_value; + } + + // 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 0; // Pure virtual, there is no base we can call + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QAbstractProxyModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // 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 0; // Pure virtual, there is no base we can call + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QAbstractProxyModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // 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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // 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 QAbstractProxyModel::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_QAbstractProxyModel_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 = QAbstractProxyModel::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 QAbstractProxyModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QAbstractProxyModel_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 = QAbstractProxyModel::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 QAbstractProxyModel_new(QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQAbstractProxyModel* ret = new MiqtVirtualQAbstractProxyModel(); + *outptr_QAbstractProxyModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QAbstractProxyModel_new2(QObject* parent, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQAbstractProxyModel* ret = new MiqtVirtualQAbstractProxyModel(parent); + *outptr_QAbstractProxyModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractProxyModel_MetaObject(const QAbstractProxyModel* self) { return (QMetaObject*) self->metaObject(); } @@ -61,6 +1177,14 @@ QModelIndex* QAbstractProxyModel_MapFromSource(const QAbstractProxyModel* self, return new QModelIndex(self->mapFromSource(*sourceIndex)); } +QItemSelection* QAbstractProxyModel_MapSelectionToSource(const QAbstractProxyModel* self, QItemSelection* selection) { + return new QItemSelection(self->mapSelectionToSource(*selection)); +} + +QItemSelection* QAbstractProxyModel_MapSelectionFromSource(const QAbstractProxyModel* self, QItemSelection* selection) { + return new QItemSelection(self->mapSelectionFromSource(*selection)); +} + bool QAbstractProxyModel_Submit(QAbstractProxyModel* self) { return self->submit(); } @@ -238,9 +1362,297 @@ struct miqt_string QAbstractProxyModel_TrUtf83(const char* s, const char* c, int return _ms; } +void QAbstractProxyModel_override_virtual_SetSourceModel(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__SetSourceModel = slot; +} + +void QAbstractProxyModel_virtualbase_SetSourceModel(void* self, QAbstractItemModel* sourceModel) { + ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_SetSourceModel(sourceModel); +} + +void QAbstractProxyModel_override_virtual_MapToSource(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MapToSource = slot; +} + +void QAbstractProxyModel_override_virtual_MapFromSource(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MapFromSource = slot; +} + +void QAbstractProxyModel_override_virtual_MapSelectionToSource(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MapSelectionToSource = slot; +} + +QItemSelection* QAbstractProxyModel_virtualbase_MapSelectionToSource(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_MapSelectionToSource(selection); +} + +void QAbstractProxyModel_override_virtual_MapSelectionFromSource(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MapSelectionFromSource = slot; +} + +QItemSelection* QAbstractProxyModel_virtualbase_MapSelectionFromSource(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_MapSelectionFromSource(selection); +} + +void QAbstractProxyModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Submit = slot; +} + +bool QAbstractProxyModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Submit(); +} + +void QAbstractProxyModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Revert = slot; +} + +void QAbstractProxyModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Revert(); +} + +void QAbstractProxyModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Data = slot; +} + +QVariant* QAbstractProxyModel_virtualbase_Data(const void* self, QModelIndex* proxyIndex, int role) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Data(proxyIndex, role); +} + +void QAbstractProxyModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QAbstractProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QAbstractProxyModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QAbstractProxyModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_ItemData(index); +} + +void QAbstractProxyModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Flags = slot; +} + +int QAbstractProxyModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Flags(index); +} + +void QAbstractProxyModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__SetData = slot; +} + +bool QAbstractProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QAbstractProxyModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__SetItemData = slot; +} + +bool QAbstractProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QAbstractProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QAbstractProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QAbstractProxyModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QAbstractProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Buddy(index); +} + +void QAbstractProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QAbstractProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QAbstractProxyModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__FetchMore = slot; +} + +void QAbstractProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QAbstractProxyModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Sort = slot; +} + +void QAbstractProxyModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Sort(column, order); +} + +void QAbstractProxyModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Span = slot; +} + +QSize* QAbstractProxyModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Span(index); +} + +void QAbstractProxyModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__HasChildren = slot; +} + +bool QAbstractProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_HasChildren(parent); +} + +void QAbstractProxyModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QAbstractProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QAbstractProxyModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QAbstractProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QAbstractProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QAbstractProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QAbstractProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__DropMimeData = slot; +} + +bool QAbstractProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QAbstractProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QAbstractProxyModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_MimeTypes(); +} + +void QAbstractProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QAbstractProxyModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QAbstractProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QAbstractProxyModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QAbstractProxyModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Index = slot; +} + +void QAbstractProxyModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Parent = slot; +} + +void QAbstractProxyModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__RowCount = slot; +} + +void QAbstractProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__ColumnCount = slot; +} + +void QAbstractProxyModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__InsertRows = slot; +} + +bool QAbstractProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QAbstractProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__InsertColumns = slot; +} + +bool QAbstractProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QAbstractProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__RemoveRows = slot; +} + +bool QAbstractProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QAbstractProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QAbstractProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QAbstractProxyModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MoveRows = slot; +} + +bool QAbstractProxyModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QAbstractProxyModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MoveColumns = slot; +} + +bool QAbstractProxyModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QAbstractProxyModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QAbstractProxyModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QAbstractProxyModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QAbstractProxyModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_RoleNames(); +} + void QAbstractProxyModel_Delete(QAbstractProxyModel* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qabstractproxymodel.go b/qt/gen_qabstractproxymodel.go index f7a51461..54a8646c 100644 --- a/qt/gen_qabstractproxymodel.go +++ b/qt/gen_qabstractproxymodel.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,30 @@ func UnsafeNewQAbstractProxyModel(h unsafe.Pointer, h_QAbstractItemModel unsafe. QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } +// NewQAbstractProxyModel constructs a new QAbstractProxyModel object. +func NewQAbstractProxyModel() *QAbstractProxyModel { + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractProxyModel_new(&outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQAbstractProxyModel(outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractProxyModel2 constructs a new QAbstractProxyModel object. +func NewQAbstractProxyModel2(parent *QObject) *QAbstractProxyModel { + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractProxyModel_new2(parent.cPointer(), &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQAbstractProxyModel(outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractProxyModel) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractProxyModel_MetaObject(this.h))) } @@ -102,6 +127,20 @@ func (this *QAbstractProxyModel) MapFromSource(sourceIndex *QModelIndex) *QModel return _goptr } +func (this *QAbstractProxyModel) MapSelectionToSource(selection *QItemSelection) *QItemSelection { + _ret := C.QAbstractProxyModel_MapSelectionToSource(this.h, selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QAbstractProxyModel) MapSelectionFromSource(selection *QItemSelection) *QItemSelection { + _ret := C.QAbstractProxyModel_MapSelectionFromSource(this.h, selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QAbstractProxyModel) Submit() bool { return (bool)(C.QAbstractProxyModel_Submit(this.h)) } @@ -293,6 +332,1148 @@ func QAbstractProxyModel_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QAbstractProxyModel) callVirtualBase_SetSourceModel(sourceModel *QAbstractItemModel) { + + C.QAbstractProxyModel_virtualbase_SetSourceModel(unsafe.Pointer(this.h), sourceModel.cPointer()) + +} +func (this *QAbstractProxyModel) OnSetSourceModel(slot func(super func(sourceModel *QAbstractItemModel), sourceModel *QAbstractItemModel)) { + C.QAbstractProxyModel_override_virtual_SetSourceModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_SetSourceModel +func miqt_exec_callback_QAbstractProxyModel_SetSourceModel(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_SetSourceModel, slotval1) + +} +func (this *QAbstractProxyModel) OnMapToSource(slot func(proxyIndex *QModelIndex) *QModelIndex) { + C.QAbstractProxyModel_override_virtual_MapToSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MapToSource +func miqt_exec_callback_QAbstractProxyModel_MapToSource(self *C.QAbstractProxyModel, cb C.intptr_t, proxyIndex *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} +func (this *QAbstractProxyModel) OnMapFromSource(slot func(sourceIndex *QModelIndex) *QModelIndex) { + C.QAbstractProxyModel_override_virtual_MapFromSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MapFromSource +func miqt_exec_callback_QAbstractProxyModel_MapFromSource(self *C.QAbstractProxyModel, cb C.intptr_t, sourceIndex *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) callVirtualBase_MapSelectionToSource(selection *QItemSelection) *QItemSelection { + + _ret := C.QAbstractProxyModel_virtualbase_MapSelectionToSource(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractProxyModel) OnMapSelectionToSource(slot func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) { + C.QAbstractProxyModel_override_virtual_MapSelectionToSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MapSelectionToSource +func miqt_exec_callback_QAbstractProxyModel_MapSelectionToSource(self *C.QAbstractProxyModel, cb C.intptr_t, selection *C.QItemSelection) *C.QItemSelection { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QAbstractProxyModel{h: self}).callVirtualBase_MapSelectionToSource, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) callVirtualBase_MapSelectionFromSource(selection *QItemSelection) *QItemSelection { + + _ret := C.QAbstractProxyModel_virtualbase_MapSelectionFromSource(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractProxyModel) OnMapSelectionFromSource(slot func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) { + C.QAbstractProxyModel_override_virtual_MapSelectionFromSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MapSelectionFromSource +func miqt_exec_callback_QAbstractProxyModel_MapSelectionFromSource(self *C.QAbstractProxyModel, cb C.intptr_t, selection *C.QItemSelection) *C.QItemSelection { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QAbstractProxyModel{h: self}).callVirtualBase_MapSelectionFromSource, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) callVirtualBase_Submit() bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QAbstractProxyModel) OnSubmit(slot func(super func() bool) bool) { + C.QAbstractProxyModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Submit +func miqt_exec_callback_QAbstractProxyModel_Submit(self *C.QAbstractProxyModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractProxyModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_Revert() { + + C.QAbstractProxyModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QAbstractProxyModel) OnRevert(slot func(super func())) { + C.QAbstractProxyModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Revert +func miqt_exec_callback_QAbstractProxyModel_Revert(self *C.QAbstractProxyModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractProxyModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QAbstractProxyModel) callVirtualBase_Data(proxyIndex *QModelIndex, role int) *QVariant { + + _ret := C.QAbstractProxyModel_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 *QAbstractProxyModel) OnData(slot func(super func(proxyIndex *QModelIndex, role int) *QVariant, proxyIndex *QModelIndex, role int) *QVariant) { + C.QAbstractProxyModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Data +func miqt_exec_callback_QAbstractProxyModel_Data(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QAbstractProxyModel_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 *QAbstractProxyModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QAbstractProxyModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_HeaderData +func miqt_exec_callback_QAbstractProxyModel_HeaderData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QAbstractProxyModel_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 *QAbstractProxyModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QAbstractProxyModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_ItemData +func miqt_exec_callback_QAbstractProxyModel_ItemData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{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 *QAbstractProxyModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QAbstractProxyModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QAbstractProxyModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QAbstractProxyModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Flags +func miqt_exec_callback_QAbstractProxyModel_Flags(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QAbstractProxyModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QAbstractProxyModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_SetData +func miqt_exec_callback_QAbstractProxyModel_SetData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) 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.QAbstractProxyModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QAbstractProxyModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QAbstractProxyModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_SetItemData +func miqt_exec_callback_QAbstractProxyModel_SetItemData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QAbstractProxyModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QAbstractProxyModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_SetHeaderData +func miqt_exec_callback_QAbstractProxyModel_SetHeaderData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QAbstractProxyModel_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 *QAbstractProxyModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QAbstractProxyModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Buddy +func miqt_exec_callback_QAbstractProxyModel_Buddy(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QAbstractProxyModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QAbstractProxyModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_CanFetchMore +func miqt_exec_callback_QAbstractProxyModel_CanFetchMore(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QAbstractProxyModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QAbstractProxyModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QAbstractProxyModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_FetchMore +func miqt_exec_callback_QAbstractProxyModel_FetchMore(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QAbstractProxyModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QAbstractProxyModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QAbstractProxyModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QAbstractProxyModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Sort +func miqt_exec_callback_QAbstractProxyModel_Sort(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QAbstractProxyModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QAbstractProxyModel_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 *QAbstractProxyModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QAbstractProxyModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Span +func miqt_exec_callback_QAbstractProxyModel_Span(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) callVirtualBase_HasChildren(parent *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QAbstractProxyModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QAbstractProxyModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_HasChildren +func miqt_exec_callback_QAbstractProxyModel_HasChildren(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QAbstractProxyModel_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 *QAbstractProxyModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QAbstractProxyModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Sibling +func miqt_exec_callback_QAbstractProxyModel_Sibling(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) 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.QAbstractProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QAbstractProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QAbstractProxyModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MimeData +func miqt_exec_callback_QAbstractProxyModel_MimeData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QAbstractProxyModel) 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.QAbstractProxyModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_CanDropMimeData +func miqt_exec_callback_QAbstractProxyModel_CanDropMimeData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QAbstractProxyModel) 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.QAbstractProxyModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_DropMimeData +func miqt_exec_callback_QAbstractProxyModel_DropMimeData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QAbstractProxyModel_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 *QAbstractProxyModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QAbstractProxyModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MimeTypes +func miqt_exec_callback_QAbstractProxyModel_MimeTypes(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{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 *QAbstractProxyModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QAbstractProxyModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QAbstractProxyModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QAbstractProxyModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_SupportedDragActions +func miqt_exec_callback_QAbstractProxyModel_SupportedDragActions(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QAbstractProxyModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QAbstractProxyModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QAbstractProxyModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_SupportedDropActions +func miqt_exec_callback_QAbstractProxyModel_SupportedDropActions(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractProxyModel) OnIndex(slot func(row int, column int, parent *QModelIndex) *QModelIndex) { + C.QAbstractProxyModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Index +func miqt_exec_callback_QAbstractProxyModel_Index(self *C.QAbstractProxyModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} +func (this *QAbstractProxyModel) OnParent(slot func(child *QModelIndex) *QModelIndex) { + C.QAbstractProxyModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Parent +func miqt_exec_callback_QAbstractProxyModel_Parent(self *C.QAbstractProxyModel, cb C.intptr_t, child *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} +func (this *QAbstractProxyModel) OnRowCount(slot func(parent *QModelIndex) int) { + C.QAbstractProxyModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_RowCount +func miqt_exec_callback_QAbstractProxyModel_RowCount(self *C.QAbstractProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractProxyModel) OnColumnCount(slot func(parent *QModelIndex) int) { + C.QAbstractProxyModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_ColumnCount +func miqt_exec_callback_QAbstractProxyModel_ColumnCount(self *C.QAbstractProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractProxyModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QAbstractProxyModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_InsertRows +func miqt_exec_callback_QAbstractProxyModel_InsertRows(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractProxyModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QAbstractProxyModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_InsertColumns +func miqt_exec_callback_QAbstractProxyModel_InsertColumns(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractProxyModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QAbstractProxyModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_RemoveRows +func miqt_exec_callback_QAbstractProxyModel_RemoveRows(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractProxyModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QAbstractProxyModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_RemoveColumns +func miqt_exec_callback_QAbstractProxyModel_RemoveColumns(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QAbstractProxyModel) 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.QAbstractProxyModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MoveRows +func miqt_exec_callback_QAbstractProxyModel_MoveRows(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QAbstractProxyModel) 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.QAbstractProxyModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MoveColumns +func miqt_exec_callback_QAbstractProxyModel_MoveColumns(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QAbstractProxyModel_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 *QAbstractProxyModel) 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.QAbstractProxyModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Match +func miqt_exec_callback_QAbstractProxyModel_Match(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{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 *QAbstractProxyModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QAbstractProxyModel_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 *QAbstractProxyModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QAbstractProxyModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_RoleNames +func miqt_exec_callback_QAbstractProxyModel_RoleNames(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{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 *QAbstractProxyModel) Delete() { C.QAbstractProxyModel_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qabstractproxymodel.h b/qt/gen_qabstractproxymodel.h index 99e897fa..b2983140 100644 --- a/qt/gen_qabstractproxymodel.h +++ b/qt/gen_qabstractproxymodel.h @@ -17,6 +17,8 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; class QAbstractProxyModel; +class QByteArray; +class QItemSelection; class QMetaObject; class QMimeData; class QModelIndex; @@ -26,6 +28,8 @@ class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractProxyModel QAbstractProxyModel; +typedef struct QByteArray QByteArray; +typedef struct QItemSelection QItemSelection; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; @@ -34,6 +38,8 @@ typedef struct QSize QSize; typedef struct QVariant QVariant; #endif +void QAbstractProxyModel_new(QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QAbstractProxyModel_new2(QObject* parent, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QAbstractProxyModel_MetaObject(const QAbstractProxyModel* self); void* QAbstractProxyModel_Metacast(QAbstractProxyModel* self, const char* param1); struct miqt_string QAbstractProxyModel_Tr(const char* s); @@ -42,6 +48,8 @@ void QAbstractProxyModel_SetSourceModel(QAbstractProxyModel* self, QAbstractItem QAbstractItemModel* QAbstractProxyModel_SourceModel(const QAbstractProxyModel* self); QModelIndex* QAbstractProxyModel_MapToSource(const QAbstractProxyModel* self, QModelIndex* proxyIndex); QModelIndex* QAbstractProxyModel_MapFromSource(const QAbstractProxyModel* self, QModelIndex* sourceIndex); +QItemSelection* QAbstractProxyModel_MapSelectionToSource(const QAbstractProxyModel* self, QItemSelection* selection); +QItemSelection* QAbstractProxyModel_MapSelectionFromSource(const QAbstractProxyModel* self, QItemSelection* selection); bool QAbstractProxyModel_Submit(QAbstractProxyModel* self); void QAbstractProxyModel_Revert(QAbstractProxyModel* self); QVariant* QAbstractProxyModel_Data(const QAbstractProxyModel* self, QModelIndex* proxyIndex, int role); @@ -68,6 +76,84 @@ 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); +void QAbstractProxyModel_override_virtual_SetSourceModel(void* self, intptr_t slot); +void QAbstractProxyModel_virtualbase_SetSourceModel(void* self, QAbstractItemModel* sourceModel); +void QAbstractProxyModel_override_virtual_MapToSource(void* self, intptr_t slot); +QModelIndex* QAbstractProxyModel_virtualbase_MapToSource(const void* self, QModelIndex* proxyIndex); +void QAbstractProxyModel_override_virtual_MapFromSource(void* self, intptr_t slot); +QModelIndex* QAbstractProxyModel_virtualbase_MapFromSource(const void* self, QModelIndex* sourceIndex); +void QAbstractProxyModel_override_virtual_MapSelectionToSource(void* self, intptr_t slot); +QItemSelection* QAbstractProxyModel_virtualbase_MapSelectionToSource(const void* self, QItemSelection* selection); +void QAbstractProxyModel_override_virtual_MapSelectionFromSource(void* self, intptr_t slot); +QItemSelection* QAbstractProxyModel_virtualbase_MapSelectionFromSource(const void* self, QItemSelection* selection); +void QAbstractProxyModel_override_virtual_Submit(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_Submit(void* self); +void QAbstractProxyModel_override_virtual_Revert(void* self, intptr_t slot); +void QAbstractProxyModel_virtualbase_Revert(void* self); +void QAbstractProxyModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QAbstractProxyModel_virtualbase_Data(const void* self, QModelIndex* proxyIndex, int role); +void QAbstractProxyModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QAbstractProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QAbstractProxyModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QAbstractProxyModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QAbstractProxyModel_override_virtual_Flags(void* self, intptr_t slot); +int QAbstractProxyModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QAbstractProxyModel_override_virtual_SetData(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QAbstractProxyModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QAbstractProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QAbstractProxyModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QAbstractProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QAbstractProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QAbstractProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_Sort(void* self, intptr_t slot); +void QAbstractProxyModel_virtualbase_Sort(void* self, int column, int order); +void QAbstractProxyModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QAbstractProxyModel_virtualbase_Span(const void* self, QModelIndex* index); +void QAbstractProxyModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QAbstractProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QAbstractProxyModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QAbstractProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QAbstractProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QAbstractProxyModel_virtualbase_MimeTypes(const void* self); +void QAbstractProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QAbstractProxyModel_virtualbase_SupportedDragActions(const void* self); +void QAbstractProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QAbstractProxyModel_virtualbase_SupportedDropActions(const void* self); +void QAbstractProxyModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QAbstractProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QAbstractProxyModel_virtualbase_Parent(const void* self, QModelIndex* child); +void QAbstractProxyModel_override_virtual_RowCount(void* self, intptr_t slot); +int QAbstractProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QAbstractProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QAbstractProxyModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QAbstractProxyModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QAbstractProxyModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QAbstractProxyModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QAbstractProxyModel_virtualbase_RoleNames(const void* self); void QAbstractProxyModel_Delete(QAbstractProxyModel* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qabstracttextdocumentlayout.cpp b/qt/gen_qabstracttextdocumentlayout.cpp index 300ec37d..7c53ab11 100644 --- a/qt/gen_qabstracttextdocumentlayout.cpp +++ b/qt/gen_qabstracttextdocumentlayout.cpp @@ -1,6 +1,9 @@ #include #define WORKAROUND_INNER_CLASS_DEFINITION_QAbstractTextDocumentLayout__PaintContext #define WORKAROUND_INNER_CLASS_DEFINITION_QAbstractTextDocumentLayout__Selection +#include +#include +#include #include #include #include @@ -17,10 +20,406 @@ #include #include #include +#include #include #include "gen_qabstracttextdocumentlayout.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractTextDocumentLayout : public virtual QAbstractTextDocumentLayout { +public: + + MiqtVirtualQAbstractTextDocumentLayout(QTextDocument* doc): QAbstractTextDocumentLayout(doc) {}; + + virtual ~MiqtVirtualQAbstractTextDocumentLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Draw = 0; + + // Subclass to allow providing a Go implementation + virtual void draw(QPainter* painter, const QAbstractTextDocumentLayout::PaintContext& context) override { + if (handle__Draw == 0) { + return; // Pure virtual, there is no base we can call + } + + QPainter* sigval1 = painter; + const QAbstractTextDocumentLayout::PaintContext& context_ret = context; + // Cast returned reference into pointer + QAbstractTextDocumentLayout__PaintContext* sigval2 = const_cast(&context_ret); + + miqt_exec_callback_QAbstractTextDocumentLayout_Draw(this, handle__Draw, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitTest = 0; + + // Subclass to allow providing a Go implementation + virtual int hitTest(const QPointF& point, Qt::HitTestAccuracy accuracy) const override { + if (handle__HitTest == 0) { + return 0; // Pure virtual, there is no base we can call + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + Qt::HitTestAccuracy accuracy_ret = accuracy; + int sigval2 = static_cast(accuracy_ret); + + int callback_return_value = miqt_exec_callback_QAbstractTextDocumentLayout_HitTest(const_cast(this), handle__HitTest, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // 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 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QAbstractTextDocumentLayout_PageCount(const_cast(this), handle__PageCount); + + return static_cast(callback_return_value); + } + + // 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 QSizeF(); // Pure virtual, there is no base we can call + } + + + QSizeF* callback_return_value = miqt_exec_callback_QAbstractTextDocumentLayout_DocumentSize(const_cast(this), handle__DocumentSize); + + return *callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FrameBoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF frameBoundingRect(QTextFrame* frame) const override { + if (handle__FrameBoundingRect == 0) { + return QRectF(); // Pure virtual, there is no base we can call + } + + QTextFrame* sigval1 = frame; + + QRectF* callback_return_value = miqt_exec_callback_QAbstractTextDocumentLayout_FrameBoundingRect(const_cast(this), handle__FrameBoundingRect, sigval1); + + return *callback_return_value; + } + + // 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 QRectF(); // Pure virtual, there is no base we can call + } + + const QTextBlock& block_ret = block; + // Cast returned reference into pointer + QTextBlock* sigval1 = const_cast(&block_ret); + + QRectF* callback_return_value = miqt_exec_callback_QAbstractTextDocumentLayout_BlockBoundingRect(const_cast(this), handle__BlockBoundingRect, sigval1); + + return *callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DocumentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void documentChanged(int from, int charsRemoved, int charsAdded) override { + if (handle__DocumentChanged == 0) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = from; + int sigval2 = charsRemoved; + int sigval3 = charsAdded; + + miqt_exec_callback_QAbstractTextDocumentLayout_DocumentChanged(this, handle__DocumentChanged, sigval1, sigval2, sigval3); + + + } + + // 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) { + QAbstractTextDocumentLayout::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_QAbstractTextDocumentLayout_ResizeInlineObject(this, handle__ResizeInlineObject, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeInlineObject(QTextInlineObject* item, int posInDocument, QTextFormat* format) { + + QAbstractTextDocumentLayout::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) { + QAbstractTextDocumentLayout::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_QAbstractTextDocumentLayout_PositionInlineObject(this, handle__PositionInlineObject, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PositionInlineObject(QTextInlineObject* item, int posInDocument, QTextFormat* format) { + + QAbstractTextDocumentLayout::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) { + QAbstractTextDocumentLayout::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_QAbstractTextDocumentLayout_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) { + + QAbstractTextDocumentLayout::drawInlineObject(painter, *rect, *object, static_cast(posInDocument), *format); + + } + + // 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 QAbstractTextDocumentLayout::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractTextDocumentLayout_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAbstractTextDocumentLayout::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 QAbstractTextDocumentLayout::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractTextDocumentLayout_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAbstractTextDocumentLayout::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) { + QAbstractTextDocumentLayout::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractTextDocumentLayout_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractTextDocumentLayout::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) { + QAbstractTextDocumentLayout::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAbstractTextDocumentLayout_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAbstractTextDocumentLayout::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) { + QAbstractTextDocumentLayout::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractTextDocumentLayout_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAbstractTextDocumentLayout::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) { + QAbstractTextDocumentLayout::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractTextDocumentLayout_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAbstractTextDocumentLayout::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) { + QAbstractTextDocumentLayout::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractTextDocumentLayout_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAbstractTextDocumentLayout::disconnectNotify(*signal); + + } + +}; + +void QAbstractTextDocumentLayout_new(QTextDocument* doc, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout, QObject** outptr_QObject) { + MiqtVirtualQAbstractTextDocumentLayout* ret = new MiqtVirtualQAbstractTextDocumentLayout(doc); + *outptr_QAbstractTextDocumentLayout = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractTextDocumentLayout_MetaObject(const QAbstractTextDocumentLayout* self) { return (QMetaObject*) self->metaObject(); } @@ -134,7 +533,7 @@ void QAbstractTextDocumentLayout_Update(QAbstractTextDocumentLayout* self) { } void QAbstractTextDocumentLayout_connect_Update(QAbstractTextDocumentLayout* self, intptr_t slot) { - QAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::update), self, [=]() { + MiqtVirtualQAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::update), self, [=]() { miqt_exec_callback_QAbstractTextDocumentLayout_Update(slot); }); } @@ -144,7 +543,7 @@ void QAbstractTextDocumentLayout_UpdateBlock(QAbstractTextDocumentLayout* self, } void QAbstractTextDocumentLayout_connect_UpdateBlock(QAbstractTextDocumentLayout* self, intptr_t slot) { - QAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::updateBlock), self, [=](const QTextBlock& block) { + MiqtVirtualQAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::updateBlock), self, [=](const QTextBlock& block) { const QTextBlock& block_ret = block; // Cast returned reference into pointer QTextBlock* sigval1 = const_cast(&block_ret); @@ -157,7 +556,7 @@ void QAbstractTextDocumentLayout_DocumentSizeChanged(QAbstractTextDocumentLayout } void QAbstractTextDocumentLayout_connect_DocumentSizeChanged(QAbstractTextDocumentLayout* self, intptr_t slot) { - QAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::documentSizeChanged), self, [=](const QSizeF& newSize) { + MiqtVirtualQAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::documentSizeChanged), self, [=](const QSizeF& newSize) { const QSizeF& newSize_ret = newSize; // Cast returned reference into pointer QSizeF* sigval1 = const_cast(&newSize_ret); @@ -170,7 +569,7 @@ void QAbstractTextDocumentLayout_PageCountChanged(QAbstractTextDocumentLayout* s } void QAbstractTextDocumentLayout_connect_PageCountChanged(QAbstractTextDocumentLayout* self, intptr_t slot) { - QAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::pageCountChanged), self, [=](int newPages) { + MiqtVirtualQAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::pageCountChanged), self, [=](int newPages) { int sigval1 = newPages; miqt_exec_callback_QAbstractTextDocumentLayout_PageCountChanged(slot, sigval1); }); @@ -229,7 +628,7 @@ void QAbstractTextDocumentLayout_Update1(QAbstractTextDocumentLayout* self, QRec } void QAbstractTextDocumentLayout_connect_Update1(QAbstractTextDocumentLayout* self, intptr_t slot) { - QAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::update), self, [=](const QRectF& param1) { + MiqtVirtualQAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::update), self, [=](const QRectF& param1) { const QRectF& param1_ret = param1; // Cast returned reference into pointer QRectF* sigval1 = const_cast(¶m1_ret); @@ -237,9 +636,117 @@ void QAbstractTextDocumentLayout_connect_Update1(QAbstractTextDocumentLayout* se }); } +void QAbstractTextDocumentLayout_override_virtual_Draw(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__Draw = slot; +} + +void QAbstractTextDocumentLayout_override_virtual_HitTest(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__HitTest = slot; +} + +void QAbstractTextDocumentLayout_override_virtual_PageCount(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__PageCount = slot; +} + +void QAbstractTextDocumentLayout_override_virtual_DocumentSize(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__DocumentSize = slot; +} + +void QAbstractTextDocumentLayout_override_virtual_FrameBoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__FrameBoundingRect = slot; +} + +void QAbstractTextDocumentLayout_override_virtual_BlockBoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__BlockBoundingRect = slot; +} + +void QAbstractTextDocumentLayout_override_virtual_DocumentChanged(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__DocumentChanged = slot; +} + +void QAbstractTextDocumentLayout_override_virtual_ResizeInlineObject(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__ResizeInlineObject = slot; +} + +void QAbstractTextDocumentLayout_virtualbase_ResizeInlineObject(void* self, QTextInlineObject* item, int posInDocument, QTextFormat* format) { + ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_ResizeInlineObject(item, posInDocument, format); +} + +void QAbstractTextDocumentLayout_override_virtual_PositionInlineObject(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__PositionInlineObject = slot; +} + +void QAbstractTextDocumentLayout_virtualbase_PositionInlineObject(void* self, QTextInlineObject* item, int posInDocument, QTextFormat* format) { + ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_PositionInlineObject(item, posInDocument, format); +} + +void QAbstractTextDocumentLayout_override_virtual_DrawInlineObject(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__DrawInlineObject = slot; +} + +void QAbstractTextDocumentLayout_virtualbase_DrawInlineObject(void* self, QPainter* painter, QRectF* rect, QTextInlineObject* object, int posInDocument, QTextFormat* format) { + ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_DrawInlineObject(painter, rect, object, posInDocument, format); +} + +void QAbstractTextDocumentLayout_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__Event = slot; +} + +bool QAbstractTextDocumentLayout_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_Event(event); +} + +void QAbstractTextDocumentLayout_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractTextDocumentLayout_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAbstractTextDocumentLayout_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractTextDocumentLayout_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractTextDocumentLayout_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__ChildEvent = slot; +} + +void QAbstractTextDocumentLayout_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_ChildEvent(event); +} + +void QAbstractTextDocumentLayout_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__CustomEvent = slot; +} + +void QAbstractTextDocumentLayout_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_CustomEvent(event); +} + +void QAbstractTextDocumentLayout_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__ConnectNotify = slot; +} + +void QAbstractTextDocumentLayout_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAbstractTextDocumentLayout_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__DisconnectNotify = slot; +} + +void QAbstractTextDocumentLayout_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAbstractTextDocumentLayout_Delete(QAbstractTextDocumentLayout* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qabstracttextdocumentlayout.go b/qt/gen_qabstracttextdocumentlayout.go index 11584312..d7c6d78d 100644 --- a/qt/gen_qabstracttextdocumentlayout.go +++ b/qt/gen_qabstracttextdocumentlayout.go @@ -53,6 +53,17 @@ func UnsafeNewQAbstractTextDocumentLayout(h unsafe.Pointer, h_QObject unsafe.Poi QObject: UnsafeNewQObject(h_QObject)} } +// NewQAbstractTextDocumentLayout constructs a new QAbstractTextDocumentLayout object. +func NewQAbstractTextDocumentLayout(doc *QTextDocument) *QAbstractTextDocumentLayout { + var outptr_QAbstractTextDocumentLayout *C.QAbstractTextDocumentLayout = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractTextDocumentLayout_new(doc.cPointer(), &outptr_QAbstractTextDocumentLayout, &outptr_QObject) + ret := newQAbstractTextDocumentLayout(outptr_QAbstractTextDocumentLayout, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractTextDocumentLayout) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractTextDocumentLayout_MetaObject(this.h))) } @@ -311,6 +322,394 @@ func miqt_exec_callback_QAbstractTextDocumentLayout_Update1(cb C.intptr_t, param gofunc(slotval1) } +func (this *QAbstractTextDocumentLayout) OnDraw(slot func(painter *QPainter, context *QAbstractTextDocumentLayout__PaintContext)) { + C.QAbstractTextDocumentLayout_override_virtual_Draw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_Draw +func miqt_exec_callback_QAbstractTextDocumentLayout_Draw(self *C.QAbstractTextDocumentLayout, cb C.intptr_t, painter *C.QPainter, context *C.QAbstractTextDocumentLayout__PaintContext) { + gofunc, ok := cgo.Handle(cb).Value().(func(painter *QPainter, context *QAbstractTextDocumentLayout__PaintContext)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQAbstractTextDocumentLayout__PaintContext(unsafe.Pointer(context)) + + gofunc(slotval1, slotval2) + +} +func (this *QAbstractTextDocumentLayout) OnHitTest(slot func(point *QPointF, accuracy HitTestAccuracy) int) { + C.QAbstractTextDocumentLayout_override_virtual_HitTest(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_HitTest +func miqt_exec_callback_QAbstractTextDocumentLayout_HitTest(self *C.QAbstractTextDocumentLayout, cb C.intptr_t, point *C.QPointF, accuracy C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(point *QPointF, accuracy HitTestAccuracy) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + slotval2 := (HitTestAccuracy)(accuracy) + + virtualReturn := gofunc(slotval1, slotval2) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractTextDocumentLayout) OnPageCount(slot func() int) { + C.QAbstractTextDocumentLayout_override_virtual_PageCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_PageCount +func miqt_exec_callback_QAbstractTextDocumentLayout_PageCount(self *C.QAbstractTextDocumentLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *QAbstractTextDocumentLayout) OnDocumentSize(slot func() *QSizeF) { + C.QAbstractTextDocumentLayout_override_virtual_DocumentSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_DocumentSize +func miqt_exec_callback_QAbstractTextDocumentLayout_DocumentSize(self *C.QAbstractTextDocumentLayout, cb C.intptr_t) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func() *QSizeF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} +func (this *QAbstractTextDocumentLayout) OnFrameBoundingRect(slot func(frame *QTextFrame) *QRectF) { + C.QAbstractTextDocumentLayout_override_virtual_FrameBoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_FrameBoundingRect +func miqt_exec_callback_QAbstractTextDocumentLayout_FrameBoundingRect(self *C.QAbstractTextDocumentLayout, cb C.intptr_t, frame *C.QTextFrame) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(frame *QTextFrame) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextFrame(unsafe.Pointer(frame), nil, nil) + + virtualReturn := gofunc(slotval1) + + return virtualReturn.cPointer() + +} +func (this *QAbstractTextDocumentLayout) OnBlockBoundingRect(slot func(block *QTextBlock) *QRectF) { + C.QAbstractTextDocumentLayout_override_virtual_BlockBoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_BlockBoundingRect +func miqt_exec_callback_QAbstractTextDocumentLayout_BlockBoundingRect(self *C.QAbstractTextDocumentLayout, cb C.intptr_t, block *C.QTextBlock) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} +func (this *QAbstractTextDocumentLayout) OnDocumentChanged(slot func(from int, charsRemoved int, charsAdded int)) { + C.QAbstractTextDocumentLayout_override_virtual_DocumentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_DocumentChanged +func miqt_exec_callback_QAbstractTextDocumentLayout_DocumentChanged(self *C.QAbstractTextDocumentLayout, cb C.intptr_t, from C.int, charsRemoved C.int, charsAdded C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(from int, charsRemoved 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)(charsRemoved) + + slotval3 := (int)(charsAdded) + + gofunc(slotval1, slotval2, slotval3) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_ResizeInlineObject(item QTextInlineObject, posInDocument int, format *QTextFormat) { + + C.QAbstractTextDocumentLayout_virtualbase_ResizeInlineObject(unsafe.Pointer(this.h), item.cPointer(), (C.int)(posInDocument), format.cPointer()) + +} +func (this *QAbstractTextDocumentLayout) OnResizeInlineObject(slot func(super func(item QTextInlineObject, posInDocument int, format *QTextFormat), item QTextInlineObject, posInDocument int, format *QTextFormat)) { + C.QAbstractTextDocumentLayout_override_virtual_ResizeInlineObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_ResizeInlineObject +func miqt_exec_callback_QAbstractTextDocumentLayout_ResizeInlineObject(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_ResizeInlineObject, slotval1, slotval2, slotval3) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_PositionInlineObject(item QTextInlineObject, posInDocument int, format *QTextFormat) { + + C.QAbstractTextDocumentLayout_virtualbase_PositionInlineObject(unsafe.Pointer(this.h), item.cPointer(), (C.int)(posInDocument), format.cPointer()) + +} +func (this *QAbstractTextDocumentLayout) OnPositionInlineObject(slot func(super func(item QTextInlineObject, posInDocument int, format *QTextFormat), item QTextInlineObject, posInDocument int, format *QTextFormat)) { + C.QAbstractTextDocumentLayout_override_virtual_PositionInlineObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_PositionInlineObject +func miqt_exec_callback_QAbstractTextDocumentLayout_PositionInlineObject(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_PositionInlineObject, slotval1, slotval2, slotval3) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_DrawInlineObject(painter *QPainter, rect *QRectF, object QTextInlineObject, posInDocument int, format *QTextFormat) { + + C.QAbstractTextDocumentLayout_virtualbase_DrawInlineObject(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), object.cPointer(), (C.int)(posInDocument), format.cPointer()) + +} +func (this *QAbstractTextDocumentLayout) 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.QAbstractTextDocumentLayout_override_virtual_DrawInlineObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_DrawInlineObject +func miqt_exec_callback_QAbstractTextDocumentLayout_DrawInlineObject(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_DrawInlineObject, slotval1, slotval2, slotval3, slotval4, slotval5) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAbstractTextDocumentLayout_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractTextDocumentLayout) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractTextDocumentLayout_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_Event +func miqt_exec_callback_QAbstractTextDocumentLayout_Event(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAbstractTextDocumentLayout_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAbstractTextDocumentLayout) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAbstractTextDocumentLayout_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_EventFilter +func miqt_exec_callback_QAbstractTextDocumentLayout_EventFilter(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAbstractTextDocumentLayout_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractTextDocumentLayout) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAbstractTextDocumentLayout_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_TimerEvent +func miqt_exec_callback_QAbstractTextDocumentLayout_TimerEvent(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAbstractTextDocumentLayout_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractTextDocumentLayout) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAbstractTextDocumentLayout_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_ChildEvent +func miqt_exec_callback_QAbstractTextDocumentLayout_ChildEvent(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAbstractTextDocumentLayout_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractTextDocumentLayout) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractTextDocumentLayout_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_CustomEvent +func miqt_exec_callback_QAbstractTextDocumentLayout_CustomEvent(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAbstractTextDocumentLayout_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractTextDocumentLayout) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractTextDocumentLayout_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_ConnectNotify +func miqt_exec_callback_QAbstractTextDocumentLayout_ConnectNotify(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAbstractTextDocumentLayout_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractTextDocumentLayout) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractTextDocumentLayout_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_DisconnectNotify +func miqt_exec_callback_QAbstractTextDocumentLayout_DisconnectNotify(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAbstractTextDocumentLayout) Delete() { C.QAbstractTextDocumentLayout_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qabstracttextdocumentlayout.h b/qt/gen_qabstracttextdocumentlayout.h index 93163410..24414f5d 100644 --- a/qt/gen_qabstracttextdocumentlayout.h +++ b/qt/gen_qabstracttextdocumentlayout.h @@ -26,6 +26,9 @@ typedef QAbstractTextDocumentLayout::Selection QAbstractTextDocumentLayout__Sele #else class QAbstractTextDocumentLayout__Selection; #endif +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QPaintDevice; @@ -39,10 +42,14 @@ class QTextFormat; class QTextFrame; class QTextInlineObject; class QTextObjectInterface; +class QTimerEvent; #else typedef struct QAbstractTextDocumentLayout QAbstractTextDocumentLayout; typedef struct QAbstractTextDocumentLayout__PaintContext QAbstractTextDocumentLayout__PaintContext; typedef struct QAbstractTextDocumentLayout__Selection QAbstractTextDocumentLayout__Selection; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPaintDevice QPaintDevice; @@ -56,8 +63,10 @@ typedef struct QTextFormat QTextFormat; typedef struct QTextFrame QTextFrame; typedef struct QTextInlineObject QTextInlineObject; typedef struct QTextObjectInterface QTextObjectInterface; +typedef struct QTimerEvent QTimerEvent; #endif +void QAbstractTextDocumentLayout_new(QTextDocument* doc, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout, QObject** outptr_QObject); QMetaObject* QAbstractTextDocumentLayout_MetaObject(const QAbstractTextDocumentLayout* self); void* QAbstractTextDocumentLayout_Metacast(QAbstractTextDocumentLayout* self, const char* param1); struct miqt_string QAbstractTextDocumentLayout_Tr(const char* s); @@ -97,6 +106,40 @@ 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_override_virtual_Draw(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_Draw(void* self, QPainter* painter, QAbstractTextDocumentLayout__PaintContext* context); +void QAbstractTextDocumentLayout_override_virtual_HitTest(void* self, intptr_t slot); +int QAbstractTextDocumentLayout_virtualbase_HitTest(const void* self, QPointF* point, int accuracy); +void QAbstractTextDocumentLayout_override_virtual_PageCount(void* self, intptr_t slot); +int QAbstractTextDocumentLayout_virtualbase_PageCount(const void* self); +void QAbstractTextDocumentLayout_override_virtual_DocumentSize(void* self, intptr_t slot); +QSizeF* QAbstractTextDocumentLayout_virtualbase_DocumentSize(const void* self); +void QAbstractTextDocumentLayout_override_virtual_FrameBoundingRect(void* self, intptr_t slot); +QRectF* QAbstractTextDocumentLayout_virtualbase_FrameBoundingRect(const void* self, QTextFrame* frame); +void QAbstractTextDocumentLayout_override_virtual_BlockBoundingRect(void* self, intptr_t slot); +QRectF* QAbstractTextDocumentLayout_virtualbase_BlockBoundingRect(const void* self, QTextBlock* block); +void QAbstractTextDocumentLayout_override_virtual_DocumentChanged(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_DocumentChanged(void* self, int from, int charsRemoved, int charsAdded); +void QAbstractTextDocumentLayout_override_virtual_ResizeInlineObject(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_ResizeInlineObject(void* self, QTextInlineObject* item, int posInDocument, QTextFormat* format); +void QAbstractTextDocumentLayout_override_virtual_PositionInlineObject(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_PositionInlineObject(void* self, QTextInlineObject* item, int posInDocument, QTextFormat* format); +void QAbstractTextDocumentLayout_override_virtual_DrawInlineObject(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_DrawInlineObject(void* self, QPainter* painter, QRectF* rect, QTextInlineObject* object, int posInDocument, QTextFormat* format); +void QAbstractTextDocumentLayout_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractTextDocumentLayout_virtualbase_Event(void* self, QEvent* event); +void QAbstractTextDocumentLayout_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractTextDocumentLayout_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAbstractTextDocumentLayout_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractTextDocumentLayout_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAbstractTextDocumentLayout_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_CustomEvent(void* self, QEvent* event); +void QAbstractTextDocumentLayout_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAbstractTextDocumentLayout_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractTextDocumentLayout_Delete(QAbstractTextDocumentLayout* self, bool isSubclass); QSizeF* QTextObjectInterface_IntrinsicSize(QTextObjectInterface* self, QTextDocument* doc, int posInDocument, QTextFormat* format); diff --git a/qt/gen_qabstracttransition.cpp b/qt/gen_qabstracttransition.cpp index e7ea1874..3782c82c 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 @@ -10,10 +12,236 @@ #include #include #include +#include #include #include "gen_qabstracttransition.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractTransition : public virtual QAbstractTransition { +public: + + MiqtVirtualQAbstractTransition(): QAbstractTransition() {}; + MiqtVirtualQAbstractTransition(QState* sourceState): QAbstractTransition(sourceState) {}; + + virtual ~MiqtVirtualQAbstractTransition() = 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 false; // Pure virtual, there is no base we can call + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractTransition_EventTest(this, handle__EventTest, sigval1); + + return callback_return_value; + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractTransition_OnTransition(this, handle__OnTransition, sigval1); + + + } + + // 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 QAbstractTransition::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QAbstractTransition_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QAbstractTransition::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 QAbstractTransition::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractTransition_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAbstractTransition::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) { + QAbstractTransition::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractTransition_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractTransition::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) { + QAbstractTransition::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAbstractTransition_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAbstractTransition::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) { + QAbstractTransition::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractTransition_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAbstractTransition::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) { + QAbstractTransition::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractTransition_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAbstractTransition::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) { + QAbstractTransition::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractTransition_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAbstractTransition::disconnectNotify(*signal); + + } + +}; + +void QAbstractTransition_new(QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQAbstractTransition* ret = new MiqtVirtualQAbstractTransition(); + *outptr_QAbstractTransition = ret; + *outptr_QObject = static_cast(ret); +} + +void QAbstractTransition_new2(QState* sourceState, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { + MiqtVirtualQAbstractTransition* ret = new MiqtVirtualQAbstractTransition(sourceState); + *outptr_QAbstractTransition = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractTransition_MetaObject(const QAbstractTransition* self) { return (QMetaObject*) self->metaObject(); } @@ -157,9 +385,73 @@ struct miqt_string QAbstractTransition_TrUtf83(const char* s, const char* c, int return _ms; } +void QAbstractTransition_override_virtual_EventTest(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTransition*)(self) )->handle__EventTest = slot; +} + +void QAbstractTransition_override_virtual_OnTransition(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTransition*)(self) )->handle__OnTransition = slot; +} + +void QAbstractTransition_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTransition*)(self) )->handle__Event = slot; +} + +bool QAbstractTransition_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQAbstractTransition*)(self) )->virtualbase_Event(e); +} + +void QAbstractTransition_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTransition*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractTransition_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAbstractTransition*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAbstractTransition_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTransition*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractTransition_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractTransition*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractTransition_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTransition*)(self) )->handle__ChildEvent = slot; +} + +void QAbstractTransition_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAbstractTransition*)(self) )->virtualbase_ChildEvent(event); +} + +void QAbstractTransition_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTransition*)(self) )->handle__CustomEvent = slot; +} + +void QAbstractTransition_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractTransition*)(self) )->virtualbase_CustomEvent(event); +} + +void QAbstractTransition_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTransition*)(self) )->handle__ConnectNotify = slot; +} + +void QAbstractTransition_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractTransition*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAbstractTransition_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTransition*)(self) )->handle__DisconnectNotify = slot; +} + +void QAbstractTransition_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractTransition*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAbstractTransition_Delete(QAbstractTransition* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qabstracttransition.go b/qt/gen_qabstracttransition.go index 4e460de2..e841599a 100644 --- a/qt/gen_qabstracttransition.go +++ b/qt/gen_qabstracttransition.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -59,6 +60,28 @@ func UnsafeNewQAbstractTransition(h unsafe.Pointer, h_QObject unsafe.Pointer) *Q QObject: UnsafeNewQObject(h_QObject)} } +// NewQAbstractTransition constructs a new QAbstractTransition object. +func NewQAbstractTransition() *QAbstractTransition { + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractTransition_new(&outptr_QAbstractTransition, &outptr_QObject) + ret := newQAbstractTransition(outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractTransition2 constructs a new QAbstractTransition object. +func NewQAbstractTransition2(sourceState *QState) *QAbstractTransition { + var outptr_QAbstractTransition *C.QAbstractTransition = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractTransition_new2(sourceState.cPointer(), &outptr_QAbstractTransition, &outptr_QObject) + ret := newQAbstractTransition(outptr_QAbstractTransition, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractTransition) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractTransition_MetaObject(this.h))) } @@ -192,6 +215,208 @@ func QAbstractTransition_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QAbstractTransition) OnEventTest(slot func(event *QEvent) bool) { + C.QAbstractTransition_override_virtual_EventTest(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTransition_EventTest +func miqt_exec_callback_QAbstractTransition_EventTest(self *C.QAbstractTransition, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QAbstractTransition) OnOnTransition(slot func(event *QEvent)) { + C.QAbstractTransition_override_virtual_OnTransition(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTransition_OnTransition +func miqt_exec_callback_QAbstractTransition_OnTransition(self *C.QAbstractTransition, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + +} + +func (this *QAbstractTransition) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QAbstractTransition_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QAbstractTransition) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QAbstractTransition_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTransition_Event +func miqt_exec_callback_QAbstractTransition_Event(self *C.QAbstractTransition, 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((&QAbstractTransition{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTransition) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAbstractTransition_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAbstractTransition) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAbstractTransition_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTransition_EventFilter +func miqt_exec_callback_QAbstractTransition_EventFilter(self *C.QAbstractTransition, 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((&QAbstractTransition{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTransition) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAbstractTransition_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractTransition) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAbstractTransition_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTransition_TimerEvent +func miqt_exec_callback_QAbstractTransition_TimerEvent(self *C.QAbstractTransition, 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((&QAbstractTransition{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractTransition) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAbstractTransition_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractTransition) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAbstractTransition_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTransition_ChildEvent +func miqt_exec_callback_QAbstractTransition_ChildEvent(self *C.QAbstractTransition, 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((&QAbstractTransition{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAbstractTransition) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAbstractTransition_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractTransition) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractTransition_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTransition_CustomEvent +func miqt_exec_callback_QAbstractTransition_CustomEvent(self *C.QAbstractTransition, 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((&QAbstractTransition{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAbstractTransition) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAbstractTransition_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractTransition) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractTransition_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTransition_ConnectNotify +func miqt_exec_callback_QAbstractTransition_ConnectNotify(self *C.QAbstractTransition, 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((&QAbstractTransition{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAbstractTransition) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAbstractTransition_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractTransition) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractTransition_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTransition_DisconnectNotify +func miqt_exec_callback_QAbstractTransition_DisconnectNotify(self *C.QAbstractTransition, 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((&QAbstractTransition{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QAbstractTransition) Delete() { diff --git a/qt/gen_qabstracttransition.h b/qt/gen_qabstracttransition.h index e76befaf..552c9329 100644 --- a/qt/gen_qabstracttransition.h +++ b/qt/gen_qabstracttransition.h @@ -18,22 +18,30 @@ extern "C" { class QAbstractAnimation; class QAbstractState; class QAbstractTransition; +class QChildEvent; class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QState; class QStateMachine; +class QTimerEvent; #else typedef struct QAbstractAnimation QAbstractAnimation; typedef struct QAbstractState QAbstractState; typedef struct QAbstractTransition QAbstractTransition; +typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QState QState; typedef struct QStateMachine QStateMachine; +typedef struct QTimerEvent QTimerEvent; #endif +void QAbstractTransition_new(QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +void QAbstractTransition_new2(QState* sourceState, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); QMetaObject* QAbstractTransition_MetaObject(const QAbstractTransition* self); void* QAbstractTransition_Metacast(QAbstractTransition* self, const char* param1); struct miqt_string QAbstractTransition_Tr(const char* s); @@ -56,6 +64,24 @@ 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_override_virtual_EventTest(void* self, intptr_t slot); +bool QAbstractTransition_virtualbase_EventTest(void* self, QEvent* event); +void QAbstractTransition_override_virtual_OnTransition(void* self, intptr_t slot); +void QAbstractTransition_virtualbase_OnTransition(void* self, QEvent* event); +void QAbstractTransition_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractTransition_virtualbase_Event(void* self, QEvent* e); +void QAbstractTransition_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractTransition_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAbstractTransition_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractTransition_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractTransition_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAbstractTransition_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAbstractTransition_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAbstractTransition_virtualbase_CustomEvent(void* self, QEvent* event); +void QAbstractTransition_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAbstractTransition_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAbstractTransition_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAbstractTransition_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractTransition_Delete(QAbstractTransition* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qaccessiblebridge.cpp b/qt/gen_qaccessiblebridge.cpp index 7357f479..5bf145f1 100644 --- a/qt/gen_qaccessiblebridge.cpp +++ b/qt/gen_qaccessiblebridge.cpp @@ -2,11 +2,15 @@ #include #include #include +#include +#include +#include #include #include #include #include #include +#include #include #include "gen_qaccessiblebridge.h" #include "_cgo_export.h" @@ -31,6 +35,222 @@ void QAccessibleBridge_Delete(QAccessibleBridge* self, bool isSubclass) { } } +class MiqtVirtualQAccessibleBridgePlugin : public virtual QAccessibleBridgePlugin { +public: + + MiqtVirtualQAccessibleBridgePlugin(): QAccessibleBridgePlugin() {}; + MiqtVirtualQAccessibleBridgePlugin(QObject* parent): QAccessibleBridgePlugin(parent) {}; + + virtual ~MiqtVirtualQAccessibleBridgePlugin() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Create = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleBridge* create(const QString& key) override { + if (handle__Create == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + 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(); + struct miqt_string key_ms; + key_ms.len = key_b.length(); + key_ms.data = static_cast(malloc(key_ms.len)); + memcpy(key_ms.data, key_b.data(), key_ms.len); + struct miqt_string sigval1 = key_ms; + + QAccessibleBridge* callback_return_value = miqt_exec_callback_QAccessibleBridgePlugin_Create(this, handle__Create, sigval1); + + return callback_return_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 QAccessibleBridgePlugin::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAccessibleBridgePlugin_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAccessibleBridgePlugin::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 QAccessibleBridgePlugin::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAccessibleBridgePlugin_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAccessibleBridgePlugin::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) { + QAccessibleBridgePlugin::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAccessibleBridgePlugin_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAccessibleBridgePlugin::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) { + QAccessibleBridgePlugin::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAccessibleBridgePlugin_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAccessibleBridgePlugin::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) { + QAccessibleBridgePlugin::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAccessibleBridgePlugin_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAccessibleBridgePlugin::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) { + QAccessibleBridgePlugin::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAccessibleBridgePlugin_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAccessibleBridgePlugin::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) { + QAccessibleBridgePlugin::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAccessibleBridgePlugin_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAccessibleBridgePlugin::disconnectNotify(*signal); + + } + +}; + +void QAccessibleBridgePlugin_new(QAccessibleBridgePlugin** outptr_QAccessibleBridgePlugin, QObject** outptr_QObject) { + MiqtVirtualQAccessibleBridgePlugin* ret = new MiqtVirtualQAccessibleBridgePlugin(); + *outptr_QAccessibleBridgePlugin = ret; + *outptr_QObject = static_cast(ret); +} + +void QAccessibleBridgePlugin_new2(QObject* parent, QAccessibleBridgePlugin** outptr_QAccessibleBridgePlugin, QObject** outptr_QObject) { + MiqtVirtualQAccessibleBridgePlugin* ret = new MiqtVirtualQAccessibleBridgePlugin(parent); + *outptr_QAccessibleBridgePlugin = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAccessibleBridgePlugin_MetaObject(const QAccessibleBridgePlugin* self) { return (QMetaObject*) self->metaObject(); } @@ -110,9 +330,69 @@ struct miqt_string QAccessibleBridgePlugin_TrUtf83(const char* s, const char* c, return _ms; } +void QAccessibleBridgePlugin_override_virtual_Create(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleBridgePlugin*)(self) )->handle__Create = slot; +} + +void QAccessibleBridgePlugin_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleBridgePlugin*)(self) )->handle__Event = slot; +} + +bool QAccessibleBridgePlugin_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAccessibleBridgePlugin*)(self) )->virtualbase_Event(event); +} + +void QAccessibleBridgePlugin_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleBridgePlugin*)(self) )->handle__EventFilter = slot; +} + +bool QAccessibleBridgePlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAccessibleBridgePlugin*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAccessibleBridgePlugin_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleBridgePlugin*)(self) )->handle__TimerEvent = slot; +} + +void QAccessibleBridgePlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAccessibleBridgePlugin*)(self) )->virtualbase_TimerEvent(event); +} + +void QAccessibleBridgePlugin_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleBridgePlugin*)(self) )->handle__ChildEvent = slot; +} + +void QAccessibleBridgePlugin_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAccessibleBridgePlugin*)(self) )->virtualbase_ChildEvent(event); +} + +void QAccessibleBridgePlugin_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleBridgePlugin*)(self) )->handle__CustomEvent = slot; +} + +void QAccessibleBridgePlugin_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAccessibleBridgePlugin*)(self) )->virtualbase_CustomEvent(event); +} + +void QAccessibleBridgePlugin_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleBridgePlugin*)(self) )->handle__ConnectNotify = slot; +} + +void QAccessibleBridgePlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAccessibleBridgePlugin*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAccessibleBridgePlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleBridgePlugin*)(self) )->handle__DisconnectNotify = slot; +} + +void QAccessibleBridgePlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAccessibleBridgePlugin*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAccessibleBridgePlugin_Delete(QAccessibleBridgePlugin* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qaccessiblebridge.go b/qt/gen_qaccessiblebridge.go index 9d00e060..cd7210e1 100644 --- a/qt/gen_qaccessiblebridge.go +++ b/qt/gen_qaccessiblebridge.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -114,6 +115,28 @@ func UnsafeNewQAccessibleBridgePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer QObject: UnsafeNewQObject(h_QObject)} } +// NewQAccessibleBridgePlugin constructs a new QAccessibleBridgePlugin object. +func NewQAccessibleBridgePlugin() *QAccessibleBridgePlugin { + var outptr_QAccessibleBridgePlugin *C.QAccessibleBridgePlugin = nil + var outptr_QObject *C.QObject = nil + + C.QAccessibleBridgePlugin_new(&outptr_QAccessibleBridgePlugin, &outptr_QObject) + ret := newQAccessibleBridgePlugin(outptr_QAccessibleBridgePlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAccessibleBridgePlugin2 constructs a new QAccessibleBridgePlugin object. +func NewQAccessibleBridgePlugin2(parent *QObject) *QAccessibleBridgePlugin { + var outptr_QAccessibleBridgePlugin *C.QAccessibleBridgePlugin = nil + var outptr_QObject *C.QObject = nil + + C.QAccessibleBridgePlugin_new2(parent.cPointer(), &outptr_QAccessibleBridgePlugin, &outptr_QObject) + ret := newQAccessibleBridgePlugin(outptr_QAccessibleBridgePlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAccessibleBridgePlugin) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAccessibleBridgePlugin_MetaObject(this.h))) } @@ -193,6 +216,194 @@ func QAccessibleBridgePlugin_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QAccessibleBridgePlugin) OnCreate(slot func(key string) *QAccessibleBridge) { + C.QAccessibleBridgePlugin_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleBridgePlugin_Create +func miqt_exec_callback_QAccessibleBridgePlugin_Create(self *C.QAccessibleBridgePlugin, cb C.intptr_t, key C.struct_miqt_string) *C.QAccessibleBridge { + gofunc, ok := cgo.Handle(cb).Value().(func(key string) *QAccessibleBridge) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var key_ms C.struct_miqt_string = key + key_ret := C.GoStringN(key_ms.data, C.int(int64(key_ms.len))) + C.free(unsafe.Pointer(key_ms.data)) + slotval1 := key_ret + + virtualReturn := gofunc(slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAccessibleBridgePlugin) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAccessibleBridgePlugin_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAccessibleBridgePlugin) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAccessibleBridgePlugin_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleBridgePlugin_Event +func miqt_exec_callback_QAccessibleBridgePlugin_Event(self *C.QAccessibleBridgePlugin, 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((&QAccessibleBridgePlugin{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAccessibleBridgePlugin) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAccessibleBridgePlugin_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAccessibleBridgePlugin) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAccessibleBridgePlugin_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleBridgePlugin_EventFilter +func miqt_exec_callback_QAccessibleBridgePlugin_EventFilter(self *C.QAccessibleBridgePlugin, 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((&QAccessibleBridgePlugin{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAccessibleBridgePlugin) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAccessibleBridgePlugin_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAccessibleBridgePlugin) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAccessibleBridgePlugin_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleBridgePlugin_TimerEvent +func miqt_exec_callback_QAccessibleBridgePlugin_TimerEvent(self *C.QAccessibleBridgePlugin, 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((&QAccessibleBridgePlugin{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAccessibleBridgePlugin) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAccessibleBridgePlugin_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAccessibleBridgePlugin) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAccessibleBridgePlugin_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleBridgePlugin_ChildEvent +func miqt_exec_callback_QAccessibleBridgePlugin_ChildEvent(self *C.QAccessibleBridgePlugin, 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((&QAccessibleBridgePlugin{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAccessibleBridgePlugin) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAccessibleBridgePlugin_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAccessibleBridgePlugin) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAccessibleBridgePlugin_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleBridgePlugin_CustomEvent +func miqt_exec_callback_QAccessibleBridgePlugin_CustomEvent(self *C.QAccessibleBridgePlugin, 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((&QAccessibleBridgePlugin{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAccessibleBridgePlugin) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAccessibleBridgePlugin_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAccessibleBridgePlugin) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAccessibleBridgePlugin_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleBridgePlugin_ConnectNotify +func miqt_exec_callback_QAccessibleBridgePlugin_ConnectNotify(self *C.QAccessibleBridgePlugin, 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((&QAccessibleBridgePlugin{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAccessibleBridgePlugin) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAccessibleBridgePlugin_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAccessibleBridgePlugin) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAccessibleBridgePlugin_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleBridgePlugin_DisconnectNotify +func miqt_exec_callback_QAccessibleBridgePlugin_DisconnectNotify(self *C.QAccessibleBridgePlugin, 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((&QAccessibleBridgePlugin{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QAccessibleBridgePlugin) Delete() { diff --git a/qt/gen_qaccessiblebridge.h b/qt/gen_qaccessiblebridge.h index 8e9d9d08..2883d6c7 100644 --- a/qt/gen_qaccessiblebridge.h +++ b/qt/gen_qaccessiblebridge.h @@ -19,15 +19,23 @@ class QAccessibleBridge; class QAccessibleBridgePlugin; class QAccessibleEvent; class QAccessibleInterface; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAccessibleBridge QAccessibleBridge; typedef struct QAccessibleBridgePlugin QAccessibleBridgePlugin; typedef struct QAccessibleEvent QAccessibleEvent; typedef struct QAccessibleInterface QAccessibleInterface; +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 void QAccessibleBridge_SetRootObject(QAccessibleBridge* self, QAccessibleInterface* rootObject); @@ -35,6 +43,8 @@ void QAccessibleBridge_NotifyAccessibilityUpdate(QAccessibleBridge* self, QAcces void QAccessibleBridge_OperatorAssign(QAccessibleBridge* self, QAccessibleBridge* param1); void QAccessibleBridge_Delete(QAccessibleBridge* self, bool isSubclass); +void QAccessibleBridgePlugin_new(QAccessibleBridgePlugin** outptr_QAccessibleBridgePlugin, QObject** outptr_QObject); +void QAccessibleBridgePlugin_new2(QObject* parent, QAccessibleBridgePlugin** outptr_QAccessibleBridgePlugin, QObject** outptr_QObject); QMetaObject* QAccessibleBridgePlugin_MetaObject(const QAccessibleBridgePlugin* self); void* QAccessibleBridgePlugin_Metacast(QAccessibleBridgePlugin* self, const char* param1); struct miqt_string QAccessibleBridgePlugin_Tr(const char* s); @@ -44,6 +54,22 @@ 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_override_virtual_Create(void* self, intptr_t slot); +QAccessibleBridge* QAccessibleBridgePlugin_virtualbase_Create(void* self, struct miqt_string key); +void QAccessibleBridgePlugin_override_virtual_Event(void* self, intptr_t slot); +bool QAccessibleBridgePlugin_virtualbase_Event(void* self, QEvent* event); +void QAccessibleBridgePlugin_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAccessibleBridgePlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAccessibleBridgePlugin_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAccessibleBridgePlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAccessibleBridgePlugin_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAccessibleBridgePlugin_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAccessibleBridgePlugin_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAccessibleBridgePlugin_virtualbase_CustomEvent(void* self, QEvent* event); +void QAccessibleBridgePlugin_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAccessibleBridgePlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAccessibleBridgePlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAccessibleBridgePlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAccessibleBridgePlugin_Delete(QAccessibleBridgePlugin* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qaccessibleobject.cpp b/qt/gen_qaccessibleobject.cpp index b948ed6d..5a54f869 100644 --- a/qt/gen_qaccessibleobject.cpp +++ b/qt/gen_qaccessibleobject.cpp @@ -33,352 +33,8 @@ QAccessibleInterface* QAccessibleObject_ChildAt(const QAccessibleObject* self, i return self->childAt(static_cast(x), static_cast(y)); } -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(); + QAccessibleApplication* ret = new QAccessibleApplication(); *outptr_QAccessibleApplication = ret; *outptr_QAccessibleObject = static_cast(ret); *outptr_QAccessibleInterface = static_cast(ret); @@ -428,121 +84,9 @@ QAccessible__State* QAccessibleApplication_State(const QAccessibleApplication* s return new QAccessible::State(self->state()); } -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 ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qaccessibleobject.go b/qt/gen_qaccessibleobject.go index 927daecb..4918f553 100644 --- a/qt/gen_qaccessibleobject.go +++ b/qt/gen_qaccessibleobject.go @@ -10,7 +10,6 @@ import "C" import ( "runtime" - "runtime/cgo" "unsafe" ) @@ -173,344 +172,6 @@ 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.bool(this.isSubclass)) diff --git a/qt/gen_qaccessibleobject.h b/qt/gen_qaccessibleobject.h index 889ae333..fe86a600 100644 --- a/qt/gen_qaccessibleobject.h +++ b/qt/gen_qaccessibleobject.h @@ -52,34 +52,6 @@ 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_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 diff --git a/qt/gen_qaccessibleplugin.cpp b/qt/gen_qaccessibleplugin.cpp index e05efcc8..15702148 100644 --- a/qt/gen_qaccessibleplugin.cpp +++ b/qt/gen_qaccessibleplugin.cpp @@ -1,14 +1,235 @@ #include #include +#include +#include +#include #include #include #include #include #include +#include #include #include "gen_qaccessibleplugin.h" #include "_cgo_export.h" +class MiqtVirtualQAccessiblePlugin : public virtual QAccessiblePlugin { +public: + + MiqtVirtualQAccessiblePlugin(): QAccessiblePlugin() {}; + MiqtVirtualQAccessiblePlugin(QObject* parent): QAccessiblePlugin(parent) {}; + + virtual ~MiqtVirtualQAccessiblePlugin() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Create = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* create(const QString& key, QObject* object) override { + if (handle__Create == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + 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(); + struct miqt_string key_ms; + key_ms.len = key_b.length(); + key_ms.data = static_cast(malloc(key_ms.len)); + memcpy(key_ms.data, key_b.data(), key_ms.len); + struct miqt_string sigval1 = key_ms; + QObject* sigval2 = object; + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessiblePlugin_Create(this, handle__Create, sigval1, sigval2); + + return callback_return_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 QAccessiblePlugin::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAccessiblePlugin_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAccessiblePlugin::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 QAccessiblePlugin::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAccessiblePlugin_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAccessiblePlugin::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) { + QAccessiblePlugin::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAccessiblePlugin_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAccessiblePlugin::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) { + QAccessiblePlugin::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAccessiblePlugin_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAccessiblePlugin::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) { + QAccessiblePlugin::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAccessiblePlugin_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAccessiblePlugin::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) { + QAccessiblePlugin::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAccessiblePlugin_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAccessiblePlugin::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) { + QAccessiblePlugin::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAccessiblePlugin_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAccessiblePlugin::disconnectNotify(*signal); + + } + +}; + +void QAccessiblePlugin_new(QAccessiblePlugin** outptr_QAccessiblePlugin, QObject** outptr_QObject) { + MiqtVirtualQAccessiblePlugin* ret = new MiqtVirtualQAccessiblePlugin(); + *outptr_QAccessiblePlugin = ret; + *outptr_QObject = static_cast(ret); +} + +void QAccessiblePlugin_new2(QObject* parent, QAccessiblePlugin** outptr_QAccessiblePlugin, QObject** outptr_QObject) { + MiqtVirtualQAccessiblePlugin* ret = new MiqtVirtualQAccessiblePlugin(parent); + *outptr_QAccessiblePlugin = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAccessiblePlugin_MetaObject(const QAccessiblePlugin* self) { return (QMetaObject*) self->metaObject(); } @@ -88,9 +309,69 @@ struct miqt_string QAccessiblePlugin_TrUtf83(const char* s, const char* c, int n return _ms; } +void QAccessiblePlugin_override_virtual_Create(void* self, intptr_t slot) { + dynamic_cast( (QAccessiblePlugin*)(self) )->handle__Create = slot; +} + +void QAccessiblePlugin_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAccessiblePlugin*)(self) )->handle__Event = slot; +} + +bool QAccessiblePlugin_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAccessiblePlugin*)(self) )->virtualbase_Event(event); +} + +void QAccessiblePlugin_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAccessiblePlugin*)(self) )->handle__EventFilter = slot; +} + +bool QAccessiblePlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAccessiblePlugin*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAccessiblePlugin_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAccessiblePlugin*)(self) )->handle__TimerEvent = slot; +} + +void QAccessiblePlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAccessiblePlugin*)(self) )->virtualbase_TimerEvent(event); +} + +void QAccessiblePlugin_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAccessiblePlugin*)(self) )->handle__ChildEvent = slot; +} + +void QAccessiblePlugin_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAccessiblePlugin*)(self) )->virtualbase_ChildEvent(event); +} + +void QAccessiblePlugin_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAccessiblePlugin*)(self) )->handle__CustomEvent = slot; +} + +void QAccessiblePlugin_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAccessiblePlugin*)(self) )->virtualbase_CustomEvent(event); +} + +void QAccessiblePlugin_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAccessiblePlugin*)(self) )->handle__ConnectNotify = slot; +} + +void QAccessiblePlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAccessiblePlugin*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAccessiblePlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAccessiblePlugin*)(self) )->handle__DisconnectNotify = slot; +} + +void QAccessiblePlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAccessiblePlugin*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAccessiblePlugin_Delete(QAccessiblePlugin* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qaccessibleplugin.go b/qt/gen_qaccessibleplugin.go index df203e76..db53f2e1 100644 --- a/qt/gen_qaccessibleplugin.go +++ b/qt/gen_qaccessibleplugin.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,28 @@ func UnsafeNewQAccessiblePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAc QObject: UnsafeNewQObject(h_QObject)} } +// NewQAccessiblePlugin constructs a new QAccessiblePlugin object. +func NewQAccessiblePlugin() *QAccessiblePlugin { + var outptr_QAccessiblePlugin *C.QAccessiblePlugin = nil + var outptr_QObject *C.QObject = nil + + C.QAccessiblePlugin_new(&outptr_QAccessiblePlugin, &outptr_QObject) + ret := newQAccessiblePlugin(outptr_QAccessiblePlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAccessiblePlugin2 constructs a new QAccessiblePlugin object. +func NewQAccessiblePlugin2(parent *QObject) *QAccessiblePlugin { + var outptr_QAccessiblePlugin *C.QAccessiblePlugin = nil + var outptr_QObject *C.QObject = nil + + C.QAccessiblePlugin_new2(parent.cPointer(), &outptr_QAccessiblePlugin, &outptr_QObject) + ret := newQAccessiblePlugin(outptr_QAccessiblePlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAccessiblePlugin) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAccessiblePlugin_MetaObject(this.h))) } @@ -131,6 +154,195 @@ func QAccessiblePlugin_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QAccessiblePlugin) OnCreate(slot func(key string, object *QObject) *QAccessibleInterface) { + C.QAccessiblePlugin_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessiblePlugin_Create +func miqt_exec_callback_QAccessiblePlugin_Create(self *C.QAccessiblePlugin, cb C.intptr_t, key C.struct_miqt_string, object *C.QObject) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(key string, object *QObject) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var key_ms C.struct_miqt_string = key + key_ret := C.GoStringN(key_ms.data, C.int(int64(key_ms.len))) + C.free(unsafe.Pointer(key_ms.data)) + slotval1 := key_ret + slotval2 := UnsafeNewQObject(unsafe.Pointer(object)) + + virtualReturn := gofunc(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QAccessiblePlugin) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAccessiblePlugin_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAccessiblePlugin) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAccessiblePlugin_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessiblePlugin_Event +func miqt_exec_callback_QAccessiblePlugin_Event(self *C.QAccessiblePlugin, 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((&QAccessiblePlugin{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAccessiblePlugin) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAccessiblePlugin_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAccessiblePlugin) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAccessiblePlugin_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessiblePlugin_EventFilter +func miqt_exec_callback_QAccessiblePlugin_EventFilter(self *C.QAccessiblePlugin, 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((&QAccessiblePlugin{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAccessiblePlugin) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAccessiblePlugin_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAccessiblePlugin) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAccessiblePlugin_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessiblePlugin_TimerEvent +func miqt_exec_callback_QAccessiblePlugin_TimerEvent(self *C.QAccessiblePlugin, 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((&QAccessiblePlugin{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAccessiblePlugin) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAccessiblePlugin_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAccessiblePlugin) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAccessiblePlugin_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessiblePlugin_ChildEvent +func miqt_exec_callback_QAccessiblePlugin_ChildEvent(self *C.QAccessiblePlugin, 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((&QAccessiblePlugin{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAccessiblePlugin) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAccessiblePlugin_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAccessiblePlugin) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAccessiblePlugin_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessiblePlugin_CustomEvent +func miqt_exec_callback_QAccessiblePlugin_CustomEvent(self *C.QAccessiblePlugin, 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((&QAccessiblePlugin{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAccessiblePlugin) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAccessiblePlugin_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAccessiblePlugin) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAccessiblePlugin_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessiblePlugin_ConnectNotify +func miqt_exec_callback_QAccessiblePlugin_ConnectNotify(self *C.QAccessiblePlugin, 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((&QAccessiblePlugin{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAccessiblePlugin) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAccessiblePlugin_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAccessiblePlugin) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAccessiblePlugin_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessiblePlugin_DisconnectNotify +func miqt_exec_callback_QAccessiblePlugin_DisconnectNotify(self *C.QAccessiblePlugin, 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((&QAccessiblePlugin{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QAccessiblePlugin) Delete() { diff --git a/qt/gen_qaccessibleplugin.h b/qt/gen_qaccessibleplugin.h index e628353a..373dcb2f 100644 --- a/qt/gen_qaccessibleplugin.h +++ b/qt/gen_qaccessibleplugin.h @@ -17,15 +17,25 @@ extern "C" { #ifdef __cplusplus class QAccessibleInterface; class QAccessiblePlugin; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAccessibleInterface QAccessibleInterface; typedef struct QAccessiblePlugin QAccessiblePlugin; +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 +void QAccessiblePlugin_new(QAccessiblePlugin** outptr_QAccessiblePlugin, QObject** outptr_QObject); +void QAccessiblePlugin_new2(QObject* parent, QAccessiblePlugin** outptr_QAccessiblePlugin, QObject** outptr_QObject); QMetaObject* QAccessiblePlugin_MetaObject(const QAccessiblePlugin* self); void* QAccessiblePlugin_Metacast(QAccessiblePlugin* self, const char* param1); struct miqt_string QAccessiblePlugin_Tr(const char* s); @@ -35,6 +45,22 @@ 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_override_virtual_Create(void* self, intptr_t slot); +QAccessibleInterface* QAccessiblePlugin_virtualbase_Create(void* self, struct miqt_string key, QObject* object); +void QAccessiblePlugin_override_virtual_Event(void* self, intptr_t slot); +bool QAccessiblePlugin_virtualbase_Event(void* self, QEvent* event); +void QAccessiblePlugin_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAccessiblePlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAccessiblePlugin_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAccessiblePlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAccessiblePlugin_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAccessiblePlugin_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAccessiblePlugin_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAccessiblePlugin_virtualbase_CustomEvent(void* self, QEvent* event); +void QAccessiblePlugin_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAccessiblePlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAccessiblePlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAccessiblePlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAccessiblePlugin_Delete(QAccessiblePlugin* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qanimationgroup.cpp b/qt/gen_qanimationgroup.cpp index e11769b2..5373b5fb 100644 --- a/qt/gen_qanimationgroup.cpp +++ b/qt/gen_qanimationgroup.cpp @@ -10,6 +10,136 @@ #include "gen_qanimationgroup.h" #include "_cgo_export.h" +class MiqtVirtualQAnimationGroup : public virtual QAnimationGroup { +public: + + MiqtVirtualQAnimationGroup(): QAnimationGroup() {}; + MiqtVirtualQAnimationGroup(QObject* parent): QAnimationGroup(parent) {}; + + virtual ~MiqtVirtualQAnimationGroup() = 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 QAnimationGroup::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAnimationGroup_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAnimationGroup::event(event); + + } + + // 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 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QAnimationGroup_Duration(const_cast(this), handle__Duration); + + return static_cast(callback_return_value); + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = currentTime; + + miqt_exec_callback_QAnimationGroup_UpdateCurrentTime(this, handle__UpdateCurrentTime, sigval1); + + + } + + // 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) { + QAnimationGroup::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_QAnimationGroup_UpdateState(this, handle__UpdateState, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateState(int newState, int oldState) { + + QAnimationGroup::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) { + QAnimationGroup::updateDirection(direction); + return; + } + + QAbstractAnimation::Direction direction_ret = direction; + int sigval1 = static_cast(direction_ret); + + miqt_exec_callback_QAnimationGroup_UpdateDirection(this, handle__UpdateDirection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateDirection(int direction) { + + QAnimationGroup::updateDirection(static_cast(direction)); + + } + +}; + +void QAnimationGroup_new(QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQAnimationGroup* ret = new MiqtVirtualQAnimationGroup(); + *outptr_QAnimationGroup = ret; + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QAnimationGroup_new2(QObject* parent, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQAnimationGroup* ret = new MiqtVirtualQAnimationGroup(parent); + *outptr_QAnimationGroup = ret; + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAnimationGroup_MetaObject(const QAnimationGroup* self) { return (QMetaObject*) self->metaObject(); } @@ -116,9 +246,41 @@ struct miqt_string QAnimationGroup_TrUtf83(const char* s, const char* c, int n) return _ms; } +void QAnimationGroup_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAnimationGroup*)(self) )->handle__Event = slot; +} + +bool QAnimationGroup_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAnimationGroup*)(self) )->virtualbase_Event(event); +} + +void QAnimationGroup_override_virtual_Duration(void* self, intptr_t slot) { + dynamic_cast( (QAnimationGroup*)(self) )->handle__Duration = slot; +} + +void QAnimationGroup_override_virtual_UpdateCurrentTime(void* self, intptr_t slot) { + dynamic_cast( (QAnimationGroup*)(self) )->handle__UpdateCurrentTime = slot; +} + +void QAnimationGroup_override_virtual_UpdateState(void* self, intptr_t slot) { + dynamic_cast( (QAnimationGroup*)(self) )->handle__UpdateState = slot; +} + +void QAnimationGroup_virtualbase_UpdateState(void* self, int newState, int oldState) { + ( (MiqtVirtualQAnimationGroup*)(self) )->virtualbase_UpdateState(newState, oldState); +} + +void QAnimationGroup_override_virtual_UpdateDirection(void* self, intptr_t slot) { + dynamic_cast( (QAnimationGroup*)(self) )->handle__UpdateDirection = slot; +} + +void QAnimationGroup_virtualbase_UpdateDirection(void* self, int direction) { + ( (MiqtVirtualQAnimationGroup*)(self) )->virtualbase_UpdateDirection(direction); +} + void QAnimationGroup_Delete(QAnimationGroup* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qanimationgroup.go b/qt/gen_qanimationgroup.go index 10c14f49..b543884b 100644 --- a/qt/gen_qanimationgroup.go +++ b/qt/gen_qanimationgroup.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,30 @@ func UnsafeNewQAnimationGroup(h unsafe.Pointer, h_QAbstractAnimation unsafe.Poin QAbstractAnimation: UnsafeNewQAbstractAnimation(h_QAbstractAnimation, h_QObject)} } +// NewQAnimationGroup constructs a new QAnimationGroup object. +func NewQAnimationGroup() *QAnimationGroup { + var outptr_QAnimationGroup *C.QAnimationGroup = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QAnimationGroup_new(&outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQAnimationGroup(outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAnimationGroup2 constructs a new QAnimationGroup object. +func NewQAnimationGroup2(parent *QObject) *QAnimationGroup { + var outptr_QAnimationGroup *C.QAnimationGroup = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QAnimationGroup_new2(parent.cPointer(), &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQAnimationGroup(outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAnimationGroup) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAnimationGroup_MetaObject(this.h))) } @@ -156,6 +181,112 @@ func QAnimationGroup_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QAnimationGroup) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAnimationGroup_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAnimationGroup) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAnimationGroup_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationGroup_Event +func miqt_exec_callback_QAnimationGroup_Event(self *C.QAnimationGroup, 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((&QAnimationGroup{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QAnimationGroup) OnDuration(slot func() int) { + C.QAnimationGroup_override_virtual_Duration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationGroup_Duration +func miqt_exec_callback_QAnimationGroup_Duration(self *C.QAnimationGroup, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *QAnimationGroup) OnUpdateCurrentTime(slot func(currentTime int)) { + C.QAnimationGroup_override_virtual_UpdateCurrentTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationGroup_UpdateCurrentTime +func miqt_exec_callback_QAnimationGroup_UpdateCurrentTime(self *C.QAnimationGroup, cb C.intptr_t, currentTime C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(currentTime int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(currentTime) + + gofunc(slotval1) + +} + +func (this *QAnimationGroup) callVirtualBase_UpdateState(newState QAbstractAnimation__State, oldState QAbstractAnimation__State) { + + C.QAnimationGroup_virtualbase_UpdateState(unsafe.Pointer(this.h), (C.int)(newState), (C.int)(oldState)) + +} +func (this *QAnimationGroup) OnUpdateState(slot func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) { + C.QAnimationGroup_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationGroup_UpdateState +func miqt_exec_callback_QAnimationGroup_UpdateState(self *C.QAnimationGroup, 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((&QAnimationGroup{h: self}).callVirtualBase_UpdateState, slotval1, slotval2) + +} + +func (this *QAnimationGroup) callVirtualBase_UpdateDirection(direction QAbstractAnimation__Direction) { + + C.QAnimationGroup_virtualbase_UpdateDirection(unsafe.Pointer(this.h), (C.int)(direction)) + +} +func (this *QAnimationGroup) OnUpdateDirection(slot func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) { + C.QAnimationGroup_override_virtual_UpdateDirection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationGroup_UpdateDirection +func miqt_exec_callback_QAnimationGroup_UpdateDirection(self *C.QAnimationGroup, 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((&QAnimationGroup{h: self}).callVirtualBase_UpdateDirection, slotval1) + +} + // Delete this object from C++ memory. func (this *QAnimationGroup) Delete() { C.QAnimationGroup_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qanimationgroup.h b/qt/gen_qanimationgroup.h index a9fd01cd..544b39b8 100644 --- a/qt/gen_qanimationgroup.h +++ b/qt/gen_qanimationgroup.h @@ -28,6 +28,8 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QAnimationGroup_new(QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QAnimationGroup_new2(QObject* parent, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); QMetaObject* QAnimationGroup_MetaObject(const QAnimationGroup* self); void* QAnimationGroup_Metacast(QAnimationGroup* self, const char* param1); struct miqt_string QAnimationGroup_Tr(const char* s); @@ -45,6 +47,16 @@ 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_override_virtual_Event(void* self, intptr_t slot); +bool QAnimationGroup_virtualbase_Event(void* self, QEvent* event); +void QAnimationGroup_override_virtual_Duration(void* self, intptr_t slot); +int QAnimationGroup_virtualbase_Duration(const void* self); +void QAnimationGroup_override_virtual_UpdateCurrentTime(void* self, intptr_t slot); +void QAnimationGroup_virtualbase_UpdateCurrentTime(void* self, int currentTime); +void QAnimationGroup_override_virtual_UpdateState(void* self, intptr_t slot); +void QAnimationGroup_virtualbase_UpdateState(void* self, int newState, int oldState); +void QAnimationGroup_override_virtual_UpdateDirection(void* self, intptr_t slot); +void QAnimationGroup_virtualbase_UpdateDirection(void* self, int direction); void QAnimationGroup_Delete(QAnimationGroup* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qcolumnview.cpp b/qt/gen_qcolumnview.cpp index 952bbfed..d246be47 100644 --- a/qt/gen_qcolumnview.cpp +++ b/qt/gen_qcolumnview.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -20,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -341,6 +343,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QColumnView::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QColumnView_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QColumnView::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__HorizontalOffset = 0; @@ -713,6 +740,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QColumnView::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QColumnView_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QColumnView::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__UpdateEditorData = 0; @@ -1796,6 +1852,14 @@ void QColumnView_virtualbase_SetSelection(void* self, QRect* rect, int command) ( (MiqtVirtualQColumnView*)(self) )->virtualbase_SetSelection(rect, command); } +void QColumnView_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QColumnView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QColumnView_override_virtual_HorizontalOffset(void* self, intptr_t slot) { dynamic_cast( (QColumnView*)(self) )->handle__HorizontalOffset = slot; } @@ -1908,6 +1972,14 @@ void QColumnView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* paren ( (MiqtVirtualQColumnView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); } +void QColumnView_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SelectionChanged = slot; +} + +void QColumnView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QColumnView_override_virtual_UpdateEditorData(void* self, intptr_t slot) { dynamic_cast( (QColumnView*)(self) )->handle__UpdateEditorData = slot; } diff --git a/qt/gen_qcolumnview.go b/qt/gen_qcolumnview.go index bbd52f62..373413c7 100644 --- a/qt/gen_qcolumnview.go +++ b/qt/gen_qcolumnview.go @@ -550,6 +550,34 @@ func miqt_exec_callback_QColumnView_SetSelection(self *C.QColumnView, cb C.intpt } +func (this *QColumnView) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QColumnView_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColumnView) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QColumnView_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_VisualRegionForSelection +func miqt_exec_callback_QColumnView_VisualRegionForSelection(self *C.QColumnView, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QColumnView) callVirtualBase_HorizontalOffset() int { return (int)(C.QColumnView_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) @@ -904,6 +932,30 @@ func miqt_exec_callback_QColumnView_RowsAboutToBeRemoved(self *C.QColumnView, cb } +func (this *QColumnView) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QColumnView_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QColumnView) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QColumnView_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SelectionChanged +func miqt_exec_callback_QColumnView_SelectionChanged(self *C.QColumnView, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QColumnView{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QColumnView) callVirtualBase_UpdateEditorData() { C.QColumnView_virtualbase_UpdateEditorData(unsafe.Pointer(this.h)) diff --git a/qt/gen_qcolumnview.h b/qt/gen_qcolumnview.h index 1dd80ac9..c3503fc2 100644 --- a/qt/gen_qcolumnview.h +++ b/qt/gen_qcolumnview.h @@ -27,6 +27,7 @@ class QEvent; class QFocusEvent; class QFrame; class QInputMethodEvent; +class QItemSelection; class QItemSelectionModel; class QKeyEvent; class QMetaObject; @@ -36,6 +37,7 @@ class QObject; class QPaintDevice; class QPoint; class QRect; +class QRegion; class QResizeEvent; class QSize; class QStyleOptionViewItem; @@ -55,6 +57,7 @@ typedef struct QEvent QEvent; typedef struct QFocusEvent QFocusEvent; typedef struct QFrame QFrame; typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; @@ -64,6 +67,7 @@ typedef struct QObject QObject; typedef struct QPaintDevice QPaintDevice; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; @@ -98,6 +102,7 @@ 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); +QRegion* QColumnView_VisualRegionForSelection(const QColumnView* self, QItemSelection* selection); int QColumnView_HorizontalOffset(const QColumnView* self); int QColumnView_VerticalOffset(const QColumnView* self); void QColumnView_RowsInserted(QColumnView* self, QModelIndex* parent, int start, int end); @@ -132,6 +137,8 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QColumnView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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); @@ -160,6 +167,8 @@ 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_SelectionChanged(void* self, intptr_t slot); +void QColumnView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt/gen_qgenericplugin.cpp b/qt/gen_qgenericplugin.cpp index 27f68d4a..e4312a87 100644 --- a/qt/gen_qgenericplugin.cpp +++ b/qt/gen_qgenericplugin.cpp @@ -1,13 +1,241 @@ +#include +#include #include +#include #include #include #include #include #include +#include #include #include "gen_qgenericplugin.h" #include "_cgo_export.h" +class MiqtVirtualQGenericPlugin : public virtual QGenericPlugin { +public: + + MiqtVirtualQGenericPlugin(): QGenericPlugin() {}; + MiqtVirtualQGenericPlugin(QObject* parent): QGenericPlugin(parent) {}; + + virtual ~MiqtVirtualQGenericPlugin() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Create = 0; + + // Subclass to allow providing a Go implementation + virtual QObject* create(const QString& name, const QString& spec) override { + if (handle__Create == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + 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(); + struct miqt_string name_ms; + name_ms.len = name_b.length(); + name_ms.data = static_cast(malloc(name_ms.len)); + memcpy(name_ms.data, name_b.data(), name_ms.len); + struct miqt_string sigval1 = name_ms; + const QString spec_ret = spec; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray spec_b = spec_ret.toUtf8(); + struct miqt_string spec_ms; + spec_ms.len = spec_b.length(); + spec_ms.data = static_cast(malloc(spec_ms.len)); + memcpy(spec_ms.data, spec_b.data(), spec_ms.len); + struct miqt_string sigval2 = spec_ms; + + QObject* callback_return_value = miqt_exec_callback_QGenericPlugin_Create(this, handle__Create, sigval1, sigval2); + + return callback_return_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 QGenericPlugin::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGenericPlugin_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGenericPlugin::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 QGenericPlugin::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGenericPlugin_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QGenericPlugin::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) { + QGenericPlugin::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QGenericPlugin_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QGenericPlugin::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) { + QGenericPlugin::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QGenericPlugin_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QGenericPlugin::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) { + QGenericPlugin::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGenericPlugin_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QGenericPlugin::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) { + QGenericPlugin::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGenericPlugin_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QGenericPlugin::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) { + QGenericPlugin::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGenericPlugin_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QGenericPlugin::disconnectNotify(*signal); + + } + +}; + +void QGenericPlugin_new(QGenericPlugin** outptr_QGenericPlugin, QObject** outptr_QObject) { + MiqtVirtualQGenericPlugin* ret = new MiqtVirtualQGenericPlugin(); + *outptr_QGenericPlugin = ret; + *outptr_QObject = static_cast(ret); +} + +void QGenericPlugin_new2(QObject* parent, QGenericPlugin** outptr_QGenericPlugin, QObject** outptr_QObject) { + MiqtVirtualQGenericPlugin* ret = new MiqtVirtualQGenericPlugin(parent); + *outptr_QGenericPlugin = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QGenericPlugin_MetaObject(const QGenericPlugin* self) { return (QMetaObject*) self->metaObject(); } @@ -88,9 +316,69 @@ struct miqt_string QGenericPlugin_TrUtf83(const char* s, const char* c, int n) { return _ms; } +void QGenericPlugin_override_virtual_Create(void* self, intptr_t slot) { + dynamic_cast( (QGenericPlugin*)(self) )->handle__Create = slot; +} + +void QGenericPlugin_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGenericPlugin*)(self) )->handle__Event = slot; +} + +bool QGenericPlugin_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGenericPlugin*)(self) )->virtualbase_Event(event); +} + +void QGenericPlugin_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGenericPlugin*)(self) )->handle__EventFilter = slot; +} + +bool QGenericPlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQGenericPlugin*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QGenericPlugin_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QGenericPlugin*)(self) )->handle__TimerEvent = slot; +} + +void QGenericPlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQGenericPlugin*)(self) )->virtualbase_TimerEvent(event); +} + +void QGenericPlugin_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGenericPlugin*)(self) )->handle__ChildEvent = slot; +} + +void QGenericPlugin_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQGenericPlugin*)(self) )->virtualbase_ChildEvent(event); +} + +void QGenericPlugin_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QGenericPlugin*)(self) )->handle__CustomEvent = slot; +} + +void QGenericPlugin_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGenericPlugin*)(self) )->virtualbase_CustomEvent(event); +} + +void QGenericPlugin_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGenericPlugin*)(self) )->handle__ConnectNotify = slot; +} + +void QGenericPlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGenericPlugin*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QGenericPlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGenericPlugin*)(self) )->handle__DisconnectNotify = slot; +} + +void QGenericPlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGenericPlugin*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QGenericPlugin_Delete(QGenericPlugin* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qgenericplugin.go b/qt/gen_qgenericplugin.go index 67f329aa..f1a48fd4 100644 --- a/qt/gen_qgenericplugin.go +++ b/qt/gen_qgenericplugin.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,28 @@ func UnsafeNewQGenericPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGener QObject: UnsafeNewQObject(h_QObject)} } +// NewQGenericPlugin constructs a new QGenericPlugin object. +func NewQGenericPlugin() *QGenericPlugin { + var outptr_QGenericPlugin *C.QGenericPlugin = nil + var outptr_QObject *C.QObject = nil + + C.QGenericPlugin_new(&outptr_QGenericPlugin, &outptr_QObject) + ret := newQGenericPlugin(outptr_QGenericPlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQGenericPlugin2 constructs a new QGenericPlugin object. +func NewQGenericPlugin2(parent *QObject) *QGenericPlugin { + var outptr_QGenericPlugin *C.QGenericPlugin = nil + var outptr_QObject *C.QObject = nil + + C.QGenericPlugin_new2(parent.cPointer(), &outptr_QGenericPlugin, &outptr_QObject) + ret := newQGenericPlugin(outptr_QGenericPlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QGenericPlugin) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QGenericPlugin_MetaObject(this.h))) } @@ -135,6 +158,198 @@ func QGenericPlugin_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QGenericPlugin) OnCreate(slot func(name string, spec string) *QObject) { + C.QGenericPlugin_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGenericPlugin_Create +func miqt_exec_callback_QGenericPlugin_Create(self *C.QGenericPlugin, cb C.intptr_t, name C.struct_miqt_string, spec C.struct_miqt_string) *C.QObject { + gofunc, ok := cgo.Handle(cb).Value().(func(name string, spec string) *QObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var name_ms C.struct_miqt_string = name + name_ret := C.GoStringN(name_ms.data, C.int(int64(name_ms.len))) + C.free(unsafe.Pointer(name_ms.data)) + slotval1 := name_ret + var spec_ms C.struct_miqt_string = spec + spec_ret := C.GoStringN(spec_ms.data, C.int(int64(spec_ms.len))) + C.free(unsafe.Pointer(spec_ms.data)) + slotval2 := spec_ret + + virtualReturn := gofunc(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGenericPlugin) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGenericPlugin_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGenericPlugin) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGenericPlugin_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGenericPlugin_Event +func miqt_exec_callback_QGenericPlugin_Event(self *C.QGenericPlugin, 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((&QGenericPlugin{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGenericPlugin) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QGenericPlugin_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGenericPlugin) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QGenericPlugin_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGenericPlugin_EventFilter +func miqt_exec_callback_QGenericPlugin_EventFilter(self *C.QGenericPlugin, 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((&QGenericPlugin{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGenericPlugin) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QGenericPlugin_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGenericPlugin) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QGenericPlugin_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGenericPlugin_TimerEvent +func miqt_exec_callback_QGenericPlugin_TimerEvent(self *C.QGenericPlugin, 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((&QGenericPlugin{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QGenericPlugin) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QGenericPlugin_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGenericPlugin) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QGenericPlugin_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGenericPlugin_ChildEvent +func miqt_exec_callback_QGenericPlugin_ChildEvent(self *C.QGenericPlugin, 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((&QGenericPlugin{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QGenericPlugin) callVirtualBase_CustomEvent(event *QEvent) { + + C.QGenericPlugin_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGenericPlugin) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGenericPlugin_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGenericPlugin_CustomEvent +func miqt_exec_callback_QGenericPlugin_CustomEvent(self *C.QGenericPlugin, 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((&QGenericPlugin{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QGenericPlugin) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QGenericPlugin_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGenericPlugin) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGenericPlugin_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGenericPlugin_ConnectNotify +func miqt_exec_callback_QGenericPlugin_ConnectNotify(self *C.QGenericPlugin, 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((&QGenericPlugin{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QGenericPlugin) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QGenericPlugin_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGenericPlugin) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGenericPlugin_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGenericPlugin_DisconnectNotify +func miqt_exec_callback_QGenericPlugin_DisconnectNotify(self *C.QGenericPlugin, 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((&QGenericPlugin{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QGenericPlugin) Delete() { diff --git a/qt/gen_qgenericplugin.h b/qt/gen_qgenericplugin.h index f8f6e776..812f4847 100644 --- a/qt/gen_qgenericplugin.h +++ b/qt/gen_qgenericplugin.h @@ -15,15 +15,25 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QGenericPlugin; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QGenericPlugin QGenericPlugin; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif +void QGenericPlugin_new(QGenericPlugin** outptr_QGenericPlugin, QObject** outptr_QObject); +void QGenericPlugin_new2(QObject* parent, QGenericPlugin** outptr_QGenericPlugin, QObject** outptr_QObject); QMetaObject* QGenericPlugin_MetaObject(const QGenericPlugin* self); void* QGenericPlugin_Metacast(QGenericPlugin* self, const char* param1); struct miqt_string QGenericPlugin_Tr(const char* s); @@ -33,6 +43,22 @@ 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_override_virtual_Create(void* self, intptr_t slot); +QObject* QGenericPlugin_virtualbase_Create(void* self, struct miqt_string name, struct miqt_string spec); +void QGenericPlugin_override_virtual_Event(void* self, intptr_t slot); +bool QGenericPlugin_virtualbase_Event(void* self, QEvent* event); +void QGenericPlugin_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGenericPlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QGenericPlugin_override_virtual_TimerEvent(void* self, intptr_t slot); +void QGenericPlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QGenericPlugin_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGenericPlugin_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QGenericPlugin_override_virtual_CustomEvent(void* self, intptr_t slot); +void QGenericPlugin_virtualbase_CustomEvent(void* self, QEvent* event); +void QGenericPlugin_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QGenericPlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QGenericPlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QGenericPlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QGenericPlugin_Delete(QGenericPlugin* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qgesturerecognizer.cpp b/qt/gen_qgesturerecognizer.cpp index 2e305523..61a64702 100644 --- a/qt/gen_qgesturerecognizer.cpp +++ b/qt/gen_qgesturerecognizer.cpp @@ -6,6 +6,85 @@ #include "gen_qgesturerecognizer.h" #include "_cgo_export.h" +class MiqtVirtualQGestureRecognizer : public virtual QGestureRecognizer { +public: + + MiqtVirtualQGestureRecognizer(): QGestureRecognizer() {}; + + virtual ~MiqtVirtualQGestureRecognizer() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Create = 0; + + // Subclass to allow providing a Go implementation + virtual QGesture* create(QObject* target) override { + if (handle__Create == 0) { + return QGestureRecognizer::create(target); + } + + QObject* sigval1 = target; + + QGesture* callback_return_value = miqt_exec_callback_QGestureRecognizer_Create(this, handle__Create, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QGesture* virtualbase_Create(QObject* target) { + + return QGestureRecognizer::create(target); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Recognize = 0; + + // Subclass to allow providing a Go implementation + virtual QGestureRecognizer::Result recognize(QGesture* state, QObject* watched, QEvent* event) override { + if (handle__Recognize == 0) { + return QGestureRecognizer::Result(); // Pure virtual, there is no base we can call + } + + QGesture* sigval1 = state; + QObject* sigval2 = watched; + QEvent* sigval3 = event; + + int callback_return_value = miqt_exec_callback_QGestureRecognizer_Recognize(this, handle__Recognize, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset(QGesture* state) override { + if (handle__Reset == 0) { + QGestureRecognizer::reset(state); + return; + } + + QGesture* sigval1 = state; + + miqt_exec_callback_QGestureRecognizer_Reset(this, handle__Reset, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset(QGesture* state) { + + QGestureRecognizer::reset(state); + + } + +}; + +void QGestureRecognizer_new(QGestureRecognizer** outptr_QGestureRecognizer) { + MiqtVirtualQGestureRecognizer* ret = new MiqtVirtualQGestureRecognizer(); + *outptr_QGestureRecognizer = ret; +} + QGesture* QGestureRecognizer_Create(QGestureRecognizer* self, QObject* target) { return self->create(target); } @@ -32,9 +111,29 @@ void QGestureRecognizer_OperatorAssign(QGestureRecognizer* self, QGestureRecogni self->operator=(*param1); } +void QGestureRecognizer_override_virtual_Create(void* self, intptr_t slot) { + dynamic_cast( (QGestureRecognizer*)(self) )->handle__Create = slot; +} + +QGesture* QGestureRecognizer_virtualbase_Create(void* self, QObject* target) { + return ( (MiqtVirtualQGestureRecognizer*)(self) )->virtualbase_Create(target); +} + +void QGestureRecognizer_override_virtual_Recognize(void* self, intptr_t slot) { + dynamic_cast( (QGestureRecognizer*)(self) )->handle__Recognize = slot; +} + +void QGestureRecognizer_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QGestureRecognizer*)(self) )->handle__Reset = slot; +} + +void QGestureRecognizer_virtualbase_Reset(void* self, QGesture* state) { + ( (MiqtVirtualQGestureRecognizer*)(self) )->virtualbase_Reset(state); +} + void QGestureRecognizer_Delete(QGestureRecognizer* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qgesturerecognizer.go b/qt/gen_qgesturerecognizer.go index ad023e0a..56d1048c 100644 --- a/qt/gen_qgesturerecognizer.go +++ b/qt/gen_qgesturerecognizer.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -62,6 +63,16 @@ func UnsafeNewQGestureRecognizer(h unsafe.Pointer) *QGestureRecognizer { return &QGestureRecognizer{h: (*C.QGestureRecognizer)(h)} } +// NewQGestureRecognizer constructs a new QGestureRecognizer object. +func NewQGestureRecognizer() *QGestureRecognizer { + var outptr_QGestureRecognizer *C.QGestureRecognizer = nil + + C.QGestureRecognizer_new(&outptr_QGestureRecognizer) + ret := newQGestureRecognizer(outptr_QGestureRecognizer) + ret.isSubclass = true + return ret +} + func (this *QGestureRecognizer) Create(target *QObject) *QGesture { return UnsafeNewQGesture(unsafe.Pointer(C.QGestureRecognizer_Create(this.h, target.cPointer())), nil) } @@ -86,6 +97,74 @@ func (this *QGestureRecognizer) OperatorAssign(param1 *QGestureRecognizer) { C.QGestureRecognizer_OperatorAssign(this.h, param1.cPointer()) } +func (this *QGestureRecognizer) callVirtualBase_Create(target *QObject) *QGesture { + + return UnsafeNewQGesture(unsafe.Pointer(C.QGestureRecognizer_virtualbase_Create(unsafe.Pointer(this.h), target.cPointer())), nil) +} +func (this *QGestureRecognizer) OnCreate(slot func(super func(target *QObject) *QGesture, target *QObject) *QGesture) { + C.QGestureRecognizer_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGestureRecognizer_Create +func miqt_exec_callback_QGestureRecognizer_Create(self *C.QGestureRecognizer, cb C.intptr_t, target *C.QObject) *C.QGesture { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(target *QObject) *QGesture, target *QObject) *QGesture) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(target)) + + virtualReturn := gofunc((&QGestureRecognizer{h: self}).callVirtualBase_Create, slotval1) + + return virtualReturn.cPointer() + +} +func (this *QGestureRecognizer) OnRecognize(slot func(state *QGesture, watched *QObject, event *QEvent) QGestureRecognizer__ResultFlag) { + C.QGestureRecognizer_override_virtual_Recognize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGestureRecognizer_Recognize +func miqt_exec_callback_QGestureRecognizer_Recognize(self *C.QGestureRecognizer, cb C.intptr_t, state *C.QGesture, watched *C.QObject, event *C.QEvent) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(state *QGesture, watched *QObject, event *QEvent) QGestureRecognizer__ResultFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGesture(unsafe.Pointer(state), nil) + slotval2 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval3 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc(slotval1, slotval2, slotval3) + + return (C.int)(virtualReturn) + +} + +func (this *QGestureRecognizer) callVirtualBase_Reset(state *QGesture) { + + C.QGestureRecognizer_virtualbase_Reset(unsafe.Pointer(this.h), state.cPointer()) + +} +func (this *QGestureRecognizer) OnReset(slot func(super func(state *QGesture), state *QGesture)) { + C.QGestureRecognizer_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGestureRecognizer_Reset +func miqt_exec_callback_QGestureRecognizer_Reset(self *C.QGestureRecognizer, cb C.intptr_t, state *C.QGesture) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(state *QGesture), state *QGesture)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGesture(unsafe.Pointer(state), nil) + + gofunc((&QGestureRecognizer{h: self}).callVirtualBase_Reset, slotval1) + +} + // Delete this object from C++ memory. func (this *QGestureRecognizer) Delete() { C.QGestureRecognizer_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qgesturerecognizer.h b/qt/gen_qgesturerecognizer.h index 063d5c1d..c551fb74 100644 --- a/qt/gen_qgesturerecognizer.h +++ b/qt/gen_qgesturerecognizer.h @@ -26,12 +26,19 @@ typedef struct QGestureRecognizer QGestureRecognizer; typedef struct QObject QObject; #endif +void QGestureRecognizer_new(QGestureRecognizer** outptr_QGestureRecognizer); QGesture* QGestureRecognizer_Create(QGestureRecognizer* self, QObject* target); int QGestureRecognizer_Recognize(QGestureRecognizer* self, QGesture* state, QObject* watched, QEvent* event); 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_override_virtual_Create(void* self, intptr_t slot); +QGesture* QGestureRecognizer_virtualbase_Create(void* self, QObject* target); +void QGestureRecognizer_override_virtual_Recognize(void* self, intptr_t slot); +int QGestureRecognizer_virtualbase_Recognize(void* self, QGesture* state, QObject* watched, QEvent* event); +void QGestureRecognizer_override_virtual_Reset(void* self, intptr_t slot); +void QGestureRecognizer_virtualbase_Reset(void* self, QGesture* state); void QGestureRecognizer_Delete(QGestureRecognizer* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qgraphicseffect.cpp b/qt/gen_qgraphicseffect.cpp index 394207cd..0f769eeb 100644 --- a/qt/gen_qgraphicseffect.cpp +++ b/qt/gen_qgraphicseffect.cpp @@ -1,10 +1,13 @@ #include +#include #include +#include #include #include #include #include #include +#include #include #include #include @@ -13,10 +16,270 @@ #include #include #include +#include #include #include "gen_qgraphicseffect.h" #include "_cgo_export.h" +class MiqtVirtualQGraphicsEffect : public virtual QGraphicsEffect { +public: + + MiqtVirtualQGraphicsEffect(): QGraphicsEffect() {}; + MiqtVirtualQGraphicsEffect(QObject* parent): QGraphicsEffect(parent) {}; + + virtual ~MiqtVirtualQGraphicsEffect() = default; + + // 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 QGraphicsEffect::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_QGraphicsEffect_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(QGraphicsEffect::boundingRectFor(*sourceRect)); + + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QGraphicsEffect_Draw(this, handle__Draw, sigval1); + + + } + + // 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) { + QGraphicsEffect::sourceChanged(flags); + return; + } + + QGraphicsEffect::ChangeFlags flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + miqt_exec_callback_QGraphicsEffect_SourceChanged(this, handle__SourceChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SourceChanged(int flags) { + + QGraphicsEffect::sourceChanged(static_cast(flags)); + + } + + // 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 QGraphicsEffect::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsEffect_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGraphicsEffect::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 QGraphicsEffect::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsEffect_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QGraphicsEffect::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) { + QGraphicsEffect::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsEffect_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QGraphicsEffect::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) { + QGraphicsEffect::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsEffect_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QGraphicsEffect::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) { + QGraphicsEffect::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsEffect_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QGraphicsEffect::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) { + QGraphicsEffect::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsEffect_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QGraphicsEffect::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) { + QGraphicsEffect::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsEffect_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QGraphicsEffect::disconnectNotify(*signal); + + } + +}; + +void QGraphicsEffect_new(QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsEffect* ret = new MiqtVirtualQGraphicsEffect(); + *outptr_QGraphicsEffect = ret; + *outptr_QObject = static_cast(ret); +} + +void QGraphicsEffect_new2(QObject* parent, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsEffect* ret = new MiqtVirtualQGraphicsEffect(parent); + *outptr_QGraphicsEffect = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QGraphicsEffect_MetaObject(const QGraphicsEffect* self) { return (QMetaObject*) self->metaObject(); } @@ -72,7 +335,7 @@ void QGraphicsEffect_EnabledChanged(QGraphicsEffect* self, bool enabled) { } void QGraphicsEffect_connect_EnabledChanged(QGraphicsEffect* self, intptr_t slot) { - QGraphicsEffect::connect(self, static_cast(&QGraphicsEffect::enabledChanged), self, [=](bool enabled) { + MiqtVirtualQGraphicsEffect::connect(self, static_cast(&QGraphicsEffect::enabledChanged), self, [=](bool enabled) { bool sigval1 = enabled; miqt_exec_callback_QGraphicsEffect_EnabledChanged(slot, sigval1); }); @@ -122,9 +385,85 @@ struct miqt_string QGraphicsEffect_TrUtf83(const char* s, const char* c, int n) return _ms; } +void QGraphicsEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__BoundingRectFor = slot; +} + +QRectF* QGraphicsEffect_virtualbase_BoundingRectFor(const void* self, QRectF* sourceRect) { + return ( (const MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_BoundingRectFor(sourceRect); +} + +void QGraphicsEffect_override_virtual_Draw(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__Draw = slot; +} + +void QGraphicsEffect_override_virtual_SourceChanged(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__SourceChanged = slot; +} + +void QGraphicsEffect_virtualbase_SourceChanged(void* self, int flags) { + ( (MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_SourceChanged(flags); +} + +void QGraphicsEffect_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__Event = slot; +} + +bool QGraphicsEffect_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_Event(event); +} + +void QGraphicsEffect_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__EventFilter = slot; +} + +bool QGraphicsEffect_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QGraphicsEffect_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__TimerEvent = slot; +} + +void QGraphicsEffect_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_TimerEvent(event); +} + +void QGraphicsEffect_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__ChildEvent = slot; +} + +void QGraphicsEffect_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_ChildEvent(event); +} + +void QGraphicsEffect_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__CustomEvent = slot; +} + +void QGraphicsEffect_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_CustomEvent(event); +} + +void QGraphicsEffect_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__ConnectNotify = slot; +} + +void QGraphicsEffect_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QGraphicsEffect_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__DisconnectNotify = slot; +} + +void QGraphicsEffect_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QGraphicsEffect_Delete(QGraphicsEffect* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qgraphicseffect.go b/qt/gen_qgraphicseffect.go index ce669334..9210cb3d 100644 --- a/qt/gen_qgraphicseffect.go +++ b/qt/gen_qgraphicseffect.go @@ -78,6 +78,28 @@ func UnsafeNewQGraphicsEffect(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGrap QObject: UnsafeNewQObject(h_QObject)} } +// NewQGraphicsEffect constructs a new QGraphicsEffect object. +func NewQGraphicsEffect() *QGraphicsEffect { + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsEffect_new(&outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsEffect(outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQGraphicsEffect2 constructs a new QGraphicsEffect object. +func NewQGraphicsEffect2(parent *QObject) *QGraphicsEffect { + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsEffect_new2(parent.cPointer(), &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsEffect(outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QGraphicsEffect) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QGraphicsEffect_MetaObject(this.h))) } @@ -196,6 +218,240 @@ func QGraphicsEffect_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QGraphicsEffect) callVirtualBase_BoundingRectFor(sourceRect *QRectF) *QRectF { + + _ret := C.QGraphicsEffect_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 *QGraphicsEffect) OnBoundingRectFor(slot func(super func(sourceRect *QRectF) *QRectF, sourceRect *QRectF) *QRectF) { + C.QGraphicsEffect_override_virtual_BoundingRectFor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_BoundingRectFor +func miqt_exec_callback_QGraphicsEffect_BoundingRectFor(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_BoundingRectFor, slotval1) + + return virtualReturn.cPointer() + +} +func (this *QGraphicsEffect) OnDraw(slot func(painter *QPainter)) { + C.QGraphicsEffect_override_virtual_Draw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_Draw +func miqt_exec_callback_QGraphicsEffect_Draw(self *C.QGraphicsEffect, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + +} + +func (this *QGraphicsEffect) callVirtualBase_SourceChanged(flags QGraphicsEffect__ChangeFlag) { + + C.QGraphicsEffect_virtualbase_SourceChanged(unsafe.Pointer(this.h), (C.int)(flags)) + +} +func (this *QGraphicsEffect) OnSourceChanged(slot func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) { + C.QGraphicsEffect_override_virtual_SourceChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_SourceChanged +func miqt_exec_callback_QGraphicsEffect_SourceChanged(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_SourceChanged, slotval1) + +} + +func (this *QGraphicsEffect) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGraphicsEffect_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsEffect) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsEffect_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_Event +func miqt_exec_callback_QGraphicsEffect_Event(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsEffect) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QGraphicsEffect_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsEffect) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QGraphicsEffect_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_EventFilter +func miqt_exec_callback_QGraphicsEffect_EventFilter(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsEffect) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QGraphicsEffect_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsEffect) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QGraphicsEffect_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_TimerEvent +func miqt_exec_callback_QGraphicsEffect_TimerEvent(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QGraphicsEffect) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QGraphicsEffect_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsEffect) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QGraphicsEffect_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_ChildEvent +func miqt_exec_callback_QGraphicsEffect_ChildEvent(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QGraphicsEffect) callVirtualBase_CustomEvent(event *QEvent) { + + C.QGraphicsEffect_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsEffect) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsEffect_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_CustomEvent +func miqt_exec_callback_QGraphicsEffect_CustomEvent(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QGraphicsEffect) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QGraphicsEffect_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsEffect) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsEffect_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_ConnectNotify +func miqt_exec_callback_QGraphicsEffect_ConnectNotify(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QGraphicsEffect) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QGraphicsEffect_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsEffect) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsEffect_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_DisconnectNotify +func miqt_exec_callback_QGraphicsEffect_DisconnectNotify(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsEffect) Delete() { C.QGraphicsEffect_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qgraphicseffect.h b/qt/gen_qgraphicseffect.h index 29d91a56..c1a373ab 100644 --- a/qt/gen_qgraphicseffect.h +++ b/qt/gen_qgraphicseffect.h @@ -16,32 +16,42 @@ extern "C" { #ifdef __cplusplus class QBrush; +class QChildEvent; class QColor; +class QEvent; class QGraphicsBlurEffect; class QGraphicsColorizeEffect; class QGraphicsDropShadowEffect; class QGraphicsEffect; class QGraphicsOpacityEffect; +class QMetaMethod; class QMetaObject; class QObject; class QPainter; class QPointF; class QRectF; +class QTimerEvent; #else typedef struct QBrush QBrush; +typedef struct QChildEvent QChildEvent; typedef struct QColor QColor; +typedef struct QEvent QEvent; typedef struct QGraphicsBlurEffect QGraphicsBlurEffect; typedef struct QGraphicsColorizeEffect QGraphicsColorizeEffect; typedef struct QGraphicsDropShadowEffect QGraphicsDropShadowEffect; typedef struct QGraphicsEffect QGraphicsEffect; typedef struct QGraphicsOpacityEffect QGraphicsOpacityEffect; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QPointF QPointF; typedef struct QRectF QRectF; +typedef struct QTimerEvent QTimerEvent; #endif +void QGraphicsEffect_new(QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +void QGraphicsEffect_new2(QObject* parent, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); QMetaObject* QGraphicsEffect_MetaObject(const QGraphicsEffect* self); void* QGraphicsEffect_Metacast(QGraphicsEffect* self, const char* param1); struct miqt_string QGraphicsEffect_Tr(const char* s); @@ -59,6 +69,26 @@ 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_override_virtual_BoundingRectFor(void* self, intptr_t slot); +QRectF* QGraphicsEffect_virtualbase_BoundingRectFor(const void* self, QRectF* sourceRect); +void QGraphicsEffect_override_virtual_Draw(void* self, intptr_t slot); +void QGraphicsEffect_virtualbase_Draw(void* self, QPainter* painter); +void QGraphicsEffect_override_virtual_SourceChanged(void* self, intptr_t slot); +void QGraphicsEffect_virtualbase_SourceChanged(void* self, int flags); +void QGraphicsEffect_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsEffect_virtualbase_Event(void* self, QEvent* event); +void QGraphicsEffect_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGraphicsEffect_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QGraphicsEffect_override_virtual_TimerEvent(void* self, intptr_t slot); +void QGraphicsEffect_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QGraphicsEffect_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGraphicsEffect_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QGraphicsEffect_override_virtual_CustomEvent(void* self, intptr_t slot); +void QGraphicsEffect_virtualbase_CustomEvent(void* self, QEvent* event); +void QGraphicsEffect_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QGraphicsEffect_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QGraphicsEffect_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QGraphicsEffect_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QGraphicsEffect_Delete(QGraphicsEffect* self, bool isSubclass); void QGraphicsColorizeEffect_new(QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); diff --git a/qt/gen_qgraphicsitem.cpp b/qt/gen_qgraphicsitem.cpp index 6d0b8f27..36cf6002 100644 --- a/qt/gen_qgraphicsitem.cpp +++ b/qt/gen_qgraphicsitem.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -30,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -46,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -53,6 +56,856 @@ #include "gen_qgraphicsitem.h" #include "_cgo_export.h" +class MiqtVirtualQGraphicsItem : public virtual QGraphicsItem { +public: + + MiqtVirtualQGraphicsItem(): QGraphicsItem() {}; + MiqtVirtualQGraphicsItem(QGraphicsItem* parent): QGraphicsItem(parent) {}; + + virtual ~MiqtVirtualQGraphicsItem() = default; + + // 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) { + QGraphicsItem::advance(phase); + return; + } + + int sigval1 = phase; + + miqt_exec_callback_QGraphicsItem_Advance(this, handle__Advance, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Advance(int phase) { + + QGraphicsItem::advance(static_cast(phase)); + + } + + // 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 QRectF(); // Pure virtual, there is no base we can call + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // 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 QGraphicsItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsItem::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 QGraphicsItem::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_QGraphicsItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsItem::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 QGraphicsItem::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_QGraphicsItem_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 QGraphicsItem::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 QGraphicsItem::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_QGraphicsItem_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 QGraphicsItem::collidesWithPath(*path, static_cast(mode)); + + } + + // 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 QGraphicsItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsItem::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 QGraphicsItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsItem::opaqueArea()); + + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // 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 QGraphicsItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsItem::type(); + + } + + // 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 QGraphicsItem::sceneEventFilter(watched, event); + } + + QGraphicsItem* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsItem_SceneEventFilter(this, handle__SceneEventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEventFilter(QGraphicsItem* watched, QEvent* event) { + + return QGraphicsItem::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 QGraphicsItem::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsItem_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QGraphicsItem::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) { + QGraphicsItem::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::hoverEnterEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_HoverEnterEvent(this, handle__HoverEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverEnterEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::wheelEvent(event); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsItem::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 QGraphicsItem::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsItem_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(QGraphicsItem::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 QGraphicsItem::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_QGraphicsItem_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(QGraphicsItem::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 QGraphicsItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsItem::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) { + QGraphicsItem::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_QGraphicsItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsItem::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 QGraphicsItem::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_QGraphicsItem_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(QGraphicsItem::extension(*variant)); + + } + +}; + +void QGraphicsItem_new(QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsItem* ret = new MiqtVirtualQGraphicsItem(); + *outptr_QGraphicsItem = ret; +} + +void QGraphicsItem_new2(QGraphicsItem* parent, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsItem* ret = new MiqtVirtualQGraphicsItem(parent); + *outptr_QGraphicsItem = ret; +} + QGraphicsScene* QGraphicsItem_Scene(const QGraphicsItem* self) { return self->scene(); } @@ -836,14 +1689,1311 @@ void QGraphicsItem_Scroll3(QGraphicsItem* self, double dx, double dy, QRectF* re self->scroll(static_cast(dx), static_cast(dy), *rect); } +void QGraphicsItem_override_virtual_Advance(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__Advance = slot; +} + +void QGraphicsItem_virtualbase_Advance(void* self, int phase) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_Advance(phase); +} + +void QGraphicsItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__BoundingRect = slot; +} + +void QGraphicsItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_Shape(); +} + +void QGraphicsItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__Contains = slot; +} + +bool QGraphicsItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsItem_override_virtual_CollidesWithItem(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__CollidesWithItem = slot; +} + +bool QGraphicsItem_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_CollidesWithItem(other, mode); +} + +void QGraphicsItem_override_virtual_CollidesWithPath(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__CollidesWithPath = slot; +} + +bool QGraphicsItem_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_CollidesWithPath(path, mode); +} + +void QGraphicsItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__Type = slot; +} + +int QGraphicsItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsItem_override_virtual_SceneEventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__SceneEventFilter = slot; +} + +bool QGraphicsItem_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_SceneEventFilter(watched, event); +} + +void QGraphicsItem_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__SceneEvent = slot; +} + +bool QGraphicsItem_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_SceneEvent(event); +} + +void QGraphicsItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGraphicsItem_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGraphicsItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGraphicsItem_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGraphicsItem_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_DropEvent(event); +} + +void QGraphicsItem_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsItem_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__HoverEnterEvent = slot; +} + +void QGraphicsItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_HoverEnterEvent(event); +} + +void QGraphicsItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__HoverMoveEvent = slot; +} + +void QGraphicsItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_HoverMoveEvent(event); +} + +void QGraphicsItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QGraphicsItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_HoverLeaveEvent(event); +} + +void QGraphicsItem_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGraphicsItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGraphicsItem_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGraphicsItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGraphicsItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGraphicsItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGraphicsItem_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__WheelEvent = slot; +} + +void QGraphicsItem_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_WheelEvent(event); +} + +void QGraphicsItem_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsItem_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsItem_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsItem_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsItem_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_Extension(variant); +} + void QGraphicsItem_Delete(QGraphicsItem* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } } +class MiqtVirtualQGraphicsObject : public virtual QGraphicsObject { +public: + + MiqtVirtualQGraphicsObject(): QGraphicsObject() {}; + MiqtVirtualQGraphicsObject(QGraphicsItem* parent): QGraphicsObject(parent) {}; + + virtual ~MiqtVirtualQGraphicsObject() = default; + + // 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 QGraphicsObject::event(ev); + } + + QEvent* sigval1 = ev; + + bool callback_return_value = miqt_exec_callback_QGraphicsObject_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* ev) { + + return QGraphicsObject::event(ev); + + } + + // 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 QGraphicsObject::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsObject_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QGraphicsObject::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) { + QGraphicsObject::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsObject_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QGraphicsObject::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) { + QGraphicsObject::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsObject_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QGraphicsObject::disconnectNotify(*signal); + + } + + // 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) { + QGraphicsObject::advance(phase); + return; + } + + int sigval1 = phase; + + miqt_exec_callback_QGraphicsObject_Advance(this, handle__Advance, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Advance(int phase) { + + QGraphicsObject::advance(static_cast(phase)); + + } + + // 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 QRectF(); // Pure virtual, there is no base we can call + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsObject_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // 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 QGraphicsObject::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsObject_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsObject::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 QGraphicsObject::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_QGraphicsObject_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsObject::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 QGraphicsObject::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_QGraphicsObject_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 QGraphicsObject::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 QGraphicsObject::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_QGraphicsObject_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 QGraphicsObject::collidesWithPath(*path, static_cast(mode)); + + } + + // 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 QGraphicsObject::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsObject_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsObject::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 QGraphicsObject::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsObject_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsObject::opaqueArea()); + + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsObject_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // 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 QGraphicsObject::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsObject_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsObject::type(); + + } + + // 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 QGraphicsObject::sceneEventFilter(watched, event); + } + + QGraphicsItem* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsObject_SceneEventFilter(this, handle__SceneEventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEventFilter(QGraphicsItem* watched, QEvent* event) { + + return QGraphicsObject::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 QGraphicsObject::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsObject_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QGraphicsObject::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) { + QGraphicsObject::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::hoverEnterEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_HoverEnterEvent(this, handle__HoverEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverEnterEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::wheelEvent(event); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsObject::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 QGraphicsObject::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsObject_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(QGraphicsObject::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 QGraphicsObject::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_QGraphicsObject_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(QGraphicsObject::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 QGraphicsObject::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsObject_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsObject::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) { + QGraphicsObject::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_QGraphicsObject_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsObject::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 QGraphicsObject::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_QGraphicsObject_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(QGraphicsObject::extension(*variant)); + + } + +}; + +void QGraphicsObject_new(QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsObject* ret = new MiqtVirtualQGraphicsObject(); + *outptr_QGraphicsObject = ret; + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsObject_new2(QGraphicsItem* parent, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsObject* ret = new MiqtVirtualQGraphicsObject(parent); + *outptr_QGraphicsObject = ret; + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + QMetaObject* QGraphicsObject_MetaObject(const QGraphicsObject* self) { return (QMetaObject*) self->metaObject(); } @@ -887,7 +3037,7 @@ void QGraphicsObject_ParentChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_ParentChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::parentChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::parentChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_ParentChanged(slot); }); } @@ -897,7 +3047,7 @@ void QGraphicsObject_OpacityChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_OpacityChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::opacityChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::opacityChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_OpacityChanged(slot); }); } @@ -907,7 +3057,7 @@ void QGraphicsObject_VisibleChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_VisibleChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::visibleChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::visibleChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_VisibleChanged(slot); }); } @@ -917,7 +3067,7 @@ void QGraphicsObject_EnabledChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_EnabledChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::enabledChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::enabledChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_EnabledChanged(slot); }); } @@ -927,7 +3077,7 @@ void QGraphicsObject_XChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_XChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::xChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::xChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_XChanged(slot); }); } @@ -937,7 +3087,7 @@ void QGraphicsObject_YChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_YChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::yChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::yChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_YChanged(slot); }); } @@ -947,7 +3097,7 @@ void QGraphicsObject_ZChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_ZChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::zChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::zChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_ZChanged(slot); }); } @@ -957,7 +3107,7 @@ void QGraphicsObject_RotationChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_RotationChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::rotationChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::rotationChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_RotationChanged(slot); }); } @@ -967,7 +3117,7 @@ void QGraphicsObject_ScaleChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_ScaleChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::scaleChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::scaleChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_ScaleChanged(slot); }); } @@ -977,7 +3127,7 @@ void QGraphicsObject_ChildrenChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_ChildrenChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::childrenChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::childrenChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_ChildrenChanged(slot); }); } @@ -987,7 +3137,7 @@ void QGraphicsObject_WidthChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_WidthChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::widthChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::widthChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_WidthChanged(slot); }); } @@ -997,7 +3147,7 @@ void QGraphicsObject_HeightChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_HeightChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::heightChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::heightChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_HeightChanged(slot); }); } @@ -1050,14 +3200,1194 @@ void QGraphicsObject_GrabGesture2(QGraphicsObject* self, int typeVal, int flags) self->grabGesture(static_cast(typeVal), static_cast(flags)); } +void QGraphicsObject_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__Event = slot; +} + +bool QGraphicsObject_virtualbase_Event(void* self, QEvent* ev) { + return ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_Event(ev); +} + +void QGraphicsObject_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__EventFilter = slot; +} + +bool QGraphicsObject_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QGraphicsObject_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__TimerEvent = slot; +} + +void QGraphicsObject_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_TimerEvent(event); +} + +void QGraphicsObject_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__ChildEvent = slot; +} + +void QGraphicsObject_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_ChildEvent(event); +} + +void QGraphicsObject_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__CustomEvent = slot; +} + +void QGraphicsObject_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_CustomEvent(event); +} + +void QGraphicsObject_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__ConnectNotify = slot; +} + +void QGraphicsObject_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QGraphicsObject_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__DisconnectNotify = slot; +} + +void QGraphicsObject_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QGraphicsObject_override_virtual_Advance(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__Advance = slot; +} + +void QGraphicsObject_virtualbase_Advance(void* self, int phase) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_Advance(phase); +} + +void QGraphicsObject_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__BoundingRect = slot; +} + +void QGraphicsObject_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsObject_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_Shape(); +} + +void QGraphicsObject_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__Contains = slot; +} + +bool QGraphicsObject_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsObject_override_virtual_CollidesWithItem(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__CollidesWithItem = slot; +} + +bool QGraphicsObject_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_CollidesWithItem(other, mode); +} + +void QGraphicsObject_override_virtual_CollidesWithPath(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__CollidesWithPath = slot; +} + +bool QGraphicsObject_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_CollidesWithPath(path, mode); +} + +void QGraphicsObject_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsObject_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsObject_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsObject_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsObject_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__Paint = slot; +} + +void QGraphicsObject_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__Type = slot; +} + +int QGraphicsObject_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_Type(); +} + +void QGraphicsObject_override_virtual_SceneEventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__SceneEventFilter = slot; +} + +bool QGraphicsObject_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_SceneEventFilter(watched, event); +} + +void QGraphicsObject_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__SceneEvent = slot; +} + +bool QGraphicsObject_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_SceneEvent(event); +} + +void QGraphicsObject_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsObject_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGraphicsObject_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsObject_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGraphicsObject_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsObject_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGraphicsObject_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsObject_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGraphicsObject_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsObject_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_DropEvent(event); +} + +void QGraphicsObject_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsObject_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsObject_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsObject_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsObject_override_virtual_HoverEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__HoverEnterEvent = slot; +} + +void QGraphicsObject_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_HoverEnterEvent(event); +} + +void QGraphicsObject_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__HoverMoveEvent = slot; +} + +void QGraphicsObject_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_HoverMoveEvent(event); +} + +void QGraphicsObject_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QGraphicsObject_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_HoverLeaveEvent(event); +} + +void QGraphicsObject_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsObject_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGraphicsObject_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsObject_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGraphicsObject_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsObject_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGraphicsObject_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsObject_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGraphicsObject_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsObject_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGraphicsObject_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsObject_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGraphicsObject_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__WheelEvent = slot; +} + +void QGraphicsObject_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_WheelEvent(event); +} + +void QGraphicsObject_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsObject_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsObject_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsObject_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsObject_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsObject_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsObject_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsObject_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsObject_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsObject_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsObject_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsObject_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_Extension(variant); +} + void QGraphicsObject_Delete(QGraphicsObject* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } } +class MiqtVirtualQAbstractGraphicsShapeItem : public virtual QAbstractGraphicsShapeItem { +public: + + MiqtVirtualQAbstractGraphicsShapeItem(): QAbstractGraphicsShapeItem() {}; + MiqtVirtualQAbstractGraphicsShapeItem(QGraphicsItem* parent): QAbstractGraphicsShapeItem(parent) {}; + + virtual ~MiqtVirtualQAbstractGraphicsShapeItem() = default; + + // 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 QAbstractGraphicsShapeItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QAbstractGraphicsShapeItem::opaqueArea()); + + } + + // 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) { + QAbstractGraphicsShapeItem::advance(phase); + return; + } + + int sigval1 = phase; + + miqt_exec_callback_QAbstractGraphicsShapeItem_Advance(this, handle__Advance, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Advance(int phase) { + + QAbstractGraphicsShapeItem::advance(static_cast(phase)); + + } + + // 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 QRectF(); // Pure virtual, there is no base we can call + } + + + QRectF* callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // 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 QAbstractGraphicsShapeItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::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_QAbstractGraphicsShapeItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::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_QAbstractGraphicsShapeItem_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 QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::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_QAbstractGraphicsShapeItem_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 QAbstractGraphicsShapeItem::collidesWithPath(*path, static_cast(mode)); + + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QAbstractGraphicsShapeItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // 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 QAbstractGraphicsShapeItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QAbstractGraphicsShapeItem::type(); + + } + + // 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 QAbstractGraphicsShapeItem::sceneEventFilter(watched, event); + } + + QGraphicsItem* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_SceneEventFilter(this, handle__SceneEventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEventFilter(QGraphicsItem* watched, QEvent* event) { + + return QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::hoverEnterEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_HoverEnterEvent(this, handle__HoverEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverEnterEvent(QGraphicsSceneHoverEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::wheelEvent(event); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_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(QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::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_QAbstractGraphicsShapeItem_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(QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::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_QAbstractGraphicsShapeItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::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_QAbstractGraphicsShapeItem_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(QAbstractGraphicsShapeItem::extension(*variant)); + + } + +}; + +void QAbstractGraphicsShapeItem_new(QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQAbstractGraphicsShapeItem* ret = new MiqtVirtualQAbstractGraphicsShapeItem(); + *outptr_QAbstractGraphicsShapeItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QAbstractGraphicsShapeItem_new2(QGraphicsItem* parent, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQAbstractGraphicsShapeItem* ret = new MiqtVirtualQAbstractGraphicsShapeItem(parent); + *outptr_QAbstractGraphicsShapeItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + QPen* QAbstractGraphicsShapeItem_Pen(const QAbstractGraphicsShapeItem* self) { return new QPen(self->pen()); } @@ -1082,9 +4412,281 @@ QPainterPath* QAbstractGraphicsShapeItem_OpaqueArea(const QAbstractGraphicsShape return new QPainterPath(self->opaqueArea()); } +void QAbstractGraphicsShapeItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QAbstractGraphicsShapeItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QAbstractGraphicsShapeItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QAbstractGraphicsShapeItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QAbstractGraphicsShapeItem_override_virtual_Advance(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__Advance = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_Advance(void* self, int phase) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_Advance(phase); +} + +void QAbstractGraphicsShapeItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__BoundingRect = slot; +} + +void QAbstractGraphicsShapeItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QAbstractGraphicsShapeItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_Shape(); +} + +void QAbstractGraphicsShapeItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__Contains = slot; +} + +bool QAbstractGraphicsShapeItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_Contains(point); +} + +void QAbstractGraphicsShapeItem_override_virtual_CollidesWithItem(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__CollidesWithItem = slot; +} + +bool QAbstractGraphicsShapeItem_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_CollidesWithItem(other, mode); +} + +void QAbstractGraphicsShapeItem_override_virtual_CollidesWithPath(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__CollidesWithPath = slot; +} + +bool QAbstractGraphicsShapeItem_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_CollidesWithPath(path, mode); +} + +void QAbstractGraphicsShapeItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__Paint = slot; +} + +void QAbstractGraphicsShapeItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__Type = slot; +} + +int QAbstractGraphicsShapeItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_Type(); +} + +void QAbstractGraphicsShapeItem_override_virtual_SceneEventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__SceneEventFilter = slot; +} + +bool QAbstractGraphicsShapeItem_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event) { + return ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_SceneEventFilter(watched, event); +} + +void QAbstractGraphicsShapeItem_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__SceneEvent = slot; +} + +bool QAbstractGraphicsShapeItem_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_SceneEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__ContextMenuEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__DragEnterEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__DragLeaveEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__DragMoveEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__DropEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_DropEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__FocusInEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_FocusInEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__FocusOutEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__HoverEnterEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_HoverEnterEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__HoverMoveEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_HoverMoveEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_HoverLeaveEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__KeyPressEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__MousePressEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_MousePressEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__MouseMoveEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__WheelEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_WheelEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__InputMethodEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QAbstractGraphicsShapeItem_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QAbstractGraphicsShapeItem_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__ItemChange = slot; +} + +QVariant* QAbstractGraphicsShapeItem_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_ItemChange(change, value); +} + +void QAbstractGraphicsShapeItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QAbstractGraphicsShapeItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QAbstractGraphicsShapeItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__SetExtension = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QAbstractGraphicsShapeItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__Extension = slot; +} + +QVariant* QAbstractGraphicsShapeItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_Extension(variant); +} + void QAbstractGraphicsShapeItem_Delete(QAbstractGraphicsShapeItem* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qgraphicsitem.go b/qt/gen_qgraphicsitem.go index c942370f..734f8318 100644 --- a/qt/gen_qgraphicsitem.go +++ b/qt/gen_qgraphicsitem.go @@ -205,6 +205,26 @@ func UnsafeNewQGraphicsItem(h unsafe.Pointer) *QGraphicsItem { return &QGraphicsItem{h: (*C.QGraphicsItem)(h)} } +// NewQGraphicsItem constructs a new QGraphicsItem object. +func NewQGraphicsItem() *QGraphicsItem { + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsItem_new(&outptr_QGraphicsItem) + ret := newQGraphicsItem(outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsItem2 constructs a new QGraphicsItem object. +func NewQGraphicsItem2(parent *QGraphicsItem) *QGraphicsItem { + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsItem_new2(parent.cPointer(), &outptr_QGraphicsItem) + ret := newQGraphicsItem(outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + func (this *QGraphicsItem) Scene() *QGraphicsScene { return UnsafeNewQGraphicsScene(unsafe.Pointer(C.QGraphicsItem_Scene(this.h)), nil) } @@ -1109,6 +1129,839 @@ func (this *QGraphicsItem) Scroll3(dx float64, dy float64, rect *QRectF) { C.QGraphicsItem_Scroll3(this.h, (C.double)(dx), (C.double)(dy), rect.cPointer()) } +func (this *QGraphicsItem) callVirtualBase_Advance(phase int) { + + C.QGraphicsItem_virtualbase_Advance(unsafe.Pointer(this.h), (C.int)(phase)) + +} +func (this *QGraphicsItem) OnAdvance(slot func(super func(phase int), phase int)) { + C.QGraphicsItem_override_virtual_Advance(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_Advance +func miqt_exec_callback_QGraphicsItem_Advance(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_Advance, slotval1) + +} +func (this *QGraphicsItem) OnBoundingRect(slot func() *QRectF) { + C.QGraphicsItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_BoundingRect +func miqt_exec_callback_QGraphicsItem_BoundingRect(self *C.QGraphicsItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func() *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsItem_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 *QGraphicsItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_Shape +func miqt_exec_callback_QGraphicsItem_Shape(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_Contains +func miqt_exec_callback_QGraphicsItem_Contains(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItem) callVirtualBase_CollidesWithItem(other *QGraphicsItem, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsItem_virtualbase_CollidesWithItem(unsafe.Pointer(this.h), other.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsItem) OnCollidesWithItem(slot func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) { + C.QGraphicsItem_override_virtual_CollidesWithItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_CollidesWithItem +func miqt_exec_callback_QGraphicsItem_CollidesWithItem(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_CollidesWithItem, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItem) callVirtualBase_CollidesWithPath(path *QPainterPath, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsItem_virtualbase_CollidesWithPath(unsafe.Pointer(this.h), path.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsItem) OnCollidesWithPath(slot func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) { + C.QGraphicsItem_override_virtual_CollidesWithPath(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_CollidesWithPath +func miqt_exec_callback_QGraphicsItem_CollidesWithPath(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_CollidesWithPath, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_IsObscuredBy +func miqt_exec_callback_QGraphicsItem_IsObscuredBy(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsItem_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 *QGraphicsItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_OpaqueArea +func miqt_exec_callback_QGraphicsItem_OpaqueArea(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} +func (this *QGraphicsItem) OnPaint(slot func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_Paint +func miqt_exec_callback_QGraphicsItem_Paint(self *C.QGraphicsItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsItem) OnType(slot func(super func() int) int) { + C.QGraphicsItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_Type +func miqt_exec_callback_QGraphicsItem_Type(self *C.QGraphicsItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsItem) callVirtualBase_SceneEventFilter(watched *QGraphicsItem, event *QEvent) bool { + + return (bool)(C.QGraphicsItem_virtualbase_SceneEventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsItem) OnSceneEventFilter(slot func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) { + C.QGraphicsItem_override_virtual_SceneEventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_SceneEventFilter +func miqt_exec_callback_QGraphicsItem_SceneEventFilter(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_SceneEventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItem) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsItem_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsItem) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsItem_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_SceneEvent +func miqt_exec_callback_QGraphicsItem_SceneEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItem) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QGraphicsItem_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QGraphicsItem_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_ContextMenuEvent +func miqt_exec_callback_QGraphicsItem_ContextMenuEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsItem_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsItem_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_DragEnterEvent +func miqt_exec_callback_QGraphicsItem_DragEnterEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsItem_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsItem_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_DragLeaveEvent +func miqt_exec_callback_QGraphicsItem_DragLeaveEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsItem_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsItem_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_DragMoveEvent +func miqt_exec_callback_QGraphicsItem_DragMoveEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsItem_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsItem_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_DropEvent +func miqt_exec_callback_QGraphicsItem_DropEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsItem_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsItem_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_FocusInEvent +func miqt_exec_callback_QGraphicsItem_FocusInEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsItem_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsItem_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_FocusOutEvent +func miqt_exec_callback_QGraphicsItem_FocusOutEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_HoverEnterEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsItem_virtualbase_HoverEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnHoverEnterEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsItem_override_virtual_HoverEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_HoverEnterEvent +func miqt_exec_callback_QGraphicsItem_HoverEnterEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsItem_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsItem_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_HoverMoveEvent +func miqt_exec_callback_QGraphicsItem_HoverMoveEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsItem_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsItem_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_HoverLeaveEvent +func miqt_exec_callback_QGraphicsItem_HoverLeaveEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsItem_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsItem_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_KeyPressEvent +func miqt_exec_callback_QGraphicsItem_KeyPressEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsItem_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsItem_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_KeyReleaseEvent +func miqt_exec_callback_QGraphicsItem_KeyReleaseEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsItem_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsItem_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_MousePressEvent +func miqt_exec_callback_QGraphicsItem_MousePressEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsItem_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsItem_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_MouseMoveEvent +func miqt_exec_callback_QGraphicsItem_MouseMoveEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsItem_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsItem_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_MouseReleaseEvent +func miqt_exec_callback_QGraphicsItem_MouseReleaseEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsItem_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsItem_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsItem_MouseDoubleClickEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_WheelEvent(event *QGraphicsSceneWheelEvent) { + + C.QGraphicsItem_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnWheelEvent(slot func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) { + C.QGraphicsItem_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_WheelEvent +func miqt_exec_callback_QGraphicsItem_WheelEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsItem_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsItem_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_InputMethodEvent +func miqt_exec_callback_QGraphicsItem_InputMethodEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsItem_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 *QGraphicsItem) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsItem_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_InputMethodQuery +func miqt_exec_callback_QGraphicsItem_InputMethodQuery(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItem) callVirtualBase_ItemChange(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant { + + _ret := C.QGraphicsItem_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 *QGraphicsItem) OnItemChange(slot func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) { + C.QGraphicsItem_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_ItemChange +func miqt_exec_callback_QGraphicsItem_ItemChange(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_SupportsExtension +func miqt_exec_callback_QGraphicsItem_SupportsExtension(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_SetExtension +func miqt_exec_callback_QGraphicsItem_SetExtension(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QGraphicsItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsItem_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 *QGraphicsItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_Extension +func miqt_exec_callback_QGraphicsItem_Extension(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QGraphicsItem) Delete() { C.QGraphicsItem_Delete(this.h, C.bool(this.isSubclass)) @@ -1165,6 +2018,30 @@ func UnsafeNewQGraphicsObject(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QGra QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} } +// NewQGraphicsObject constructs a new QGraphicsObject object. +func NewQGraphicsObject() *QGraphicsObject { + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsObject_new(&outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsObject(outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsObject2 constructs a new QGraphicsObject object. +func NewQGraphicsObject2(parent *QGraphicsItem) *QGraphicsObject { + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsObject_new2(parent.cPointer(), &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsObject(outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + func (this *QGraphicsObject) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QGraphicsObject_MetaObject(this.h))) } @@ -1453,6 +2330,1005 @@ func (this *QGraphicsObject) GrabGesture2(typeVal GestureType, flags GestureFlag C.QGraphicsObject_GrabGesture2(this.h, (C.int)(typeVal), (C.int)(flags)) } +func (this *QGraphicsObject) callVirtualBase_Event(ev *QEvent) bool { + + return (bool)(C.QGraphicsObject_virtualbase_Event(unsafe.Pointer(this.h), ev.cPointer())) + +} +func (this *QGraphicsObject) OnEvent(slot func(super func(ev *QEvent) bool, ev *QEvent) bool) { + C.QGraphicsObject_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_Event +func miqt_exec_callback_QGraphicsObject_Event(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QGraphicsObject_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsObject) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QGraphicsObject_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_EventFilter +func miqt_exec_callback_QGraphicsObject_EventFilter(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QGraphicsObject_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QGraphicsObject_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_TimerEvent +func miqt_exec_callback_QGraphicsObject_TimerEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QGraphicsObject_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QGraphicsObject_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_ChildEvent +func miqt_exec_callback_QGraphicsObject_ChildEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_CustomEvent(event *QEvent) { + + C.QGraphicsObject_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsObject_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_CustomEvent +func miqt_exec_callback_QGraphicsObject_CustomEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QGraphicsObject_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsObject) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsObject_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_ConnectNotify +func miqt_exec_callback_QGraphicsObject_ConnectNotify(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QGraphicsObject_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsObject) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsObject_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_DisconnectNotify +func miqt_exec_callback_QGraphicsObject_DisconnectNotify(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_Advance(phase int) { + + C.QGraphicsObject_virtualbase_Advance(unsafe.Pointer(this.h), (C.int)(phase)) + +} +func (this *QGraphicsObject) OnAdvance(slot func(super func(phase int), phase int)) { + C.QGraphicsObject_override_virtual_Advance(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_Advance +func miqt_exec_callback_QGraphicsObject_Advance(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_Advance, slotval1) + +} +func (this *QGraphicsObject) OnBoundingRect(slot func() *QRectF) { + C.QGraphicsObject_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_BoundingRect +func miqt_exec_callback_QGraphicsObject_BoundingRect(self *C.QGraphicsObject, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func() *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsObject) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsObject_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 *QGraphicsObject) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsObject_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_Shape +func miqt_exec_callback_QGraphicsObject_Shape(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsObject) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsObject_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsObject) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsObject_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_Contains +func miqt_exec_callback_QGraphicsObject_Contains(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_CollidesWithItem(other *QGraphicsItem, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsObject_virtualbase_CollidesWithItem(unsafe.Pointer(this.h), other.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsObject) OnCollidesWithItem(slot func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) { + C.QGraphicsObject_override_virtual_CollidesWithItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_CollidesWithItem +func miqt_exec_callback_QGraphicsObject_CollidesWithItem(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_CollidesWithItem, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_CollidesWithPath(path *QPainterPath, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsObject_virtualbase_CollidesWithPath(unsafe.Pointer(this.h), path.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsObject) OnCollidesWithPath(slot func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) { + C.QGraphicsObject_override_virtual_CollidesWithPath(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_CollidesWithPath +func miqt_exec_callback_QGraphicsObject_CollidesWithPath(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_CollidesWithPath, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsObject_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsObject) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsObject_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_IsObscuredBy +func miqt_exec_callback_QGraphicsObject_IsObscuredBy(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsObject_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 *QGraphicsObject) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsObject_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_OpaqueArea +func miqt_exec_callback_QGraphicsObject_OpaqueArea(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} +func (this *QGraphicsObject) OnPaint(slot func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsObject_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_Paint +func miqt_exec_callback_QGraphicsObject_Paint(self *C.QGraphicsObject, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsObject) callVirtualBase_Type() int { + + return (int)(C.QGraphicsObject_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsObject) OnType(slot func(super func() int) int) { + C.QGraphicsObject_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_Type +func miqt_exec_callback_QGraphicsObject_Type(self *C.QGraphicsObject, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsObject{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_SceneEventFilter(watched *QGraphicsItem, event *QEvent) bool { + + return (bool)(C.QGraphicsObject_virtualbase_SceneEventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsObject) OnSceneEventFilter(slot func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) { + C.QGraphicsObject_override_virtual_SceneEventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_SceneEventFilter +func miqt_exec_callback_QGraphicsObject_SceneEventFilter(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_SceneEventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsObject_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsObject) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsObject_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_SceneEvent +func miqt_exec_callback_QGraphicsObject_SceneEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QGraphicsObject_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QGraphicsObject_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_ContextMenuEvent +func miqt_exec_callback_QGraphicsObject_ContextMenuEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsObject_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsObject_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_DragEnterEvent +func miqt_exec_callback_QGraphicsObject_DragEnterEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsObject_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsObject_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_DragLeaveEvent +func miqt_exec_callback_QGraphicsObject_DragLeaveEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsObject_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsObject_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_DragMoveEvent +func miqt_exec_callback_QGraphicsObject_DragMoveEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsObject_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsObject_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_DropEvent +func miqt_exec_callback_QGraphicsObject_DropEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsObject_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsObject_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_FocusInEvent +func miqt_exec_callback_QGraphicsObject_FocusInEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsObject_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsObject_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_FocusOutEvent +func miqt_exec_callback_QGraphicsObject_FocusOutEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_HoverEnterEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsObject_virtualbase_HoverEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnHoverEnterEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsObject_override_virtual_HoverEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_HoverEnterEvent +func miqt_exec_callback_QGraphicsObject_HoverEnterEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_HoverEnterEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsObject_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsObject_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_HoverMoveEvent +func miqt_exec_callback_QGraphicsObject_HoverMoveEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsObject_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsObject_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_HoverLeaveEvent +func miqt_exec_callback_QGraphicsObject_HoverLeaveEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsObject_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsObject_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_KeyPressEvent +func miqt_exec_callback_QGraphicsObject_KeyPressEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsObject_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsObject_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_KeyReleaseEvent +func miqt_exec_callback_QGraphicsObject_KeyReleaseEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsObject_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsObject_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_MousePressEvent +func miqt_exec_callback_QGraphicsObject_MousePressEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsObject_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsObject_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_MouseMoveEvent +func miqt_exec_callback_QGraphicsObject_MouseMoveEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsObject_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsObject_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_MouseReleaseEvent +func miqt_exec_callback_QGraphicsObject_MouseReleaseEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsObject_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsObject_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsObject_MouseDoubleClickEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_WheelEvent(event *QGraphicsSceneWheelEvent) { + + C.QGraphicsObject_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnWheelEvent(slot func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) { + C.QGraphicsObject_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_WheelEvent +func miqt_exec_callback_QGraphicsObject_WheelEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsObject_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsObject_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_InputMethodEvent +func miqt_exec_callback_QGraphicsObject_InputMethodEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsObject_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 *QGraphicsObject) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsObject_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_InputMethodQuery +func miqt_exec_callback_QGraphicsObject_InputMethodQuery(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsObject) callVirtualBase_ItemChange(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant { + + _ret := C.QGraphicsObject_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 *QGraphicsObject) OnItemChange(slot func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) { + C.QGraphicsObject_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_ItemChange +func miqt_exec_callback_QGraphicsObject_ItemChange(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsObject) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsObject_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsObject) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsObject_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_SupportsExtension +func miqt_exec_callback_QGraphicsObject_SupportsExtension(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsObject_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsObject) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsObject_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_SetExtension +func miqt_exec_callback_QGraphicsObject_SetExtension(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QGraphicsObject) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsObject_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 *QGraphicsObject) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsObject_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_Extension +func miqt_exec_callback_QGraphicsObject_Extension(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QGraphicsObject) Delete() { C.QGraphicsObject_Delete(this.h, C.bool(this.isSubclass)) @@ -1506,6 +3382,28 @@ func UnsafeNewQAbstractGraphicsShapeItem(h unsafe.Pointer, h_QGraphicsItem unsaf QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} } +// NewQAbstractGraphicsShapeItem constructs a new QAbstractGraphicsShapeItem object. +func NewQAbstractGraphicsShapeItem() *QAbstractGraphicsShapeItem { + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QAbstractGraphicsShapeItem_new(&outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQAbstractGraphicsShapeItem2 constructs a new QAbstractGraphicsShapeItem object. +func NewQAbstractGraphicsShapeItem2(parent *QGraphicsItem) *QAbstractGraphicsShapeItem { + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QAbstractGraphicsShapeItem_new2(parent.cPointer(), &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + func (this *QAbstractGraphicsShapeItem) Pen() *QPen { _ret := C.QAbstractGraphicsShapeItem_Pen(this.h) _goptr := newQPen(_ret) @@ -1539,6 +3437,839 @@ func (this *QAbstractGraphicsShapeItem) OpaqueArea() *QPainterPath { return _goptr } +func (this *QAbstractGraphicsShapeItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QAbstractGraphicsShapeItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QAbstractGraphicsShapeItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QAbstractGraphicsShapeItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_IsObscuredBy +func miqt_exec_callback_QAbstractGraphicsShapeItem_IsObscuredBy(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QAbstractGraphicsShapeItem_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 *QAbstractGraphicsShapeItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QAbstractGraphicsShapeItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_OpaqueArea +func miqt_exec_callback_QAbstractGraphicsShapeItem_OpaqueArea(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_Advance(phase int) { + + C.QAbstractGraphicsShapeItem_virtualbase_Advance(unsafe.Pointer(this.h), (C.int)(phase)) + +} +func (this *QAbstractGraphicsShapeItem) OnAdvance(slot func(super func(phase int), phase int)) { + C.QAbstractGraphicsShapeItem_override_virtual_Advance(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_Advance +func miqt_exec_callback_QAbstractGraphicsShapeItem_Advance(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_Advance, slotval1) + +} +func (this *QAbstractGraphicsShapeItem) OnBoundingRect(slot func() *QRectF) { + C.QAbstractGraphicsShapeItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_BoundingRect +func miqt_exec_callback_QAbstractGraphicsShapeItem_BoundingRect(self *C.QAbstractGraphicsShapeItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func() *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QAbstractGraphicsShapeItem_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 *QAbstractGraphicsShapeItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QAbstractGraphicsShapeItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_Shape +func miqt_exec_callback_QAbstractGraphicsShapeItem_Shape(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QAbstractGraphicsShapeItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QAbstractGraphicsShapeItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QAbstractGraphicsShapeItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_Contains +func miqt_exec_callback_QAbstractGraphicsShapeItem_Contains(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_CollidesWithItem(other *QGraphicsItem, mode ItemSelectionMode) bool { + + return (bool)(C.QAbstractGraphicsShapeItem_virtualbase_CollidesWithItem(unsafe.Pointer(this.h), other.cPointer(), (C.int)(mode))) + +} +func (this *QAbstractGraphicsShapeItem) OnCollidesWithItem(slot func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) { + C.QAbstractGraphicsShapeItem_override_virtual_CollidesWithItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_CollidesWithItem +func miqt_exec_callback_QAbstractGraphicsShapeItem_CollidesWithItem(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_CollidesWithItem, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_CollidesWithPath(path *QPainterPath, mode ItemSelectionMode) bool { + + return (bool)(C.QAbstractGraphicsShapeItem_virtualbase_CollidesWithPath(unsafe.Pointer(this.h), path.cPointer(), (C.int)(mode))) + +} +func (this *QAbstractGraphicsShapeItem) OnCollidesWithPath(slot func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) { + C.QAbstractGraphicsShapeItem_override_virtual_CollidesWithPath(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_CollidesWithPath +func miqt_exec_callback_QAbstractGraphicsShapeItem_CollidesWithPath(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_CollidesWithPath, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} +func (this *QAbstractGraphicsShapeItem) OnPaint(slot func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QAbstractGraphicsShapeItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_Paint +func miqt_exec_callback_QAbstractGraphicsShapeItem_Paint(self *C.QAbstractGraphicsShapeItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_Type() int { + + return (int)(C.QAbstractGraphicsShapeItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QAbstractGraphicsShapeItem) OnType(slot func(super func() int) int) { + C.QAbstractGraphicsShapeItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_Type +func miqt_exec_callback_QAbstractGraphicsShapeItem_Type(self *C.QAbstractGraphicsShapeItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_SceneEventFilter(watched *QGraphicsItem, event *QEvent) bool { + + return (bool)(C.QAbstractGraphicsShapeItem_virtualbase_SceneEventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAbstractGraphicsShapeItem) OnSceneEventFilter(slot func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) { + C.QAbstractGraphicsShapeItem_override_virtual_SceneEventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_SceneEventFilter +func miqt_exec_callback_QAbstractGraphicsShapeItem_SceneEventFilter(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_SceneEventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QAbstractGraphicsShapeItem_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractGraphicsShapeItem) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractGraphicsShapeItem_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_SceneEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_SceneEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_ContextMenuEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_ContextMenuEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_DragEnterEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_DragEnterEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_DragLeaveEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_DragLeaveEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_DragMoveEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_DragMoveEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_DropEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_DropEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_FocusInEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_FocusInEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_FocusOutEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_FocusOutEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_HoverEnterEvent(event *QGraphicsSceneHoverEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_HoverEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnHoverEnterEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_HoverEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_HoverEnterEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_HoverEnterEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_HoverMoveEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_HoverMoveEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_HoverLeaveEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_HoverLeaveEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_KeyPressEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_KeyPressEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_KeyReleaseEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_KeyReleaseEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_MousePressEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_MousePressEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_MouseMoveEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_MouseMoveEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_MouseReleaseEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_MouseReleaseEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_MouseDoubleClickEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_MouseDoubleClickEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_WheelEvent(event *QGraphicsSceneWheelEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnWheelEvent(slot func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_WheelEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_WheelEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_InputMethodEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_InputMethodEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QAbstractGraphicsShapeItem_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 *QAbstractGraphicsShapeItem) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QAbstractGraphicsShapeItem_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_InputMethodQuery +func miqt_exec_callback_QAbstractGraphicsShapeItem_InputMethodQuery(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_ItemChange(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant { + + _ret := C.QAbstractGraphicsShapeItem_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 *QAbstractGraphicsShapeItem) OnItemChange(slot func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) { + C.QAbstractGraphicsShapeItem_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_ItemChange +func miqt_exec_callback_QAbstractGraphicsShapeItem_ItemChange(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QAbstractGraphicsShapeItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QAbstractGraphicsShapeItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QAbstractGraphicsShapeItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_SupportsExtension +func miqt_exec_callback_QAbstractGraphicsShapeItem_SupportsExtension(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QAbstractGraphicsShapeItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QAbstractGraphicsShapeItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_SetExtension +func miqt_exec_callback_QAbstractGraphicsShapeItem_SetExtension(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QAbstractGraphicsShapeItem_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 *QAbstractGraphicsShapeItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QAbstractGraphicsShapeItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_Extension +func miqt_exec_callback_QAbstractGraphicsShapeItem_Extension(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QAbstractGraphicsShapeItem) Delete() { C.QAbstractGraphicsShapeItem_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qgraphicsitem.h b/qt/gen_qgraphicsitem.h index 691fd4ae..bc6840a2 100644 --- a/qt/gen_qgraphicsitem.h +++ b/qt/gen_qgraphicsitem.h @@ -17,6 +17,7 @@ extern "C" { #ifdef __cplusplus class QAbstractGraphicsShapeItem; class QBrush; +class QChildEvent; class QColor; class QCursor; class QEvent; @@ -46,6 +47,7 @@ class QInputMethodEvent; class QKeyEvent; class QLineF; class QMatrix; +class QMetaMethod; class QMetaObject; class QObject; class QPainter; @@ -59,12 +61,14 @@ class QSize; class QStyleOptionGraphicsItem; class QTextCursor; class QTextDocument; +class QTimerEvent; class QTransform; class QVariant; class QWidget; #else typedef struct QAbstractGraphicsShapeItem QAbstractGraphicsShapeItem; typedef struct QBrush QBrush; +typedef struct QChildEvent QChildEvent; typedef struct QColor QColor; typedef struct QCursor QCursor; typedef struct QEvent QEvent; @@ -94,6 +98,7 @@ typedef struct QInputMethodEvent QInputMethodEvent; typedef struct QKeyEvent QKeyEvent; typedef struct QLineF QLineF; typedef struct QMatrix QMatrix; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPainter QPainter; @@ -107,11 +112,14 @@ typedef struct QSize QSize; typedef struct QStyleOptionGraphicsItem QStyleOptionGraphicsItem; typedef struct QTextCursor QTextCursor; typedef struct QTextDocument QTextDocument; +typedef struct QTimerEvent QTimerEvent; typedef struct QTransform QTransform; typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif +void QGraphicsItem_new(QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsItem_new2(QGraphicsItem* parent, QGraphicsItem** outptr_QGraphicsItem); QGraphicsScene* QGraphicsItem_Scene(const QGraphicsItem* self); QGraphicsItem* QGraphicsItem_ParentItem(const QGraphicsItem* self); QGraphicsItem* QGraphicsItem_TopLevelItem(const QGraphicsItem* self); @@ -317,8 +325,80 @@ struct miqt_array /* of QGraphicsItem* */ QGraphicsItem_CollidingItems1(const Q bool QGraphicsItem_IsObscured1(const QGraphicsItem* self, QRectF* rect); void QGraphicsItem_Update1(QGraphicsItem* self, QRectF* rect); void QGraphicsItem_Scroll3(QGraphicsItem* self, double dx, double dy, QRectF* rect); +void QGraphicsItem_override_virtual_Advance(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_Advance(void* self, int phase); +void QGraphicsItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsItem_virtualbase_BoundingRect(const void* self); +void QGraphicsItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsItem_virtualbase_Shape(const void* self); +void QGraphicsItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsItem_override_virtual_CollidesWithItem(void* self, intptr_t slot); +bool QGraphicsItem_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode); +void QGraphicsItem_override_virtual_CollidesWithPath(void* self, intptr_t slot); +bool QGraphicsItem_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode); +void QGraphicsItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsItem_virtualbase_Type(const void* self); +void QGraphicsItem_override_virtual_SceneEventFilter(void* self, intptr_t slot); +bool QGraphicsItem_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event); +void QGraphicsItem_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsItem_virtualbase_SceneEvent(void* self, QEvent* event); +void QGraphicsItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsItem_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItem_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItem_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItem_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsItem_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItem_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsItem_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItem_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event); +void QGraphicsItem_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsItem_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsItem_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsItem_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsItem_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsItem_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsItem_Delete(QGraphicsItem* self, bool isSubclass); +void QGraphicsObject_new(QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsObject_new2(QGraphicsItem* parent, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); QMetaObject* QGraphicsObject_MetaObject(const QGraphicsObject* self); void* QGraphicsObject_Metacast(QGraphicsObject* self, const char* param1); struct miqt_string QGraphicsObject_Tr(const char* s); @@ -355,14 +435,170 @@ 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_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_Event(void* self, QEvent* ev); +void QGraphicsObject_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QGraphicsObject_override_virtual_TimerEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QGraphicsObject_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QGraphicsObject_override_virtual_CustomEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_CustomEvent(void* self, QEvent* event); +void QGraphicsObject_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QGraphicsObject_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QGraphicsObject_override_virtual_Advance(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_Advance(void* self, int phase); +void QGraphicsObject_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsObject_virtualbase_BoundingRect(const void* self); +void QGraphicsObject_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsObject_virtualbase_Shape(const void* self); +void QGraphicsObject_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsObject_override_virtual_CollidesWithItem(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode); +void QGraphicsObject_override_virtual_CollidesWithPath(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode); +void QGraphicsObject_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsObject_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsObject_virtualbase_OpaqueArea(const void* self); +void QGraphicsObject_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsObject_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsObject_virtualbase_Type(const void* self); +void QGraphicsObject_override_virtual_SceneEventFilter(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event); +void QGraphicsObject_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_SceneEvent(void* self, QEvent* event); +void QGraphicsObject_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsObject_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsObject_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsObject_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsObject_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsObject_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsObject_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsObject_override_virtual_HoverEnterEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsObject_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsObject_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsObject_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsObject_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsObject_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsObject_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsObject_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsObject_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsObject_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event); +void QGraphicsObject_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsObject_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsObject_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsObject_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsObject_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsObject_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsObject_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsObject_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsObject_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsObject_Delete(QGraphicsObject* self, bool isSubclass); +void QAbstractGraphicsShapeItem_new(QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QAbstractGraphicsShapeItem_new2(QGraphicsItem* parent, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); QPen* QAbstractGraphicsShapeItem_Pen(const QAbstractGraphicsShapeItem* self); void QAbstractGraphicsShapeItem_SetPen(QAbstractGraphicsShapeItem* self, QPen* pen); 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_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QAbstractGraphicsShapeItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QAbstractGraphicsShapeItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QAbstractGraphicsShapeItem_virtualbase_OpaqueArea(const void* self); +void QAbstractGraphicsShapeItem_override_virtual_Advance(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_Advance(void* self, int phase); +void QAbstractGraphicsShapeItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QAbstractGraphicsShapeItem_virtualbase_BoundingRect(const void* self); +void QAbstractGraphicsShapeItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QAbstractGraphicsShapeItem_virtualbase_Shape(const void* self); +void QAbstractGraphicsShapeItem_override_virtual_Contains(void* self, intptr_t slot); +bool QAbstractGraphicsShapeItem_virtualbase_Contains(const void* self, QPointF* point); +void QAbstractGraphicsShapeItem_override_virtual_CollidesWithItem(void* self, intptr_t slot); +bool QAbstractGraphicsShapeItem_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode); +void QAbstractGraphicsShapeItem_override_virtual_CollidesWithPath(void* self, intptr_t slot); +bool QAbstractGraphicsShapeItem_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode); +void QAbstractGraphicsShapeItem_override_virtual_Paint(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QAbstractGraphicsShapeItem_override_virtual_Type(void* self, intptr_t slot); +int QAbstractGraphicsShapeItem_virtualbase_Type(const void* self); +void QAbstractGraphicsShapeItem_override_virtual_SceneEventFilter(void* self, intptr_t slot); +bool QAbstractGraphicsShapeItem_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QAbstractGraphicsShapeItem_virtualbase_SceneEvent(void* self, QEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_DropEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_WheelEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QAbstractGraphicsShapeItem_virtualbase_InputMethodQuery(const void* self, int query); +void QAbstractGraphicsShapeItem_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QAbstractGraphicsShapeItem_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QAbstractGraphicsShapeItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QAbstractGraphicsShapeItem_virtualbase_SupportsExtension(const void* self, int extension); +void QAbstractGraphicsShapeItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QAbstractGraphicsShapeItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QAbstractGraphicsShapeItem_virtualbase_Extension(const void* self, QVariant* variant); void QAbstractGraphicsShapeItem_Delete(QAbstractGraphicsShapeItem* self, bool isSubclass); void QGraphicsPathItem_new(QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); diff --git a/qt/gen_qgraphicslayout.cpp b/qt/gen_qgraphicslayout.cpp index 96fa07da..7c756127 100644 --- a/qt/gen_qgraphicslayout.cpp +++ b/qt/gen_qgraphicslayout.cpp @@ -1,10 +1,228 @@ #include #include #include +#include +#include #include #include "gen_qgraphicslayout.h" #include "_cgo_export.h" +class MiqtVirtualQGraphicsLayout : public virtual QGraphicsLayout { +public: + + MiqtVirtualQGraphicsLayout(): QGraphicsLayout() {}; + MiqtVirtualQGraphicsLayout(QGraphicsLayoutItem* parent): QGraphicsLayout(parent) {}; + + virtual ~MiqtVirtualQGraphicsLayout() = default; + + // 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) { + QGraphicsLayout::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_QGraphicsLayout_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 { + + QGraphicsLayout::getContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + + } + + // 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) { + QGraphicsLayout::invalidate(); + return; + } + + + miqt_exec_callback_QGraphicsLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QGraphicsLayout::invalidate(); + + } + + // 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) { + QGraphicsLayout::updateGeometry(); + return; + } + + + miqt_exec_callback_QGraphicsLayout_UpdateGeometry(this, handle__UpdateGeometry); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometry() { + + QGraphicsLayout::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) { + QGraphicsLayout::widgetEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QGraphicsLayout_WidgetEvent(this, handle__WidgetEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WidgetEvent(QEvent* e) { + + QGraphicsLayout::widgetEvent(e); + + } + + // 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 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QGraphicsLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAt = 0; + + // Subclass to allow providing a Go implementation + virtual QGraphicsLayoutItem* itemAt(int i) const override { + if (handle__ItemAt == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + int sigval1 = i; + + QGraphicsLayoutItem* callback_return_value = miqt_exec_callback_QGraphicsLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = index; + + miqt_exec_callback_QGraphicsLayout_RemoveAt(this, handle__RemoveAt, sigval1); + + + } + + // 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) { + QGraphicsLayout::setGeometry(rect); + return; + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRectF* rect) { + + QGraphicsLayout::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 QSizeF(); // Pure virtual, there is no base we can call + } + + 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_QGraphicsLayout_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + +}; + +void QGraphicsLayout_new(QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLayout* ret = new MiqtVirtualQGraphicsLayout(); + *outptr_QGraphicsLayout = ret; + *outptr_QGraphicsLayoutItem = static_cast(ret); +} + +void QGraphicsLayout_new2(QGraphicsLayoutItem* parent, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLayout* ret = new MiqtVirtualQGraphicsLayout(parent); + *outptr_QGraphicsLayout = ret; + *outptr_QGraphicsLayoutItem = static_cast(ret); +} + void QGraphicsLayout_SetContentsMargins(QGraphicsLayout* self, double left, double top, double right, double bottom) { self->setContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); } @@ -53,9 +271,65 @@ bool QGraphicsLayout_InstantInvalidatePropagation() { return QGraphicsLayout::instantInvalidatePropagation(); } +void QGraphicsLayout_override_virtual_GetContentsMargins(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__GetContentsMargins = slot; +} + +void QGraphicsLayout_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom) { + ( (const MiqtVirtualQGraphicsLayout*)(self) )->virtualbase_GetContentsMargins(left, top, right, bottom); +} + +void QGraphicsLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__Invalidate = slot; +} + +void QGraphicsLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQGraphicsLayout*)(self) )->virtualbase_Invalidate(); +} + +void QGraphicsLayout_override_virtual_UpdateGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__UpdateGeometry = slot; +} + +void QGraphicsLayout_virtualbase_UpdateGeometry(void* self) { + ( (MiqtVirtualQGraphicsLayout*)(self) )->virtualbase_UpdateGeometry(); +} + +void QGraphicsLayout_override_virtual_WidgetEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__WidgetEvent = slot; +} + +void QGraphicsLayout_virtualbase_WidgetEvent(void* self, QEvent* e) { + ( (MiqtVirtualQGraphicsLayout*)(self) )->virtualbase_WidgetEvent(e); +} + +void QGraphicsLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__Count = slot; +} + +void QGraphicsLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__ItemAt = slot; +} + +void QGraphicsLayout_override_virtual_RemoveAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__RemoveAt = slot; +} + +void QGraphicsLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__SetGeometry = slot; +} + +void QGraphicsLayout_virtualbase_SetGeometry(void* self, QRectF* rect) { + ( (MiqtVirtualQGraphicsLayout*)(self) )->virtualbase_SetGeometry(rect); +} + +void QGraphicsLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__SizeHint = slot; +} + void QGraphicsLayout_Delete(QGraphicsLayout* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qgraphicslayout.go b/qt/gen_qgraphicslayout.go index 3a2487fb..4b7c1f40 100644 --- a/qt/gen_qgraphicslayout.go +++ b/qt/gen_qgraphicslayout.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,28 @@ func UnsafeNewQGraphicsLayout(h unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Poi QGraphicsLayoutItem: UnsafeNewQGraphicsLayoutItem(h_QGraphicsLayoutItem)} } +// NewQGraphicsLayout constructs a new QGraphicsLayout object. +func NewQGraphicsLayout() *QGraphicsLayout { + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLayout_new(&outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayout(outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsLayout2 constructs a new QGraphicsLayout object. +func NewQGraphicsLayout2(parent *QGraphicsLayoutItem) *QGraphicsLayout { + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLayout_new2(parent.cPointer(), &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayout(outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret +} + func (this *QGraphicsLayout) SetContentsMargins(left float64, top float64, right float64, bottom float64) { C.QGraphicsLayout_SetContentsMargins(this.h, (C.double)(left), (C.double)(top), (C.double)(right), (C.double)(bottom)) } @@ -100,6 +123,194 @@ func QGraphicsLayout_InstantInvalidatePropagation() bool { return (bool)(C.QGraphicsLayout_InstantInvalidatePropagation()) } +func (this *QGraphicsLayout) callVirtualBase_GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) { + + C.QGraphicsLayout_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 *QGraphicsLayout) OnGetContentsMargins(slot func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) { + C.QGraphicsLayout_override_virtual_GetContentsMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_GetContentsMargins +func miqt_exec_callback_QGraphicsLayout_GetContentsMargins(self *C.QGraphicsLayout, 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((&QGraphicsLayout{h: self}).callVirtualBase_GetContentsMargins, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QGraphicsLayout) callVirtualBase_Invalidate() { + + C.QGraphicsLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsLayout) OnInvalidate(slot func(super func())) { + C.QGraphicsLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_Invalidate +func miqt_exec_callback_QGraphicsLayout_Invalidate(self *C.QGraphicsLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QGraphicsLayout) callVirtualBase_UpdateGeometry() { + + C.QGraphicsLayout_virtualbase_UpdateGeometry(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsLayout) OnUpdateGeometry(slot func(super func())) { + C.QGraphicsLayout_override_virtual_UpdateGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_UpdateGeometry +func miqt_exec_callback_QGraphicsLayout_UpdateGeometry(self *C.QGraphicsLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsLayout{h: self}).callVirtualBase_UpdateGeometry) + +} + +func (this *QGraphicsLayout) callVirtualBase_WidgetEvent(e *QEvent) { + + C.QGraphicsLayout_virtualbase_WidgetEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QGraphicsLayout) OnWidgetEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QGraphicsLayout_override_virtual_WidgetEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_WidgetEvent +func miqt_exec_callback_QGraphicsLayout_WidgetEvent(self *C.QGraphicsLayout, 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((&QGraphicsLayout{h: self}).callVirtualBase_WidgetEvent, slotval1) + +} +func (this *QGraphicsLayout) OnCount(slot func() int) { + C.QGraphicsLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_Count +func miqt_exec_callback_QGraphicsLayout_Count(self *C.QGraphicsLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *QGraphicsLayout) OnItemAt(slot func(i int) *QGraphicsLayoutItem) { + C.QGraphicsLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_ItemAt +func miqt_exec_callback_QGraphicsLayout_ItemAt(self *C.QGraphicsLayout, cb C.intptr_t, i C.int) *C.QGraphicsLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(i int) *QGraphicsLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(i) + + virtualReturn := gofunc(slotval1) + + return virtualReturn.cPointer() + +} +func (this *QGraphicsLayout) OnRemoveAt(slot func(index int)) { + C.QGraphicsLayout_override_virtual_RemoveAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_RemoveAt +func miqt_exec_callback_QGraphicsLayout_RemoveAt(self *C.QGraphicsLayout, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc(slotval1) + +} + +func (this *QGraphicsLayout) callVirtualBase_SetGeometry(rect *QRectF) { + + C.QGraphicsLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QGraphicsLayout) OnSetGeometry(slot func(super func(rect *QRectF), rect *QRectF)) { + C.QGraphicsLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_SetGeometry +func miqt_exec_callback_QGraphicsLayout_SetGeometry(self *C.QGraphicsLayout, 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((&QGraphicsLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} +func (this *QGraphicsLayout) OnSizeHint(slot func(which SizeHint, constraint *QSizeF) *QSizeF) { + C.QGraphicsLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_SizeHint +func miqt_exec_callback_QGraphicsLayout_SizeHint(self *C.QGraphicsLayout, cb C.intptr_t, which C.int, constraint *C.QSizeF) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QGraphicsLayout) Delete() { C.QGraphicsLayout_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qgraphicslayout.h b/qt/gen_qgraphicslayout.h index 00d83b1a..167e4473 100644 --- a/qt/gen_qgraphicslayout.h +++ b/qt/gen_qgraphicslayout.h @@ -18,12 +18,18 @@ extern "C" { class QEvent; class QGraphicsLayout; class QGraphicsLayoutItem; +class QRectF; +class QSizeF; #else typedef struct QEvent QEvent; typedef struct QGraphicsLayout QGraphicsLayout; typedef struct QGraphicsLayoutItem QGraphicsLayoutItem; +typedef struct QRectF QRectF; +typedef struct QSizeF QSizeF; #endif +void QGraphicsLayout_new(QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsLayout_new2(QGraphicsLayoutItem* parent, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); void QGraphicsLayout_SetContentsMargins(QGraphicsLayout* self, double left, double top, double right, double bottom); void QGraphicsLayout_GetContentsMargins(const QGraphicsLayout* self, double* left, double* top, double* right, double* bottom); void QGraphicsLayout_Activate(QGraphicsLayout* self); @@ -36,6 +42,24 @@ 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_override_virtual_GetContentsMargins(void* self, intptr_t slot); +void QGraphicsLayout_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom); +void QGraphicsLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QGraphicsLayout_virtualbase_Invalidate(void* self); +void QGraphicsLayout_override_virtual_UpdateGeometry(void* self, intptr_t slot); +void QGraphicsLayout_virtualbase_UpdateGeometry(void* self); +void QGraphicsLayout_override_virtual_WidgetEvent(void* self, intptr_t slot); +void QGraphicsLayout_virtualbase_WidgetEvent(void* self, QEvent* e); +void QGraphicsLayout_override_virtual_Count(void* self, intptr_t slot); +int QGraphicsLayout_virtualbase_Count(const void* self); +void QGraphicsLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QGraphicsLayoutItem* QGraphicsLayout_virtualbase_ItemAt(const void* self, int i); +void QGraphicsLayout_override_virtual_RemoveAt(void* self, intptr_t slot); +void QGraphicsLayout_virtualbase_RemoveAt(void* self, int index); +void QGraphicsLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGraphicsLayout_virtualbase_SetGeometry(void* self, QRectF* rect); +void QGraphicsLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSizeF* QGraphicsLayout_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint); void QGraphicsLayout_Delete(QGraphicsLayout* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qgraphicslayoutitem.cpp b/qt/gen_qgraphicslayoutitem.cpp index 08c162d3..241e8c25 100644 --- a/qt/gen_qgraphicslayoutitem.cpp +++ b/qt/gen_qgraphicslayoutitem.cpp @@ -7,6 +7,132 @@ #include "gen_qgraphicslayoutitem.h" #include "_cgo_export.h" +class MiqtVirtualQGraphicsLayoutItem : public virtual QGraphicsLayoutItem { +public: + + MiqtVirtualQGraphicsLayoutItem(): QGraphicsLayoutItem() {}; + MiqtVirtualQGraphicsLayoutItem(QGraphicsLayoutItem* parent): QGraphicsLayoutItem(parent) {}; + MiqtVirtualQGraphicsLayoutItem(QGraphicsLayoutItem* parent, bool isLayout): QGraphicsLayoutItem(parent, isLayout) {}; + + virtual ~MiqtVirtualQGraphicsLayoutItem() = 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) { + QGraphicsLayoutItem::setGeometry(rect); + return; + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsLayoutItem_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRectF* rect) { + + QGraphicsLayoutItem::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) { + QGraphicsLayoutItem::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_QGraphicsLayoutItem_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 { + + QGraphicsLayoutItem::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) { + QGraphicsLayoutItem::updateGeometry(); + return; + } + + + miqt_exec_callback_QGraphicsLayoutItem_UpdateGeometry(this, handle__UpdateGeometry); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometry() { + + QGraphicsLayoutItem::updateGeometry(); + + } + + // 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 QSizeF(); // Pure virtual, there is no base we can call + } + + 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_QGraphicsLayoutItem_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + +}; + +void QGraphicsLayoutItem_new(QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLayoutItem* ret = new MiqtVirtualQGraphicsLayoutItem(); + *outptr_QGraphicsLayoutItem = ret; +} + +void QGraphicsLayoutItem_new2(QGraphicsLayoutItem* parent, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLayoutItem* ret = new MiqtVirtualQGraphicsLayoutItem(parent); + *outptr_QGraphicsLayoutItem = ret; +} + +void QGraphicsLayoutItem_new3(QGraphicsLayoutItem* parent, bool isLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLayoutItem* ret = new MiqtVirtualQGraphicsLayoutItem(parent, isLayout); + *outptr_QGraphicsLayoutItem = ret; +} + void QGraphicsLayoutItem_SetSizePolicy(QGraphicsLayoutItem* self, QSizePolicy* policy) { self->setSizePolicy(*policy); } @@ -161,9 +287,37 @@ QSizeF* QGraphicsLayoutItem_EffectiveSizeHint2(const QGraphicsLayoutItem* self, return new QSizeF(self->effectiveSizeHint(static_cast(which), *constraint)); } +void QGraphicsLayoutItem_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayoutItem*)(self) )->handle__SetGeometry = slot; +} + +void QGraphicsLayoutItem_virtualbase_SetGeometry(void* self, QRectF* rect) { + ( (MiqtVirtualQGraphicsLayoutItem*)(self) )->virtualbase_SetGeometry(rect); +} + +void QGraphicsLayoutItem_override_virtual_GetContentsMargins(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayoutItem*)(self) )->handle__GetContentsMargins = slot; +} + +void QGraphicsLayoutItem_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom) { + ( (const MiqtVirtualQGraphicsLayoutItem*)(self) )->virtualbase_GetContentsMargins(left, top, right, bottom); +} + +void QGraphicsLayoutItem_override_virtual_UpdateGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayoutItem*)(self) )->handle__UpdateGeometry = slot; +} + +void QGraphicsLayoutItem_virtualbase_UpdateGeometry(void* self) { + ( (MiqtVirtualQGraphicsLayoutItem*)(self) )->virtualbase_UpdateGeometry(); +} + +void QGraphicsLayoutItem_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayoutItem*)(self) )->handle__SizeHint = slot; +} + void QGraphicsLayoutItem_Delete(QGraphicsLayoutItem* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qgraphicslayoutitem.go b/qt/gen_qgraphicslayoutitem.go index 504eb27e..0759aeaa 100644 --- a/qt/gen_qgraphicslayoutitem.go +++ b/qt/gen_qgraphicslayoutitem.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -49,6 +50,36 @@ func UnsafeNewQGraphicsLayoutItem(h unsafe.Pointer) *QGraphicsLayoutItem { return &QGraphicsLayoutItem{h: (*C.QGraphicsLayoutItem)(h)} } +// NewQGraphicsLayoutItem constructs a new QGraphicsLayoutItem object. +func NewQGraphicsLayoutItem() *QGraphicsLayoutItem { + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLayoutItem_new(&outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayoutItem(outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsLayoutItem2 constructs a new QGraphicsLayoutItem object. +func NewQGraphicsLayoutItem2(parent *QGraphicsLayoutItem) *QGraphicsLayoutItem { + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLayoutItem_new2(parent.cPointer(), &outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayoutItem(outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsLayoutItem3 constructs a new QGraphicsLayoutItem object. +func NewQGraphicsLayoutItem3(parent *QGraphicsLayoutItem, isLayout bool) *QGraphicsLayoutItem { + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLayoutItem_new3(parent.cPointer(), (C.bool)(isLayout), &outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayoutItem(outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret +} + func (this *QGraphicsLayoutItem) SetSizePolicy(policy *QSizePolicy) { C.QGraphicsLayoutItem_SetSizePolicy(this.h, policy.cPointer()) } @@ -221,6 +252,99 @@ func (this *QGraphicsLayoutItem) EffectiveSizeHint2(which SizeHint, constraint * return _goptr } +func (this *QGraphicsLayoutItem) callVirtualBase_SetGeometry(rect *QRectF) { + + C.QGraphicsLayoutItem_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QGraphicsLayoutItem) OnSetGeometry(slot func(super func(rect *QRectF), rect *QRectF)) { + C.QGraphicsLayoutItem_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayoutItem_SetGeometry +func miqt_exec_callback_QGraphicsLayoutItem_SetGeometry(self *C.QGraphicsLayoutItem, 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((&QGraphicsLayoutItem{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QGraphicsLayoutItem) callVirtualBase_GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) { + + C.QGraphicsLayoutItem_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 *QGraphicsLayoutItem) OnGetContentsMargins(slot func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) { + C.QGraphicsLayoutItem_override_virtual_GetContentsMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayoutItem_GetContentsMargins +func miqt_exec_callback_QGraphicsLayoutItem_GetContentsMargins(self *C.QGraphicsLayoutItem, 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((&QGraphicsLayoutItem{h: self}).callVirtualBase_GetContentsMargins, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QGraphicsLayoutItem) callVirtualBase_UpdateGeometry() { + + C.QGraphicsLayoutItem_virtualbase_UpdateGeometry(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsLayoutItem) OnUpdateGeometry(slot func(super func())) { + C.QGraphicsLayoutItem_override_virtual_UpdateGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayoutItem_UpdateGeometry +func miqt_exec_callback_QGraphicsLayoutItem_UpdateGeometry(self *C.QGraphicsLayoutItem, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsLayoutItem{h: self}).callVirtualBase_UpdateGeometry) + +} +func (this *QGraphicsLayoutItem) OnSizeHint(slot func(which SizeHint, constraint *QSizeF) *QSizeF) { + C.QGraphicsLayoutItem_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayoutItem_SizeHint +func miqt_exec_callback_QGraphicsLayoutItem_SizeHint(self *C.QGraphicsLayoutItem, cb C.intptr_t, which C.int, constraint *C.QSizeF) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QGraphicsLayoutItem) Delete() { C.QGraphicsLayoutItem_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qgraphicslayoutitem.h b/qt/gen_qgraphicslayoutitem.h index bb67a374..5c683ae2 100644 --- a/qt/gen_qgraphicslayoutitem.h +++ b/qt/gen_qgraphicslayoutitem.h @@ -28,6 +28,9 @@ typedef struct QSizeF QSizeF; typedef struct QSizePolicy QSizePolicy; #endif +void QGraphicsLayoutItem_new(QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsLayoutItem_new2(QGraphicsLayoutItem* parent, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsLayoutItem_new3(QGraphicsLayoutItem* parent, bool isLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); void QGraphicsLayoutItem_SetSizePolicy(QGraphicsLayoutItem* self, QSizePolicy* policy); void QGraphicsLayoutItem_SetSizePolicy2(QGraphicsLayoutItem* self, int hPolicy, int vPolicy); QSizePolicy* QGraphicsLayoutItem_SizePolicy(const QGraphicsLayoutItem* self); @@ -66,6 +69,14 @@ 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_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGraphicsLayoutItem_virtualbase_SetGeometry(void* self, QRectF* rect); +void QGraphicsLayoutItem_override_virtual_GetContentsMargins(void* self, intptr_t slot); +void QGraphicsLayoutItem_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom); +void QGraphicsLayoutItem_override_virtual_UpdateGeometry(void* self, intptr_t slot); +void QGraphicsLayoutItem_virtualbase_UpdateGeometry(void* self); +void QGraphicsLayoutItem_override_virtual_SizeHint(void* self, intptr_t slot); +QSizeF* QGraphicsLayoutItem_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint); void QGraphicsLayoutItem_Delete(QGraphicsLayoutItem* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qgraphicstransform.cpp b/qt/gen_qgraphicstransform.cpp index f34f2b5d..24ee3168 100644 --- a/qt/gen_qgraphicstransform.cpp +++ b/qt/gen_qgraphicstransform.cpp @@ -1,17 +1,230 @@ +#include +#include #include #include #include #include +#include #include #include #include #include #include +#include #include #include #include "gen_qgraphicstransform.h" #include "_cgo_export.h" +class MiqtVirtualQGraphicsTransform : public virtual QGraphicsTransform { +public: + + MiqtVirtualQGraphicsTransform(): QGraphicsTransform() {}; + MiqtVirtualQGraphicsTransform(QObject* parent): QGraphicsTransform(parent) {}; + + virtual ~MiqtVirtualQGraphicsTransform() = 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) { + return; // Pure virtual, there is no base we can call + } + + QMatrix4x4* sigval1 = matrix; + + miqt_exec_callback_QGraphicsTransform_ApplyTo(const_cast(this), handle__ApplyTo, sigval1); + + + } + + // 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 QGraphicsTransform::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsTransform_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGraphicsTransform::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 QGraphicsTransform::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsTransform_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QGraphicsTransform::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) { + QGraphicsTransform::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTransform_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QGraphicsTransform::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) { + QGraphicsTransform::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTransform_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QGraphicsTransform::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) { + QGraphicsTransform::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTransform_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QGraphicsTransform::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) { + QGraphicsTransform::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsTransform_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QGraphicsTransform::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) { + QGraphicsTransform::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsTransform_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QGraphicsTransform::disconnectNotify(*signal); + + } + +}; + +void QGraphicsTransform_new(QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { + MiqtVirtualQGraphicsTransform* ret = new MiqtVirtualQGraphicsTransform(); + *outptr_QGraphicsTransform = ret; + *outptr_QObject = static_cast(ret); +} + +void QGraphicsTransform_new2(QObject* parent, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { + MiqtVirtualQGraphicsTransform* ret = new MiqtVirtualQGraphicsTransform(parent); + *outptr_QGraphicsTransform = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QGraphicsTransform_MetaObject(const QGraphicsTransform* self) { return (QMetaObject*) self->metaObject(); } @@ -90,9 +303,69 @@ struct miqt_string QGraphicsTransform_TrUtf83(const char* s, const char* c, int return _ms; } +void QGraphicsTransform_override_virtual_ApplyTo(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTransform*)(self) )->handle__ApplyTo = slot; +} + +void QGraphicsTransform_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTransform*)(self) )->handle__Event = slot; +} + +bool QGraphicsTransform_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsTransform*)(self) )->virtualbase_Event(event); +} + +void QGraphicsTransform_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTransform*)(self) )->handle__EventFilter = slot; +} + +bool QGraphicsTransform_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsTransform*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QGraphicsTransform_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTransform*)(self) )->handle__TimerEvent = slot; +} + +void QGraphicsTransform_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQGraphicsTransform*)(self) )->virtualbase_TimerEvent(event); +} + +void QGraphicsTransform_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTransform*)(self) )->handle__ChildEvent = slot; +} + +void QGraphicsTransform_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQGraphicsTransform*)(self) )->virtualbase_ChildEvent(event); +} + +void QGraphicsTransform_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTransform*)(self) )->handle__CustomEvent = slot; +} + +void QGraphicsTransform_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsTransform*)(self) )->virtualbase_CustomEvent(event); +} + +void QGraphicsTransform_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTransform*)(self) )->handle__ConnectNotify = slot; +} + +void QGraphicsTransform_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsTransform*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QGraphicsTransform_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTransform*)(self) )->handle__DisconnectNotify = slot; +} + +void QGraphicsTransform_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsTransform*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QGraphicsTransform_Delete(QGraphicsTransform* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qgraphicstransform.go b/qt/gen_qgraphicstransform.go index 55b30432..fdf6f163 100644 --- a/qt/gen_qgraphicstransform.go +++ b/qt/gen_qgraphicstransform.go @@ -53,6 +53,28 @@ func UnsafeNewQGraphicsTransform(h unsafe.Pointer, h_QObject unsafe.Pointer) *QG QObject: UnsafeNewQObject(h_QObject)} } +// NewQGraphicsTransform constructs a new QGraphicsTransform object. +func NewQGraphicsTransform() *QGraphicsTransform { + var outptr_QGraphicsTransform *C.QGraphicsTransform = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsTransform_new(&outptr_QGraphicsTransform, &outptr_QObject) + ret := newQGraphicsTransform(outptr_QGraphicsTransform, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQGraphicsTransform2 constructs a new QGraphicsTransform object. +func NewQGraphicsTransform2(parent *QObject) *QGraphicsTransform { + var outptr_QGraphicsTransform *C.QGraphicsTransform = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsTransform_new2(parent.cPointer(), &outptr_QGraphicsTransform, &outptr_QObject) + ret := newQGraphicsTransform(outptr_QGraphicsTransform, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QGraphicsTransform) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QGraphicsTransform_MetaObject(this.h))) } @@ -128,6 +150,189 @@ func QGraphicsTransform_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QGraphicsTransform) OnApplyTo(slot func(matrix *QMatrix4x4)) { + C.QGraphicsTransform_override_virtual_ApplyTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTransform_ApplyTo +func miqt_exec_callback_QGraphicsTransform_ApplyTo(self *C.QGraphicsTransform, cb C.intptr_t, matrix *C.QMatrix4x4) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + +} + +func (this *QGraphicsTransform) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGraphicsTransform_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsTransform) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsTransform_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTransform_Event +func miqt_exec_callback_QGraphicsTransform_Event(self *C.QGraphicsTransform, 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((&QGraphicsTransform{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsTransform) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QGraphicsTransform_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsTransform) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QGraphicsTransform_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTransform_EventFilter +func miqt_exec_callback_QGraphicsTransform_EventFilter(self *C.QGraphicsTransform, 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((&QGraphicsTransform{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsTransform) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QGraphicsTransform_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTransform) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QGraphicsTransform_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTransform_TimerEvent +func miqt_exec_callback_QGraphicsTransform_TimerEvent(self *C.QGraphicsTransform, 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((&QGraphicsTransform{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QGraphicsTransform) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QGraphicsTransform_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTransform) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QGraphicsTransform_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTransform_ChildEvent +func miqt_exec_callback_QGraphicsTransform_ChildEvent(self *C.QGraphicsTransform, 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((&QGraphicsTransform{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QGraphicsTransform) callVirtualBase_CustomEvent(event *QEvent) { + + C.QGraphicsTransform_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTransform) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsTransform_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTransform_CustomEvent +func miqt_exec_callback_QGraphicsTransform_CustomEvent(self *C.QGraphicsTransform, 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((&QGraphicsTransform{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QGraphicsTransform) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QGraphicsTransform_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsTransform) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsTransform_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTransform_ConnectNotify +func miqt_exec_callback_QGraphicsTransform_ConnectNotify(self *C.QGraphicsTransform, 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((&QGraphicsTransform{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QGraphicsTransform) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QGraphicsTransform_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsTransform) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsTransform_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTransform_DisconnectNotify +func miqt_exec_callback_QGraphicsTransform_DisconnectNotify(self *C.QGraphicsTransform, 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((&QGraphicsTransform{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QGraphicsTransform) Delete() { diff --git a/qt/gen_qgraphicstransform.h b/qt/gen_qgraphicstransform.h index 304b2012..21f13fcf 100644 --- a/qt/gen_qgraphicstransform.h +++ b/qt/gen_qgraphicstransform.h @@ -15,23 +15,33 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QGraphicsRotation; class QGraphicsScale; class QGraphicsTransform; class QMatrix4x4; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QVector3D; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QGraphicsRotation QGraphicsRotation; typedef struct QGraphicsScale QGraphicsScale; typedef struct QGraphicsTransform QGraphicsTransform; typedef struct QMatrix4x4 QMatrix4x4; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QVector3D QVector3D; #endif +void QGraphicsTransform_new(QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); +void QGraphicsTransform_new2(QObject* parent, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); QMetaObject* QGraphicsTransform_MetaObject(const QGraphicsTransform* self); void* QGraphicsTransform_Metacast(QGraphicsTransform* self, const char* param1); struct miqt_string QGraphicsTransform_Tr(const char* s); @@ -41,6 +51,22 @@ 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_override_virtual_ApplyTo(void* self, intptr_t slot); +void QGraphicsTransform_virtualbase_ApplyTo(const void* self, QMatrix4x4* matrix); +void QGraphicsTransform_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsTransform_virtualbase_Event(void* self, QEvent* event); +void QGraphicsTransform_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGraphicsTransform_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QGraphicsTransform_override_virtual_TimerEvent(void* self, intptr_t slot); +void QGraphicsTransform_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QGraphicsTransform_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGraphicsTransform_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QGraphicsTransform_override_virtual_CustomEvent(void* self, intptr_t slot); +void QGraphicsTransform_virtualbase_CustomEvent(void* self, QEvent* event); +void QGraphicsTransform_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QGraphicsTransform_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QGraphicsTransform_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QGraphicsTransform_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QGraphicsTransform_Delete(QGraphicsTransform* self, bool isSubclass); void QGraphicsScale_new(QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); diff --git a/qt/gen_qheaderview.cpp b/qt/gen_qheaderview.cpp index 4d5466a1..d134db2b 100644 --- a/qt/gen_qheaderview.cpp +++ b/qt/gen_qheaderview.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -23,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -728,6 +730,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QHeaderView::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QHeaderView_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QHeaderView::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__SetSelectionModel = 0; @@ -931,6 +958,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QHeaderView::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QHeaderView_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QHeaderView::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__UpdateEditorData = 0; @@ -2307,6 +2363,14 @@ void QHeaderView_virtualbase_SetSelection(void* self, QRect* rect, int flags) { ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_SetSelection(rect, flags); } +void QHeaderView_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QHeaderView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QHeaderView_override_virtual_SetSelectionModel(void* self, intptr_t slot) { dynamic_cast( (QHeaderView*)(self) )->handle__SetSelectionModel = slot; } @@ -2371,6 +2435,14 @@ void QHeaderView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* paren ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); } +void QHeaderView_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SelectionChanged = slot; +} + +void QHeaderView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QHeaderView_override_virtual_UpdateEditorData(void* self, intptr_t slot) { dynamic_cast( (QHeaderView*)(self) )->handle__UpdateEditorData = slot; } diff --git a/qt/gen_qheaderview.go b/qt/gen_qheaderview.go index 049ce369..2796a96b 100644 --- a/qt/gen_qheaderview.go +++ b/qt/gen_qheaderview.go @@ -1321,6 +1321,34 @@ func miqt_exec_callback_QHeaderView_SetSelection(self *C.QHeaderView, cb C.intpt } +func (this *QHeaderView) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QHeaderView_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QHeaderView_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_VisualRegionForSelection +func miqt_exec_callback_QHeaderView_VisualRegionForSelection(self *C.QHeaderView, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QHeaderView) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { C.QHeaderView_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) @@ -1521,6 +1549,30 @@ func miqt_exec_callback_QHeaderView_RowsAboutToBeRemoved(self *C.QHeaderView, cb } +func (this *QHeaderView) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QHeaderView_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QHeaderView) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QHeaderView_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SelectionChanged +func miqt_exec_callback_QHeaderView_SelectionChanged(self *C.QHeaderView, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QHeaderView{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QHeaderView) callVirtualBase_UpdateEditorData() { C.QHeaderView_virtualbase_UpdateEditorData(unsafe.Pointer(this.h)) diff --git a/qt/gen_qheaderview.h b/qt/gen_qheaderview.h index c697a030..3fb1f54d 100644 --- a/qt/gen_qheaderview.h +++ b/qt/gen_qheaderview.h @@ -28,6 +28,7 @@ class QFocusEvent; class QFrame; class QHeaderView; class QInputMethodEvent; +class QItemSelection; class QItemSelectionModel; class QKeyEvent; class QMetaObject; @@ -39,6 +40,7 @@ class QPaintEvent; class QPainter; class QPoint; class QRect; +class QRegion; class QResizeEvent; class QSize; class QStyleOptionViewItem; @@ -59,6 +61,7 @@ typedef struct QFocusEvent QFocusEvent; typedef struct QFrame QFrame; typedef struct QHeaderView QHeaderView; typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; @@ -70,6 +73,7 @@ typedef struct QPaintEvent QPaintEvent; typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; @@ -194,6 +198,7 @@ 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); +QRegion* QHeaderView_VisualRegionForSelection(const QHeaderView* self, QItemSelection* selection); 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); @@ -252,6 +257,8 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QHeaderView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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); @@ -268,6 +275,8 @@ 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_SelectionChanged(void* self, intptr_t slot); +void QHeaderView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt/gen_qiconengine.cpp b/qt/gen_qiconengine.cpp index 07f5bacb..f8c9d1a6 100644 --- a/qt/gen_qiconengine.cpp +++ b/qt/gen_qiconengine.cpp @@ -14,6 +14,367 @@ #include "gen_qiconengine.h" #include "_cgo_export.h" +class MiqtVirtualQIconEngine : public virtual QIconEngine { +public: + + MiqtVirtualQIconEngine(): QIconEngine() {}; + MiqtVirtualQIconEngine(const QIconEngine& other): QIconEngine(other) {}; + + virtual ~MiqtVirtualQIconEngine() = 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 QRect& rect, QIcon::Mode mode, QIcon::State state) override { + if (handle__Paint == 0) { + return; // Pure virtual, there is no base we can call + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + QIcon::Mode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + QIcon::State state_ret = state; + int sigval4 = static_cast(state_ret); + + miqt_exec_callback_QIconEngine_Paint(this, handle__Paint, sigval1, sigval2, sigval3, sigval4); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActualSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize actualSize(const QSize& size, QIcon::Mode mode, QIcon::State state) override { + if (handle__ActualSize == 0) { + return QIconEngine::actualSize(size, mode, state); + } + + const QSize& size_ret = size; + // Cast returned reference into pointer + QSize* sigval1 = const_cast(&size_ret); + QIcon::Mode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + QIcon::State state_ret = state; + int sigval3 = static_cast(state_ret); + + QSize* callback_return_value = miqt_exec_callback_QIconEngine_ActualSize(this, handle__ActualSize, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ActualSize(QSize* size, int mode, int state) { + + return new QSize(QIconEngine::actualSize(*size, static_cast(mode), static_cast(state))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Pixmap = 0; + + // Subclass to allow providing a Go implementation + virtual QPixmap pixmap(const QSize& size, QIcon::Mode mode, QIcon::State state) override { + if (handle__Pixmap == 0) { + return QIconEngine::pixmap(size, mode, state); + } + + const QSize& size_ret = size; + // Cast returned reference into pointer + QSize* sigval1 = const_cast(&size_ret); + QIcon::Mode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + QIcon::State state_ret = state; + int sigval3 = static_cast(state_ret); + + QPixmap* callback_return_value = miqt_exec_callback_QIconEngine_Pixmap(this, handle__Pixmap, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPixmap* virtualbase_Pixmap(QSize* size, int mode, int state) { + + return new QPixmap(QIconEngine::pixmap(*size, static_cast(mode), static_cast(state))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual void addPixmap(const QPixmap& pixmap, QIcon::Mode mode, QIcon::State state) override { + if (handle__AddPixmap == 0) { + QIconEngine::addPixmap(pixmap, mode, state); + return; + } + + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval1 = const_cast(&pixmap_ret); + QIcon::Mode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + QIcon::State state_ret = state; + int sigval3 = static_cast(state_ret); + + miqt_exec_callback_QIconEngine_AddPixmap(this, handle__AddPixmap, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AddPixmap(QPixmap* pixmap, int mode, int state) { + + QIconEngine::addPixmap(*pixmap, static_cast(mode), static_cast(state)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddFile = 0; + + // Subclass to allow providing a Go implementation + virtual void addFile(const QString& fileName, const QSize& size, QIcon::Mode mode, QIcon::State state) override { + if (handle__AddFile == 0) { + QIconEngine::addFile(fileName, size, mode, state); + return; + } + + const QString fileName_ret = fileName; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray fileName_b = fileName_ret.toUtf8(); + struct miqt_string fileName_ms; + fileName_ms.len = fileName_b.length(); + fileName_ms.data = static_cast(malloc(fileName_ms.len)); + memcpy(fileName_ms.data, fileName_b.data(), fileName_ms.len); + struct miqt_string sigval1 = fileName_ms; + const QSize& size_ret = size; + // Cast returned reference into pointer + QSize* sigval2 = const_cast(&size_ret); + QIcon::Mode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + QIcon::State state_ret = state; + int sigval4 = static_cast(state_ret); + + miqt_exec_callback_QIconEngine_AddFile(this, handle__AddFile, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AddFile(struct miqt_string fileName, QSize* size, int mode, int state) { + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + + QIconEngine::addFile(fileName_QString, *size, static_cast(mode), static_cast(state)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Key = 0; + + // Subclass to allow providing a Go implementation + virtual QString key() const override { + if (handle__Key == 0) { + return QIconEngine::key(); + } + + + struct miqt_string callback_return_value = miqt_exec_callback_QIconEngine_Key(const_cast(this), handle__Key); + 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_Key() const { + + QString _ret = QIconEngine::key(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 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__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QIconEngine* clone() const override { + if (handle__Clone == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + QIconEngine* callback_return_value = miqt_exec_callback_QIconEngine_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Read = 0; + + // Subclass to allow providing a Go implementation + virtual bool read(QDataStream& in) override { + if (handle__Read == 0) { + return QIconEngine::read(in); + } + + QDataStream& in_ret = in; + // Cast returned reference into pointer + QDataStream* sigval1 = &in_ret; + + bool callback_return_value = miqt_exec_callback_QIconEngine_Read(this, handle__Read, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Read(QDataStream* in) { + + return QIconEngine::read(*in); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Write = 0; + + // Subclass to allow providing a Go implementation + virtual bool write(QDataStream& out) const override { + if (handle__Write == 0) { + return QIconEngine::write(out); + } + + QDataStream& out_ret = out; + // Cast returned reference into pointer + QDataStream* sigval1 = &out_ret; + + bool callback_return_value = miqt_exec_callback_QIconEngine_Write(const_cast(this), handle__Write, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Write(QDataStream* out) const { + + return QIconEngine::write(*out); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AvailableSizes = 0; + + // Subclass to allow providing a Go implementation + virtual QList availableSizes(QIcon::Mode mode, QIcon::State state) const override { + if (handle__AvailableSizes == 0) { + return QIconEngine::availableSizes(mode, state); + } + + QIcon::Mode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + QIcon::State state_ret = state; + int sigval2 = static_cast(state_ret); + + struct miqt_array /* of QSize* */ callback_return_value = miqt_exec_callback_QIconEngine_AvailableSizes(const_cast(this), handle__AvailableSizes, sigval1, sigval2); + QList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QSize** 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 QSize* */ virtualbase_AvailableSizes(int mode, int state) const { + + QList _ret = QIconEngine::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; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IconName = 0; + + // Subclass to allow providing a Go implementation + virtual QString iconName() const override { + if (handle__IconName == 0) { + return QIconEngine::iconName(); + } + + + struct miqt_string callback_return_value = miqt_exec_callback_QIconEngine_IconName(const_cast(this), handle__IconName); + 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_IconName() const { + + QString _ret = QIconEngine::iconName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 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__VirtualHook = 0; + + // Subclass to allow providing a Go implementation + virtual void virtual_hook(int id, void* data) override { + if (handle__VirtualHook == 0) { + QIconEngine::virtual_hook(id, data); + return; + } + + int sigval1 = id; + void* sigval2 = data; + + miqt_exec_callback_QIconEngine_VirtualHook(this, handle__VirtualHook, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VirtualHook(int id, void* data) { + + QIconEngine::virtual_hook(static_cast(id), data); + + } + +}; + +void QIconEngine_new(QIconEngine** outptr_QIconEngine) { + MiqtVirtualQIconEngine* ret = new MiqtVirtualQIconEngine(); + *outptr_QIconEngine = ret; +} + +void QIconEngine_new2(QIconEngine* other, QIconEngine** outptr_QIconEngine) { + MiqtVirtualQIconEngine* ret = new MiqtVirtualQIconEngine(*other); + *outptr_QIconEngine = ret; +} + void QIconEngine_Paint(QIconEngine* self, QPainter* painter, QRect* rect, int mode, int state) { self->paint(painter, *rect, static_cast(mode), static_cast(state)); } @@ -94,9 +455,97 @@ void QIconEngine_VirtualHook(QIconEngine* self, int id, void* data) { self->virtual_hook(static_cast(id), data); } +void QIconEngine_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__Paint = slot; +} + +void QIconEngine_override_virtual_ActualSize(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__ActualSize = slot; +} + +QSize* QIconEngine_virtualbase_ActualSize(void* self, QSize* size, int mode, int state) { + return ( (MiqtVirtualQIconEngine*)(self) )->virtualbase_ActualSize(size, mode, state); +} + +void QIconEngine_override_virtual_Pixmap(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__Pixmap = slot; +} + +QPixmap* QIconEngine_virtualbase_Pixmap(void* self, QSize* size, int mode, int state) { + return ( (MiqtVirtualQIconEngine*)(self) )->virtualbase_Pixmap(size, mode, state); +} + +void QIconEngine_override_virtual_AddPixmap(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__AddPixmap = slot; +} + +void QIconEngine_virtualbase_AddPixmap(void* self, QPixmap* pixmap, int mode, int state) { + ( (MiqtVirtualQIconEngine*)(self) )->virtualbase_AddPixmap(pixmap, mode, state); +} + +void QIconEngine_override_virtual_AddFile(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__AddFile = slot; +} + +void QIconEngine_virtualbase_AddFile(void* self, struct miqt_string fileName, QSize* size, int mode, int state) { + ( (MiqtVirtualQIconEngine*)(self) )->virtualbase_AddFile(fileName, size, mode, state); +} + +void QIconEngine_override_virtual_Key(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__Key = slot; +} + +struct miqt_string QIconEngine_virtualbase_Key(const void* self) { + return ( (const MiqtVirtualQIconEngine*)(self) )->virtualbase_Key(); +} + +void QIconEngine_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__Clone = slot; +} + +void QIconEngine_override_virtual_Read(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__Read = slot; +} + +bool QIconEngine_virtualbase_Read(void* self, QDataStream* in) { + return ( (MiqtVirtualQIconEngine*)(self) )->virtualbase_Read(in); +} + +void QIconEngine_override_virtual_Write(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__Write = slot; +} + +bool QIconEngine_virtualbase_Write(const void* self, QDataStream* out) { + return ( (const MiqtVirtualQIconEngine*)(self) )->virtualbase_Write(out); +} + +void QIconEngine_override_virtual_AvailableSizes(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__AvailableSizes = slot; +} + +struct miqt_array /* of QSize* */ QIconEngine_virtualbase_AvailableSizes(const void* self, int mode, int state) { + return ( (const MiqtVirtualQIconEngine*)(self) )->virtualbase_AvailableSizes(mode, state); +} + +void QIconEngine_override_virtual_IconName(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__IconName = slot; +} + +struct miqt_string QIconEngine_virtualbase_IconName(const void* self) { + return ( (const MiqtVirtualQIconEngine*)(self) )->virtualbase_IconName(); +} + +void QIconEngine_override_virtual_VirtualHook(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__VirtualHook = slot; +} + +void QIconEngine_virtualbase_VirtualHook(void* self, int id, void* data) { + ( (MiqtVirtualQIconEngine*)(self) )->virtualbase_VirtualHook(id, data); +} + void QIconEngine_Delete(QIconEngine* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qiconengine.go b/qt/gen_qiconengine.go index c3e7f451..bf084e7f 100644 --- a/qt/gen_qiconengine.go +++ b/qt/gen_qiconengine.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -58,6 +59,26 @@ func UnsafeNewQIconEngine(h unsafe.Pointer) *QIconEngine { return &QIconEngine{h: (*C.QIconEngine)(h)} } +// NewQIconEngine constructs a new QIconEngine object. +func NewQIconEngine() *QIconEngine { + var outptr_QIconEngine *C.QIconEngine = nil + + C.QIconEngine_new(&outptr_QIconEngine) + ret := newQIconEngine(outptr_QIconEngine) + ret.isSubclass = true + return ret +} + +// NewQIconEngine2 constructs a new QIconEngine object. +func NewQIconEngine2(other *QIconEngine) *QIconEngine { + var outptr_QIconEngine *C.QIconEngine = nil + + C.QIconEngine_new2(other.cPointer(), &outptr_QIconEngine) + ret := newQIconEngine(outptr_QIconEngine) + ret.isSubclass = true + return ret +} + func (this *QIconEngine) Paint(painter *QPainter, rect *QRect, mode QIcon__Mode, state QIcon__State) { C.QIconEngine_Paint(this.h, painter.cPointer(), rect.cPointer(), (C.int)(mode), (C.int)(state)) } @@ -141,6 +162,338 @@ func (this *QIconEngine) ScaledPixmap(size *QSize, mode QIcon__Mode, state QIcon func (this *QIconEngine) VirtualHook(id int, data unsafe.Pointer) { C.QIconEngine_VirtualHook(this.h, (C.int)(id), data) } +func (this *QIconEngine) OnPaint(slot func(painter *QPainter, rect *QRect, mode QIcon__Mode, state QIcon__State)) { + C.QIconEngine_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_Paint +func miqt_exec_callback_QIconEngine_Paint(self *C.QIconEngine, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, mode C.int, state C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(painter *QPainter, rect *QRect, mode QIcon__Mode, state QIcon__State)) + 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 := (QIcon__Mode)(mode) + + slotval4 := (QIcon__State)(state) + + gofunc(slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QIconEngine) callVirtualBase_ActualSize(size *QSize, mode QIcon__Mode, state QIcon__State) *QSize { + + _ret := C.QIconEngine_virtualbase_ActualSize(unsafe.Pointer(this.h), size.cPointer(), (C.int)(mode), (C.int)(state)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIconEngine) OnActualSize(slot func(super func(size *QSize, mode QIcon__Mode, state QIcon__State) *QSize, size *QSize, mode QIcon__Mode, state QIcon__State) *QSize) { + C.QIconEngine_override_virtual_ActualSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_ActualSize +func miqt_exec_callback_QIconEngine_ActualSize(self *C.QIconEngine, cb C.intptr_t, size *C.QSize, mode C.int, state C.int) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size *QSize, mode QIcon__Mode, state QIcon__State) *QSize, size *QSize, mode QIcon__Mode, state QIcon__State) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQSize(unsafe.Pointer(size)) + slotval2 := (QIcon__Mode)(mode) + + slotval3 := (QIcon__State)(state) + + virtualReturn := gofunc((&QIconEngine{h: self}).callVirtualBase_ActualSize, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QIconEngine) callVirtualBase_Pixmap(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap { + + _ret := C.QIconEngine_virtualbase_Pixmap(unsafe.Pointer(this.h), size.cPointer(), (C.int)(mode), (C.int)(state)) + _goptr := newQPixmap(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIconEngine) OnPixmap(slot func(super func(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap, size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap) { + C.QIconEngine_override_virtual_Pixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_Pixmap +func miqt_exec_callback_QIconEngine_Pixmap(self *C.QIconEngine, cb C.intptr_t, size *C.QSize, mode C.int, state C.int) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap, size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQSize(unsafe.Pointer(size)) + slotval2 := (QIcon__Mode)(mode) + + slotval3 := (QIcon__State)(state) + + virtualReturn := gofunc((&QIconEngine{h: self}).callVirtualBase_Pixmap, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QIconEngine) callVirtualBase_AddPixmap(pixmap *QPixmap, mode QIcon__Mode, state QIcon__State) { + + C.QIconEngine_virtualbase_AddPixmap(unsafe.Pointer(this.h), pixmap.cPointer(), (C.int)(mode), (C.int)(state)) + +} +func (this *QIconEngine) OnAddPixmap(slot func(super func(pixmap *QPixmap, mode QIcon__Mode, state QIcon__State), pixmap *QPixmap, mode QIcon__Mode, state QIcon__State)) { + C.QIconEngine_override_virtual_AddPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_AddPixmap +func miqt_exec_callback_QIconEngine_AddPixmap(self *C.QIconEngine, cb C.intptr_t, pixmap *C.QPixmap, mode C.int, state C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pixmap *QPixmap, mode QIcon__Mode, state QIcon__State), pixmap *QPixmap, mode QIcon__Mode, state QIcon__State)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + slotval2 := (QIcon__Mode)(mode) + + slotval3 := (QIcon__State)(state) + + gofunc((&QIconEngine{h: self}).callVirtualBase_AddPixmap, slotval1, slotval2, slotval3) + +} + +func (this *QIconEngine) callVirtualBase_AddFile(fileName string, size *QSize, mode QIcon__Mode, state QIcon__State) { + 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)) + + C.QIconEngine_virtualbase_AddFile(unsafe.Pointer(this.h), fileName_ms, size.cPointer(), (C.int)(mode), (C.int)(state)) + +} +func (this *QIconEngine) OnAddFile(slot func(super func(fileName string, size *QSize, mode QIcon__Mode, state QIcon__State), fileName string, size *QSize, mode QIcon__Mode, state QIcon__State)) { + C.QIconEngine_override_virtual_AddFile(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_AddFile +func miqt_exec_callback_QIconEngine_AddFile(self *C.QIconEngine, cb C.intptr_t, fileName C.struct_miqt_string, size *C.QSize, mode C.int, state C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fileName string, size *QSize, mode QIcon__Mode, state QIcon__State), fileName string, size *QSize, mode QIcon__Mode, state QIcon__State)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var fileName_ms C.struct_miqt_string = fileName + fileName_ret := C.GoStringN(fileName_ms.data, C.int(int64(fileName_ms.len))) + C.free(unsafe.Pointer(fileName_ms.data)) + slotval1 := fileName_ret + slotval2 := UnsafeNewQSize(unsafe.Pointer(size)) + slotval3 := (QIcon__Mode)(mode) + + slotval4 := (QIcon__State)(state) + + gofunc((&QIconEngine{h: self}).callVirtualBase_AddFile, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QIconEngine) callVirtualBase_Key() string { + + var _ms C.struct_miqt_string = C.QIconEngine_virtualbase_Key(unsafe.Pointer(this.h)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QIconEngine) OnKey(slot func(super func() string) string) { + C.QIconEngine_override_virtual_Key(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_Key +func miqt_exec_callback_QIconEngine_Key(self *C.QIconEngine, 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((&QIconEngine{h: self}).callVirtualBase_Key) + 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 *QIconEngine) OnClone(slot func() *QIconEngine) { + C.QIconEngine_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_Clone +func miqt_exec_callback_QIconEngine_Clone(self *C.QIconEngine, cb C.intptr_t) *C.QIconEngine { + gofunc, ok := cgo.Handle(cb).Value().(func() *QIconEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} + +func (this *QIconEngine) callVirtualBase_Read(in *QDataStream) bool { + + return (bool)(C.QIconEngine_virtualbase_Read(unsafe.Pointer(this.h), in.cPointer())) + +} +func (this *QIconEngine) OnRead(slot func(super func(in *QDataStream) bool, in *QDataStream) bool) { + C.QIconEngine_override_virtual_Read(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_Read +func miqt_exec_callback_QIconEngine_Read(self *C.QIconEngine, cb C.intptr_t, in *C.QDataStream) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(in *QDataStream) bool, in *QDataStream) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(in)) + + virtualReturn := gofunc((&QIconEngine{h: self}).callVirtualBase_Read, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIconEngine) callVirtualBase_Write(out *QDataStream) bool { + + return (bool)(C.QIconEngine_virtualbase_Write(unsafe.Pointer(this.h), out.cPointer())) + +} +func (this *QIconEngine) OnWrite(slot func(super func(out *QDataStream) bool, out *QDataStream) bool) { + C.QIconEngine_override_virtual_Write(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_Write +func miqt_exec_callback_QIconEngine_Write(self *C.QIconEngine, cb C.intptr_t, out *C.QDataStream) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(out *QDataStream) bool, out *QDataStream) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(out)) + + virtualReturn := gofunc((&QIconEngine{h: self}).callVirtualBase_Write, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIconEngine) callVirtualBase_AvailableSizes(mode QIcon__Mode, state QIcon__State) []QSize { + + var _ma C.struct_miqt_array = C.QIconEngine_virtualbase_AvailableSizes(unsafe.Pointer(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 + +} +func (this *QIconEngine) OnAvailableSizes(slot func(super func(mode QIcon__Mode, state QIcon__State) []QSize, mode QIcon__Mode, state QIcon__State) []QSize) { + C.QIconEngine_override_virtual_AvailableSizes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_AvailableSizes +func miqt_exec_callback_QIconEngine_AvailableSizes(self *C.QIconEngine, cb C.intptr_t, mode C.int, state C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode QIcon__Mode, state QIcon__State) []QSize, mode QIcon__Mode, state QIcon__State) []QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QIcon__Mode)(mode) + + slotval2 := (QIcon__State)(state) + + virtualReturn := gofunc((&QIconEngine{h: self}).callVirtualBase_AvailableSizes, slotval1, slotval2) + virtualReturn_CArray := (*[0xffff]*C.QSize)(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 *QIconEngine) callVirtualBase_IconName() string { + + var _ms C.struct_miqt_string = C.QIconEngine_virtualbase_IconName(unsafe.Pointer(this.h)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QIconEngine) OnIconName(slot func(super func() string) string) { + C.QIconEngine_override_virtual_IconName(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_IconName +func miqt_exec_callback_QIconEngine_IconName(self *C.QIconEngine, 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((&QIconEngine{h: self}).callVirtualBase_IconName) + 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 *QIconEngine) callVirtualBase_VirtualHook(id int, data unsafe.Pointer) { + + C.QIconEngine_virtualbase_VirtualHook(unsafe.Pointer(this.h), (C.int)(id), data) + +} +func (this *QIconEngine) OnVirtualHook(slot func(super func(id int, data unsafe.Pointer), id int, data unsafe.Pointer)) { + C.QIconEngine_override_virtual_VirtualHook(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_VirtualHook +func miqt_exec_callback_QIconEngine_VirtualHook(self *C.QIconEngine, cb C.intptr_t, id C.int, data unsafe.Pointer) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(id int, data unsafe.Pointer), id int, data unsafe.Pointer)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(id) + + slotval2 := (unsafe.Pointer)(data) + + gofunc((&QIconEngine{h: self}).callVirtualBase_VirtualHook, slotval1, slotval2) + +} // Delete this object from C++ memory. func (this *QIconEngine) Delete() { diff --git a/qt/gen_qiconengine.h b/qt/gen_qiconengine.h index f5a20038..00275ecd 100644 --- a/qt/gen_qiconengine.h +++ b/qt/gen_qiconengine.h @@ -42,6 +42,8 @@ typedef struct QRect QRect; typedef struct QSize QSize; #endif +void QIconEngine_new(QIconEngine** outptr_QIconEngine); +void QIconEngine_new2(QIconEngine* other, QIconEngine** outptr_QIconEngine); void QIconEngine_Paint(QIconEngine* self, QPainter* painter, QRect* rect, int mode, int state); QSize* QIconEngine_ActualSize(QIconEngine* self, QSize* size, int mode, int state); QPixmap* QIconEngine_Pixmap(QIconEngine* self, QSize* size, int mode, int state); @@ -56,6 +58,30 @@ 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); +void QIconEngine_override_virtual_Paint(void* self, intptr_t slot); +void QIconEngine_virtualbase_Paint(void* self, QPainter* painter, QRect* rect, int mode, int state); +void QIconEngine_override_virtual_ActualSize(void* self, intptr_t slot); +QSize* QIconEngine_virtualbase_ActualSize(void* self, QSize* size, int mode, int state); +void QIconEngine_override_virtual_Pixmap(void* self, intptr_t slot); +QPixmap* QIconEngine_virtualbase_Pixmap(void* self, QSize* size, int mode, int state); +void QIconEngine_override_virtual_AddPixmap(void* self, intptr_t slot); +void QIconEngine_virtualbase_AddPixmap(void* self, QPixmap* pixmap, int mode, int state); +void QIconEngine_override_virtual_AddFile(void* self, intptr_t slot); +void QIconEngine_virtualbase_AddFile(void* self, struct miqt_string fileName, QSize* size, int mode, int state); +void QIconEngine_override_virtual_Key(void* self, intptr_t slot); +struct miqt_string QIconEngine_virtualbase_Key(const void* self); +void QIconEngine_override_virtual_Clone(void* self, intptr_t slot); +QIconEngine* QIconEngine_virtualbase_Clone(const void* self); +void QIconEngine_override_virtual_Read(void* self, intptr_t slot); +bool QIconEngine_virtualbase_Read(void* self, QDataStream* in); +void QIconEngine_override_virtual_Write(void* self, intptr_t slot); +bool QIconEngine_virtualbase_Write(const void* self, QDataStream* out); +void QIconEngine_override_virtual_AvailableSizes(void* self, intptr_t slot); +struct miqt_array /* of QSize* */ QIconEngine_virtualbase_AvailableSizes(const void* self, int mode, int state); +void QIconEngine_override_virtual_IconName(void* self, intptr_t slot); +struct miqt_string QIconEngine_virtualbase_IconName(const void* self); +void QIconEngine_override_virtual_VirtualHook(void* self, intptr_t slot); +void QIconEngine_virtualbase_VirtualHook(void* self, int id, void* data); void QIconEngine_Delete(QIconEngine* self, bool isSubclass); void QIconEngine__AvailableSizesArgument_new(QIconEngine__AvailableSizesArgument* param1, QIconEngine__AvailableSizesArgument** outptr_QIconEngine__AvailableSizesArgument); diff --git a/qt/gen_qiconengineplugin.cpp b/qt/gen_qiconengineplugin.cpp index ef721842..472cb58d 100644 --- a/qt/gen_qiconengineplugin.cpp +++ b/qt/gen_qiconengineplugin.cpp @@ -1,14 +1,234 @@ +#include +#include #include #include +#include #include #include #include #include #include +#include #include #include "gen_qiconengineplugin.h" #include "_cgo_export.h" +class MiqtVirtualQIconEnginePlugin : public virtual QIconEnginePlugin { +public: + + MiqtVirtualQIconEnginePlugin(): QIconEnginePlugin() {}; + MiqtVirtualQIconEnginePlugin(QObject* parent): QIconEnginePlugin(parent) {}; + + virtual ~MiqtVirtualQIconEnginePlugin() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Create = 0; + + // Subclass to allow providing a Go implementation + virtual QIconEngine* create(const QString& filename) override { + if (handle__Create == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + const QString filename_ret = filename; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray filename_b = filename_ret.toUtf8(); + struct miqt_string filename_ms; + filename_ms.len = filename_b.length(); + filename_ms.data = static_cast(malloc(filename_ms.len)); + memcpy(filename_ms.data, filename_b.data(), filename_ms.len); + struct miqt_string sigval1 = filename_ms; + + QIconEngine* callback_return_value = miqt_exec_callback_QIconEnginePlugin_Create(this, handle__Create, sigval1); + + return callback_return_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 QIconEnginePlugin::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QIconEnginePlugin_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QIconEnginePlugin::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 QIconEnginePlugin::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QIconEnginePlugin_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QIconEnginePlugin::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) { + QIconEnginePlugin::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QIconEnginePlugin_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QIconEnginePlugin::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) { + QIconEnginePlugin::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QIconEnginePlugin_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QIconEnginePlugin::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) { + QIconEnginePlugin::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QIconEnginePlugin_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QIconEnginePlugin::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) { + QIconEnginePlugin::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QIconEnginePlugin_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QIconEnginePlugin::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) { + QIconEnginePlugin::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QIconEnginePlugin_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QIconEnginePlugin::disconnectNotify(*signal); + + } + +}; + +void QIconEnginePlugin_new(QIconEnginePlugin** outptr_QIconEnginePlugin, QObject** outptr_QObject) { + MiqtVirtualQIconEnginePlugin* ret = new MiqtVirtualQIconEnginePlugin(); + *outptr_QIconEnginePlugin = ret; + *outptr_QObject = static_cast(ret); +} + +void QIconEnginePlugin_new2(QObject* parent, QIconEnginePlugin** outptr_QIconEnginePlugin, QObject** outptr_QObject) { + MiqtVirtualQIconEnginePlugin* ret = new MiqtVirtualQIconEnginePlugin(parent); + *outptr_QIconEnginePlugin = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QIconEnginePlugin_MetaObject(const QIconEnginePlugin* self) { return (QMetaObject*) self->metaObject(); } @@ -88,9 +308,69 @@ struct miqt_string QIconEnginePlugin_TrUtf83(const char* s, const char* c, int n return _ms; } +void QIconEnginePlugin_override_virtual_Create(void* self, intptr_t slot) { + dynamic_cast( (QIconEnginePlugin*)(self) )->handle__Create = slot; +} + +void QIconEnginePlugin_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QIconEnginePlugin*)(self) )->handle__Event = slot; +} + +bool QIconEnginePlugin_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQIconEnginePlugin*)(self) )->virtualbase_Event(event); +} + +void QIconEnginePlugin_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QIconEnginePlugin*)(self) )->handle__EventFilter = slot; +} + +bool QIconEnginePlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQIconEnginePlugin*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QIconEnginePlugin_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QIconEnginePlugin*)(self) )->handle__TimerEvent = slot; +} + +void QIconEnginePlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQIconEnginePlugin*)(self) )->virtualbase_TimerEvent(event); +} + +void QIconEnginePlugin_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QIconEnginePlugin*)(self) )->handle__ChildEvent = slot; +} + +void QIconEnginePlugin_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQIconEnginePlugin*)(self) )->virtualbase_ChildEvent(event); +} + +void QIconEnginePlugin_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QIconEnginePlugin*)(self) )->handle__CustomEvent = slot; +} + +void QIconEnginePlugin_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQIconEnginePlugin*)(self) )->virtualbase_CustomEvent(event); +} + +void QIconEnginePlugin_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QIconEnginePlugin*)(self) )->handle__ConnectNotify = slot; +} + +void QIconEnginePlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQIconEnginePlugin*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QIconEnginePlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QIconEnginePlugin*)(self) )->handle__DisconnectNotify = slot; +} + +void QIconEnginePlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQIconEnginePlugin*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QIconEnginePlugin_Delete(QIconEnginePlugin* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qiconengineplugin.go b/qt/gen_qiconengineplugin.go index b18469a2..03aff1eb 100644 --- a/qt/gen_qiconengineplugin.go +++ b/qt/gen_qiconengineplugin.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,28 @@ func UnsafeNewQIconEnginePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QIc QObject: UnsafeNewQObject(h_QObject)} } +// NewQIconEnginePlugin constructs a new QIconEnginePlugin object. +func NewQIconEnginePlugin() *QIconEnginePlugin { + var outptr_QIconEnginePlugin *C.QIconEnginePlugin = nil + var outptr_QObject *C.QObject = nil + + C.QIconEnginePlugin_new(&outptr_QIconEnginePlugin, &outptr_QObject) + ret := newQIconEnginePlugin(outptr_QIconEnginePlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQIconEnginePlugin2 constructs a new QIconEnginePlugin object. +func NewQIconEnginePlugin2(parent *QObject) *QIconEnginePlugin { + var outptr_QIconEnginePlugin *C.QIconEnginePlugin = nil + var outptr_QObject *C.QObject = nil + + C.QIconEnginePlugin_new2(parent.cPointer(), &outptr_QIconEnginePlugin, &outptr_QObject) + ret := newQIconEnginePlugin(outptr_QIconEnginePlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QIconEnginePlugin) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QIconEnginePlugin_MetaObject(this.h))) } @@ -131,6 +154,194 @@ func QIconEnginePlugin_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QIconEnginePlugin) OnCreate(slot func(filename string) *QIconEngine) { + C.QIconEnginePlugin_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEnginePlugin_Create +func miqt_exec_callback_QIconEnginePlugin_Create(self *C.QIconEnginePlugin, cb C.intptr_t, filename C.struct_miqt_string) *C.QIconEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(filename string) *QIconEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var filename_ms C.struct_miqt_string = filename + filename_ret := C.GoStringN(filename_ms.data, C.int(int64(filename_ms.len))) + C.free(unsafe.Pointer(filename_ms.data)) + slotval1 := filename_ret + + virtualReturn := gofunc(slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QIconEnginePlugin) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QIconEnginePlugin_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QIconEnginePlugin) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QIconEnginePlugin_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEnginePlugin_Event +func miqt_exec_callback_QIconEnginePlugin_Event(self *C.QIconEnginePlugin, 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((&QIconEnginePlugin{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIconEnginePlugin) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QIconEnginePlugin_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QIconEnginePlugin) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QIconEnginePlugin_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEnginePlugin_EventFilter +func miqt_exec_callback_QIconEnginePlugin_EventFilter(self *C.QIconEnginePlugin, 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((&QIconEnginePlugin{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QIconEnginePlugin) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QIconEnginePlugin_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QIconEnginePlugin) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QIconEnginePlugin_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEnginePlugin_TimerEvent +func miqt_exec_callback_QIconEnginePlugin_TimerEvent(self *C.QIconEnginePlugin, 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((&QIconEnginePlugin{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QIconEnginePlugin) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QIconEnginePlugin_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QIconEnginePlugin) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QIconEnginePlugin_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEnginePlugin_ChildEvent +func miqt_exec_callback_QIconEnginePlugin_ChildEvent(self *C.QIconEnginePlugin, 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((&QIconEnginePlugin{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QIconEnginePlugin) callVirtualBase_CustomEvent(event *QEvent) { + + C.QIconEnginePlugin_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QIconEnginePlugin) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QIconEnginePlugin_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEnginePlugin_CustomEvent +func miqt_exec_callback_QIconEnginePlugin_CustomEvent(self *C.QIconEnginePlugin, 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((&QIconEnginePlugin{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QIconEnginePlugin) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QIconEnginePlugin_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QIconEnginePlugin) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QIconEnginePlugin_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEnginePlugin_ConnectNotify +func miqt_exec_callback_QIconEnginePlugin_ConnectNotify(self *C.QIconEnginePlugin, 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((&QIconEnginePlugin{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QIconEnginePlugin) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QIconEnginePlugin_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QIconEnginePlugin) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QIconEnginePlugin_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEnginePlugin_DisconnectNotify +func miqt_exec_callback_QIconEnginePlugin_DisconnectNotify(self *C.QIconEnginePlugin, 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((&QIconEnginePlugin{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QIconEnginePlugin) Delete() { diff --git a/qt/gen_qiconengineplugin.h b/qt/gen_qiconengineplugin.h index d9895e6f..3c7b33b6 100644 --- a/qt/gen_qiconengineplugin.h +++ b/qt/gen_qiconengineplugin.h @@ -15,17 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QIconEngine; class QIconEnginePlugin; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIconEngine QIconEngine; typedef struct QIconEnginePlugin QIconEnginePlugin; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif +void QIconEnginePlugin_new(QIconEnginePlugin** outptr_QIconEnginePlugin, QObject** outptr_QObject); +void QIconEnginePlugin_new2(QObject* parent, QIconEnginePlugin** outptr_QIconEnginePlugin, QObject** outptr_QObject); QMetaObject* QIconEnginePlugin_MetaObject(const QIconEnginePlugin* self); void* QIconEnginePlugin_Metacast(QIconEnginePlugin* self, const char* param1); struct miqt_string QIconEnginePlugin_Tr(const char* s); @@ -35,6 +45,22 @@ 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); +void QIconEnginePlugin_override_virtual_Create(void* self, intptr_t slot); +QIconEngine* QIconEnginePlugin_virtualbase_Create(void* self, struct miqt_string filename); +void QIconEnginePlugin_override_virtual_Event(void* self, intptr_t slot); +bool QIconEnginePlugin_virtualbase_Event(void* self, QEvent* event); +void QIconEnginePlugin_override_virtual_EventFilter(void* self, intptr_t slot); +bool QIconEnginePlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QIconEnginePlugin_override_virtual_TimerEvent(void* self, intptr_t slot); +void QIconEnginePlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QIconEnginePlugin_override_virtual_ChildEvent(void* self, intptr_t slot); +void QIconEnginePlugin_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QIconEnginePlugin_override_virtual_CustomEvent(void* self, intptr_t slot); +void QIconEnginePlugin_virtualbase_CustomEvent(void* self, QEvent* event); +void QIconEnginePlugin_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QIconEnginePlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QIconEnginePlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QIconEnginePlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QIconEnginePlugin_Delete(QIconEnginePlugin* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qidentityproxymodel.cpp b/qt/gen_qidentityproxymodel.cpp index cbb557c0..4a1b7b9d 100644 --- a/qt/gen_qidentityproxymodel.cpp +++ b/qt/gen_qidentityproxymodel.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -259,6 +260,56 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__MapSelectionFromSource = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelection mapSelectionFromSource(const QItemSelection& selection) const override { + if (handle__MapSelectionFromSource == 0) { + return QIdentityProxyModel::mapSelectionFromSource(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QItemSelection* callback_return_value = miqt_exec_callback_QIdentityProxyModel_MapSelectionFromSource(const_cast(this), handle__MapSelectionFromSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QItemSelection* virtualbase_MapSelectionFromSource(QItemSelection* selection) const { + + return new QItemSelection(QIdentityProxyModel::mapSelectionFromSource(*selection)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapSelectionToSource = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelection mapSelectionToSource(const QItemSelection& selection) const override { + if (handle__MapSelectionToSource == 0) { + return QIdentityProxyModel::mapSelectionToSource(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QItemSelection* callback_return_value = miqt_exec_callback_QIdentityProxyModel_MapSelectionToSource(const_cast(this), handle__MapSelectionToSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QItemSelection* virtualbase_MapSelectionToSource(QItemSelection* selection) const { + + return new QItemSelection(QIdentityProxyModel::mapSelectionToSource(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__Match = 0; @@ -1141,6 +1192,14 @@ QModelIndex* QIdentityProxyModel_Sibling(const QIdentityProxyModel* self, int ro return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); } +QItemSelection* QIdentityProxyModel_MapSelectionFromSource(const QIdentityProxyModel* self, QItemSelection* selection) { + return new QItemSelection(self->mapSelectionFromSource(*selection)); +} + +QItemSelection* QIdentityProxyModel_MapSelectionToSource(const QIdentityProxyModel* self, QItemSelection* selection) { + return new QItemSelection(self->mapSelectionToSource(*selection)); +} + 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 @@ -1298,6 +1357,22 @@ QModelIndex* QIdentityProxyModel_virtualbase_Sibling(const void* self, int row, return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Sibling(row, column, idx); } +void QIdentityProxyModel_override_virtual_MapSelectionFromSource(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__MapSelectionFromSource = slot; +} + +QItemSelection* QIdentityProxyModel_virtualbase_MapSelectionFromSource(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_MapSelectionFromSource(selection); +} + +void QIdentityProxyModel_override_virtual_MapSelectionToSource(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__MapSelectionToSource = slot; +} + +QItemSelection* QIdentityProxyModel_virtualbase_MapSelectionToSource(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_MapSelectionToSource(selection); +} + void QIdentityProxyModel_override_virtual_Match(void* self, intptr_t slot) { dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Match = slot; } diff --git a/qt/gen_qidentityproxymodel.go b/qt/gen_qidentityproxymodel.go index de909b10..b5c3dd04 100644 --- a/qt/gen_qidentityproxymodel.go +++ b/qt/gen_qidentityproxymodel.go @@ -161,6 +161,20 @@ func (this *QIdentityProxyModel) Sibling(row int, column int, idx *QModelIndex) return _goptr } +func (this *QIdentityProxyModel) MapSelectionFromSource(selection *QItemSelection) *QItemSelection { + _ret := C.QIdentityProxyModel_MapSelectionFromSource(this.h, selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QIdentityProxyModel) MapSelectionToSource(selection *QItemSelection) *QItemSelection { + _ret := C.QIdentityProxyModel_MapSelectionToSource(this.h, selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + 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)) @@ -508,6 +522,62 @@ func miqt_exec_callback_QIdentityProxyModel_Sibling(self *C.QIdentityProxyModel, } +func (this *QIdentityProxyModel) callVirtualBase_MapSelectionFromSource(selection *QItemSelection) *QItemSelection { + + _ret := C.QIdentityProxyModel_virtualbase_MapSelectionFromSource(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnMapSelectionFromSource(slot func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) { + C.QIdentityProxyModel_override_virtual_MapSelectionFromSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_MapSelectionFromSource +func miqt_exec_callback_QIdentityProxyModel_MapSelectionFromSource(self *C.QIdentityProxyModel, cb C.intptr_t, selection *C.QItemSelection) *C.QItemSelection { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_MapSelectionFromSource, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_MapSelectionToSource(selection *QItemSelection) *QItemSelection { + + _ret := C.QIdentityProxyModel_virtualbase_MapSelectionToSource(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnMapSelectionToSource(slot func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) { + C.QIdentityProxyModel_override_virtual_MapSelectionToSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_MapSelectionToSource +func miqt_exec_callback_QIdentityProxyModel_MapSelectionToSource(self *C.QIdentityProxyModel, cb C.intptr_t, selection *C.QItemSelection) *C.QItemSelection { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_MapSelectionToSource, slotval1) + + 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)) diff --git a/qt/gen_qidentityproxymodel.h b/qt/gen_qidentityproxymodel.h index cf8625ac..e3b21dbc 100644 --- a/qt/gen_qidentityproxymodel.h +++ b/qt/gen_qidentityproxymodel.h @@ -18,6 +18,7 @@ extern "C" { class QAbstractItemModel; class QAbstractProxyModel; class QIdentityProxyModel; +class QItemSelection; class QMetaObject; class QMimeData; class QModelIndex; @@ -28,6 +29,7 @@ class QVariant; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractProxyModel QAbstractProxyModel; typedef struct QIdentityProxyModel QIdentityProxyModel; +typedef struct QItemSelection QItemSelection; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; @@ -51,6 +53,8 @@ int QIdentityProxyModel_RowCount(const QIdentityProxyModel* self, QModelIndex* p 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); +QItemSelection* QIdentityProxyModel_MapSelectionFromSource(const QIdentityProxyModel* self, QItemSelection* selection); +QItemSelection* QIdentityProxyModel_MapSelectionToSource(const QIdentityProxyModel* self, QItemSelection* selection); 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, QModelIndex* parent); @@ -81,6 +85,10 @@ 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_MapSelectionFromSource(void* self, intptr_t slot); +QItemSelection* QIdentityProxyModel_virtualbase_MapSelectionFromSource(const void* self, QItemSelection* selection); +void QIdentityProxyModel_override_virtual_MapSelectionToSource(void* self, intptr_t slot); +QItemSelection* QIdentityProxyModel_virtualbase_MapSelectionToSource(const void* self, QItemSelection* selection); 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); diff --git a/qt/gen_qimageiohandler.cpp b/qt/gen_qimageiohandler.cpp index 8e8029fa..eafd4a80 100644 --- a/qt/gen_qimageiohandler.cpp +++ b/qt/gen_qimageiohandler.cpp @@ -1,19 +1,352 @@ #include +#include +#include #include #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include "gen_qimageiohandler.h" #include "_cgo_export.h" +class MiqtVirtualQImageIOHandler : public virtual QImageIOHandler { +public: + + MiqtVirtualQImageIOHandler(): QImageIOHandler() {}; + + virtual ~MiqtVirtualQImageIOHandler() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Name = 0; + + // Subclass to allow providing a Go implementation + virtual QByteArray name() const override { + if (handle__Name == 0) { + return QImageIOHandler::name(); + } + + + struct miqt_string callback_return_value = miqt_exec_callback_QImageIOHandler_Name(const_cast(this), handle__Name); + 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_Name() const { + + QByteArray _qb = QImageIOHandler::name(); + 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__CanRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool canRead() const override { + if (handle__CanRead == 0) { + return false; // Pure virtual, there is no base we can call + } + + + bool callback_return_value = miqt_exec_callback_QImageIOHandler_CanRead(const_cast(this), handle__CanRead); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Read = 0; + + // Subclass to allow providing a Go implementation + virtual bool read(QImage* image) override { + if (handle__Read == 0) { + return false; // Pure virtual, there is no base we can call + } + + QImage* sigval1 = image; + + bool callback_return_value = miqt_exec_callback_QImageIOHandler_Read(this, handle__Read, sigval1); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Write = 0; + + // Subclass to allow providing a Go implementation + virtual bool write(const QImage& image) override { + if (handle__Write == 0) { + return QImageIOHandler::write(image); + } + + const QImage& image_ret = image; + // Cast returned reference into pointer + QImage* sigval1 = const_cast(&image_ret); + + bool callback_return_value = miqt_exec_callback_QImageIOHandler_Write(this, handle__Write, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Write(QImage* image) { + + return QImageIOHandler::write(*image); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Option = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant option(QImageIOHandler::ImageOption option) const override { + if (handle__Option == 0) { + return QImageIOHandler::option(option); + } + + QImageIOHandler::ImageOption option_ret = option; + int sigval1 = static_cast(option_ret); + + QVariant* callback_return_value = miqt_exec_callback_QImageIOHandler_Option(const_cast(this), handle__Option, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Option(int option) const { + + return new QVariant(QImageIOHandler::option(static_cast(option))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetOption = 0; + + // Subclass to allow providing a Go implementation + virtual void setOption(QImageIOHandler::ImageOption option, const QVariant& value) override { + if (handle__SetOption == 0) { + QImageIOHandler::setOption(option, value); + return; + } + + QImageIOHandler::ImageOption 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_QImageIOHandler_SetOption(this, handle__SetOption, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetOption(int option, QVariant* value) { + + QImageIOHandler::setOption(static_cast(option), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsOption = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsOption(QImageIOHandler::ImageOption option) const override { + if (handle__SupportsOption == 0) { + return QImageIOHandler::supportsOption(option); + } + + QImageIOHandler::ImageOption option_ret = option; + int sigval1 = static_cast(option_ret); + + bool callback_return_value = miqt_exec_callback_QImageIOHandler_SupportsOption(const_cast(this), handle__SupportsOption, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsOption(int option) const { + + return QImageIOHandler::supportsOption(static_cast(option)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__JumpToNextImage = 0; + + // Subclass to allow providing a Go implementation + virtual bool jumpToNextImage() override { + if (handle__JumpToNextImage == 0) { + return QImageIOHandler::jumpToNextImage(); + } + + + bool callback_return_value = miqt_exec_callback_QImageIOHandler_JumpToNextImage(this, handle__JumpToNextImage); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_JumpToNextImage() { + + return QImageIOHandler::jumpToNextImage(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__JumpToImage = 0; + + // Subclass to allow providing a Go implementation + virtual bool jumpToImage(int imageNumber) override { + if (handle__JumpToImage == 0) { + return QImageIOHandler::jumpToImage(imageNumber); + } + + int sigval1 = imageNumber; + + bool callback_return_value = miqt_exec_callback_QImageIOHandler_JumpToImage(this, handle__JumpToImage, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_JumpToImage(int imageNumber) { + + return QImageIOHandler::jumpToImage(static_cast(imageNumber)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LoopCount = 0; + + // Subclass to allow providing a Go implementation + virtual int loopCount() const override { + if (handle__LoopCount == 0) { + return QImageIOHandler::loopCount(); + } + + + int callback_return_value = miqt_exec_callback_QImageIOHandler_LoopCount(const_cast(this), handle__LoopCount); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LoopCount() const { + + return QImageIOHandler::loopCount(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ImageCount = 0; + + // Subclass to allow providing a Go implementation + virtual int imageCount() const override { + if (handle__ImageCount == 0) { + return QImageIOHandler::imageCount(); + } + + + int callback_return_value = miqt_exec_callback_QImageIOHandler_ImageCount(const_cast(this), handle__ImageCount); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ImageCount() const { + + return QImageIOHandler::imageCount(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextImageDelay = 0; + + // Subclass to allow providing a Go implementation + virtual int nextImageDelay() const override { + if (handle__NextImageDelay == 0) { + return QImageIOHandler::nextImageDelay(); + } + + + int callback_return_value = miqt_exec_callback_QImageIOHandler_NextImageDelay(const_cast(this), handle__NextImageDelay); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_NextImageDelay() const { + + return QImageIOHandler::nextImageDelay(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentImageNumber = 0; + + // Subclass to allow providing a Go implementation + virtual int currentImageNumber() const override { + if (handle__CurrentImageNumber == 0) { + return QImageIOHandler::currentImageNumber(); + } + + + int callback_return_value = miqt_exec_callback_QImageIOHandler_CurrentImageNumber(const_cast(this), handle__CurrentImageNumber); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_CurrentImageNumber() const { + + return QImageIOHandler::currentImageNumber(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentImageRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect currentImageRect() const override { + if (handle__CurrentImageRect == 0) { + return QImageIOHandler::currentImageRect(); + } + + + QRect* callback_return_value = miqt_exec_callback_QImageIOHandler_CurrentImageRect(const_cast(this), handle__CurrentImageRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_CurrentImageRect() const { + + return new QRect(QImageIOHandler::currentImageRect()); + + } + +}; + +void QImageIOHandler_new(QImageIOHandler** outptr_QImageIOHandler) { + MiqtVirtualQImageIOHandler* ret = new MiqtVirtualQImageIOHandler(); + *outptr_QImageIOHandler = ret; +} + void QImageIOHandler_SetDevice(QImageIOHandler* self, QIODevice* device) { self->setDevice(device); } @@ -102,14 +435,355 @@ QRect* QImageIOHandler_CurrentImageRect(const QImageIOHandler* self) { return new QRect(self->currentImageRect()); } +void QImageIOHandler_override_virtual_Name(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__Name = slot; +} + +struct miqt_string QImageIOHandler_virtualbase_Name(const void* self) { + return ( (const MiqtVirtualQImageIOHandler*)(self) )->virtualbase_Name(); +} + +void QImageIOHandler_override_virtual_CanRead(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__CanRead = slot; +} + +void QImageIOHandler_override_virtual_Read(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__Read = slot; +} + +void QImageIOHandler_override_virtual_Write(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__Write = slot; +} + +bool QImageIOHandler_virtualbase_Write(void* self, QImage* image) { + return ( (MiqtVirtualQImageIOHandler*)(self) )->virtualbase_Write(image); +} + +void QImageIOHandler_override_virtual_Option(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__Option = slot; +} + +QVariant* QImageIOHandler_virtualbase_Option(const void* self, int option) { + return ( (const MiqtVirtualQImageIOHandler*)(self) )->virtualbase_Option(option); +} + +void QImageIOHandler_override_virtual_SetOption(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__SetOption = slot; +} + +void QImageIOHandler_virtualbase_SetOption(void* self, int option, QVariant* value) { + ( (MiqtVirtualQImageIOHandler*)(self) )->virtualbase_SetOption(option, value); +} + +void QImageIOHandler_override_virtual_SupportsOption(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__SupportsOption = slot; +} + +bool QImageIOHandler_virtualbase_SupportsOption(const void* self, int option) { + return ( (const MiqtVirtualQImageIOHandler*)(self) )->virtualbase_SupportsOption(option); +} + +void QImageIOHandler_override_virtual_JumpToNextImage(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__JumpToNextImage = slot; +} + +bool QImageIOHandler_virtualbase_JumpToNextImage(void* self) { + return ( (MiqtVirtualQImageIOHandler*)(self) )->virtualbase_JumpToNextImage(); +} + +void QImageIOHandler_override_virtual_JumpToImage(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__JumpToImage = slot; +} + +bool QImageIOHandler_virtualbase_JumpToImage(void* self, int imageNumber) { + return ( (MiqtVirtualQImageIOHandler*)(self) )->virtualbase_JumpToImage(imageNumber); +} + +void QImageIOHandler_override_virtual_LoopCount(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__LoopCount = slot; +} + +int QImageIOHandler_virtualbase_LoopCount(const void* self) { + return ( (const MiqtVirtualQImageIOHandler*)(self) )->virtualbase_LoopCount(); +} + +void QImageIOHandler_override_virtual_ImageCount(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__ImageCount = slot; +} + +int QImageIOHandler_virtualbase_ImageCount(const void* self) { + return ( (const MiqtVirtualQImageIOHandler*)(self) )->virtualbase_ImageCount(); +} + +void QImageIOHandler_override_virtual_NextImageDelay(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__NextImageDelay = slot; +} + +int QImageIOHandler_virtualbase_NextImageDelay(const void* self) { + return ( (const MiqtVirtualQImageIOHandler*)(self) )->virtualbase_NextImageDelay(); +} + +void QImageIOHandler_override_virtual_CurrentImageNumber(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__CurrentImageNumber = slot; +} + +int QImageIOHandler_virtualbase_CurrentImageNumber(const void* self) { + return ( (const MiqtVirtualQImageIOHandler*)(self) )->virtualbase_CurrentImageNumber(); +} + +void QImageIOHandler_override_virtual_CurrentImageRect(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__CurrentImageRect = slot; +} + +QRect* QImageIOHandler_virtualbase_CurrentImageRect(const void* self) { + return ( (const MiqtVirtualQImageIOHandler*)(self) )->virtualbase_CurrentImageRect(); +} + void QImageIOHandler_Delete(QImageIOHandler* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } } +class MiqtVirtualQImageIOPlugin : public virtual QImageIOPlugin { +public: + + MiqtVirtualQImageIOPlugin(): QImageIOPlugin() {}; + MiqtVirtualQImageIOPlugin(QObject* parent): QImageIOPlugin(parent) {}; + + virtual ~MiqtVirtualQImageIOPlugin() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Capabilities = 0; + + // Subclass to allow providing a Go implementation + virtual QImageIOPlugin::Capabilities capabilities(QIODevice* device, const QByteArray& format) const override { + if (handle__Capabilities == 0) { + return QImageIOPlugin::Capabilities(); // Pure virtual, there is no base we can call + } + + QIODevice* sigval1 = device; + const QByteArray format_qb = format; + struct miqt_string format_ms; + format_ms.len = format_qb.length(); + format_ms.data = static_cast(malloc(format_ms.len)); + memcpy(format_ms.data, format_qb.data(), format_ms.len); + struct miqt_string sigval2 = format_ms; + + int callback_return_value = miqt_exec_callback_QImageIOPlugin_Capabilities(const_cast(this), handle__Capabilities, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Create = 0; + + // Subclass to allow providing a Go implementation + virtual QImageIOHandler* create(QIODevice* device, const QByteArray& format) const override { + if (handle__Create == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + QIODevice* sigval1 = device; + const QByteArray format_qb = format; + struct miqt_string format_ms; + format_ms.len = format_qb.length(); + format_ms.data = static_cast(malloc(format_ms.len)); + memcpy(format_ms.data, format_qb.data(), format_ms.len); + struct miqt_string sigval2 = format_ms; + + QImageIOHandler* callback_return_value = miqt_exec_callback_QImageIOPlugin_Create(const_cast(this), handle__Create, sigval1, sigval2); + + return callback_return_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 QImageIOPlugin::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QImageIOPlugin_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QImageIOPlugin::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 QImageIOPlugin::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QImageIOPlugin_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QImageIOPlugin::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) { + QImageIOPlugin::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QImageIOPlugin_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QImageIOPlugin::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) { + QImageIOPlugin::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QImageIOPlugin_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QImageIOPlugin::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) { + QImageIOPlugin::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QImageIOPlugin_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QImageIOPlugin::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) { + QImageIOPlugin::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QImageIOPlugin_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QImageIOPlugin::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) { + QImageIOPlugin::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QImageIOPlugin_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QImageIOPlugin::disconnectNotify(*signal); + + } + +}; + +void QImageIOPlugin_new(QImageIOPlugin** outptr_QImageIOPlugin, QObject** outptr_QObject) { + MiqtVirtualQImageIOPlugin* ret = new MiqtVirtualQImageIOPlugin(); + *outptr_QImageIOPlugin = ret; + *outptr_QObject = static_cast(ret); +} + +void QImageIOPlugin_new2(QObject* parent, QImageIOPlugin** outptr_QImageIOPlugin, QObject** outptr_QObject) { + MiqtVirtualQImageIOPlugin* ret = new MiqtVirtualQImageIOPlugin(parent); + *outptr_QImageIOPlugin = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QImageIOPlugin_MetaObject(const QImageIOPlugin* self) { return (QMetaObject*) self->metaObject(); } @@ -195,9 +869,73 @@ struct miqt_string QImageIOPlugin_TrUtf83(const char* s, const char* c, int n) { return _ms; } +void QImageIOPlugin_override_virtual_Capabilities(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__Capabilities = slot; +} + +void QImageIOPlugin_override_virtual_Create(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__Create = slot; +} + +void QImageIOPlugin_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__Event = slot; +} + +bool QImageIOPlugin_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQImageIOPlugin*)(self) )->virtualbase_Event(event); +} + +void QImageIOPlugin_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__EventFilter = slot; +} + +bool QImageIOPlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQImageIOPlugin*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QImageIOPlugin_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__TimerEvent = slot; +} + +void QImageIOPlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQImageIOPlugin*)(self) )->virtualbase_TimerEvent(event); +} + +void QImageIOPlugin_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__ChildEvent = slot; +} + +void QImageIOPlugin_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQImageIOPlugin*)(self) )->virtualbase_ChildEvent(event); +} + +void QImageIOPlugin_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__CustomEvent = slot; +} + +void QImageIOPlugin_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQImageIOPlugin*)(self) )->virtualbase_CustomEvent(event); +} + +void QImageIOPlugin_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__ConnectNotify = slot; +} + +void QImageIOPlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQImageIOPlugin*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QImageIOPlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__DisconnectNotify = slot; +} + +void QImageIOPlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQImageIOPlugin*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QImageIOPlugin_Delete(QImageIOPlugin* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qimageiohandler.go b/qt/gen_qimageiohandler.go index 70b6367a..910138f9 100644 --- a/qt/gen_qimageiohandler.go +++ b/qt/gen_qimageiohandler.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -95,6 +96,16 @@ func UnsafeNewQImageIOHandler(h unsafe.Pointer) *QImageIOHandler { return &QImageIOHandler{h: (*C.QImageIOHandler)(h)} } +// NewQImageIOHandler constructs a new QImageIOHandler object. +func NewQImageIOHandler() *QImageIOHandler { + var outptr_QImageIOHandler *C.QImageIOHandler = nil + + C.QImageIOHandler_new(&outptr_QImageIOHandler) + ret := newQImageIOHandler(outptr_QImageIOHandler) + ret.isSubclass = true + return ret +} + func (this *QImageIOHandler) SetDevice(device *QIODevice) { C.QImageIOHandler_SetDevice(this.h, device.cPointer()) } @@ -189,6 +200,331 @@ func (this *QImageIOHandler) CurrentImageRect() *QRect { return _goptr } +func (this *QImageIOHandler) callVirtualBase_Name() []byte { + + var _bytearray C.struct_miqt_string = C.QImageIOHandler_virtualbase_Name(unsafe.Pointer(this.h)) + _ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len))) + C.free(unsafe.Pointer(_bytearray.data)) + return _ret +} +func (this *QImageIOHandler) OnName(slot func(super func() []byte) []byte) { + C.QImageIOHandler_override_virtual_Name(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_Name +func miqt_exec_callback_QImageIOHandler_Name(self *C.QImageIOHandler, cb C.intptr_t) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []byte) []byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_Name) + 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 *QImageIOHandler) OnCanRead(slot func() bool) { + C.QImageIOHandler_override_virtual_CanRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_CanRead +func miqt_exec_callback_QImageIOHandler_CanRead(self *C.QImageIOHandler, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func() bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.bool)(virtualReturn) + +} +func (this *QImageIOHandler) OnRead(slot func(image *QImage) bool) { + C.QImageIOHandler_override_virtual_Read(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_Read +func miqt_exec_callback_QImageIOHandler_Read(self *C.QImageIOHandler, cb C.intptr_t, image *C.QImage) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(image *QImage) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQImage(unsafe.Pointer(image), nil) + + virtualReturn := gofunc(slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_Write(image *QImage) bool { + + return (bool)(C.QImageIOHandler_virtualbase_Write(unsafe.Pointer(this.h), image.cPointer())) + +} +func (this *QImageIOHandler) OnWrite(slot func(super func(image *QImage) bool, image *QImage) bool) { + C.QImageIOHandler_override_virtual_Write(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_Write +func miqt_exec_callback_QImageIOHandler_Write(self *C.QImageIOHandler, cb C.intptr_t, image *C.QImage) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(image *QImage) bool, image *QImage) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQImage(unsafe.Pointer(image), nil) + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_Write, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_Option(option QImageIOHandler__ImageOption) *QVariant { + + _ret := C.QImageIOHandler_virtualbase_Option(unsafe.Pointer(this.h), (C.int)(option)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QImageIOHandler) OnOption(slot func(super func(option QImageIOHandler__ImageOption) *QVariant, option QImageIOHandler__ImageOption) *QVariant) { + C.QImageIOHandler_override_virtual_Option(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_Option +func miqt_exec_callback_QImageIOHandler_Option(self *C.QImageIOHandler, cb C.intptr_t, option C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QImageIOHandler__ImageOption) *QVariant, option QImageIOHandler__ImageOption) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QImageIOHandler__ImageOption)(option) + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_Option, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QImageIOHandler) callVirtualBase_SetOption(option QImageIOHandler__ImageOption, value *QVariant) { + + C.QImageIOHandler_virtualbase_SetOption(unsafe.Pointer(this.h), (C.int)(option), value.cPointer()) + +} +func (this *QImageIOHandler) OnSetOption(slot func(super func(option QImageIOHandler__ImageOption, value *QVariant), option QImageIOHandler__ImageOption, value *QVariant)) { + C.QImageIOHandler_override_virtual_SetOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_SetOption +func miqt_exec_callback_QImageIOHandler_SetOption(self *C.QImageIOHandler, cb C.intptr_t, option C.int, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QImageIOHandler__ImageOption, value *QVariant), option QImageIOHandler__ImageOption, value *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QImageIOHandler__ImageOption)(option) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QImageIOHandler{h: self}).callVirtualBase_SetOption, slotval1, slotval2) + +} + +func (this *QImageIOHandler) callVirtualBase_SupportsOption(option QImageIOHandler__ImageOption) bool { + + return (bool)(C.QImageIOHandler_virtualbase_SupportsOption(unsafe.Pointer(this.h), (C.int)(option))) + +} +func (this *QImageIOHandler) OnSupportsOption(slot func(super func(option QImageIOHandler__ImageOption) bool, option QImageIOHandler__ImageOption) bool) { + C.QImageIOHandler_override_virtual_SupportsOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_SupportsOption +func miqt_exec_callback_QImageIOHandler_SupportsOption(self *C.QImageIOHandler, cb C.intptr_t, option C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QImageIOHandler__ImageOption) bool, option QImageIOHandler__ImageOption) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QImageIOHandler__ImageOption)(option) + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_SupportsOption, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_JumpToNextImage() bool { + + return (bool)(C.QImageIOHandler_virtualbase_JumpToNextImage(unsafe.Pointer(this.h))) + +} +func (this *QImageIOHandler) OnJumpToNextImage(slot func(super func() bool) bool) { + C.QImageIOHandler_override_virtual_JumpToNextImage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_JumpToNextImage +func miqt_exec_callback_QImageIOHandler_JumpToNextImage(self *C.QImageIOHandler, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_JumpToNextImage) + + return (C.bool)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_JumpToImage(imageNumber int) bool { + + return (bool)(C.QImageIOHandler_virtualbase_JumpToImage(unsafe.Pointer(this.h), (C.int)(imageNumber))) + +} +func (this *QImageIOHandler) OnJumpToImage(slot func(super func(imageNumber int) bool, imageNumber int) bool) { + C.QImageIOHandler_override_virtual_JumpToImage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_JumpToImage +func miqt_exec_callback_QImageIOHandler_JumpToImage(self *C.QImageIOHandler, cb C.intptr_t, imageNumber C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(imageNumber int) bool, imageNumber int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(imageNumber) + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_JumpToImage, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_LoopCount() int { + + return (int)(C.QImageIOHandler_virtualbase_LoopCount(unsafe.Pointer(this.h))) + +} +func (this *QImageIOHandler) OnLoopCount(slot func(super func() int) int) { + C.QImageIOHandler_override_virtual_LoopCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_LoopCount +func miqt_exec_callback_QImageIOHandler_LoopCount(self *C.QImageIOHandler, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_LoopCount) + + return (C.int)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_ImageCount() int { + + return (int)(C.QImageIOHandler_virtualbase_ImageCount(unsafe.Pointer(this.h))) + +} +func (this *QImageIOHandler) OnImageCount(slot func(super func() int) int) { + C.QImageIOHandler_override_virtual_ImageCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_ImageCount +func miqt_exec_callback_QImageIOHandler_ImageCount(self *C.QImageIOHandler, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_ImageCount) + + return (C.int)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_NextImageDelay() int { + + return (int)(C.QImageIOHandler_virtualbase_NextImageDelay(unsafe.Pointer(this.h))) + +} +func (this *QImageIOHandler) OnNextImageDelay(slot func(super func() int) int) { + C.QImageIOHandler_override_virtual_NextImageDelay(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_NextImageDelay +func miqt_exec_callback_QImageIOHandler_NextImageDelay(self *C.QImageIOHandler, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_NextImageDelay) + + return (C.int)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_CurrentImageNumber() int { + + return (int)(C.QImageIOHandler_virtualbase_CurrentImageNumber(unsafe.Pointer(this.h))) + +} +func (this *QImageIOHandler) OnCurrentImageNumber(slot func(super func() int) int) { + C.QImageIOHandler_override_virtual_CurrentImageNumber(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_CurrentImageNumber +func miqt_exec_callback_QImageIOHandler_CurrentImageNumber(self *C.QImageIOHandler, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_CurrentImageNumber) + + return (C.int)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_CurrentImageRect() *QRect { + + _ret := C.QImageIOHandler_virtualbase_CurrentImageRect(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 *QImageIOHandler) OnCurrentImageRect(slot func(super func() *QRect) *QRect) { + C.QImageIOHandler_override_virtual_CurrentImageRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_CurrentImageRect +func miqt_exec_callback_QImageIOHandler_CurrentImageRect(self *C.QImageIOHandler, 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((&QImageIOHandler{h: self}).callVirtualBase_CurrentImageRect) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QImageIOHandler) Delete() { C.QImageIOHandler_Delete(this.h, C.bool(this.isSubclass)) @@ -242,6 +578,28 @@ func UnsafeNewQImageIOPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QImage QObject: UnsafeNewQObject(h_QObject)} } +// NewQImageIOPlugin constructs a new QImageIOPlugin object. +func NewQImageIOPlugin() *QImageIOPlugin { + var outptr_QImageIOPlugin *C.QImageIOPlugin = nil + var outptr_QObject *C.QObject = nil + + C.QImageIOPlugin_new(&outptr_QImageIOPlugin, &outptr_QObject) + ret := newQImageIOPlugin(outptr_QImageIOPlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQImageIOPlugin2 constructs a new QImageIOPlugin object. +func NewQImageIOPlugin2(parent *QObject) *QImageIOPlugin { + var outptr_QImageIOPlugin *C.QImageIOPlugin = nil + var outptr_QObject *C.QObject = nil + + C.QImageIOPlugin_new2(parent.cPointer(), &outptr_QImageIOPlugin, &outptr_QObject) + ret := newQImageIOPlugin(outptr_QImageIOPlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QImageIOPlugin) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QImageIOPlugin_MetaObject(this.h))) } @@ -327,6 +685,218 @@ func QImageIOPlugin_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QImageIOPlugin) OnCapabilities(slot func(device *QIODevice, format []byte) QImageIOPlugin__Capability) { + C.QImageIOPlugin_override_virtual_Capabilities(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_Capabilities +func miqt_exec_callback_QImageIOPlugin_Capabilities(self *C.QImageIOPlugin, cb C.intptr_t, device *C.QIODevice, format C.struct_miqt_string) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(device *QIODevice, format []byte) QImageIOPlugin__Capability) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQIODevice(unsafe.Pointer(device), nil) + var format_bytearray C.struct_miqt_string = format + format_ret := C.GoBytes(unsafe.Pointer(format_bytearray.data), C.int(int64(format_bytearray.len))) + C.free(unsafe.Pointer(format_bytearray.data)) + slotval2 := format_ret + + virtualReturn := gofunc(slotval1, slotval2) + + return (C.int)(virtualReturn) + +} +func (this *QImageIOPlugin) OnCreate(slot func(device *QIODevice, format []byte) *QImageIOHandler) { + C.QImageIOPlugin_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_Create +func miqt_exec_callback_QImageIOPlugin_Create(self *C.QImageIOPlugin, cb C.intptr_t, device *C.QIODevice, format C.struct_miqt_string) *C.QImageIOHandler { + gofunc, ok := cgo.Handle(cb).Value().(func(device *QIODevice, format []byte) *QImageIOHandler) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQIODevice(unsafe.Pointer(device), nil) + var format_bytearray C.struct_miqt_string = format + format_ret := C.GoBytes(unsafe.Pointer(format_bytearray.data), C.int(int64(format_bytearray.len))) + C.free(unsafe.Pointer(format_bytearray.data)) + slotval2 := format_ret + + virtualReturn := gofunc(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QImageIOPlugin) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QImageIOPlugin_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QImageIOPlugin) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QImageIOPlugin_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_Event +func miqt_exec_callback_QImageIOPlugin_Event(self *C.QImageIOPlugin, 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((&QImageIOPlugin{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QImageIOPlugin) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QImageIOPlugin_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QImageIOPlugin) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QImageIOPlugin_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_EventFilter +func miqt_exec_callback_QImageIOPlugin_EventFilter(self *C.QImageIOPlugin, 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((&QImageIOPlugin{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QImageIOPlugin) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QImageIOPlugin_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QImageIOPlugin) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QImageIOPlugin_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_TimerEvent +func miqt_exec_callback_QImageIOPlugin_TimerEvent(self *C.QImageIOPlugin, 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((&QImageIOPlugin{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QImageIOPlugin) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QImageIOPlugin_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QImageIOPlugin) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QImageIOPlugin_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_ChildEvent +func miqt_exec_callback_QImageIOPlugin_ChildEvent(self *C.QImageIOPlugin, 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((&QImageIOPlugin{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QImageIOPlugin) callVirtualBase_CustomEvent(event *QEvent) { + + C.QImageIOPlugin_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QImageIOPlugin) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QImageIOPlugin_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_CustomEvent +func miqt_exec_callback_QImageIOPlugin_CustomEvent(self *C.QImageIOPlugin, 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((&QImageIOPlugin{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QImageIOPlugin) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QImageIOPlugin_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QImageIOPlugin) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QImageIOPlugin_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_ConnectNotify +func miqt_exec_callback_QImageIOPlugin_ConnectNotify(self *C.QImageIOPlugin, 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((&QImageIOPlugin{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QImageIOPlugin) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QImageIOPlugin_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QImageIOPlugin) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QImageIOPlugin_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_DisconnectNotify +func miqt_exec_callback_QImageIOPlugin_DisconnectNotify(self *C.QImageIOPlugin, 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((&QImageIOPlugin{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QImageIOPlugin) Delete() { diff --git a/qt/gen_qimageiohandler.h b/qt/gen_qimageiohandler.h index ace9af97..d4012b5a 100644 --- a/qt/gen_qimageiohandler.h +++ b/qt/gen_qimageiohandler.h @@ -16,26 +16,35 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; +class QEvent; class QIODevice; class QImage; class QImageIOHandler; class QImageIOPlugin; +class QMetaMethod; class QMetaObject; class QObject; class QRect; +class QTimerEvent; class QVariant; #else typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; typedef struct QImage QImage; typedef struct QImageIOHandler QImageIOHandler; typedef struct QImageIOPlugin QImageIOPlugin; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QRect QRect; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif +void QImageIOHandler_new(QImageIOHandler** outptr_QImageIOHandler); void QImageIOHandler_SetDevice(QImageIOHandler* self, QIODevice* device); QIODevice* QImageIOHandler_Device(const QImageIOHandler* self); void QImageIOHandler_SetFormat(QImageIOHandler* self, struct miqt_string format); @@ -55,8 +64,38 @@ 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_override_virtual_Name(void* self, intptr_t slot); +struct miqt_string QImageIOHandler_virtualbase_Name(const void* self); +void QImageIOHandler_override_virtual_CanRead(void* self, intptr_t slot); +bool QImageIOHandler_virtualbase_CanRead(const void* self); +void QImageIOHandler_override_virtual_Read(void* self, intptr_t slot); +bool QImageIOHandler_virtualbase_Read(void* self, QImage* image); +void QImageIOHandler_override_virtual_Write(void* self, intptr_t slot); +bool QImageIOHandler_virtualbase_Write(void* self, QImage* image); +void QImageIOHandler_override_virtual_Option(void* self, intptr_t slot); +QVariant* QImageIOHandler_virtualbase_Option(const void* self, int option); +void QImageIOHandler_override_virtual_SetOption(void* self, intptr_t slot); +void QImageIOHandler_virtualbase_SetOption(void* self, int option, QVariant* value); +void QImageIOHandler_override_virtual_SupportsOption(void* self, intptr_t slot); +bool QImageIOHandler_virtualbase_SupportsOption(const void* self, int option); +void QImageIOHandler_override_virtual_JumpToNextImage(void* self, intptr_t slot); +bool QImageIOHandler_virtualbase_JumpToNextImage(void* self); +void QImageIOHandler_override_virtual_JumpToImage(void* self, intptr_t slot); +bool QImageIOHandler_virtualbase_JumpToImage(void* self, int imageNumber); +void QImageIOHandler_override_virtual_LoopCount(void* self, intptr_t slot); +int QImageIOHandler_virtualbase_LoopCount(const void* self); +void QImageIOHandler_override_virtual_ImageCount(void* self, intptr_t slot); +int QImageIOHandler_virtualbase_ImageCount(const void* self); +void QImageIOHandler_override_virtual_NextImageDelay(void* self, intptr_t slot); +int QImageIOHandler_virtualbase_NextImageDelay(const void* self); +void QImageIOHandler_override_virtual_CurrentImageNumber(void* self, intptr_t slot); +int QImageIOHandler_virtualbase_CurrentImageNumber(const void* self); +void QImageIOHandler_override_virtual_CurrentImageRect(void* self, intptr_t slot); +QRect* QImageIOHandler_virtualbase_CurrentImageRect(const void* self); void QImageIOHandler_Delete(QImageIOHandler* self, bool isSubclass); +void QImageIOPlugin_new(QImageIOPlugin** outptr_QImageIOPlugin, QObject** outptr_QObject); +void QImageIOPlugin_new2(QObject* parent, QImageIOPlugin** outptr_QImageIOPlugin, QObject** outptr_QObject); QMetaObject* QImageIOPlugin_MetaObject(const QImageIOPlugin* self); void* QImageIOPlugin_Metacast(QImageIOPlugin* self, const char* param1); struct miqt_string QImageIOPlugin_Tr(const char* s); @@ -67,6 +106,24 @@ 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); +void QImageIOPlugin_override_virtual_Capabilities(void* self, intptr_t slot); +int QImageIOPlugin_virtualbase_Capabilities(const void* self, QIODevice* device, struct miqt_string format); +void QImageIOPlugin_override_virtual_Create(void* self, intptr_t slot); +QImageIOHandler* QImageIOPlugin_virtualbase_Create(const void* self, QIODevice* device, struct miqt_string format); +void QImageIOPlugin_override_virtual_Event(void* self, intptr_t slot); +bool QImageIOPlugin_virtualbase_Event(void* self, QEvent* event); +void QImageIOPlugin_override_virtual_EventFilter(void* self, intptr_t slot); +bool QImageIOPlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QImageIOPlugin_override_virtual_TimerEvent(void* self, intptr_t slot); +void QImageIOPlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QImageIOPlugin_override_virtual_ChildEvent(void* self, intptr_t slot); +void QImageIOPlugin_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QImageIOPlugin_override_virtual_CustomEvent(void* self, intptr_t slot); +void QImageIOPlugin_virtualbase_CustomEvent(void* self, QEvent* event); +void QImageIOPlugin_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QImageIOPlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QImageIOPlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QImageIOPlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QImageIOPlugin_Delete(QImageIOPlugin* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qiodevice.cpp b/qt/gen_qiodevice.cpp index 61f27cef..01123206 100644 --- a/qt/gen_qiodevice.cpp +++ b/qt/gen_qiodevice.cpp @@ -1,14 +1,570 @@ #include +#include +#include #include +#include #include #include #include #include #include +#include #include #include "gen_qiodevice.h" #include "_cgo_export.h" +class MiqtVirtualQIODevice : public virtual QIODevice { +public: + + MiqtVirtualQIODevice(): QIODevice() {}; + MiqtVirtualQIODevice(QObject* parent): QIODevice(parent) {}; + + virtual ~MiqtVirtualQIODevice() = 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 QIODevice::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QIODevice_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QIODevice::isSequential(); + + } + + // 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 QIODevice::open(mode); + } + + QIODevice::OpenMode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QIODevice_Open(this, handle__Open, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Open(int mode) { + + return QIODevice::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) { + QIODevice::close(); + return; + } + + + miqt_exec_callback_QIODevice_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QIODevice::close(); + + } + + // 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 QIODevice::pos(); + } + + + long long callback_return_value = miqt_exec_callback_QIODevice_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 = QIODevice::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 QIODevice::size(); + } + + + long long callback_return_value = miqt_exec_callback_QIODevice_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 = QIODevice::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 QIODevice::seek(pos); + } + + qint64 pos_ret = pos; + long long sigval1 = static_cast(pos_ret); + + bool callback_return_value = miqt_exec_callback_QIODevice_Seek(this, handle__Seek, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Seek(long long pos) { + + return QIODevice::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 QIODevice::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QIODevice_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QIODevice::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 QIODevice::reset(); + } + + + bool callback_return_value = miqt_exec_callback_QIODevice_Reset(this, handle__Reset); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Reset() { + + return QIODevice::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 QIODevice::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QIODevice_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 = QIODevice::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 QIODevice::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QIODevice_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 = QIODevice::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 QIODevice::canReadLine(); + } + + + bool callback_return_value = miqt_exec_callback_QIODevice_CanReadLine(const_cast(this), handle__CanReadLine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanReadLine() const { + + return QIODevice::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 QIODevice::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QIODevice_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QIODevice::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 QIODevice::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QIODevice_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QIODevice::waitForBytesWritten(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 0; // Pure virtual, there is no base we can call + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QIODevice_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // 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 QIODevice::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_QIODevice_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 = QIODevice::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 0; // Pure virtual, there is no base we can call + } + + 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_QIODevice_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_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 QIODevice::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QIODevice_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QIODevice::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 QIODevice::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QIODevice_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QIODevice::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) { + QIODevice::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QIODevice_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QIODevice::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) { + QIODevice::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QIODevice_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QIODevice::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) { + QIODevice::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QIODevice_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QIODevice::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) { + QIODevice::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QIODevice_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QIODevice::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) { + QIODevice::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QIODevice_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QIODevice::disconnectNotify(*signal); + + } + +}; + +void QIODevice_new(QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQIODevice* ret = new MiqtVirtualQIODevice(); + *outptr_QIODevice = ret; + *outptr_QObject = static_cast(ret); +} + +void QIODevice_new2(QObject* parent, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { + MiqtVirtualQIODevice* ret = new MiqtVirtualQIODevice(parent); + *outptr_QIODevice = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QIODevice_MetaObject(const QIODevice* self) { return (QMetaObject*) self->metaObject(); } @@ -260,7 +816,7 @@ void QIODevice_ReadyRead(QIODevice* self) { } void QIODevice_connect_ReadyRead(QIODevice* self, intptr_t slot) { - QIODevice::connect(self, static_cast(&QIODevice::readyRead), self, [=]() { + MiqtVirtualQIODevice::connect(self, static_cast(&QIODevice::readyRead), self, [=]() { miqt_exec_callback_QIODevice_ReadyRead(slot); }); } @@ -270,7 +826,7 @@ void QIODevice_ChannelReadyRead(QIODevice* self, int channel) { } void QIODevice_connect_ChannelReadyRead(QIODevice* self, intptr_t slot) { - QIODevice::connect(self, static_cast(&QIODevice::channelReadyRead), self, [=](int channel) { + MiqtVirtualQIODevice::connect(self, static_cast(&QIODevice::channelReadyRead), self, [=](int channel) { int sigval1 = channel; miqt_exec_callback_QIODevice_ChannelReadyRead(slot, sigval1); }); @@ -281,7 +837,7 @@ void QIODevice_BytesWritten(QIODevice* self, long long bytes) { } void QIODevice_connect_BytesWritten(QIODevice* self, intptr_t slot) { - QIODevice::connect(self, static_cast(&QIODevice::bytesWritten), self, [=](qint64 bytes) { + MiqtVirtualQIODevice::connect(self, static_cast(&QIODevice::bytesWritten), self, [=](qint64 bytes) { qint64 bytes_ret = bytes; long long sigval1 = static_cast(bytes_ret); miqt_exec_callback_QIODevice_BytesWritten(slot, sigval1); @@ -293,7 +849,7 @@ void QIODevice_ChannelBytesWritten(QIODevice* self, int channel, long long bytes } void QIODevice_connect_ChannelBytesWritten(QIODevice* self, intptr_t slot) { - QIODevice::connect(self, static_cast(&QIODevice::channelBytesWritten), self, [=](int channel, qint64 bytes) { + MiqtVirtualQIODevice::connect(self, static_cast(&QIODevice::channelBytesWritten), self, [=](int channel, qint64 bytes) { int sigval1 = channel; qint64 bytes_ret = bytes; long long sigval2 = static_cast(bytes_ret); @@ -306,7 +862,7 @@ void QIODevice_AboutToClose(QIODevice* self) { } void QIODevice_connect_AboutToClose(QIODevice* self, intptr_t slot) { - QIODevice::connect(self, static_cast(&QIODevice::aboutToClose), self, [=]() { + MiqtVirtualQIODevice::connect(self, static_cast(&QIODevice::aboutToClose), self, [=]() { miqt_exec_callback_QIODevice_AboutToClose(slot); }); } @@ -316,7 +872,7 @@ void QIODevice_ReadChannelFinished(QIODevice* self) { } void QIODevice_connect_ReadChannelFinished(QIODevice* self, intptr_t slot) { - QIODevice::connect(self, static_cast(&QIODevice::readChannelFinished), self, [=]() { + MiqtVirtualQIODevice::connect(self, static_cast(&QIODevice::readChannelFinished), self, [=]() { miqt_exec_callback_QIODevice_ReadChannelFinished(slot); }); } @@ -374,9 +930,185 @@ struct miqt_string QIODevice_ReadLine1(QIODevice* self, long long maxlen) { return _ms; } +void QIODevice_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__IsSequential = slot; +} + +bool QIODevice_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQIODevice*)(self) )->virtualbase_IsSequential(); +} + +void QIODevice_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__Open = slot; +} + +bool QIODevice_virtualbase_Open(void* self, int mode) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_Open(mode); +} + +void QIODevice_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__Close = slot; +} + +void QIODevice_virtualbase_Close(void* self) { + ( (MiqtVirtualQIODevice*)(self) )->virtualbase_Close(); +} + +void QIODevice_override_virtual_Pos(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__Pos = slot; +} + +long long QIODevice_virtualbase_Pos(const void* self) { + return ( (const MiqtVirtualQIODevice*)(self) )->virtualbase_Pos(); +} + +void QIODevice_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__Size = slot; +} + +long long QIODevice_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQIODevice*)(self) )->virtualbase_Size(); +} + +void QIODevice_override_virtual_Seek(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__Seek = slot; +} + +bool QIODevice_virtualbase_Seek(void* self, long long pos) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_Seek(pos); +} + +void QIODevice_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__AtEnd = slot; +} + +bool QIODevice_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQIODevice*)(self) )->virtualbase_AtEnd(); +} + +void QIODevice_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__Reset = slot; +} + +bool QIODevice_virtualbase_Reset(void* self) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_Reset(); +} + +void QIODevice_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__BytesAvailable = slot; +} + +long long QIODevice_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQIODevice*)(self) )->virtualbase_BytesAvailable(); +} + +void QIODevice_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__BytesToWrite = slot; +} + +long long QIODevice_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQIODevice*)(self) )->virtualbase_BytesToWrite(); +} + +void QIODevice_override_virtual_CanReadLine(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__CanReadLine = slot; +} + +bool QIODevice_virtualbase_CanReadLine(const void* self) { + return ( (const MiqtVirtualQIODevice*)(self) )->virtualbase_CanReadLine(); +} + +void QIODevice_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QIODevice_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_WaitForReadyRead(msecs); +} + +void QIODevice_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QIODevice_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QIODevice_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__ReadData = slot; +} + +void QIODevice_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__ReadLineData = slot; +} + +long long QIODevice_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QIODevice_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__WriteData = slot; +} + +void QIODevice_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__Event = slot; +} + +bool QIODevice_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_Event(event); +} + +void QIODevice_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__EventFilter = slot; +} + +bool QIODevice_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QIODevice_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__TimerEvent = slot; +} + +void QIODevice_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQIODevice*)(self) )->virtualbase_TimerEvent(event); +} + +void QIODevice_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__ChildEvent = slot; +} + +void QIODevice_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQIODevice*)(self) )->virtualbase_ChildEvent(event); +} + +void QIODevice_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__CustomEvent = slot; +} + +void QIODevice_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQIODevice*)(self) )->virtualbase_CustomEvent(event); +} + +void QIODevice_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__ConnectNotify = slot; +} + +void QIODevice_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQIODevice*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QIODevice_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__DisconnectNotify = slot; +} + +void QIODevice_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQIODevice*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QIODevice_Delete(QIODevice* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qiodevice.go b/qt/gen_qiodevice.go index 4be393a3..c3352ea6 100644 --- a/qt/gen_qiodevice.go +++ b/qt/gen_qiodevice.go @@ -68,6 +68,28 @@ func UnsafeNewQIODevice(h unsafe.Pointer, h_QObject unsafe.Pointer) *QIODevice { QObject: UnsafeNewQObject(h_QObject)} } +// NewQIODevice constructs a new QIODevice object. +func NewQIODevice() *QIODevice { + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QIODevice_new(&outptr_QIODevice, &outptr_QObject) + ret := newQIODevice(outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQIODevice2 constructs a new QIODevice object. +func NewQIODevice2(parent *QObject) *QIODevice { + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + + C.QIODevice_new2(parent.cPointer(), &outptr_QIODevice, &outptr_QObject) + ret := newQIODevice(outptr_QIODevice, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QIODevice) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QIODevice_MetaObject(this.h))) } @@ -466,6 +488,542 @@ func (this *QIODevice) ReadLine1(maxlen int64) []byte { return _ret } +func (this *QIODevice) callVirtualBase_IsSequential() bool { + + return (bool)(C.QIODevice_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QIODevice) OnIsSequential(slot func(super func() bool) bool) { + C.QIODevice_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_IsSequential +func miqt_exec_callback_QIODevice_IsSequential(self *C.QIODevice, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_Open(mode QIODevice__OpenModeFlag) bool { + + return (bool)(C.QIODevice_virtualbase_Open(unsafe.Pointer(this.h), (C.int)(mode))) + +} +func (this *QIODevice) OnOpen(slot func(super func(mode QIODevice__OpenModeFlag) bool, mode QIODevice__OpenModeFlag) bool) { + C.QIODevice_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_Open +func miqt_exec_callback_QIODevice_Open(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_Open, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_Close() { + + C.QIODevice_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QIODevice) OnClose(slot func(super func())) { + C.QIODevice_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_Close +func miqt_exec_callback_QIODevice_Close(self *C.QIODevice, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QIODevice{h: self}).callVirtualBase_Close) + +} + +func (this *QIODevice) callVirtualBase_Pos() int64 { + + return (int64)(C.QIODevice_virtualbase_Pos(unsafe.Pointer(this.h))) + +} +func (this *QIODevice) OnPos(slot func(super func() int64) int64) { + C.QIODevice_override_virtual_Pos(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_Pos +func miqt_exec_callback_QIODevice_Pos(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_Pos) + + return (C.longlong)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_Size() int64 { + + return (int64)(C.QIODevice_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QIODevice) OnSize(slot func(super func() int64) int64) { + C.QIODevice_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_Size +func miqt_exec_callback_QIODevice_Size(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_Seek(pos int64) bool { + + return (bool)(C.QIODevice_virtualbase_Seek(unsafe.Pointer(this.h), (C.longlong)(pos))) + +} +func (this *QIODevice) OnSeek(slot func(super func(pos int64) bool, pos int64) bool) { + C.QIODevice_override_virtual_Seek(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_Seek +func miqt_exec_callback_QIODevice_Seek(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_Seek, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_AtEnd() bool { + + return (bool)(C.QIODevice_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QIODevice) OnAtEnd(slot func(super func() bool) bool) { + C.QIODevice_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_AtEnd +func miqt_exec_callback_QIODevice_AtEnd(self *C.QIODevice, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_Reset() bool { + + return (bool)(C.QIODevice_virtualbase_Reset(unsafe.Pointer(this.h))) + +} +func (this *QIODevice) OnReset(slot func(super func() bool) bool) { + C.QIODevice_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_Reset +func miqt_exec_callback_QIODevice_Reset(self *C.QIODevice, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_Reset) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QIODevice_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QIODevice) OnBytesAvailable(slot func(super func() int64) int64) { + C.QIODevice_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_BytesAvailable +func miqt_exec_callback_QIODevice_BytesAvailable(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QIODevice_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QIODevice) OnBytesToWrite(slot func(super func() int64) int64) { + C.QIODevice_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_BytesToWrite +func miqt_exec_callback_QIODevice_BytesToWrite(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_CanReadLine() bool { + + return (bool)(C.QIODevice_virtualbase_CanReadLine(unsafe.Pointer(this.h))) + +} +func (this *QIODevice) OnCanReadLine(slot func(super func() bool) bool) { + C.QIODevice_override_virtual_CanReadLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_CanReadLine +func miqt_exec_callback_QIODevice_CanReadLine(self *C.QIODevice, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_CanReadLine) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QIODevice_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QIODevice) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QIODevice_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_WaitForReadyRead +func miqt_exec_callback_QIODevice_WaitForReadyRead(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QIODevice_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QIODevice) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QIODevice_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_WaitForBytesWritten +func miqt_exec_callback_QIODevice_WaitForBytesWritten(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QIODevice) OnReadData(slot func(data string, maxlen int64) int64) { + C.QIODevice_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_ReadData +func miqt_exec_callback_QIODevice_ReadData(self *C.QIODevice, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QIODevice_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QIODevice) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QIODevice_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_ReadLineData +func miqt_exec_callback_QIODevice_ReadLineData(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} +func (this *QIODevice) OnWriteData(slot func(data string, lenVal int64) int64) { + C.QIODevice_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_WriteData +func miqt_exec_callback_QIODevice_WriteData(self *C.QIODevice, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QIODevice_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QIODevice) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QIODevice_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_Event +func miqt_exec_callback_QIODevice_Event(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QIODevice_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QIODevice) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QIODevice_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_EventFilter +func miqt_exec_callback_QIODevice_EventFilter(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QIODevice_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QIODevice) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QIODevice_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_TimerEvent +func miqt_exec_callback_QIODevice_TimerEvent(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QIODevice) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QIODevice_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QIODevice) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QIODevice_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_ChildEvent +func miqt_exec_callback_QIODevice_ChildEvent(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QIODevice) callVirtualBase_CustomEvent(event *QEvent) { + + C.QIODevice_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QIODevice) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QIODevice_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_CustomEvent +func miqt_exec_callback_QIODevice_CustomEvent(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QIODevice) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QIODevice_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QIODevice) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QIODevice_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_ConnectNotify +func miqt_exec_callback_QIODevice_ConnectNotify(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QIODevice) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QIODevice_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QIODevice) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QIODevice_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_DisconnectNotify +func miqt_exec_callback_QIODevice_DisconnectNotify(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QIODevice) Delete() { C.QIODevice_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qiodevice.h b/qt/gen_qiodevice.h index be93a623..9c2b5eae 100644 --- a/qt/gen_qiodevice.h +++ b/qt/gen_qiodevice.h @@ -16,16 +16,26 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; +class QEvent; class QIODevice; +class QMetaMethod; class QMetaObject; class QObject; +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 QTimerEvent QTimerEvent; #endif +void QIODevice_new(QIODevice** outptr_QIODevice, QObject** outptr_QObject); +void QIODevice_new2(QObject* parent, QIODevice** outptr_QIODevice, QObject** outptr_QObject); QMetaObject* QIODevice_MetaObject(const QIODevice* self); void* QIODevice_Metacast(QIODevice* self, const char* param1); struct miqt_string QIODevice_Tr(const char* s); @@ -94,6 +104,52 @@ 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_override_virtual_IsSequential(void* self, intptr_t slot); +bool QIODevice_virtualbase_IsSequential(const void* self); +void QIODevice_override_virtual_Open(void* self, intptr_t slot); +bool QIODevice_virtualbase_Open(void* self, int mode); +void QIODevice_override_virtual_Close(void* self, intptr_t slot); +void QIODevice_virtualbase_Close(void* self); +void QIODevice_override_virtual_Pos(void* self, intptr_t slot); +long long QIODevice_virtualbase_Pos(const void* self); +void QIODevice_override_virtual_Size(void* self, intptr_t slot); +long long QIODevice_virtualbase_Size(const void* self); +void QIODevice_override_virtual_Seek(void* self, intptr_t slot); +bool QIODevice_virtualbase_Seek(void* self, long long pos); +void QIODevice_override_virtual_AtEnd(void* self, intptr_t slot); +bool QIODevice_virtualbase_AtEnd(const void* self); +void QIODevice_override_virtual_Reset(void* self, intptr_t slot); +bool QIODevice_virtualbase_Reset(void* self); +void QIODevice_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QIODevice_virtualbase_BytesAvailable(const void* self); +void QIODevice_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QIODevice_virtualbase_BytesToWrite(const void* self); +void QIODevice_override_virtual_CanReadLine(void* self, intptr_t slot); +bool QIODevice_virtualbase_CanReadLine(const void* self); +void QIODevice_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QIODevice_virtualbase_WaitForReadyRead(void* self, int msecs); +void QIODevice_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QIODevice_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QIODevice_override_virtual_ReadData(void* self, intptr_t slot); +long long QIODevice_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QIODevice_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QIODevice_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QIODevice_override_virtual_WriteData(void* self, intptr_t slot); +long long QIODevice_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QIODevice_override_virtual_Event(void* self, intptr_t slot); +bool QIODevice_virtualbase_Event(void* self, QEvent* event); +void QIODevice_override_virtual_EventFilter(void* self, intptr_t slot); +bool QIODevice_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QIODevice_override_virtual_TimerEvent(void* self, intptr_t slot); +void QIODevice_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QIODevice_override_virtual_ChildEvent(void* self, intptr_t slot); +void QIODevice_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QIODevice_override_virtual_CustomEvent(void* self, intptr_t slot); +void QIODevice_virtualbase_CustomEvent(void* self, QEvent* event); +void QIODevice_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QIODevice_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QIODevice_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QIODevice_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QIODevice_Delete(QIODevice* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qitemselectionmodel.cpp b/qt/gen_qitemselectionmodel.cpp index e5b2c705..135773b9 100644 --- a/qt/gen_qitemselectionmodel.cpp +++ b/qt/gen_qitemselectionmodel.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -211,6 +212,34 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__Select2 = 0; + + // Subclass to allow providing a Go implementation + virtual void select(const QItemSelection& selection, QItemSelectionModel::SelectionFlags command) override { + if (handle__Select2 == 0) { + QItemSelectionModel::select(selection, command); + return; + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QItemSelectionModel_Select2(this, handle__Select2, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Select2(QItemSelection* selection, int command) { + + QItemSelectionModel::select(*selection, static_cast(command)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__Clear = 0; @@ -568,6 +597,10 @@ struct miqt_array /* of QModelIndex* */ QItemSelectionModel_SelectedColumns(con return _out; } +QItemSelection* QItemSelectionModel_Selection(const QItemSelectionModel* self) { + return new QItemSelection(self->selection()); +} + QAbstractItemModel* QItemSelectionModel_Model(const QItemSelectionModel* self) { return (QAbstractItemModel*) self->model(); } @@ -588,6 +621,10 @@ void QItemSelectionModel_Select(QItemSelectionModel* self, QModelIndex* index, i self->select(*index, static_cast(command)); } +void QItemSelectionModel_Select2(QItemSelectionModel* self, QItemSelection* selection, int command) { + self->select(*selection, static_cast(command)); +} + void QItemSelectionModel_Clear(QItemSelectionModel* self) { self->clear(); } @@ -604,6 +641,22 @@ void QItemSelectionModel_ClearCurrentIndex(QItemSelectionModel* self) { self->clearCurrentIndex(); } +void QItemSelectionModel_SelectionChanged(QItemSelectionModel* self, QItemSelection* selected, QItemSelection* deselected) { + self->selectionChanged(*selected, *deselected); +} + +void QItemSelectionModel_connect_SelectionChanged(QItemSelectionModel* self, intptr_t slot) { + MiqtVirtualQItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::selectionChanged), self, [=](const QItemSelection& selected, const QItemSelection& deselected) { + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + miqt_exec_callback_QItemSelectionModel_SelectionChanged(slot, sigval1, sigval2); + }); +} + void QItemSelectionModel_CurrentChanged(QItemSelectionModel* self, QModelIndex* current, QModelIndex* previous) { self->currentChanged(*current, *previous); } @@ -765,6 +818,14 @@ void QItemSelectionModel_virtualbase_Select(void* self, QModelIndex* index, int ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_Select(index, command); } +void QItemSelectionModel_override_virtual_Select2(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__Select2 = slot; +} + +void QItemSelectionModel_virtualbase_Select2(void* self, QItemSelection* selection, int command) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_Select2(selection, command); +} + void QItemSelectionModel_override_virtual_Clear(void* self, intptr_t slot) { dynamic_cast( (QItemSelectionModel*)(self) )->handle__Clear = slot; } @@ -853,3 +914,54 @@ void QItemSelectionModel_Delete(QItemSelectionModel* self, bool isSubclass) { } } +void QItemSelection_new(QItemSelection** outptr_QItemSelection) { + QItemSelection* ret = new QItemSelection(); + *outptr_QItemSelection = ret; +} + +void QItemSelection_new2(QModelIndex* topLeft, QModelIndex* bottomRight, QItemSelection** outptr_QItemSelection) { + QItemSelection* ret = new QItemSelection(*topLeft, *bottomRight); + *outptr_QItemSelection = ret; +} + +void QItemSelection_Select(QItemSelection* self, QModelIndex* topLeft, QModelIndex* bottomRight) { + self->select(*topLeft, *bottomRight); +} + +bool QItemSelection_Contains(const QItemSelection* self, QModelIndex* index) { + return self->contains(*index); +} + +struct miqt_array /* of QModelIndex* */ QItemSelection_Indexes(const QItemSelection* self) { + QModelIndexList _ret = self->indexes(); + // 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 QItemSelection_Merge(QItemSelection* self, QItemSelection* other, int command) { + self->merge(*other, static_cast(command)); +} + +void QItemSelection_Split(QItemSelectionRange* rangeVal, QItemSelectionRange* other, QItemSelection* result) { + QItemSelection::split(*rangeVal, *other, result); +} + +void QItemSelection_OperatorAssign(QItemSelection* self, QItemSelection* param1) { + self->operator=(*param1); +} + +void QItemSelection_Delete(QItemSelection* 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 5d3e9459..bcc3aea7 100644 --- a/qt/gen_qitemselectionmodel.go +++ b/qt/gen_qitemselectionmodel.go @@ -393,6 +393,13 @@ func (this *QItemSelectionModel) SelectedColumns() []QModelIndex { return _ret } +func (this *QItemSelectionModel) Selection() *QItemSelection { + _ret := C.QItemSelectionModel_Selection(this.h) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QItemSelectionModel) Model() *QAbstractItemModel { return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QItemSelectionModel_Model(this.h)), nil) } @@ -413,6 +420,10 @@ func (this *QItemSelectionModel) Select(index *QModelIndex, command QItemSelecti C.QItemSelectionModel_Select(this.h, index.cPointer(), (C.int)(command)) } +func (this *QItemSelectionModel) Select2(selection *QItemSelection, command QItemSelectionModel__SelectionFlag) { + C.QItemSelectionModel_Select2(this.h, selection.cPointer(), (C.int)(command)) +} + func (this *QItemSelectionModel) Clear() { C.QItemSelectionModel_Clear(this.h) } @@ -429,6 +440,27 @@ func (this *QItemSelectionModel) ClearCurrentIndex() { C.QItemSelectionModel_ClearCurrentIndex(this.h) } +func (this *QItemSelectionModel) SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + C.QItemSelectionModel_SelectionChanged(this.h, selected.cPointer(), deselected.cPointer()) +} +func (this *QItemSelectionModel) OnSelectionChanged(slot func(selected *QItemSelection, deselected *QItemSelection)) { + C.QItemSelectionModel_connect_SelectionChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_SelectionChanged +func miqt_exec_callback_QItemSelectionModel_SelectionChanged(cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc(slotval1, slotval2) +} + func (this *QItemSelectionModel) CurrentChanged(current *QModelIndex, previous *QModelIndex) { C.QItemSelectionModel_CurrentChanged(this.h, current.cPointer(), previous.cPointer()) } @@ -646,6 +678,30 @@ func miqt_exec_callback_QItemSelectionModel_Select(self *C.QItemSelectionModel, } +func (this *QItemSelectionModel) callVirtualBase_Select2(selection *QItemSelection, command QItemSelectionModel__SelectionFlag) { + + C.QItemSelectionModel_virtualbase_Select2(unsafe.Pointer(this.h), selection.cPointer(), (C.int)(command)) + +} +func (this *QItemSelectionModel) OnSelect2(slot func(super func(selection *QItemSelection, command QItemSelectionModel__SelectionFlag), selection *QItemSelection, command QItemSelectionModel__SelectionFlag)) { + C.QItemSelectionModel_override_virtual_Select2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_Select2 +func miqt_exec_callback_QItemSelectionModel_Select2(self *C.QItemSelectionModel, cb C.intptr_t, selection *C.QItemSelection, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection, command QItemSelectionModel__SelectionFlag), selection *QItemSelection, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_Select2, slotval1, slotval2) + +} + func (this *QItemSelectionModel) callVirtualBase_Clear() { C.QItemSelectionModel_virtualbase_Clear(unsafe.Pointer(this.h)) @@ -885,3 +941,108 @@ func (this *QItemSelectionModel) GoGC() { runtime.KeepAlive(this.h) }) } + +type QItemSelection struct { + h *C.QItemSelection + isSubclass bool + /* Also inherits unprojectable QList */ + +} + +func (this *QItemSelection) cPointer() *C.QItemSelection { + if this == nil { + return nil + } + return this.h +} + +func (this *QItemSelection) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQItemSelection constructs the type using only CGO pointers. +func newQItemSelection(h *C.QItemSelection) *QItemSelection { + if h == nil { + return nil + } + return &QItemSelection{h: h} +} + +// UnsafeNewQItemSelection constructs the type using only unsafe pointers. +func UnsafeNewQItemSelection(h unsafe.Pointer) *QItemSelection { + if h == nil { + return nil + } + + return &QItemSelection{h: (*C.QItemSelection)(h)} +} + +// NewQItemSelection constructs a new QItemSelection object. +func NewQItemSelection() *QItemSelection { + var outptr_QItemSelection *C.QItemSelection = nil + + C.QItemSelection_new(&outptr_QItemSelection) + ret := newQItemSelection(outptr_QItemSelection) + ret.isSubclass = true + return ret +} + +// NewQItemSelection2 constructs a new QItemSelection object. +func NewQItemSelection2(topLeft *QModelIndex, bottomRight *QModelIndex) *QItemSelection { + var outptr_QItemSelection *C.QItemSelection = nil + + C.QItemSelection_new2(topLeft.cPointer(), bottomRight.cPointer(), &outptr_QItemSelection) + ret := newQItemSelection(outptr_QItemSelection) + ret.isSubclass = true + return ret +} + +func (this *QItemSelection) Select(topLeft *QModelIndex, bottomRight *QModelIndex) { + C.QItemSelection_Select(this.h, topLeft.cPointer(), bottomRight.cPointer()) +} + +func (this *QItemSelection) Contains(index *QModelIndex) bool { + return (bool)(C.QItemSelection_Contains(this.h, index.cPointer())) +} + +func (this *QItemSelection) Indexes() []QModelIndex { + var _ma C.struct_miqt_array = C.QItemSelection_Indexes(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 *QItemSelection) Merge(other *QItemSelection, command QItemSelectionModel__SelectionFlag) { + C.QItemSelection_Merge(this.h, other.cPointer(), (C.int)(command)) +} + +func QItemSelection_Split(rangeVal *QItemSelectionRange, other *QItemSelectionRange, result *QItemSelection) { + C.QItemSelection_Split(rangeVal.cPointer(), other.cPointer(), result.cPointer()) +} + +func (this *QItemSelection) OperatorAssign(param1 *QItemSelection) { + C.QItemSelection_OperatorAssign(this.h, param1.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QItemSelection) Delete() { + C.QItemSelection_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 *QItemSelection) GoGC() { + runtime.SetFinalizer(this, func(this *QItemSelection) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/gen_qitemselectionmodel.h b/qt/gen_qitemselectionmodel.h index 1cd81477..ef9a67e8 100644 --- a/qt/gen_qitemselectionmodel.h +++ b/qt/gen_qitemselectionmodel.h @@ -18,6 +18,7 @@ extern "C" { class QAbstractItemModel; class QChildEvent; class QEvent; +class QItemSelection; class QItemSelectionModel; class QItemSelectionRange; class QMetaMethod; @@ -30,6 +31,7 @@ class QTimerEvent; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QItemSelectionRange QItemSelectionRange; typedef struct QMetaMethod QMetaMethod; @@ -85,15 +87,19 @@ bool QItemSelectionModel_HasSelection(const QItemSelectionModel* self); struct miqt_array /* of QModelIndex* */ QItemSelectionModel_SelectedIndexes(const QItemSelectionModel* self); struct miqt_array /* of QModelIndex* */ QItemSelectionModel_SelectedRows(const QItemSelectionModel* self); struct miqt_array /* of QModelIndex* */ QItemSelectionModel_SelectedColumns(const QItemSelectionModel* self); +QItemSelection* QItemSelectionModel_Selection(const QItemSelectionModel* self); QAbstractItemModel* QItemSelectionModel_Model(const QItemSelectionModel* self); QAbstractItemModel* QItemSelectionModel_Model2(QItemSelectionModel* self); void QItemSelectionModel_SetModel(QItemSelectionModel* self, QAbstractItemModel* model); void QItemSelectionModel_SetCurrentIndex(QItemSelectionModel* self, QModelIndex* index, int command); void QItemSelectionModel_Select(QItemSelectionModel* self, QModelIndex* index, int command); +void QItemSelectionModel_Select2(QItemSelectionModel* self, QItemSelection* selection, int command); void QItemSelectionModel_Clear(QItemSelectionModel* self); void QItemSelectionModel_Reset(QItemSelectionModel* self); void QItemSelectionModel_ClearSelection(QItemSelectionModel* self); void QItemSelectionModel_ClearCurrentIndex(QItemSelectionModel* self); +void QItemSelectionModel_SelectionChanged(QItemSelectionModel* self, QItemSelection* selected, QItemSelection* deselected); +void QItemSelectionModel_connect_SelectionChanged(QItemSelectionModel* self, intptr_t slot); void QItemSelectionModel_CurrentChanged(QItemSelectionModel* self, QModelIndex* current, QModelIndex* previous); void QItemSelectionModel_connect_CurrentChanged(QItemSelectionModel* self, intptr_t slot); void QItemSelectionModel_CurrentRowChanged(QItemSelectionModel* self, QModelIndex* current, QModelIndex* previous); @@ -116,6 +122,8 @@ void QItemSelectionModel_override_virtual_SetCurrentIndex(void* self, intptr_t s 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_Select2(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_Select2(void* self, QItemSelection* selection, 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); @@ -138,6 +146,16 @@ void QItemSelectionModel_override_virtual_DisconnectNotify(void* self, intptr_t void QItemSelectionModel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QItemSelectionModel_Delete(QItemSelectionModel* self, bool isSubclass); +void QItemSelection_new(QItemSelection** outptr_QItemSelection); +void QItemSelection_new2(QModelIndex* topLeft, QModelIndex* bottomRight, QItemSelection** outptr_QItemSelection); +void QItemSelection_Select(QItemSelection* self, QModelIndex* topLeft, QModelIndex* bottomRight); +bool QItemSelection_Contains(const QItemSelection* self, QModelIndex* index); +struct miqt_array /* of QModelIndex* */ QItemSelection_Indexes(const QItemSelection* self); +void QItemSelection_Merge(QItemSelection* self, QItemSelection* other, int command); +void QItemSelection_Split(QItemSelectionRange* rangeVal, QItemSelectionRange* other, QItemSelection* result); +void QItemSelection_OperatorAssign(QItemSelection* self, QItemSelection* param1); +void QItemSelection_Delete(QItemSelection* self, bool isSubclass); + #ifdef __cplusplus } /* extern C */ #endif diff --git a/qt/gen_qlayout.cpp b/qt/gen_qlayout.cpp index 822138df..a51f45bd 100644 --- a/qt/gen_qlayout.cpp +++ b/qt/gen_qlayout.cpp @@ -1,19 +1,636 @@ #include +#include #include #include #include +#include #include #include #include #include +#include #include #include #include +#include #include #include #include "gen_qlayout.h" #include "_cgo_export.h" +class MiqtVirtualQLayout : public virtual QLayout { +public: + + MiqtVirtualQLayout(QWidget* parent): QLayout(parent) {}; + MiqtVirtualQLayout(): QLayout() {}; + + virtual ~MiqtVirtualQLayout() = default; + + // 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) { + QLayout::invalidate(); + return; + } + + + miqt_exec_callback_QLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QLayout::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 QLayout::geometry(); + } + + + QRect* callback_return_value = miqt_exec_callback_QLayout_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Geometry() const { + + return new QRect(QLayout::geometry()); + + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + QLayoutItem* sigval1 = param1; + + miqt_exec_callback_QLayout_AddItem(this, handle__AddItem, sigval1); + + + } + + // 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 QLayout::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QLayout_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 = QLayout::expandingDirections(); + return static_cast(_ret); + + } + + // 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 QLayout::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QLayout_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QLayout::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 QLayout::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QLayout_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QLayout::maximumSize()); + + } + + // 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) { + QLayout::setGeometry(geometry); + return; + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* geometry) { + + QLayout::setGeometry(*geometry); + + } + + // 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 nullptr; // Pure virtual, there is no base we can call + } + + int sigval1 = index; + + QLayoutItem* callback_return_value = miqt_exec_callback_QLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // 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 nullptr; // Pure virtual, there is no base we can call + } + + int sigval1 = index; + + QLayoutItem* callback_return_value = miqt_exec_callback_QLayout_TakeAt(this, handle__TakeAt, sigval1); + + return callback_return_value; + } + + // 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 QLayout::indexOf(param1); + } + + QWidget* sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QLayout_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 QLayout::indexOf(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 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // 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 QLayout::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QLayout_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QLayout::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 QLayout::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QLayout_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 = QLayout::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 QLayout::layout(); + } + + + QLayout* callback_return_value = miqt_exec_callback_QLayout_Layout(this, handle__Layout); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayout* virtualbase_Layout() { + + return QLayout::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) { + QLayout::childEvent(e); + return; + } + + QChildEvent* sigval1 = e; + + miqt_exec_callback_QLayout_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* e) { + + QLayout::childEvent(e); + + } + + // 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 QLayout::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QLayout_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QLayout::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 QLayout::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QLayout_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QLayout::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) { + QLayout::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QLayout_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QLayout::timerEvent(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) { + QLayout::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QLayout_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QLayout::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) { + QLayout::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QLayout_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QLayout::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) { + QLayout::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QLayout_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QLayout::disconnectNotify(*signal); + + } + + // 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 QSize(); // Pure virtual, there is no base we can call + } + + + QSize* callback_return_value = miqt_exec_callback_QLayout_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // 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 QLayout::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QLayout_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QLayout::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 QLayout::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QLayout_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 QLayout::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 QLayout::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QLayout_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 QLayout::minimumHeightForWidth(static_cast(param1)); + + } + + // 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 QLayout::widget(); + } + + + QWidget* callback_return_value = miqt_exec_callback_QLayout_Widget(this, handle__Widget); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_Widget() { + + return QLayout::widget(); + + } + + // 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 QLayout::spacerItem(); + } + + + QSpacerItem* callback_return_value = miqt_exec_callback_QLayout_SpacerItem(this, handle__SpacerItem); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QSpacerItem* virtualbase_SpacerItem() { + + return QLayout::spacerItem(); + + } + +}; + +void QLayout_new(QWidget* parent, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQLayout* ret = new MiqtVirtualQLayout(parent); + *outptr_QLayout = ret; + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); +} + +void QLayout_new2(QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQLayout* ret = new MiqtVirtualQLayout(); + *outptr_QLayout = ret; + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); +} + QMetaObject* QLayout_MetaObject(const QLayout* self) { return (QMetaObject*) self->metaObject(); } @@ -271,9 +888,205 @@ QLayoutItem* QLayout_ReplaceWidget3(QLayout* self, QWidget* from, QWidget* to, i return self->replaceWidget(from, to, static_cast(options)); } +void QLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__Invalidate = slot; +} + +void QLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQLayout*)(self) )->virtualbase_Invalidate(); +} + +void QLayout_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__Geometry = slot; +} + +QRect* QLayout_virtualbase_Geometry(const void* self) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_Geometry(); +} + +void QLayout_override_virtual_AddItem(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__AddItem = slot; +} + +void QLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__ExpandingDirections = slot; +} + +int QLayout_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_ExpandingDirections(); +} + +void QLayout_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__MinimumSize = slot; +} + +QSize* QLayout_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_MinimumSize(); +} + +void QLayout_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__MaximumSize = slot; +} + +QSize* QLayout_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_MaximumSize(); +} + +void QLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__SetGeometry = slot; +} + +void QLayout_virtualbase_SetGeometry(void* self, QRect* geometry) { + ( (MiqtVirtualQLayout*)(self) )->virtualbase_SetGeometry(geometry); +} + +void QLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__ItemAt = slot; +} + +void QLayout_override_virtual_TakeAt(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__TakeAt = slot; +} + +void QLayout_override_virtual_IndexOf(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__IndexOf = slot; +} + +int QLayout_virtualbase_IndexOf(const void* self, QWidget* param1) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_IndexOf(param1); +} + +void QLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__Count = slot; +} + +void QLayout_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__IsEmpty = slot; +} + +bool QLayout_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_IsEmpty(); +} + +void QLayout_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__ControlTypes = slot; +} + +int QLayout_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_ControlTypes(); +} + +void QLayout_override_virtual_Layout(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__Layout = slot; +} + +QLayout* QLayout_virtualbase_Layout(void* self) { + return ( (MiqtVirtualQLayout*)(self) )->virtualbase_Layout(); +} + +void QLayout_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__ChildEvent = slot; +} + +void QLayout_virtualbase_ChildEvent(void* self, QChildEvent* e) { + ( (MiqtVirtualQLayout*)(self) )->virtualbase_ChildEvent(e); +} + +void QLayout_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__Event = slot; +} + +bool QLayout_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQLayout*)(self) )->virtualbase_Event(event); +} + +void QLayout_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__EventFilter = slot; +} + +bool QLayout_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQLayout*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QLayout_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__TimerEvent = slot; +} + +void QLayout_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQLayout*)(self) )->virtualbase_TimerEvent(event); +} + +void QLayout_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__CustomEvent = slot; +} + +void QLayout_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQLayout*)(self) )->virtualbase_CustomEvent(event); +} + +void QLayout_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__ConnectNotify = slot; +} + +void QLayout_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQLayout*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QLayout_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__DisconnectNotify = slot; +} + +void QLayout_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQLayout*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__SizeHint = slot; +} + +void QLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QLayout_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QLayout_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__HeightForWidth = slot; +} + +int QLayout_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QLayout_override_virtual_Widget(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__Widget = slot; +} + +QWidget* QLayout_virtualbase_Widget(void* self) { + return ( (MiqtVirtualQLayout*)(self) )->virtualbase_Widget(); +} + +void QLayout_override_virtual_SpacerItem(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__SpacerItem = slot; +} + +QSpacerItem* QLayout_virtualbase_SpacerItem(void* self) { + return ( (MiqtVirtualQLayout*)(self) )->virtualbase_SpacerItem(); +} + void QLayout_Delete(QLayout* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qlayout.go b/qt/gen_qlayout.go index 1eb0e99e..90773cd9 100644 --- a/qt/gen_qlayout.go +++ b/qt/gen_qlayout.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -66,6 +67,30 @@ func UnsafeNewQLayout(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem QLayoutItem: UnsafeNewQLayoutItem(h_QLayoutItem)} } +// NewQLayout constructs a new QLayout object. +func NewQLayout(parent *QWidget) *QLayout { + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QLayout_new(parent.cPointer(), &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQLayout(outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret +} + +// NewQLayout2 constructs a new QLayout object. +func NewQLayout2() *QLayout { + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QLayout_new2(&outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQLayout(outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret +} + func (this *QLayout) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QLayout_MetaObject(this.h))) } @@ -345,6 +370,603 @@ func (this *QLayout) ReplaceWidget3(from *QWidget, to *QWidget, options FindChil return UnsafeNewQLayoutItem(unsafe.Pointer(C.QLayout_ReplaceWidget3(this.h, from.cPointer(), to.cPointer(), (C.int)(options)))) } +func (this *QLayout) callVirtualBase_Invalidate() { + + C.QLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QLayout) OnInvalidate(slot func(super func())) { + C.QLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_Invalidate +func miqt_exec_callback_QLayout_Invalidate(self *C.QLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QLayout) callVirtualBase_Geometry() *QRect { + + _ret := C.QLayout_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 *QLayout) OnGeometry(slot func(super func() *QRect) *QRect) { + C.QLayout_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_Geometry +func miqt_exec_callback_QLayout_Geometry(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_Geometry) + + return virtualReturn.cPointer() + +} +func (this *QLayout) OnAddItem(slot func(param1 *QLayoutItem)) { + C.QLayout_override_virtual_AddItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_AddItem +func miqt_exec_callback_QLayout_AddItem(self *C.QLayout, cb C.intptr_t, param1 *C.QLayoutItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + +} + +func (this *QLayout) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QLayout_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QLayout) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QLayout_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_ExpandingDirections +func miqt_exec_callback_QLayout_ExpandingDirections(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QLayout_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 *QLayout) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QLayout_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_MinimumSize +func miqt_exec_callback_QLayout_MinimumSize(self *C.QLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLayout{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QLayout) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QLayout_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 *QLayout) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QLayout_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_MaximumSize +func miqt_exec_callback_QLayout_MaximumSize(self *C.QLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLayout{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QLayout) callVirtualBase_SetGeometry(geometry *QRect) { + + C.QLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), geometry.cPointer()) + +} +func (this *QLayout) OnSetGeometry(slot func(super func(geometry *QRect), geometry *QRect)) { + C.QLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_SetGeometry +func miqt_exec_callback_QLayout_SetGeometry(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} +func (this *QLayout) OnItemAt(slot func(index int) *QLayoutItem) { + C.QLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_ItemAt +func miqt_exec_callback_QLayout_ItemAt(self *C.QLayout, cb C.intptr_t, index C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} +func (this *QLayout) OnTakeAt(slot func(index int) *QLayoutItem) { + C.QLayout_override_virtual_TakeAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_TakeAt +func miqt_exec_callback_QLayout_TakeAt(self *C.QLayout, cb C.intptr_t, index C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QLayout) callVirtualBase_IndexOf(param1 *QWidget) int { + + return (int)(C.QLayout_virtualbase_IndexOf(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QLayout) OnIndexOf(slot func(super func(param1 *QWidget) int, param1 *QWidget) int) { + C.QLayout_override_virtual_IndexOf(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_IndexOf +func miqt_exec_callback_QLayout_IndexOf(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_IndexOf, slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QLayout) OnCount(slot func() int) { + C.QLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_Count +func miqt_exec_callback_QLayout_Count(self *C.QLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QLayout_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QLayout) OnIsEmpty(slot func(super func() bool) bool) { + C.QLayout_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_IsEmpty +func miqt_exec_callback_QLayout_IsEmpty(self *C.QLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLayout{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QLayout_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QLayout) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QLayout_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_ControlTypes +func miqt_exec_callback_QLayout_ControlTypes(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_Layout() *QLayout { + + return UnsafeNewQLayout(unsafe.Pointer(C.QLayout_virtualbase_Layout(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { + C.QLayout_override_virtual_Layout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_Layout +func miqt_exec_callback_QLayout_Layout(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_Layout) + + return virtualReturn.cPointer() + +} + +func (this *QLayout) callVirtualBase_ChildEvent(e *QChildEvent) { + + C.QLayout_virtualbase_ChildEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QLayout) OnChildEvent(slot func(super func(e *QChildEvent), e *QChildEvent)) { + C.QLayout_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_ChildEvent +func miqt_exec_callback_QLayout_ChildEvent(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QLayout) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QLayout_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QLayout) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QLayout_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_Event +func miqt_exec_callback_QLayout_Event(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QLayout_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QLayout) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QLayout_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_EventFilter +func miqt_exec_callback_QLayout_EventFilter(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QLayout_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLayout) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QLayout_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_TimerEvent +func miqt_exec_callback_QLayout_TimerEvent(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QLayout) callVirtualBase_CustomEvent(event *QEvent) { + + C.QLayout_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLayout) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QLayout_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_CustomEvent +func miqt_exec_callback_QLayout_CustomEvent(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QLayout) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QLayout_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QLayout) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QLayout_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_ConnectNotify +func miqt_exec_callback_QLayout_ConnectNotify(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QLayout) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QLayout_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QLayout) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QLayout_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_DisconnectNotify +func miqt_exec_callback_QLayout_DisconnectNotify(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} +func (this *QLayout) OnSizeHint(slot func() *QSize) { + C.QLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_SizeHint +func miqt_exec_callback_QLayout_SizeHint(self *C.QLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func() *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} + +func (this *QLayout) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QLayout_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QLayout) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QLayout_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_HasHeightForWidth +func miqt_exec_callback_QLayout_HasHeightForWidth(self *C.QLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLayout{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QLayout_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QLayout) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QLayout_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_HeightForWidth +func miqt_exec_callback_QLayout_HeightForWidth(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QLayout_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QLayout) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QLayout_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_MinimumHeightForWidth +func miqt_exec_callback_QLayout_MinimumHeightForWidth(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_Widget() *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QLayout_virtualbase_Widget(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QLayout) OnWidget(slot func(super func() *QWidget) *QWidget) { + C.QLayout_override_virtual_Widget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_Widget +func miqt_exec_callback_QLayout_Widget(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_Widget) + + return virtualReturn.cPointer() + +} + +func (this *QLayout) callVirtualBase_SpacerItem() *QSpacerItem { + + return UnsafeNewQSpacerItem(unsafe.Pointer(C.QLayout_virtualbase_SpacerItem(unsafe.Pointer(this.h))), nil) +} +func (this *QLayout) OnSpacerItem(slot func(super func() *QSpacerItem) *QSpacerItem) { + C.QLayout_override_virtual_SpacerItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_SpacerItem +func miqt_exec_callback_QLayout_SpacerItem(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_SpacerItem) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QLayout) Delete() { C.QLayout_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qlayout.h b/qt/gen_qlayout.h index bc8fa836..d2501246 100644 --- a/qt/gen_qlayout.h +++ b/qt/gen_qlayout.h @@ -16,26 +16,36 @@ extern "C" { #ifdef __cplusplus class QChildEvent; +class QEvent; class QLayout; class QLayoutItem; class QMargins; +class QMetaMethod; class QMetaObject; class QObject; class QRect; class QSize; +class QSpacerItem; +class QTimerEvent; class QWidget; #else typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QLayout QLayout; typedef struct QLayoutItem QLayoutItem; typedef struct QMargins QMargins; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSize QSize; +typedef struct QSpacerItem QSpacerItem; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif +void QLayout_new(QWidget* parent, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +void QLayout_new2(QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); QMetaObject* QLayout_MetaObject(const QLayout* self); void* QLayout_Metacast(QLayout* self, const char* param1); struct miqt_string QLayout_Tr(const char* s); @@ -90,6 +100,60 @@ 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_override_virtual_Invalidate(void* self, intptr_t slot); +void QLayout_virtualbase_Invalidate(void* self); +void QLayout_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QLayout_virtualbase_Geometry(const void* self); +void QLayout_override_virtual_AddItem(void* self, intptr_t slot); +void QLayout_virtualbase_AddItem(void* self, QLayoutItem* param1); +void QLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QLayout_virtualbase_ExpandingDirections(const void* self); +void QLayout_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QLayout_virtualbase_MinimumSize(const void* self); +void QLayout_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QLayout_virtualbase_MaximumSize(const void* self); +void QLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QLayout_virtualbase_SetGeometry(void* self, QRect* geometry); +void QLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QLayoutItem* QLayout_virtualbase_ItemAt(const void* self, int index); +void QLayout_override_virtual_TakeAt(void* self, intptr_t slot); +QLayoutItem* QLayout_virtualbase_TakeAt(void* self, int index); +void QLayout_override_virtual_IndexOf(void* self, intptr_t slot); +int QLayout_virtualbase_IndexOf(const void* self, QWidget* param1); +void QLayout_override_virtual_Count(void* self, intptr_t slot); +int QLayout_virtualbase_Count(const void* self); +void QLayout_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QLayout_virtualbase_IsEmpty(const void* self); +void QLayout_override_virtual_ControlTypes(void* self, intptr_t slot); +int QLayout_virtualbase_ControlTypes(const void* self); +void QLayout_override_virtual_Layout(void* self, intptr_t slot); +QLayout* QLayout_virtualbase_Layout(void* self); +void QLayout_override_virtual_ChildEvent(void* self, intptr_t slot); +void QLayout_virtualbase_ChildEvent(void* self, QChildEvent* e); +void QLayout_override_virtual_Event(void* self, intptr_t slot); +bool QLayout_virtualbase_Event(void* self, QEvent* event); +void QLayout_override_virtual_EventFilter(void* self, intptr_t slot); +bool QLayout_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QLayout_override_virtual_TimerEvent(void* self, intptr_t slot); +void QLayout_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QLayout_override_virtual_CustomEvent(void* self, intptr_t slot); +void QLayout_virtualbase_CustomEvent(void* self, QEvent* event); +void QLayout_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QLayout_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QLayout_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QLayout_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QLayout_virtualbase_SizeHint(const void* self); +void QLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QLayout_virtualbase_HasHeightForWidth(const void* self); +void QLayout_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QLayout_virtualbase_HeightForWidth(const void* self, int param1); +void QLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QLayout_override_virtual_Widget(void* self, intptr_t slot); +QWidget* QLayout_virtualbase_Widget(void* self); +void QLayout_override_virtual_SpacerItem(void* self, intptr_t slot); +QSpacerItem* QLayout_virtualbase_SpacerItem(void* self); void QLayout_Delete(QLayout* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qlayoutitem.cpp b/qt/gen_qlayoutitem.cpp index c582ee1a..68872439 100644 --- a/qt/gen_qlayoutitem.cpp +++ b/qt/gen_qlayoutitem.cpp @@ -11,6 +11,320 @@ #include "gen_qlayoutitem.h" #include "_cgo_export.h" +class MiqtVirtualQLayoutItem : public virtual QLayoutItem { +public: + + MiqtVirtualQLayoutItem(): QLayoutItem() {}; + MiqtVirtualQLayoutItem(const QLayoutItem& param1): QLayoutItem(param1) {}; + MiqtVirtualQLayoutItem(Qt::Alignment alignment): QLayoutItem(alignment) {}; + + virtual ~MiqtVirtualQLayoutItem() = 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 QSize(); // Pure virtual, there is no base we can call + } + + + QSize* callback_return_value = miqt_exec_callback_QLayoutItem_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // 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 QSize(); // Pure virtual, there is no base we can call + } + + + QSize* callback_return_value = miqt_exec_callback_QLayoutItem_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // 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 QSize(); // Pure virtual, there is no base we can call + } + + + QSize* callback_return_value = miqt_exec_callback_QLayoutItem_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // 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 Qt::Orientations(); // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QLayoutItem_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QLayoutItem_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // 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 QRect(); // Pure virtual, there is no base we can call + } + + + QRect* callback_return_value = miqt_exec_callback_QLayoutItem_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // 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 false; // Pure virtual, there is no base we can call + } + + + bool callback_return_value = miqt_exec_callback_QLayoutItem_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // 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 QLayoutItem::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QLayoutItem_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QLayoutItem::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 QLayoutItem::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QLayoutItem_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 QLayoutItem::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 QLayoutItem::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QLayoutItem_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 QLayoutItem::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) { + QLayoutItem::invalidate(); + return; + } + + + miqt_exec_callback_QLayoutItem_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QLayoutItem::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 QLayoutItem::widget(); + } + + + QWidget* callback_return_value = miqt_exec_callback_QLayoutItem_Widget(this, handle__Widget); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_Widget() { + + return QLayoutItem::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 QLayoutItem::layout(); + } + + + QLayout* callback_return_value = miqt_exec_callback_QLayoutItem_Layout(this, handle__Layout); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayout* virtualbase_Layout() { + + return QLayoutItem::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 QLayoutItem::spacerItem(); + } + + + QSpacerItem* callback_return_value = miqt_exec_callback_QLayoutItem_SpacerItem(this, handle__SpacerItem); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QSpacerItem* virtualbase_SpacerItem() { + + return QLayoutItem::spacerItem(); + + } + + // 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 QLayoutItem::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QLayoutItem_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 = QLayoutItem::controlTypes(); + return static_cast(_ret); + + } + +}; + +void QLayoutItem_new(QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQLayoutItem* ret = new MiqtVirtualQLayoutItem(); + *outptr_QLayoutItem = ret; +} + +void QLayoutItem_new2(QLayoutItem* param1, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQLayoutItem* ret = new MiqtVirtualQLayoutItem(*param1); + *outptr_QLayoutItem = ret; +} + +void QLayoutItem_new3(int alignment, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQLayoutItem* ret = new MiqtVirtualQLayoutItem(static_cast(alignment)); + *outptr_QLayoutItem = ret; +} + QSize* QLayoutItem_SizeHint(const QLayoutItem* self) { return new QSize(self->sizeHint()); } @@ -82,9 +396,101 @@ int QLayoutItem_ControlTypes(const QLayoutItem* self) { return static_cast(_ret); } +void QLayoutItem_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__SizeHint = slot; +} + +void QLayoutItem_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__MinimumSize = slot; +} + +void QLayoutItem_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__MaximumSize = slot; +} + +void QLayoutItem_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__ExpandingDirections = slot; +} + +void QLayoutItem_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__SetGeometry = slot; +} + +void QLayoutItem_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__Geometry = slot; +} + +void QLayoutItem_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__IsEmpty = slot; +} + +void QLayoutItem_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QLayoutItem_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQLayoutItem*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QLayoutItem_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__HeightForWidth = slot; +} + +int QLayoutItem_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQLayoutItem*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QLayoutItem_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QLayoutItem_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQLayoutItem*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QLayoutItem_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__Invalidate = slot; +} + +void QLayoutItem_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQLayoutItem*)(self) )->virtualbase_Invalidate(); +} + +void QLayoutItem_override_virtual_Widget(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__Widget = slot; +} + +QWidget* QLayoutItem_virtualbase_Widget(void* self) { + return ( (MiqtVirtualQLayoutItem*)(self) )->virtualbase_Widget(); +} + +void QLayoutItem_override_virtual_Layout(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__Layout = slot; +} + +QLayout* QLayoutItem_virtualbase_Layout(void* self) { + return ( (MiqtVirtualQLayoutItem*)(self) )->virtualbase_Layout(); +} + +void QLayoutItem_override_virtual_SpacerItem(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__SpacerItem = slot; +} + +QSpacerItem* QLayoutItem_virtualbase_SpacerItem(void* self) { + return ( (MiqtVirtualQLayoutItem*)(self) )->virtualbase_SpacerItem(); +} + +void QLayoutItem_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__ControlTypes = slot; +} + +int QLayoutItem_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQLayoutItem*)(self) )->virtualbase_ControlTypes(); +} + void QLayoutItem_Delete(QLayoutItem* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qlayoutitem.go b/qt/gen_qlayoutitem.go index 13b0b027..d5fb57a1 100644 --- a/qt/gen_qlayoutitem.go +++ b/qt/gen_qlayoutitem.go @@ -50,6 +50,36 @@ func UnsafeNewQLayoutItem(h unsafe.Pointer) *QLayoutItem { return &QLayoutItem{h: (*C.QLayoutItem)(h)} } +// NewQLayoutItem constructs a new QLayoutItem object. +func NewQLayoutItem() *QLayoutItem { + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QLayoutItem_new(&outptr_QLayoutItem) + ret := newQLayoutItem(outptr_QLayoutItem) + ret.isSubclass = true + return ret +} + +// NewQLayoutItem2 constructs a new QLayoutItem object. +func NewQLayoutItem2(param1 *QLayoutItem) *QLayoutItem { + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QLayoutItem_new2(param1.cPointer(), &outptr_QLayoutItem) + ret := newQLayoutItem(outptr_QLayoutItem) + ret.isSubclass = true + return ret +} + +// NewQLayoutItem3 constructs a new QLayoutItem object. +func NewQLayoutItem3(alignment AlignmentFlag) *QLayoutItem { + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QLayoutItem_new3((C.int)(alignment), &outptr_QLayoutItem) + ret := newQLayoutItem(outptr_QLayoutItem) + ret.isSubclass = true + return ret +} + func (this *QLayoutItem) SizeHint() *QSize { _ret := C.QLayoutItem_SizeHint(this.h) _goptr := newQSize(_ret) @@ -129,6 +159,296 @@ func (this *QLayoutItem) SetAlignment(a AlignmentFlag) { func (this *QLayoutItem) ControlTypes() QSizePolicy__ControlType { return (QSizePolicy__ControlType)(C.QLayoutItem_ControlTypes(this.h)) } +func (this *QLayoutItem) OnSizeHint(slot func() *QSize) { + C.QLayoutItem_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_SizeHint +func miqt_exec_callback_QLayoutItem_SizeHint(self *C.QLayoutItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func() *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} +func (this *QLayoutItem) OnMinimumSize(slot func() *QSize) { + C.QLayoutItem_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_MinimumSize +func miqt_exec_callback_QLayoutItem_MinimumSize(self *C.QLayoutItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func() *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} +func (this *QLayoutItem) OnMaximumSize(slot func() *QSize) { + C.QLayoutItem_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_MaximumSize +func miqt_exec_callback_QLayoutItem_MaximumSize(self *C.QLayoutItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func() *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} +func (this *QLayoutItem) OnExpandingDirections(slot func() Orientation) { + C.QLayoutItem_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_ExpandingDirections +func miqt_exec_callback_QLayoutItem_ExpandingDirections(self *C.QLayoutItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *QLayoutItem) OnSetGeometry(slot func(geometry *QRect)) { + C.QLayoutItem_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_SetGeometry +func miqt_exec_callback_QLayoutItem_SetGeometry(self *C.QLayoutItem, cb C.intptr_t, geometry *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + +} +func (this *QLayoutItem) OnGeometry(slot func() *QRect) { + C.QLayoutItem_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_Geometry +func miqt_exec_callback_QLayoutItem_Geometry(self *C.QLayoutItem, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func() *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} +func (this *QLayoutItem) OnIsEmpty(slot func() bool) { + C.QLayoutItem_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_IsEmpty +func miqt_exec_callback_QLayoutItem_IsEmpty(self *C.QLayoutItem, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func() bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.bool)(virtualReturn) + +} + +func (this *QLayoutItem) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QLayoutItem_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QLayoutItem) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QLayoutItem_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_HasHeightForWidth +func miqt_exec_callback_QLayoutItem_HasHeightForWidth(self *C.QLayoutItem, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLayoutItem{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QLayoutItem) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QLayoutItem_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QLayoutItem) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QLayoutItem_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_HeightForWidth +func miqt_exec_callback_QLayoutItem_HeightForWidth(self *C.QLayoutItem, 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((&QLayoutItem{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QLayoutItem) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QLayoutItem_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QLayoutItem) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QLayoutItem_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_MinimumHeightForWidth +func miqt_exec_callback_QLayoutItem_MinimumHeightForWidth(self *C.QLayoutItem, 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((&QLayoutItem{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QLayoutItem) callVirtualBase_Invalidate() { + + C.QLayoutItem_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QLayoutItem) OnInvalidate(slot func(super func())) { + C.QLayoutItem_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_Invalidate +func miqt_exec_callback_QLayoutItem_Invalidate(self *C.QLayoutItem, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QLayoutItem{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QLayoutItem) callVirtualBase_Widget() *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QLayoutItem_virtualbase_Widget(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QLayoutItem) OnWidget(slot func(super func() *QWidget) *QWidget) { + C.QLayoutItem_override_virtual_Widget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_Widget +func miqt_exec_callback_QLayoutItem_Widget(self *C.QLayoutItem, 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((&QLayoutItem{h: self}).callVirtualBase_Widget) + + return virtualReturn.cPointer() + +} + +func (this *QLayoutItem) callVirtualBase_Layout() *QLayout { + + return UnsafeNewQLayout(unsafe.Pointer(C.QLayoutItem_virtualbase_Layout(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QLayoutItem) OnLayout(slot func(super func() *QLayout) *QLayout) { + C.QLayoutItem_override_virtual_Layout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_Layout +func miqt_exec_callback_QLayoutItem_Layout(self *C.QLayoutItem, 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((&QLayoutItem{h: self}).callVirtualBase_Layout) + + return virtualReturn.cPointer() + +} + +func (this *QLayoutItem) callVirtualBase_SpacerItem() *QSpacerItem { + + return UnsafeNewQSpacerItem(unsafe.Pointer(C.QLayoutItem_virtualbase_SpacerItem(unsafe.Pointer(this.h))), nil) +} +func (this *QLayoutItem) OnSpacerItem(slot func(super func() *QSpacerItem) *QSpacerItem) { + C.QLayoutItem_override_virtual_SpacerItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_SpacerItem +func miqt_exec_callback_QLayoutItem_SpacerItem(self *C.QLayoutItem, 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((&QLayoutItem{h: self}).callVirtualBase_SpacerItem) + + return virtualReturn.cPointer() + +} + +func (this *QLayoutItem) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QLayoutItem_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QLayoutItem) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QLayoutItem_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_ControlTypes +func miqt_exec_callback_QLayoutItem_ControlTypes(self *C.QLayoutItem, 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((&QLayoutItem{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} // Delete this object from C++ memory. func (this *QLayoutItem) Delete() { diff --git a/qt/gen_qlayoutitem.h b/qt/gen_qlayoutitem.h index 8def6c1a..b593e34a 100644 --- a/qt/gen_qlayoutitem.h +++ b/qt/gen_qlayoutitem.h @@ -36,6 +36,9 @@ typedef struct QWidgetItem QWidgetItem; typedef struct QWidgetItemV2 QWidgetItemV2; #endif +void QLayoutItem_new(QLayoutItem** outptr_QLayoutItem); +void QLayoutItem_new2(QLayoutItem* param1, QLayoutItem** outptr_QLayoutItem); +void QLayoutItem_new3(int alignment, QLayoutItem** outptr_QLayoutItem); QSize* QLayoutItem_SizeHint(const QLayoutItem* self); QSize* QLayoutItem_MinimumSize(const QLayoutItem* self); QSize* QLayoutItem_MaximumSize(const QLayoutItem* self); @@ -53,6 +56,36 @@ 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_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QLayoutItem_virtualbase_SizeHint(const void* self); +void QLayoutItem_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QLayoutItem_virtualbase_MinimumSize(const void* self); +void QLayoutItem_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QLayoutItem_virtualbase_MaximumSize(const void* self); +void QLayoutItem_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QLayoutItem_virtualbase_ExpandingDirections(const void* self); +void QLayoutItem_override_virtual_SetGeometry(void* self, intptr_t slot); +void QLayoutItem_virtualbase_SetGeometry(void* self, QRect* geometry); +void QLayoutItem_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QLayoutItem_virtualbase_Geometry(const void* self); +void QLayoutItem_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QLayoutItem_virtualbase_IsEmpty(const void* self); +void QLayoutItem_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QLayoutItem_virtualbase_HasHeightForWidth(const void* self); +void QLayoutItem_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QLayoutItem_virtualbase_HeightForWidth(const void* self, int param1); +void QLayoutItem_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QLayoutItem_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QLayoutItem_override_virtual_Invalidate(void* self, intptr_t slot); +void QLayoutItem_virtualbase_Invalidate(void* self); +void QLayoutItem_override_virtual_Widget(void* self, intptr_t slot); +QWidget* QLayoutItem_virtualbase_Widget(void* self); +void QLayoutItem_override_virtual_Layout(void* self, intptr_t slot); +QLayout* QLayoutItem_virtualbase_Layout(void* self); +void QLayoutItem_override_virtual_SpacerItem(void* self, intptr_t slot); +QSpacerItem* QLayoutItem_virtualbase_SpacerItem(void* self); +void QLayoutItem_override_virtual_ControlTypes(void* self, intptr_t slot); +int QLayoutItem_virtualbase_ControlTypes(const void* self); void QLayoutItem_Delete(QLayoutItem* self, bool isSubclass); void QSpacerItem_new(int w, int h, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); diff --git a/qt/gen_qlistview.cpp b/qt/gen_qlistview.cpp index 1e98abe6..0d34329c 100644 --- a/qt/gen_qlistview.cpp +++ b/qt/gen_qlistview.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -21,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -703,6 +705,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QListView::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QListView_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QListView::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__SelectedIndexes = 0; @@ -788,6 +815,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QListView::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QListView_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QListView::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__CurrentChanged = 0; @@ -2007,6 +2063,14 @@ void QListView_virtualbase_SetSelection(void* self, QRect* rect, int command) { ( (MiqtVirtualQListView*)(self) )->virtualbase_SetSelection(rect, command); } +void QListView_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QListView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QListView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { dynamic_cast( (QListView*)(self) )->handle__SelectedIndexes = slot; } @@ -2031,6 +2095,14 @@ bool QListView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { return ( (const MiqtVirtualQListView*)(self) )->virtualbase_IsIndexHidden(index); } +void QListView_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SelectionChanged = slot; +} + +void QListView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QListView_override_virtual_CurrentChanged(void* self, intptr_t slot) { dynamic_cast( (QListView*)(self) )->handle__CurrentChanged = slot; } diff --git a/qt/gen_qlistview.go b/qt/gen_qlistview.go index c2deb50c..23631101 100644 --- a/qt/gen_qlistview.go +++ b/qt/gen_qlistview.go @@ -1020,6 +1020,34 @@ func miqt_exec_callback_QListView_SetSelection(self *C.QListView, cb C.intptr_t, } +func (this *QListView) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QListView_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListView) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QListView_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_VisualRegionForSelection +func miqt_exec_callback_QListView_VisualRegionForSelection(self *C.QListView, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QListView) callVirtualBase_SelectedIndexes() []QModelIndex { var _ma C.struct_miqt_array = C.QListView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) @@ -1102,6 +1130,30 @@ func miqt_exec_callback_QListView_IsIndexHidden(self *C.QListView, cb C.intptr_t } +func (this *QListView) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QListView_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QListView) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QListView_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SelectionChanged +func miqt_exec_callback_QListView_SelectionChanged(self *C.QListView, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QListView{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QListView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { C.QListView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) diff --git a/qt/gen_qlistview.h b/qt/gen_qlistview.h index 142741e7..fd506c3e 100644 --- a/qt/gen_qlistview.h +++ b/qt/gen_qlistview.h @@ -26,6 +26,7 @@ class QEvent; class QFocusEvent; class QFrame; class QInputMethodEvent; +class QItemSelection; class QItemSelectionModel; class QKeyEvent; class QListView; @@ -37,6 +38,7 @@ class QPaintDevice; class QPaintEvent; class QPoint; class QRect; +class QRegion; class QResizeEvent; class QSize; class QStyleOptionViewItem; @@ -56,6 +58,7 @@ typedef struct QEvent QEvent; typedef struct QFocusEvent QFocusEvent; typedef struct QFrame QFrame; typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QKeyEvent QKeyEvent; typedef struct QListView QListView; @@ -67,6 +70,7 @@ typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; @@ -141,9 +145,11 @@ 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); +QRegion* QListView_VisualRegionForSelection(const QListView* self, QItemSelection* selection); 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_SelectionChanged(QListView* self, QItemSelection* selected, QItemSelection* deselected); 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); @@ -202,12 +208,16 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QListView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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_SelectionChanged(void* self, intptr_t slot); +void QListView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt/gen_qlistwidget.cpp b/qt/gen_qlistwidget.cpp index 3904f611..a9ce73c1 100644 --- a/qt/gen_qlistwidget.cpp +++ b/qt/gen_qlistwidget.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -24,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -1373,6 +1375,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QListWidget::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QListWidget_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QListWidget::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__SelectedIndexes = 0; @@ -1458,6 +1485,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QListWidget::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QListWidget_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QListWidget::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__CurrentChanged = 0; @@ -2174,6 +2230,14 @@ void QListWidget_virtualbase_SetSelection(void* self, QRect* rect, int command) ( (MiqtVirtualQListWidget*)(self) )->virtualbase_SetSelection(rect, command); } +void QListWidget_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QListWidget_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QListWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot) { dynamic_cast( (QListWidget*)(self) )->handle__SelectedIndexes = slot; } @@ -2198,6 +2262,14 @@ bool QListWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_IsIndexHidden(index); } +void QListWidget_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__SelectionChanged = slot; +} + +void QListWidget_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QListWidget_override_virtual_CurrentChanged(void* self, intptr_t slot) { dynamic_cast( (QListWidget*)(self) )->handle__CurrentChanged = slot; } diff --git a/qt/gen_qlistwidget.go b/qt/gen_qlistwidget.go index 3401039f..da607ef0 100644 --- a/qt/gen_qlistwidget.go +++ b/qt/gen_qlistwidget.go @@ -1925,6 +1925,34 @@ func miqt_exec_callback_QListWidget_SetSelection(self *C.QListWidget, cb C.intpt } +func (this *QListWidget) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QListWidget_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListWidget) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QListWidget_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_VisualRegionForSelection +func miqt_exec_callback_QListWidget_VisualRegionForSelection(self *C.QListWidget, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QListWidget) callVirtualBase_SelectedIndexes() []QModelIndex { var _ma C.struct_miqt_array = C.QListWidget_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) @@ -2007,6 +2035,30 @@ func miqt_exec_callback_QListWidget_IsIndexHidden(self *C.QListWidget, cb C.intp } +func (this *QListWidget) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QListWidget_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QListWidget) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QListWidget_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_SelectionChanged +func miqt_exec_callback_QListWidget_SelectionChanged(self *C.QListWidget, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QListWidget{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QListWidget) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { C.QListWidget_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) diff --git a/qt/gen_qlistwidget.h b/qt/gen_qlistwidget.h index a2f16c32..6a1de9bb 100644 --- a/qt/gen_qlistwidget.h +++ b/qt/gen_qlistwidget.h @@ -27,6 +27,7 @@ class QEvent; class QFont; class QFrame; class QIcon; +class QItemSelection; class QItemSelectionModel; class QListView; class QListWidget; @@ -40,6 +41,7 @@ class QPaintDevice; class QPaintEvent; class QPoint; class QRect; +class QRegion; class QResizeEvent; class QSize; class QStyleOptionViewItem; @@ -60,6 +62,7 @@ typedef struct QEvent QEvent; typedef struct QFont QFont; typedef struct QFrame QFrame; typedef struct QIcon QIcon; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QListView QListView; typedef struct QListWidget QListWidget; @@ -73,6 +76,7 @@ typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; @@ -287,12 +291,16 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QListWidget_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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_SelectionChanged(void* self, intptr_t slot); +void QListWidget_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt/gen_qpagedpaintdevice.cpp b/qt/gen_qpagedpaintdevice.cpp index 24fa2a60..12b13edb 100644 --- a/qt/gen_qpagedpaintdevice.cpp +++ b/qt/gen_qpagedpaintdevice.cpp @@ -4,11 +4,251 @@ #include #define WORKAROUND_INNER_CLASS_DEFINITION_QPagedPaintDevice__Margins #include +#include +#include +#include #include #include #include "gen_qpagedpaintdevice.h" #include "_cgo_export.h" +class MiqtVirtualQPagedPaintDevice : public virtual QPagedPaintDevice { +public: + + MiqtVirtualQPagedPaintDevice(): QPagedPaintDevice() {}; + + virtual ~MiqtVirtualQPagedPaintDevice() = 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 false; // Pure virtual, there is no base we can call + } + + + bool callback_return_value = miqt_exec_callback_QPagedPaintDevice_NewPage(this, handle__NewPage); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetPageSizeWithSize = 0; + + // Subclass to allow providing a Go implementation + virtual void setPageSize(QPagedPaintDevice::PageSize size) override { + if (handle__SetPageSizeWithSize == 0) { + QPagedPaintDevice::setPageSize(size); + return; + } + + QPagedPaintDevice::PageSize size_ret = size; + int sigval1 = static_cast(size_ret); + + miqt_exec_callback_QPagedPaintDevice_SetPageSizeWithSize(this, handle__SetPageSizeWithSize, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPageSizeWithSize(int size) { + + QPagedPaintDevice::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) { + QPagedPaintDevice::setPageSizeMM(size); + return; + } + + const QSizeF& size_ret = size; + // Cast returned reference into pointer + QSizeF* sigval1 = const_cast(&size_ret); + + miqt_exec_callback_QPagedPaintDevice_SetPageSizeMM(this, handle__SetPageSizeMM, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetPageSizeMM(QSizeF* size) { + + QPagedPaintDevice::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& margins) override { + if (handle__SetMargins == 0) { + QPagedPaintDevice::setMargins(margins); + return; + } + + const QPagedPaintDevice::Margins& margins_ret = margins; + // Cast returned reference into pointer + QPagedPaintDevice__Margins* sigval1 = const_cast(&margins_ret); + + miqt_exec_callback_QPagedPaintDevice_SetMargins(this, handle__SetMargins, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetMargins(QPagedPaintDevice__Margins* margins) { + + QPagedPaintDevice::setMargins(*margins); + + } + + // 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 QPagedPaintDevice::devType(); + } + + + int callback_return_value = miqt_exec_callback_QPagedPaintDevice_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QPagedPaintDevice::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 nullptr; // Pure virtual, there is no base we can call + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QPagedPaintDevice_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // 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 QPagedPaintDevice::metric(metric); + } + + QPaintDevice::PaintDeviceMetric metric_ret = metric; + int sigval1 = static_cast(metric_ret); + + int callback_return_value = miqt_exec_callback_QPagedPaintDevice_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 QPagedPaintDevice::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) { + QPagedPaintDevice::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QPagedPaintDevice_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QPagedPaintDevice::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 QPagedPaintDevice::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QPagedPaintDevice_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QPagedPaintDevice::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 QPagedPaintDevice::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QPagedPaintDevice_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QPagedPaintDevice::sharedPainter(); + + } + +}; + +void QPagedPaintDevice_new(QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQPagedPaintDevice* ret = new MiqtVirtualQPagedPaintDevice(); + *outptr_QPagedPaintDevice = ret; + *outptr_QPaintDevice = static_cast(ret); +} + bool QPagedPaintDevice_NewPage(QPagedPaintDevice* self) { return self->newPage(); } @@ -62,9 +302,81 @@ QPagedPaintDevice__Margins* QPagedPaintDevice_Margins(const QPagedPaintDevice* s return new QPagedPaintDevice::Margins(self->margins()); } +void QPagedPaintDevice_override_virtual_NewPage(void* self, intptr_t slot) { + dynamic_cast( (QPagedPaintDevice*)(self) )->handle__NewPage = slot; +} + +void QPagedPaintDevice_override_virtual_SetPageSizeWithSize(void* self, intptr_t slot) { + dynamic_cast( (QPagedPaintDevice*)(self) )->handle__SetPageSizeWithSize = slot; +} + +void QPagedPaintDevice_virtualbase_SetPageSizeWithSize(void* self, int size) { + ( (MiqtVirtualQPagedPaintDevice*)(self) )->virtualbase_SetPageSizeWithSize(size); +} + +void QPagedPaintDevice_override_virtual_SetPageSizeMM(void* self, intptr_t slot) { + dynamic_cast( (QPagedPaintDevice*)(self) )->handle__SetPageSizeMM = slot; +} + +void QPagedPaintDevice_virtualbase_SetPageSizeMM(void* self, QSizeF* size) { + ( (MiqtVirtualQPagedPaintDevice*)(self) )->virtualbase_SetPageSizeMM(size); +} + +void QPagedPaintDevice_override_virtual_SetMargins(void* self, intptr_t slot) { + dynamic_cast( (QPagedPaintDevice*)(self) )->handle__SetMargins = slot; +} + +void QPagedPaintDevice_virtualbase_SetMargins(void* self, QPagedPaintDevice__Margins* margins) { + ( (MiqtVirtualQPagedPaintDevice*)(self) )->virtualbase_SetMargins(margins); +} + +void QPagedPaintDevice_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QPagedPaintDevice*)(self) )->handle__DevType = slot; +} + +int QPagedPaintDevice_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQPagedPaintDevice*)(self) )->virtualbase_DevType(); +} + +void QPagedPaintDevice_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QPagedPaintDevice*)(self) )->handle__PaintEngine = slot; +} + +void QPagedPaintDevice_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QPagedPaintDevice*)(self) )->handle__Metric = slot; +} + +int QPagedPaintDevice_virtualbase_Metric(const void* self, int metric) { + return ( (const MiqtVirtualQPagedPaintDevice*)(self) )->virtualbase_Metric(metric); +} + +void QPagedPaintDevice_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QPagedPaintDevice*)(self) )->handle__InitPainter = slot; +} + +void QPagedPaintDevice_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQPagedPaintDevice*)(self) )->virtualbase_InitPainter(painter); +} + +void QPagedPaintDevice_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QPagedPaintDevice*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QPagedPaintDevice_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQPagedPaintDevice*)(self) )->virtualbase_Redirected(offset); +} + +void QPagedPaintDevice_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QPagedPaintDevice*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QPagedPaintDevice_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQPagedPaintDevice*)(self) )->virtualbase_SharedPainter(); +} + void QPagedPaintDevice_Delete(QPagedPaintDevice* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qpagedpaintdevice.go b/qt/gen_qpagedpaintdevice.go index c9137db7..bf52630e 100644 --- a/qt/gen_qpagedpaintdevice.go +++ b/qt/gen_qpagedpaintdevice.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -192,6 +193,17 @@ func UnsafeNewQPagedPaintDevice(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} } +// NewQPagedPaintDevice constructs a new QPagedPaintDevice object. +func NewQPagedPaintDevice() *QPagedPaintDevice { + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QPagedPaintDevice_new(&outptr_QPagedPaintDevice, &outptr_QPaintDevice) + ret := newQPagedPaintDevice(outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + func (this *QPagedPaintDevice) NewPage() bool { return (bool)(C.QPagedPaintDevice_NewPage(this.h)) } @@ -252,6 +264,222 @@ func (this *QPagedPaintDevice) Margins() *QPagedPaintDevice__Margins { _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } +func (this *QPagedPaintDevice) OnNewPage(slot func() bool) { + C.QPagedPaintDevice_override_virtual_NewPage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPagedPaintDevice_NewPage +func miqt_exec_callback_QPagedPaintDevice_NewPage(self *C.QPagedPaintDevice, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func() bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.bool)(virtualReturn) + +} + +func (this *QPagedPaintDevice) callVirtualBase_SetPageSizeWithSize(size QPagedPaintDevice__PageSize) { + + C.QPagedPaintDevice_virtualbase_SetPageSizeWithSize(unsafe.Pointer(this.h), (C.int)(size)) + +} +func (this *QPagedPaintDevice) OnSetPageSizeWithSize(slot func(super func(size QPagedPaintDevice__PageSize), size QPagedPaintDevice__PageSize)) { + C.QPagedPaintDevice_override_virtual_SetPageSizeWithSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPagedPaintDevice_SetPageSizeWithSize +func miqt_exec_callback_QPagedPaintDevice_SetPageSizeWithSize(self *C.QPagedPaintDevice, 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((&QPagedPaintDevice{h: self}).callVirtualBase_SetPageSizeWithSize, slotval1) + +} + +func (this *QPagedPaintDevice) callVirtualBase_SetPageSizeMM(size *QSizeF) { + + C.QPagedPaintDevice_virtualbase_SetPageSizeMM(unsafe.Pointer(this.h), size.cPointer()) + +} +func (this *QPagedPaintDevice) OnSetPageSizeMM(slot func(super func(size *QSizeF), size *QSizeF)) { + C.QPagedPaintDevice_override_virtual_SetPageSizeMM(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPagedPaintDevice_SetPageSizeMM +func miqt_exec_callback_QPagedPaintDevice_SetPageSizeMM(self *C.QPagedPaintDevice, 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((&QPagedPaintDevice{h: self}).callVirtualBase_SetPageSizeMM, slotval1) + +} + +func (this *QPagedPaintDevice) callVirtualBase_SetMargins(margins *QPagedPaintDevice__Margins) { + + C.QPagedPaintDevice_virtualbase_SetMargins(unsafe.Pointer(this.h), margins.cPointer()) + +} +func (this *QPagedPaintDevice) OnSetMargins(slot func(super func(margins *QPagedPaintDevice__Margins), margins *QPagedPaintDevice__Margins)) { + C.QPagedPaintDevice_override_virtual_SetMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPagedPaintDevice_SetMargins +func miqt_exec_callback_QPagedPaintDevice_SetMargins(self *C.QPagedPaintDevice, cb C.intptr_t, margins *C.QPagedPaintDevice__Margins) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(margins *QPagedPaintDevice__Margins), margins *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(margins)) + + gofunc((&QPagedPaintDevice{h: self}).callVirtualBase_SetMargins, slotval1) + +} + +func (this *QPagedPaintDevice) callVirtualBase_DevType() int { + + return (int)(C.QPagedPaintDevice_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QPagedPaintDevice) OnDevType(slot func(super func() int) int) { + C.QPagedPaintDevice_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPagedPaintDevice_DevType +func miqt_exec_callback_QPagedPaintDevice_DevType(self *C.QPagedPaintDevice, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPagedPaintDevice{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} +func (this *QPagedPaintDevice) OnPaintEngine(slot func() *QPaintEngine) { + C.QPagedPaintDevice_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPagedPaintDevice_PaintEngine +func miqt_exec_callback_QPagedPaintDevice_PaintEngine(self *C.QPagedPaintDevice, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func() *QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} + +func (this *QPagedPaintDevice) callVirtualBase_Metric(metric QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QPagedPaintDevice_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(metric))) + +} +func (this *QPagedPaintDevice) OnMetric(slot func(super func(metric QPaintDevice__PaintDeviceMetric) int, metric QPaintDevice__PaintDeviceMetric) int) { + C.QPagedPaintDevice_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPagedPaintDevice_Metric +func miqt_exec_callback_QPagedPaintDevice_Metric(self *C.QPagedPaintDevice, 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((&QPagedPaintDevice{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPagedPaintDevice) callVirtualBase_InitPainter(painter *QPainter) { + + C.QPagedPaintDevice_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QPagedPaintDevice) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QPagedPaintDevice_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPagedPaintDevice_InitPainter +func miqt_exec_callback_QPagedPaintDevice_InitPainter(self *C.QPagedPaintDevice, 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((&QPagedPaintDevice{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QPagedPaintDevice) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QPagedPaintDevice_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QPagedPaintDevice) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QPagedPaintDevice_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPagedPaintDevice_Redirected +func miqt_exec_callback_QPagedPaintDevice_Redirected(self *C.QPagedPaintDevice, 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((&QPagedPaintDevice{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QPagedPaintDevice) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QPagedPaintDevice_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QPagedPaintDevice) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QPagedPaintDevice_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPagedPaintDevice_SharedPainter +func miqt_exec_callback_QPagedPaintDevice_SharedPainter(self *C.QPagedPaintDevice, 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((&QPagedPaintDevice{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} // Delete this object from C++ memory. func (this *QPagedPaintDevice) Delete() { diff --git a/qt/gen_qpagedpaintdevice.h b/qt/gen_qpagedpaintdevice.h index 3fd71c93..8a07b28b 100644 --- a/qt/gen_qpagedpaintdevice.h +++ b/qt/gen_qpagedpaintdevice.h @@ -25,6 +25,9 @@ typedef QPagedPaintDevice::Margins QPagedPaintDevice__Margins; class QPagedPaintDevice__Margins; #endif class QPaintDevice; +class QPaintEngine; +class QPainter; +class QPoint; class QSizeF; #else typedef struct QMarginsF QMarginsF; @@ -33,9 +36,13 @@ typedef struct QPageSize QPageSize; typedef struct QPagedPaintDevice QPagedPaintDevice; typedef struct QPagedPaintDevice__Margins QPagedPaintDevice__Margins; typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; typedef struct QSizeF QSizeF; #endif +void QPagedPaintDevice_new(QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); bool QPagedPaintDevice_NewPage(QPagedPaintDevice* self); bool QPagedPaintDevice_SetPageLayout(QPagedPaintDevice* self, QPageLayout* pageLayout); bool QPagedPaintDevice_SetPageSize(QPagedPaintDevice* self, QPageSize* pageSize); @@ -49,6 +56,26 @@ 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_override_virtual_NewPage(void* self, intptr_t slot); +bool QPagedPaintDevice_virtualbase_NewPage(void* self); +void QPagedPaintDevice_override_virtual_SetPageSizeWithSize(void* self, intptr_t slot); +void QPagedPaintDevice_virtualbase_SetPageSizeWithSize(void* self, int size); +void QPagedPaintDevice_override_virtual_SetPageSizeMM(void* self, intptr_t slot); +void QPagedPaintDevice_virtualbase_SetPageSizeMM(void* self, QSizeF* size); +void QPagedPaintDevice_override_virtual_SetMargins(void* self, intptr_t slot); +void QPagedPaintDevice_virtualbase_SetMargins(void* self, QPagedPaintDevice__Margins* margins); +void QPagedPaintDevice_override_virtual_DevType(void* self, intptr_t slot); +int QPagedPaintDevice_virtualbase_DevType(const void* self); +void QPagedPaintDevice_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QPagedPaintDevice_virtualbase_PaintEngine(const void* self); +void QPagedPaintDevice_override_virtual_Metric(void* self, intptr_t slot); +int QPagedPaintDevice_virtualbase_Metric(const void* self, int metric); +void QPagedPaintDevice_override_virtual_InitPainter(void* self, intptr_t slot); +void QPagedPaintDevice_virtualbase_InitPainter(const void* self, QPainter* painter); +void QPagedPaintDevice_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QPagedPaintDevice_virtualbase_Redirected(const void* self, QPoint* offset); +void QPagedPaintDevice_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QPagedPaintDevice_virtualbase_SharedPainter(const void* self); void QPagedPaintDevice_Delete(QPagedPaintDevice* self, bool isSubclass); void QPagedPaintDevice__Margins_Delete(QPagedPaintDevice__Margins* self, bool isSubclass); diff --git a/qt/gen_qpaintengine.cpp b/qt/gen_qpaintengine.cpp index 58c2ec2e..a724f6c0 100644 --- a/qt/gen_qpaintengine.cpp +++ b/qt/gen_qpaintengine.cpp @@ -68,6 +68,513 @@ void QTextItem_Delete(QTextItem* self, bool isSubclass) { } } +class MiqtVirtualQPaintEngine : public virtual QPaintEngine { +public: + + MiqtVirtualQPaintEngine(): QPaintEngine() {}; + MiqtVirtualQPaintEngine(QPaintEngine::PaintEngineFeatures features): QPaintEngine(features) {}; + + virtual ~MiqtVirtualQPaintEngine() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Begin = 0; + + // Subclass to allow providing a Go implementation + virtual bool begin(QPaintDevice* pdev) override { + if (handle__Begin == 0) { + return false; // Pure virtual, there is no base we can call + } + + QPaintDevice* sigval1 = pdev; + + bool callback_return_value = miqt_exec_callback_QPaintEngine_Begin(this, handle__Begin, sigval1); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__End = 0; + + // Subclass to allow providing a Go implementation + virtual bool end() override { + if (handle__End == 0) { + return false; // Pure virtual, there is no base we can call + } + + + bool callback_return_value = miqt_exec_callback_QPaintEngine_End(this, handle__End); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateState = 0; + + // Subclass to allow providing a Go implementation + virtual void updateState(const QPaintEngineState& state) override { + if (handle__UpdateState == 0) { + return; // Pure virtual, there is no base we can call + } + + const QPaintEngineState& state_ret = state; + // Cast returned reference into pointer + QPaintEngineState* sigval1 = const_cast(&state_ret); + + miqt_exec_callback_QPaintEngine_UpdateState(this, handle__UpdateState, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawRects = 0; + + // Subclass to allow providing a Go implementation + virtual void drawRects(const QRect* rects, int rectCount) override { + if (handle__DrawRects == 0) { + QPaintEngine::drawRects(rects, rectCount); + return; + } + + QRect* sigval1 = (QRect*) rects; + int sigval2 = rectCount; + + miqt_exec_callback_QPaintEngine_DrawRects(this, handle__DrawRects, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawRects(QRect* rects, int rectCount) { + + QPaintEngine::drawRects(rects, static_cast(rectCount)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawRects2 = 0; + + // Subclass to allow providing a Go implementation + virtual void drawRects(const QRectF* rects, int rectCount) override { + if (handle__DrawRects2 == 0) { + QPaintEngine::drawRects(rects, rectCount); + return; + } + + QRectF* sigval1 = (QRectF*) rects; + int sigval2 = rectCount; + + miqt_exec_callback_QPaintEngine_DrawRects2(this, handle__DrawRects2, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawRects2(QRectF* rects, int rectCount) { + + QPaintEngine::drawRects(rects, static_cast(rectCount)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawLines = 0; + + // Subclass to allow providing a Go implementation + virtual void drawLines(const QLine* lines, int lineCount) override { + if (handle__DrawLines == 0) { + QPaintEngine::drawLines(lines, lineCount); + return; + } + + QLine* sigval1 = (QLine*) lines; + int sigval2 = lineCount; + + miqt_exec_callback_QPaintEngine_DrawLines(this, handle__DrawLines, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawLines(QLine* lines, int lineCount) { + + QPaintEngine::drawLines(lines, static_cast(lineCount)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawLines2 = 0; + + // Subclass to allow providing a Go implementation + virtual void drawLines(const QLineF* lines, int lineCount) override { + if (handle__DrawLines2 == 0) { + QPaintEngine::drawLines(lines, lineCount); + return; + } + + QLineF* sigval1 = (QLineF*) lines; + int sigval2 = lineCount; + + miqt_exec_callback_QPaintEngine_DrawLines2(this, handle__DrawLines2, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawLines2(QLineF* lines, int lineCount) { + + QPaintEngine::drawLines(lines, static_cast(lineCount)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawEllipse = 0; + + // Subclass to allow providing a Go implementation + virtual void drawEllipse(const QRectF& r) override { + if (handle__DrawEllipse == 0) { + QPaintEngine::drawEllipse(r); + return; + } + + const QRectF& r_ret = r; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&r_ret); + + miqt_exec_callback_QPaintEngine_DrawEllipse(this, handle__DrawEllipse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawEllipse(QRectF* r) { + + QPaintEngine::drawEllipse(*r); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawEllipseWithQRect = 0; + + // Subclass to allow providing a Go implementation + virtual void drawEllipse(const QRect& r) override { + if (handle__DrawEllipseWithQRect == 0) { + QPaintEngine::drawEllipse(r); + return; + } + + const QRect& r_ret = r; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&r_ret); + + miqt_exec_callback_QPaintEngine_DrawEllipseWithQRect(this, handle__DrawEllipseWithQRect, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawEllipseWithQRect(QRect* r) { + + QPaintEngine::drawEllipse(*r); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawPath = 0; + + // Subclass to allow providing a Go implementation + virtual void drawPath(const QPainterPath& path) override { + if (handle__DrawPath == 0) { + QPaintEngine::drawPath(path); + return; + } + + const QPainterPath& path_ret = path; + // Cast returned reference into pointer + QPainterPath* sigval1 = const_cast(&path_ret); + + miqt_exec_callback_QPaintEngine_DrawPath(this, handle__DrawPath, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawPath(QPainterPath* path) { + + QPaintEngine::drawPath(*path); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawPoints = 0; + + // Subclass to allow providing a Go implementation + virtual void drawPoints(const QPointF* points, int pointCount) override { + if (handle__DrawPoints == 0) { + QPaintEngine::drawPoints(points, pointCount); + return; + } + + QPointF* sigval1 = (QPointF*) points; + int sigval2 = pointCount; + + miqt_exec_callback_QPaintEngine_DrawPoints(this, handle__DrawPoints, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawPoints(QPointF* points, int pointCount) { + + QPaintEngine::drawPoints(points, static_cast(pointCount)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawPoints2 = 0; + + // Subclass to allow providing a Go implementation + virtual void drawPoints(const QPoint* points, int pointCount) override { + if (handle__DrawPoints2 == 0) { + QPaintEngine::drawPoints(points, pointCount); + return; + } + + QPoint* sigval1 = (QPoint*) points; + int sigval2 = pointCount; + + miqt_exec_callback_QPaintEngine_DrawPoints2(this, handle__DrawPoints2, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawPoints2(QPoint* points, int pointCount) { + + QPaintEngine::drawPoints(points, static_cast(pointCount)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawPolygon = 0; + + // Subclass to allow providing a Go implementation + virtual void drawPolygon(const QPointF* points, int pointCount, QPaintEngine::PolygonDrawMode mode) override { + if (handle__DrawPolygon == 0) { + QPaintEngine::drawPolygon(points, pointCount, mode); + return; + } + + QPointF* sigval1 = (QPointF*) points; + int sigval2 = pointCount; + QPaintEngine::PolygonDrawMode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + + miqt_exec_callback_QPaintEngine_DrawPolygon(this, handle__DrawPolygon, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawPolygon(QPointF* points, int pointCount, int mode) { + + QPaintEngine::drawPolygon(points, static_cast(pointCount), static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawPolygon2 = 0; + + // Subclass to allow providing a Go implementation + virtual void drawPolygon(const QPoint* points, int pointCount, QPaintEngine::PolygonDrawMode mode) override { + if (handle__DrawPolygon2 == 0) { + QPaintEngine::drawPolygon(points, pointCount, mode); + return; + } + + QPoint* sigval1 = (QPoint*) points; + int sigval2 = pointCount; + QPaintEngine::PolygonDrawMode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + + miqt_exec_callback_QPaintEngine_DrawPolygon2(this, handle__DrawPolygon2, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawPolygon2(QPoint* points, int pointCount, int mode) { + + QPaintEngine::drawPolygon(points, static_cast(pointCount), static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual void drawPixmap(const QRectF& r, const QPixmap& pm, const QRectF& sr) override { + if (handle__DrawPixmap == 0) { + return; // Pure virtual, there is no base we can call + } + + const QRectF& r_ret = r; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&r_ret); + const QPixmap& pm_ret = pm; + // Cast returned reference into pointer + QPixmap* sigval2 = const_cast(&pm_ret); + const QRectF& sr_ret = sr; + // Cast returned reference into pointer + QRectF* sigval3 = const_cast(&sr_ret); + + miqt_exec_callback_QPaintEngine_DrawPixmap(this, handle__DrawPixmap, sigval1, sigval2, sigval3); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawTextItem = 0; + + // Subclass to allow providing a Go implementation + virtual void drawTextItem(const QPointF& p, const QTextItem& textItem) override { + if (handle__DrawTextItem == 0) { + QPaintEngine::drawTextItem(p, textItem); + return; + } + + const QPointF& p_ret = p; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&p_ret); + const QTextItem& textItem_ret = textItem; + // Cast returned reference into pointer + QTextItem* sigval2 = const_cast(&textItem_ret); + + miqt_exec_callback_QPaintEngine_DrawTextItem(this, handle__DrawTextItem, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawTextItem(QPointF* p, QTextItem* textItem) { + + QPaintEngine::drawTextItem(*p, *textItem); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawTiledPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual void drawTiledPixmap(const QRectF& r, const QPixmap& pixmap, const QPointF& s) override { + if (handle__DrawTiledPixmap == 0) { + QPaintEngine::drawTiledPixmap(r, pixmap, s); + return; + } + + const QRectF& r_ret = r; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&r_ret); + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval2 = const_cast(&pixmap_ret); + const QPointF& s_ret = s; + // Cast returned reference into pointer + QPointF* sigval3 = const_cast(&s_ret); + + miqt_exec_callback_QPaintEngine_DrawTiledPixmap(this, handle__DrawTiledPixmap, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawTiledPixmap(QRectF* r, QPixmap* pixmap, QPointF* s) { + + QPaintEngine::drawTiledPixmap(*r, *pixmap, *s); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawImage = 0; + + // Subclass to allow providing a Go implementation + virtual void drawImage(const QRectF& r, const QImage& pm, const QRectF& sr, Qt::ImageConversionFlags flags) override { + if (handle__DrawImage == 0) { + QPaintEngine::drawImage(r, pm, sr, flags); + return; + } + + const QRectF& r_ret = r; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&r_ret); + const QImage& pm_ret = pm; + // Cast returned reference into pointer + QImage* sigval2 = const_cast(&pm_ret); + const QRectF& sr_ret = sr; + // Cast returned reference into pointer + QRectF* sigval3 = const_cast(&sr_ret); + Qt::ImageConversionFlags flags_ret = flags; + int sigval4 = static_cast(flags_ret); + + miqt_exec_callback_QPaintEngine_DrawImage(this, handle__DrawImage, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawImage(QRectF* r, QImage* pm, QRectF* sr, int flags) { + + QPaintEngine::drawImage(*r, *pm, *sr, static_cast(flags)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CoordinateOffset = 0; + + // Subclass to allow providing a Go implementation + virtual QPoint coordinateOffset() const override { + if (handle__CoordinateOffset == 0) { + return QPaintEngine::coordinateOffset(); + } + + + QPoint* callback_return_value = miqt_exec_callback_QPaintEngine_CoordinateOffset(const_cast(this), handle__CoordinateOffset); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPoint* virtualbase_CoordinateOffset() const { + + return new QPoint(QPaintEngine::coordinateOffset()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine::Type type() const override { + if (handle__Type == 0) { + return (QPaintEngine::Type)(0); // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QPaintEngine_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + +}; + +void QPaintEngine_new(QPaintEngine** outptr_QPaintEngine) { + MiqtVirtualQPaintEngine* ret = new MiqtVirtualQPaintEngine(); + *outptr_QPaintEngine = ret; +} + +void QPaintEngine_new2(int features, QPaintEngine** outptr_QPaintEngine) { + MiqtVirtualQPaintEngine* ret = new MiqtVirtualQPaintEngine(static_cast(features)); + *outptr_QPaintEngine = ret; +} + bool QPaintEngine_IsActive(const QPaintEngine* self) { return self->isActive(); } @@ -213,9 +720,149 @@ bool QPaintEngine_IsExtended(const QPaintEngine* self) { return self->isExtended(); } +void QPaintEngine_override_virtual_Begin(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__Begin = slot; +} + +void QPaintEngine_override_virtual_End(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__End = slot; +} + +void QPaintEngine_override_virtual_UpdateState(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__UpdateState = slot; +} + +void QPaintEngine_override_virtual_DrawRects(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawRects = slot; +} + +void QPaintEngine_virtualbase_DrawRects(void* self, QRect* rects, int rectCount) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawRects(rects, rectCount); +} + +void QPaintEngine_override_virtual_DrawRects2(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawRects2 = slot; +} + +void QPaintEngine_virtualbase_DrawRects2(void* self, QRectF* rects, int rectCount) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawRects2(rects, rectCount); +} + +void QPaintEngine_override_virtual_DrawLines(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawLines = slot; +} + +void QPaintEngine_virtualbase_DrawLines(void* self, QLine* lines, int lineCount) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawLines(lines, lineCount); +} + +void QPaintEngine_override_virtual_DrawLines2(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawLines2 = slot; +} + +void QPaintEngine_virtualbase_DrawLines2(void* self, QLineF* lines, int lineCount) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawLines2(lines, lineCount); +} + +void QPaintEngine_override_virtual_DrawEllipse(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawEllipse = slot; +} + +void QPaintEngine_virtualbase_DrawEllipse(void* self, QRectF* r) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawEllipse(r); +} + +void QPaintEngine_override_virtual_DrawEllipseWithQRect(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawEllipseWithQRect = slot; +} + +void QPaintEngine_virtualbase_DrawEllipseWithQRect(void* self, QRect* r) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawEllipseWithQRect(r); +} + +void QPaintEngine_override_virtual_DrawPath(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawPath = slot; +} + +void QPaintEngine_virtualbase_DrawPath(void* self, QPainterPath* path) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawPath(path); +} + +void QPaintEngine_override_virtual_DrawPoints(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawPoints = slot; +} + +void QPaintEngine_virtualbase_DrawPoints(void* self, QPointF* points, int pointCount) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawPoints(points, pointCount); +} + +void QPaintEngine_override_virtual_DrawPoints2(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawPoints2 = slot; +} + +void QPaintEngine_virtualbase_DrawPoints2(void* self, QPoint* points, int pointCount) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawPoints2(points, pointCount); +} + +void QPaintEngine_override_virtual_DrawPolygon(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawPolygon = slot; +} + +void QPaintEngine_virtualbase_DrawPolygon(void* self, QPointF* points, int pointCount, int mode) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawPolygon(points, pointCount, mode); +} + +void QPaintEngine_override_virtual_DrawPolygon2(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawPolygon2 = slot; +} + +void QPaintEngine_virtualbase_DrawPolygon2(void* self, QPoint* points, int pointCount, int mode) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawPolygon2(points, pointCount, mode); +} + +void QPaintEngine_override_virtual_DrawPixmap(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawPixmap = slot; +} + +void QPaintEngine_override_virtual_DrawTextItem(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawTextItem = slot; +} + +void QPaintEngine_virtualbase_DrawTextItem(void* self, QPointF* p, QTextItem* textItem) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawTextItem(p, textItem); +} + +void QPaintEngine_override_virtual_DrawTiledPixmap(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawTiledPixmap = slot; +} + +void QPaintEngine_virtualbase_DrawTiledPixmap(void* self, QRectF* r, QPixmap* pixmap, QPointF* s) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawTiledPixmap(r, pixmap, s); +} + +void QPaintEngine_override_virtual_DrawImage(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawImage = slot; +} + +void QPaintEngine_virtualbase_DrawImage(void* self, QRectF* r, QImage* pm, QRectF* sr, int flags) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawImage(r, pm, sr, flags); +} + +void QPaintEngine_override_virtual_CoordinateOffset(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__CoordinateOffset = slot; +} + +QPoint* QPaintEngine_virtualbase_CoordinateOffset(const void* self) { + return ( (const MiqtVirtualQPaintEngine*)(self) )->virtualbase_CoordinateOffset(); +} + +void QPaintEngine_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__Type = slot; +} + void QPaintEngine_Delete(QPaintEngine* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qpaintengine.go b/qt/gen_qpaintengine.go index b40239c0..f0a55b1f 100644 --- a/qt/gen_qpaintengine.go +++ b/qt/gen_qpaintengine.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -217,6 +218,26 @@ func UnsafeNewQPaintEngine(h unsafe.Pointer) *QPaintEngine { return &QPaintEngine{h: (*C.QPaintEngine)(h)} } +// NewQPaintEngine constructs a new QPaintEngine object. +func NewQPaintEngine() *QPaintEngine { + var outptr_QPaintEngine *C.QPaintEngine = nil + + C.QPaintEngine_new(&outptr_QPaintEngine) + ret := newQPaintEngine(outptr_QPaintEngine) + ret.isSubclass = true + return ret +} + +// NewQPaintEngine2 constructs a new QPaintEngine object. +func NewQPaintEngine2(features QPaintEngine__PaintEngineFeature) *QPaintEngine { + var outptr_QPaintEngine *C.QPaintEngine = nil + + C.QPaintEngine_new2((C.int)(features), &outptr_QPaintEngine) + ret := newQPaintEngine(outptr_QPaintEngine) + ret.isSubclass = true + return ret +} + func (this *QPaintEngine) IsActive() bool { return (bool)(C.QPaintEngine_IsActive(this.h)) } @@ -369,6 +390,458 @@ func (this *QPaintEngine) SyncState() { func (this *QPaintEngine) IsExtended() bool { return (bool)(C.QPaintEngine_IsExtended(this.h)) } +func (this *QPaintEngine) OnBegin(slot func(pdev *QPaintDevice) bool) { + C.QPaintEngine_override_virtual_Begin(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_Begin +func miqt_exec_callback_QPaintEngine_Begin(self *C.QPaintEngine, cb C.intptr_t, pdev *C.QPaintDevice) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(pdev *QPaintDevice) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintDevice(unsafe.Pointer(pdev)) + + virtualReturn := gofunc(slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QPaintEngine) OnEnd(slot func() bool) { + C.QPaintEngine_override_virtual_End(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_End +func miqt_exec_callback_QPaintEngine_End(self *C.QPaintEngine, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func() bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.bool)(virtualReturn) + +} +func (this *QPaintEngine) OnUpdateState(slot func(state *QPaintEngineState)) { + C.QPaintEngine_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_UpdateState +func miqt_exec_callback_QPaintEngine_UpdateState(self *C.QPaintEngine, cb C.intptr_t, state *C.QPaintEngineState) { + gofunc, ok := cgo.Handle(cb).Value().(func(state *QPaintEngineState)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEngineState(unsafe.Pointer(state)) + + gofunc(slotval1) + +} + +func (this *QPaintEngine) callVirtualBase_DrawRects(rects *QRect, rectCount int) { + + C.QPaintEngine_virtualbase_DrawRects(unsafe.Pointer(this.h), rects.cPointer(), (C.int)(rectCount)) + +} +func (this *QPaintEngine) OnDrawRects(slot func(super func(rects *QRect, rectCount int), rects *QRect, rectCount int)) { + C.QPaintEngine_override_virtual_DrawRects(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawRects +func miqt_exec_callback_QPaintEngine_DrawRects(self *C.QPaintEngine, cb C.intptr_t, rects *C.QRect, rectCount C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rects *QRect, rectCount int), rects *QRect, rectCount int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rects)) + slotval2 := (int)(rectCount) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawRects, slotval1, slotval2) + +} + +func (this *QPaintEngine) callVirtualBase_DrawRects2(rects *QRectF, rectCount int) { + + C.QPaintEngine_virtualbase_DrawRects2(unsafe.Pointer(this.h), rects.cPointer(), (C.int)(rectCount)) + +} +func (this *QPaintEngine) OnDrawRects2(slot func(super func(rects *QRectF, rectCount int), rects *QRectF, rectCount int)) { + C.QPaintEngine_override_virtual_DrawRects2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawRects2 +func miqt_exec_callback_QPaintEngine_DrawRects2(self *C.QPaintEngine, cb C.intptr_t, rects *C.QRectF, rectCount C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rects *QRectF, rectCount int), rects *QRectF, rectCount int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(rects)) + slotval2 := (int)(rectCount) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawRects2, slotval1, slotval2) + +} + +func (this *QPaintEngine) callVirtualBase_DrawLines(lines *QLine, lineCount int) { + + C.QPaintEngine_virtualbase_DrawLines(unsafe.Pointer(this.h), lines.cPointer(), (C.int)(lineCount)) + +} +func (this *QPaintEngine) OnDrawLines(slot func(super func(lines *QLine, lineCount int), lines *QLine, lineCount int)) { + C.QPaintEngine_override_virtual_DrawLines(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawLines +func miqt_exec_callback_QPaintEngine_DrawLines(self *C.QPaintEngine, cb C.intptr_t, lines *C.QLine, lineCount C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(lines *QLine, lineCount int), lines *QLine, lineCount int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLine(unsafe.Pointer(lines)) + slotval2 := (int)(lineCount) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawLines, slotval1, slotval2) + +} + +func (this *QPaintEngine) callVirtualBase_DrawLines2(lines *QLineF, lineCount int) { + + C.QPaintEngine_virtualbase_DrawLines2(unsafe.Pointer(this.h), lines.cPointer(), (C.int)(lineCount)) + +} +func (this *QPaintEngine) OnDrawLines2(slot func(super func(lines *QLineF, lineCount int), lines *QLineF, lineCount int)) { + C.QPaintEngine_override_virtual_DrawLines2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawLines2 +func miqt_exec_callback_QPaintEngine_DrawLines2(self *C.QPaintEngine, cb C.intptr_t, lines *C.QLineF, lineCount C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(lines *QLineF, lineCount int), lines *QLineF, lineCount int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLineF(unsafe.Pointer(lines)) + slotval2 := (int)(lineCount) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawLines2, slotval1, slotval2) + +} + +func (this *QPaintEngine) callVirtualBase_DrawEllipse(r *QRectF) { + + C.QPaintEngine_virtualbase_DrawEllipse(unsafe.Pointer(this.h), r.cPointer()) + +} +func (this *QPaintEngine) OnDrawEllipse(slot func(super func(r *QRectF), r *QRectF)) { + C.QPaintEngine_override_virtual_DrawEllipse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawEllipse +func miqt_exec_callback_QPaintEngine_DrawEllipse(self *C.QPaintEngine, cb C.intptr_t, r *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(r *QRectF), r *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(r)) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawEllipse, slotval1) + +} + +func (this *QPaintEngine) callVirtualBase_DrawEllipseWithQRect(r *QRect) { + + C.QPaintEngine_virtualbase_DrawEllipseWithQRect(unsafe.Pointer(this.h), r.cPointer()) + +} +func (this *QPaintEngine) OnDrawEllipseWithQRect(slot func(super func(r *QRect), r *QRect)) { + C.QPaintEngine_override_virtual_DrawEllipseWithQRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawEllipseWithQRect +func miqt_exec_callback_QPaintEngine_DrawEllipseWithQRect(self *C.QPaintEngine, cb C.intptr_t, r *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(r *QRect), r *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(r)) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawEllipseWithQRect, slotval1) + +} + +func (this *QPaintEngine) callVirtualBase_DrawPath(path *QPainterPath) { + + C.QPaintEngine_virtualbase_DrawPath(unsafe.Pointer(this.h), path.cPointer()) + +} +func (this *QPaintEngine) OnDrawPath(slot func(super func(path *QPainterPath), path *QPainterPath)) { + C.QPaintEngine_override_virtual_DrawPath(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawPath +func miqt_exec_callback_QPaintEngine_DrawPath(self *C.QPaintEngine, cb C.intptr_t, path *C.QPainterPath) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(path *QPainterPath), path *QPainterPath)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainterPath(unsafe.Pointer(path)) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawPath, slotval1) + +} + +func (this *QPaintEngine) callVirtualBase_DrawPoints(points *QPointF, pointCount int) { + + C.QPaintEngine_virtualbase_DrawPoints(unsafe.Pointer(this.h), points.cPointer(), (C.int)(pointCount)) + +} +func (this *QPaintEngine) OnDrawPoints(slot func(super func(points *QPointF, pointCount int), points *QPointF, pointCount int)) { + C.QPaintEngine_override_virtual_DrawPoints(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawPoints +func miqt_exec_callback_QPaintEngine_DrawPoints(self *C.QPaintEngine, cb C.intptr_t, points *C.QPointF, pointCount C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(points *QPointF, pointCount int), points *QPointF, pointCount int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(points)) + slotval2 := (int)(pointCount) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawPoints, slotval1, slotval2) + +} + +func (this *QPaintEngine) callVirtualBase_DrawPoints2(points *QPoint, pointCount int) { + + C.QPaintEngine_virtualbase_DrawPoints2(unsafe.Pointer(this.h), points.cPointer(), (C.int)(pointCount)) + +} +func (this *QPaintEngine) OnDrawPoints2(slot func(super func(points *QPoint, pointCount int), points *QPoint, pointCount int)) { + C.QPaintEngine_override_virtual_DrawPoints2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawPoints2 +func miqt_exec_callback_QPaintEngine_DrawPoints2(self *C.QPaintEngine, cb C.intptr_t, points *C.QPoint, pointCount C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(points *QPoint, pointCount int), points *QPoint, pointCount int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(points)) + slotval2 := (int)(pointCount) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawPoints2, slotval1, slotval2) + +} + +func (this *QPaintEngine) callVirtualBase_DrawPolygon(points *QPointF, pointCount int, mode QPaintEngine__PolygonDrawMode) { + + C.QPaintEngine_virtualbase_DrawPolygon(unsafe.Pointer(this.h), points.cPointer(), (C.int)(pointCount), (C.int)(mode)) + +} +func (this *QPaintEngine) OnDrawPolygon(slot func(super func(points *QPointF, pointCount int, mode QPaintEngine__PolygonDrawMode), points *QPointF, pointCount int, mode QPaintEngine__PolygonDrawMode)) { + C.QPaintEngine_override_virtual_DrawPolygon(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawPolygon +func miqt_exec_callback_QPaintEngine_DrawPolygon(self *C.QPaintEngine, cb C.intptr_t, points *C.QPointF, pointCount C.int, mode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(points *QPointF, pointCount int, mode QPaintEngine__PolygonDrawMode), points *QPointF, pointCount int, mode QPaintEngine__PolygonDrawMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(points)) + slotval2 := (int)(pointCount) + + slotval3 := (QPaintEngine__PolygonDrawMode)(mode) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawPolygon, slotval1, slotval2, slotval3) + +} + +func (this *QPaintEngine) callVirtualBase_DrawPolygon2(points *QPoint, pointCount int, mode QPaintEngine__PolygonDrawMode) { + + C.QPaintEngine_virtualbase_DrawPolygon2(unsafe.Pointer(this.h), points.cPointer(), (C.int)(pointCount), (C.int)(mode)) + +} +func (this *QPaintEngine) OnDrawPolygon2(slot func(super func(points *QPoint, pointCount int, mode QPaintEngine__PolygonDrawMode), points *QPoint, pointCount int, mode QPaintEngine__PolygonDrawMode)) { + C.QPaintEngine_override_virtual_DrawPolygon2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawPolygon2 +func miqt_exec_callback_QPaintEngine_DrawPolygon2(self *C.QPaintEngine, cb C.intptr_t, points *C.QPoint, pointCount C.int, mode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(points *QPoint, pointCount int, mode QPaintEngine__PolygonDrawMode), points *QPoint, pointCount int, mode QPaintEngine__PolygonDrawMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(points)) + slotval2 := (int)(pointCount) + + slotval3 := (QPaintEngine__PolygonDrawMode)(mode) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawPolygon2, slotval1, slotval2, slotval3) + +} +func (this *QPaintEngine) OnDrawPixmap(slot func(r *QRectF, pm *QPixmap, sr *QRectF)) { + C.QPaintEngine_override_virtual_DrawPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawPixmap +func miqt_exec_callback_QPaintEngine_DrawPixmap(self *C.QPaintEngine, cb C.intptr_t, r *C.QRectF, pm *C.QPixmap, sr *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(r *QRectF, pm *QPixmap, sr *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(r)) + slotval2 := UnsafeNewQPixmap(unsafe.Pointer(pm), nil) + slotval3 := UnsafeNewQRectF(unsafe.Pointer(sr)) + + gofunc(slotval1, slotval2, slotval3) + +} + +func (this *QPaintEngine) callVirtualBase_DrawTextItem(p *QPointF, textItem *QTextItem) { + + C.QPaintEngine_virtualbase_DrawTextItem(unsafe.Pointer(this.h), p.cPointer(), textItem.cPointer()) + +} +func (this *QPaintEngine) OnDrawTextItem(slot func(super func(p *QPointF, textItem *QTextItem), p *QPointF, textItem *QTextItem)) { + C.QPaintEngine_override_virtual_DrawTextItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawTextItem +func miqt_exec_callback_QPaintEngine_DrawTextItem(self *C.QPaintEngine, cb C.intptr_t, p *C.QPointF, textItem *C.QTextItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPointF, textItem *QTextItem), p *QPointF, textItem *QTextItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(p)) + slotval2 := UnsafeNewQTextItem(unsafe.Pointer(textItem)) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawTextItem, slotval1, slotval2) + +} + +func (this *QPaintEngine) callVirtualBase_DrawTiledPixmap(r *QRectF, pixmap *QPixmap, s *QPointF) { + + C.QPaintEngine_virtualbase_DrawTiledPixmap(unsafe.Pointer(this.h), r.cPointer(), pixmap.cPointer(), s.cPointer()) + +} +func (this *QPaintEngine) OnDrawTiledPixmap(slot func(super func(r *QRectF, pixmap *QPixmap, s *QPointF), r *QRectF, pixmap *QPixmap, s *QPointF)) { + C.QPaintEngine_override_virtual_DrawTiledPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawTiledPixmap +func miqt_exec_callback_QPaintEngine_DrawTiledPixmap(self *C.QPaintEngine, cb C.intptr_t, r *C.QRectF, pixmap *C.QPixmap, s *C.QPointF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(r *QRectF, pixmap *QPixmap, s *QPointF), r *QRectF, pixmap *QPixmap, s *QPointF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(r)) + slotval2 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + slotval3 := UnsafeNewQPointF(unsafe.Pointer(s)) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawTiledPixmap, slotval1, slotval2, slotval3) + +} + +func (this *QPaintEngine) callVirtualBase_DrawImage(r *QRectF, pm *QImage, sr *QRectF, flags ImageConversionFlag) { + + C.QPaintEngine_virtualbase_DrawImage(unsafe.Pointer(this.h), r.cPointer(), pm.cPointer(), sr.cPointer(), (C.int)(flags)) + +} +func (this *QPaintEngine) OnDrawImage(slot func(super func(r *QRectF, pm *QImage, sr *QRectF, flags ImageConversionFlag), r *QRectF, pm *QImage, sr *QRectF, flags ImageConversionFlag)) { + C.QPaintEngine_override_virtual_DrawImage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawImage +func miqt_exec_callback_QPaintEngine_DrawImage(self *C.QPaintEngine, cb C.intptr_t, r *C.QRectF, pm *C.QImage, sr *C.QRectF, flags C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(r *QRectF, pm *QImage, sr *QRectF, flags ImageConversionFlag), r *QRectF, pm *QImage, sr *QRectF, flags ImageConversionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(r)) + slotval2 := UnsafeNewQImage(unsafe.Pointer(pm), nil) + slotval3 := UnsafeNewQRectF(unsafe.Pointer(sr)) + slotval4 := (ImageConversionFlag)(flags) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawImage, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QPaintEngine) callVirtualBase_CoordinateOffset() *QPoint { + + _ret := C.QPaintEngine_virtualbase_CoordinateOffset(unsafe.Pointer(this.h)) + _goptr := newQPoint(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPaintEngine) OnCoordinateOffset(slot func(super func() *QPoint) *QPoint) { + C.QPaintEngine_override_virtual_CoordinateOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_CoordinateOffset +func miqt_exec_callback_QPaintEngine_CoordinateOffset(self *C.QPaintEngine, cb C.intptr_t) *C.QPoint { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPoint) *QPoint) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPaintEngine{h: self}).callVirtualBase_CoordinateOffset) + + return virtualReturn.cPointer() + +} +func (this *QPaintEngine) OnType(slot func() QPaintEngine__Type) { + C.QPaintEngine_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_Type +func miqt_exec_callback_QPaintEngine_Type(self *C.QPaintEngine, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() QPaintEngine__Type) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} // Delete this object from C++ memory. func (this *QPaintEngine) Delete() { diff --git a/qt/gen_qpaintengine.h b/qt/gen_qpaintengine.h index a14516c6..dcd95025 100644 --- a/qt/gen_qpaintengine.h +++ b/qt/gen_qpaintengine.h @@ -66,6 +66,8 @@ struct miqt_string QTextItem_Text(const QTextItem* self); QFont* QTextItem_Font(const QTextItem* self); void QTextItem_Delete(QTextItem* self, bool isSubclass); +void QPaintEngine_new(QPaintEngine** outptr_QPaintEngine); +void QPaintEngine_new2(int features, QPaintEngine** outptr_QPaintEngine); bool QPaintEngine_IsActive(const QPaintEngine* self); void QPaintEngine_SetActive(QPaintEngine* self, bool newState); bool QPaintEngine_Begin(QPaintEngine* self, QPaintDevice* pdev); @@ -102,6 +104,46 @@ 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_override_virtual_Begin(void* self, intptr_t slot); +bool QPaintEngine_virtualbase_Begin(void* self, QPaintDevice* pdev); +void QPaintEngine_override_virtual_End(void* self, intptr_t slot); +bool QPaintEngine_virtualbase_End(void* self); +void QPaintEngine_override_virtual_UpdateState(void* self, intptr_t slot); +void QPaintEngine_virtualbase_UpdateState(void* self, QPaintEngineState* state); +void QPaintEngine_override_virtual_DrawRects(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawRects(void* self, QRect* rects, int rectCount); +void QPaintEngine_override_virtual_DrawRects2(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawRects2(void* self, QRectF* rects, int rectCount); +void QPaintEngine_override_virtual_DrawLines(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawLines(void* self, QLine* lines, int lineCount); +void QPaintEngine_override_virtual_DrawLines2(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawLines2(void* self, QLineF* lines, int lineCount); +void QPaintEngine_override_virtual_DrawEllipse(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawEllipse(void* self, QRectF* r); +void QPaintEngine_override_virtual_DrawEllipseWithQRect(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawEllipseWithQRect(void* self, QRect* r); +void QPaintEngine_override_virtual_DrawPath(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawPath(void* self, QPainterPath* path); +void QPaintEngine_override_virtual_DrawPoints(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawPoints(void* self, QPointF* points, int pointCount); +void QPaintEngine_override_virtual_DrawPoints2(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawPoints2(void* self, QPoint* points, int pointCount); +void QPaintEngine_override_virtual_DrawPolygon(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawPolygon(void* self, QPointF* points, int pointCount, int mode); +void QPaintEngine_override_virtual_DrawPolygon2(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawPolygon2(void* self, QPoint* points, int pointCount, int mode); +void QPaintEngine_override_virtual_DrawPixmap(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawPixmap(void* self, QRectF* r, QPixmap* pm, QRectF* sr); +void QPaintEngine_override_virtual_DrawTextItem(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawTextItem(void* self, QPointF* p, QTextItem* textItem); +void QPaintEngine_override_virtual_DrawTiledPixmap(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawTiledPixmap(void* self, QRectF* r, QPixmap* pixmap, QPointF* s); +void QPaintEngine_override_virtual_DrawImage(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawImage(void* self, QRectF* r, QImage* pm, QRectF* sr, int flags); +void QPaintEngine_override_virtual_CoordinateOffset(void* self, intptr_t slot); +QPoint* QPaintEngine_virtualbase_CoordinateOffset(const void* self); +void QPaintEngine_override_virtual_Type(void* self, intptr_t slot); +int QPaintEngine_virtualbase_Type(const void* self); void QPaintEngine_Delete(QPaintEngine* self, bool isSubclass); int QPaintEngineState_State(const QPaintEngineState* self); diff --git a/qt/gen_qpictureformatplugin.cpp b/qt/gen_qpictureformatplugin.cpp index 9e264b3e..5b5bb4b6 100644 --- a/qt/gen_qpictureformatplugin.cpp +++ b/qt/gen_qpictureformatplugin.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -5,10 +8,311 @@ #include #include #include +#include #include #include "gen_qpictureformatplugin.h" #include "_cgo_export.h" +class MiqtVirtualQPictureFormatPlugin : public virtual QPictureFormatPlugin { +public: + + MiqtVirtualQPictureFormatPlugin(): QPictureFormatPlugin() {}; + MiqtVirtualQPictureFormatPlugin(QObject* parent): QPictureFormatPlugin(parent) {}; + + virtual ~MiqtVirtualQPictureFormatPlugin() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__LoadPicture = 0; + + // Subclass to allow providing a Go implementation + virtual bool loadPicture(const QString& format, const QString& filename, QPicture* pic) override { + if (handle__LoadPicture == 0) { + return QPictureFormatPlugin::loadPicture(format, filename, pic); + } + + const QString format_ret = format; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray format_b = format_ret.toUtf8(); + struct miqt_string format_ms; + format_ms.len = format_b.length(); + format_ms.data = static_cast(malloc(format_ms.len)); + memcpy(format_ms.data, format_b.data(), format_ms.len); + struct miqt_string sigval1 = format_ms; + const QString filename_ret = filename; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray filename_b = filename_ret.toUtf8(); + struct miqt_string filename_ms; + filename_ms.len = filename_b.length(); + filename_ms.data = static_cast(malloc(filename_ms.len)); + memcpy(filename_ms.data, filename_b.data(), filename_ms.len); + struct miqt_string sigval2 = filename_ms; + QPicture* sigval3 = pic; + + bool callback_return_value = miqt_exec_callback_QPictureFormatPlugin_LoadPicture(this, handle__LoadPicture, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_LoadPicture(struct miqt_string format, struct miqt_string filename, QPicture* pic) { + QString format_QString = QString::fromUtf8(format.data, format.len); + QString filename_QString = QString::fromUtf8(filename.data, filename.len); + + return QPictureFormatPlugin::loadPicture(format_QString, filename_QString, pic); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SavePicture = 0; + + // Subclass to allow providing a Go implementation + virtual bool savePicture(const QString& format, const QString& filename, const QPicture& pic) override { + if (handle__SavePicture == 0) { + return QPictureFormatPlugin::savePicture(format, filename, pic); + } + + const QString format_ret = format; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray format_b = format_ret.toUtf8(); + struct miqt_string format_ms; + format_ms.len = format_b.length(); + format_ms.data = static_cast(malloc(format_ms.len)); + memcpy(format_ms.data, format_b.data(), format_ms.len); + struct miqt_string sigval1 = format_ms; + const QString filename_ret = filename; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray filename_b = filename_ret.toUtf8(); + struct miqt_string filename_ms; + filename_ms.len = filename_b.length(); + filename_ms.data = static_cast(malloc(filename_ms.len)); + memcpy(filename_ms.data, filename_b.data(), filename_ms.len); + struct miqt_string sigval2 = filename_ms; + const QPicture& pic_ret = pic; + // Cast returned reference into pointer + QPicture* sigval3 = const_cast(&pic_ret); + + bool callback_return_value = miqt_exec_callback_QPictureFormatPlugin_SavePicture(this, handle__SavePicture, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SavePicture(struct miqt_string format, struct miqt_string filename, QPicture* pic) { + QString format_QString = QString::fromUtf8(format.data, format.len); + QString filename_QString = QString::fromUtf8(filename.data, filename.len); + + return QPictureFormatPlugin::savePicture(format_QString, filename_QString, *pic); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InstallIOHandler = 0; + + // Subclass to allow providing a Go implementation + virtual bool installIOHandler(const QString& format) override { + if (handle__InstallIOHandler == 0) { + return false; // Pure virtual, there is no base we can call + } + + const QString format_ret = format; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray format_b = format_ret.toUtf8(); + struct miqt_string format_ms; + format_ms.len = format_b.length(); + format_ms.data = static_cast(malloc(format_ms.len)); + memcpy(format_ms.data, format_b.data(), format_ms.len); + struct miqt_string sigval1 = format_ms; + + bool callback_return_value = miqt_exec_callback_QPictureFormatPlugin_InstallIOHandler(this, handle__InstallIOHandler, sigval1); + + return callback_return_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 QPictureFormatPlugin::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPictureFormatPlugin_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QPictureFormatPlugin::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 QPictureFormatPlugin::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QPictureFormatPlugin_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QPictureFormatPlugin::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) { + QPictureFormatPlugin::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPictureFormatPlugin_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QPictureFormatPlugin::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) { + QPictureFormatPlugin::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPictureFormatPlugin_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QPictureFormatPlugin::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) { + QPictureFormatPlugin::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPictureFormatPlugin_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QPictureFormatPlugin::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) { + QPictureFormatPlugin::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPictureFormatPlugin_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QPictureFormatPlugin::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) { + QPictureFormatPlugin::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPictureFormatPlugin_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QPictureFormatPlugin::disconnectNotify(*signal); + + } + +}; + +void QPictureFormatPlugin_new(QPictureFormatPlugin** outptr_QPictureFormatPlugin, QObject** outptr_QObject) { + MiqtVirtualQPictureFormatPlugin* ret = new MiqtVirtualQPictureFormatPlugin(); + *outptr_QPictureFormatPlugin = ret; + *outptr_QObject = static_cast(ret); +} + +void QPictureFormatPlugin_new2(QObject* parent, QPictureFormatPlugin** outptr_QPictureFormatPlugin, QObject** outptr_QObject) { + MiqtVirtualQPictureFormatPlugin* ret = new MiqtVirtualQPictureFormatPlugin(parent); + *outptr_QPictureFormatPlugin = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QPictureFormatPlugin_MetaObject(const QPictureFormatPlugin* self) { return (QMetaObject*) self->metaObject(); } @@ -100,9 +404,85 @@ struct miqt_string QPictureFormatPlugin_TrUtf83(const char* s, const char* c, in return _ms; } +void QPictureFormatPlugin_override_virtual_LoadPicture(void* self, intptr_t slot) { + dynamic_cast( (QPictureFormatPlugin*)(self) )->handle__LoadPicture = slot; +} + +bool QPictureFormatPlugin_virtualbase_LoadPicture(void* self, struct miqt_string format, struct miqt_string filename, QPicture* pic) { + return ( (MiqtVirtualQPictureFormatPlugin*)(self) )->virtualbase_LoadPicture(format, filename, pic); +} + +void QPictureFormatPlugin_override_virtual_SavePicture(void* self, intptr_t slot) { + dynamic_cast( (QPictureFormatPlugin*)(self) )->handle__SavePicture = slot; +} + +bool QPictureFormatPlugin_virtualbase_SavePicture(void* self, struct miqt_string format, struct miqt_string filename, QPicture* pic) { + return ( (MiqtVirtualQPictureFormatPlugin*)(self) )->virtualbase_SavePicture(format, filename, pic); +} + +void QPictureFormatPlugin_override_virtual_InstallIOHandler(void* self, intptr_t slot) { + dynamic_cast( (QPictureFormatPlugin*)(self) )->handle__InstallIOHandler = slot; +} + +void QPictureFormatPlugin_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QPictureFormatPlugin*)(self) )->handle__Event = slot; +} + +bool QPictureFormatPlugin_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQPictureFormatPlugin*)(self) )->virtualbase_Event(event); +} + +void QPictureFormatPlugin_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QPictureFormatPlugin*)(self) )->handle__EventFilter = slot; +} + +bool QPictureFormatPlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQPictureFormatPlugin*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QPictureFormatPlugin_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QPictureFormatPlugin*)(self) )->handle__TimerEvent = slot; +} + +void QPictureFormatPlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQPictureFormatPlugin*)(self) )->virtualbase_TimerEvent(event); +} + +void QPictureFormatPlugin_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QPictureFormatPlugin*)(self) )->handle__ChildEvent = slot; +} + +void QPictureFormatPlugin_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQPictureFormatPlugin*)(self) )->virtualbase_ChildEvent(event); +} + +void QPictureFormatPlugin_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QPictureFormatPlugin*)(self) )->handle__CustomEvent = slot; +} + +void QPictureFormatPlugin_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQPictureFormatPlugin*)(self) )->virtualbase_CustomEvent(event); +} + +void QPictureFormatPlugin_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QPictureFormatPlugin*)(self) )->handle__ConnectNotify = slot; +} + +void QPictureFormatPlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQPictureFormatPlugin*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QPictureFormatPlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QPictureFormatPlugin*)(self) )->handle__DisconnectNotify = slot; +} + +void QPictureFormatPlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQPictureFormatPlugin*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QPictureFormatPlugin_Delete(QPictureFormatPlugin* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qpictureformatplugin.go b/qt/gen_qpictureformatplugin.go index d5d232a2..8163399a 100644 --- a/qt/gen_qpictureformatplugin.go +++ b/qt/gen_qpictureformatplugin.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,28 @@ func UnsafeNewQPictureFormatPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) * QObject: UnsafeNewQObject(h_QObject)} } +// NewQPictureFormatPlugin constructs a new QPictureFormatPlugin object. +func NewQPictureFormatPlugin() *QPictureFormatPlugin { + var outptr_QPictureFormatPlugin *C.QPictureFormatPlugin = nil + var outptr_QObject *C.QObject = nil + + C.QPictureFormatPlugin_new(&outptr_QPictureFormatPlugin, &outptr_QObject) + ret := newQPictureFormatPlugin(outptr_QPictureFormatPlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQPictureFormatPlugin2 constructs a new QPictureFormatPlugin object. +func NewQPictureFormatPlugin2(parent *QObject) *QPictureFormatPlugin { + var outptr_QPictureFormatPlugin *C.QPictureFormatPlugin = nil + var outptr_QObject *C.QObject = nil + + C.QPictureFormatPlugin_new2(parent.cPointer(), &outptr_QPictureFormatPlugin, &outptr_QObject) + ret := newQPictureFormatPlugin(outptr_QPictureFormatPlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QPictureFormatPlugin) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QPictureFormatPlugin_MetaObject(this.h))) } @@ -156,6 +179,276 @@ func QPictureFormatPlugin_TrUtf83(s string, c string, n int) string { return _ret } +func (this *QPictureFormatPlugin) callVirtualBase_LoadPicture(format string, filename string, pic *QPicture) bool { + format_ms := C.struct_miqt_string{} + format_ms.data = C.CString(format) + format_ms.len = C.size_t(len(format)) + defer C.free(unsafe.Pointer(format_ms.data)) + 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 (bool)(C.QPictureFormatPlugin_virtualbase_LoadPicture(unsafe.Pointer(this.h), format_ms, filename_ms, pic.cPointer())) + +} +func (this *QPictureFormatPlugin) OnLoadPicture(slot func(super func(format string, filename string, pic *QPicture) bool, format string, filename string, pic *QPicture) bool) { + C.QPictureFormatPlugin_override_virtual_LoadPicture(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPictureFormatPlugin_LoadPicture +func miqt_exec_callback_QPictureFormatPlugin_LoadPicture(self *C.QPictureFormatPlugin, cb C.intptr_t, format C.struct_miqt_string, filename C.struct_miqt_string, pic *C.QPicture) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(format string, filename string, pic *QPicture) bool, format string, filename string, pic *QPicture) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var format_ms C.struct_miqt_string = format + format_ret := C.GoStringN(format_ms.data, C.int(int64(format_ms.len))) + C.free(unsafe.Pointer(format_ms.data)) + slotval1 := format_ret + var filename_ms C.struct_miqt_string = filename + filename_ret := C.GoStringN(filename_ms.data, C.int(int64(filename_ms.len))) + C.free(unsafe.Pointer(filename_ms.data)) + slotval2 := filename_ret + slotval3 := UnsafeNewQPicture(unsafe.Pointer(pic), nil) + + virtualReturn := gofunc((&QPictureFormatPlugin{h: self}).callVirtualBase_LoadPicture, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPictureFormatPlugin) callVirtualBase_SavePicture(format string, filename string, pic *QPicture) bool { + format_ms := C.struct_miqt_string{} + format_ms.data = C.CString(format) + format_ms.len = C.size_t(len(format)) + defer C.free(unsafe.Pointer(format_ms.data)) + 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 (bool)(C.QPictureFormatPlugin_virtualbase_SavePicture(unsafe.Pointer(this.h), format_ms, filename_ms, pic.cPointer())) + +} +func (this *QPictureFormatPlugin) OnSavePicture(slot func(super func(format string, filename string, pic *QPicture) bool, format string, filename string, pic *QPicture) bool) { + C.QPictureFormatPlugin_override_virtual_SavePicture(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPictureFormatPlugin_SavePicture +func miqt_exec_callback_QPictureFormatPlugin_SavePicture(self *C.QPictureFormatPlugin, cb C.intptr_t, format C.struct_miqt_string, filename C.struct_miqt_string, pic *C.QPicture) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(format string, filename string, pic *QPicture) bool, format string, filename string, pic *QPicture) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var format_ms C.struct_miqt_string = format + format_ret := C.GoStringN(format_ms.data, C.int(int64(format_ms.len))) + C.free(unsafe.Pointer(format_ms.data)) + slotval1 := format_ret + var filename_ms C.struct_miqt_string = filename + filename_ret := C.GoStringN(filename_ms.data, C.int(int64(filename_ms.len))) + C.free(unsafe.Pointer(filename_ms.data)) + slotval2 := filename_ret + slotval3 := UnsafeNewQPicture(unsafe.Pointer(pic), nil) + + virtualReturn := gofunc((&QPictureFormatPlugin{h: self}).callVirtualBase_SavePicture, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} +func (this *QPictureFormatPlugin) OnInstallIOHandler(slot func(format string) bool) { + C.QPictureFormatPlugin_override_virtual_InstallIOHandler(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPictureFormatPlugin_InstallIOHandler +func miqt_exec_callback_QPictureFormatPlugin_InstallIOHandler(self *C.QPictureFormatPlugin, cb C.intptr_t, format C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(format string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var format_ms C.struct_miqt_string = format + format_ret := C.GoStringN(format_ms.data, C.int(int64(format_ms.len))) + C.free(unsafe.Pointer(format_ms.data)) + slotval1 := format_ret + + virtualReturn := gofunc(slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPictureFormatPlugin) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QPictureFormatPlugin_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QPictureFormatPlugin) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QPictureFormatPlugin_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPictureFormatPlugin_Event +func miqt_exec_callback_QPictureFormatPlugin_Event(self *C.QPictureFormatPlugin, 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((&QPictureFormatPlugin{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPictureFormatPlugin) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QPictureFormatPlugin_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QPictureFormatPlugin) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QPictureFormatPlugin_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPictureFormatPlugin_EventFilter +func miqt_exec_callback_QPictureFormatPlugin_EventFilter(self *C.QPictureFormatPlugin, 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((&QPictureFormatPlugin{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPictureFormatPlugin) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QPictureFormatPlugin_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QPictureFormatPlugin) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QPictureFormatPlugin_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPictureFormatPlugin_TimerEvent +func miqt_exec_callback_QPictureFormatPlugin_TimerEvent(self *C.QPictureFormatPlugin, 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((&QPictureFormatPlugin{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPictureFormatPlugin) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QPictureFormatPlugin_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QPictureFormatPlugin) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QPictureFormatPlugin_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPictureFormatPlugin_ChildEvent +func miqt_exec_callback_QPictureFormatPlugin_ChildEvent(self *C.QPictureFormatPlugin, 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((&QPictureFormatPlugin{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPictureFormatPlugin) callVirtualBase_CustomEvent(event *QEvent) { + + C.QPictureFormatPlugin_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QPictureFormatPlugin) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QPictureFormatPlugin_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPictureFormatPlugin_CustomEvent +func miqt_exec_callback_QPictureFormatPlugin_CustomEvent(self *C.QPictureFormatPlugin, 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((&QPictureFormatPlugin{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPictureFormatPlugin) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QPictureFormatPlugin_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QPictureFormatPlugin) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QPictureFormatPlugin_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPictureFormatPlugin_ConnectNotify +func miqt_exec_callback_QPictureFormatPlugin_ConnectNotify(self *C.QPictureFormatPlugin, 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((&QPictureFormatPlugin{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPictureFormatPlugin) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QPictureFormatPlugin_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QPictureFormatPlugin) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QPictureFormatPlugin_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPictureFormatPlugin_DisconnectNotify +func miqt_exec_callback_QPictureFormatPlugin_DisconnectNotify(self *C.QPictureFormatPlugin, 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((&QPictureFormatPlugin{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QPictureFormatPlugin) Delete() { C.QPictureFormatPlugin_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qpictureformatplugin.h b/qt/gen_qpictureformatplugin.h index 7ea5b893..e784514d 100644 --- a/qt/gen_qpictureformatplugin.h +++ b/qt/gen_qpictureformatplugin.h @@ -15,17 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QPicture; class QPictureFormatPlugin; +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 QPicture QPicture; typedef struct QPictureFormatPlugin QPictureFormatPlugin; +typedef struct QTimerEvent QTimerEvent; #endif +void QPictureFormatPlugin_new(QPictureFormatPlugin** outptr_QPictureFormatPlugin, QObject** outptr_QObject); +void QPictureFormatPlugin_new2(QObject* parent, QPictureFormatPlugin** outptr_QPictureFormatPlugin, QObject** outptr_QObject); QMetaObject* QPictureFormatPlugin_MetaObject(const QPictureFormatPlugin* self); void* QPictureFormatPlugin_Metacast(QPictureFormatPlugin* self, const char* param1); struct miqt_string QPictureFormatPlugin_Tr(const char* s); @@ -37,6 +47,26 @@ 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_override_virtual_LoadPicture(void* self, intptr_t slot); +bool QPictureFormatPlugin_virtualbase_LoadPicture(void* self, struct miqt_string format, struct miqt_string filename, QPicture* pic); +void QPictureFormatPlugin_override_virtual_SavePicture(void* self, intptr_t slot); +bool QPictureFormatPlugin_virtualbase_SavePicture(void* self, struct miqt_string format, struct miqt_string filename, QPicture* pic); +void QPictureFormatPlugin_override_virtual_InstallIOHandler(void* self, intptr_t slot); +bool QPictureFormatPlugin_virtualbase_InstallIOHandler(void* self, struct miqt_string format); +void QPictureFormatPlugin_override_virtual_Event(void* self, intptr_t slot); +bool QPictureFormatPlugin_virtualbase_Event(void* self, QEvent* event); +void QPictureFormatPlugin_override_virtual_EventFilter(void* self, intptr_t slot); +bool QPictureFormatPlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QPictureFormatPlugin_override_virtual_TimerEvent(void* self, intptr_t slot); +void QPictureFormatPlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QPictureFormatPlugin_override_virtual_ChildEvent(void* self, intptr_t slot); +void QPictureFormatPlugin_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QPictureFormatPlugin_override_virtual_CustomEvent(void* self, intptr_t slot); +void QPictureFormatPlugin_virtualbase_CustomEvent(void* self, QEvent* event); +void QPictureFormatPlugin_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QPictureFormatPlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QPictureFormatPlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QPictureFormatPlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QPictureFormatPlugin_Delete(QPictureFormatPlugin* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qrunnable.cpp b/qt/gen_qrunnable.cpp index 0b20ed50..c80d6c80 100644 --- a/qt/gen_qrunnable.cpp +++ b/qt/gen_qrunnable.cpp @@ -3,6 +3,35 @@ #include "gen_qrunnable.h" #include "_cgo_export.h" +class MiqtVirtualQRunnable : public virtual QRunnable { +public: + + MiqtVirtualQRunnable(): QRunnable() {}; + + virtual ~MiqtVirtualQRunnable() = default; + + // 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) { + return; // Pure virtual, there is no base we can call + } + + + miqt_exec_callback_QRunnable_Run(this, handle__Run); + + + } + +}; + +void QRunnable_new(QRunnable** outptr_QRunnable) { + MiqtVirtualQRunnable* ret = new MiqtVirtualQRunnable(); + *outptr_QRunnable = ret; +} + void QRunnable_Run(QRunnable* self) { self->run(); } @@ -19,9 +48,13 @@ void QRunnable_OperatorAssign(QRunnable* self, QRunnable* param1) { self->operator=(*param1); } +void QRunnable_override_virtual_Run(void* self, intptr_t slot) { + dynamic_cast( (QRunnable*)(self) )->handle__Run = slot; +} + void QRunnable_Delete(QRunnable* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qrunnable.go b/qt/gen_qrunnable.go index 266a0212..16cc0190 100644 --- a/qt/gen_qrunnable.go +++ b/qt/gen_qrunnable.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -49,6 +50,16 @@ func UnsafeNewQRunnable(h unsafe.Pointer) *QRunnable { return &QRunnable{h: (*C.QRunnable)(h)} } +// NewQRunnable constructs a new QRunnable object. +func NewQRunnable() *QRunnable { + var outptr_QRunnable *C.QRunnable = nil + + C.QRunnable_new(&outptr_QRunnable) + ret := newQRunnable(outptr_QRunnable) + ret.isSubclass = true + return ret +} + func (this *QRunnable) Run() { C.QRunnable_Run(this.h) } @@ -64,6 +75,20 @@ func (this *QRunnable) SetAutoDelete(_autoDelete bool) { func (this *QRunnable) OperatorAssign(param1 *QRunnable) { C.QRunnable_OperatorAssign(this.h, param1.cPointer()) } +func (this *QRunnable) OnRun(slot func()) { + C.QRunnable_override_virtual_Run(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRunnable_Run +func miqt_exec_callback_QRunnable_Run(self *C.QRunnable, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() + +} // Delete this object from C++ memory. func (this *QRunnable) Delete() { diff --git a/qt/gen_qrunnable.h b/qt/gen_qrunnable.h index 1927f6f0..a1711d21 100644 --- a/qt/gen_qrunnable.h +++ b/qt/gen_qrunnable.h @@ -20,10 +20,13 @@ class QRunnable; typedef struct QRunnable QRunnable; #endif +void QRunnable_new(QRunnable** outptr_QRunnable); 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_override_virtual_Run(void* self, intptr_t slot); +void QRunnable_virtualbase_Run(void* self); void QRunnable_Delete(QRunnable* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qsortfilterproxymodel.cpp b/qt/gen_qsortfilterproxymodel.cpp index 26bbfea9..18776f31 100644 --- a/qt/gen_qsortfilterproxymodel.cpp +++ b/qt/gen_qsortfilterproxymodel.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -100,6 +101,56 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__MapSelectionToSource = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelection mapSelectionToSource(const QItemSelection& proxySelection) const override { + if (handle__MapSelectionToSource == 0) { + return QSortFilterProxyModel::mapSelectionToSource(proxySelection); + } + + const QItemSelection& proxySelection_ret = proxySelection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&proxySelection_ret); + + QItemSelection* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_MapSelectionToSource(const_cast(this), handle__MapSelectionToSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QItemSelection* virtualbase_MapSelectionToSource(QItemSelection* proxySelection) const { + + return new QItemSelection(QSortFilterProxyModel::mapSelectionToSource(*proxySelection)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapSelectionFromSource = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelection mapSelectionFromSource(const QItemSelection& sourceSelection) const override { + if (handle__MapSelectionFromSource == 0) { + return QSortFilterProxyModel::mapSelectionFromSource(sourceSelection); + } + + const QItemSelection& sourceSelection_ret = sourceSelection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&sourceSelection_ret); + + QItemSelection* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_MapSelectionFromSource(const_cast(this), handle__MapSelectionFromSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QItemSelection* virtualbase_MapSelectionFromSource(QItemSelection* sourceSelection) const { + + return new QItemSelection(QSortFilterProxyModel::mapSelectionFromSource(*sourceSelection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__FilterAcceptsRow = 0; @@ -1137,6 +1188,14 @@ QModelIndex* QSortFilterProxyModel_MapFromSource(const QSortFilterProxyModel* se return new QModelIndex(self->mapFromSource(*sourceIndex)); } +QItemSelection* QSortFilterProxyModel_MapSelectionToSource(const QSortFilterProxyModel* self, QItemSelection* proxySelection) { + return new QItemSelection(self->mapSelectionToSource(*proxySelection)); +} + +QItemSelection* QSortFilterProxyModel_MapSelectionFromSource(const QSortFilterProxyModel* self, QItemSelection* sourceSelection) { + return new QItemSelection(self->mapSelectionFromSource(*sourceSelection)); +} + QRegExp* QSortFilterProxyModel_FilterRegExp(const QSortFilterProxyModel* self) { return new QRegExp(self->filterRegExp()); } @@ -1536,6 +1595,22 @@ QModelIndex* QSortFilterProxyModel_virtualbase_MapFromSource(const void* self, Q return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_MapFromSource(sourceIndex); } +void QSortFilterProxyModel_override_virtual_MapSelectionToSource(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__MapSelectionToSource = slot; +} + +QItemSelection* QSortFilterProxyModel_virtualbase_MapSelectionToSource(const void* self, QItemSelection* proxySelection) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_MapSelectionToSource(proxySelection); +} + +void QSortFilterProxyModel_override_virtual_MapSelectionFromSource(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__MapSelectionFromSource = slot; +} + +QItemSelection* QSortFilterProxyModel_virtualbase_MapSelectionFromSource(const void* self, QItemSelection* sourceSelection) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_MapSelectionFromSource(sourceSelection); +} + void QSortFilterProxyModel_override_virtual_FilterAcceptsRow(void* self, intptr_t slot) { dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__FilterAcceptsRow = slot; } diff --git a/qt/gen_qsortfilterproxymodel.go b/qt/gen_qsortfilterproxymodel.go index d9bfc252..56217310 100644 --- a/qt/gen_qsortfilterproxymodel.go +++ b/qt/gen_qsortfilterproxymodel.go @@ -125,6 +125,20 @@ func (this *QSortFilterProxyModel) MapFromSource(sourceIndex *QModelIndex) *QMod return _goptr } +func (this *QSortFilterProxyModel) MapSelectionToSource(proxySelection *QItemSelection) *QItemSelection { + _ret := C.QSortFilterProxyModel_MapSelectionToSource(this.h, proxySelection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSortFilterProxyModel) MapSelectionFromSource(sourceSelection *QItemSelection) *QItemSelection { + _ret := C.QSortFilterProxyModel_MapSelectionFromSource(this.h, sourceSelection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QSortFilterProxyModel) FilterRegExp() *QRegExp { _ret := C.QSortFilterProxyModel_FilterRegExp(this.h) _goptr := newQRegExp(_ret) @@ -667,6 +681,62 @@ func miqt_exec_callback_QSortFilterProxyModel_MapFromSource(self *C.QSortFilterP } +func (this *QSortFilterProxyModel) callVirtualBase_MapSelectionToSource(proxySelection *QItemSelection) *QItemSelection { + + _ret := C.QSortFilterProxyModel_virtualbase_MapSelectionToSource(unsafe.Pointer(this.h), proxySelection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSortFilterProxyModel) OnMapSelectionToSource(slot func(super func(proxySelection *QItemSelection) *QItemSelection, proxySelection *QItemSelection) *QItemSelection) { + C.QSortFilterProxyModel_override_virtual_MapSelectionToSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_MapSelectionToSource +func miqt_exec_callback_QSortFilterProxyModel_MapSelectionToSource(self *C.QSortFilterProxyModel, cb C.intptr_t, proxySelection *C.QItemSelection) *C.QItemSelection { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(proxySelection *QItemSelection) *QItemSelection, proxySelection *QItemSelection) *QItemSelection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(proxySelection)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_MapSelectionToSource, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSortFilterProxyModel) callVirtualBase_MapSelectionFromSource(sourceSelection *QItemSelection) *QItemSelection { + + _ret := C.QSortFilterProxyModel_virtualbase_MapSelectionFromSource(unsafe.Pointer(this.h), sourceSelection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSortFilterProxyModel) OnMapSelectionFromSource(slot func(super func(sourceSelection *QItemSelection) *QItemSelection, sourceSelection *QItemSelection) *QItemSelection) { + C.QSortFilterProxyModel_override_virtual_MapSelectionFromSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_MapSelectionFromSource +func miqt_exec_callback_QSortFilterProxyModel_MapSelectionFromSource(self *C.QSortFilterProxyModel, cb C.intptr_t, sourceSelection *C.QItemSelection) *C.QItemSelection { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceSelection *QItemSelection) *QItemSelection, sourceSelection *QItemSelection) *QItemSelection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(sourceSelection)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_MapSelectionFromSource, slotval1) + + return virtualReturn.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())) diff --git a/qt/gen_qsortfilterproxymodel.h b/qt/gen_qsortfilterproxymodel.h index 14b0df8a..c1fb82e7 100644 --- a/qt/gen_qsortfilterproxymodel.h +++ b/qt/gen_qsortfilterproxymodel.h @@ -17,6 +17,7 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; class QAbstractProxyModel; +class QItemSelection; class QMetaObject; class QMimeData; class QModelIndex; @@ -29,6 +30,7 @@ class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractProxyModel QAbstractProxyModel; +typedef struct QItemSelection QItemSelection; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; @@ -49,6 +51,8 @@ struct miqt_string QSortFilterProxyModel_TrUtf8(const char* s); void QSortFilterProxyModel_SetSourceModel(QSortFilterProxyModel* self, QAbstractItemModel* sourceModel); QModelIndex* QSortFilterProxyModel_MapToSource(const QSortFilterProxyModel* self, QModelIndex* proxyIndex); QModelIndex* QSortFilterProxyModel_MapFromSource(const QSortFilterProxyModel* self, QModelIndex* sourceIndex); +QItemSelection* QSortFilterProxyModel_MapSelectionToSource(const QSortFilterProxyModel* self, QItemSelection* proxySelection); +QItemSelection* QSortFilterProxyModel_MapSelectionFromSource(const QSortFilterProxyModel* self, QItemSelection* sourceSelection); QRegExp* QSortFilterProxyModel_FilterRegExp(const QSortFilterProxyModel* self); QRegularExpression* QSortFilterProxyModel_FilterRegularExpression(const QSortFilterProxyModel* self); int QSortFilterProxyModel_FilterKeyColumn(const QSortFilterProxyModel* self); @@ -129,6 +133,10 @@ void QSortFilterProxyModel_override_virtual_MapToSource(void* self, intptr_t slo 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_MapSelectionToSource(void* self, intptr_t slot); +QItemSelection* QSortFilterProxyModel_virtualbase_MapSelectionToSource(const void* self, QItemSelection* proxySelection); +void QSortFilterProxyModel_override_virtual_MapSelectionFromSource(void* self, intptr_t slot); +QItemSelection* QSortFilterProxyModel_virtualbase_MapSelectionFromSource(const void* self, QItemSelection* sourceSelection); 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); diff --git a/qt/gen_qstyle.cpp b/qt/gen_qstyle.cpp index fbad0ea1..bc61ea9f 100644 --- a/qt/gen_qstyle.cpp +++ b/qt/gen_qstyle.cpp @@ -1,6 +1,9 @@ #include +#include +#include #include #include +#include #include #include #include @@ -16,11 +19,749 @@ #include #include #include +#include #include #include #include "gen_qstyle.h" #include "_cgo_export.h" +class MiqtVirtualQStyle : public virtual QStyle { +public: + + MiqtVirtualQStyle(): QStyle() {}; + + virtual ~MiqtVirtualQStyle() = default; + + // 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) { + QStyle::polish(widget); + return; + } + + QWidget* sigval1 = widget; + + miqt_exec_callback_QStyle_Polish(this, handle__Polish, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Polish(QWidget* widget) { + + QStyle::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) { + QStyle::unpolish(widget); + return; + } + + QWidget* sigval1 = widget; + + miqt_exec_callback_QStyle_Unpolish(this, handle__Unpolish, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Unpolish(QWidget* widget) { + + QStyle::unpolish(widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishWithApplication = 0; + + // Subclass to allow providing a Go implementation + virtual void polish(QApplication* application) override { + if (handle__PolishWithApplication == 0) { + QStyle::polish(application); + return; + } + + QApplication* sigval1 = application; + + miqt_exec_callback_QStyle_PolishWithApplication(this, handle__PolishWithApplication, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishWithApplication(QApplication* application) { + + QStyle::polish(application); + + } + + // 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) { + QStyle::unpolish(application); + return; + } + + QApplication* sigval1 = application; + + miqt_exec_callback_QStyle_UnpolishWithApplication(this, handle__UnpolishWithApplication, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UnpolishWithApplication(QApplication* application) { + + QStyle::unpolish(application); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishWithPalette = 0; + + // Subclass to allow providing a Go implementation + virtual void polish(QPalette& palette) override { + if (handle__PolishWithPalette == 0) { + QStyle::polish(palette); + return; + } + + QPalette& palette_ret = palette; + // Cast returned reference into pointer + QPalette* sigval1 = &palette_ret; + + miqt_exec_callback_QStyle_PolishWithPalette(this, handle__PolishWithPalette, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishWithPalette(QPalette* palette) { + + QStyle::polish(*palette); + + } + + // 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 QStyle::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_QStyle_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(QStyle::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 QStyle::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_QStyle_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(QStyle::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) { + QStyle::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_QStyle_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); + + QStyle::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) { + QStyle::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_QStyle_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 { + + QStyle::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 QStyle::standardPalette(); + } + + + QPalette* callback_return_value = miqt_exec_callback_QStyle_StandardPalette(const_cast(this), handle__StandardPalette); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPalette* virtualbase_StandardPalette() const { + + return new QPalette(QStyle::standardPalette()); + + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + 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_QStyle_DrawPrimitive(const_cast(this), handle__DrawPrimitive, sigval1, sigval2, sigval3, sigval4); + + + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + 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_QStyle_DrawControl(const_cast(this), handle__DrawControl, sigval1, sigval2, sigval3, sigval4); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SubElementRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect subElementRect(QStyle::SubElement subElement, const QStyleOption* option, const QWidget* widget) const override { + if (handle__SubElementRect == 0) { + return QRect(); // Pure virtual, there is no base we can call + } + + QStyle::SubElement subElement_ret = subElement; + int sigval1 = static_cast(subElement_ret); + QStyleOption* sigval2 = (QStyleOption*) option; + QWidget* sigval3 = (QWidget*) widget; + + QRect* callback_return_value = miqt_exec_callback_QStyle_SubElementRect(const_cast(this), handle__SubElementRect, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // 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* widget) const override { + if (handle__DrawComplexControl == 0) { + return; // Pure virtual, there is no base we can call + } + + QStyle::ComplexControl cc_ret = cc; + int sigval1 = static_cast(cc_ret); + QStyleOptionComplex* sigval2 = (QStyleOptionComplex*) opt; + QPainter* sigval3 = p; + QWidget* sigval4 = (QWidget*) widget; + + miqt_exec_callback_QStyle_DrawComplexControl(const_cast(this), handle__DrawComplexControl, sigval1, sigval2, sigval3, sigval4); + + + } + + // 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* widget) const override { + if (handle__HitTestComplexControl == 0) { + return (QStyle::SubControl)(0); // Pure virtual, there is no base we can call + } + + 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*) widget; + + int callback_return_value = miqt_exec_callback_QStyle_HitTestComplexControl(const_cast(this), handle__HitTestComplexControl, sigval1, sigval2, sigval3, sigval4); + + return static_cast(callback_return_value); + } + + // 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 QRect(); // Pure virtual, there is no base we can call + } + + 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_QStyle_SubControlRect(const_cast(this), handle__SubControlRect, sigval1, sigval2, sigval3, sigval4); + + return *callback_return_value; + } + + // 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 0; // Pure virtual, there is no base we can call + } + + 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_QStyle_PixelMetric(const_cast(this), handle__PixelMetric, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // 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* w) const override { + if (handle__SizeFromContents == 0) { + return QSize(); // Pure virtual, there is no base we can call + } + + 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*) w; + + QSize* callback_return_value = miqt_exec_callback_QStyle_SizeFromContents(const_cast(this), handle__SizeFromContents, sigval1, sigval2, sigval3, sigval4); + + return *callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleHint = 0; + + // Subclass to allow providing a Go implementation + virtual int styleHint(QStyle::StyleHint stylehint, const QStyleOption* opt, const QWidget* widget, QStyleHintReturn* returnData) const override { + if (handle__StyleHint == 0) { + return 0; // Pure virtual, there is no base we can call + } + + QStyle::StyleHint stylehint_ret = stylehint; + int sigval1 = static_cast(stylehint_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QWidget* sigval3 = (QWidget*) widget; + QStyleHintReturn* sigval4 = returnData; + + int callback_return_value = miqt_exec_callback_QStyle_StyleHint(const_cast(this), handle__StyleHint, sigval1, sigval2, sigval3, sigval4); + + return static_cast(callback_return_value); + } + + // 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 QPixmap(); // Pure virtual, there is no base we can call + } + + 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_QStyle_StandardPixmap(const_cast(this), handle__StandardPixmap, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // 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 QIcon(); // Pure virtual, there is no base we can call + } + + 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_QStyle_StandardIcon(const_cast(this), handle__StandardIcon, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // 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 QPixmap(); // Pure virtual, there is no base we can call + } + + 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_QStyle_GeneratedIconPixmap(const_cast(this), handle__GeneratedIconPixmap, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // 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 0; // Pure virtual, there is no base we can call + } + + 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_QStyle_LayoutSpacing(const_cast(this), handle__LayoutSpacing, sigval1, sigval2, sigval3, sigval4, sigval5); + + return static_cast(callback_return_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 QStyle::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QStyle_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QStyle::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 QStyle::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QStyle_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QStyle::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) { + QStyle::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QStyle_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QStyle::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) { + QStyle::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QStyle_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QStyle::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) { + QStyle::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QStyle_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QStyle::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) { + QStyle::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QStyle_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QStyle::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) { + QStyle::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QStyle_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QStyle::disconnectNotify(*signal); + + } + +}; + +void QStyle_new(QStyle** outptr_QStyle, QObject** outptr_QObject) { + MiqtVirtualQStyle* ret = new MiqtVirtualQStyle(); + *outptr_QStyle = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QStyle_MetaObject(const QStyle* self) { return (QMetaObject*) self->metaObject(); } @@ -239,9 +980,197 @@ 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_override_virtual_Polish(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__Polish = slot; +} + +void QStyle_virtualbase_Polish(void* self, QWidget* widget) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_Polish(widget); +} + +void QStyle_override_virtual_Unpolish(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__Unpolish = slot; +} + +void QStyle_virtualbase_Unpolish(void* self, QWidget* widget) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_Unpolish(widget); +} + +void QStyle_override_virtual_PolishWithApplication(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__PolishWithApplication = slot; +} + +void QStyle_virtualbase_PolishWithApplication(void* self, QApplication* application) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_PolishWithApplication(application); +} + +void QStyle_override_virtual_UnpolishWithApplication(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__UnpolishWithApplication = slot; +} + +void QStyle_virtualbase_UnpolishWithApplication(void* self, QApplication* application) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_UnpolishWithApplication(application); +} + +void QStyle_override_virtual_PolishWithPalette(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__PolishWithPalette = slot; +} + +void QStyle_virtualbase_PolishWithPalette(void* self, QPalette* palette) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_PolishWithPalette(palette); +} + +void QStyle_override_virtual_ItemTextRect(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__ItemTextRect = slot; +} + +QRect* QStyle_virtualbase_ItemTextRect(const void* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text) { + return ( (const MiqtVirtualQStyle*)(self) )->virtualbase_ItemTextRect(fm, r, flags, enabled, text); +} + +void QStyle_override_virtual_ItemPixmapRect(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__ItemPixmapRect = slot; +} + +QRect* QStyle_virtualbase_ItemPixmapRect(const void* self, QRect* r, int flags, QPixmap* pixmap) { + return ( (const MiqtVirtualQStyle*)(self) )->virtualbase_ItemPixmapRect(r, flags, pixmap); +} + +void QStyle_override_virtual_DrawItemText(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__DrawItemText = slot; +} + +void QStyle_virtualbase_DrawItemText(const void* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) { + ( (const MiqtVirtualQStyle*)(self) )->virtualbase_DrawItemText(painter, rect, flags, pal, enabled, text, textRole); +} + +void QStyle_override_virtual_DrawItemPixmap(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__DrawItemPixmap = slot; +} + +void QStyle_virtualbase_DrawItemPixmap(const void* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap) { + ( (const MiqtVirtualQStyle*)(self) )->virtualbase_DrawItemPixmap(painter, rect, alignment, pixmap); +} + +void QStyle_override_virtual_StandardPalette(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__StandardPalette = slot; +} + +QPalette* QStyle_virtualbase_StandardPalette(const void* self) { + return ( (const MiqtVirtualQStyle*)(self) )->virtualbase_StandardPalette(); +} + +void QStyle_override_virtual_DrawPrimitive(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__DrawPrimitive = slot; +} + +void QStyle_override_virtual_DrawControl(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__DrawControl = slot; +} + +void QStyle_override_virtual_SubElementRect(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__SubElementRect = slot; +} + +void QStyle_override_virtual_DrawComplexControl(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__DrawComplexControl = slot; +} + +void QStyle_override_virtual_HitTestComplexControl(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__HitTestComplexControl = slot; +} + +void QStyle_override_virtual_SubControlRect(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__SubControlRect = slot; +} + +void QStyle_override_virtual_PixelMetric(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__PixelMetric = slot; +} + +void QStyle_override_virtual_SizeFromContents(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__SizeFromContents = slot; +} + +void QStyle_override_virtual_StyleHint(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__StyleHint = slot; +} + +void QStyle_override_virtual_StandardPixmap(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__StandardPixmap = slot; +} + +void QStyle_override_virtual_StandardIcon(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__StandardIcon = slot; +} + +void QStyle_override_virtual_GeneratedIconPixmap(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__GeneratedIconPixmap = slot; +} + +void QStyle_override_virtual_LayoutSpacing(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__LayoutSpacing = slot; +} + +void QStyle_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__Event = slot; +} + +bool QStyle_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQStyle*)(self) )->virtualbase_Event(event); +} + +void QStyle_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__EventFilter = slot; +} + +bool QStyle_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQStyle*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QStyle_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__TimerEvent = slot; +} + +void QStyle_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_TimerEvent(event); +} + +void QStyle_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__ChildEvent = slot; +} + +void QStyle_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_ChildEvent(event); +} + +void QStyle_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__CustomEvent = slot; +} + +void QStyle_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_CustomEvent(event); +} + +void QStyle_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__ConnectNotify = slot; +} + +void QStyle_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QStyle_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__DisconnectNotify = slot; +} + +void QStyle_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QStyle_Delete(QStyle* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qstyle.go b/qt/gen_qstyle.go index 3ef4ca53..806a2e3c 100644 --- a/qt/gen_qstyle.go +++ b/qt/gen_qstyle.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -675,6 +676,17 @@ func UnsafeNewQStyle(h unsafe.Pointer, h_QObject unsafe.Pointer) *QStyle { QObject: UnsafeNewQObject(h_QObject)} } +// NewQStyle constructs a new QStyle object. +func NewQStyle() *QStyle { + var outptr_QStyle *C.QStyle = nil + var outptr_QObject *C.QObject = nil + + C.QStyle_new(&outptr_QStyle, &outptr_QObject) + ret := newQStyle(outptr_QStyle, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QStyle) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QStyle_MetaObject(this.h))) } @@ -931,6 +943,741 @@ func (this *QStyle) CombinedLayoutSpacing5(controls1 QSizePolicy__ControlType, c return (int)(C.QStyle_CombinedLayoutSpacing5(this.h, (C.int)(controls1), (C.int)(controls2), (C.int)(orientation), option.cPointer(), widget.cPointer())) } +func (this *QStyle) callVirtualBase_Polish(widget *QWidget) { + + C.QStyle_virtualbase_Polish(unsafe.Pointer(this.h), widget.cPointer()) + +} +func (this *QStyle) OnPolish(slot func(super func(widget *QWidget), widget *QWidget)) { + C.QStyle_override_virtual_Polish(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_Polish +func miqt_exec_callback_QStyle_Polish(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_Polish, slotval1) + +} + +func (this *QStyle) callVirtualBase_Unpolish(widget *QWidget) { + + C.QStyle_virtualbase_Unpolish(unsafe.Pointer(this.h), widget.cPointer()) + +} +func (this *QStyle) OnUnpolish(slot func(super func(widget *QWidget), widget *QWidget)) { + C.QStyle_override_virtual_Unpolish(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_Unpolish +func miqt_exec_callback_QStyle_Unpolish(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_Unpolish, slotval1) + +} + +func (this *QStyle) callVirtualBase_PolishWithApplication(application *QApplication) { + + C.QStyle_virtualbase_PolishWithApplication(unsafe.Pointer(this.h), application.cPointer()) + +} +func (this *QStyle) OnPolishWithApplication(slot func(super func(application *QApplication), application *QApplication)) { + C.QStyle_override_virtual_PolishWithApplication(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_PolishWithApplication +func miqt_exec_callback_QStyle_PolishWithApplication(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_PolishWithApplication, slotval1) + +} + +func (this *QStyle) callVirtualBase_UnpolishWithApplication(application *QApplication) { + + C.QStyle_virtualbase_UnpolishWithApplication(unsafe.Pointer(this.h), application.cPointer()) + +} +func (this *QStyle) OnUnpolishWithApplication(slot func(super func(application *QApplication), application *QApplication)) { + C.QStyle_override_virtual_UnpolishWithApplication(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_UnpolishWithApplication +func miqt_exec_callback_QStyle_UnpolishWithApplication(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_UnpolishWithApplication, slotval1) + +} + +func (this *QStyle) callVirtualBase_PolishWithPalette(palette *QPalette) { + + C.QStyle_virtualbase_PolishWithPalette(unsafe.Pointer(this.h), palette.cPointer()) + +} +func (this *QStyle) OnPolishWithPalette(slot func(super func(palette *QPalette), palette *QPalette)) { + C.QStyle_override_virtual_PolishWithPalette(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_PolishWithPalette +func miqt_exec_callback_QStyle_PolishWithPalette(self *C.QStyle, cb C.intptr_t, palette *C.QPalette) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(palette *QPalette), palette *QPalette)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPalette(unsafe.Pointer(palette)) + + gofunc((&QStyle{h: self}).callVirtualBase_PolishWithPalette, slotval1) + +} + +func (this *QStyle) 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.QStyle_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 *QStyle) 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.QStyle_override_virtual_ItemTextRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_ItemTextRect +func miqt_exec_callback_QStyle_ItemTextRect(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_ItemTextRect, slotval1, slotval2, slotval3, slotval4, slotval5) + + return virtualReturn.cPointer() + +} + +func (this *QStyle) callVirtualBase_ItemPixmapRect(r *QRect, flags int, pixmap *QPixmap) *QRect { + + _ret := C.QStyle_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 *QStyle) OnItemPixmapRect(slot func(super func(r *QRect, flags int, pixmap *QPixmap) *QRect, r *QRect, flags int, pixmap *QPixmap) *QRect) { + C.QStyle_override_virtual_ItemPixmapRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_ItemPixmapRect +func miqt_exec_callback_QStyle_ItemPixmapRect(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_ItemPixmapRect, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QStyle) 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.QStyle_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 *QStyle) 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.QStyle_override_virtual_DrawItemText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_DrawItemText +func miqt_exec_callback_QStyle_DrawItemText(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_DrawItemText, slotval1, slotval2, slotval3, slotval4, slotval5, slotval6, slotval7) + +} + +func (this *QStyle) callVirtualBase_DrawItemPixmap(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap) { + + C.QStyle_virtualbase_DrawItemPixmap(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), (C.int)(alignment), pixmap.cPointer()) + +} +func (this *QStyle) OnDrawItemPixmap(slot func(super func(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap), painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap)) { + C.QStyle_override_virtual_DrawItemPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_DrawItemPixmap +func miqt_exec_callback_QStyle_DrawItemPixmap(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_DrawItemPixmap, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QStyle) callVirtualBase_StandardPalette() *QPalette { + + _ret := C.QStyle_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 *QStyle) OnStandardPalette(slot func(super func() *QPalette) *QPalette) { + C.QStyle_override_virtual_StandardPalette(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_StandardPalette +func miqt_exec_callback_QStyle_StandardPalette(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_StandardPalette) + + return virtualReturn.cPointer() + +} +func (this *QStyle) OnDrawPrimitive(slot func(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget)) { + C.QStyle_override_virtual_DrawPrimitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_DrawPrimitive +func miqt_exec_callback_QStyle_DrawPrimitive(self *C.QStyle, cb C.intptr_t, pe C.int, opt *C.QStyleOption, p *C.QPainter, w *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3, slotval4) + +} +func (this *QStyle) OnDrawControl(slot func(element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget)) { + C.QStyle_override_virtual_DrawControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_DrawControl +func miqt_exec_callback_QStyle_DrawControl(self *C.QStyle, cb C.intptr_t, element C.int, opt *C.QStyleOption, p *C.QPainter, w *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3, slotval4) + +} +func (this *QStyle) OnSubElementRect(slot func(subElement QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect) { + C.QStyle_override_virtual_SubElementRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_SubElementRect +func miqt_exec_callback_QStyle_SubElementRect(self *C.QStyle, cb C.intptr_t, subElement C.int, option *C.QStyleOption, widget *C.QWidget) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(subElement 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)(subElement) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc(slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} +func (this *QStyle) OnDrawComplexControl(slot func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, widget *QWidget)) { + C.QStyle_override_virtual_DrawComplexControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_DrawComplexControl +func miqt_exec_callback_QStyle_DrawComplexControl(self *C.QStyle, cb C.intptr_t, cc C.int, opt *C.QStyleOptionComplex, p *C.QPainter, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, widget *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(widget), nil, nil) + + gofunc(slotval1, slotval2, slotval3, slotval4) + +} +func (this *QStyle) OnHitTestComplexControl(slot func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, widget *QWidget) QStyle__SubControl) { + C.QStyle_override_virtual_HitTestComplexControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_HitTestComplexControl +func miqt_exec_callback_QStyle_HitTestComplexControl(self *C.QStyle, cb C.intptr_t, cc C.int, opt *C.QStyleOptionComplex, pt *C.QPoint, widget *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *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)(cc) + + slotval2 := UnsafeNewQStyleOptionComplex(unsafe.Pointer(opt), nil) + slotval3 := UnsafeNewQPoint(unsafe.Pointer(pt)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc(slotval1, slotval2, slotval3, slotval4) + + return (C.int)(virtualReturn) + +} +func (this *QStyle) OnSubControlRect(slot func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect) { + C.QStyle_override_virtual_SubControlRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_SubControlRect +func miqt_exec_callback_QStyle_SubControlRect(self *C.QStyle, 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(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(slotval1, slotval2, slotval3, slotval4) + + return virtualReturn.cPointer() + +} +func (this *QStyle) OnPixelMetric(slot func(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int) { + C.QStyle_override_virtual_PixelMetric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_PixelMetric +func miqt_exec_callback_QStyle_PixelMetric(self *C.QStyle, cb C.intptr_t, metric C.int, option *C.QStyleOption, widget *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + + return (C.int)(virtualReturn) + +} +func (this *QStyle) OnSizeFromContents(slot func(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, w *QWidget) *QSize) { + C.QStyle_override_virtual_SizeFromContents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_SizeFromContents +func miqt_exec_callback_QStyle_SizeFromContents(self *C.QStyle, cb C.intptr_t, ct C.int, opt *C.QStyleOption, contentsSize *C.QSize, w *C.QWidget) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, w *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(w), nil, nil) + + virtualReturn := gofunc(slotval1, slotval2, slotval3, slotval4) + + return virtualReturn.cPointer() + +} +func (this *QStyle) OnStyleHint(slot func(stylehint QStyle__StyleHint, opt *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int) { + C.QStyle_override_virtual_StyleHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_StyleHint +func miqt_exec_callback_QStyle_StyleHint(self *C.QStyle, cb C.intptr_t, stylehint C.int, opt *C.QStyleOption, widget *C.QWidget, returnData *C.QStyleHintReturn) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(stylehint QStyle__StyleHint, opt *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)(stylehint) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + slotval4 := UnsafeNewQStyleHintReturn(unsafe.Pointer(returnData)) + + virtualReturn := gofunc(slotval1, slotval2, slotval3, slotval4) + + return (C.int)(virtualReturn) + +} +func (this *QStyle) OnStandardPixmap(slot func(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap) { + C.QStyle_override_virtual_StandardPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_StandardPixmap +func miqt_exec_callback_QStyle_StandardPixmap(self *C.QStyle, cb C.intptr_t, standardPixmap C.int, opt *C.QStyleOption, widget *C.QWidget) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} +func (this *QStyle) OnStandardIcon(slot func(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon) { + C.QStyle_override_virtual_StandardIcon(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_StandardIcon +func miqt_exec_callback_QStyle_StandardIcon(self *C.QStyle, cb C.intptr_t, standardIcon C.int, option *C.QStyleOption, widget *C.QWidget) *C.QIcon { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} +func (this *QStyle) OnGeneratedIconPixmap(slot func(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap) { + C.QStyle_override_virtual_GeneratedIconPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_GeneratedIconPixmap +func miqt_exec_callback_QStyle_GeneratedIconPixmap(self *C.QStyle, cb C.intptr_t, iconMode C.int, pixmap *C.QPixmap, opt *C.QStyleOption) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} +func (this *QStyle) OnLayoutSpacing(slot func(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int) { + C.QStyle_override_virtual_LayoutSpacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_LayoutSpacing +func miqt_exec_callback_QStyle_LayoutSpacing(self *C.QStyle, 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(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(slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.int)(virtualReturn) + +} + +func (this *QStyle) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QStyle_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QStyle) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QStyle_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_Event +func miqt_exec_callback_QStyle_Event(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QStyle) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QStyle_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QStyle) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QStyle_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_EventFilter +func miqt_exec_callback_QStyle_EventFilter(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QStyle) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QStyle_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStyle) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QStyle_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_TimerEvent +func miqt_exec_callback_QStyle_TimerEvent(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QStyle) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QStyle_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStyle) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QStyle_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_ChildEvent +func miqt_exec_callback_QStyle_ChildEvent(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QStyle) callVirtualBase_CustomEvent(event *QEvent) { + + C.QStyle_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStyle) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QStyle_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_CustomEvent +func miqt_exec_callback_QStyle_CustomEvent(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QStyle) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QStyle_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QStyle) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QStyle_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_ConnectNotify +func miqt_exec_callback_QStyle_ConnectNotify(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QStyle) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QStyle_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QStyle) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QStyle_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_DisconnectNotify +func miqt_exec_callback_QStyle_DisconnectNotify(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QStyle) Delete() { C.QStyle_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/gen_qstyle.h b/qt/gen_qstyle.h index 5c25d3e5..fc1c45c6 100644 --- a/qt/gen_qstyle.h +++ b/qt/gen_qstyle.h @@ -16,8 +16,11 @@ extern "C" { #ifdef __cplusplus class QApplication; +class QChildEvent; +class QEvent; class QFontMetrics; class QIcon; +class QMetaMethod; class QMetaObject; class QObject; class QPainter; @@ -30,11 +33,15 @@ class QStyle; class QStyleHintReturn; class QStyleOption; class QStyleOptionComplex; +class QTimerEvent; class QWidget; #else typedef struct QApplication QApplication; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QFontMetrics QFontMetrics; typedef struct QIcon QIcon; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPainter QPainter; @@ -47,9 +54,11 @@ typedef struct QStyle QStyle; typedef struct QStyleHintReturn QStyleHintReturn; typedef struct QStyleOption QStyleOption; typedef struct QStyleOptionComplex QStyleOptionComplex; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif +void QStyle_new(QStyle** outptr_QStyle, QObject** outptr_QObject); QMetaObject* QStyle_MetaObject(const QStyle* self); void* QStyle_Metacast(QStyle* self, const char* param1); struct miqt_string QStyle_Tr(const char* s); @@ -93,6 +102,66 @@ int QStyle_SliderPositionFromValue5(int min, int max, int val, int space, bool u int QStyle_SliderValueFromPosition5(int min, int max, int pos, int space, bool upsideDown); 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_override_virtual_Polish(void* self, intptr_t slot); +void QStyle_virtualbase_Polish(void* self, QWidget* widget); +void QStyle_override_virtual_Unpolish(void* self, intptr_t slot); +void QStyle_virtualbase_Unpolish(void* self, QWidget* widget); +void QStyle_override_virtual_PolishWithApplication(void* self, intptr_t slot); +void QStyle_virtualbase_PolishWithApplication(void* self, QApplication* application); +void QStyle_override_virtual_UnpolishWithApplication(void* self, intptr_t slot); +void QStyle_virtualbase_UnpolishWithApplication(void* self, QApplication* application); +void QStyle_override_virtual_PolishWithPalette(void* self, intptr_t slot); +void QStyle_virtualbase_PolishWithPalette(void* self, QPalette* palette); +void QStyle_override_virtual_ItemTextRect(void* self, intptr_t slot); +QRect* QStyle_virtualbase_ItemTextRect(const void* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text); +void QStyle_override_virtual_ItemPixmapRect(void* self, intptr_t slot); +QRect* QStyle_virtualbase_ItemPixmapRect(const void* self, QRect* r, int flags, QPixmap* pixmap); +void QStyle_override_virtual_DrawItemText(void* self, intptr_t slot); +void QStyle_virtualbase_DrawItemText(const void* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole); +void QStyle_override_virtual_DrawItemPixmap(void* self, intptr_t slot); +void QStyle_virtualbase_DrawItemPixmap(const void* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap); +void QStyle_override_virtual_StandardPalette(void* self, intptr_t slot); +QPalette* QStyle_virtualbase_StandardPalette(const void* self); +void QStyle_override_virtual_DrawPrimitive(void* self, intptr_t slot); +void QStyle_virtualbase_DrawPrimitive(const void* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w); +void QStyle_override_virtual_DrawControl(void* self, intptr_t slot); +void QStyle_virtualbase_DrawControl(const void* self, int element, QStyleOption* opt, QPainter* p, QWidget* w); +void QStyle_override_virtual_SubElementRect(void* self, intptr_t slot); +QRect* QStyle_virtualbase_SubElementRect(const void* self, int subElement, QStyleOption* option, QWidget* widget); +void QStyle_override_virtual_DrawComplexControl(void* self, intptr_t slot); +void QStyle_virtualbase_DrawComplexControl(const void* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* widget); +void QStyle_override_virtual_HitTestComplexControl(void* self, intptr_t slot); +int QStyle_virtualbase_HitTestComplexControl(const void* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* widget); +void QStyle_override_virtual_SubControlRect(void* self, intptr_t slot); +QRect* QStyle_virtualbase_SubControlRect(const void* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget); +void QStyle_override_virtual_PixelMetric(void* self, intptr_t slot); +int QStyle_virtualbase_PixelMetric(const void* self, int metric, QStyleOption* option, QWidget* widget); +void QStyle_override_virtual_SizeFromContents(void* self, intptr_t slot); +QSize* QStyle_virtualbase_SizeFromContents(const void* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* w); +void QStyle_override_virtual_StyleHint(void* self, intptr_t slot); +int QStyle_virtualbase_StyleHint(const void* self, int stylehint, QStyleOption* opt, QWidget* widget, QStyleHintReturn* returnData); +void QStyle_override_virtual_StandardPixmap(void* self, intptr_t slot); +QPixmap* QStyle_virtualbase_StandardPixmap(const void* self, int standardPixmap, QStyleOption* opt, QWidget* widget); +void QStyle_override_virtual_StandardIcon(void* self, intptr_t slot); +QIcon* QStyle_virtualbase_StandardIcon(const void* self, int standardIcon, QStyleOption* option, QWidget* widget); +void QStyle_override_virtual_GeneratedIconPixmap(void* self, intptr_t slot); +QPixmap* QStyle_virtualbase_GeneratedIconPixmap(const void* self, int iconMode, QPixmap* pixmap, QStyleOption* opt); +void QStyle_override_virtual_LayoutSpacing(void* self, intptr_t slot); +int QStyle_virtualbase_LayoutSpacing(const void* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); +void QStyle_override_virtual_Event(void* self, intptr_t slot); +bool QStyle_virtualbase_Event(void* self, QEvent* event); +void QStyle_override_virtual_EventFilter(void* self, intptr_t slot); +bool QStyle_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QStyle_override_virtual_TimerEvent(void* self, intptr_t slot); +void QStyle_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QStyle_override_virtual_ChildEvent(void* self, intptr_t slot); +void QStyle_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QStyle_override_virtual_CustomEvent(void* self, intptr_t slot); +void QStyle_virtualbase_CustomEvent(void* self, QEvent* event); +void QStyle_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QStyle_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QStyle_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QStyle_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QStyle_Delete(QStyle* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qstyleplugin.cpp b/qt/gen_qstyleplugin.cpp index 00eda03a..baeeb7e8 100644 --- a/qt/gen_qstyleplugin.cpp +++ b/qt/gen_qstyleplugin.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -5,10 +8,227 @@ #include #include #include +#include #include #include "gen_qstyleplugin.h" #include "_cgo_export.h" +class MiqtVirtualQStylePlugin : public virtual QStylePlugin { +public: + + MiqtVirtualQStylePlugin(): QStylePlugin() {}; + MiqtVirtualQStylePlugin(QObject* parent): QStylePlugin(parent) {}; + + virtual ~MiqtVirtualQStylePlugin() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Create = 0; + + // Subclass to allow providing a Go implementation + virtual QStyle* create(const QString& key) override { + if (handle__Create == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + 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(); + struct miqt_string key_ms; + key_ms.len = key_b.length(); + key_ms.data = static_cast(malloc(key_ms.len)); + memcpy(key_ms.data, key_b.data(), key_ms.len); + struct miqt_string sigval1 = key_ms; + + QStyle* callback_return_value = miqt_exec_callback_QStylePlugin_Create(this, handle__Create, sigval1); + + return callback_return_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 QStylePlugin::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QStylePlugin_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QStylePlugin::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 QStylePlugin::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QStylePlugin_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QStylePlugin::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) { + QStylePlugin::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QStylePlugin_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QStylePlugin::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) { + QStylePlugin::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QStylePlugin_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QStylePlugin::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) { + QStylePlugin::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QStylePlugin_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QStylePlugin::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) { + QStylePlugin::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QStylePlugin_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QStylePlugin::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) { + QStylePlugin::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QStylePlugin_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QStylePlugin::disconnectNotify(*signal); + + } + +}; + +void QStylePlugin_new(QStylePlugin** outptr_QStylePlugin, QObject** outptr_QObject) { + MiqtVirtualQStylePlugin* ret = new MiqtVirtualQStylePlugin(); + *outptr_QStylePlugin = ret; + *outptr_QObject = static_cast(ret); +} + +void QStylePlugin_new2(QObject* parent, QStylePlugin** outptr_QStylePlugin, QObject** outptr_QObject) { + MiqtVirtualQStylePlugin* ret = new MiqtVirtualQStylePlugin(parent); + *outptr_QStylePlugin = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QStylePlugin_MetaObject(const QStylePlugin* self) { return (QMetaObject*) self->metaObject(); } @@ -88,9 +308,69 @@ struct miqt_string QStylePlugin_TrUtf83(const char* s, const char* c, int n) { return _ms; } +void QStylePlugin_override_virtual_Create(void* self, intptr_t slot) { + dynamic_cast( (QStylePlugin*)(self) )->handle__Create = slot; +} + +void QStylePlugin_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QStylePlugin*)(self) )->handle__Event = slot; +} + +bool QStylePlugin_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQStylePlugin*)(self) )->virtualbase_Event(event); +} + +void QStylePlugin_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QStylePlugin*)(self) )->handle__EventFilter = slot; +} + +bool QStylePlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQStylePlugin*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QStylePlugin_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QStylePlugin*)(self) )->handle__TimerEvent = slot; +} + +void QStylePlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQStylePlugin*)(self) )->virtualbase_TimerEvent(event); +} + +void QStylePlugin_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QStylePlugin*)(self) )->handle__ChildEvent = slot; +} + +void QStylePlugin_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQStylePlugin*)(self) )->virtualbase_ChildEvent(event); +} + +void QStylePlugin_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QStylePlugin*)(self) )->handle__CustomEvent = slot; +} + +void QStylePlugin_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQStylePlugin*)(self) )->virtualbase_CustomEvent(event); +} + +void QStylePlugin_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QStylePlugin*)(self) )->handle__ConnectNotify = slot; +} + +void QStylePlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQStylePlugin*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QStylePlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QStylePlugin*)(self) )->handle__DisconnectNotify = slot; +} + +void QStylePlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQStylePlugin*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QStylePlugin_Delete(QStylePlugin* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qstyleplugin.go b/qt/gen_qstyleplugin.go index eb1111ac..3553f1df 100644 --- a/qt/gen_qstyleplugin.go +++ b/qt/gen_qstyleplugin.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,28 @@ func UnsafeNewQStylePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QStylePl QObject: UnsafeNewQObject(h_QObject)} } +// NewQStylePlugin constructs a new QStylePlugin object. +func NewQStylePlugin() *QStylePlugin { + var outptr_QStylePlugin *C.QStylePlugin = nil + var outptr_QObject *C.QObject = nil + + C.QStylePlugin_new(&outptr_QStylePlugin, &outptr_QObject) + ret := newQStylePlugin(outptr_QStylePlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQStylePlugin2 constructs a new QStylePlugin object. +func NewQStylePlugin2(parent *QObject) *QStylePlugin { + var outptr_QStylePlugin *C.QStylePlugin = nil + var outptr_QObject *C.QObject = nil + + C.QStylePlugin_new2(parent.cPointer(), &outptr_QStylePlugin, &outptr_QObject) + ret := newQStylePlugin(outptr_QStylePlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QStylePlugin) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QStylePlugin_MetaObject(this.h))) } @@ -131,6 +154,194 @@ func QStylePlugin_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QStylePlugin) OnCreate(slot func(key string) *QStyle) { + C.QStylePlugin_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStylePlugin_Create +func miqt_exec_callback_QStylePlugin_Create(self *C.QStylePlugin, cb C.intptr_t, key C.struct_miqt_string) *C.QStyle { + gofunc, ok := cgo.Handle(cb).Value().(func(key string) *QStyle) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var key_ms C.struct_miqt_string = key + key_ret := C.GoStringN(key_ms.data, C.int(int64(key_ms.len))) + C.free(unsafe.Pointer(key_ms.data)) + slotval1 := key_ret + + virtualReturn := gofunc(slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStylePlugin) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QStylePlugin_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QStylePlugin) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QStylePlugin_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStylePlugin_Event +func miqt_exec_callback_QStylePlugin_Event(self *C.QStylePlugin, 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((&QStylePlugin{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QStylePlugin) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QStylePlugin_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QStylePlugin) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QStylePlugin_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStylePlugin_EventFilter +func miqt_exec_callback_QStylePlugin_EventFilter(self *C.QStylePlugin, 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((&QStylePlugin{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QStylePlugin) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QStylePlugin_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStylePlugin) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QStylePlugin_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStylePlugin_TimerEvent +func miqt_exec_callback_QStylePlugin_TimerEvent(self *C.QStylePlugin, 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((&QStylePlugin{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QStylePlugin) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QStylePlugin_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStylePlugin) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QStylePlugin_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStylePlugin_ChildEvent +func miqt_exec_callback_QStylePlugin_ChildEvent(self *C.QStylePlugin, 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((&QStylePlugin{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QStylePlugin) callVirtualBase_CustomEvent(event *QEvent) { + + C.QStylePlugin_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStylePlugin) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QStylePlugin_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStylePlugin_CustomEvent +func miqt_exec_callback_QStylePlugin_CustomEvent(self *C.QStylePlugin, 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((&QStylePlugin{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QStylePlugin) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QStylePlugin_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QStylePlugin) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QStylePlugin_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStylePlugin_ConnectNotify +func miqt_exec_callback_QStylePlugin_ConnectNotify(self *C.QStylePlugin, 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((&QStylePlugin{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QStylePlugin) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QStylePlugin_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QStylePlugin) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QStylePlugin_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStylePlugin_DisconnectNotify +func miqt_exec_callback_QStylePlugin_DisconnectNotify(self *C.QStylePlugin, 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((&QStylePlugin{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QStylePlugin) Delete() { diff --git a/qt/gen_qstyleplugin.h b/qt/gen_qstyleplugin.h index 4185d0a6..bf601372 100644 --- a/qt/gen_qstyleplugin.h +++ b/qt/gen_qstyleplugin.h @@ -15,17 +15,27 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QStyle; class QStylePlugin; +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 QStyle QStyle; typedef struct QStylePlugin QStylePlugin; +typedef struct QTimerEvent QTimerEvent; #endif +void QStylePlugin_new(QStylePlugin** outptr_QStylePlugin, QObject** outptr_QObject); +void QStylePlugin_new2(QObject* parent, QStylePlugin** outptr_QStylePlugin, QObject** outptr_QObject); QMetaObject* QStylePlugin_MetaObject(const QStylePlugin* self); void* QStylePlugin_Metacast(QStylePlugin* self, const char* param1); struct miqt_string QStylePlugin_Tr(const char* s); @@ -35,6 +45,22 @@ 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_override_virtual_Create(void* self, intptr_t slot); +QStyle* QStylePlugin_virtualbase_Create(void* self, struct miqt_string key); +void QStylePlugin_override_virtual_Event(void* self, intptr_t slot); +bool QStylePlugin_virtualbase_Event(void* self, QEvent* event); +void QStylePlugin_override_virtual_EventFilter(void* self, intptr_t slot); +bool QStylePlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QStylePlugin_override_virtual_TimerEvent(void* self, intptr_t slot); +void QStylePlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QStylePlugin_override_virtual_ChildEvent(void* self, intptr_t slot); +void QStylePlugin_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QStylePlugin_override_virtual_CustomEvent(void* self, intptr_t slot); +void QStylePlugin_virtualbase_CustomEvent(void* self, QEvent* event); +void QStylePlugin_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QStylePlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QStylePlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QStylePlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QStylePlugin_Delete(QStylePlugin* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qsyntaxhighlighter.cpp b/qt/gen_qsyntaxhighlighter.cpp index c9d290a5..417e4fc1 100644 --- a/qt/gen_qsyntaxhighlighter.cpp +++ b/qt/gen_qsyntaxhighlighter.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -6,10 +9,227 @@ #include #include #include +#include #include #include "gen_qsyntaxhighlighter.h" #include "_cgo_export.h" +class MiqtVirtualQSyntaxHighlighter : public virtual QSyntaxHighlighter { +public: + + MiqtVirtualQSyntaxHighlighter(QObject* parent): QSyntaxHighlighter(parent) {}; + MiqtVirtualQSyntaxHighlighter(QTextDocument* parent): QSyntaxHighlighter(parent) {}; + + virtual ~MiqtVirtualQSyntaxHighlighter() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__HighlightBlock = 0; + + // Subclass to allow providing a Go implementation + virtual void highlightBlock(const QString& text) override { + if (handle__HighlightBlock == 0) { + return; // Pure virtual, there is no base we can call + } + + 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_QSyntaxHighlighter_HighlightBlock(this, handle__HighlightBlock, sigval1); + + + } + + // 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 QSyntaxHighlighter::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSyntaxHighlighter_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSyntaxHighlighter::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 QSyntaxHighlighter::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSyntaxHighlighter_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSyntaxHighlighter::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) { + QSyntaxHighlighter::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSyntaxHighlighter_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSyntaxHighlighter::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) { + QSyntaxHighlighter::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSyntaxHighlighter_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSyntaxHighlighter::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) { + QSyntaxHighlighter::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSyntaxHighlighter_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSyntaxHighlighter::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) { + QSyntaxHighlighter::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSyntaxHighlighter_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSyntaxHighlighter::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) { + QSyntaxHighlighter::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSyntaxHighlighter_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSyntaxHighlighter::disconnectNotify(*signal); + + } + +}; + +void QSyntaxHighlighter_new(QObject* parent, QSyntaxHighlighter** outptr_QSyntaxHighlighter, QObject** outptr_QObject) { + MiqtVirtualQSyntaxHighlighter* ret = new MiqtVirtualQSyntaxHighlighter(parent); + *outptr_QSyntaxHighlighter = ret; + *outptr_QObject = static_cast(ret); +} + +void QSyntaxHighlighter_new2(QTextDocument* parent, QSyntaxHighlighter** outptr_QSyntaxHighlighter, QObject** outptr_QObject) { + MiqtVirtualQSyntaxHighlighter* ret = new MiqtVirtualQSyntaxHighlighter(parent); + *outptr_QSyntaxHighlighter = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QSyntaxHighlighter_MetaObject(const QSyntaxHighlighter* self) { return (QMetaObject*) self->metaObject(); } @@ -100,9 +320,69 @@ struct miqt_string QSyntaxHighlighter_TrUtf83(const char* s, const char* c, int return _ms; } +void QSyntaxHighlighter_override_virtual_HighlightBlock(void* self, intptr_t slot) { + dynamic_cast( (QSyntaxHighlighter*)(self) )->handle__HighlightBlock = slot; +} + +void QSyntaxHighlighter_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSyntaxHighlighter*)(self) )->handle__Event = slot; +} + +bool QSyntaxHighlighter_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSyntaxHighlighter*)(self) )->virtualbase_Event(event); +} + +void QSyntaxHighlighter_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSyntaxHighlighter*)(self) )->handle__EventFilter = slot; +} + +bool QSyntaxHighlighter_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSyntaxHighlighter*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSyntaxHighlighter_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSyntaxHighlighter*)(self) )->handle__TimerEvent = slot; +} + +void QSyntaxHighlighter_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSyntaxHighlighter*)(self) )->virtualbase_TimerEvent(event); +} + +void QSyntaxHighlighter_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSyntaxHighlighter*)(self) )->handle__ChildEvent = slot; +} + +void QSyntaxHighlighter_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSyntaxHighlighter*)(self) )->virtualbase_ChildEvent(event); +} + +void QSyntaxHighlighter_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSyntaxHighlighter*)(self) )->handle__CustomEvent = slot; +} + +void QSyntaxHighlighter_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSyntaxHighlighter*)(self) )->virtualbase_CustomEvent(event); +} + +void QSyntaxHighlighter_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSyntaxHighlighter*)(self) )->handle__ConnectNotify = slot; +} + +void QSyntaxHighlighter_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSyntaxHighlighter*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSyntaxHighlighter_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSyntaxHighlighter*)(self) )->handle__DisconnectNotify = slot; +} + +void QSyntaxHighlighter_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSyntaxHighlighter*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QSyntaxHighlighter_Delete(QSyntaxHighlighter* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qsyntaxhighlighter.go b/qt/gen_qsyntaxhighlighter.go index bd8e679a..a4c61f02 100644 --- a/qt/gen_qsyntaxhighlighter.go +++ b/qt/gen_qsyntaxhighlighter.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,28 @@ func UnsafeNewQSyntaxHighlighter(h unsafe.Pointer, h_QObject unsafe.Pointer) *QS QObject: UnsafeNewQObject(h_QObject)} } +// NewQSyntaxHighlighter constructs a new QSyntaxHighlighter object. +func NewQSyntaxHighlighter(parent *QObject) *QSyntaxHighlighter { + var outptr_QSyntaxHighlighter *C.QSyntaxHighlighter = nil + var outptr_QObject *C.QObject = nil + + C.QSyntaxHighlighter_new(parent.cPointer(), &outptr_QSyntaxHighlighter, &outptr_QObject) + ret := newQSyntaxHighlighter(outptr_QSyntaxHighlighter, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQSyntaxHighlighter2 constructs a new QSyntaxHighlighter object. +func NewQSyntaxHighlighter2(parent *QTextDocument) *QSyntaxHighlighter { + var outptr_QSyntaxHighlighter *C.QSyntaxHighlighter = nil + var outptr_QObject *C.QObject = nil + + C.QSyntaxHighlighter_new2(parent.cPointer(), &outptr_QSyntaxHighlighter, &outptr_QObject) + ret := newQSyntaxHighlighter(outptr_QSyntaxHighlighter, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QSyntaxHighlighter) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QSyntaxHighlighter_MetaObject(this.h))) } @@ -139,6 +162,192 @@ func QSyntaxHighlighter_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QSyntaxHighlighter) OnHighlightBlock(slot func(text string)) { + C.QSyntaxHighlighter_override_virtual_HighlightBlock(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSyntaxHighlighter_HighlightBlock +func miqt_exec_callback_QSyntaxHighlighter_HighlightBlock(self *C.QSyntaxHighlighter, cb C.intptr_t, text C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + +} + +func (this *QSyntaxHighlighter) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QSyntaxHighlighter_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QSyntaxHighlighter) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSyntaxHighlighter_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSyntaxHighlighter_Event +func miqt_exec_callback_QSyntaxHighlighter_Event(self *C.QSyntaxHighlighter, 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((&QSyntaxHighlighter{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSyntaxHighlighter) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QSyntaxHighlighter_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QSyntaxHighlighter) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QSyntaxHighlighter_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSyntaxHighlighter_EventFilter +func miqt_exec_callback_QSyntaxHighlighter_EventFilter(self *C.QSyntaxHighlighter, 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((&QSyntaxHighlighter{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSyntaxHighlighter) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QSyntaxHighlighter_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSyntaxHighlighter) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QSyntaxHighlighter_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSyntaxHighlighter_TimerEvent +func miqt_exec_callback_QSyntaxHighlighter_TimerEvent(self *C.QSyntaxHighlighter, 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((&QSyntaxHighlighter{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSyntaxHighlighter) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QSyntaxHighlighter_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSyntaxHighlighter) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QSyntaxHighlighter_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSyntaxHighlighter_ChildEvent +func miqt_exec_callback_QSyntaxHighlighter_ChildEvent(self *C.QSyntaxHighlighter, 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((&QSyntaxHighlighter{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSyntaxHighlighter) callVirtualBase_CustomEvent(event *QEvent) { + + C.QSyntaxHighlighter_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSyntaxHighlighter) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSyntaxHighlighter_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSyntaxHighlighter_CustomEvent +func miqt_exec_callback_QSyntaxHighlighter_CustomEvent(self *C.QSyntaxHighlighter, 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((&QSyntaxHighlighter{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSyntaxHighlighter) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QSyntaxHighlighter_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSyntaxHighlighter) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSyntaxHighlighter_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSyntaxHighlighter_ConnectNotify +func miqt_exec_callback_QSyntaxHighlighter_ConnectNotify(self *C.QSyntaxHighlighter, 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((&QSyntaxHighlighter{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSyntaxHighlighter) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QSyntaxHighlighter_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSyntaxHighlighter) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSyntaxHighlighter_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSyntaxHighlighter_DisconnectNotify +func miqt_exec_callback_QSyntaxHighlighter_DisconnectNotify(self *C.QSyntaxHighlighter, 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((&QSyntaxHighlighter{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QSyntaxHighlighter) Delete() { diff --git a/qt/gen_qsyntaxhighlighter.h b/qt/gen_qsyntaxhighlighter.h index c883eb24..863d1f28 100644 --- a/qt/gen_qsyntaxhighlighter.h +++ b/qt/gen_qsyntaxhighlighter.h @@ -15,19 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSyntaxHighlighter; class QTextBlock; class QTextDocument; +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 QSyntaxHighlighter QSyntaxHighlighter; typedef struct QTextBlock QTextBlock; typedef struct QTextDocument QTextDocument; +typedef struct QTimerEvent QTimerEvent; #endif +void QSyntaxHighlighter_new(QObject* parent, QSyntaxHighlighter** outptr_QSyntaxHighlighter, QObject** outptr_QObject); +void QSyntaxHighlighter_new2(QTextDocument* parent, QSyntaxHighlighter** outptr_QSyntaxHighlighter, QObject** outptr_QObject); QMetaObject* QSyntaxHighlighter_MetaObject(const QSyntaxHighlighter* self); void* QSyntaxHighlighter_Metacast(QSyntaxHighlighter* self, const char* param1); struct miqt_string QSyntaxHighlighter_Tr(const char* s); @@ -41,6 +51,22 @@ 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_override_virtual_HighlightBlock(void* self, intptr_t slot); +void QSyntaxHighlighter_virtualbase_HighlightBlock(void* self, struct miqt_string text); +void QSyntaxHighlighter_override_virtual_Event(void* self, intptr_t slot); +bool QSyntaxHighlighter_virtualbase_Event(void* self, QEvent* event); +void QSyntaxHighlighter_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSyntaxHighlighter_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSyntaxHighlighter_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSyntaxHighlighter_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSyntaxHighlighter_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSyntaxHighlighter_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSyntaxHighlighter_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSyntaxHighlighter_virtualbase_CustomEvent(void* self, QEvent* event); +void QSyntaxHighlighter_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSyntaxHighlighter_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSyntaxHighlighter_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSyntaxHighlighter_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QSyntaxHighlighter_Delete(QSyntaxHighlighter* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qtableview.cpp b/qt/gen_qtableview.cpp index 97392cae..4b3d68ad 100644 --- a/qt/gen_qtableview.cpp +++ b/qt/gen_qtableview.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -21,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -411,6 +413,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QTableView::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QTableView_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QTableView::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__SelectedIndexes = 0; @@ -612,6 +639,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QTableView::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QTableView_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QTableView::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__CurrentChanged = 0; @@ -1912,6 +1968,14 @@ void QTableView_virtualbase_SetSelection(void* self, QRect* rect, int command) { ( (MiqtVirtualQTableView*)(self) )->virtualbase_SetSelection(rect, command); } +void QTableView_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QTableView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QTableView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { dynamic_cast( (QTableView*)(self) )->handle__SelectedIndexes = slot; } @@ -1976,6 +2040,14 @@ bool QTableView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_IsIndexHidden(index); } +void QTableView_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SelectionChanged = slot; +} + +void QTableView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QTableView_override_virtual_CurrentChanged(void* self, intptr_t slot) { dynamic_cast( (QTableView*)(self) )->handle__CurrentChanged = slot; } diff --git a/qt/gen_qtableview.go b/qt/gen_qtableview.go index 02536de4..1f9c57f8 100644 --- a/qt/gen_qtableview.go +++ b/qt/gen_qtableview.go @@ -722,6 +722,34 @@ func miqt_exec_callback_QTableView_SetSelection(self *C.QTableView, cb C.intptr_ } +func (this *QTableView) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QTableView_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableView) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QTableView_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_VisualRegionForSelection +func miqt_exec_callback_QTableView_VisualRegionForSelection(self *C.QTableView, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QTableView) callVirtualBase_SelectedIndexes() []QModelIndex { var _ma C.struct_miqt_array = C.QTableView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) @@ -925,6 +953,30 @@ func miqt_exec_callback_QTableView_IsIndexHidden(self *C.QTableView, cb C.intptr } +func (this *QTableView) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QTableView_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QTableView) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QTableView_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SelectionChanged +func miqt_exec_callback_QTableView_SelectionChanged(self *C.QTableView, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QTableView{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QTableView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { C.QTableView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) diff --git a/qt/gen_qtableview.h b/qt/gen_qtableview.h index 17ff86a1..2006ead1 100644 --- a/qt/gen_qtableview.h +++ b/qt/gen_qtableview.h @@ -27,6 +27,7 @@ class QFocusEvent; class QFrame; class QHeaderView; class QInputMethodEvent; +class QItemSelection; class QItemSelectionModel; class QKeyEvent; class QMetaObject; @@ -37,6 +38,7 @@ class QPaintDevice; class QPaintEvent; class QPoint; class QRect; +class QRegion; class QResizeEvent; class QSize; class QStyleOptionViewItem; @@ -57,6 +59,7 @@ typedef struct QFocusEvent QFocusEvent; typedef struct QFrame QFrame; typedef struct QHeaderView QHeaderView; typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; @@ -67,6 +70,7 @@ typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; @@ -139,6 +143,7 @@ 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); +QRegion* QTableView_VisualRegionForSelection(const QTableView* self, QItemSelection* selection); struct miqt_array /* of QModelIndex* */ QTableView_SelectedIndexes(const QTableView* self); void QTableView_UpdateGeometries(QTableView* self); QSize* QTableView_ViewportSizeHint(const QTableView* self); @@ -147,6 +152,7 @@ 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_SelectionChanged(QTableView* self, QItemSelection* selected, QItemSelection* deselected); 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); @@ -182,6 +188,8 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QTableView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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); @@ -198,6 +206,8 @@ void QTableView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t 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_SelectionChanged(void* self, intptr_t slot); +void QTableView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt/gen_qtablewidget.cpp b/qt/gen_qtablewidget.cpp index c46f41e5..0e0df451 100644 --- a/qt/gen_qtablewidget.cpp +++ b/qt/gen_qtablewidget.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -18,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -1076,6 +1078,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QTableWidget::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QTableWidget_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QTableWidget::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__SelectedIndexes = 0; @@ -1277,6 +1304,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QTableWidget::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QTableWidget_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QTableWidget::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__CurrentChanged = 0; @@ -2030,6 +2086,14 @@ void QTableWidget_virtualbase_SetSelection(void* self, QRect* rect, int command) ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_SetSelection(rect, command); } +void QTableWidget_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QTableWidget_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QTableWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot) { dynamic_cast( (QTableWidget*)(self) )->handle__SelectedIndexes = slot; } @@ -2094,6 +2158,14 @@ bool QTableWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_IsIndexHidden(index); } +void QTableWidget_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__SelectionChanged = slot; +} + +void QTableWidget_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QTableWidget_override_virtual_CurrentChanged(void* self, intptr_t slot) { dynamic_cast( (QTableWidget*)(self) )->handle__CurrentChanged = slot; } diff --git a/qt/gen_qtablewidget.go b/qt/gen_qtablewidget.go index ca86f1d3..c39aea12 100644 --- a/qt/gen_qtablewidget.go +++ b/qt/gen_qtablewidget.go @@ -1910,6 +1910,34 @@ func miqt_exec_callback_QTableWidget_SetSelection(self *C.QTableWidget, cb C.int } +func (this *QTableWidget) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QTableWidget_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableWidget) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QTableWidget_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_VisualRegionForSelection +func miqt_exec_callback_QTableWidget_VisualRegionForSelection(self *C.QTableWidget, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QTableWidget) callVirtualBase_SelectedIndexes() []QModelIndex { var _ma C.struct_miqt_array = C.QTableWidget_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) @@ -2113,6 +2141,30 @@ func miqt_exec_callback_QTableWidget_IsIndexHidden(self *C.QTableWidget, cb C.in } +func (this *QTableWidget) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QTableWidget_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QTableWidget) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QTableWidget_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_SelectionChanged +func miqt_exec_callback_QTableWidget_SelectionChanged(self *C.QTableWidget, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QTableWidget{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QTableWidget) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { C.QTableWidget_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) diff --git a/qt/gen_qtablewidget.h b/qt/gen_qtablewidget.h index eada69a5..8aa13118 100644 --- a/qt/gen_qtablewidget.h +++ b/qt/gen_qtablewidget.h @@ -25,6 +25,7 @@ class QEvent; class QFont; class QFrame; class QIcon; +class QItemSelection; class QItemSelectionModel; class QMetaObject; class QMimeData; @@ -34,6 +35,7 @@ class QPaintDevice; class QPaintEvent; class QPoint; class QRect; +class QRegion; class QSize; class QStyleOptionViewItem; class QTableView; @@ -54,6 +56,7 @@ typedef struct QEvent QEvent; typedef struct QFont QFont; typedef struct QFrame QFrame; typedef struct QIcon QIcon; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; @@ -63,6 +66,7 @@ typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; typedef struct QTableView QTableView; @@ -292,6 +296,8 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QTableWidget_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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); @@ -308,6 +314,8 @@ void QTableWidget_override_virtual_HorizontalScrollbarAction(void* self, intptr_ 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_SelectionChanged(void* self, intptr_t slot); +void QTableWidget_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt/gen_qtransposeproxymodel.cpp b/qt/gen_qtransposeproxymodel.cpp index aaeb13c3..013b8179 100644 --- a/qt/gen_qtransposeproxymodel.cpp +++ b/qt/gen_qtransposeproxymodel.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -567,6 +568,56 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__MapSelectionToSource = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelection mapSelectionToSource(const QItemSelection& selection) const override { + if (handle__MapSelectionToSource == 0) { + return QTransposeProxyModel::mapSelectionToSource(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QItemSelection* callback_return_value = miqt_exec_callback_QTransposeProxyModel_MapSelectionToSource(const_cast(this), handle__MapSelectionToSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QItemSelection* virtualbase_MapSelectionToSource(QItemSelection* selection) const { + + return new QItemSelection(QTransposeProxyModel::mapSelectionToSource(*selection)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapSelectionFromSource = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelection mapSelectionFromSource(const QItemSelection& selection) const override { + if (handle__MapSelectionFromSource == 0) { + return QTransposeProxyModel::mapSelectionFromSource(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QItemSelection* callback_return_value = miqt_exec_callback_QTransposeProxyModel_MapSelectionFromSource(const_cast(this), handle__MapSelectionFromSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QItemSelection* virtualbase_MapSelectionFromSource(QItemSelection* selection) const { + + return new QItemSelection(QTransposeProxyModel::mapSelectionFromSource(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__Submit = 0; @@ -1350,6 +1401,22 @@ void QTransposeProxyModel_virtualbase_Sort(void* self, int column, int order) { ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Sort(column, order); } +void QTransposeProxyModel_override_virtual_MapSelectionToSource(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__MapSelectionToSource = slot; +} + +QItemSelection* QTransposeProxyModel_virtualbase_MapSelectionToSource(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_MapSelectionToSource(selection); +} + +void QTransposeProxyModel_override_virtual_MapSelectionFromSource(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__MapSelectionFromSource = slot; +} + +QItemSelection* QTransposeProxyModel_virtualbase_MapSelectionFromSource(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_MapSelectionFromSource(selection); +} + void QTransposeProxyModel_override_virtual_Submit(void* self, intptr_t slot) { dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Submit = slot; } diff --git a/qt/gen_qtransposeproxymodel.go b/qt/gen_qtransposeproxymodel.go index 4ed2f75e..36537542 100644 --- a/qt/gen_qtransposeproxymodel.go +++ b/qt/gen_qtransposeproxymodel.go @@ -865,6 +865,62 @@ func miqt_exec_callback_QTransposeProxyModel_Sort(self *C.QTransposeProxyModel, } +func (this *QTransposeProxyModel) callVirtualBase_MapSelectionToSource(selection *QItemSelection) *QItemSelection { + + _ret := C.QTransposeProxyModel_virtualbase_MapSelectionToSource(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTransposeProxyModel) OnMapSelectionToSource(slot func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) { + C.QTransposeProxyModel_override_virtual_MapSelectionToSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_MapSelectionToSource +func miqt_exec_callback_QTransposeProxyModel_MapSelectionToSource(self *C.QTransposeProxyModel, cb C.intptr_t, selection *C.QItemSelection) *C.QItemSelection { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_MapSelectionToSource, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_MapSelectionFromSource(selection *QItemSelection) *QItemSelection { + + _ret := C.QTransposeProxyModel_virtualbase_MapSelectionFromSource(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTransposeProxyModel) OnMapSelectionFromSource(slot func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) { + C.QTransposeProxyModel_override_virtual_MapSelectionFromSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_MapSelectionFromSource +func miqt_exec_callback_QTransposeProxyModel_MapSelectionFromSource(self *C.QTransposeProxyModel, cb C.intptr_t, selection *C.QItemSelection) *C.QItemSelection { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_MapSelectionFromSource, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QTransposeProxyModel) callVirtualBase_Submit() bool { return (bool)(C.QTransposeProxyModel_virtualbase_Submit(unsafe.Pointer(this.h))) diff --git a/qt/gen_qtransposeproxymodel.h b/qt/gen_qtransposeproxymodel.h index 3db0ae74..28323f2e 100644 --- a/qt/gen_qtransposeproxymodel.h +++ b/qt/gen_qtransposeproxymodel.h @@ -17,6 +17,7 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; class QAbstractProxyModel; +class QItemSelection; class QMetaObject; class QMimeData; class QModelIndex; @@ -27,6 +28,7 @@ class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractProxyModel QAbstractProxyModel; +typedef struct QItemSelection QItemSelection; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; @@ -103,6 +105,10 @@ 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_MapSelectionToSource(void* self, intptr_t slot); +QItemSelection* QTransposeProxyModel_virtualbase_MapSelectionToSource(const void* self, QItemSelection* selection); +void QTransposeProxyModel_override_virtual_MapSelectionFromSource(void* self, intptr_t slot); +QItemSelection* QTransposeProxyModel_virtualbase_MapSelectionFromSource(const void* self, QItemSelection* selection); 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); diff --git a/qt/gen_qtreeview.cpp b/qt/gen_qtreeview.cpp index 5c1a23c4..b48b7a76 100644 --- a/qt/gen_qtreeview.cpp +++ b/qt/gen_qtreeview.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -22,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -545,6 +547,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QTreeView::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QTreeView_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QTreeView::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__SelectedIndexes = 0; @@ -974,6 +1001,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QTreeView::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QTreeView_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QTreeView::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__CurrentChanged = 0; @@ -2097,6 +2153,14 @@ void QTreeView_virtualbase_SetSelection(void* self, QRect* rect, int command) { ( (MiqtVirtualQTreeView*)(self) )->virtualbase_SetSelection(rect, command); } +void QTreeView_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QTreeView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QTreeView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { dynamic_cast( (QTreeView*)(self) )->handle__SelectedIndexes = slot; } @@ -2233,6 +2297,14 @@ bool QTreeView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_IsIndexHidden(index); } +void QTreeView_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SelectionChanged = slot; +} + +void QTreeView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QTreeView_override_virtual_CurrentChanged(void* self, intptr_t slot) { dynamic_cast( (QTreeView*)(self) )->handle__CurrentChanged = slot; } diff --git a/qt/gen_qtreeview.go b/qt/gen_qtreeview.go index 7df6042f..adc06597 100644 --- a/qt/gen_qtreeview.go +++ b/qt/gen_qtreeview.go @@ -949,6 +949,34 @@ func miqt_exec_callback_QTreeView_SetSelection(self *C.QTreeView, cb C.intptr_t, } +func (this *QTreeView) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QTreeView_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeView) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QTreeView_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_VisualRegionForSelection +func miqt_exec_callback_QTreeView_VisualRegionForSelection(self *C.QTreeView, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QTreeView) callVirtualBase_SelectedIndexes() []QModelIndex { var _ma C.struct_miqt_array = C.QTreeView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) @@ -1363,6 +1391,30 @@ func miqt_exec_callback_QTreeView_IsIndexHidden(self *C.QTreeView, cb C.intptr_t } +func (this *QTreeView) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QTreeView_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QTreeView) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QTreeView_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SelectionChanged +func miqt_exec_callback_QTreeView_SelectionChanged(self *C.QTreeView, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QTreeView{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QTreeView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { C.QTreeView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) diff --git a/qt/gen_qtreeview.h b/qt/gen_qtreeview.h index 4929576c..18d8be93 100644 --- a/qt/gen_qtreeview.h +++ b/qt/gen_qtreeview.h @@ -27,6 +27,7 @@ class QFocusEvent; class QFrame; class QHeaderView; class QInputMethodEvent; +class QItemSelection; class QItemSelectionModel; class QKeyEvent; class QMetaObject; @@ -38,6 +39,7 @@ class QPaintEvent; class QPainter; class QPoint; class QRect; +class QRegion; class QResizeEvent; class QSize; class QStyleOptionViewItem; @@ -58,6 +60,7 @@ typedef struct QFocusEvent QFocusEvent; typedef struct QFrame QFrame; typedef struct QHeaderView QHeaderView; typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; @@ -69,6 +72,7 @@ typedef struct QPaintEvent QPaintEvent; typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; @@ -159,6 +163,7 @@ QModelIndex* QTreeView_MoveCursor(QTreeView* self, int cursorAction, int modifie int QTreeView_HorizontalOffset(const QTreeView* self); int QTreeView_VerticalOffset(const QTreeView* self); void QTreeView_SetSelection(QTreeView* self, QRect* rect, int command); +QRegion* QTreeView_VisualRegionForSelection(const QTreeView* self, QItemSelection* selection); struct miqt_array /* of QModelIndex* */ QTreeView_SelectedIndexes(const QTreeView* self); void QTreeView_TimerEvent(QTreeView* self, QTimerEvent* event); void QTreeView_PaintEvent(QTreeView* self, QPaintEvent* event); @@ -176,6 +181,7 @@ 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_SelectionChanged(QTreeView* self, QItemSelection* selected, QItemSelection* deselected); 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); @@ -220,6 +226,8 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QTreeView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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); @@ -254,6 +262,8 @@ void QTreeView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t s 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_SelectionChanged(void* self, intptr_t slot); +void QTreeView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt/gen_qtreewidget.cpp b/qt/gen_qtreewidget.cpp index 3fba3355..aff9989d 100644 --- a/qt/gen_qtreewidget.cpp +++ b/qt/gen_qtreewidget.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -22,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -1365,6 +1367,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QTreeWidget::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QTreeWidget_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QTreeWidget::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__SelectedIndexes = 0; @@ -1794,6 +1821,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QTreeWidget::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QTreeWidget_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QTreeWidget::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__CurrentChanged = 0; @@ -2500,6 +2556,14 @@ void QTreeWidget_virtualbase_SetSelection(void* self, QRect* rect, int command) ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_SetSelection(rect, command); } +void QTreeWidget_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QTreeWidget_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QTreeWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot) { dynamic_cast( (QTreeWidget*)(self) )->handle__SelectedIndexes = slot; } @@ -2636,6 +2700,14 @@ bool QTreeWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_IsIndexHidden(index); } +void QTreeWidget_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__SelectionChanged = slot; +} + +void QTreeWidget_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QTreeWidget_override_virtual_CurrentChanged(void* self, intptr_t slot) { dynamic_cast( (QTreeWidget*)(self) )->handle__CurrentChanged = slot; } diff --git a/qt/gen_qtreewidget.go b/qt/gen_qtreewidget.go index 2945ab72..c371d946 100644 --- a/qt/gen_qtreewidget.go +++ b/qt/gen_qtreewidget.go @@ -2027,6 +2027,34 @@ func miqt_exec_callback_QTreeWidget_SetSelection(self *C.QTreeWidget, cb C.intpt } +func (this *QTreeWidget) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QTreeWidget_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeWidget) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QTreeWidget_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_VisualRegionForSelection +func miqt_exec_callback_QTreeWidget_VisualRegionForSelection(self *C.QTreeWidget, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QTreeWidget) callVirtualBase_SelectedIndexes() []QModelIndex { var _ma C.struct_miqt_array = C.QTreeWidget_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) @@ -2441,6 +2469,30 @@ func miqt_exec_callback_QTreeWidget_IsIndexHidden(self *C.QTreeWidget, cb C.intp } +func (this *QTreeWidget) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QTreeWidget_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QTreeWidget) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QTreeWidget_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_SelectionChanged +func miqt_exec_callback_QTreeWidget_SelectionChanged(self *C.QTreeWidget, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QTreeWidget) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { C.QTreeWidget_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) diff --git a/qt/gen_qtreewidget.h b/qt/gen_qtreewidget.h index 4177e555..c9f00686 100644 --- a/qt/gen_qtreewidget.h +++ b/qt/gen_qtreewidget.h @@ -26,6 +26,7 @@ class QEvent; class QFont; class QFrame; class QIcon; +class QItemSelection; class QItemSelectionModel; class QKeyEvent; class QMetaObject; @@ -38,6 +39,7 @@ class QPaintEvent; class QPainter; class QPoint; class QRect; +class QRegion; class QSize; class QStyleOptionViewItem; class QTimerEvent; @@ -58,6 +60,7 @@ typedef struct QEvent QEvent; typedef struct QFont QFont; typedef struct QFrame QFrame; typedef struct QIcon QIcon; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; @@ -70,6 +73,7 @@ typedef struct QPaintEvent QPaintEvent; typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; typedef struct QTimerEvent QTimerEvent; @@ -312,6 +316,8 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QTreeWidget_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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); @@ -346,6 +352,8 @@ void QTreeWidget_override_virtual_HorizontalScrollbarAction(void* self, intptr_t 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_SelectionChanged(void* self, intptr_t slot); +void QTreeWidget_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt/gen_qundoview.cpp b/qt/gen_qundoview.cpp index 0a8c4207..6ac8f533 100644 --- a/qt/gen_qundoview.cpp +++ b/qt/gen_qundoview.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -16,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -704,6 +706,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QUndoView::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QUndoView_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QUndoView::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__SelectedIndexes = 0; @@ -789,6 +816,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QUndoView::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QUndoView_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QUndoView::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__CurrentChanged = 0; @@ -1236,6 +1292,14 @@ void QUndoView_virtualbase_SetSelection(void* self, QRect* rect, int command) { ( (MiqtVirtualQUndoView*)(self) )->virtualbase_SetSelection(rect, command); } +void QUndoView_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QUndoView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QUndoView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { dynamic_cast( (QUndoView*)(self) )->handle__SelectedIndexes = slot; } @@ -1260,6 +1324,14 @@ bool QUndoView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_IsIndexHidden(index); } +void QUndoView_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__SelectionChanged = slot; +} + +void QUndoView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QUndoView_override_virtual_CurrentChanged(void* self, intptr_t slot) { dynamic_cast( (QUndoView*)(self) )->handle__CurrentChanged = slot; } diff --git a/qt/gen_qundoview.go b/qt/gen_qundoview.go index 21a4613a..f4140ff5 100644 --- a/qt/gen_qundoview.go +++ b/qt/gen_qundoview.go @@ -904,6 +904,34 @@ func miqt_exec_callback_QUndoView_SetSelection(self *C.QUndoView, cb C.intptr_t, } +func (this *QUndoView) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QUndoView_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QUndoView) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QUndoView_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_VisualRegionForSelection +func miqt_exec_callback_QUndoView_VisualRegionForSelection(self *C.QUndoView, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QUndoView) callVirtualBase_SelectedIndexes() []QModelIndex { var _ma C.struct_miqt_array = C.QUndoView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) @@ -986,6 +1014,30 @@ func miqt_exec_callback_QUndoView_IsIndexHidden(self *C.QUndoView, cb C.intptr_t } +func (this *QUndoView) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QUndoView_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QUndoView) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QUndoView_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_SelectionChanged +func miqt_exec_callback_QUndoView_SelectionChanged(self *C.QUndoView, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QUndoView{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QUndoView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { C.QUndoView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) diff --git a/qt/gen_qundoview.h b/qt/gen_qundoview.h index 18f501a8..e5360888 100644 --- a/qt/gen_qundoview.h +++ b/qt/gen_qundoview.h @@ -23,6 +23,7 @@ class QDropEvent; class QEvent; class QFrame; class QIcon; +class QItemSelection; class QListView; class QMetaObject; class QModelIndex; @@ -32,6 +33,7 @@ class QPaintDevice; class QPaintEvent; class QPoint; class QRect; +class QRegion; class QResizeEvent; class QSize; class QStyleOptionViewItem; @@ -50,6 +52,7 @@ typedef struct QDropEvent QDropEvent; typedef struct QEvent QEvent; typedef struct QFrame QFrame; typedef struct QIcon QIcon; +typedef struct QItemSelection QItemSelection; typedef struct QListView QListView; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; @@ -59,6 +62,7 @@ typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; @@ -144,12 +148,16 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QUndoView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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_SelectionChanged(void* self, intptr_t slot); +void QUndoView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt/gen_qvalidator.cpp b/qt/gen_qvalidator.cpp index c27a0895..9a305c47 100644 --- a/qt/gen_qvalidator.cpp +++ b/qt/gen_qvalidator.cpp @@ -1,6 +1,9 @@ +#include #include +#include #include #include +#include #include #include #include @@ -10,11 +13,261 @@ #include #include #include +#include #include #include #include "gen_qvalidator.h" #include "_cgo_export.h" +class MiqtVirtualQValidator : public virtual QValidator { +public: + + MiqtVirtualQValidator(): QValidator() {}; + MiqtVirtualQValidator(QObject* parent): QValidator(parent) {}; + + virtual ~MiqtVirtualQValidator() = 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 (QValidator::State)(0); // Pure virtual, there is no base we can call + } + + 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_QValidator_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // 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) { + QValidator::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_QValidator_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); + + QValidator::fixup(param1_QString); + + } + + // 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 QValidator::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QValidator_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QValidator::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 QValidator::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QValidator_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QValidator::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) { + QValidator::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QValidator_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QValidator::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) { + QValidator::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QValidator_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QValidator::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) { + QValidator::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QValidator_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QValidator::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) { + QValidator::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QValidator_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QValidator::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) { + QValidator::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QValidator_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QValidator::disconnectNotify(*signal); + + } + +}; + +void QValidator_new(QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQValidator* ret = new MiqtVirtualQValidator(); + *outptr_QValidator = ret; + *outptr_QObject = static_cast(ret); +} + +void QValidator_new2(QObject* parent, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQValidator* ret = new MiqtVirtualQValidator(parent); + *outptr_QValidator = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QValidator_MetaObject(const QValidator* self) { return (QMetaObject*) self->metaObject(); } @@ -69,7 +322,7 @@ void QValidator_Changed(QValidator* self) { } void QValidator_connect_Changed(QValidator* self, intptr_t slot) { - QValidator::connect(self, static_cast(&QValidator::changed), self, [=]() { + MiqtVirtualQValidator::connect(self, static_cast(&QValidator::changed), self, [=]() { miqt_exec_callback_QValidator_Changed(slot); }); } @@ -118,9 +371,77 @@ struct miqt_string QValidator_TrUtf83(const char* s, const char* c, int n) { return _ms; } +void QValidator_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__Validate = slot; +} + +void QValidator_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__Fixup = slot; +} + +void QValidator_virtualbase_Fixup(const void* self, struct miqt_string param1) { + ( (const MiqtVirtualQValidator*)(self) )->virtualbase_Fixup(param1); +} + +void QValidator_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__Event = slot; +} + +bool QValidator_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQValidator*)(self) )->virtualbase_Event(event); +} + +void QValidator_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__EventFilter = slot; +} + +bool QValidator_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQValidator*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QValidator_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__TimerEvent = slot; +} + +void QValidator_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQValidator*)(self) )->virtualbase_TimerEvent(event); +} + +void QValidator_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__ChildEvent = slot; +} + +void QValidator_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQValidator*)(self) )->virtualbase_ChildEvent(event); +} + +void QValidator_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__CustomEvent = slot; +} + +void QValidator_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQValidator*)(self) )->virtualbase_CustomEvent(event); +} + +void QValidator_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__ConnectNotify = slot; +} + +void QValidator_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQValidator*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QValidator_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__DisconnectNotify = slot; +} + +void QValidator_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQValidator*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QValidator_Delete(QValidator* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qvalidator.go b/qt/gen_qvalidator.go index 36282c38..c613d417 100644 --- a/qt/gen_qvalidator.go +++ b/qt/gen_qvalidator.go @@ -68,6 +68,28 @@ func UnsafeNewQValidator(h unsafe.Pointer, h_QObject unsafe.Pointer) *QValidator QObject: UnsafeNewQObject(h_QObject)} } +// NewQValidator constructs a new QValidator object. +func NewQValidator() *QValidator { + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QValidator_new(&outptr_QValidator, &outptr_QObject) + ret := newQValidator(outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQValidator2 constructs a new QValidator object. +func NewQValidator2(parent *QObject) *QValidator { + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QValidator_new2(parent.cPointer(), &outptr_QValidator, &outptr_QObject) + ret := newQValidator(outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QValidator) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QValidator_MetaObject(this.h))) } @@ -183,6 +205,225 @@ func QValidator_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QValidator) OnValidate(slot func(param1 string, param2 *int) QValidator__State) { + C.QValidator_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_Validate +func miqt_exec_callback_QValidator_Validate(self *C.QValidator, cb C.intptr_t, param1 C.struct_miqt_string, param2 *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QValidator) 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.QValidator_virtualbase_Fixup(unsafe.Pointer(this.h), param1_ms) + +} +func (this *QValidator) OnFixup(slot func(super func(param1 string), param1 string)) { + C.QValidator_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_Fixup +func miqt_exec_callback_QValidator_Fixup(self *C.QValidator, 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((&QValidator{h: self}).callVirtualBase_Fixup, slotval1) + +} + +func (this *QValidator) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QValidator_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QValidator) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QValidator_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_Event +func miqt_exec_callback_QValidator_Event(self *C.QValidator, 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((&QValidator{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QValidator) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QValidator_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QValidator) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QValidator_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_EventFilter +func miqt_exec_callback_QValidator_EventFilter(self *C.QValidator, 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((&QValidator{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QValidator) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QValidator_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QValidator) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QValidator_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_TimerEvent +func miqt_exec_callback_QValidator_TimerEvent(self *C.QValidator, 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((&QValidator{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QValidator) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QValidator_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QValidator) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QValidator_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_ChildEvent +func miqt_exec_callback_QValidator_ChildEvent(self *C.QValidator, 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((&QValidator{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QValidator) callVirtualBase_CustomEvent(event *QEvent) { + + C.QValidator_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QValidator) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QValidator_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_CustomEvent +func miqt_exec_callback_QValidator_CustomEvent(self *C.QValidator, 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((&QValidator{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QValidator) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QValidator_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QValidator) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QValidator_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_ConnectNotify +func miqt_exec_callback_QValidator_ConnectNotify(self *C.QValidator, 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((&QValidator{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QValidator) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QValidator_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QValidator) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QValidator_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_DisconnectNotify +func miqt_exec_callback_QValidator_DisconnectNotify(self *C.QValidator, 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((&QValidator{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QValidator) Delete() { diff --git a/qt/gen_qvalidator.h b/qt/gen_qvalidator.h index fb3da01b..53a918f2 100644 --- a/qt/gen_qvalidator.h +++ b/qt/gen_qvalidator.h @@ -15,29 +15,39 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QDoubleValidator; +class QEvent; class QIntValidator; class QLocale; +class QMetaMethod; class QMetaObject; class QObject; class QRegExp; class QRegExpValidator; class QRegularExpression; class QRegularExpressionValidator; +class QTimerEvent; class QValidator; #else +typedef struct QChildEvent QChildEvent; typedef struct QDoubleValidator QDoubleValidator; +typedef struct QEvent QEvent; typedef struct QIntValidator QIntValidator; typedef struct QLocale QLocale; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QRegExp QRegExp; typedef struct QRegExpValidator QRegExpValidator; typedef struct QRegularExpression QRegularExpression; typedef struct QRegularExpressionValidator QRegularExpressionValidator; +typedef struct QTimerEvent QTimerEvent; typedef struct QValidator QValidator; #endif +void QValidator_new(QValidator** outptr_QValidator, QObject** outptr_QObject); +void QValidator_new2(QObject* parent, QValidator** outptr_QValidator, QObject** outptr_QObject); QMetaObject* QValidator_MetaObject(const QValidator* self); void* QValidator_Metacast(QValidator* self, const char* param1); struct miqt_string QValidator_Tr(const char* s); @@ -52,6 +62,24 @@ 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_override_virtual_Validate(void* self, intptr_t slot); +int QValidator_virtualbase_Validate(const void* self, struct miqt_string param1, int* param2); +void QValidator_override_virtual_Fixup(void* self, intptr_t slot); +void QValidator_virtualbase_Fixup(const void* self, struct miqt_string param1); +void QValidator_override_virtual_Event(void* self, intptr_t slot); +bool QValidator_virtualbase_Event(void* self, QEvent* event); +void QValidator_override_virtual_EventFilter(void* self, intptr_t slot); +bool QValidator_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QValidator_override_virtual_TimerEvent(void* self, intptr_t slot); +void QValidator_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QValidator_override_virtual_ChildEvent(void* self, intptr_t slot); +void QValidator_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QValidator_override_virtual_CustomEvent(void* self, intptr_t slot); +void QValidator_virtualbase_CustomEvent(void* self, QEvent* event); +void QValidator_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QValidator_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QValidator_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QValidator_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QValidator_Delete(QValidator* self, bool isSubclass); void QIntValidator_new(QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); diff --git a/qt/multimedia/gen_qabstractvideobuffer.cpp b/qt/multimedia/gen_qabstractvideobuffer.cpp index 6470c03e..cc2e8d7d 100644 --- a/qt/multimedia/gen_qabstractvideobuffer.cpp +++ b/qt/multimedia/gen_qabstractvideobuffer.cpp @@ -5,6 +5,114 @@ #include "gen_qabstractvideobuffer.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractVideoBuffer : public virtual QAbstractVideoBuffer { +public: + + MiqtVirtualQAbstractVideoBuffer(QAbstractVideoBuffer::HandleType typeVal): QAbstractVideoBuffer(typeVal) {}; + + virtual ~MiqtVirtualQAbstractVideoBuffer() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Release = 0; + + // Subclass to allow providing a Go implementation + virtual void release() override { + if (handle__Release == 0) { + QAbstractVideoBuffer::release(); + return; + } + + + miqt_exec_callback_QAbstractVideoBuffer_Release(this, handle__Release); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Release() { + + QAbstractVideoBuffer::release(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapMode = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractVideoBuffer::MapMode mapMode() const override { + if (handle__MapMode == 0) { + return (QAbstractVideoBuffer::MapMode)(0); // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QAbstractVideoBuffer_MapMode(const_cast(this), handle__MapMode); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Map = 0; + + // Subclass to allow providing a Go implementation + virtual uchar* map(QAbstractVideoBuffer::MapMode mode, int* numBytes, int* bytesPerLine) override { + if (handle__Map == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + QAbstractVideoBuffer::MapMode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + int* sigval2 = numBytes; + int* sigval3 = bytesPerLine; + + unsigned char* callback_return_value = miqt_exec_callback_QAbstractVideoBuffer_Map(this, handle__Map, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Unmap = 0; + + // Subclass to allow providing a Go implementation + virtual void unmap() override { + if (handle__Unmap == 0) { + return; // Pure virtual, there is no base we can call + } + + + miqt_exec_callback_QAbstractVideoBuffer_Unmap(this, handle__Unmap); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Handle = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant handle() const override { + if (handle__Handle == 0) { + return QAbstractVideoBuffer::handle(); + } + + + QVariant* callback_return_value = miqt_exec_callback_QAbstractVideoBuffer_Handle(const_cast(this), handle__Handle); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Handle() const { + + return new QVariant(QAbstractVideoBuffer::handle()); + + } + +}; + +void QAbstractVideoBuffer_new(int typeVal, QAbstractVideoBuffer** outptr_QAbstractVideoBuffer) { + MiqtVirtualQAbstractVideoBuffer* ret = new MiqtVirtualQAbstractVideoBuffer(static_cast(typeVal)); + *outptr_QAbstractVideoBuffer = ret; +} + void QAbstractVideoBuffer_Release(QAbstractVideoBuffer* self) { self->release(); } @@ -32,22 +140,199 @@ QVariant* QAbstractVideoBuffer_Handle(const QAbstractVideoBuffer* self) { return new QVariant(self->handle()); } +void QAbstractVideoBuffer_override_virtual_Release(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoBuffer*)(self) )->handle__Release = slot; +} + +void QAbstractVideoBuffer_virtualbase_Release(void* self) { + ( (MiqtVirtualQAbstractVideoBuffer*)(self) )->virtualbase_Release(); +} + +void QAbstractVideoBuffer_override_virtual_MapMode(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoBuffer*)(self) )->handle__MapMode = slot; +} + +void QAbstractVideoBuffer_override_virtual_Map(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoBuffer*)(self) )->handle__Map = slot; +} + +void QAbstractVideoBuffer_override_virtual_Unmap(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoBuffer*)(self) )->handle__Unmap = slot; +} + +void QAbstractVideoBuffer_override_virtual_Handle(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoBuffer*)(self) )->handle__Handle = slot; +} + +QVariant* QAbstractVideoBuffer_virtualbase_Handle(const void* self) { + return ( (const MiqtVirtualQAbstractVideoBuffer*)(self) )->virtualbase_Handle(); +} + void QAbstractVideoBuffer_Delete(QAbstractVideoBuffer* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } } +class MiqtVirtualQAbstractPlanarVideoBuffer : public virtual QAbstractPlanarVideoBuffer { +public: + + MiqtVirtualQAbstractPlanarVideoBuffer(QAbstractVideoBuffer::HandleType typeVal): QAbstractPlanarVideoBuffer(typeVal) {}; + + virtual ~MiqtVirtualQAbstractPlanarVideoBuffer() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Map = 0; + + // Subclass to allow providing a Go implementation + virtual uchar* map(QAbstractVideoBuffer::MapMode mode, int* numBytes, int* bytesPerLine) override { + if (handle__Map == 0) { + return QAbstractPlanarVideoBuffer::map(mode, numBytes, bytesPerLine); + } + + QAbstractVideoBuffer::MapMode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + int* sigval2 = numBytes; + int* sigval3 = bytesPerLine; + + unsigned char* callback_return_value = miqt_exec_callback_QAbstractPlanarVideoBuffer_Map(this, handle__Map, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + unsigned char* virtualbase_Map(int mode, int* numBytes, int* bytesPerLine) { + + uchar* _ret = QAbstractPlanarVideoBuffer::map(static_cast(mode), static_cast(numBytes), static_cast(bytesPerLine)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Release = 0; + + // Subclass to allow providing a Go implementation + virtual void release() override { + if (handle__Release == 0) { + QAbstractPlanarVideoBuffer::release(); + return; + } + + + miqt_exec_callback_QAbstractPlanarVideoBuffer_Release(this, handle__Release); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Release() { + + QAbstractPlanarVideoBuffer::release(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapMode = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractVideoBuffer::MapMode mapMode() const override { + if (handle__MapMode == 0) { + return (QAbstractVideoBuffer::MapMode)(0); // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QAbstractPlanarVideoBuffer_MapMode(const_cast(this), handle__MapMode); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Unmap = 0; + + // Subclass to allow providing a Go implementation + virtual void unmap() override { + if (handle__Unmap == 0) { + return; // Pure virtual, there is no base we can call + } + + + miqt_exec_callback_QAbstractPlanarVideoBuffer_Unmap(this, handle__Unmap); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Handle = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant handle() const override { + if (handle__Handle == 0) { + return QAbstractPlanarVideoBuffer::handle(); + } + + + QVariant* callback_return_value = miqt_exec_callback_QAbstractPlanarVideoBuffer_Handle(const_cast(this), handle__Handle); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Handle() const { + + return new QVariant(QAbstractPlanarVideoBuffer::handle()); + + } + +}; + +void QAbstractPlanarVideoBuffer_new(int typeVal, QAbstractPlanarVideoBuffer** outptr_QAbstractPlanarVideoBuffer, QAbstractVideoBuffer** outptr_QAbstractVideoBuffer) { + MiqtVirtualQAbstractPlanarVideoBuffer* ret = new MiqtVirtualQAbstractPlanarVideoBuffer(static_cast(typeVal)); + *outptr_QAbstractPlanarVideoBuffer = ret; + *outptr_QAbstractVideoBuffer = static_cast(ret); +} + unsigned char* QAbstractPlanarVideoBuffer_Map(QAbstractPlanarVideoBuffer* self, int mode, int* numBytes, int* bytesPerLine) { uchar* _ret = self->map(static_cast(mode), static_cast(numBytes), static_cast(bytesPerLine)); return static_cast(_ret); } +void QAbstractPlanarVideoBuffer_override_virtual_Map(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPlanarVideoBuffer*)(self) )->handle__Map = slot; +} + +unsigned char* QAbstractPlanarVideoBuffer_virtualbase_Map(void* self, int mode, int* numBytes, int* bytesPerLine) { + return ( (MiqtVirtualQAbstractPlanarVideoBuffer*)(self) )->virtualbase_Map(mode, numBytes, bytesPerLine); +} + +void QAbstractPlanarVideoBuffer_override_virtual_Release(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPlanarVideoBuffer*)(self) )->handle__Release = slot; +} + +void QAbstractPlanarVideoBuffer_virtualbase_Release(void* self) { + ( (MiqtVirtualQAbstractPlanarVideoBuffer*)(self) )->virtualbase_Release(); +} + +void QAbstractPlanarVideoBuffer_override_virtual_MapMode(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPlanarVideoBuffer*)(self) )->handle__MapMode = slot; +} + +void QAbstractPlanarVideoBuffer_override_virtual_Unmap(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPlanarVideoBuffer*)(self) )->handle__Unmap = slot; +} + +void QAbstractPlanarVideoBuffer_override_virtual_Handle(void* self, intptr_t slot) { + dynamic_cast( (QAbstractPlanarVideoBuffer*)(self) )->handle__Handle = slot; +} + +QVariant* QAbstractPlanarVideoBuffer_virtualbase_Handle(const void* self) { + return ( (const MiqtVirtualQAbstractPlanarVideoBuffer*)(self) )->virtualbase_Handle(); +} + void QAbstractPlanarVideoBuffer_Delete(QAbstractPlanarVideoBuffer* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/multimedia/gen_qabstractvideobuffer.go b/qt/multimedia/gen_qabstractvideobuffer.go index 6d084955..fb10660c 100644 --- a/qt/multimedia/gen_qabstractvideobuffer.go +++ b/qt/multimedia/gen_qabstractvideobuffer.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -72,6 +73,16 @@ func UnsafeNewQAbstractVideoBuffer(h unsafe.Pointer) *QAbstractVideoBuffer { return &QAbstractVideoBuffer{h: (*C.QAbstractVideoBuffer)(h)} } +// NewQAbstractVideoBuffer constructs a new QAbstractVideoBuffer object. +func NewQAbstractVideoBuffer(typeVal QAbstractVideoBuffer__HandleType) *QAbstractVideoBuffer { + var outptr_QAbstractVideoBuffer *C.QAbstractVideoBuffer = nil + + C.QAbstractVideoBuffer_new((C.int)(typeVal), &outptr_QAbstractVideoBuffer) + ret := newQAbstractVideoBuffer(outptr_QAbstractVideoBuffer) + ret.isSubclass = true + return ret +} + func (this *QAbstractVideoBuffer) Release() { C.QAbstractVideoBuffer_Release(this.h) } @@ -99,6 +110,104 @@ func (this *QAbstractVideoBuffer) Handle() *qt.QVariant { return _goptr } +func (this *QAbstractVideoBuffer) callVirtualBase_Release() { + + C.QAbstractVideoBuffer_virtualbase_Release(unsafe.Pointer(this.h)) + +} +func (this *QAbstractVideoBuffer) OnRelease(slot func(super func())) { + C.QAbstractVideoBuffer_override_virtual_Release(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoBuffer_Release +func miqt_exec_callback_QAbstractVideoBuffer_Release(self *C.QAbstractVideoBuffer, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractVideoBuffer{h: self}).callVirtualBase_Release) + +} +func (this *QAbstractVideoBuffer) OnMapMode(slot func() QAbstractVideoBuffer__MapMode) { + C.QAbstractVideoBuffer_override_virtual_MapMode(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoBuffer_MapMode +func miqt_exec_callback_QAbstractVideoBuffer_MapMode(self *C.QAbstractVideoBuffer, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() QAbstractVideoBuffer__MapMode) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *QAbstractVideoBuffer) OnMap(slot func(mode QAbstractVideoBuffer__MapMode, numBytes *int, bytesPerLine *int) *byte) { + C.QAbstractVideoBuffer_override_virtual_Map(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoBuffer_Map +func miqt_exec_callback_QAbstractVideoBuffer_Map(self *C.QAbstractVideoBuffer, cb C.intptr_t, mode C.int, numBytes *C.int, bytesPerLine *C.int) *C.uchar { + gofunc, ok := cgo.Handle(cb).Value().(func(mode QAbstractVideoBuffer__MapMode, numBytes *int, bytesPerLine *int) *byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractVideoBuffer__MapMode)(mode) + + slotval2 := (*int)(unsafe.Pointer(numBytes)) + + slotval3 := (*int)(unsafe.Pointer(bytesPerLine)) + + virtualReturn := gofunc(slotval1, slotval2, slotval3) + + return (*C.uchar)(unsafe.Pointer(virtualReturn)) + +} +func (this *QAbstractVideoBuffer) OnUnmap(slot func()) { + C.QAbstractVideoBuffer_override_virtual_Unmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoBuffer_Unmap +func miqt_exec_callback_QAbstractVideoBuffer_Unmap(self *C.QAbstractVideoBuffer, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() + +} + +func (this *QAbstractVideoBuffer) callVirtualBase_Handle() *qt.QVariant { + + _ret := C.QAbstractVideoBuffer_virtualbase_Handle(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractVideoBuffer) OnHandle(slot func(super func() *qt.QVariant) *qt.QVariant) { + C.QAbstractVideoBuffer_override_virtual_Handle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoBuffer_Handle +func miqt_exec_callback_QAbstractVideoBuffer_Handle(self *C.QAbstractVideoBuffer, cb C.intptr_t) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QVariant) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractVideoBuffer{h: self}).callVirtualBase_Handle) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + // Delete this object from C++ memory. func (this *QAbstractVideoBuffer) Delete() { C.QAbstractVideoBuffer_Delete(this.h, C.bool(this.isSubclass)) @@ -152,10 +261,125 @@ func UnsafeNewQAbstractPlanarVideoBuffer(h unsafe.Pointer, h_QAbstractVideoBuffe QAbstractVideoBuffer: UnsafeNewQAbstractVideoBuffer(h_QAbstractVideoBuffer)} } +// NewQAbstractPlanarVideoBuffer constructs a new QAbstractPlanarVideoBuffer object. +func NewQAbstractPlanarVideoBuffer(typeVal QAbstractVideoBuffer__HandleType) *QAbstractPlanarVideoBuffer { + var outptr_QAbstractPlanarVideoBuffer *C.QAbstractPlanarVideoBuffer = nil + var outptr_QAbstractVideoBuffer *C.QAbstractVideoBuffer = nil + + C.QAbstractPlanarVideoBuffer_new((C.int)(typeVal), &outptr_QAbstractPlanarVideoBuffer, &outptr_QAbstractVideoBuffer) + ret := newQAbstractPlanarVideoBuffer(outptr_QAbstractPlanarVideoBuffer, outptr_QAbstractVideoBuffer) + ret.isSubclass = true + return ret +} + func (this *QAbstractPlanarVideoBuffer) Map(mode QAbstractVideoBuffer__MapMode, numBytes *int, bytesPerLine *int) *byte { return (*byte)(unsafe.Pointer(C.QAbstractPlanarVideoBuffer_Map(this.h, (C.int)(mode), (*C.int)(unsafe.Pointer(numBytes)), (*C.int)(unsafe.Pointer(bytesPerLine))))) } +func (this *QAbstractPlanarVideoBuffer) callVirtualBase_Map(mode QAbstractVideoBuffer__MapMode, numBytes *int, bytesPerLine *int) *byte { + + return (*byte)(unsafe.Pointer(C.QAbstractPlanarVideoBuffer_virtualbase_Map(unsafe.Pointer(this.h), (C.int)(mode), (*C.int)(unsafe.Pointer(numBytes)), (*C.int)(unsafe.Pointer(bytesPerLine))))) + +} +func (this *QAbstractPlanarVideoBuffer) OnMap(slot func(super func(mode QAbstractVideoBuffer__MapMode, numBytes *int, bytesPerLine *int) *byte, mode QAbstractVideoBuffer__MapMode, numBytes *int, bytesPerLine *int) *byte) { + C.QAbstractPlanarVideoBuffer_override_virtual_Map(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPlanarVideoBuffer_Map +func miqt_exec_callback_QAbstractPlanarVideoBuffer_Map(self *C.QAbstractPlanarVideoBuffer, cb C.intptr_t, mode C.int, numBytes *C.int, bytesPerLine *C.int) *C.uchar { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode QAbstractVideoBuffer__MapMode, numBytes *int, bytesPerLine *int) *byte, mode QAbstractVideoBuffer__MapMode, numBytes *int, bytesPerLine *int) *byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractVideoBuffer__MapMode)(mode) + + slotval2 := (*int)(unsafe.Pointer(numBytes)) + + slotval3 := (*int)(unsafe.Pointer(bytesPerLine)) + + virtualReturn := gofunc((&QAbstractPlanarVideoBuffer{h: self}).callVirtualBase_Map, slotval1, slotval2, slotval3) + + return (*C.uchar)(unsafe.Pointer(virtualReturn)) + +} + +func (this *QAbstractPlanarVideoBuffer) callVirtualBase_Release() { + + C.QAbstractPlanarVideoBuffer_virtualbase_Release(unsafe.Pointer(this.h)) + +} +func (this *QAbstractPlanarVideoBuffer) OnRelease(slot func(super func())) { + C.QAbstractPlanarVideoBuffer_override_virtual_Release(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPlanarVideoBuffer_Release +func miqt_exec_callback_QAbstractPlanarVideoBuffer_Release(self *C.QAbstractPlanarVideoBuffer, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractPlanarVideoBuffer{h: self}).callVirtualBase_Release) + +} +func (this *QAbstractPlanarVideoBuffer) OnMapMode(slot func() QAbstractVideoBuffer__MapMode) { + C.QAbstractPlanarVideoBuffer_override_virtual_MapMode(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPlanarVideoBuffer_MapMode +func miqt_exec_callback_QAbstractPlanarVideoBuffer_MapMode(self *C.QAbstractPlanarVideoBuffer, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() QAbstractVideoBuffer__MapMode) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *QAbstractPlanarVideoBuffer) OnUnmap(slot func()) { + C.QAbstractPlanarVideoBuffer_override_virtual_Unmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPlanarVideoBuffer_Unmap +func miqt_exec_callback_QAbstractPlanarVideoBuffer_Unmap(self *C.QAbstractPlanarVideoBuffer, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() + +} + +func (this *QAbstractPlanarVideoBuffer) callVirtualBase_Handle() *qt.QVariant { + + _ret := C.QAbstractPlanarVideoBuffer_virtualbase_Handle(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractPlanarVideoBuffer) OnHandle(slot func(super func() *qt.QVariant) *qt.QVariant) { + C.QAbstractPlanarVideoBuffer_override_virtual_Handle(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractPlanarVideoBuffer_Handle +func miqt_exec_callback_QAbstractPlanarVideoBuffer_Handle(self *C.QAbstractPlanarVideoBuffer, cb C.intptr_t) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QVariant) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractPlanarVideoBuffer{h: self}).callVirtualBase_Handle) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + // Delete this object from C++ memory. func (this *QAbstractPlanarVideoBuffer) Delete() { C.QAbstractPlanarVideoBuffer_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt/multimedia/gen_qabstractvideobuffer.h b/qt/multimedia/gen_qabstractvideobuffer.h index 6478b590..d8d9d123 100644 --- a/qt/multimedia/gen_qabstractvideobuffer.h +++ b/qt/multimedia/gen_qabstractvideobuffer.h @@ -24,15 +24,37 @@ typedef struct QAbstractVideoBuffer QAbstractVideoBuffer; typedef struct QVariant QVariant; #endif +void QAbstractVideoBuffer_new(int typeVal, QAbstractVideoBuffer** outptr_QAbstractVideoBuffer); void QAbstractVideoBuffer_Release(QAbstractVideoBuffer* self); int QAbstractVideoBuffer_HandleType(const QAbstractVideoBuffer* self); 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_override_virtual_Release(void* self, intptr_t slot); +void QAbstractVideoBuffer_virtualbase_Release(void* self); +void QAbstractVideoBuffer_override_virtual_MapMode(void* self, intptr_t slot); +int QAbstractVideoBuffer_virtualbase_MapMode(const void* self); +void QAbstractVideoBuffer_override_virtual_Map(void* self, intptr_t slot); +unsigned char* QAbstractVideoBuffer_virtualbase_Map(void* self, int mode, int* numBytes, int* bytesPerLine); +void QAbstractVideoBuffer_override_virtual_Unmap(void* self, intptr_t slot); +void QAbstractVideoBuffer_virtualbase_Unmap(void* self); +void QAbstractVideoBuffer_override_virtual_Handle(void* self, intptr_t slot); +QVariant* QAbstractVideoBuffer_virtualbase_Handle(const void* self); void QAbstractVideoBuffer_Delete(QAbstractVideoBuffer* self, bool isSubclass); +void QAbstractPlanarVideoBuffer_new(int typeVal, QAbstractPlanarVideoBuffer** outptr_QAbstractPlanarVideoBuffer, QAbstractVideoBuffer** outptr_QAbstractVideoBuffer); unsigned char* QAbstractPlanarVideoBuffer_Map(QAbstractPlanarVideoBuffer* self, int mode, int* numBytes, int* bytesPerLine); +void QAbstractPlanarVideoBuffer_override_virtual_Map(void* self, intptr_t slot); +unsigned char* QAbstractPlanarVideoBuffer_virtualbase_Map(void* self, int mode, int* numBytes, int* bytesPerLine); +void QAbstractPlanarVideoBuffer_override_virtual_Release(void* self, intptr_t slot); +void QAbstractPlanarVideoBuffer_virtualbase_Release(void* self); +void QAbstractPlanarVideoBuffer_override_virtual_MapMode(void* self, intptr_t slot); +int QAbstractPlanarVideoBuffer_virtualbase_MapMode(const void* self); +void QAbstractPlanarVideoBuffer_override_virtual_Unmap(void* self, intptr_t slot); +void QAbstractPlanarVideoBuffer_virtualbase_Unmap(void* self); +void QAbstractPlanarVideoBuffer_override_virtual_Handle(void* self, intptr_t slot); +QVariant* QAbstractPlanarVideoBuffer_virtualbase_Handle(const void* self); void QAbstractPlanarVideoBuffer_Delete(QAbstractPlanarVideoBuffer* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/multimedia/gen_qabstractvideofilter.cpp b/qt/multimedia/gen_qabstractvideofilter.cpp index a4c6ccca..a3016a59 100644 --- a/qt/multimedia/gen_qabstractvideofilter.cpp +++ b/qt/multimedia/gen_qabstractvideofilter.cpp @@ -1,9 +1,13 @@ #include +#include +#include +#include #include #include #include #include #include +#include #include #include #include @@ -27,6 +31,214 @@ void QVideoFilterRunnable_Delete(QVideoFilterRunnable* self, bool isSubclass) { } } +class MiqtVirtualQAbstractVideoFilter : public virtual QAbstractVideoFilter { +public: + + MiqtVirtualQAbstractVideoFilter(): QAbstractVideoFilter() {}; + MiqtVirtualQAbstractVideoFilter(QObject* parent): QAbstractVideoFilter(parent) {}; + + virtual ~MiqtVirtualQAbstractVideoFilter() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateFilterRunnable = 0; + + // Subclass to allow providing a Go implementation + virtual QVideoFilterRunnable* createFilterRunnable() override { + if (handle__CreateFilterRunnable == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + QVideoFilterRunnable* callback_return_value = miqt_exec_callback_QAbstractVideoFilter_CreateFilterRunnable(this, handle__CreateFilterRunnable); + + return callback_return_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 QAbstractVideoFilter::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractVideoFilter_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAbstractVideoFilter::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 QAbstractVideoFilter::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractVideoFilter_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAbstractVideoFilter::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) { + QAbstractVideoFilter::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractVideoFilter_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractVideoFilter::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) { + QAbstractVideoFilter::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAbstractVideoFilter_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAbstractVideoFilter::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) { + QAbstractVideoFilter::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractVideoFilter_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAbstractVideoFilter::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) { + QAbstractVideoFilter::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractVideoFilter_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAbstractVideoFilter::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) { + QAbstractVideoFilter::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractVideoFilter_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAbstractVideoFilter::disconnectNotify(*signal); + + } + +}; + +void QAbstractVideoFilter_new(QAbstractVideoFilter** outptr_QAbstractVideoFilter, QObject** outptr_QObject) { + MiqtVirtualQAbstractVideoFilter* ret = new MiqtVirtualQAbstractVideoFilter(); + *outptr_QAbstractVideoFilter = ret; + *outptr_QObject = static_cast(ret); +} + +void QAbstractVideoFilter_new2(QObject* parent, QAbstractVideoFilter** outptr_QAbstractVideoFilter, QObject** outptr_QObject) { + MiqtVirtualQAbstractVideoFilter* ret = new MiqtVirtualQAbstractVideoFilter(parent); + *outptr_QAbstractVideoFilter = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractVideoFilter_MetaObject(const QAbstractVideoFilter* self) { return (QMetaObject*) self->metaObject(); } @@ -74,7 +286,7 @@ void QAbstractVideoFilter_ActiveChanged(QAbstractVideoFilter* self) { } void QAbstractVideoFilter_connect_ActiveChanged(QAbstractVideoFilter* self, intptr_t slot) { - QAbstractVideoFilter::connect(self, static_cast(&QAbstractVideoFilter::activeChanged), self, [=]() { + MiqtVirtualQAbstractVideoFilter::connect(self, static_cast(&QAbstractVideoFilter::activeChanged), self, [=]() { miqt_exec_callback_QAbstractVideoFilter_ActiveChanged(slot); }); } @@ -123,9 +335,69 @@ struct miqt_string QAbstractVideoFilter_TrUtf83(const char* s, const char* c, in return _ms; } +void QAbstractVideoFilter_override_virtual_CreateFilterRunnable(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoFilter*)(self) )->handle__CreateFilterRunnable = slot; +} + +void QAbstractVideoFilter_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoFilter*)(self) )->handle__Event = slot; +} + +bool QAbstractVideoFilter_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractVideoFilter*)(self) )->virtualbase_Event(event); +} + +void QAbstractVideoFilter_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoFilter*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractVideoFilter_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAbstractVideoFilter*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAbstractVideoFilter_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoFilter*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractVideoFilter_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractVideoFilter*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractVideoFilter_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoFilter*)(self) )->handle__ChildEvent = slot; +} + +void QAbstractVideoFilter_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAbstractVideoFilter*)(self) )->virtualbase_ChildEvent(event); +} + +void QAbstractVideoFilter_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoFilter*)(self) )->handle__CustomEvent = slot; +} + +void QAbstractVideoFilter_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractVideoFilter*)(self) )->virtualbase_CustomEvent(event); +} + +void QAbstractVideoFilter_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoFilter*)(self) )->handle__ConnectNotify = slot; +} + +void QAbstractVideoFilter_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractVideoFilter*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAbstractVideoFilter_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoFilter*)(self) )->handle__DisconnectNotify = slot; +} + +void QAbstractVideoFilter_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractVideoFilter*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAbstractVideoFilter_Delete(QAbstractVideoFilter* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/multimedia/gen_qabstractvideofilter.go b/qt/multimedia/gen_qabstractvideofilter.go index 9e7c5418..4fab753e 100644 --- a/qt/multimedia/gen_qabstractvideofilter.go +++ b/qt/multimedia/gen_qabstractvideofilter.go @@ -121,6 +121,28 @@ func UnsafeNewQAbstractVideoFilter(h unsafe.Pointer, h_QObject unsafe.Pointer) * QObject: qt.UnsafeNewQObject(h_QObject)} } +// NewQAbstractVideoFilter constructs a new QAbstractVideoFilter object. +func NewQAbstractVideoFilter() *QAbstractVideoFilter { + var outptr_QAbstractVideoFilter *C.QAbstractVideoFilter = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractVideoFilter_new(&outptr_QAbstractVideoFilter, &outptr_QObject) + ret := newQAbstractVideoFilter(outptr_QAbstractVideoFilter, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractVideoFilter2 constructs a new QAbstractVideoFilter object. +func NewQAbstractVideoFilter2(parent *qt.QObject) *QAbstractVideoFilter { + var outptr_QAbstractVideoFilter *C.QAbstractVideoFilter = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractVideoFilter_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QAbstractVideoFilter, &outptr_QObject) + ret := newQAbstractVideoFilter(outptr_QAbstractVideoFilter, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractVideoFilter) MetaObject() *qt.QMetaObject { return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractVideoFilter_MetaObject(this.h))) } @@ -221,6 +243,188 @@ func QAbstractVideoFilter_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QAbstractVideoFilter) OnCreateFilterRunnable(slot func() *QVideoFilterRunnable) { + C.QAbstractVideoFilter_override_virtual_CreateFilterRunnable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoFilter_CreateFilterRunnable +func miqt_exec_callback_QAbstractVideoFilter_CreateFilterRunnable(self *C.QAbstractVideoFilter, cb C.intptr_t) *C.QVideoFilterRunnable { + gofunc, ok := cgo.Handle(cb).Value().(func() *QVideoFilterRunnable) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} + +func (this *QAbstractVideoFilter) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QAbstractVideoFilter_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAbstractVideoFilter) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QAbstractVideoFilter_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoFilter_Event +func miqt_exec_callback_QAbstractVideoFilter_Event(self *C.QAbstractVideoFilter, 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((&QAbstractVideoFilter{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractVideoFilter) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QAbstractVideoFilter_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAbstractVideoFilter) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QAbstractVideoFilter_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoFilter_EventFilter +func miqt_exec_callback_QAbstractVideoFilter_EventFilter(self *C.QAbstractVideoFilter, 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((&QAbstractVideoFilter{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractVideoFilter) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QAbstractVideoFilter_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QAbstractVideoFilter) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QAbstractVideoFilter_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoFilter_TimerEvent +func miqt_exec_callback_QAbstractVideoFilter_TimerEvent(self *C.QAbstractVideoFilter, 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((&QAbstractVideoFilter{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractVideoFilter) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QAbstractVideoFilter_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QAbstractVideoFilter) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QAbstractVideoFilter_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoFilter_ChildEvent +func miqt_exec_callback_QAbstractVideoFilter_ChildEvent(self *C.QAbstractVideoFilter, 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((&QAbstractVideoFilter{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAbstractVideoFilter) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QAbstractVideoFilter_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QAbstractVideoFilter) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QAbstractVideoFilter_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoFilter_CustomEvent +func miqt_exec_callback_QAbstractVideoFilter_CustomEvent(self *C.QAbstractVideoFilter, 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((&QAbstractVideoFilter{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAbstractVideoFilter) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QAbstractVideoFilter_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAbstractVideoFilter) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QAbstractVideoFilter_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoFilter_ConnectNotify +func miqt_exec_callback_QAbstractVideoFilter_ConnectNotify(self *C.QAbstractVideoFilter, 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((&QAbstractVideoFilter{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAbstractVideoFilter) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QAbstractVideoFilter_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAbstractVideoFilter) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QAbstractVideoFilter_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoFilter_DisconnectNotify +func miqt_exec_callback_QAbstractVideoFilter_DisconnectNotify(self *C.QAbstractVideoFilter, 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((&QAbstractVideoFilter{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QAbstractVideoFilter) Delete() { diff --git a/qt/multimedia/gen_qabstractvideofilter.h b/qt/multimedia/gen_qabstractvideofilter.h index f76420b3..e0a94a18 100644 --- a/qt/multimedia/gen_qabstractvideofilter.h +++ b/qt/multimedia/gen_qabstractvideofilter.h @@ -16,15 +16,23 @@ extern "C" { #ifdef __cplusplus class QAbstractVideoFilter; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QVideoFilterRunnable; class QVideoFrame; class QVideoSurfaceFormat; #else typedef struct QAbstractVideoFilter QAbstractVideoFilter; +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 QVideoFilterRunnable QVideoFilterRunnable; typedef struct QVideoFrame QVideoFrame; typedef struct QVideoSurfaceFormat QVideoSurfaceFormat; @@ -34,6 +42,8 @@ QVideoFrame* QVideoFilterRunnable_Run(QVideoFilterRunnable* self, QVideoFrame* i void QVideoFilterRunnable_OperatorAssign(QVideoFilterRunnable* self, QVideoFilterRunnable* param1); void QVideoFilterRunnable_Delete(QVideoFilterRunnable* self, bool isSubclass); +void QAbstractVideoFilter_new(QAbstractVideoFilter** outptr_QAbstractVideoFilter, QObject** outptr_QObject); +void QAbstractVideoFilter_new2(QObject* parent, QAbstractVideoFilter** outptr_QAbstractVideoFilter, QObject** outptr_QObject); QMetaObject* QAbstractVideoFilter_MetaObject(const QAbstractVideoFilter* self); void* QAbstractVideoFilter_Metacast(QAbstractVideoFilter* self, const char* param1); struct miqt_string QAbstractVideoFilter_Tr(const char* s); @@ -47,6 +57,22 @@ 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_override_virtual_CreateFilterRunnable(void* self, intptr_t slot); +QVideoFilterRunnable* QAbstractVideoFilter_virtualbase_CreateFilterRunnable(void* self); +void QAbstractVideoFilter_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractVideoFilter_virtualbase_Event(void* self, QEvent* event); +void QAbstractVideoFilter_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractVideoFilter_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAbstractVideoFilter_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractVideoFilter_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractVideoFilter_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAbstractVideoFilter_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAbstractVideoFilter_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAbstractVideoFilter_virtualbase_CustomEvent(void* self, QEvent* event); +void QAbstractVideoFilter_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAbstractVideoFilter_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAbstractVideoFilter_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAbstractVideoFilter_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractVideoFilter_Delete(QAbstractVideoFilter* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/multimedia/gen_qabstractvideosurface.cpp b/qt/multimedia/gen_qabstractvideosurface.cpp index 44141759..91aa5201 100644 --- a/qt/multimedia/gen_qabstractvideosurface.cpp +++ b/qt/multimedia/gen_qabstractvideosurface.cpp @@ -1,17 +1,353 @@ #include +#include +#include #include +#include #include #include #include #include #include #include +#include #include #include #include #include "gen_qabstractvideosurface.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractVideoSurface : public virtual QAbstractVideoSurface { +public: + + MiqtVirtualQAbstractVideoSurface(): QAbstractVideoSurface() {}; + MiqtVirtualQAbstractVideoSurface(QObject* parent): QAbstractVideoSurface(parent) {}; + + virtual ~MiqtVirtualQAbstractVideoSurface() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportedPixelFormats = 0; + + // Subclass to allow providing a Go implementation + virtual QList supportedPixelFormats(QAbstractVideoBuffer::HandleType typeVal) const override { + if (handle__SupportedPixelFormats == 0) { + return QList(); // Pure virtual, there is no base we can call + } + + QAbstractVideoBuffer::HandleType typeVal_ret = typeVal; + int sigval1 = static_cast(typeVal_ret); + + struct miqt_array /* of int */ callback_return_value = miqt_exec_callback_QAbstractVideoSurface_SupportedPixelFormats(const_cast(this), handle__SupportedPixelFormats, sigval1); + 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; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IsFormatSupported = 0; + + // Subclass to allow providing a Go implementation + virtual bool isFormatSupported(const QVideoSurfaceFormat& format) const override { + if (handle__IsFormatSupported == 0) { + return QAbstractVideoSurface::isFormatSupported(format); + } + + const QVideoSurfaceFormat& format_ret = format; + // Cast returned reference into pointer + QVideoSurfaceFormat* sigval1 = const_cast(&format_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractVideoSurface_IsFormatSupported(const_cast(this), handle__IsFormatSupported, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsFormatSupported(QVideoSurfaceFormat* format) const { + + return QAbstractVideoSurface::isFormatSupported(*format); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NearestFormat = 0; + + // Subclass to allow providing a Go implementation + virtual QVideoSurfaceFormat nearestFormat(const QVideoSurfaceFormat& format) const override { + if (handle__NearestFormat == 0) { + return QAbstractVideoSurface::nearestFormat(format); + } + + const QVideoSurfaceFormat& format_ret = format; + // Cast returned reference into pointer + QVideoSurfaceFormat* sigval1 = const_cast(&format_ret); + + QVideoSurfaceFormat* callback_return_value = miqt_exec_callback_QAbstractVideoSurface_NearestFormat(const_cast(this), handle__NearestFormat, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVideoSurfaceFormat* virtualbase_NearestFormat(QVideoSurfaceFormat* format) const { + + return new QVideoSurfaceFormat(QAbstractVideoSurface::nearestFormat(*format)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Start = 0; + + // Subclass to allow providing a Go implementation + virtual bool start(const QVideoSurfaceFormat& format) override { + if (handle__Start == 0) { + return QAbstractVideoSurface::start(format); + } + + const QVideoSurfaceFormat& format_ret = format; + // Cast returned reference into pointer + QVideoSurfaceFormat* sigval1 = const_cast(&format_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractVideoSurface_Start(this, handle__Start, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Start(QVideoSurfaceFormat* format) { + + return QAbstractVideoSurface::start(*format); + + } + + // 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) { + QAbstractVideoSurface::stop(); + return; + } + + + miqt_exec_callback_QAbstractVideoSurface_Stop(this, handle__Stop); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Stop() { + + QAbstractVideoSurface::stop(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Present = 0; + + // Subclass to allow providing a Go implementation + virtual bool present(const QVideoFrame& frame) override { + if (handle__Present == 0) { + return false; // Pure virtual, there is no base we can call + } + + const QVideoFrame& frame_ret = frame; + // Cast returned reference into pointer + QVideoFrame* sigval1 = const_cast(&frame_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractVideoSurface_Present(this, handle__Present, sigval1); + + return callback_return_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 QAbstractVideoSurface::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractVideoSurface_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAbstractVideoSurface::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 QAbstractVideoSurface::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractVideoSurface_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAbstractVideoSurface::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) { + QAbstractVideoSurface::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractVideoSurface_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractVideoSurface::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) { + QAbstractVideoSurface::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAbstractVideoSurface_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAbstractVideoSurface::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) { + QAbstractVideoSurface::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractVideoSurface_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAbstractVideoSurface::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) { + QAbstractVideoSurface::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractVideoSurface_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAbstractVideoSurface::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) { + QAbstractVideoSurface::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractVideoSurface_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAbstractVideoSurface::disconnectNotify(*signal); + + } + +}; + +void QAbstractVideoSurface_new(QAbstractVideoSurface** outptr_QAbstractVideoSurface, QObject** outptr_QObject) { + MiqtVirtualQAbstractVideoSurface* ret = new MiqtVirtualQAbstractVideoSurface(); + *outptr_QAbstractVideoSurface = ret; + *outptr_QObject = static_cast(ret); +} + +void QAbstractVideoSurface_new2(QObject* parent, QAbstractVideoSurface** outptr_QAbstractVideoSurface, QObject** outptr_QObject) { + MiqtVirtualQAbstractVideoSurface* ret = new MiqtVirtualQAbstractVideoSurface(parent); + *outptr_QAbstractVideoSurface = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractVideoSurface_MetaObject(const QAbstractVideoSurface* self) { return (QMetaObject*) self->metaObject(); } @@ -98,7 +434,7 @@ void QAbstractVideoSurface_ActiveChanged(QAbstractVideoSurface* self, bool activ } void QAbstractVideoSurface_connect_ActiveChanged(QAbstractVideoSurface* self, intptr_t slot) { - QAbstractVideoSurface::connect(self, static_cast(&QAbstractVideoSurface::activeChanged), self, [=](bool active) { + MiqtVirtualQAbstractVideoSurface::connect(self, static_cast(&QAbstractVideoSurface::activeChanged), self, [=](bool active) { bool sigval1 = active; miqt_exec_callback_QAbstractVideoSurface_ActiveChanged(slot, sigval1); }); @@ -109,7 +445,7 @@ void QAbstractVideoSurface_SurfaceFormatChanged(QAbstractVideoSurface* self, QVi } void QAbstractVideoSurface_connect_SurfaceFormatChanged(QAbstractVideoSurface* self, intptr_t slot) { - QAbstractVideoSurface::connect(self, static_cast(&QAbstractVideoSurface::surfaceFormatChanged), self, [=](const QVideoSurfaceFormat& format) { + MiqtVirtualQAbstractVideoSurface::connect(self, static_cast(&QAbstractVideoSurface::surfaceFormatChanged), self, [=](const QVideoSurfaceFormat& format) { const QVideoSurfaceFormat& format_ret = format; // Cast returned reference into pointer QVideoSurfaceFormat* sigval1 = const_cast(&format_ret); @@ -122,7 +458,7 @@ void QAbstractVideoSurface_SupportedFormatsChanged(QAbstractVideoSurface* self) } void QAbstractVideoSurface_connect_SupportedFormatsChanged(QAbstractVideoSurface* self, intptr_t slot) { - QAbstractVideoSurface::connect(self, static_cast(&QAbstractVideoSurface::supportedFormatsChanged), self, [=]() { + MiqtVirtualQAbstractVideoSurface::connect(self, static_cast(&QAbstractVideoSurface::supportedFormatsChanged), self, [=]() { miqt_exec_callback_QAbstractVideoSurface_SupportedFormatsChanged(slot); }); } @@ -132,7 +468,7 @@ void QAbstractVideoSurface_NativeResolutionChanged(QAbstractVideoSurface* self, } void QAbstractVideoSurface_connect_NativeResolutionChanged(QAbstractVideoSurface* self, intptr_t slot) { - QAbstractVideoSurface::connect(self, static_cast(&QAbstractVideoSurface::nativeResolutionChanged), self, [=](const QSize& resolution) { + MiqtVirtualQAbstractVideoSurface::connect(self, static_cast(&QAbstractVideoSurface::nativeResolutionChanged), self, [=](const QSize& resolution) { const QSize& resolution_ret = resolution; // Cast returned reference into pointer QSize* sigval1 = const_cast(&resolution_ret); @@ -184,9 +520,105 @@ struct miqt_string QAbstractVideoSurface_TrUtf83(const char* s, const char* c, i return _ms; } +void QAbstractVideoSurface_override_virtual_SupportedPixelFormats(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoSurface*)(self) )->handle__SupportedPixelFormats = slot; +} + +void QAbstractVideoSurface_override_virtual_IsFormatSupported(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoSurface*)(self) )->handle__IsFormatSupported = slot; +} + +bool QAbstractVideoSurface_virtualbase_IsFormatSupported(const void* self, QVideoSurfaceFormat* format) { + return ( (const MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_IsFormatSupported(format); +} + +void QAbstractVideoSurface_override_virtual_NearestFormat(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoSurface*)(self) )->handle__NearestFormat = slot; +} + +QVideoSurfaceFormat* QAbstractVideoSurface_virtualbase_NearestFormat(const void* self, QVideoSurfaceFormat* format) { + return ( (const MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_NearestFormat(format); +} + +void QAbstractVideoSurface_override_virtual_Start(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoSurface*)(self) )->handle__Start = slot; +} + +bool QAbstractVideoSurface_virtualbase_Start(void* self, QVideoSurfaceFormat* format) { + return ( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_Start(format); +} + +void QAbstractVideoSurface_override_virtual_Stop(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoSurface*)(self) )->handle__Stop = slot; +} + +void QAbstractVideoSurface_virtualbase_Stop(void* self) { + ( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_Stop(); +} + +void QAbstractVideoSurface_override_virtual_Present(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoSurface*)(self) )->handle__Present = slot; +} + +void QAbstractVideoSurface_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoSurface*)(self) )->handle__Event = slot; +} + +bool QAbstractVideoSurface_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_Event(event); +} + +void QAbstractVideoSurface_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoSurface*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractVideoSurface_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAbstractVideoSurface_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoSurface*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractVideoSurface_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractVideoSurface_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoSurface*)(self) )->handle__ChildEvent = slot; +} + +void QAbstractVideoSurface_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_ChildEvent(event); +} + +void QAbstractVideoSurface_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoSurface*)(self) )->handle__CustomEvent = slot; +} + +void QAbstractVideoSurface_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_CustomEvent(event); +} + +void QAbstractVideoSurface_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoSurface*)(self) )->handle__ConnectNotify = slot; +} + +void QAbstractVideoSurface_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAbstractVideoSurface_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractVideoSurface*)(self) )->handle__DisconnectNotify = slot; +} + +void QAbstractVideoSurface_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAbstractVideoSurface_Delete(QAbstractVideoSurface* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/multimedia/gen_qabstractvideosurface.go b/qt/multimedia/gen_qabstractvideosurface.go index cfa0493c..22f5ccea 100644 --- a/qt/multimedia/gen_qabstractvideosurface.go +++ b/qt/multimedia/gen_qabstractvideosurface.go @@ -64,6 +64,28 @@ func UnsafeNewQAbstractVideoSurface(h unsafe.Pointer, h_QObject unsafe.Pointer) QObject: qt.UnsafeNewQObject(h_QObject)} } +// NewQAbstractVideoSurface constructs a new QAbstractVideoSurface object. +func NewQAbstractVideoSurface() *QAbstractVideoSurface { + var outptr_QAbstractVideoSurface *C.QAbstractVideoSurface = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractVideoSurface_new(&outptr_QAbstractVideoSurface, &outptr_QObject) + ret := newQAbstractVideoSurface(outptr_QAbstractVideoSurface, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractVideoSurface2 constructs a new QAbstractVideoSurface object. +func NewQAbstractVideoSurface2(parent *qt.QObject) *QAbstractVideoSurface { + var outptr_QAbstractVideoSurface *C.QAbstractVideoSurface = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractVideoSurface_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QAbstractVideoSurface, &outptr_QObject) + ret := newQAbstractVideoSurface(outptr_QAbstractVideoSurface, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractVideoSurface) MetaObject() *qt.QMetaObject { return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractVideoSurface_MetaObject(this.h))) } @@ -267,6 +289,314 @@ func QAbstractVideoSurface_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QAbstractVideoSurface) OnSupportedPixelFormats(slot func(typeVal QAbstractVideoBuffer__HandleType) []QVideoFrame__PixelFormat) { + C.QAbstractVideoSurface_override_virtual_SupportedPixelFormats(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoSurface_SupportedPixelFormats +func miqt_exec_callback_QAbstractVideoSurface_SupportedPixelFormats(self *C.QAbstractVideoSurface, cb C.intptr_t, typeVal C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(typeVal QAbstractVideoBuffer__HandleType) []QVideoFrame__PixelFormat) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAbstractVideoBuffer__HandleType)(typeVal) + + virtualReturn := gofunc(slotval1) + 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 + +} + +func (this *QAbstractVideoSurface) callVirtualBase_IsFormatSupported(format *QVideoSurfaceFormat) bool { + + return (bool)(C.QAbstractVideoSurface_virtualbase_IsFormatSupported(unsafe.Pointer(this.h), format.cPointer())) + +} +func (this *QAbstractVideoSurface) OnIsFormatSupported(slot func(super func(format *QVideoSurfaceFormat) bool, format *QVideoSurfaceFormat) bool) { + C.QAbstractVideoSurface_override_virtual_IsFormatSupported(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoSurface_IsFormatSupported +func miqt_exec_callback_QAbstractVideoSurface_IsFormatSupported(self *C.QAbstractVideoSurface, cb C.intptr_t, format *C.QVideoSurfaceFormat) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(format *QVideoSurfaceFormat) bool, format *QVideoSurfaceFormat) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVideoSurfaceFormat(unsafe.Pointer(format)) + + virtualReturn := gofunc((&QAbstractVideoSurface{h: self}).callVirtualBase_IsFormatSupported, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractVideoSurface) callVirtualBase_NearestFormat(format *QVideoSurfaceFormat) *QVideoSurfaceFormat { + + _ret := C.QAbstractVideoSurface_virtualbase_NearestFormat(unsafe.Pointer(this.h), format.cPointer()) + _goptr := newQVideoSurfaceFormat(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractVideoSurface) OnNearestFormat(slot func(super func(format *QVideoSurfaceFormat) *QVideoSurfaceFormat, format *QVideoSurfaceFormat) *QVideoSurfaceFormat) { + C.QAbstractVideoSurface_override_virtual_NearestFormat(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoSurface_NearestFormat +func miqt_exec_callback_QAbstractVideoSurface_NearestFormat(self *C.QAbstractVideoSurface, cb C.intptr_t, format *C.QVideoSurfaceFormat) *C.QVideoSurfaceFormat { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(format *QVideoSurfaceFormat) *QVideoSurfaceFormat, format *QVideoSurfaceFormat) *QVideoSurfaceFormat) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVideoSurfaceFormat(unsafe.Pointer(format)) + + virtualReturn := gofunc((&QAbstractVideoSurface{h: self}).callVirtualBase_NearestFormat, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractVideoSurface) callVirtualBase_Start(format *QVideoSurfaceFormat) bool { + + return (bool)(C.QAbstractVideoSurface_virtualbase_Start(unsafe.Pointer(this.h), format.cPointer())) + +} +func (this *QAbstractVideoSurface) OnStart(slot func(super func(format *QVideoSurfaceFormat) bool, format *QVideoSurfaceFormat) bool) { + C.QAbstractVideoSurface_override_virtual_Start(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoSurface_Start +func miqt_exec_callback_QAbstractVideoSurface_Start(self *C.QAbstractVideoSurface, cb C.intptr_t, format *C.QVideoSurfaceFormat) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(format *QVideoSurfaceFormat) bool, format *QVideoSurfaceFormat) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVideoSurfaceFormat(unsafe.Pointer(format)) + + virtualReturn := gofunc((&QAbstractVideoSurface{h: self}).callVirtualBase_Start, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractVideoSurface) callVirtualBase_Stop() { + + C.QAbstractVideoSurface_virtualbase_Stop(unsafe.Pointer(this.h)) + +} +func (this *QAbstractVideoSurface) OnStop(slot func(super func())) { + C.QAbstractVideoSurface_override_virtual_Stop(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoSurface_Stop +func miqt_exec_callback_QAbstractVideoSurface_Stop(self *C.QAbstractVideoSurface, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractVideoSurface{h: self}).callVirtualBase_Stop) + +} +func (this *QAbstractVideoSurface) OnPresent(slot func(frame *QVideoFrame) bool) { + C.QAbstractVideoSurface_override_virtual_Present(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoSurface_Present +func miqt_exec_callback_QAbstractVideoSurface_Present(self *C.QAbstractVideoSurface, cb C.intptr_t, frame *C.QVideoFrame) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(frame *QVideoFrame) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQVideoFrame(unsafe.Pointer(frame)) + + virtualReturn := gofunc(slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractVideoSurface) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QAbstractVideoSurface_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAbstractVideoSurface) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QAbstractVideoSurface_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoSurface_Event +func miqt_exec_callback_QAbstractVideoSurface_Event(self *C.QAbstractVideoSurface, 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((&QAbstractVideoSurface{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractVideoSurface) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QAbstractVideoSurface_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAbstractVideoSurface) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QAbstractVideoSurface_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoSurface_EventFilter +func miqt_exec_callback_QAbstractVideoSurface_EventFilter(self *C.QAbstractVideoSurface, 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((&QAbstractVideoSurface{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractVideoSurface) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QAbstractVideoSurface_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QAbstractVideoSurface) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QAbstractVideoSurface_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoSurface_TimerEvent +func miqt_exec_callback_QAbstractVideoSurface_TimerEvent(self *C.QAbstractVideoSurface, 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((&QAbstractVideoSurface{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractVideoSurface) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QAbstractVideoSurface_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QAbstractVideoSurface) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QAbstractVideoSurface_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoSurface_ChildEvent +func miqt_exec_callback_QAbstractVideoSurface_ChildEvent(self *C.QAbstractVideoSurface, 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((&QAbstractVideoSurface{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAbstractVideoSurface) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QAbstractVideoSurface_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QAbstractVideoSurface) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QAbstractVideoSurface_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoSurface_CustomEvent +func miqt_exec_callback_QAbstractVideoSurface_CustomEvent(self *C.QAbstractVideoSurface, 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((&QAbstractVideoSurface{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAbstractVideoSurface) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QAbstractVideoSurface_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAbstractVideoSurface) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QAbstractVideoSurface_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoSurface_ConnectNotify +func miqt_exec_callback_QAbstractVideoSurface_ConnectNotify(self *C.QAbstractVideoSurface, 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((&QAbstractVideoSurface{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAbstractVideoSurface) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QAbstractVideoSurface_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAbstractVideoSurface) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QAbstractVideoSurface_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractVideoSurface_DisconnectNotify +func miqt_exec_callback_QAbstractVideoSurface_DisconnectNotify(self *C.QAbstractVideoSurface, 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((&QAbstractVideoSurface{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QAbstractVideoSurface) Delete() { diff --git a/qt/multimedia/gen_qabstractvideosurface.h b/qt/multimedia/gen_qabstractvideosurface.h index e082260e..f6693677 100644 --- a/qt/multimedia/gen_qabstractvideosurface.h +++ b/qt/multimedia/gen_qabstractvideosurface.h @@ -16,20 +16,30 @@ extern "C" { #ifdef __cplusplus class QAbstractVideoSurface; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSize; +class QTimerEvent; class QVideoFrame; class QVideoSurfaceFormat; #else typedef struct QAbstractVideoSurface QAbstractVideoSurface; +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 QVideoSurfaceFormat QVideoSurfaceFormat; #endif +void QAbstractVideoSurface_new(QAbstractVideoSurface** outptr_QAbstractVideoSurface, QObject** outptr_QObject); +void QAbstractVideoSurface_new2(QObject* parent, QAbstractVideoSurface** outptr_QAbstractVideoSurface, QObject** outptr_QObject); QMetaObject* QAbstractVideoSurface_MetaObject(const QAbstractVideoSurface* self); void* QAbstractVideoSurface_Metacast(QAbstractVideoSurface* self, const char* param1); struct miqt_string QAbstractVideoSurface_Tr(const char* s); @@ -56,6 +66,32 @@ 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); +void QAbstractVideoSurface_override_virtual_SupportedPixelFormats(void* self, intptr_t slot); +struct miqt_array /* of int */ QAbstractVideoSurface_virtualbase_SupportedPixelFormats(const void* self, int typeVal); +void QAbstractVideoSurface_override_virtual_IsFormatSupported(void* self, intptr_t slot); +bool QAbstractVideoSurface_virtualbase_IsFormatSupported(const void* self, QVideoSurfaceFormat* format); +void QAbstractVideoSurface_override_virtual_NearestFormat(void* self, intptr_t slot); +QVideoSurfaceFormat* QAbstractVideoSurface_virtualbase_NearestFormat(const void* self, QVideoSurfaceFormat* format); +void QAbstractVideoSurface_override_virtual_Start(void* self, intptr_t slot); +bool QAbstractVideoSurface_virtualbase_Start(void* self, QVideoSurfaceFormat* format); +void QAbstractVideoSurface_override_virtual_Stop(void* self, intptr_t slot); +void QAbstractVideoSurface_virtualbase_Stop(void* self); +void QAbstractVideoSurface_override_virtual_Present(void* self, intptr_t slot); +bool QAbstractVideoSurface_virtualbase_Present(void* self, QVideoFrame* frame); +void QAbstractVideoSurface_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractVideoSurface_virtualbase_Event(void* self, QEvent* event); +void QAbstractVideoSurface_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractVideoSurface_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAbstractVideoSurface_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractVideoSurface_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractVideoSurface_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAbstractVideoSurface_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAbstractVideoSurface_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAbstractVideoSurface_virtualbase_CustomEvent(void* self, QEvent* event); +void QAbstractVideoSurface_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAbstractVideoSurface_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAbstractVideoSurface_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAbstractVideoSurface_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractVideoSurface_Delete(QAbstractVideoSurface* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/multimedia/gen_qaudiosystemplugin.cpp b/qt/multimedia/gen_qaudiosystemplugin.cpp index 2604b642..992b4958 100644 --- a/qt/multimedia/gen_qaudiosystemplugin.cpp +++ b/qt/multimedia/gen_qaudiosystemplugin.cpp @@ -4,12 +4,16 @@ #include #include #include +#include +#include #include +#include #include #include #include #include #include +#include #include #include "gen_qaudiosystemplugin.h" #include "_cgo_export.h" @@ -59,6 +63,290 @@ void QAudioSystemFactoryInterface_Delete(QAudioSystemFactoryInterface* self, boo } } +class MiqtVirtualQAudioSystemPlugin : public virtual QAudioSystemPlugin { +public: + + MiqtVirtualQAudioSystemPlugin(): QAudioSystemPlugin() {}; + MiqtVirtualQAudioSystemPlugin(QObject* parent): QAudioSystemPlugin(parent) {}; + + virtual ~MiqtVirtualQAudioSystemPlugin() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__AvailableDevices = 0; + + // Subclass to allow providing a Go implementation + virtual QList availableDevices(QAudio::Mode param1) const override { + if (handle__AvailableDevices == 0) { + return QList(); // Pure virtual, there is no base we can call + } + + QAudio::Mode param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QAudioSystemPlugin_AvailableDevices(const_cast(this), handle__AvailableDevices, sigval1); + QList 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) { + QByteArray callback_return_value_arr_i_QByteArray(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QByteArray); + } + + return callback_return_value_QList; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateInput = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractAudioInput* createInput(const QByteArray& device) override { + if (handle__CreateInput == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + const QByteArray device_qb = device; + struct miqt_string device_ms; + device_ms.len = device_qb.length(); + device_ms.data = static_cast(malloc(device_ms.len)); + memcpy(device_ms.data, device_qb.data(), device_ms.len); + struct miqt_string sigval1 = device_ms; + + QAbstractAudioInput* callback_return_value = miqt_exec_callback_QAudioSystemPlugin_CreateInput(this, handle__CreateInput, sigval1); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateOutput = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractAudioOutput* createOutput(const QByteArray& device) override { + if (handle__CreateOutput == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + const QByteArray device_qb = device; + struct miqt_string device_ms; + device_ms.len = device_qb.length(); + device_ms.data = static_cast(malloc(device_ms.len)); + memcpy(device_ms.data, device_qb.data(), device_ms.len); + struct miqt_string sigval1 = device_ms; + + QAbstractAudioOutput* callback_return_value = miqt_exec_callback_QAudioSystemPlugin_CreateOutput(this, handle__CreateOutput, sigval1); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateDeviceInfo = 0; + + // Subclass to allow providing a Go implementation + virtual QAbstractAudioDeviceInfo* createDeviceInfo(const QByteArray& device, QAudio::Mode mode) override { + if (handle__CreateDeviceInfo == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + const QByteArray device_qb = device; + struct miqt_string device_ms; + device_ms.len = device_qb.length(); + device_ms.data = static_cast(malloc(device_ms.len)); + memcpy(device_ms.data, device_qb.data(), device_ms.len); + struct miqt_string sigval1 = device_ms; + QAudio::Mode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + + QAbstractAudioDeviceInfo* callback_return_value = miqt_exec_callback_QAudioSystemPlugin_CreateDeviceInfo(this, handle__CreateDeviceInfo, sigval1, sigval2); + + return callback_return_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 QAudioSystemPlugin::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAudioSystemPlugin_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAudioSystemPlugin::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 QAudioSystemPlugin::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAudioSystemPlugin_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAudioSystemPlugin::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) { + QAudioSystemPlugin::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAudioSystemPlugin_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAudioSystemPlugin::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) { + QAudioSystemPlugin::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAudioSystemPlugin_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAudioSystemPlugin::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) { + QAudioSystemPlugin::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAudioSystemPlugin_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAudioSystemPlugin::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) { + QAudioSystemPlugin::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioSystemPlugin_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAudioSystemPlugin::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) { + QAudioSystemPlugin::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAudioSystemPlugin_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAudioSystemPlugin::disconnectNotify(*signal); + + } + +}; + +void QAudioSystemPlugin_new(QAudioSystemPlugin** outptr_QAudioSystemPlugin, QObject** outptr_QObject, QAudioSystemFactoryInterface** outptr_QAudioSystemFactoryInterface) { + MiqtVirtualQAudioSystemPlugin* ret = new MiqtVirtualQAudioSystemPlugin(); + *outptr_QAudioSystemPlugin = ret; + *outptr_QObject = static_cast(ret); + *outptr_QAudioSystemFactoryInterface = static_cast(ret); +} + +void QAudioSystemPlugin_new2(QObject* parent, QAudioSystemPlugin** outptr_QAudioSystemPlugin, QObject** outptr_QObject, QAudioSystemFactoryInterface** outptr_QAudioSystemFactoryInterface) { + MiqtVirtualQAudioSystemPlugin* ret = new MiqtVirtualQAudioSystemPlugin(parent); + *outptr_QAudioSystemPlugin = ret; + *outptr_QObject = static_cast(ret); + *outptr_QAudioSystemFactoryInterface = static_cast(ret); +} + QMetaObject* QAudioSystemPlugin_MetaObject(const QAudioSystemPlugin* self) { return (QMetaObject*) self->metaObject(); } @@ -166,9 +454,81 @@ struct miqt_string QAudioSystemPlugin_TrUtf83(const char* s, const char* c, int return _ms; } +void QAudioSystemPlugin_override_virtual_AvailableDevices(void* self, intptr_t slot) { + dynamic_cast( (QAudioSystemPlugin*)(self) )->handle__AvailableDevices = slot; +} + +void QAudioSystemPlugin_override_virtual_CreateInput(void* self, intptr_t slot) { + dynamic_cast( (QAudioSystemPlugin*)(self) )->handle__CreateInput = slot; +} + +void QAudioSystemPlugin_override_virtual_CreateOutput(void* self, intptr_t slot) { + dynamic_cast( (QAudioSystemPlugin*)(self) )->handle__CreateOutput = slot; +} + +void QAudioSystemPlugin_override_virtual_CreateDeviceInfo(void* self, intptr_t slot) { + dynamic_cast( (QAudioSystemPlugin*)(self) )->handle__CreateDeviceInfo = slot; +} + +void QAudioSystemPlugin_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAudioSystemPlugin*)(self) )->handle__Event = slot; +} + +bool QAudioSystemPlugin_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAudioSystemPlugin*)(self) )->virtualbase_Event(event); +} + +void QAudioSystemPlugin_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAudioSystemPlugin*)(self) )->handle__EventFilter = slot; +} + +bool QAudioSystemPlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAudioSystemPlugin*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAudioSystemPlugin_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioSystemPlugin*)(self) )->handle__TimerEvent = slot; +} + +void QAudioSystemPlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAudioSystemPlugin*)(self) )->virtualbase_TimerEvent(event); +} + +void QAudioSystemPlugin_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioSystemPlugin*)(self) )->handle__ChildEvent = slot; +} + +void QAudioSystemPlugin_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAudioSystemPlugin*)(self) )->virtualbase_ChildEvent(event); +} + +void QAudioSystemPlugin_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAudioSystemPlugin*)(self) )->handle__CustomEvent = slot; +} + +void QAudioSystemPlugin_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAudioSystemPlugin*)(self) )->virtualbase_CustomEvent(event); +} + +void QAudioSystemPlugin_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioSystemPlugin*)(self) )->handle__ConnectNotify = slot; +} + +void QAudioSystemPlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioSystemPlugin*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAudioSystemPlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAudioSystemPlugin*)(self) )->handle__DisconnectNotify = slot; +} + +void QAudioSystemPlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAudioSystemPlugin*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAudioSystemPlugin_Delete(QAudioSystemPlugin* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/multimedia/gen_qaudiosystemplugin.go b/qt/multimedia/gen_qaudiosystemplugin.go index fdeacb76..031fb87f 100644 --- a/qt/multimedia/gen_qaudiosystemplugin.go +++ b/qt/multimedia/gen_qaudiosystemplugin.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -144,6 +145,30 @@ func UnsafeNewQAudioSystemPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer, h_Q QAudioSystemFactoryInterface: UnsafeNewQAudioSystemFactoryInterface(h_QAudioSystemFactoryInterface)} } +// NewQAudioSystemPlugin constructs a new QAudioSystemPlugin object. +func NewQAudioSystemPlugin() *QAudioSystemPlugin { + var outptr_QAudioSystemPlugin *C.QAudioSystemPlugin = nil + var outptr_QObject *C.QObject = nil + var outptr_QAudioSystemFactoryInterface *C.QAudioSystemFactoryInterface = nil + + C.QAudioSystemPlugin_new(&outptr_QAudioSystemPlugin, &outptr_QObject, &outptr_QAudioSystemFactoryInterface) + ret := newQAudioSystemPlugin(outptr_QAudioSystemPlugin, outptr_QObject, outptr_QAudioSystemFactoryInterface) + ret.isSubclass = true + return ret +} + +// NewQAudioSystemPlugin2 constructs a new QAudioSystemPlugin object. +func NewQAudioSystemPlugin2(parent *qt.QObject) *QAudioSystemPlugin { + var outptr_QAudioSystemPlugin *C.QAudioSystemPlugin = nil + var outptr_QObject *C.QObject = nil + var outptr_QAudioSystemFactoryInterface *C.QAudioSystemFactoryInterface = nil + + C.QAudioSystemPlugin_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QAudioSystemPlugin, &outptr_QObject, &outptr_QAudioSystemFactoryInterface) + ret := newQAudioSystemPlugin(outptr_QAudioSystemPlugin, outptr_QObject, outptr_QAudioSystemFactoryInterface) + ret.isSubclass = true + return ret +} + func (this *QAudioSystemPlugin) MetaObject() *qt.QMetaObject { return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QAudioSystemPlugin_MetaObject(this.h))) } @@ -249,6 +274,267 @@ func QAudioSystemPlugin_TrUtf83(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QAudioSystemPlugin) OnAvailableDevices(slot func(param1 QAudio__Mode) [][]byte) { + C.QAudioSystemPlugin_override_virtual_AvailableDevices(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSystemPlugin_AvailableDevices +func miqt_exec_callback_QAudioSystemPlugin_AvailableDevices(self *C.QAudioSystemPlugin, cb C.intptr_t, param1 C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 QAudio__Mode) [][]byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QAudio__Mode)(param1) + + virtualReturn := gofunc(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_alias := C.struct_miqt_string{} + virtualReturn_i_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn[i][0])) + virtualReturn_i_alias.len = C.size_t(len(virtualReturn[i])) + virtualReturn_CArray[i] = virtualReturn_i_alias + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} +func (this *QAudioSystemPlugin) OnCreateInput(slot func(device []byte) *QAbstractAudioInput) { + C.QAudioSystemPlugin_override_virtual_CreateInput(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSystemPlugin_CreateInput +func miqt_exec_callback_QAudioSystemPlugin_CreateInput(self *C.QAudioSystemPlugin, cb C.intptr_t, device C.struct_miqt_string) *C.QAbstractAudioInput { + gofunc, ok := cgo.Handle(cb).Value().(func(device []byte) *QAbstractAudioInput) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var device_bytearray C.struct_miqt_string = device + device_ret := C.GoBytes(unsafe.Pointer(device_bytearray.data), C.int(int64(device_bytearray.len))) + C.free(unsafe.Pointer(device_bytearray.data)) + slotval1 := device_ret + + virtualReturn := gofunc(slotval1) + + return virtualReturn.cPointer() + +} +func (this *QAudioSystemPlugin) OnCreateOutput(slot func(device []byte) *QAbstractAudioOutput) { + C.QAudioSystemPlugin_override_virtual_CreateOutput(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSystemPlugin_CreateOutput +func miqt_exec_callback_QAudioSystemPlugin_CreateOutput(self *C.QAudioSystemPlugin, cb C.intptr_t, device C.struct_miqt_string) *C.QAbstractAudioOutput { + gofunc, ok := cgo.Handle(cb).Value().(func(device []byte) *QAbstractAudioOutput) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var device_bytearray C.struct_miqt_string = device + device_ret := C.GoBytes(unsafe.Pointer(device_bytearray.data), C.int(int64(device_bytearray.len))) + C.free(unsafe.Pointer(device_bytearray.data)) + slotval1 := device_ret + + virtualReturn := gofunc(slotval1) + + return virtualReturn.cPointer() + +} +func (this *QAudioSystemPlugin) OnCreateDeviceInfo(slot func(device []byte, mode QAudio__Mode) *QAbstractAudioDeviceInfo) { + C.QAudioSystemPlugin_override_virtual_CreateDeviceInfo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSystemPlugin_CreateDeviceInfo +func miqt_exec_callback_QAudioSystemPlugin_CreateDeviceInfo(self *C.QAudioSystemPlugin, cb C.intptr_t, device C.struct_miqt_string, mode C.int) *C.QAbstractAudioDeviceInfo { + gofunc, ok := cgo.Handle(cb).Value().(func(device []byte, mode QAudio__Mode) *QAbstractAudioDeviceInfo) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var device_bytearray C.struct_miqt_string = device + device_ret := C.GoBytes(unsafe.Pointer(device_bytearray.data), C.int(int64(device_bytearray.len))) + C.free(unsafe.Pointer(device_bytearray.data)) + slotval1 := device_ret + slotval2 := (QAudio__Mode)(mode) + + virtualReturn := gofunc(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QAudioSystemPlugin) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QAudioSystemPlugin_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioSystemPlugin) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QAudioSystemPlugin_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSystemPlugin_Event +func miqt_exec_callback_QAudioSystemPlugin_Event(self *C.QAudioSystemPlugin, 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((&QAudioSystemPlugin{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioSystemPlugin) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QAudioSystemPlugin_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QAudioSystemPlugin) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QAudioSystemPlugin_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSystemPlugin_EventFilter +func miqt_exec_callback_QAudioSystemPlugin_EventFilter(self *C.QAudioSystemPlugin, 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((&QAudioSystemPlugin{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAudioSystemPlugin) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QAudioSystemPlugin_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QAudioSystemPlugin) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QAudioSystemPlugin_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSystemPlugin_TimerEvent +func miqt_exec_callback_QAudioSystemPlugin_TimerEvent(self *C.QAudioSystemPlugin, 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((&QAudioSystemPlugin{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAudioSystemPlugin) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QAudioSystemPlugin_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QAudioSystemPlugin) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QAudioSystemPlugin_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSystemPlugin_ChildEvent +func miqt_exec_callback_QAudioSystemPlugin_ChildEvent(self *C.QAudioSystemPlugin, 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((&QAudioSystemPlugin{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAudioSystemPlugin) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QAudioSystemPlugin_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QAudioSystemPlugin) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QAudioSystemPlugin_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSystemPlugin_CustomEvent +func miqt_exec_callback_QAudioSystemPlugin_CustomEvent(self *C.QAudioSystemPlugin, 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((&QAudioSystemPlugin{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAudioSystemPlugin) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QAudioSystemPlugin_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioSystemPlugin) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QAudioSystemPlugin_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSystemPlugin_ConnectNotify +func miqt_exec_callback_QAudioSystemPlugin_ConnectNotify(self *C.QAudioSystemPlugin, 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((&QAudioSystemPlugin{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAudioSystemPlugin) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QAudioSystemPlugin_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QAudioSystemPlugin) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QAudioSystemPlugin_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAudioSystemPlugin_DisconnectNotify +func miqt_exec_callback_QAudioSystemPlugin_DisconnectNotify(self *C.QAudioSystemPlugin, 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((&QAudioSystemPlugin{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QAudioSystemPlugin) Delete() { diff --git a/qt/multimedia/gen_qaudiosystemplugin.h b/qt/multimedia/gen_qaudiosystemplugin.h index 6d29a6df..1b6e852a 100644 --- a/qt/multimedia/gen_qaudiosystemplugin.h +++ b/qt/multimedia/gen_qaudiosystemplugin.h @@ -21,8 +21,12 @@ class QAbstractAudioOutput; class QAudioSystemFactoryInterface; class QAudioSystemPlugin; class QByteArray; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAbstractAudioDeviceInfo QAbstractAudioDeviceInfo; typedef struct QAbstractAudioInput QAbstractAudioInput; @@ -30,8 +34,12 @@ typedef struct QAbstractAudioOutput QAbstractAudioOutput; typedef struct QAudioSystemFactoryInterface QAudioSystemFactoryInterface; typedef struct QAudioSystemPlugin QAudioSystemPlugin; typedef struct QByteArray QByteArray; +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 struct miqt_array /* of struct miqt_string */ QAudioSystemFactoryInterface_AvailableDevices(const QAudioSystemFactoryInterface* self, int param1); @@ -41,6 +49,8 @@ QAbstractAudioDeviceInfo* QAudioSystemFactoryInterface_CreateDeviceInfo(QAudioSy void QAudioSystemFactoryInterface_OperatorAssign(QAudioSystemFactoryInterface* self, QAudioSystemFactoryInterface* param1); void QAudioSystemFactoryInterface_Delete(QAudioSystemFactoryInterface* self, bool isSubclass); +void QAudioSystemPlugin_new(QAudioSystemPlugin** outptr_QAudioSystemPlugin, QObject** outptr_QObject, QAudioSystemFactoryInterface** outptr_QAudioSystemFactoryInterface); +void QAudioSystemPlugin_new2(QObject* parent, QAudioSystemPlugin** outptr_QAudioSystemPlugin, QObject** outptr_QObject, QAudioSystemFactoryInterface** outptr_QAudioSystemFactoryInterface); QMetaObject* QAudioSystemPlugin_MetaObject(const QAudioSystemPlugin* self); void* QAudioSystemPlugin_Metacast(QAudioSystemPlugin* self, const char* param1); struct miqt_string QAudioSystemPlugin_Tr(const char* s); @@ -53,6 +63,28 @@ 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_override_virtual_AvailableDevices(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QAudioSystemPlugin_virtualbase_AvailableDevices(const void* self, int param1); +void QAudioSystemPlugin_override_virtual_CreateInput(void* self, intptr_t slot); +QAbstractAudioInput* QAudioSystemPlugin_virtualbase_CreateInput(void* self, struct miqt_string device); +void QAudioSystemPlugin_override_virtual_CreateOutput(void* self, intptr_t slot); +QAbstractAudioOutput* QAudioSystemPlugin_virtualbase_CreateOutput(void* self, struct miqt_string device); +void QAudioSystemPlugin_override_virtual_CreateDeviceInfo(void* self, intptr_t slot); +QAbstractAudioDeviceInfo* QAudioSystemPlugin_virtualbase_CreateDeviceInfo(void* self, struct miqt_string device, int mode); +void QAudioSystemPlugin_override_virtual_Event(void* self, intptr_t slot); +bool QAudioSystemPlugin_virtualbase_Event(void* self, QEvent* event); +void QAudioSystemPlugin_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAudioSystemPlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAudioSystemPlugin_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAudioSystemPlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAudioSystemPlugin_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAudioSystemPlugin_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAudioSystemPlugin_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAudioSystemPlugin_virtualbase_CustomEvent(void* self, QEvent* event); +void QAudioSystemPlugin_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAudioSystemPlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAudioSystemPlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAudioSystemPlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAudioSystemPlugin_Delete(QAudioSystemPlugin* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/network/gen_qnetworkproxy.cpp b/qt/network/gen_qnetworkproxy.cpp index c7e8e295..f04640fa 100644 --- a/qt/network/gen_qnetworkproxy.cpp +++ b/qt/network/gen_qnetworkproxy.cpp @@ -418,6 +418,44 @@ void QNetworkProxy_Delete(QNetworkProxy* self, bool isSubclass) { } } +class MiqtVirtualQNetworkProxyFactory : public virtual QNetworkProxyFactory { +public: + + MiqtVirtualQNetworkProxyFactory(): QNetworkProxyFactory() {}; + + virtual ~MiqtVirtualQNetworkProxyFactory() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__QueryProxy = 0; + + // Subclass to allow providing a Go implementation + virtual QList queryProxy(const QNetworkProxyQuery& query) override { + if (handle__QueryProxy == 0) { + return QList(); // Pure virtual, there is no base we can call + } + + const QNetworkProxyQuery& query_ret = query; + // Cast returned reference into pointer + QNetworkProxyQuery* sigval1 = const_cast(&query_ret); + + struct miqt_array /* of QNetworkProxy* */ callback_return_value = miqt_exec_callback_QNetworkProxyFactory_QueryProxy(this, handle__QueryProxy, sigval1); + QList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QNetworkProxy** 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 QNetworkProxyFactory_new(QNetworkProxyFactory** outptr_QNetworkProxyFactory) { + MiqtVirtualQNetworkProxyFactory* ret = new MiqtVirtualQNetworkProxyFactory(); + *outptr_QNetworkProxyFactory = ret; +} + 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 @@ -486,9 +524,13 @@ struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_SystemProxyForQu return _out; } +void QNetworkProxyFactory_override_virtual_QueryProxy(void* self, intptr_t slot) { + dynamic_cast( (QNetworkProxyFactory*)(self) )->handle__QueryProxy = slot; +} + void QNetworkProxyFactory_Delete(QNetworkProxyFactory* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/network/gen_qnetworkproxy.go b/qt/network/gen_qnetworkproxy.go index ed728b2f..d30e4270 100644 --- a/qt/network/gen_qnetworkproxy.go +++ b/qt/network/gen_qnetworkproxy.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt" "runtime" + "runtime/cgo" "unsafe" ) @@ -765,6 +766,16 @@ func UnsafeNewQNetworkProxyFactory(h unsafe.Pointer) *QNetworkProxyFactory { return &QNetworkProxyFactory{h: (*C.QNetworkProxyFactory)(h)} } +// NewQNetworkProxyFactory constructs a new QNetworkProxyFactory object. +func NewQNetworkProxyFactory() *QNetworkProxyFactory { + var outptr_QNetworkProxyFactory *C.QNetworkProxyFactory = nil + + C.QNetworkProxyFactory_new(&outptr_QNetworkProxyFactory) + ret := newQNetworkProxyFactory(outptr_QNetworkProxyFactory) + ret.isSubclass = true + return ret +} + 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)) @@ -832,6 +843,31 @@ func QNetworkProxyFactory_SystemProxyForQuery1(query *QNetworkProxyQuery) []QNet } return _ret } +func (this *QNetworkProxyFactory) OnQueryProxy(slot func(query *QNetworkProxyQuery) []QNetworkProxy) { + C.QNetworkProxyFactory_override_virtual_QueryProxy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkProxyFactory_QueryProxy +func miqt_exec_callback_QNetworkProxyFactory_QueryProxy(self *C.QNetworkProxyFactory, cb C.intptr_t, query *C.QNetworkProxyQuery) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(query *QNetworkProxyQuery) []QNetworkProxy) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQNetworkProxyQuery(unsafe.Pointer(query)) + + virtualReturn := gofunc(slotval1) + virtualReturn_CArray := (*[0xffff]*C.QNetworkProxy)(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 + +} // Delete this object from C++ memory. func (this *QNetworkProxyFactory) Delete() { diff --git a/qt/network/gen_qnetworkproxy.h b/qt/network/gen_qnetworkproxy.h index e4be2f5d..66165cfd 100644 --- a/qt/network/gen_qnetworkproxy.h +++ b/qt/network/gen_qnetworkproxy.h @@ -105,6 +105,7 @@ struct miqt_string QNetworkProxy_RawHeader(const QNetworkProxy* self, struct miq void QNetworkProxy_SetRawHeader(QNetworkProxy* self, struct miqt_string headerName, struct miqt_string value); void QNetworkProxy_Delete(QNetworkProxy* self, bool isSubclass); +void QNetworkProxyFactory_new(QNetworkProxyFactory** outptr_QNetworkProxyFactory); struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy(QNetworkProxyFactory* self, QNetworkProxyQuery* query); bool QNetworkProxyFactory_UsesSystemConfiguration(); void QNetworkProxyFactory_SetUseSystemConfiguration(bool enable); @@ -113,6 +114,8 @@ struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_ProxyForQuery(QN struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_SystemProxyForQuery(); void QNetworkProxyFactory_OperatorAssign(QNetworkProxyFactory* self, QNetworkProxyFactory* param1); struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_SystemProxyForQuery1(QNetworkProxyQuery* query); +void QNetworkProxyFactory_override_virtual_QueryProxy(void* self, intptr_t slot); +struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_virtualbase_QueryProxy(void* self, QNetworkProxyQuery* query); void QNetworkProxyFactory_Delete(QNetworkProxyFactory* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qabstractanimation.cpp b/qt6/gen_qabstractanimation.cpp index d2aecd3d..c763b091 100644 --- a/qt6/gen_qabstractanimation.cpp +++ b/qt6/gen_qabstractanimation.cpp @@ -14,6 +14,282 @@ #include "gen_qabstractanimation.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractAnimation : public virtual QAbstractAnimation { +public: + + MiqtVirtualQAbstractAnimation(): QAbstractAnimation() {}; + MiqtVirtualQAbstractAnimation(QObject* parent): QAbstractAnimation(parent) {}; + + virtual ~MiqtVirtualQAbstractAnimation() = 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 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QAbstractAnimation_Duration(const_cast(this), handle__Duration); + + return static_cast(callback_return_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 QAbstractAnimation::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractAnimation_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAbstractAnimation::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) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = currentTime; + + miqt_exec_callback_QAbstractAnimation_UpdateCurrentTime(this, handle__UpdateCurrentTime, sigval1); + + + } + + // 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) { + QAbstractAnimation::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_QAbstractAnimation_UpdateState(this, handle__UpdateState, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateState(int newState, int oldState) { + + QAbstractAnimation::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) { + QAbstractAnimation::updateDirection(direction); + return; + } + + QAbstractAnimation::Direction direction_ret = direction; + int sigval1 = static_cast(direction_ret); + + miqt_exec_callback_QAbstractAnimation_UpdateDirection(this, handle__UpdateDirection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateDirection(int direction) { + + QAbstractAnimation::updateDirection(static_cast(direction)); + + } + + // 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 QAbstractAnimation::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractAnimation_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAbstractAnimation::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) { + QAbstractAnimation::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractAnimation_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractAnimation::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) { + QAbstractAnimation::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAbstractAnimation_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAbstractAnimation::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) { + QAbstractAnimation::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractAnimation_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAbstractAnimation::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) { + QAbstractAnimation::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractAnimation_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAbstractAnimation::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) { + QAbstractAnimation::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractAnimation_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAbstractAnimation::disconnectNotify(*signal); + + } + +}; + +void QAbstractAnimation_new(QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQAbstractAnimation* ret = new MiqtVirtualQAbstractAnimation(); + *outptr_QAbstractAnimation = ret; + *outptr_QObject = static_cast(ret); +} + +void QAbstractAnimation_new2(QObject* parent, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQAbstractAnimation* ret = new MiqtVirtualQAbstractAnimation(parent); + *outptr_QAbstractAnimation = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractAnimation_MetaObject(const QAbstractAnimation* self) { return (QMetaObject*) self->metaObject(); } @@ -84,7 +360,7 @@ void QAbstractAnimation_Finished(QAbstractAnimation* self) { } void QAbstractAnimation_connect_Finished(QAbstractAnimation* self, intptr_t slot) { - QAbstractAnimation::connect(self, static_cast(&QAbstractAnimation::finished), self, [=]() { + MiqtVirtualQAbstractAnimation::connect(self, static_cast(&QAbstractAnimation::finished), self, [=]() { miqt_exec_callback_QAbstractAnimation_Finished(slot); }); } @@ -94,7 +370,7 @@ void QAbstractAnimation_StateChanged(QAbstractAnimation* self, int newState, int } void QAbstractAnimation_connect_StateChanged(QAbstractAnimation* self, intptr_t slot) { - QAbstractAnimation::connect(self, static_cast(&QAbstractAnimation::stateChanged), self, [=](QAbstractAnimation::State newState, QAbstractAnimation::State oldState) { + MiqtVirtualQAbstractAnimation::connect(self, static_cast(&QAbstractAnimation::stateChanged), self, [=](QAbstractAnimation::State newState, QAbstractAnimation::State oldState) { QAbstractAnimation::State newState_ret = newState; int sigval1 = static_cast(newState_ret); QAbstractAnimation::State oldState_ret = oldState; @@ -108,7 +384,7 @@ void QAbstractAnimation_CurrentLoopChanged(QAbstractAnimation* self, int current } void QAbstractAnimation_connect_CurrentLoopChanged(QAbstractAnimation* self, intptr_t slot) { - QAbstractAnimation::connect(self, static_cast(&QAbstractAnimation::currentLoopChanged), self, [=](int currentLoop) { + MiqtVirtualQAbstractAnimation::connect(self, static_cast(&QAbstractAnimation::currentLoopChanged), self, [=](int currentLoop) { int sigval1 = currentLoop; miqt_exec_callback_QAbstractAnimation_CurrentLoopChanged(slot, sigval1); }); @@ -119,7 +395,7 @@ void QAbstractAnimation_DirectionChanged(QAbstractAnimation* self, int param1) { } void QAbstractAnimation_connect_DirectionChanged(QAbstractAnimation* self, intptr_t slot) { - QAbstractAnimation::connect(self, static_cast(&QAbstractAnimation::directionChanged), self, [=](QAbstractAnimation::Direction param1) { + MiqtVirtualQAbstractAnimation::connect(self, static_cast(&QAbstractAnimation::directionChanged), self, [=](QAbstractAnimation::Direction param1) { QAbstractAnimation::Direction param1_ret = param1; int sigval1 = static_cast(param1_ret); miqt_exec_callback_QAbstractAnimation_DirectionChanged(slot, sigval1); @@ -176,9 +452,89 @@ void QAbstractAnimation_Start1(QAbstractAnimation* self, int policy) { self->start(static_cast(policy)); } +void QAbstractAnimation_override_virtual_Duration(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__Duration = slot; +} + +void QAbstractAnimation_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__Event = slot; +} + +bool QAbstractAnimation_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_Event(event); +} + +void QAbstractAnimation_override_virtual_UpdateCurrentTime(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__UpdateCurrentTime = slot; +} + +void QAbstractAnimation_override_virtual_UpdateState(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__UpdateState = slot; +} + +void QAbstractAnimation_virtualbase_UpdateState(void* self, int newState, int oldState) { + ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_UpdateState(newState, oldState); +} + +void QAbstractAnimation_override_virtual_UpdateDirection(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__UpdateDirection = slot; +} + +void QAbstractAnimation_virtualbase_UpdateDirection(void* self, int direction) { + ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_UpdateDirection(direction); +} + +void QAbstractAnimation_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractAnimation_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAbstractAnimation_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractAnimation_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractAnimation_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__ChildEvent = slot; +} + +void QAbstractAnimation_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_ChildEvent(event); +} + +void QAbstractAnimation_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__CustomEvent = slot; +} + +void QAbstractAnimation_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_CustomEvent(event); +} + +void QAbstractAnimation_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__ConnectNotify = slot; +} + +void QAbstractAnimation_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAbstractAnimation_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractAnimation*)(self) )->handle__DisconnectNotify = slot; +} + +void QAbstractAnimation_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractAnimation*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAbstractAnimation_Delete(QAbstractAnimation* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qabstractanimation.go b/qt6/gen_qabstractanimation.go index 496e764b..f337bc12 100644 --- a/qt6/gen_qabstractanimation.go +++ b/qt6/gen_qabstractanimation.go @@ -75,6 +75,28 @@ func UnsafeNewQAbstractAnimation(h unsafe.Pointer, h_QObject unsafe.Pointer) *QA QObject: UnsafeNewQObject(h_QObject)} } +// NewQAbstractAnimation constructs a new QAbstractAnimation object. +func NewQAbstractAnimation() *QAbstractAnimation { + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractAnimation_new(&outptr_QAbstractAnimation, &outptr_QObject) + ret := newQAbstractAnimation(outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractAnimation2 constructs a new QAbstractAnimation object. +func NewQAbstractAnimation2(parent *QObject) *QAbstractAnimation { + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractAnimation_new2(parent.cPointer(), &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQAbstractAnimation(outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractAnimation) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractAnimation_MetaObject(this.h))) } @@ -266,6 +288,253 @@ func QAbstractAnimation_Tr3(s string, c string, n int) string { func (this *QAbstractAnimation) Start1(policy QAbstractAnimation__DeletionPolicy) { C.QAbstractAnimation_Start1(this.h, (C.int)(policy)) } +func (this *QAbstractAnimation) OnDuration(slot func() int) { + C.QAbstractAnimation_override_virtual_Duration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_Duration +func miqt_exec_callback_QAbstractAnimation_Duration(self *C.QAbstractAnimation, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractAnimation) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAbstractAnimation_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractAnimation) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractAnimation_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_Event +func miqt_exec_callback_QAbstractAnimation_Event(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QAbstractAnimation) OnUpdateCurrentTime(slot func(currentTime int)) { + C.QAbstractAnimation_override_virtual_UpdateCurrentTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_UpdateCurrentTime +func miqt_exec_callback_QAbstractAnimation_UpdateCurrentTime(self *C.QAbstractAnimation, cb C.intptr_t, currentTime C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(currentTime int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(currentTime) + + gofunc(slotval1) + +} + +func (this *QAbstractAnimation) callVirtualBase_UpdateState(newState QAbstractAnimation__State, oldState QAbstractAnimation__State) { + + C.QAbstractAnimation_virtualbase_UpdateState(unsafe.Pointer(this.h), (C.int)(newState), (C.int)(oldState)) + +} +func (this *QAbstractAnimation) OnUpdateState(slot func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) { + C.QAbstractAnimation_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_UpdateState +func miqt_exec_callback_QAbstractAnimation_UpdateState(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_UpdateState, slotval1, slotval2) + +} + +func (this *QAbstractAnimation) callVirtualBase_UpdateDirection(direction QAbstractAnimation__Direction) { + + C.QAbstractAnimation_virtualbase_UpdateDirection(unsafe.Pointer(this.h), (C.int)(direction)) + +} +func (this *QAbstractAnimation) OnUpdateDirection(slot func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) { + C.QAbstractAnimation_override_virtual_UpdateDirection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_UpdateDirection +func miqt_exec_callback_QAbstractAnimation_UpdateDirection(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_UpdateDirection, slotval1) + +} + +func (this *QAbstractAnimation) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAbstractAnimation_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAbstractAnimation) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAbstractAnimation_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_EventFilter +func miqt_exec_callback_QAbstractAnimation_EventFilter(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractAnimation) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAbstractAnimation_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractAnimation) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAbstractAnimation_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_TimerEvent +func miqt_exec_callback_QAbstractAnimation_TimerEvent(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractAnimation) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAbstractAnimation_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractAnimation) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAbstractAnimation_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_ChildEvent +func miqt_exec_callback_QAbstractAnimation_ChildEvent(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAbstractAnimation) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAbstractAnimation_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractAnimation) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractAnimation_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_CustomEvent +func miqt_exec_callback_QAbstractAnimation_CustomEvent(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAbstractAnimation) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAbstractAnimation_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractAnimation) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractAnimation_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_ConnectNotify +func miqt_exec_callback_QAbstractAnimation_ConnectNotify(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAbstractAnimation) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAbstractAnimation_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractAnimation) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractAnimation_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractAnimation_DisconnectNotify +func miqt_exec_callback_QAbstractAnimation_DisconnectNotify(self *C.QAbstractAnimation, 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((&QAbstractAnimation{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QAbstractAnimation) Delete() { diff --git a/qt6/gen_qabstractanimation.h b/qt6/gen_qabstractanimation.h index b8582a64..569e30b5 100644 --- a/qt6/gen_qabstractanimation.h +++ b/qt6/gen_qabstractanimation.h @@ -36,6 +36,8 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif +void QAbstractAnimation_new(QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QAbstractAnimation_new2(QObject* parent, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); QMetaObject* QAbstractAnimation_MetaObject(const QAbstractAnimation* self); void* QAbstractAnimation_Metacast(QAbstractAnimation* self, const char* param1); struct miqt_string QAbstractAnimation_Tr(const char* s); @@ -71,6 +73,28 @@ 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_override_virtual_Duration(void* self, intptr_t slot); +int QAbstractAnimation_virtualbase_Duration(const void* self); +void QAbstractAnimation_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractAnimation_virtualbase_Event(void* self, QEvent* event); +void QAbstractAnimation_override_virtual_UpdateCurrentTime(void* self, intptr_t slot); +void QAbstractAnimation_virtualbase_UpdateCurrentTime(void* self, int currentTime); +void QAbstractAnimation_override_virtual_UpdateState(void* self, intptr_t slot); +void QAbstractAnimation_virtualbase_UpdateState(void* self, int newState, int oldState); +void QAbstractAnimation_override_virtual_UpdateDirection(void* self, intptr_t slot); +void QAbstractAnimation_virtualbase_UpdateDirection(void* self, int direction); +void QAbstractAnimation_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractAnimation_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAbstractAnimation_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractAnimation_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractAnimation_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAbstractAnimation_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAbstractAnimation_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAbstractAnimation_virtualbase_CustomEvent(void* self, QEvent* event); +void QAbstractAnimation_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAbstractAnimation_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAbstractAnimation_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAbstractAnimation_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractAnimation_Delete(QAbstractAnimation* self, bool isSubclass); void QAnimationDriver_new(QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject); diff --git a/qt6/gen_qabstractbutton.cpp b/qt6/gen_qabstractbutton.cpp index 402958b7..439168f2 100644 --- a/qt6/gen_qabstractbutton.cpp +++ b/qt6/gen_qabstractbutton.cpp @@ -1,26 +1,1134 @@ #include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include #include +#include #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_qabstractbutton.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractButton : public virtual QAbstractButton { +public: + + MiqtVirtualQAbstractButton(QWidget* parent): QAbstractButton(parent) {}; + MiqtVirtualQAbstractButton(): QAbstractButton() {}; + + virtual ~MiqtVirtualQAbstractButton() = default; + + // 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) { + return; // Pure virtual, there is no base we can call + } + + QPaintEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // 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 QAbstractButton::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_QAbstractButton_HitButton(const_cast(this), handle__HitButton, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HitButton(QPoint* pos) const { + + return QAbstractButton::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) { + QAbstractButton::checkStateSet(); + return; + } + + + miqt_exec_callback_QAbstractButton_CheckStateSet(this, handle__CheckStateSet); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CheckStateSet() { + + QAbstractButton::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) { + QAbstractButton::nextCheckState(); + return; + } + + + miqt_exec_callback_QAbstractButton_NextCheckState(this, handle__NextCheckState); + + + } + + // Wrapper to allow calling protected method + void virtualbase_NextCheckState() { + + QAbstractButton::nextCheckState(); + + } + + // 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 QAbstractButton::event(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QAbstractButton_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* e) { + + return QAbstractButton::event(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) { + QAbstractButton::keyPressEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* e) { + + QAbstractButton::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) { + QAbstractButton::keyReleaseEvent(e); + return; + } + + QKeyEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* e) { + + QAbstractButton::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) { + QAbstractButton::mousePressEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* e) { + + QAbstractButton::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) { + QAbstractButton::mouseReleaseEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* e) { + + QAbstractButton::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) { + QAbstractButton::mouseMoveEvent(e); + return; + } + + QMouseEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* e) { + + QAbstractButton::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) { + QAbstractButton::focusInEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* e) { + + QAbstractButton::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) { + QAbstractButton::focusOutEvent(e); + return; + } + + QFocusEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* e) { + + QAbstractButton::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) { + QAbstractButton::changeEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* e) { + + QAbstractButton::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) { + QAbstractButton::timerEvent(e); + return; + } + + QTimerEvent* sigval1 = e; + + miqt_exec_callback_QAbstractButton_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* e) { + + QAbstractButton::timerEvent(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 QAbstractButton::devType(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractButton_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QAbstractButton::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) { + QAbstractButton::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QAbstractButton_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QAbstractButton::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 QAbstractButton::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractButton_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QAbstractButton::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 QAbstractButton::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractButton_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QAbstractButton::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 QAbstractButton::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QAbstractButton_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 QAbstractButton::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 QAbstractButton::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractButton_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QAbstractButton::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 QAbstractButton::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QAbstractButton_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QAbstractButton::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) { + QAbstractButton::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QAbstractButton::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) { + QAbstractButton::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QAbstractButton::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) { + QAbstractButton::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QAbstractButton::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) { + QAbstractButton::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QAbstractButton::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) { + QAbstractButton::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QAbstractButton::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) { + QAbstractButton::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QAbstractButton::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) { + QAbstractButton::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QAbstractButton::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) { + QAbstractButton::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QAbstractButton::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) { + QAbstractButton::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QAbstractButton::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) { + QAbstractButton::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QAbstractButton::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) { + QAbstractButton::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QAbstractButton::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) { + QAbstractButton::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QAbstractButton::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) { + QAbstractButton::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QAbstractButton::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) { + QAbstractButton::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QAbstractButton::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) { + QAbstractButton::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QAbstractButton::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) { + QAbstractButton::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QAbstractButton_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QAbstractButton::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 QAbstractButton::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 = (intptr_t*)(result_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractButton_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 QAbstractButton::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 QAbstractButton::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QAbstractButton_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 QAbstractButton::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) { + QAbstractButton::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QAbstractButton_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QAbstractButton::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 QAbstractButton::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QAbstractButton_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QAbstractButton::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 QAbstractButton::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QAbstractButton_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QAbstractButton::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) { + QAbstractButton::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractButton_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QAbstractButton::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 QAbstractButton::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QAbstractButton_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(QAbstractButton::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 QAbstractButton::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QAbstractButton_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QAbstractButton::focusNextPrevChild(next); + + } + +}; + +void QAbstractButton_new(QWidget* parent, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractButton* ret = new MiqtVirtualQAbstractButton(parent); + *outptr_QAbstractButton = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QAbstractButton_new2(QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractButton* ret = new MiqtVirtualQAbstractButton(); + *outptr_QAbstractButton = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + QMetaObject* QAbstractButton_MetaObject(const QAbstractButton* self) { return (QMetaObject*) self->metaObject(); } @@ -157,7 +1265,7 @@ void QAbstractButton_Pressed(QAbstractButton* self) { } void QAbstractButton_connect_Pressed(QAbstractButton* self, intptr_t slot) { - QAbstractButton::connect(self, static_cast(&QAbstractButton::pressed), self, [=]() { + MiqtVirtualQAbstractButton::connect(self, static_cast(&QAbstractButton::pressed), self, [=]() { miqt_exec_callback_QAbstractButton_Pressed(slot); }); } @@ -167,7 +1275,7 @@ void QAbstractButton_Released(QAbstractButton* self) { } void QAbstractButton_connect_Released(QAbstractButton* self, intptr_t slot) { - QAbstractButton::connect(self, static_cast(&QAbstractButton::released), self, [=]() { + MiqtVirtualQAbstractButton::connect(self, static_cast(&QAbstractButton::released), self, [=]() { miqt_exec_callback_QAbstractButton_Released(slot); }); } @@ -177,7 +1285,7 @@ void QAbstractButton_Clicked(QAbstractButton* self) { } void QAbstractButton_connect_Clicked(QAbstractButton* self, intptr_t slot) { - QAbstractButton::connect(self, static_cast(&QAbstractButton::clicked), self, [=]() { + MiqtVirtualQAbstractButton::connect(self, static_cast(&QAbstractButton::clicked), self, [=]() { miqt_exec_callback_QAbstractButton_Clicked(slot); }); } @@ -187,7 +1295,7 @@ void QAbstractButton_Toggled(QAbstractButton* self, bool checked) { } void QAbstractButton_connect_Toggled(QAbstractButton* self, intptr_t slot) { - QAbstractButton::connect(self, static_cast(&QAbstractButton::toggled), self, [=](bool checked) { + MiqtVirtualQAbstractButton::connect(self, static_cast(&QAbstractButton::toggled), self, [=](bool checked) { bool sigval1 = checked; miqt_exec_callback_QAbstractButton_Toggled(slot, sigval1); }); @@ -220,15 +1328,371 @@ void QAbstractButton_Clicked1(QAbstractButton* self, bool checked) { } void QAbstractButton_connect_Clicked1(QAbstractButton* self, intptr_t slot) { - QAbstractButton::connect(self, static_cast(&QAbstractButton::clicked), self, [=](bool checked) { + MiqtVirtualQAbstractButton::connect(self, static_cast(&QAbstractButton::clicked), self, [=](bool checked) { bool sigval1 = checked; miqt_exec_callback_QAbstractButton_Clicked1(slot, sigval1); }); } +void QAbstractButton_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__PaintEvent = slot; +} + +void QAbstractButton_override_virtual_HitButton(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__HitButton = slot; +} + +bool QAbstractButton_virtualbase_HitButton(const void* self, QPoint* pos) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_HitButton(pos); +} + +void QAbstractButton_override_virtual_CheckStateSet(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__CheckStateSet = slot; +} + +void QAbstractButton_virtualbase_CheckStateSet(void* self) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_CheckStateSet(); +} + +void QAbstractButton_override_virtual_NextCheckState(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__NextCheckState = slot; +} + +void QAbstractButton_virtualbase_NextCheckState(void* self) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_NextCheckState(); +} + +void QAbstractButton_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__Event = slot; +} + +bool QAbstractButton_virtualbase_Event(void* self, QEvent* e) { + return ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_Event(e); +} + +void QAbstractButton_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__KeyPressEvent = slot; +} + +void QAbstractButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_KeyPressEvent(e); +} + +void QAbstractButton_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QAbstractButton_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_KeyReleaseEvent(e); +} + +void QAbstractButton_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__MousePressEvent = slot; +} + +void QAbstractButton_virtualbase_MousePressEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_MousePressEvent(e); +} + +void QAbstractButton_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QAbstractButton_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_MouseReleaseEvent(e); +} + +void QAbstractButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__MouseMoveEvent = slot; +} + +void QAbstractButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_MouseMoveEvent(e); +} + +void QAbstractButton_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__FocusInEvent = slot; +} + +void QAbstractButton_virtualbase_FocusInEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_FocusInEvent(e); +} + +void QAbstractButton_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__FocusOutEvent = slot; +} + +void QAbstractButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_FocusOutEvent(e); +} + +void QAbstractButton_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__ChangeEvent = slot; +} + +void QAbstractButton_virtualbase_ChangeEvent(void* self, QEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_ChangeEvent(e); +} + +void QAbstractButton_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractButton_virtualbase_TimerEvent(void* self, QTimerEvent* e) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_TimerEvent(e); +} + +void QAbstractButton_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__DevType = slot; +} + +int QAbstractButton_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_DevType(); +} + +void QAbstractButton_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__SetVisible = slot; +} + +void QAbstractButton_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_SetVisible(visible); +} + +void QAbstractButton_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__SizeHint = slot; +} + +QSize* QAbstractButton_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_SizeHint(); +} + +void QAbstractButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QAbstractButton_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QAbstractButton_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__HeightForWidth = slot; +} + +int QAbstractButton_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QAbstractButton_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QAbstractButton_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QAbstractButton_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QAbstractButton_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_PaintEngine(); +} + +void QAbstractButton_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QAbstractButton_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QAbstractButton_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__WheelEvent = slot; +} + +void QAbstractButton_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_WheelEvent(event); +} + +void QAbstractButton_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__EnterEvent = slot; +} + +void QAbstractButton_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_EnterEvent(event); +} + +void QAbstractButton_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__LeaveEvent = slot; +} + +void QAbstractButton_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_LeaveEvent(event); +} + +void QAbstractButton_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__MoveEvent = slot; +} + +void QAbstractButton_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_MoveEvent(event); +} + +void QAbstractButton_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__ResizeEvent = slot; +} + +void QAbstractButton_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_ResizeEvent(event); +} + +void QAbstractButton_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__CloseEvent = slot; +} + +void QAbstractButton_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_CloseEvent(event); +} + +void QAbstractButton_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__ContextMenuEvent = slot; +} + +void QAbstractButton_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QAbstractButton_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__TabletEvent = slot; +} + +void QAbstractButton_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_TabletEvent(event); +} + +void QAbstractButton_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__ActionEvent = slot; +} + +void QAbstractButton_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_ActionEvent(event); +} + +void QAbstractButton_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__DragEnterEvent = slot; +} + +void QAbstractButton_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QAbstractButton_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__DragMoveEvent = slot; +} + +void QAbstractButton_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QAbstractButton_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__DragLeaveEvent = slot; +} + +void QAbstractButton_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QAbstractButton_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__DropEvent = slot; +} + +void QAbstractButton_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_DropEvent(event); +} + +void QAbstractButton_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__ShowEvent = slot; +} + +void QAbstractButton_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_ShowEvent(event); +} + +void QAbstractButton_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__HideEvent = slot; +} + +void QAbstractButton_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_HideEvent(event); +} + +void QAbstractButton_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__NativeEvent = slot; +} + +bool QAbstractButton_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QAbstractButton_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__Metric = slot; +} + +int QAbstractButton_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_Metric(param1); +} + +void QAbstractButton_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__InitPainter = slot; +} + +void QAbstractButton_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_InitPainter(painter); +} + +void QAbstractButton_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QAbstractButton_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_Redirected(offset); +} + +void QAbstractButton_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QAbstractButton_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_SharedPainter(); +} + +void QAbstractButton_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__InputMethodEvent = slot; +} + +void QAbstractButton_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QAbstractButton_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QAbstractButton_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQAbstractButton*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QAbstractButton_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QAbstractButton*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QAbstractButton_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQAbstractButton*)(self) )->virtualbase_FocusNextPrevChild(next); +} + void QAbstractButton_Delete(QAbstractButton* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qabstractbutton.go b/qt6/gen_qabstractbutton.go index 8fb9f799..72222f9f 100644 --- a/qt6/gen_qabstractbutton.go +++ b/qt6/gen_qabstractbutton.go @@ -53,6 +53,32 @@ func UnsafeNewQAbstractButton(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObj QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} } +// NewQAbstractButton constructs a new QAbstractButton object. +func NewQAbstractButton(parent *QWidget) *QAbstractButton { + 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.QAbstractButton_new(parent.cPointer(), &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractButton(outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQAbstractButton2 constructs a new QAbstractButton object. +func NewQAbstractButton2() *QAbstractButton { + 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.QAbstractButton_new2(&outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractButton(outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + func (this *QAbstractButton) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractButton_MetaObject(this.h))) } @@ -305,6 +331,1055 @@ func miqt_exec_callback_QAbstractButton_Clicked1(cb C.intptr_t, checked C.bool) gofunc(slotval1) } +func (this *QAbstractButton) OnPaintEvent(slot func(e *QPaintEvent)) { + C.QAbstractButton_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_PaintEvent +func miqt_exec_callback_QAbstractButton_PaintEvent(self *C.QAbstractButton, cb C.intptr_t, e *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_HitButton(pos *QPoint) bool { + + return (bool)(C.QAbstractButton_virtualbase_HitButton(unsafe.Pointer(this.h), pos.cPointer())) + +} +func (this *QAbstractButton) OnHitButton(slot func(super func(pos *QPoint) bool, pos *QPoint) bool) { + C.QAbstractButton_override_virtual_HitButton(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_HitButton +func miqt_exec_callback_QAbstractButton_HitButton(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_HitButton, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractButton) callVirtualBase_CheckStateSet() { + + C.QAbstractButton_virtualbase_CheckStateSet(unsafe.Pointer(this.h)) + +} +func (this *QAbstractButton) OnCheckStateSet(slot func(super func())) { + C.QAbstractButton_override_virtual_CheckStateSet(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_CheckStateSet +func miqt_exec_callback_QAbstractButton_CheckStateSet(self *C.QAbstractButton, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractButton{h: self}).callVirtualBase_CheckStateSet) + +} + +func (this *QAbstractButton) callVirtualBase_NextCheckState() { + + C.QAbstractButton_virtualbase_NextCheckState(unsafe.Pointer(this.h)) + +} +func (this *QAbstractButton) OnNextCheckState(slot func(super func())) { + C.QAbstractButton_override_virtual_NextCheckState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_NextCheckState +func miqt_exec_callback_QAbstractButton_NextCheckState(self *C.QAbstractButton, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractButton{h: self}).callVirtualBase_NextCheckState) + +} + +func (this *QAbstractButton) callVirtualBase_Event(e *QEvent) bool { + + return (bool)(C.QAbstractButton_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer())) + +} +func (this *QAbstractButton) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) { + C.QAbstractButton_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_Event +func miqt_exec_callback_QAbstractButton_Event(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractButton) callVirtualBase_KeyPressEvent(e *QKeyEvent) { + + C.QAbstractButton_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnKeyPressEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QAbstractButton_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_KeyPressEvent +func miqt_exec_callback_QAbstractButton_KeyPressEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_KeyReleaseEvent(e *QKeyEvent) { + + C.QAbstractButton_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnKeyReleaseEvent(slot func(super func(e *QKeyEvent), e *QKeyEvent)) { + C.QAbstractButton_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_KeyReleaseEvent +func miqt_exec_callback_QAbstractButton_KeyReleaseEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_MousePressEvent(e *QMouseEvent) { + + C.QAbstractButton_virtualbase_MousePressEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnMousePressEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QAbstractButton_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_MousePressEvent +func miqt_exec_callback_QAbstractButton_MousePressEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_MouseReleaseEvent(e *QMouseEvent) { + + C.QAbstractButton_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnMouseReleaseEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QAbstractButton_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_MouseReleaseEvent +func miqt_exec_callback_QAbstractButton_MouseReleaseEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_MouseMoveEvent(e *QMouseEvent) { + + C.QAbstractButton_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnMouseMoveEvent(slot func(super func(e *QMouseEvent), e *QMouseEvent)) { + C.QAbstractButton_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_MouseMoveEvent +func miqt_exec_callback_QAbstractButton_MouseMoveEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_FocusInEvent(e *QFocusEvent) { + + C.QAbstractButton_virtualbase_FocusInEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnFocusInEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QAbstractButton_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_FocusInEvent +func miqt_exec_callback_QAbstractButton_FocusInEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_FocusOutEvent(e *QFocusEvent) { + + C.QAbstractButton_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnFocusOutEvent(slot func(super func(e *QFocusEvent), e *QFocusEvent)) { + C.QAbstractButton_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_FocusOutEvent +func miqt_exec_callback_QAbstractButton_FocusOutEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_ChangeEvent(e *QEvent) { + + C.QAbstractButton_virtualbase_ChangeEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnChangeEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QAbstractButton_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_ChangeEvent +func miqt_exec_callback_QAbstractButton_ChangeEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_TimerEvent(e *QTimerEvent) { + + C.QAbstractButton_virtualbase_TimerEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QAbstractButton) OnTimerEvent(slot func(super func(e *QTimerEvent), e *QTimerEvent)) { + C.QAbstractButton_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_TimerEvent +func miqt_exec_callback_QAbstractButton_TimerEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_DevType() int { + + return (int)(C.QAbstractButton_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QAbstractButton) OnDevType(slot func(super func() int) int) { + C.QAbstractButton_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_DevType +func miqt_exec_callback_QAbstractButton_DevType(self *C.QAbstractButton, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractButton{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractButton) callVirtualBase_SetVisible(visible bool) { + + C.QAbstractButton_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QAbstractButton) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QAbstractButton_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_SetVisible +func miqt_exec_callback_QAbstractButton_SetVisible(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_SizeHint() *QSize { + + _ret := C.QAbstractButton_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 *QAbstractButton) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractButton_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_SizeHint +func miqt_exec_callback_QAbstractButton_SizeHint(self *C.QAbstractButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractButton{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractButton) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QAbstractButton_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 *QAbstractButton) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractButton_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_MinimumSizeHint +func miqt_exec_callback_QAbstractButton_MinimumSizeHint(self *C.QAbstractButton, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractButton{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractButton) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QAbstractButton_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QAbstractButton) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QAbstractButton_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_HeightForWidth +func miqt_exec_callback_QAbstractButton_HeightForWidth(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractButton) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QAbstractButton_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QAbstractButton) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QAbstractButton_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_HasHeightForWidth +func miqt_exec_callback_QAbstractButton_HasHeightForWidth(self *C.QAbstractButton, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractButton{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractButton) callVirtualBase_PaintEngine() *QPaintEngine { + + return UnsafeNewQPaintEngine(unsafe.Pointer(C.QAbstractButton_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QAbstractButton) OnPaintEngine(slot func(super func() *QPaintEngine) *QPaintEngine) { + C.QAbstractButton_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_PaintEngine +func miqt_exec_callback_QAbstractButton_PaintEngine(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_PaintEngine) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractButton) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QAbstractButton_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractButton_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_MouseDoubleClickEvent +func miqt_exec_callback_QAbstractButton_MouseDoubleClickEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_WheelEvent(event *QWheelEvent) { + + C.QAbstractButton_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnWheelEvent(slot func(super func(event *QWheelEvent), event *QWheelEvent)) { + C.QAbstractButton_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_WheelEvent +func miqt_exec_callback_QAbstractButton_WheelEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_EnterEvent(event *QEnterEvent) { + + C.QAbstractButton_virtualbase_EnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnEnterEvent(slot func(super func(event *QEnterEvent), event *QEnterEvent)) { + C.QAbstractButton_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_EnterEvent +func miqt_exec_callback_QAbstractButton_EnterEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_LeaveEvent(event *QEvent) { + + C.QAbstractButton_virtualbase_LeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnLeaveEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractButton_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_LeaveEvent +func miqt_exec_callback_QAbstractButton_LeaveEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_MoveEvent(event *QMoveEvent) { + + C.QAbstractButton_virtualbase_MoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnMoveEvent(slot func(super func(event *QMoveEvent), event *QMoveEvent)) { + C.QAbstractButton_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_MoveEvent +func miqt_exec_callback_QAbstractButton_MoveEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QAbstractButton_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QAbstractButton_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_ResizeEvent +func miqt_exec_callback_QAbstractButton_ResizeEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_CloseEvent(event *QCloseEvent) { + + C.QAbstractButton_virtualbase_CloseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnCloseEvent(slot func(super func(event *QCloseEvent), event *QCloseEvent)) { + C.QAbstractButton_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_CloseEvent +func miqt_exec_callback_QAbstractButton_CloseEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_ContextMenuEvent(event *QContextMenuEvent) { + + C.QAbstractButton_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnContextMenuEvent(slot func(super func(event *QContextMenuEvent), event *QContextMenuEvent)) { + C.QAbstractButton_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_ContextMenuEvent +func miqt_exec_callback_QAbstractButton_ContextMenuEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_TabletEvent(event *QTabletEvent) { + + C.QAbstractButton_virtualbase_TabletEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnTabletEvent(slot func(super func(event *QTabletEvent), event *QTabletEvent)) { + C.QAbstractButton_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_TabletEvent +func miqt_exec_callback_QAbstractButton_TabletEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_ActionEvent(event *QActionEvent) { + + C.QAbstractButton_virtualbase_ActionEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnActionEvent(slot func(super func(event *QActionEvent), event *QActionEvent)) { + C.QAbstractButton_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_ActionEvent +func miqt_exec_callback_QAbstractButton_ActionEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QAbstractButton_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QAbstractButton_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_DragEnterEvent +func miqt_exec_callback_QAbstractButton_DragEnterEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QAbstractButton_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QAbstractButton_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_DragMoveEvent +func miqt_exec_callback_QAbstractButton_DragMoveEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QAbstractButton_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QAbstractButton_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_DragLeaveEvent +func miqt_exec_callback_QAbstractButton_DragLeaveEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QAbstractButton_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QAbstractButton_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_DropEvent +func miqt_exec_callback_QAbstractButton_DropEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_ShowEvent(event *QShowEvent) { + + C.QAbstractButton_virtualbase_ShowEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnShowEvent(slot func(super func(event *QShowEvent), event *QShowEvent)) { + C.QAbstractButton_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_ShowEvent +func miqt_exec_callback_QAbstractButton_ShowEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_HideEvent(event *QHideEvent) { + + C.QAbstractButton_virtualbase_HideEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractButton) OnHideEvent(slot func(super func(event *QHideEvent), event *QHideEvent)) { + C.QAbstractButton_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_HideEvent +func miqt_exec_callback_QAbstractButton_HideEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QAbstractButton) 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.QAbstractButton_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QAbstractButton) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QAbstractButton_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_NativeEvent +func miqt_exec_callback_QAbstractButton_NativeEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractButton) callVirtualBase_Metric(param1 QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QAbstractButton_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QAbstractButton) OnMetric(slot func(super func(param1 QPaintDevice__PaintDeviceMetric) int, param1 QPaintDevice__PaintDeviceMetric) int) { + C.QAbstractButton_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_Metric +func miqt_exec_callback_QAbstractButton_Metric(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractButton) callVirtualBase_InitPainter(painter *QPainter) { + + C.QAbstractButton_virtualbase_InitPainter(unsafe.Pointer(this.h), painter.cPointer()) + +} +func (this *QAbstractButton) OnInitPainter(slot func(super func(painter *QPainter), painter *QPainter)) { + C.QAbstractButton_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_InitPainter +func miqt_exec_callback_QAbstractButton_InitPainter(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_Redirected(offset *QPoint) *QPaintDevice { + + return UnsafeNewQPaintDevice(unsafe.Pointer(C.QAbstractButton_virtualbase_Redirected(unsafe.Pointer(this.h), offset.cPointer()))) +} +func (this *QAbstractButton) OnRedirected(slot func(super func(offset *QPoint) *QPaintDevice, offset *QPoint) *QPaintDevice) { + C.QAbstractButton_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_Redirected +func miqt_exec_callback_QAbstractButton_Redirected(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_Redirected, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractButton) callVirtualBase_SharedPainter() *QPainter { + + return UnsafeNewQPainter(unsafe.Pointer(C.QAbstractButton_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QAbstractButton) OnSharedPainter(slot func(super func() *QPainter) *QPainter) { + C.QAbstractButton_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_SharedPainter +func miqt_exec_callback_QAbstractButton_SharedPainter(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_SharedPainter) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractButton) callVirtualBase_InputMethodEvent(param1 *QInputMethodEvent) { + + C.QAbstractButton_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractButton) OnInputMethodEvent(slot func(super func(param1 *QInputMethodEvent), param1 *QInputMethodEvent)) { + C.QAbstractButton_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_InputMethodEvent +func miqt_exec_callback_QAbstractButton_InputMethodEvent(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QAbstractButton) callVirtualBase_InputMethodQuery(param1 InputMethodQuery) *QVariant { + + _ret := C.QAbstractButton_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 *QAbstractButton) OnInputMethodQuery(slot func(super func(param1 InputMethodQuery) *QVariant, param1 InputMethodQuery) *QVariant) { + C.QAbstractButton_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_InputMethodQuery +func miqt_exec_callback_QAbstractButton_InputMethodQuery(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractButton) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QAbstractButton_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QAbstractButton) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QAbstractButton_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractButton_FocusNextPrevChild +func miqt_exec_callback_QAbstractButton_FocusNextPrevChild(self *C.QAbstractButton, 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((&QAbstractButton{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + // Delete this object from C++ memory. func (this *QAbstractButton) Delete() { C.QAbstractButton_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qabstractbutton.h b/qt6/gen_qabstractbutton.h index 03295d86..146e8d1d 100644 --- a/qt6/gen_qabstractbutton.h +++ b/qt6/gen_qabstractbutton.h @@ -16,40 +16,80 @@ extern "C" { #ifdef __cplusplus class QAbstractButton; +class QActionEvent; class QButtonGroup; +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 QKeySequence; 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 QAbstractButton QAbstractButton; +typedef struct QActionEvent QActionEvent; typedef struct QButtonGroup QButtonGroup; +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 QKeySequence QKeySequence; 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 +void QAbstractButton_new(QWidget* parent, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QAbstractButton_new2(QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QAbstractButton_MetaObject(const QAbstractButton* self); void* QAbstractButton_Metacast(QAbstractButton* self, const char* param1); struct miqt_string QAbstractButton_Tr(const char* s); @@ -105,6 +145,96 @@ 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_override_virtual_PaintEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_PaintEvent(void* self, QPaintEvent* e); +void QAbstractButton_override_virtual_HitButton(void* self, intptr_t slot); +bool QAbstractButton_virtualbase_HitButton(const void* self, QPoint* pos); +void QAbstractButton_override_virtual_CheckStateSet(void* self, intptr_t slot); +void QAbstractButton_virtualbase_CheckStateSet(void* self); +void QAbstractButton_override_virtual_NextCheckState(void* self, intptr_t slot); +void QAbstractButton_virtualbase_NextCheckState(void* self); +void QAbstractButton_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractButton_virtualbase_Event(void* self, QEvent* e); +void QAbstractButton_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_KeyPressEvent(void* self, QKeyEvent* e); +void QAbstractButton_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* e); +void QAbstractButton_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_MousePressEvent(void* self, QMouseEvent* e); +void QAbstractButton_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* e); +void QAbstractButton_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_MouseMoveEvent(void* self, QMouseEvent* e); +void QAbstractButton_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_FocusInEvent(void* self, QFocusEvent* e); +void QAbstractButton_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_FocusOutEvent(void* self, QFocusEvent* e); +void QAbstractButton_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_ChangeEvent(void* self, QEvent* e); +void QAbstractButton_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_TimerEvent(void* self, QTimerEvent* e); +void QAbstractButton_override_virtual_DevType(void* self, intptr_t slot); +int QAbstractButton_virtualbase_DevType(const void* self); +void QAbstractButton_override_virtual_SetVisible(void* self, intptr_t slot); +void QAbstractButton_virtualbase_SetVisible(void* self, bool visible); +void QAbstractButton_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QAbstractButton_virtualbase_SizeHint(const void* self); +void QAbstractButton_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QAbstractButton_virtualbase_MinimumSizeHint(const void* self); +void QAbstractButton_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QAbstractButton_virtualbase_HeightForWidth(const void* self, int param1); +void QAbstractButton_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QAbstractButton_virtualbase_HasHeightForWidth(const void* self); +void QAbstractButton_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QAbstractButton_virtualbase_PaintEngine(const void* self); +void QAbstractButton_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QAbstractButton_override_virtual_WheelEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QAbstractButton_override_virtual_EnterEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QAbstractButton_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_LeaveEvent(void* self, QEvent* event); +void QAbstractButton_override_virtual_MoveEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QAbstractButton_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QAbstractButton_override_virtual_CloseEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QAbstractButton_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QAbstractButton_override_virtual_TabletEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QAbstractButton_override_virtual_ActionEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QAbstractButton_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QAbstractButton_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QAbstractButton_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QAbstractButton_override_virtual_DropEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_DropEvent(void* self, QDropEvent* event); +void QAbstractButton_override_virtual_ShowEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QAbstractButton_override_virtual_HideEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_HideEvent(void* self, QHideEvent* event); +void QAbstractButton_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QAbstractButton_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QAbstractButton_override_virtual_Metric(void* self, intptr_t slot); +int QAbstractButton_virtualbase_Metric(const void* self, int param1); +void QAbstractButton_override_virtual_InitPainter(void* self, intptr_t slot); +void QAbstractButton_virtualbase_InitPainter(const void* self, QPainter* painter); +void QAbstractButton_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QAbstractButton_virtualbase_Redirected(const void* self, QPoint* offset); +void QAbstractButton_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QAbstractButton_virtualbase_SharedPainter(const void* self); +void QAbstractButton_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QAbstractButton_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QAbstractButton_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QAbstractButton_virtualbase_InputMethodQuery(const void* self, int param1); +void QAbstractButton_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QAbstractButton_virtualbase_FocusNextPrevChild(void* self, bool next); void QAbstractButton_Delete(QAbstractButton* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qabstracteventdispatcher.cpp b/qt6/gen_qabstracteventdispatcher.cpp index 86e8893c..ec40b5a8 100644 --- a/qt6/gen_qabstracteventdispatcher.cpp +++ b/qt6/gen_qabstracteventdispatcher.cpp @@ -2,7 +2,10 @@ #define WORKAROUND_INNER_CLASS_DEFINITION_QAbstractEventDispatcher__TimerInfo #include #include +#include +#include #include +#include #include #include #include @@ -10,10 +13,420 @@ #include #include #include +#include #include #include "gen_qabstracteventdispatcher.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractEventDispatcher : public virtual QAbstractEventDispatcher { +public: + + MiqtVirtualQAbstractEventDispatcher(): QAbstractEventDispatcher() {}; + MiqtVirtualQAbstractEventDispatcher(QObject* parent): QAbstractEventDispatcher(parent) {}; + + virtual ~MiqtVirtualQAbstractEventDispatcher() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ProcessEvents = 0; + + // Subclass to allow providing a Go implementation + virtual bool processEvents(QEventLoop::ProcessEventsFlags flags) override { + if (handle__ProcessEvents == 0) { + return false; // Pure virtual, there is no base we can call + } + + QEventLoop::ProcessEventsFlags flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_ProcessEvents(this, handle__ProcessEvents, sigval1); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RegisterSocketNotifier = 0; + + // Subclass to allow providing a Go implementation + virtual void registerSocketNotifier(QSocketNotifier* notifier) override { + if (handle__RegisterSocketNotifier == 0) { + return; // Pure virtual, there is no base we can call + } + + QSocketNotifier* sigval1 = notifier; + + miqt_exec_callback_QAbstractEventDispatcher_RegisterSocketNotifier(this, handle__RegisterSocketNotifier, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UnregisterSocketNotifier = 0; + + // Subclass to allow providing a Go implementation + virtual void unregisterSocketNotifier(QSocketNotifier* notifier) override { + if (handle__UnregisterSocketNotifier == 0) { + return; // Pure virtual, there is no base we can call + } + + QSocketNotifier* sigval1 = notifier; + + miqt_exec_callback_QAbstractEventDispatcher_UnregisterSocketNotifier(this, handle__UnregisterSocketNotifier, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RegisterTimer2 = 0; + + // Subclass to allow providing a Go implementation + virtual void registerTimer(int timerId, qint64 interval, Qt::TimerType timerType, QObject* object) override { + if (handle__RegisterTimer2 == 0) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = timerId; + qint64 interval_ret = interval; + long long sigval2 = static_cast(interval_ret); + Qt::TimerType timerType_ret = timerType; + int sigval3 = static_cast(timerType_ret); + QObject* sigval4 = object; + + miqt_exec_callback_QAbstractEventDispatcher_RegisterTimer2(this, handle__RegisterTimer2, sigval1, sigval2, sigval3, sigval4); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UnregisterTimer = 0; + + // Subclass to allow providing a Go implementation + virtual bool unregisterTimer(int timerId) override { + if (handle__UnregisterTimer == 0) { + return false; // Pure virtual, there is no base we can call + } + + int sigval1 = timerId; + + bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimer(this, handle__UnregisterTimer, sigval1); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UnregisterTimers = 0; + + // Subclass to allow providing a Go implementation + virtual bool unregisterTimers(QObject* object) override { + if (handle__UnregisterTimers == 0) { + return false; // Pure virtual, there is no base we can call + } + + QObject* sigval1 = object; + + bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimers(this, handle__UnregisterTimers, sigval1); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RegisteredTimers = 0; + + // Subclass to allow providing a Go implementation + virtual QList registeredTimers(QObject* object) const override { + if (handle__RegisteredTimers == 0) { + return QList(); // Pure virtual, there is no base we can call + } + + QObject* sigval1 = object; + + struct miqt_array /* of QAbstractEventDispatcher__TimerInfo* */ callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_RegisteredTimers(const_cast(this), handle__RegisteredTimers, sigval1); + QList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QAbstractEventDispatcher__TimerInfo** 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; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__RemainingTime = 0; + + // Subclass to allow providing a Go implementation + virtual int remainingTime(int timerId) override { + if (handle__RemainingTime == 0) { + return 0; // Pure virtual, there is no base we can call + } + + int sigval1 = timerId; + + int callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_RemainingTime(this, handle__RemainingTime, sigval1); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WakeUp = 0; + + // Subclass to allow providing a Go implementation + virtual void wakeUp() override { + if (handle__WakeUp == 0) { + return; // Pure virtual, there is no base we can call + } + + + miqt_exec_callback_QAbstractEventDispatcher_WakeUp(this, handle__WakeUp); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Interrupt = 0; + + // Subclass to allow providing a Go implementation + virtual void interrupt() override { + if (handle__Interrupt == 0) { + return; // Pure virtual, there is no base we can call + } + + + miqt_exec_callback_QAbstractEventDispatcher_Interrupt(this, handle__Interrupt); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StartingUp = 0; + + // Subclass to allow providing a Go implementation + virtual void startingUp() override { + if (handle__StartingUp == 0) { + QAbstractEventDispatcher::startingUp(); + return; + } + + + miqt_exec_callback_QAbstractEventDispatcher_StartingUp(this, handle__StartingUp); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartingUp() { + + QAbstractEventDispatcher::startingUp(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ClosingDown = 0; + + // Subclass to allow providing a Go implementation + virtual void closingDown() override { + if (handle__ClosingDown == 0) { + QAbstractEventDispatcher::closingDown(); + return; + } + + + miqt_exec_callback_QAbstractEventDispatcher_ClosingDown(this, handle__ClosingDown); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ClosingDown() { + + QAbstractEventDispatcher::closingDown(); + + } + + // 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 QAbstractEventDispatcher::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAbstractEventDispatcher::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 QAbstractEventDispatcher::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAbstractEventDispatcher::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) { + QAbstractEventDispatcher::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractEventDispatcher_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractEventDispatcher::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) { + QAbstractEventDispatcher::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAbstractEventDispatcher_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAbstractEventDispatcher::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) { + QAbstractEventDispatcher::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractEventDispatcher_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAbstractEventDispatcher::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) { + QAbstractEventDispatcher::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractEventDispatcher_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAbstractEventDispatcher::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) { + QAbstractEventDispatcher::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractEventDispatcher_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAbstractEventDispatcher::disconnectNotify(*signal); + + } + +}; + +void QAbstractEventDispatcher_new(QAbstractEventDispatcher** outptr_QAbstractEventDispatcher, QObject** outptr_QObject) { + MiqtVirtualQAbstractEventDispatcher* ret = new MiqtVirtualQAbstractEventDispatcher(); + *outptr_QAbstractEventDispatcher = ret; + *outptr_QObject = static_cast(ret); +} + +void QAbstractEventDispatcher_new2(QObject* parent, QAbstractEventDispatcher** outptr_QAbstractEventDispatcher, QObject** outptr_QObject) { + MiqtVirtualQAbstractEventDispatcher* ret = new MiqtVirtualQAbstractEventDispatcher(parent); + *outptr_QAbstractEventDispatcher = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractEventDispatcher_MetaObject(const QAbstractEventDispatcher* self) { return (QMetaObject*) self->metaObject(); } @@ -116,7 +529,7 @@ void QAbstractEventDispatcher_AboutToBlock(QAbstractEventDispatcher* self) { } void QAbstractEventDispatcher_connect_AboutToBlock(QAbstractEventDispatcher* self, intptr_t slot) { - QAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::aboutToBlock), self, [=]() { + MiqtVirtualQAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::aboutToBlock), self, [=]() { miqt_exec_callback_QAbstractEventDispatcher_AboutToBlock(slot); }); } @@ -126,7 +539,7 @@ void QAbstractEventDispatcher_Awake(QAbstractEventDispatcher* self) { } void QAbstractEventDispatcher_connect_Awake(QAbstractEventDispatcher* self, intptr_t slot) { - QAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::awake), self, [=]() { + MiqtVirtualQAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::awake), self, [=]() { miqt_exec_callback_QAbstractEventDispatcher_Awake(slot); }); } @@ -157,9 +570,121 @@ QAbstractEventDispatcher* QAbstractEventDispatcher_Instance1(QThread* thread) { return QAbstractEventDispatcher::instance(thread); } +void QAbstractEventDispatcher_override_virtual_ProcessEvents(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__ProcessEvents = slot; +} + +void QAbstractEventDispatcher_override_virtual_RegisterSocketNotifier(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__RegisterSocketNotifier = slot; +} + +void QAbstractEventDispatcher_override_virtual_UnregisterSocketNotifier(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__UnregisterSocketNotifier = slot; +} + +void QAbstractEventDispatcher_override_virtual_RegisterTimer2(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__RegisterTimer2 = slot; +} + +void QAbstractEventDispatcher_override_virtual_UnregisterTimer(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__UnregisterTimer = slot; +} + +void QAbstractEventDispatcher_override_virtual_UnregisterTimers(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__UnregisterTimers = slot; +} + +void QAbstractEventDispatcher_override_virtual_RegisteredTimers(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__RegisteredTimers = slot; +} + +void QAbstractEventDispatcher_override_virtual_RemainingTime(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__RemainingTime = slot; +} + +void QAbstractEventDispatcher_override_virtual_WakeUp(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__WakeUp = slot; +} + +void QAbstractEventDispatcher_override_virtual_Interrupt(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__Interrupt = slot; +} + +void QAbstractEventDispatcher_override_virtual_StartingUp(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__StartingUp = slot; +} + +void QAbstractEventDispatcher_virtualbase_StartingUp(void* self) { + ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_StartingUp(); +} + +void QAbstractEventDispatcher_override_virtual_ClosingDown(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__ClosingDown = slot; +} + +void QAbstractEventDispatcher_virtualbase_ClosingDown(void* self) { + ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_ClosingDown(); +} + +void QAbstractEventDispatcher_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__Event = slot; +} + +bool QAbstractEventDispatcher_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_Event(event); +} + +void QAbstractEventDispatcher_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractEventDispatcher_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAbstractEventDispatcher_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractEventDispatcher_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractEventDispatcher_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__ChildEvent = slot; +} + +void QAbstractEventDispatcher_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_ChildEvent(event); +} + +void QAbstractEventDispatcher_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__CustomEvent = slot; +} + +void QAbstractEventDispatcher_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_CustomEvent(event); +} + +void QAbstractEventDispatcher_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__ConnectNotify = slot; +} + +void QAbstractEventDispatcher_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAbstractEventDispatcher_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__DisconnectNotify = slot; +} + +void QAbstractEventDispatcher_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qabstracteventdispatcher.go b/qt6/gen_qabstracteventdispatcher.go index 2b19cfd9..e4f6d85d 100644 --- a/qt6/gen_qabstracteventdispatcher.go +++ b/qt6/gen_qabstracteventdispatcher.go @@ -53,6 +53,28 @@ func UnsafeNewQAbstractEventDispatcher(h unsafe.Pointer, h_QObject unsafe.Pointe QObject: UnsafeNewQObject(h_QObject)} } +// NewQAbstractEventDispatcher constructs a new QAbstractEventDispatcher object. +func NewQAbstractEventDispatcher() *QAbstractEventDispatcher { + var outptr_QAbstractEventDispatcher *C.QAbstractEventDispatcher = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractEventDispatcher_new(&outptr_QAbstractEventDispatcher, &outptr_QObject) + ret := newQAbstractEventDispatcher(outptr_QAbstractEventDispatcher, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractEventDispatcher2 constructs a new QAbstractEventDispatcher object. +func NewQAbstractEventDispatcher2(parent *QObject) *QAbstractEventDispatcher { + var outptr_QAbstractEventDispatcher *C.QAbstractEventDispatcher = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractEventDispatcher_new2(parent.cPointer(), &outptr_QAbstractEventDispatcher, &outptr_QObject) + ret := newQAbstractEventDispatcher(outptr_QAbstractEventDispatcher, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractEventDispatcher) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractEventDispatcher_MetaObject(this.h))) } @@ -211,6 +233,398 @@ 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())), nil) } +func (this *QAbstractEventDispatcher) OnProcessEvents(slot func(flags QEventLoop__ProcessEventsFlag) bool) { + C.QAbstractEventDispatcher_override_virtual_ProcessEvents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_ProcessEvents +func miqt_exec_callback_QAbstractEventDispatcher_ProcessEvents(self *C.QAbstractEventDispatcher, cb C.intptr_t, flags C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(flags QEventLoop__ProcessEventsFlag) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QEventLoop__ProcessEventsFlag)(flags) + + virtualReturn := gofunc(slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QAbstractEventDispatcher) OnRegisterSocketNotifier(slot func(notifier *QSocketNotifier)) { + C.QAbstractEventDispatcher_override_virtual_RegisterSocketNotifier(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_RegisterSocketNotifier +func miqt_exec_callback_QAbstractEventDispatcher_RegisterSocketNotifier(self *C.QAbstractEventDispatcher, cb C.intptr_t, notifier *C.QSocketNotifier) { + gofunc, ok := cgo.Handle(cb).Value().(func(notifier *QSocketNotifier)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQSocketNotifier(unsafe.Pointer(notifier), nil) + + gofunc(slotval1) + +} +func (this *QAbstractEventDispatcher) OnUnregisterSocketNotifier(slot func(notifier *QSocketNotifier)) { + C.QAbstractEventDispatcher_override_virtual_UnregisterSocketNotifier(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_UnregisterSocketNotifier +func miqt_exec_callback_QAbstractEventDispatcher_UnregisterSocketNotifier(self *C.QAbstractEventDispatcher, cb C.intptr_t, notifier *C.QSocketNotifier) { + gofunc, ok := cgo.Handle(cb).Value().(func(notifier *QSocketNotifier)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQSocketNotifier(unsafe.Pointer(notifier), nil) + + gofunc(slotval1) + +} +func (this *QAbstractEventDispatcher) OnRegisterTimer2(slot func(timerId int, interval int64, timerType TimerType, object *QObject)) { + C.QAbstractEventDispatcher_override_virtual_RegisterTimer2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_RegisterTimer2 +func miqt_exec_callback_QAbstractEventDispatcher_RegisterTimer2(self *C.QAbstractEventDispatcher, cb C.intptr_t, timerId C.int, interval C.longlong, timerType C.int, object *C.QObject) { + gofunc, ok := cgo.Handle(cb).Value().(func(timerId int, interval int64, timerType TimerType, object *QObject)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(timerId) + + slotval2 := (int64)(interval) + + slotval3 := (TimerType)(timerType) + + slotval4 := UnsafeNewQObject(unsafe.Pointer(object)) + + gofunc(slotval1, slotval2, slotval3, slotval4) + +} +func (this *QAbstractEventDispatcher) OnUnregisterTimer(slot func(timerId int) bool) { + C.QAbstractEventDispatcher_override_virtual_UnregisterTimer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimer +func miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimer(self *C.QAbstractEventDispatcher, cb C.intptr_t, timerId C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(timerId int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(timerId) + + virtualReturn := gofunc(slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QAbstractEventDispatcher) OnUnregisterTimers(slot func(object *QObject) bool) { + C.QAbstractEventDispatcher_override_virtual_UnregisterTimers(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimers +func miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimers(self *C.QAbstractEventDispatcher, cb C.intptr_t, object *C.QObject) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(object *QObject) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + + virtualReturn := gofunc(slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QAbstractEventDispatcher) OnRegisteredTimers(slot func(object *QObject) []QAbstractEventDispatcher__TimerInfo) { + C.QAbstractEventDispatcher_override_virtual_RegisteredTimers(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_RegisteredTimers +func miqt_exec_callback_QAbstractEventDispatcher_RegisteredTimers(self *C.QAbstractEventDispatcher, cb C.intptr_t, object *C.QObject) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(object *QObject) []QAbstractEventDispatcher__TimerInfo) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) + + virtualReturn := gofunc(slotval1) + virtualReturn_CArray := (*[0xffff]*C.QAbstractEventDispatcher__TimerInfo)(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 *QAbstractEventDispatcher) OnRemainingTime(slot func(timerId int) int) { + C.QAbstractEventDispatcher_override_virtual_RemainingTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_RemainingTime +func miqt_exec_callback_QAbstractEventDispatcher_RemainingTime(self *C.QAbstractEventDispatcher, cb C.intptr_t, timerId C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(timerId int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(timerId) + + virtualReturn := gofunc(slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractEventDispatcher) OnWakeUp(slot func()) { + C.QAbstractEventDispatcher_override_virtual_WakeUp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_WakeUp +func miqt_exec_callback_QAbstractEventDispatcher_WakeUp(self *C.QAbstractEventDispatcher, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() + +} +func (this *QAbstractEventDispatcher) OnInterrupt(slot func()) { + C.QAbstractEventDispatcher_override_virtual_Interrupt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_Interrupt +func miqt_exec_callback_QAbstractEventDispatcher_Interrupt(self *C.QAbstractEventDispatcher, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_StartingUp() { + + C.QAbstractEventDispatcher_virtualbase_StartingUp(unsafe.Pointer(this.h)) + +} +func (this *QAbstractEventDispatcher) OnStartingUp(slot func(super func())) { + C.QAbstractEventDispatcher_override_virtual_StartingUp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_StartingUp +func miqt_exec_callback_QAbstractEventDispatcher_StartingUp(self *C.QAbstractEventDispatcher, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractEventDispatcher{h: self}).callVirtualBase_StartingUp) + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_ClosingDown() { + + C.QAbstractEventDispatcher_virtualbase_ClosingDown(unsafe.Pointer(this.h)) + +} +func (this *QAbstractEventDispatcher) OnClosingDown(slot func(super func())) { + C.QAbstractEventDispatcher_override_virtual_ClosingDown(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_ClosingDown +func miqt_exec_callback_QAbstractEventDispatcher_ClosingDown(self *C.QAbstractEventDispatcher, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractEventDispatcher{h: self}).callVirtualBase_ClosingDown) + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAbstractEventDispatcher_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractEventDispatcher) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractEventDispatcher_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_Event +func miqt_exec_callback_QAbstractEventDispatcher_Event(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAbstractEventDispatcher_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAbstractEventDispatcher) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAbstractEventDispatcher_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_EventFilter +func miqt_exec_callback_QAbstractEventDispatcher_EventFilter(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAbstractEventDispatcher_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractEventDispatcher) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAbstractEventDispatcher_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_TimerEvent +func miqt_exec_callback_QAbstractEventDispatcher_TimerEvent(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAbstractEventDispatcher_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractEventDispatcher) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAbstractEventDispatcher_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_ChildEvent +func miqt_exec_callback_QAbstractEventDispatcher_ChildEvent(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAbstractEventDispatcher_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractEventDispatcher) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractEventDispatcher_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_CustomEvent +func miqt_exec_callback_QAbstractEventDispatcher_CustomEvent(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAbstractEventDispatcher_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractEventDispatcher) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractEventDispatcher_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_ConnectNotify +func miqt_exec_callback_QAbstractEventDispatcher_ConnectNotify(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAbstractEventDispatcher) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAbstractEventDispatcher_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractEventDispatcher) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractEventDispatcher_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractEventDispatcher_DisconnectNotify +func miqt_exec_callback_QAbstractEventDispatcher_DisconnectNotify(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QAbstractEventDispatcher) Delete() { diff --git a/qt6/gen_qabstracteventdispatcher.h b/qt6/gen_qabstracteventdispatcher.h index 7e1f541e..fbbc86af 100644 --- a/qt6/gen_qabstracteventdispatcher.h +++ b/qt6/gen_qabstracteventdispatcher.h @@ -23,21 +23,31 @@ class QAbstractEventDispatcher__TimerInfo; #endif class QAbstractNativeEventFilter; class QByteArray; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSocketNotifier; class QThread; +class QTimerEvent; #else typedef struct QAbstractEventDispatcher QAbstractEventDispatcher; typedef struct QAbstractEventDispatcher__TimerInfo QAbstractEventDispatcher__TimerInfo; typedef struct QAbstractNativeEventFilter QAbstractNativeEventFilter; typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSocketNotifier QSocketNotifier; typedef struct QThread QThread; +typedef struct QTimerEvent QTimerEvent; #endif +void QAbstractEventDispatcher_new(QAbstractEventDispatcher** outptr_QAbstractEventDispatcher, QObject** outptr_QObject); +void QAbstractEventDispatcher_new2(QObject* parent, QAbstractEventDispatcher** outptr_QAbstractEventDispatcher, QObject** outptr_QObject); QMetaObject* QAbstractEventDispatcher_MetaObject(const QAbstractEventDispatcher* self); void* QAbstractEventDispatcher_Metacast(QAbstractEventDispatcher* self, const char* param1); struct miqt_string QAbstractEventDispatcher_Tr(const char* s); @@ -65,6 +75,44 @@ 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_override_virtual_ProcessEvents(void* self, intptr_t slot); +bool QAbstractEventDispatcher_virtualbase_ProcessEvents(void* self, int flags); +void QAbstractEventDispatcher_override_virtual_RegisterSocketNotifier(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_RegisterSocketNotifier(void* self, QSocketNotifier* notifier); +void QAbstractEventDispatcher_override_virtual_UnregisterSocketNotifier(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_UnregisterSocketNotifier(void* self, QSocketNotifier* notifier); +void QAbstractEventDispatcher_override_virtual_RegisterTimer2(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_RegisterTimer2(void* self, int timerId, long long interval, int timerType, QObject* object); +void QAbstractEventDispatcher_override_virtual_UnregisterTimer(void* self, intptr_t slot); +bool QAbstractEventDispatcher_virtualbase_UnregisterTimer(void* self, int timerId); +void QAbstractEventDispatcher_override_virtual_UnregisterTimers(void* self, intptr_t slot); +bool QAbstractEventDispatcher_virtualbase_UnregisterTimers(void* self, QObject* object); +void QAbstractEventDispatcher_override_virtual_RegisteredTimers(void* self, intptr_t slot); +struct miqt_array /* of QAbstractEventDispatcher__TimerInfo* */ QAbstractEventDispatcher_virtualbase_RegisteredTimers(const void* self, QObject* object); +void QAbstractEventDispatcher_override_virtual_RemainingTime(void* self, intptr_t slot); +int QAbstractEventDispatcher_virtualbase_RemainingTime(void* self, int timerId); +void QAbstractEventDispatcher_override_virtual_WakeUp(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_WakeUp(void* self); +void QAbstractEventDispatcher_override_virtual_Interrupt(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_Interrupt(void* self); +void QAbstractEventDispatcher_override_virtual_StartingUp(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_StartingUp(void* self); +void QAbstractEventDispatcher_override_virtual_ClosingDown(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_ClosingDown(void* self); +void QAbstractEventDispatcher_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractEventDispatcher_virtualbase_Event(void* self, QEvent* event); +void QAbstractEventDispatcher_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractEventDispatcher_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAbstractEventDispatcher_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractEventDispatcher_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAbstractEventDispatcher_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_CustomEvent(void* self, QEvent* event); +void QAbstractEventDispatcher_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAbstractEventDispatcher_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAbstractEventDispatcher_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubclass); void QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t, QAbstractEventDispatcher__TimerInfo** outptr_QAbstractEventDispatcher__TimerInfo); diff --git a/qt6/gen_qabstractitemdelegate.cpp b/qt6/gen_qabstractitemdelegate.cpp index f48182ac..dc37f2c5 100644 --- a/qt6/gen_qabstractitemdelegate.cpp +++ b/qt6/gen_qabstractitemdelegate.cpp @@ -1,9 +1,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -13,11 +15,486 @@ #include #include #include +#include #include #include #include "gen_qabstractitemdelegate.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractItemDelegate : public virtual QAbstractItemDelegate { +public: + + MiqtVirtualQAbstractItemDelegate(): QAbstractItemDelegate() {}; + MiqtVirtualQAbstractItemDelegate(QObject* parent): QAbstractItemDelegate(parent) {}; + + virtual ~MiqtVirtualQAbstractItemDelegate() = 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) { + return; // Pure virtual, there is no base we can call + } + + 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_QAbstractItemDelegate_Paint(const_cast(this), handle__Paint, sigval1, sigval2, sigval3); + + + } + + // 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 QSize(); // Pure virtual, there is no base we can call + } + + 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_QAbstractItemDelegate_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // 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 QAbstractItemDelegate::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_QAbstractItemDelegate_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 QAbstractItemDelegate::createEditor(parent, *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) { + QAbstractItemDelegate::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_QAbstractItemDelegate_DestroyEditor(const_cast(this), handle__DestroyEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DestroyEditor(QWidget* editor, QModelIndex* index) const { + + QAbstractItemDelegate::destroyEditor(editor, *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) { + QAbstractItemDelegate::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_QAbstractItemDelegate_SetEditorData(const_cast(this), handle__SetEditorData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetEditorData(QWidget* editor, QModelIndex* index) const { + + QAbstractItemDelegate::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) { + QAbstractItemDelegate::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_QAbstractItemDelegate_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 { + + QAbstractItemDelegate::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) { + QAbstractItemDelegate::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_QAbstractItemDelegate_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 { + + QAbstractItemDelegate::updateEditorGeometry(editor, *option, *index); + + } + + // 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 QAbstractItemDelegate::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_QAbstractItemDelegate_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 QAbstractItemDelegate::editorEvent(event, model, *option, *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 QAbstractItemDelegate::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_QAbstractItemDelegate_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 QAbstractItemDelegate::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 QAbstractItemDelegate::paintingRoles(); + } + + + struct miqt_array /* of int */ callback_return_value = miqt_exec_callback_QAbstractItemDelegate_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 = QAbstractItemDelegate::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; + + } + + // 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 QAbstractItemDelegate::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractItemDelegate_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAbstractItemDelegate::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 QAbstractItemDelegate::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractItemDelegate_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAbstractItemDelegate::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) { + QAbstractItemDelegate::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemDelegate_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractItemDelegate::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) { + QAbstractItemDelegate::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemDelegate_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAbstractItemDelegate::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) { + QAbstractItemDelegate::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemDelegate_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAbstractItemDelegate::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) { + QAbstractItemDelegate::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractItemDelegate_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAbstractItemDelegate::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) { + QAbstractItemDelegate::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractItemDelegate_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAbstractItemDelegate::disconnectNotify(*signal); + + } + +}; + +void QAbstractItemDelegate_new(QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { + MiqtVirtualQAbstractItemDelegate* ret = new MiqtVirtualQAbstractItemDelegate(); + *outptr_QAbstractItemDelegate = ret; + *outptr_QObject = static_cast(ret); +} + +void QAbstractItemDelegate_new2(QObject* parent, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { + MiqtVirtualQAbstractItemDelegate* ret = new MiqtVirtualQAbstractItemDelegate(parent); + *outptr_QAbstractItemDelegate = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractItemDelegate_MetaObject(const QAbstractItemDelegate* self) { return (QMetaObject*) self->metaObject(); } @@ -91,7 +568,7 @@ void QAbstractItemDelegate_CommitData(QAbstractItemDelegate* self, QWidget* edit } void QAbstractItemDelegate_connect_CommitData(QAbstractItemDelegate* self, intptr_t slot) { - QAbstractItemDelegate::connect(self, static_cast(&QAbstractItemDelegate::commitData), self, [=](QWidget* editor) { + MiqtVirtualQAbstractItemDelegate::connect(self, static_cast(&QAbstractItemDelegate::commitData), self, [=](QWidget* editor) { QWidget* sigval1 = editor; miqt_exec_callback_QAbstractItemDelegate_CommitData(slot, sigval1); }); @@ -102,7 +579,7 @@ void QAbstractItemDelegate_CloseEditor(QAbstractItemDelegate* self, QWidget* edi } void QAbstractItemDelegate_connect_CloseEditor(QAbstractItemDelegate* self, intptr_t slot) { - QAbstractItemDelegate::connect(self, static_cast(&QAbstractItemDelegate::closeEditor), self, [=](QWidget* editor) { + MiqtVirtualQAbstractItemDelegate::connect(self, static_cast(&QAbstractItemDelegate::closeEditor), self, [=](QWidget* editor) { QWidget* sigval1 = editor; miqt_exec_callback_QAbstractItemDelegate_CloseEditor(slot, sigval1); }); @@ -113,7 +590,7 @@ void QAbstractItemDelegate_SizeHintChanged(QAbstractItemDelegate* self, QModelIn } void QAbstractItemDelegate_connect_SizeHintChanged(QAbstractItemDelegate* self, intptr_t slot) { - QAbstractItemDelegate::connect(self, static_cast(&QAbstractItemDelegate::sizeHintChanged), self, [=](const QModelIndex& param1) { + MiqtVirtualQAbstractItemDelegate::connect(self, static_cast(&QAbstractItemDelegate::sizeHintChanged), self, [=](const QModelIndex& param1) { const QModelIndex& param1_ret = param1; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(¶m1_ret); @@ -148,7 +625,7 @@ void QAbstractItemDelegate_CloseEditor2(QAbstractItemDelegate* self, QWidget* ed } void QAbstractItemDelegate_connect_CloseEditor2(QAbstractItemDelegate* self, intptr_t slot) { - QAbstractItemDelegate::connect(self, static_cast(&QAbstractItemDelegate::closeEditor), self, [=](QWidget* editor, QAbstractItemDelegate::EndEditHint hint) { + MiqtVirtualQAbstractItemDelegate::connect(self, static_cast(&QAbstractItemDelegate::closeEditor), self, [=](QWidget* editor, QAbstractItemDelegate::EndEditHint hint) { QWidget* sigval1 = editor; QAbstractItemDelegate::EndEditHint hint_ret = hint; int sigval2 = static_cast(hint_ret); @@ -156,9 +633,137 @@ void QAbstractItemDelegate_connect_CloseEditor2(QAbstractItemDelegate* self, int }); } +void QAbstractItemDelegate_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__Paint = slot; +} + +void QAbstractItemDelegate_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__SizeHint = slot; +} + +void QAbstractItemDelegate_override_virtual_CreateEditor(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__CreateEditor = slot; +} + +QWidget* QAbstractItemDelegate_virtualbase_CreateEditor(const void* self, QWidget* parent, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_CreateEditor(parent, option, index); +} + +void QAbstractItemDelegate_override_virtual_DestroyEditor(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__DestroyEditor = slot; +} + +void QAbstractItemDelegate_virtualbase_DestroyEditor(const void* self, QWidget* editor, QModelIndex* index) { + ( (const MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_DestroyEditor(editor, index); +} + +void QAbstractItemDelegate_override_virtual_SetEditorData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__SetEditorData = slot; +} + +void QAbstractItemDelegate_virtualbase_SetEditorData(const void* self, QWidget* editor, QModelIndex* index) { + ( (const MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_SetEditorData(editor, index); +} + +void QAbstractItemDelegate_override_virtual_SetModelData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__SetModelData = slot; +} + +void QAbstractItemDelegate_virtualbase_SetModelData(const void* self, QWidget* editor, QAbstractItemModel* model, QModelIndex* index) { + ( (const MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_SetModelData(editor, model, index); +} + +void QAbstractItemDelegate_override_virtual_UpdateEditorGeometry(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__UpdateEditorGeometry = slot; +} + +void QAbstractItemDelegate_virtualbase_UpdateEditorGeometry(const void* self, QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index) { + ( (const MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_UpdateEditorGeometry(editor, option, index); +} + +void QAbstractItemDelegate_override_virtual_EditorEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__EditorEvent = slot; +} + +bool QAbstractItemDelegate_virtualbase_EditorEvent(void* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_EditorEvent(event, model, option, index); +} + +void QAbstractItemDelegate_override_virtual_HelpEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__HelpEvent = slot; +} + +bool QAbstractItemDelegate_virtualbase_HelpEvent(void* self, QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index) { + return ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_HelpEvent(event, view, option, index); +} + +void QAbstractItemDelegate_override_virtual_PaintingRoles(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__PaintingRoles = slot; +} + +struct miqt_array /* of int */ QAbstractItemDelegate_virtualbase_PaintingRoles(const void* self) { + return ( (const MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_PaintingRoles(); +} + +void QAbstractItemDelegate_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__Event = slot; +} + +bool QAbstractItemDelegate_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_Event(event); +} + +void QAbstractItemDelegate_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractItemDelegate_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAbstractItemDelegate_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractItemDelegate_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractItemDelegate_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__ChildEvent = slot; +} + +void QAbstractItemDelegate_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_ChildEvent(event); +} + +void QAbstractItemDelegate_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__CustomEvent = slot; +} + +void QAbstractItemDelegate_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_CustomEvent(event); +} + +void QAbstractItemDelegate_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__ConnectNotify = slot; +} + +void QAbstractItemDelegate_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAbstractItemDelegate_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemDelegate*)(self) )->handle__DisconnectNotify = slot; +} + +void QAbstractItemDelegate_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractItemDelegate*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAbstractItemDelegate_Delete(QAbstractItemDelegate* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qabstractitemdelegate.go b/qt6/gen_qabstractitemdelegate.go index 636caf15..87b06497 100644 --- a/qt6/gen_qabstractitemdelegate.go +++ b/qt6/gen_qabstractitemdelegate.go @@ -63,6 +63,28 @@ func UnsafeNewQAbstractItemDelegate(h unsafe.Pointer, h_QObject unsafe.Pointer) QObject: UnsafeNewQObject(h_QObject)} } +// NewQAbstractItemDelegate constructs a new QAbstractItemDelegate object. +func NewQAbstractItemDelegate() *QAbstractItemDelegate { + var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractItemDelegate_new(&outptr_QAbstractItemDelegate, &outptr_QObject) + ret := newQAbstractItemDelegate(outptr_QAbstractItemDelegate, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractItemDelegate2 constructs a new QAbstractItemDelegate object. +func NewQAbstractItemDelegate2(parent *QObject) *QAbstractItemDelegate { + var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractItemDelegate_new2(parent.cPointer(), &outptr_QAbstractItemDelegate, &outptr_QObject) + ret := newQAbstractItemDelegate(outptr_QAbstractItemDelegate, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractItemDelegate) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractItemDelegate_MetaObject(this.h))) } @@ -234,6 +256,426 @@ func miqt_exec_callback_QAbstractItemDelegate_CloseEditor2(cb C.intptr_t, editor gofunc(slotval1, slotval2) } +func (this *QAbstractItemDelegate) OnPaint(slot func(painter *QPainter, option *QStyleOptionViewItem, index *QModelIndex)) { + C.QAbstractItemDelegate_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_Paint +func miqt_exec_callback_QAbstractItemDelegate_Paint(self *C.QAbstractItemDelegate, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionViewItem, index *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + +} +func (this *QAbstractItemDelegate) OnSizeHint(slot func(option *QStyleOptionViewItem, index *QModelIndex) *QSize) { + C.QAbstractItemDelegate_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_SizeHint +func miqt_exec_callback_QAbstractItemDelegate_SizeHint(self *C.QAbstractItemDelegate, cb C.intptr_t, option *C.QStyleOptionViewItem, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemDelegate) callVirtualBase_CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QAbstractItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer())), nil, nil) +} +func (this *QAbstractItemDelegate) OnCreateEditor(slot func(super func(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget, parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget) { + C.QAbstractItemDelegate_override_virtual_CreateEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_CreateEditor +func miqt_exec_callback_QAbstractItemDelegate_CreateEditor(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_CreateEditor, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemDelegate) callVirtualBase_DestroyEditor(editor *QWidget, index *QModelIndex) { + + C.QAbstractItemDelegate_virtualbase_DestroyEditor(unsafe.Pointer(this.h), editor.cPointer(), index.cPointer()) + +} +func (this *QAbstractItemDelegate) OnDestroyEditor(slot func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) { + C.QAbstractItemDelegate_override_virtual_DestroyEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_DestroyEditor +func miqt_exec_callback_QAbstractItemDelegate_DestroyEditor(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_DestroyEditor, slotval1, slotval2) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_SetEditorData(editor *QWidget, index *QModelIndex) { + + C.QAbstractItemDelegate_virtualbase_SetEditorData(unsafe.Pointer(this.h), editor.cPointer(), index.cPointer()) + +} +func (this *QAbstractItemDelegate) OnSetEditorData(slot func(super func(editor *QWidget, index *QModelIndex), editor *QWidget, index *QModelIndex)) { + C.QAbstractItemDelegate_override_virtual_SetEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_SetEditorData +func miqt_exec_callback_QAbstractItemDelegate_SetEditorData(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_SetEditorData, slotval1, slotval2) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_SetModelData(editor *QWidget, model *QAbstractItemModel, index *QModelIndex) { + + C.QAbstractItemDelegate_virtualbase_SetModelData(unsafe.Pointer(this.h), editor.cPointer(), model.cPointer(), index.cPointer()) + +} +func (this *QAbstractItemDelegate) OnSetModelData(slot func(super func(editor *QWidget, model *QAbstractItemModel, index *QModelIndex), editor *QWidget, model *QAbstractItemModel, index *QModelIndex)) { + C.QAbstractItemDelegate_override_virtual_SetModelData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_SetModelData +func miqt_exec_callback_QAbstractItemDelegate_SetModelData(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_SetModelData, slotval1, slotval2, slotval3) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_UpdateEditorGeometry(editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex) { + + C.QAbstractItemDelegate_virtualbase_UpdateEditorGeometry(unsafe.Pointer(this.h), editor.cPointer(), option.cPointer(), index.cPointer()) + +} +func (this *QAbstractItemDelegate) OnUpdateEditorGeometry(slot func(super func(editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex), editor *QWidget, option *QStyleOptionViewItem, index *QModelIndex)) { + C.QAbstractItemDelegate_override_virtual_UpdateEditorGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_UpdateEditorGeometry +func miqt_exec_callback_QAbstractItemDelegate_UpdateEditorGeometry(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_UpdateEditorGeometry, slotval1, slotval2, slotval3) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_EditorEvent(event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool { + + return (bool)(C.QAbstractItemDelegate_virtualbase_EditorEvent(unsafe.Pointer(this.h), event.cPointer(), model.cPointer(), option.cPointer(), index.cPointer())) + +} +func (this *QAbstractItemDelegate) OnEditorEvent(slot func(super func(event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QEvent, model *QAbstractItemModel, option *QStyleOptionViewItem, index *QModelIndex) bool) { + C.QAbstractItemDelegate_override_virtual_EditorEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_EditorEvent +func miqt_exec_callback_QAbstractItemDelegate_EditorEvent(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_EditorEvent, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_HelpEvent(event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool { + + return (bool)(C.QAbstractItemDelegate_virtualbase_HelpEvent(unsafe.Pointer(this.h), event.cPointer(), view.cPointer(), option.cPointer(), index.cPointer())) + +} +func (this *QAbstractItemDelegate) OnHelpEvent(slot func(super func(event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool, event *QHelpEvent, view *QAbstractItemView, option *QStyleOptionViewItem, index *QModelIndex) bool) { + C.QAbstractItemDelegate_override_virtual_HelpEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_HelpEvent +func miqt_exec_callback_QAbstractItemDelegate_HelpEvent(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_HelpEvent, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_PaintingRoles() []int { + + var _ma C.struct_miqt_array = C.QAbstractItemDelegate_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 *QAbstractItemDelegate) OnPaintingRoles(slot func(super func() []int) []int) { + C.QAbstractItemDelegate_override_virtual_PaintingRoles(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_PaintingRoles +func miqt_exec_callback_QAbstractItemDelegate_PaintingRoles(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{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 + +} + +func (this *QAbstractItemDelegate) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAbstractItemDelegate_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractItemDelegate) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractItemDelegate_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_Event +func miqt_exec_callback_QAbstractItemDelegate_Event(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAbstractItemDelegate_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAbstractItemDelegate) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAbstractItemDelegate_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_EventFilter +func miqt_exec_callback_QAbstractItemDelegate_EventFilter(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAbstractItemDelegate_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemDelegate) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAbstractItemDelegate_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_TimerEvent +func miqt_exec_callback_QAbstractItemDelegate_TimerEvent(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAbstractItemDelegate_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemDelegate) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAbstractItemDelegate_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_ChildEvent +func miqt_exec_callback_QAbstractItemDelegate_ChildEvent(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAbstractItemDelegate_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemDelegate) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractItemDelegate_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_CustomEvent +func miqt_exec_callback_QAbstractItemDelegate_CustomEvent(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAbstractItemDelegate_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractItemDelegate) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractItemDelegate_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_ConnectNotify +func miqt_exec_callback_QAbstractItemDelegate_ConnectNotify(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAbstractItemDelegate) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAbstractItemDelegate_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractItemDelegate) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractItemDelegate_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemDelegate_DisconnectNotify +func miqt_exec_callback_QAbstractItemDelegate_DisconnectNotify(self *C.QAbstractItemDelegate, 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((&QAbstractItemDelegate{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAbstractItemDelegate) Delete() { C.QAbstractItemDelegate_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qabstractitemdelegate.h b/qt6/gen_qabstractitemdelegate.h index ddc07f95..a8b86169 100644 --- a/qt6/gen_qabstractitemdelegate.h +++ b/qt6/gen_qabstractitemdelegate.h @@ -18,30 +18,38 @@ extern "C" { class QAbstractItemDelegate; class QAbstractItemModel; class QAbstractItemView; +class QChildEvent; class QEvent; class QHelpEvent; +class QMetaMethod; class QMetaObject; class QModelIndex; class QObject; class QPainter; class QSize; class QStyleOptionViewItem; +class QTimerEvent; class QWidget; #else typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractItemView QAbstractItemView; +typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QHelpEvent QHelpEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif +void QAbstractItemDelegate_new(QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); +void QAbstractItemDelegate_new2(QObject* parent, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); QMetaObject* QAbstractItemDelegate_MetaObject(const QAbstractItemDelegate* self); void* QAbstractItemDelegate_Metacast(QAbstractItemDelegate* self, const char* param1); struct miqt_string QAbstractItemDelegate_Tr(const char* s); @@ -65,6 +73,40 @@ 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_override_virtual_Paint(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_Paint(const void* self, QPainter* painter, QStyleOptionViewItem* option, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QAbstractItemDelegate_virtualbase_SizeHint(const void* self, QStyleOptionViewItem* option, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_CreateEditor(void* self, intptr_t slot); +QWidget* QAbstractItemDelegate_virtualbase_CreateEditor(const void* self, QWidget* parent, QStyleOptionViewItem* option, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_DestroyEditor(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_DestroyEditor(const void* self, QWidget* editor, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_SetEditorData(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_SetEditorData(const void* self, QWidget* editor, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_SetModelData(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_SetModelData(const void* self, QWidget* editor, QAbstractItemModel* model, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_UpdateEditorGeometry(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_UpdateEditorGeometry(const void* self, QWidget* editor, QStyleOptionViewItem* option, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_EditorEvent(void* self, intptr_t slot); +bool QAbstractItemDelegate_virtualbase_EditorEvent(void* self, QEvent* event, QAbstractItemModel* model, QStyleOptionViewItem* option, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_HelpEvent(void* self, intptr_t slot); +bool QAbstractItemDelegate_virtualbase_HelpEvent(void* self, QHelpEvent* event, QAbstractItemView* view, QStyleOptionViewItem* option, QModelIndex* index); +void QAbstractItemDelegate_override_virtual_PaintingRoles(void* self, intptr_t slot); +struct miqt_array /* of int */ QAbstractItemDelegate_virtualbase_PaintingRoles(const void* self); +void QAbstractItemDelegate_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractItemDelegate_virtualbase_Event(void* self, QEvent* event); +void QAbstractItemDelegate_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractItemDelegate_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAbstractItemDelegate_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractItemDelegate_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAbstractItemDelegate_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_CustomEvent(void* self, QEvent* event); +void QAbstractItemDelegate_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAbstractItemDelegate_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAbstractItemDelegate_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractItemDelegate_Delete(QAbstractItemDelegate* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qabstractitemmodel.cpp b/qt6/gen_qabstractitemmodel.cpp index 9f3f4c33..e9c5a718 100644 --- a/qt6/gen_qabstractitemmodel.cpp +++ b/qt6/gen_qabstractitemmodel.cpp @@ -2,8 +2,11 @@ #include #include #include +#include +#include #include #include +#include #include #include #include @@ -15,6 +18,7 @@ #include #include #include +#include #include #include #include "gen_qabstractitemmodel.h" @@ -323,6 +327,1247 @@ void QPersistentModelIndex_Delete(QPersistentModelIndex* self, bool isSubclass) } } +class MiqtVirtualQAbstractItemModel : public virtual QAbstractItemModel { +public: + + MiqtVirtualQAbstractItemModel(): QAbstractItemModel() {}; + MiqtVirtualQAbstractItemModel(QObject* parent): QAbstractItemModel(parent) {}; + + virtual ~MiqtVirtualQAbstractItemModel() = 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 QModelIndex(); // Pure virtual, there is no base we can call + } + + 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_QAbstractItemModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // 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 QModelIndex(); // Pure virtual, there is no base we can call + } + + const QModelIndex& child_ret = child; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&child_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QAbstractItemModel_Parent(const_cast(this), handle__Parent, sigval1); + + return *callback_return_value; + } + + // 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 QAbstractItemModel::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_QAbstractItemModel_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(QAbstractItemModel::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 0; // Pure virtual, there is no base we can call + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QAbstractItemModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // 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 0; // Pure virtual, there is no base we can call + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QAbstractItemModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // 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 QAbstractItemModel::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_QAbstractItemModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* parent) const { + + return QAbstractItemModel::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 QVariant(); // Pure virtual, there is no base we can call + } + + 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_QAbstractItemModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // 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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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(QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 = QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_ClearItemData(this, handle__ClearItemData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ClearItemData(QModelIndex* index) { + + return QAbstractItemModel::clearItemData(*index); + + } + + // 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 QAbstractItemModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QAbstractItemModel_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 = QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractItemModel_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 = QAbstractItemModel::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 QAbstractItemModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractItemModel_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 = QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 QAbstractItemModel::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) { + QAbstractItemModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QAbstractItemModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 = QAbstractItemModel::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) { + QAbstractItemModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QAbstractItemModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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(QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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 = QAbstractItemModel::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 QAbstractItemModel::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_QAbstractItemModel_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(QAbstractItemModel::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 QAbstractItemModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QAbstractItemModel_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 = QAbstractItemModel::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) { + QAbstractItemModel::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_QAbstractItemModel_MultiData(const_cast(this), handle__MultiData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MultiData(QModelIndex* index, QModelRoleDataSpan* roleDataSpan) const { + + QAbstractItemModel::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 QAbstractItemModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractItemModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QAbstractItemModel::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) { + QAbstractItemModel::revert(); + return; + } + + + miqt_exec_callback_QAbstractItemModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QAbstractItemModel::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) { + QAbstractItemModel::resetInternalData(); + return; + } + + + miqt_exec_callback_QAbstractItemModel_ResetInternalData(this, handle__ResetInternalData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResetInternalData() { + + QAbstractItemModel::resetInternalData(); + + } + + // 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 QAbstractItemModel::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractItemModel_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAbstractItemModel::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 QAbstractItemModel::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractItemModel_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAbstractItemModel::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) { + QAbstractItemModel::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemModel_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractItemModel::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) { + QAbstractItemModel::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemModel_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAbstractItemModel::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) { + QAbstractItemModel::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemModel_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAbstractItemModel::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) { + QAbstractItemModel::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractItemModel_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAbstractItemModel::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) { + QAbstractItemModel::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractItemModel_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAbstractItemModel::disconnectNotify(*signal); + + } + +}; + +void QAbstractItemModel_new(QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQAbstractItemModel* ret = new MiqtVirtualQAbstractItemModel(); + *outptr_QAbstractItemModel = ret; + *outptr_QObject = static_cast(ret); +} + +void QAbstractItemModel_new2(QObject* parent, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQAbstractItemModel* ret = new MiqtVirtualQAbstractItemModel(parent); + *outptr_QAbstractItemModel = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractItemModel_MetaObject(const QAbstractItemModel* self) { return (QMetaObject*) self->metaObject(); } @@ -588,7 +1833,7 @@ void QAbstractItemModel_DataChanged(QAbstractItemModel* self, QModelIndex* topLe } void QAbstractItemModel_connect_DataChanged(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast&)>(&QAbstractItemModel::dataChanged), self, [=](const QModelIndex& topLeft, const QModelIndex& bottomRight) { + MiqtVirtualQAbstractItemModel::connect(self, static_cast&)>(&QAbstractItemModel::dataChanged), self, [=](const QModelIndex& topLeft, const QModelIndex& bottomRight) { const QModelIndex& topLeft_ret = topLeft; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&topLeft_ret); @@ -604,7 +1849,7 @@ void QAbstractItemModel_HeaderDataChanged(QAbstractItemModel* self, int orientat } void QAbstractItemModel_connect_HeaderDataChanged(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast(&QAbstractItemModel::headerDataChanged), self, [=](Qt::Orientation orientation, int first, int last) { + MiqtVirtualQAbstractItemModel::connect(self, static_cast(&QAbstractItemModel::headerDataChanged), self, [=](Qt::Orientation orientation, int first, int last) { Qt::Orientation orientation_ret = orientation; int sigval1 = static_cast(orientation_ret); int sigval2 = first; @@ -618,7 +1863,7 @@ void QAbstractItemModel_LayoutChanged(QAbstractItemModel* self) { } void QAbstractItemModel_connect_LayoutChanged(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutChanged), self, [=]() { + MiqtVirtualQAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutChanged), self, [=]() { miqt_exec_callback_QAbstractItemModel_LayoutChanged(slot); }); } @@ -628,7 +1873,7 @@ void QAbstractItemModel_LayoutAboutToBeChanged(QAbstractItemModel* self) { } void QAbstractItemModel_connect_LayoutAboutToBeChanged(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutAboutToBeChanged), self, [=]() { + MiqtVirtualQAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutAboutToBeChanged), self, [=]() { miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged(slot); }); } @@ -698,7 +1943,7 @@ void QAbstractItemModel_DataChanged3(QAbstractItemModel* self, QModelIndex* topL } void QAbstractItemModel_connect_DataChanged3(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast&)>(&QAbstractItemModel::dataChanged), self, [=](const QModelIndex& topLeft, const QModelIndex& bottomRight, const QList& roles) { + MiqtVirtualQAbstractItemModel::connect(self, static_cast&)>(&QAbstractItemModel::dataChanged), self, [=](const QModelIndex& topLeft, const QModelIndex& bottomRight, const QList& roles) { const QModelIndex& topLeft_ret = topLeft; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&topLeft_ret); @@ -730,7 +1975,7 @@ void QAbstractItemModel_LayoutChanged1(QAbstractItemModel* self, struct miqt_arr } void QAbstractItemModel_connect_LayoutChanged1(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutChanged), self, [=](const QList& parents) { + MiqtVirtualQAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutChanged), self, [=](const QList& parents) { const QList& parents_ret = parents; // Convert QList<> from C++ memory to manually-managed C memory QPersistentModelIndex** parents_arr = static_cast(malloc(sizeof(QPersistentModelIndex*) * parents_ret.length())); @@ -756,7 +2001,7 @@ void QAbstractItemModel_LayoutChanged2(QAbstractItemModel* self, struct miqt_arr } void QAbstractItemModel_connect_LayoutChanged2(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutChanged), self, [=](const QList& parents, QAbstractItemModel::LayoutChangeHint hint) { + MiqtVirtualQAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutChanged), self, [=](const QList& parents, QAbstractItemModel::LayoutChangeHint hint) { const QList& parents_ret = parents; // Convert QList<> from C++ memory to manually-managed C memory QPersistentModelIndex** parents_arr = static_cast(malloc(sizeof(QPersistentModelIndex*) * parents_ret.length())); @@ -784,7 +2029,7 @@ void QAbstractItemModel_LayoutAboutToBeChanged1(QAbstractItemModel* self, struct } void QAbstractItemModel_connect_LayoutAboutToBeChanged1(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutAboutToBeChanged), self, [=](const QList& parents) { + MiqtVirtualQAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutAboutToBeChanged), self, [=](const QList& parents) { const QList& parents_ret = parents; // Convert QList<> from C++ memory to manually-managed C memory QPersistentModelIndex** parents_arr = static_cast(malloc(sizeof(QPersistentModelIndex*) * parents_ret.length())); @@ -810,7 +2055,7 @@ void QAbstractItemModel_LayoutAboutToBeChanged2(QAbstractItemModel* self, struct } void QAbstractItemModel_connect_LayoutAboutToBeChanged2(QAbstractItemModel* self, intptr_t slot) { - QAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutAboutToBeChanged), self, [=](const QList& parents, QAbstractItemModel::LayoutChangeHint hint) { + MiqtVirtualQAbstractItemModel::connect(self, static_cast&, QAbstractItemModel::LayoutChangeHint)>(&QAbstractItemModel::layoutAboutToBeChanged), self, [=](const QList& parents, QAbstractItemModel::LayoutChangeHint hint) { const QList& parents_ret = parents; // Convert QList<> from C++ memory to manually-managed C memory QPersistentModelIndex** parents_arr = static_cast(malloc(sizeof(QPersistentModelIndex*) * parents_ret.length())); @@ -827,14 +2072,1382 @@ void QAbstractItemModel_connect_LayoutAboutToBeChanged2(QAbstractItemModel* self }); } +void QAbstractItemModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Index = slot; +} + +void QAbstractItemModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Parent = slot; +} + +void QAbstractItemModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QAbstractItemModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QAbstractItemModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__RowCount = slot; +} + +void QAbstractItemModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__ColumnCount = slot; +} + +void QAbstractItemModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__HasChildren = slot; +} + +bool QAbstractItemModel_virtualbase_HasChildren(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_HasChildren(parent); +} + +void QAbstractItemModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Data = slot; +} + +void QAbstractItemModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__SetData = slot; +} + +bool QAbstractItemModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QAbstractItemModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QAbstractItemModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QAbstractItemModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QAbstractItemModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QAbstractItemModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QAbstractItemModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_ItemData(index); +} + +void QAbstractItemModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__SetItemData = slot; +} + +bool QAbstractItemModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QAbstractItemModel_override_virtual_ClearItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__ClearItemData = slot; +} + +bool QAbstractItemModel_virtualbase_ClearItemData(void* self, QModelIndex* index) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_ClearItemData(index); +} + +void QAbstractItemModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QAbstractItemModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_MimeTypes(); +} + +void QAbstractItemModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QAbstractItemModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QAbstractItemModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QAbstractItemModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QAbstractItemModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__DropMimeData = slot; +} + +bool QAbstractItemModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QAbstractItemModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QAbstractItemModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QAbstractItemModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QAbstractItemModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QAbstractItemModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__InsertRows = slot; +} + +bool QAbstractItemModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QAbstractItemModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__InsertColumns = slot; +} + +bool QAbstractItemModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QAbstractItemModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__RemoveRows = slot; +} + +bool QAbstractItemModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QAbstractItemModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QAbstractItemModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QAbstractItemModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__MoveRows = slot; +} + +bool QAbstractItemModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QAbstractItemModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__MoveColumns = slot; +} + +bool QAbstractItemModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QAbstractItemModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__FetchMore = slot; +} + +void QAbstractItemModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QAbstractItemModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QAbstractItemModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QAbstractItemModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Flags = slot; +} + +int QAbstractItemModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Flags(index); +} + +void QAbstractItemModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Sort = slot; +} + +void QAbstractItemModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Sort(column, order); +} + +void QAbstractItemModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QAbstractItemModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Buddy(index); +} + +void QAbstractItemModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QAbstractItemModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QAbstractItemModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Span = slot; +} + +QSize* QAbstractItemModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Span(index); +} + +void QAbstractItemModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QAbstractItemModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_RoleNames(); +} + +void QAbstractItemModel_override_virtual_MultiData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__MultiData = slot; +} + +void QAbstractItemModel_virtualbase_MultiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan) { + ( (const MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_MultiData(index, roleDataSpan); +} + +void QAbstractItemModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Submit = slot; +} + +bool QAbstractItemModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Submit(); +} + +void QAbstractItemModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Revert = slot; +} + +void QAbstractItemModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Revert(); +} + +void QAbstractItemModel_override_virtual_ResetInternalData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__ResetInternalData = slot; +} + +void QAbstractItemModel_virtualbase_ResetInternalData(void* self) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_ResetInternalData(); +} + +void QAbstractItemModel_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__Event = slot; +} + +bool QAbstractItemModel_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_Event(event); +} + +void QAbstractItemModel_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractItemModel_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAbstractItemModel_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractItemModel_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractItemModel_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__ChildEvent = slot; +} + +void QAbstractItemModel_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_ChildEvent(event); +} + +void QAbstractItemModel_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__CustomEvent = slot; +} + +void QAbstractItemModel_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_CustomEvent(event); +} + +void QAbstractItemModel_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__ConnectNotify = slot; +} + +void QAbstractItemModel_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAbstractItemModel_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemModel*)(self) )->handle__DisconnectNotify = slot; +} + +void QAbstractItemModel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractItemModel*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAbstractItemModel_Delete(QAbstractItemModel* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } } +class MiqtVirtualQAbstractTableModel : public virtual QAbstractTableModel { +public: + + MiqtVirtualQAbstractTableModel(): QAbstractTableModel() {}; + MiqtVirtualQAbstractTableModel(QObject* parent): QAbstractTableModel(parent) {}; + + virtual ~MiqtVirtualQAbstractTableModel() = 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 QAbstractTableModel::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_QAbstractTableModel_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(QAbstractTableModel::index(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 QAbstractTableModel::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_QAbstractTableModel_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(QAbstractTableModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // 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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *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 QAbstractTableModel::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_QAbstractTableModel_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 = QAbstractTableModel::flags(*index); + return static_cast(_ret); + + } + + // 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 0; // Pure virtual, there is no base we can call + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QAbstractTableModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // 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 0; // Pure virtual, there is no base we can call + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QAbstractTableModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // 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 QVariant(); // Pure virtual, there is no base we can call + } + + 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_QAbstractTableModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // 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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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(QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 = QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_ClearItemData(this, handle__ClearItemData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ClearItemData(QModelIndex* index) { + + return QAbstractTableModel::clearItemData(*index); + + } + + // 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 QAbstractTableModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QAbstractTableModel_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 = QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::canDropMimeData(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 QAbstractTableModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractTableModel_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 = QAbstractTableModel::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 QAbstractTableModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractTableModel_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 = QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 QAbstractTableModel::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) { + QAbstractTableModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QAbstractTableModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QAbstractTableModel::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) { + QAbstractTableModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QAbstractTableModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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(QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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 = QAbstractTableModel::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 QAbstractTableModel::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_QAbstractTableModel_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(QAbstractTableModel::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 QAbstractTableModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QAbstractTableModel_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 = QAbstractTableModel::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) { + QAbstractTableModel::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_QAbstractTableModel_MultiData(const_cast(this), handle__MultiData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MultiData(QModelIndex* index, QModelRoleDataSpan* roleDataSpan) const { + + QAbstractTableModel::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 QAbstractTableModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractTableModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QAbstractTableModel::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) { + QAbstractTableModel::revert(); + return; + } + + + miqt_exec_callback_QAbstractTableModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QAbstractTableModel::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) { + QAbstractTableModel::resetInternalData(); + return; + } + + + miqt_exec_callback_QAbstractTableModel_ResetInternalData(this, handle__ResetInternalData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResetInternalData() { + + QAbstractTableModel::resetInternalData(); + + } + +}; + +void QAbstractTableModel_new(QAbstractTableModel** outptr_QAbstractTableModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQAbstractTableModel* ret = new MiqtVirtualQAbstractTableModel(); + *outptr_QAbstractTableModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QAbstractTableModel_new2(QObject* parent, QAbstractTableModel** outptr_QAbstractTableModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQAbstractTableModel* ret = new MiqtVirtualQAbstractTableModel(parent); + *outptr_QAbstractTableModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractTableModel_MetaObject(const QAbstractTableModel* self) { return (QMetaObject*) self->metaObject(); } @@ -893,14 +3506,1300 @@ struct miqt_string QAbstractTableModel_Tr3(const char* s, const char* c, int n) return _ms; } +void QAbstractTableModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Index = slot; +} + +QModelIndex* QAbstractTableModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Index(row, column, parent); +} + +void QAbstractTableModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QAbstractTableModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QAbstractTableModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__DropMimeData = slot; +} + +bool QAbstractTableModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QAbstractTableModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Flags = slot; +} + +int QAbstractTableModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Flags(index); +} + +void QAbstractTableModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__RowCount = slot; +} + +void QAbstractTableModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__ColumnCount = slot; +} + +void QAbstractTableModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Data = slot; +} + +void QAbstractTableModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__SetData = slot; +} + +bool QAbstractTableModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QAbstractTableModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QAbstractTableModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QAbstractTableModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QAbstractTableModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QAbstractTableModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QAbstractTableModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_ItemData(index); +} + +void QAbstractTableModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__SetItemData = slot; +} + +bool QAbstractTableModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QAbstractTableModel_override_virtual_ClearItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__ClearItemData = slot; +} + +bool QAbstractTableModel_virtualbase_ClearItemData(void* self, QModelIndex* index) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_ClearItemData(index); +} + +void QAbstractTableModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QAbstractTableModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_MimeTypes(); +} + +void QAbstractTableModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QAbstractTableModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QAbstractTableModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QAbstractTableModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QAbstractTableModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QAbstractTableModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QAbstractTableModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QAbstractTableModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QAbstractTableModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__InsertRows = slot; +} + +bool QAbstractTableModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QAbstractTableModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__InsertColumns = slot; +} + +bool QAbstractTableModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QAbstractTableModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__RemoveRows = slot; +} + +bool QAbstractTableModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QAbstractTableModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QAbstractTableModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QAbstractTableModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__MoveRows = slot; +} + +bool QAbstractTableModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QAbstractTableModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__MoveColumns = slot; +} + +bool QAbstractTableModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QAbstractTableModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__FetchMore = slot; +} + +void QAbstractTableModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QAbstractTableModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QAbstractTableModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QAbstractTableModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Sort = slot; +} + +void QAbstractTableModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Sort(column, order); +} + +void QAbstractTableModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QAbstractTableModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Buddy(index); +} + +void QAbstractTableModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QAbstractTableModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QAbstractTableModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Span = slot; +} + +QSize* QAbstractTableModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Span(index); +} + +void QAbstractTableModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QAbstractTableModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_RoleNames(); +} + +void QAbstractTableModel_override_virtual_MultiData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__MultiData = slot; +} + +void QAbstractTableModel_virtualbase_MultiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan) { + ( (const MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_MultiData(index, roleDataSpan); +} + +void QAbstractTableModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Submit = slot; +} + +bool QAbstractTableModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Submit(); +} + +void QAbstractTableModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__Revert = slot; +} + +void QAbstractTableModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_Revert(); +} + +void QAbstractTableModel_override_virtual_ResetInternalData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTableModel*)(self) )->handle__ResetInternalData = slot; +} + +void QAbstractTableModel_virtualbase_ResetInternalData(void* self) { + ( (MiqtVirtualQAbstractTableModel*)(self) )->virtualbase_ResetInternalData(); +} + void QAbstractTableModel_Delete(QAbstractTableModel* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } } +class MiqtVirtualQAbstractListModel : public virtual QAbstractListModel { +public: + + MiqtVirtualQAbstractListModel(): QAbstractListModel() {}; + MiqtVirtualQAbstractListModel(QObject* parent): QAbstractListModel(parent) {}; + + virtual ~MiqtVirtualQAbstractListModel() = 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 QAbstractListModel::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_QAbstractListModel_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(QAbstractListModel::index(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 QAbstractListModel::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_QAbstractListModel_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(QAbstractListModel::sibling(static_cast(row), static_cast(column), *idx)); + + } + + // 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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *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 QAbstractListModel::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_QAbstractListModel_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 = QAbstractListModel::flags(*index); + return static_cast(_ret); + + } + + // 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 0; // Pure virtual, there is no base we can call + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QAbstractListModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // 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 QVariant(); // Pure virtual, there is no base we can call + } + + 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_QAbstractListModel_Data(const_cast(this), handle__Data, sigval1, sigval2); + + return *callback_return_value; + } + + // 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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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(QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 = QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_ClearItemData(this, handle__ClearItemData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ClearItemData(QModelIndex* index) { + + return QAbstractListModel::clearItemData(*index); + + } + + // 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 QAbstractListModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QAbstractListModel_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 = QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::canDropMimeData(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 QAbstractListModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractListModel_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 = QAbstractListModel::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 QAbstractListModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractListModel_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 = QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 QAbstractListModel::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) { + QAbstractListModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QAbstractListModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QAbstractListModel::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) { + QAbstractListModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QAbstractListModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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(QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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 = QAbstractListModel::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 QAbstractListModel::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_QAbstractListModel_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(QAbstractListModel::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 QAbstractListModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QAbstractListModel_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 = QAbstractListModel::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) { + QAbstractListModel::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_QAbstractListModel_MultiData(const_cast(this), handle__MultiData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MultiData(QModelIndex* index, QModelRoleDataSpan* roleDataSpan) const { + + QAbstractListModel::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 QAbstractListModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractListModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QAbstractListModel::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) { + QAbstractListModel::revert(); + return; + } + + + miqt_exec_callback_QAbstractListModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QAbstractListModel::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) { + QAbstractListModel::resetInternalData(); + return; + } + + + miqt_exec_callback_QAbstractListModel_ResetInternalData(this, handle__ResetInternalData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResetInternalData() { + + QAbstractListModel::resetInternalData(); + + } + +}; + +void QAbstractListModel_new(QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQAbstractListModel* ret = new MiqtVirtualQAbstractListModel(); + *outptr_QAbstractListModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QAbstractListModel_new2(QObject* parent, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQAbstractListModel* ret = new MiqtVirtualQAbstractListModel(parent); + *outptr_QAbstractListModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractListModel_MetaObject(const QAbstractListModel* self) { return (QMetaObject*) self->metaObject(); } @@ -959,9 +4858,273 @@ struct miqt_string QAbstractListModel_Tr3(const char* s, const char* c, int n) { return _ms; } +void QAbstractListModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Index = slot; +} + +QModelIndex* QAbstractListModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Index(row, column, parent); +} + +void QAbstractListModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QAbstractListModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QAbstractListModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__DropMimeData = slot; +} + +bool QAbstractListModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QAbstractListModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Flags = slot; +} + +int QAbstractListModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Flags(index); +} + +void QAbstractListModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__RowCount = slot; +} + +void QAbstractListModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Data = slot; +} + +void QAbstractListModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__SetData = slot; +} + +bool QAbstractListModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QAbstractListModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QAbstractListModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QAbstractListModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QAbstractListModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QAbstractListModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QAbstractListModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_ItemData(index); +} + +void QAbstractListModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__SetItemData = slot; +} + +bool QAbstractListModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QAbstractListModel_override_virtual_ClearItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__ClearItemData = slot; +} + +bool QAbstractListModel_virtualbase_ClearItemData(void* self, QModelIndex* index) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_ClearItemData(index); +} + +void QAbstractListModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QAbstractListModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_MimeTypes(); +} + +void QAbstractListModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QAbstractListModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QAbstractListModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QAbstractListModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QAbstractListModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QAbstractListModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QAbstractListModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QAbstractListModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QAbstractListModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__InsertRows = slot; +} + +bool QAbstractListModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QAbstractListModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__InsertColumns = slot; +} + +bool QAbstractListModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QAbstractListModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__RemoveRows = slot; +} + +bool QAbstractListModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QAbstractListModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QAbstractListModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QAbstractListModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__MoveRows = slot; +} + +bool QAbstractListModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QAbstractListModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__MoveColumns = slot; +} + +bool QAbstractListModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QAbstractListModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__FetchMore = slot; +} + +void QAbstractListModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QAbstractListModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QAbstractListModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QAbstractListModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Sort = slot; +} + +void QAbstractListModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Sort(column, order); +} + +void QAbstractListModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QAbstractListModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Buddy(index); +} + +void QAbstractListModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QAbstractListModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QAbstractListModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Span = slot; +} + +QSize* QAbstractListModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Span(index); +} + +void QAbstractListModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QAbstractListModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_RoleNames(); +} + +void QAbstractListModel_override_virtual_MultiData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__MultiData = slot; +} + +void QAbstractListModel_virtualbase_MultiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan) { + ( (const MiqtVirtualQAbstractListModel*)(self) )->virtualbase_MultiData(index, roleDataSpan); +} + +void QAbstractListModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Submit = slot; +} + +bool QAbstractListModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Submit(); +} + +void QAbstractListModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__Revert = slot; +} + +void QAbstractListModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_Revert(); +} + +void QAbstractListModel_override_virtual_ResetInternalData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractListModel*)(self) )->handle__ResetInternalData = slot; +} + +void QAbstractListModel_virtualbase_ResetInternalData(void* self) { + ( (MiqtVirtualQAbstractListModel*)(self) )->virtualbase_ResetInternalData(); +} + void QAbstractListModel_Delete(QAbstractListModel* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qabstractitemmodel.go b/qt6/gen_qabstractitemmodel.go index 29befec4..dea75bc9 100644 --- a/qt6/gen_qabstractitemmodel.go +++ b/qt6/gen_qabstractitemmodel.go @@ -614,6 +614,28 @@ func UnsafeNewQAbstractItemModel(h unsafe.Pointer, h_QObject unsafe.Pointer) *QA QObject: UnsafeNewQObject(h_QObject)} } +// NewQAbstractItemModel constructs a new QAbstractItemModel object. +func NewQAbstractItemModel() *QAbstractItemModel { + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractItemModel_new(&outptr_QAbstractItemModel, &outptr_QObject) + ret := newQAbstractItemModel(outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractItemModel2 constructs a new QAbstractItemModel object. +func NewQAbstractItemModel2(parent *QObject) *QAbstractItemModel { + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractItemModel_new2(parent.cPointer(), &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQAbstractItemModel(outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractItemModel) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractItemModel_MetaObject(this.h))) } @@ -1199,6 +1221,1261 @@ func miqt_exec_callback_QAbstractItemModel_LayoutAboutToBeChanged2(cb C.intptr_t gofunc(slotval1, slotval2) } +func (this *QAbstractItemModel) OnIndex(slot func(row int, column int, parent *QModelIndex) *QModelIndex) { + C.QAbstractItemModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Index +func miqt_exec_callback_QAbstractItemModel_Index(self *C.QAbstractItemModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} +func (this *QAbstractItemModel) OnParent(slot func(child *QModelIndex) *QModelIndex) { + C.QAbstractItemModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Parent +func miqt_exec_callback_QAbstractItemModel_Parent(self *C.QAbstractItemModel, cb C.intptr_t, child *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QAbstractItemModel_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 *QAbstractItemModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QAbstractItemModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Sibling +func miqt_exec_callback_QAbstractItemModel_Sibling(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} +func (this *QAbstractItemModel) OnRowCount(slot func(parent *QModelIndex) int) { + C.QAbstractItemModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_RowCount +func miqt_exec_callback_QAbstractItemModel_RowCount(self *C.QAbstractItemModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractItemModel) OnColumnCount(slot func(parent *QModelIndex) int) { + C.QAbstractItemModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_ColumnCount +func miqt_exec_callback_QAbstractItemModel_ColumnCount(self *C.QAbstractItemModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_HasChildren(parent *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QAbstractItemModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QAbstractItemModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_HasChildren +func miqt_exec_callback_QAbstractItemModel_HasChildren(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QAbstractItemModel) OnData(slot func(index *QModelIndex, role int) *QVariant) { + C.QAbstractItemModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Data +func miqt_exec_callback_QAbstractItemModel_Data(self *C.QAbstractItemModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QAbstractItemModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QAbstractItemModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_SetData +func miqt_exec_callback_QAbstractItemModel_SetData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QAbstractItemModel_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 *QAbstractItemModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QAbstractItemModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_HeaderData +func miqt_exec_callback_QAbstractItemModel_HeaderData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QAbstractItemModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QAbstractItemModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_SetHeaderData +func miqt_exec_callback_QAbstractItemModel_SetHeaderData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QAbstractItemModel_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 *QAbstractItemModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QAbstractItemModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_ItemData +func miqt_exec_callback_QAbstractItemModel_ItemData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{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 *QAbstractItemModel) 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.QAbstractItemModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QAbstractItemModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QAbstractItemModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_SetItemData +func miqt_exec_callback_QAbstractItemModel_SetItemData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_ClearItemData(index *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_ClearItemData(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QAbstractItemModel) OnClearItemData(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QAbstractItemModel_override_virtual_ClearItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_ClearItemData +func miqt_exec_callback_QAbstractItemModel_ClearItemData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_ClearItemData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QAbstractItemModel_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 *QAbstractItemModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QAbstractItemModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_MimeTypes +func miqt_exec_callback_QAbstractItemModel_MimeTypes(self *C.QAbstractItemModel, 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((&QAbstractItemModel{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 *QAbstractItemModel) 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.QAbstractItemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QAbstractItemModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QAbstractItemModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_MimeData +func miqt_exec_callback_QAbstractItemModel_MimeData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QAbstractItemModel) 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.QAbstractItemModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_CanDropMimeData +func miqt_exec_callback_QAbstractItemModel_CanDropMimeData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QAbstractItemModel) 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.QAbstractItemModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_DropMimeData +func miqt_exec_callback_QAbstractItemModel_DropMimeData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QAbstractItemModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QAbstractItemModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QAbstractItemModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_SupportedDropActions +func miqt_exec_callback_QAbstractItemModel_SupportedDropActions(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QAbstractItemModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QAbstractItemModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QAbstractItemModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_SupportedDragActions +func miqt_exec_callback_QAbstractItemModel_SupportedDragActions(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractItemModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QAbstractItemModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_InsertRows +func miqt_exec_callback_QAbstractItemModel_InsertRows(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractItemModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QAbstractItemModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_InsertColumns +func miqt_exec_callback_QAbstractItemModel_InsertColumns(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractItemModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QAbstractItemModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_RemoveRows +func miqt_exec_callback_QAbstractItemModel_RemoveRows(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractItemModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QAbstractItemModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_RemoveColumns +func miqt_exec_callback_QAbstractItemModel_RemoveColumns(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QAbstractItemModel) 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.QAbstractItemModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_MoveRows +func miqt_exec_callback_QAbstractItemModel_MoveRows(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QAbstractItemModel) 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.QAbstractItemModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_MoveColumns +func miqt_exec_callback_QAbstractItemModel_MoveColumns(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QAbstractItemModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QAbstractItemModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QAbstractItemModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_FetchMore +func miqt_exec_callback_QAbstractItemModel_FetchMore(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QAbstractItemModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QAbstractItemModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QAbstractItemModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_CanFetchMore +func miqt_exec_callback_QAbstractItemModel_CanFetchMore(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QAbstractItemModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QAbstractItemModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QAbstractItemModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Flags +func miqt_exec_callback_QAbstractItemModel_Flags(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QAbstractItemModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QAbstractItemModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QAbstractItemModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Sort +func miqt_exec_callback_QAbstractItemModel_Sort(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QAbstractItemModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QAbstractItemModel_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 *QAbstractItemModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QAbstractItemModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Buddy +func miqt_exec_callback_QAbstractItemModel_Buddy(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QAbstractItemModel_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 *QAbstractItemModel) 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.QAbstractItemModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Match +func miqt_exec_callback_QAbstractItemModel_Match(self *C.QAbstractItemModel, 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((&QAbstractItemModel{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 *QAbstractItemModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QAbstractItemModel_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 *QAbstractItemModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QAbstractItemModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Span +func miqt_exec_callback_QAbstractItemModel_Span(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QAbstractItemModel_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 *QAbstractItemModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QAbstractItemModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_RoleNames +func miqt_exec_callback_QAbstractItemModel_RoleNames(self *C.QAbstractItemModel, 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((&QAbstractItemModel{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 *QAbstractItemModel) callVirtualBase_MultiData(index *QModelIndex, roleDataSpan QModelRoleDataSpan) { + + C.QAbstractItemModel_virtualbase_MultiData(unsafe.Pointer(this.h), index.cPointer(), roleDataSpan.cPointer()) + +} +func (this *QAbstractItemModel) OnMultiData(slot func(super func(index *QModelIndex, roleDataSpan QModelRoleDataSpan), index *QModelIndex, roleDataSpan QModelRoleDataSpan)) { + C.QAbstractItemModel_override_virtual_MultiData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_MultiData +func miqt_exec_callback_QAbstractItemModel_MultiData(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_MultiData, slotval1, slotval2) + +} + +func (this *QAbstractItemModel) callVirtualBase_Submit() bool { + + return (bool)(C.QAbstractItemModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QAbstractItemModel) OnSubmit(slot func(super func() bool) bool) { + C.QAbstractItemModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Submit +func miqt_exec_callback_QAbstractItemModel_Submit(self *C.QAbstractItemModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractItemModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_Revert() { + + C.QAbstractItemModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QAbstractItemModel) OnRevert(slot func(super func())) { + C.QAbstractItemModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Revert +func miqt_exec_callback_QAbstractItemModel_Revert(self *C.QAbstractItemModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractItemModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QAbstractItemModel) callVirtualBase_ResetInternalData() { + + C.QAbstractItemModel_virtualbase_ResetInternalData(unsafe.Pointer(this.h)) + +} +func (this *QAbstractItemModel) OnResetInternalData(slot func(super func())) { + C.QAbstractItemModel_override_virtual_ResetInternalData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_ResetInternalData +func miqt_exec_callback_QAbstractItemModel_ResetInternalData(self *C.QAbstractItemModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractItemModel{h: self}).callVirtualBase_ResetInternalData) + +} + +func (this *QAbstractItemModel) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractItemModel) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractItemModel_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_Event +func miqt_exec_callback_QAbstractItemModel_Event(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAbstractItemModel_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAbstractItemModel) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAbstractItemModel_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_EventFilter +func miqt_exec_callback_QAbstractItemModel_EventFilter(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemModel) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAbstractItemModel_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemModel) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAbstractItemModel_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_TimerEvent +func miqt_exec_callback_QAbstractItemModel_TimerEvent(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractItemModel) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAbstractItemModel_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemModel) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAbstractItemModel_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_ChildEvent +func miqt_exec_callback_QAbstractItemModel_ChildEvent(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAbstractItemModel) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAbstractItemModel_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemModel) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractItemModel_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_CustomEvent +func miqt_exec_callback_QAbstractItemModel_CustomEvent(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAbstractItemModel) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAbstractItemModel_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractItemModel) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractItemModel_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_ConnectNotify +func miqt_exec_callback_QAbstractItemModel_ConnectNotify(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAbstractItemModel) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAbstractItemModel_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractItemModel) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractItemModel_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemModel_DisconnectNotify +func miqt_exec_callback_QAbstractItemModel_DisconnectNotify(self *C.QAbstractItemModel, 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((&QAbstractItemModel{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAbstractItemModel) Delete() { C.QAbstractItemModel_Delete(this.h, C.bool(this.isSubclass)) @@ -1252,6 +2529,30 @@ func UnsafeNewQAbstractTableModel(h unsafe.Pointer, h_QAbstractItemModel unsafe. QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } +// NewQAbstractTableModel constructs a new QAbstractTableModel object. +func NewQAbstractTableModel() *QAbstractTableModel { + var outptr_QAbstractTableModel *C.QAbstractTableModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractTableModel_new(&outptr_QAbstractTableModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQAbstractTableModel(outptr_QAbstractTableModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractTableModel2 constructs a new QAbstractTableModel object. +func NewQAbstractTableModel2(parent *QObject) *QAbstractTableModel { + var outptr_QAbstractTableModel *C.QAbstractTableModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractTableModel_new2(parent.cPointer(), &outptr_QAbstractTableModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQAbstractTableModel(outptr_QAbstractTableModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractTableModel) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractTableModel_MetaObject(this.h))) } @@ -1315,6 +2616,1059 @@ func QAbstractTableModel_Tr3(s string, c string, n int) string { return _ret } +func (this *QAbstractTableModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QAbstractTableModel_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 *QAbstractTableModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QAbstractTableModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Index +func miqt_exec_callback_QAbstractTableModel_Index(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractTableModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QAbstractTableModel_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 *QAbstractTableModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QAbstractTableModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Sibling +func miqt_exec_callback_QAbstractTableModel_Sibling(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractTableModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QAbstractTableModel) 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.QAbstractTableModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_DropMimeData +func miqt_exec_callback_QAbstractTableModel_DropMimeData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QAbstractTableModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QAbstractTableModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QAbstractTableModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Flags +func miqt_exec_callback_QAbstractTableModel_Flags(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractTableModel) OnRowCount(slot func(parent *QModelIndex) int) { + C.QAbstractTableModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_RowCount +func miqt_exec_callback_QAbstractTableModel_RowCount(self *C.QAbstractTableModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractTableModel) OnColumnCount(slot func(parent *QModelIndex) int) { + C.QAbstractTableModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_ColumnCount +func miqt_exec_callback_QAbstractTableModel_ColumnCount(self *C.QAbstractTableModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractTableModel) OnData(slot func(index *QModelIndex, role int) *QVariant) { + C.QAbstractTableModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Data +func miqt_exec_callback_QAbstractTableModel_Data(self *C.QAbstractTableModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractTableModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QAbstractTableModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QAbstractTableModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_SetData +func miqt_exec_callback_QAbstractTableModel_SetData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QAbstractTableModel_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 *QAbstractTableModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QAbstractTableModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_HeaderData +func miqt_exec_callback_QAbstractTableModel_HeaderData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractTableModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QAbstractTableModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QAbstractTableModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_SetHeaderData +func miqt_exec_callback_QAbstractTableModel_SetHeaderData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QAbstractTableModel_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 *QAbstractTableModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QAbstractTableModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_ItemData +func miqt_exec_callback_QAbstractTableModel_ItemData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{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 *QAbstractTableModel) 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.QAbstractTableModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QAbstractTableModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QAbstractTableModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_SetItemData +func miqt_exec_callback_QAbstractTableModel_SetItemData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_ClearItemData(index *QModelIndex) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_ClearItemData(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QAbstractTableModel) OnClearItemData(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QAbstractTableModel_override_virtual_ClearItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_ClearItemData +func miqt_exec_callback_QAbstractTableModel_ClearItemData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_ClearItemData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QAbstractTableModel_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 *QAbstractTableModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QAbstractTableModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_MimeTypes +func miqt_exec_callback_QAbstractTableModel_MimeTypes(self *C.QAbstractTableModel, 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((&QAbstractTableModel{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 *QAbstractTableModel) 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.QAbstractTableModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QAbstractTableModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QAbstractTableModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_MimeData +func miqt_exec_callback_QAbstractTableModel_MimeData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractTableModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QAbstractTableModel) 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.QAbstractTableModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_CanDropMimeData +func miqt_exec_callback_QAbstractTableModel_CanDropMimeData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QAbstractTableModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QAbstractTableModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QAbstractTableModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_SupportedDropActions +func miqt_exec_callback_QAbstractTableModel_SupportedDropActions(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QAbstractTableModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QAbstractTableModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QAbstractTableModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_SupportedDragActions +func miqt_exec_callback_QAbstractTableModel_SupportedDragActions(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractTableModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QAbstractTableModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_InsertRows +func miqt_exec_callback_QAbstractTableModel_InsertRows(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractTableModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QAbstractTableModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_InsertColumns +func miqt_exec_callback_QAbstractTableModel_InsertColumns(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractTableModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QAbstractTableModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_RemoveRows +func miqt_exec_callback_QAbstractTableModel_RemoveRows(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractTableModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QAbstractTableModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_RemoveColumns +func miqt_exec_callback_QAbstractTableModel_RemoveColumns(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QAbstractTableModel) 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.QAbstractTableModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_MoveRows +func miqt_exec_callback_QAbstractTableModel_MoveRows(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QAbstractTableModel) 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.QAbstractTableModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_MoveColumns +func miqt_exec_callback_QAbstractTableModel_MoveColumns(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QAbstractTableModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QAbstractTableModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QAbstractTableModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_FetchMore +func miqt_exec_callback_QAbstractTableModel_FetchMore(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QAbstractTableModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QAbstractTableModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QAbstractTableModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QAbstractTableModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_CanFetchMore +func miqt_exec_callback_QAbstractTableModel_CanFetchMore(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QAbstractTableModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QAbstractTableModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QAbstractTableModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Sort +func miqt_exec_callback_QAbstractTableModel_Sort(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QAbstractTableModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QAbstractTableModel_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 *QAbstractTableModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QAbstractTableModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Buddy +func miqt_exec_callback_QAbstractTableModel_Buddy(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractTableModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QAbstractTableModel_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 *QAbstractTableModel) 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.QAbstractTableModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Match +func miqt_exec_callback_QAbstractTableModel_Match(self *C.QAbstractTableModel, 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((&QAbstractTableModel{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 *QAbstractTableModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QAbstractTableModel_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 *QAbstractTableModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QAbstractTableModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Span +func miqt_exec_callback_QAbstractTableModel_Span(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractTableModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QAbstractTableModel_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 *QAbstractTableModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QAbstractTableModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_RoleNames +func miqt_exec_callback_QAbstractTableModel_RoleNames(self *C.QAbstractTableModel, 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((&QAbstractTableModel{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 *QAbstractTableModel) callVirtualBase_MultiData(index *QModelIndex, roleDataSpan QModelRoleDataSpan) { + + C.QAbstractTableModel_virtualbase_MultiData(unsafe.Pointer(this.h), index.cPointer(), roleDataSpan.cPointer()) + +} +func (this *QAbstractTableModel) OnMultiData(slot func(super func(index *QModelIndex, roleDataSpan QModelRoleDataSpan), index *QModelIndex, roleDataSpan QModelRoleDataSpan)) { + C.QAbstractTableModel_override_virtual_MultiData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_MultiData +func miqt_exec_callback_QAbstractTableModel_MultiData(self *C.QAbstractTableModel, 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((&QAbstractTableModel{h: self}).callVirtualBase_MultiData, slotval1, slotval2) + +} + +func (this *QAbstractTableModel) callVirtualBase_Submit() bool { + + return (bool)(C.QAbstractTableModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QAbstractTableModel) OnSubmit(slot func(super func() bool) bool) { + C.QAbstractTableModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Submit +func miqt_exec_callback_QAbstractTableModel_Submit(self *C.QAbstractTableModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractTableModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTableModel) callVirtualBase_Revert() { + + C.QAbstractTableModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QAbstractTableModel) OnRevert(slot func(super func())) { + C.QAbstractTableModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_Revert +func miqt_exec_callback_QAbstractTableModel_Revert(self *C.QAbstractTableModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractTableModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QAbstractTableModel) callVirtualBase_ResetInternalData() { + + C.QAbstractTableModel_virtualbase_ResetInternalData(unsafe.Pointer(this.h)) + +} +func (this *QAbstractTableModel) OnResetInternalData(slot func(super func())) { + C.QAbstractTableModel_override_virtual_ResetInternalData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTableModel_ResetInternalData +func miqt_exec_callback_QAbstractTableModel_ResetInternalData(self *C.QAbstractTableModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractTableModel{h: self}).callVirtualBase_ResetInternalData) + +} + // Delete this object from C++ memory. func (this *QAbstractTableModel) Delete() { C.QAbstractTableModel_Delete(this.h, C.bool(this.isSubclass)) @@ -1368,6 +3722,30 @@ func UnsafeNewQAbstractListModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.P QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } +// NewQAbstractListModel constructs a new QAbstractListModel object. +func NewQAbstractListModel() *QAbstractListModel { + var outptr_QAbstractListModel *C.QAbstractListModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractListModel_new(&outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQAbstractListModel(outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractListModel2 constructs a new QAbstractListModel object. +func NewQAbstractListModel2(parent *QObject) *QAbstractListModel { + var outptr_QAbstractListModel *C.QAbstractListModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractListModel_new2(parent.cPointer(), &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQAbstractListModel(outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractListModel) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractListModel_MetaObject(this.h))) } @@ -1431,6 +3809,1040 @@ func QAbstractListModel_Tr3(s string, c string, n int) string { return _ret } +func (this *QAbstractListModel) callVirtualBase_Index(row int, column int, parent *QModelIndex) *QModelIndex { + + _ret := C.QAbstractListModel_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 *QAbstractListModel) OnIndex(slot func(super func(row int, column int, parent *QModelIndex) *QModelIndex, row int, column int, parent *QModelIndex) *QModelIndex) { + C.QAbstractListModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Index +func miqt_exec_callback_QAbstractListModel_Index(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractListModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QAbstractListModel_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 *QAbstractListModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QAbstractListModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Sibling +func miqt_exec_callback_QAbstractListModel_Sibling(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractListModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractListModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QAbstractListModel) 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.QAbstractListModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_DropMimeData +func miqt_exec_callback_QAbstractListModel_DropMimeData(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QAbstractListModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QAbstractListModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QAbstractListModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Flags +func miqt_exec_callback_QAbstractListModel_Flags(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractListModel) OnRowCount(slot func(parent *QModelIndex) int) { + C.QAbstractListModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_RowCount +func miqt_exec_callback_QAbstractListModel_RowCount(self *C.QAbstractListModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractListModel) OnData(slot func(index *QModelIndex, role int) *QVariant) { + C.QAbstractListModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Data +func miqt_exec_callback_QAbstractListModel_Data(self *C.QAbstractListModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractListModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QAbstractListModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QAbstractListModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QAbstractListModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_SetData +func miqt_exec_callback_QAbstractListModel_SetData(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QAbstractListModel_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 *QAbstractListModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QAbstractListModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_HeaderData +func miqt_exec_callback_QAbstractListModel_HeaderData(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractListModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QAbstractListModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QAbstractListModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QAbstractListModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_SetHeaderData +func miqt_exec_callback_QAbstractListModel_SetHeaderData(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QAbstractListModel_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 *QAbstractListModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QAbstractListModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_ItemData +func miqt_exec_callback_QAbstractListModel_ItemData(self *C.QAbstractListModel, 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((&QAbstractListModel{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 *QAbstractListModel) 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.QAbstractListModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QAbstractListModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QAbstractListModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_SetItemData +func miqt_exec_callback_QAbstractListModel_SetItemData(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_ClearItemData(index *QModelIndex) bool { + + return (bool)(C.QAbstractListModel_virtualbase_ClearItemData(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QAbstractListModel) OnClearItemData(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QAbstractListModel_override_virtual_ClearItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_ClearItemData +func miqt_exec_callback_QAbstractListModel_ClearItemData(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_ClearItemData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QAbstractListModel_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 *QAbstractListModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QAbstractListModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_MimeTypes +func miqt_exec_callback_QAbstractListModel_MimeTypes(self *C.QAbstractListModel, 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((&QAbstractListModel{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 *QAbstractListModel) 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.QAbstractListModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QAbstractListModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QAbstractListModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_MimeData +func miqt_exec_callback_QAbstractListModel_MimeData(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractListModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractListModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QAbstractListModel) 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.QAbstractListModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_CanDropMimeData +func miqt_exec_callback_QAbstractListModel_CanDropMimeData(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QAbstractListModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QAbstractListModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QAbstractListModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_SupportedDropActions +func miqt_exec_callback_QAbstractListModel_SupportedDropActions(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QAbstractListModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QAbstractListModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QAbstractListModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_SupportedDragActions +func miqt_exec_callback_QAbstractListModel_SupportedDragActions(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractListModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractListModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QAbstractListModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_InsertRows +func miqt_exec_callback_QAbstractListModel_InsertRows(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractListModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractListModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QAbstractListModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_InsertColumns +func miqt_exec_callback_QAbstractListModel_InsertColumns(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractListModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractListModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QAbstractListModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_RemoveRows +func miqt_exec_callback_QAbstractListModel_RemoveRows(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractListModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractListModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QAbstractListModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_RemoveColumns +func miqt_exec_callback_QAbstractListModel_RemoveColumns(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QAbstractListModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QAbstractListModel) 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.QAbstractListModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_MoveRows +func miqt_exec_callback_QAbstractListModel_MoveRows(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QAbstractListModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QAbstractListModel) 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.QAbstractListModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_MoveColumns +func miqt_exec_callback_QAbstractListModel_MoveColumns(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QAbstractListModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QAbstractListModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QAbstractListModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_FetchMore +func miqt_exec_callback_QAbstractListModel_FetchMore(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QAbstractListModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QAbstractListModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QAbstractListModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QAbstractListModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_CanFetchMore +func miqt_exec_callback_QAbstractListModel_CanFetchMore(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QAbstractListModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QAbstractListModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QAbstractListModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Sort +func miqt_exec_callback_QAbstractListModel_Sort(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QAbstractListModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QAbstractListModel_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 *QAbstractListModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QAbstractListModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Buddy +func miqt_exec_callback_QAbstractListModel_Buddy(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractListModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QAbstractListModel_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 *QAbstractListModel) 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.QAbstractListModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Match +func miqt_exec_callback_QAbstractListModel_Match(self *C.QAbstractListModel, 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((&QAbstractListModel{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 *QAbstractListModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QAbstractListModel_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 *QAbstractListModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QAbstractListModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Span +func miqt_exec_callback_QAbstractListModel_Span(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractListModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QAbstractListModel_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 *QAbstractListModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QAbstractListModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_RoleNames +func miqt_exec_callback_QAbstractListModel_RoleNames(self *C.QAbstractListModel, 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((&QAbstractListModel{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 *QAbstractListModel) callVirtualBase_MultiData(index *QModelIndex, roleDataSpan QModelRoleDataSpan) { + + C.QAbstractListModel_virtualbase_MultiData(unsafe.Pointer(this.h), index.cPointer(), roleDataSpan.cPointer()) + +} +func (this *QAbstractListModel) OnMultiData(slot func(super func(index *QModelIndex, roleDataSpan QModelRoleDataSpan), index *QModelIndex, roleDataSpan QModelRoleDataSpan)) { + C.QAbstractListModel_override_virtual_MultiData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_MultiData +func miqt_exec_callback_QAbstractListModel_MultiData(self *C.QAbstractListModel, 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((&QAbstractListModel{h: self}).callVirtualBase_MultiData, slotval1, slotval2) + +} + +func (this *QAbstractListModel) callVirtualBase_Submit() bool { + + return (bool)(C.QAbstractListModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QAbstractListModel) OnSubmit(slot func(super func() bool) bool) { + C.QAbstractListModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Submit +func miqt_exec_callback_QAbstractListModel_Submit(self *C.QAbstractListModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractListModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractListModel) callVirtualBase_Revert() { + + C.QAbstractListModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QAbstractListModel) OnRevert(slot func(super func())) { + C.QAbstractListModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_Revert +func miqt_exec_callback_QAbstractListModel_Revert(self *C.QAbstractListModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractListModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QAbstractListModel) callVirtualBase_ResetInternalData() { + + C.QAbstractListModel_virtualbase_ResetInternalData(unsafe.Pointer(this.h)) + +} +func (this *QAbstractListModel) OnResetInternalData(slot func(super func())) { + C.QAbstractListModel_override_virtual_ResetInternalData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractListModel_ResetInternalData +func miqt_exec_callback_QAbstractListModel_ResetInternalData(self *C.QAbstractListModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractListModel{h: self}).callVirtualBase_ResetInternalData) + +} + // Delete this object from C++ memory. func (this *QAbstractListModel) Delete() { C.QAbstractListModel_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qabstractitemmodel.h b/qt6/gen_qabstractitemmodel.h index 398504e6..b6fbe0ed 100644 --- a/qt6/gen_qabstractitemmodel.h +++ b/qt6/gen_qabstractitemmodel.h @@ -19,6 +19,9 @@ class QAbstractItemModel; class QAbstractListModel; class QAbstractTableModel; class QByteArray; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QMimeData; class QModelIndex; @@ -27,12 +30,16 @@ class QModelRoleDataSpan; class QObject; class QPersistentModelIndex; class QSize; +class QTimerEvent; class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractListModel QAbstractListModel; typedef struct QAbstractTableModel QAbstractTableModel; 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 QModelIndex QModelIndex; @@ -41,6 +48,7 @@ typedef struct QModelRoleDataSpan QModelRoleDataSpan; typedef struct QObject QObject; typedef struct QPersistentModelIndex QPersistentModelIndex; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif @@ -114,6 +122,8 @@ bool QPersistentModelIndex_IsValid(const QPersistentModelIndex* self); QVariant* QPersistentModelIndex_Data1(const QPersistentModelIndex* self, int role); void QPersistentModelIndex_Delete(QPersistentModelIndex* self, bool isSubclass); +void QAbstractItemModel_new(QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QAbstractItemModel_new2(QObject* parent, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QAbstractItemModel_MetaObject(const QAbstractItemModel* self); void* QAbstractItemModel_Metacast(QAbstractItemModel* self, const char* param1); struct miqt_string QAbstractItemModel_Tr(const char* s); @@ -188,8 +198,98 @@ 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_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QAbstractItemModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QAbstractItemModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QAbstractItemModel_virtualbase_Parent(const void* self, QModelIndex* child); +void QAbstractItemModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QAbstractItemModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QAbstractItemModel_override_virtual_RowCount(void* self, intptr_t slot); +int QAbstractItemModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QAbstractItemModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QAbstractItemModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QAbstractItemModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_HasChildren(const void* self, QModelIndex* parent); +void QAbstractItemModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QAbstractItemModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QAbstractItemModel_override_virtual_SetData(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QAbstractItemModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QAbstractItemModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QAbstractItemModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QAbstractItemModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QAbstractItemModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QAbstractItemModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QAbstractItemModel_override_virtual_ClearItemData(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_ClearItemData(void* self, QModelIndex* index); +void QAbstractItemModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QAbstractItemModel_virtualbase_MimeTypes(const void* self); +void QAbstractItemModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QAbstractItemModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QAbstractItemModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QAbstractItemModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QAbstractItemModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QAbstractItemModel_virtualbase_SupportedDropActions(const void* self); +void QAbstractItemModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QAbstractItemModel_virtualbase_SupportedDragActions(const void* self); +void QAbstractItemModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QAbstractItemModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QAbstractItemModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QAbstractItemModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QAbstractItemModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QAbstractItemModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QAbstractItemModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QAbstractItemModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QAbstractItemModel_override_virtual_Flags(void* self, intptr_t slot); +int QAbstractItemModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QAbstractItemModel_override_virtual_Sort(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_Sort(void* self, int column, int order); +void QAbstractItemModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QAbstractItemModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QAbstractItemModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QAbstractItemModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QAbstractItemModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QAbstractItemModel_virtualbase_Span(const void* self, QModelIndex* index); +void QAbstractItemModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QAbstractItemModel_virtualbase_RoleNames(const void* self); +void QAbstractItemModel_override_virtual_MultiData(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_MultiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan); +void QAbstractItemModel_override_virtual_Submit(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_Submit(void* self); +void QAbstractItemModel_override_virtual_Revert(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_Revert(void* self); +void QAbstractItemModel_override_virtual_ResetInternalData(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_ResetInternalData(void* self); +void QAbstractItemModel_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_Event(void* self, QEvent* event); +void QAbstractItemModel_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractItemModel_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAbstractItemModel_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractItemModel_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAbstractItemModel_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_CustomEvent(void* self, QEvent* event); +void QAbstractItemModel_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAbstractItemModel_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAbstractItemModel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractItemModel_Delete(QAbstractItemModel* self, bool isSubclass); +void QAbstractTableModel_new(QAbstractTableModel** outptr_QAbstractTableModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QAbstractTableModel_new2(QObject* parent, QAbstractTableModel** outptr_QAbstractTableModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QAbstractTableModel_MetaObject(const QAbstractTableModel* self); void* QAbstractTableModel_Metacast(QAbstractTableModel* self, const char* param1); struct miqt_string QAbstractTableModel_Tr(const char* s); @@ -199,8 +299,80 @@ bool QAbstractTableModel_DropMimeData(QAbstractTableModel* self, QMimeData* data 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); +void QAbstractTableModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QAbstractTableModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QAbstractTableModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QAbstractTableModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QAbstractTableModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QAbstractTableModel_override_virtual_Flags(void* self, intptr_t slot); +int QAbstractTableModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QAbstractTableModel_override_virtual_RowCount(void* self, intptr_t slot); +int QAbstractTableModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QAbstractTableModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QAbstractTableModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QAbstractTableModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QAbstractTableModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QAbstractTableModel_override_virtual_SetData(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QAbstractTableModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QAbstractTableModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QAbstractTableModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QAbstractTableModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QAbstractTableModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QAbstractTableModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QAbstractTableModel_override_virtual_ClearItemData(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_ClearItemData(void* self, QModelIndex* index); +void QAbstractTableModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QAbstractTableModel_virtualbase_MimeTypes(const void* self); +void QAbstractTableModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QAbstractTableModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QAbstractTableModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QAbstractTableModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QAbstractTableModel_virtualbase_SupportedDropActions(const void* self); +void QAbstractTableModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QAbstractTableModel_virtualbase_SupportedDragActions(const void* self); +void QAbstractTableModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QAbstractTableModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QAbstractTableModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QAbstractTableModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QAbstractTableModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QAbstractTableModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QAbstractTableModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QAbstractTableModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QAbstractTableModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QAbstractTableModel_override_virtual_Sort(void* self, intptr_t slot); +void QAbstractTableModel_virtualbase_Sort(void* self, int column, int order); +void QAbstractTableModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QAbstractTableModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QAbstractTableModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QAbstractTableModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QAbstractTableModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QAbstractTableModel_virtualbase_Span(const void* self, QModelIndex* index); +void QAbstractTableModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QAbstractTableModel_virtualbase_RoleNames(const void* self); +void QAbstractTableModel_override_virtual_MultiData(void* self, intptr_t slot); +void QAbstractTableModel_virtualbase_MultiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan); +void QAbstractTableModel_override_virtual_Submit(void* self, intptr_t slot); +bool QAbstractTableModel_virtualbase_Submit(void* self); +void QAbstractTableModel_override_virtual_Revert(void* self, intptr_t slot); +void QAbstractTableModel_virtualbase_Revert(void* self); +void QAbstractTableModel_override_virtual_ResetInternalData(void* self, intptr_t slot); +void QAbstractTableModel_virtualbase_ResetInternalData(void* self); void QAbstractTableModel_Delete(QAbstractTableModel* self, bool isSubclass); +void QAbstractListModel_new(QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QAbstractListModel_new2(QObject* parent, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QAbstractListModel_MetaObject(const QAbstractListModel* self); void* QAbstractListModel_Metacast(QAbstractListModel* self, const char* param1); struct miqt_string QAbstractListModel_Tr(const char* s); @@ -210,6 +382,74 @@ bool QAbstractListModel_DropMimeData(QAbstractListModel* self, QMimeData* data, 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); +void QAbstractListModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QAbstractListModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QAbstractListModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QAbstractListModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QAbstractListModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QAbstractListModel_override_virtual_Flags(void* self, intptr_t slot); +int QAbstractListModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QAbstractListModel_override_virtual_RowCount(void* self, intptr_t slot); +int QAbstractListModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QAbstractListModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QAbstractListModel_virtualbase_Data(const void* self, QModelIndex* index, int role); +void QAbstractListModel_override_virtual_SetData(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QAbstractListModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QAbstractListModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QAbstractListModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QAbstractListModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QAbstractListModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QAbstractListModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QAbstractListModel_override_virtual_ClearItemData(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_ClearItemData(void* self, QModelIndex* index); +void QAbstractListModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QAbstractListModel_virtualbase_MimeTypes(const void* self); +void QAbstractListModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QAbstractListModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QAbstractListModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QAbstractListModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QAbstractListModel_virtualbase_SupportedDropActions(const void* self); +void QAbstractListModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QAbstractListModel_virtualbase_SupportedDragActions(const void* self); +void QAbstractListModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QAbstractListModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QAbstractListModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QAbstractListModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QAbstractListModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QAbstractListModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QAbstractListModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QAbstractListModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QAbstractListModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QAbstractListModel_override_virtual_Sort(void* self, intptr_t slot); +void QAbstractListModel_virtualbase_Sort(void* self, int column, int order); +void QAbstractListModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QAbstractListModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QAbstractListModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QAbstractListModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QAbstractListModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QAbstractListModel_virtualbase_Span(const void* self, QModelIndex* index); +void QAbstractListModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QAbstractListModel_virtualbase_RoleNames(const void* self); +void QAbstractListModel_override_virtual_MultiData(void* self, intptr_t slot); +void QAbstractListModel_virtualbase_MultiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan); +void QAbstractListModel_override_virtual_Submit(void* self, intptr_t slot); +bool QAbstractListModel_virtualbase_Submit(void* self); +void QAbstractListModel_override_virtual_Revert(void* self, intptr_t slot); +void QAbstractListModel_virtualbase_Revert(void* self); +void QAbstractListModel_override_virtual_ResetInternalData(void* self, intptr_t slot); +void QAbstractListModel_virtualbase_ResetInternalData(void* self); void QAbstractListModel_Delete(QAbstractListModel* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qabstractitemview.cpp b/qt6/gen_qabstractitemview.cpp index c64d0635..92315f4e 100644 --- a/qt6/gen_qabstractitemview.cpp +++ b/qt6/gen_qabstractitemview.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -10,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -18,8 +20,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -28,11 +32,1628 @@ #include #include #include +#include #include #include #include "gen_qabstractitemview.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractItemView : public virtual QAbstractItemView { +public: + + MiqtVirtualQAbstractItemView(QWidget* parent): QAbstractItemView(parent) {}; + MiqtVirtualQAbstractItemView(): QAbstractItemView() {}; + + virtual ~MiqtVirtualQAbstractItemView() = 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) { + QAbstractItemView::setModel(model); + return; + } + + QAbstractItemModel* sigval1 = model; + + miqt_exec_callback_QAbstractItemView_SetModel(this, handle__SetModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetModel(QAbstractItemModel* model) { + + QAbstractItemView::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) { + QAbstractItemView::setSelectionModel(selectionModel); + return; + } + + QItemSelectionModel* sigval1 = selectionModel; + + miqt_exec_callback_QAbstractItemView_SetSelectionModel(this, handle__SetSelectionModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSelectionModel(QItemSelectionModel* selectionModel) { + + QAbstractItemView::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) { + QAbstractItemView::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_QAbstractItemView_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); + + QAbstractItemView::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 QRect(); // Pure virtual, there is no base we can call + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QRect* callback_return_value = miqt_exec_callback_QAbstractItemView_VisualRect(const_cast(this), handle__VisualRect, sigval1); + + return *callback_return_value; + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + 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_QAbstractItemView_ScrollTo(this, handle__ScrollTo, sigval1, sigval2); + + + } + + // 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 QModelIndex(); // Pure virtual, there is no base we can call + } + + const QPoint& point_ret = point; + // Cast returned reference into pointer + QPoint* sigval1 = const_cast(&point_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QAbstractItemView_IndexAt(const_cast(this), handle__IndexAt, sigval1); + + return *callback_return_value; + } + + // 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 QAbstractItemView::sizeHintForRow(row); + } + + int sigval1 = row; + + int callback_return_value = miqt_exec_callback_QAbstractItemView_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 QAbstractItemView::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 QAbstractItemView::sizeHintForColumn(column); + } + + int sigval1 = column; + + int callback_return_value = miqt_exec_callback_QAbstractItemView_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 QAbstractItemView::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 QAbstractItemView::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_QAbstractItemView_ItemDelegateForIndex(const_cast(this), handle__ItemDelegateForIndex, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QAbstractItemDelegate* virtualbase_ItemDelegateForIndex(QModelIndex* index) const { + + return QAbstractItemView::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 QAbstractItemView::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QAbstractItemView_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(QAbstractItemView::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) { + QAbstractItemView::reset(); + return; + } + + + miqt_exec_callback_QAbstractItemView_Reset(this, handle__Reset); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset() { + + QAbstractItemView::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) { + QAbstractItemView::setRootIndex(index); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + miqt_exec_callback_QAbstractItemView_SetRootIndex(this, handle__SetRootIndex, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetRootIndex(QModelIndex* index) { + + QAbstractItemView::setRootIndex(*index); + + } + + // 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) { + QAbstractItemView::doItemsLayout(); + return; + } + + + miqt_exec_callback_QAbstractItemView_DoItemsLayout(this, handle__DoItemsLayout); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DoItemsLayout() { + + QAbstractItemView::doItemsLayout(); + + } + + // 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) { + QAbstractItemView::selectAll(); + return; + } + + + miqt_exec_callback_QAbstractItemView_SelectAll(this, handle__SelectAll); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectAll() { + + QAbstractItemView::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) { + QAbstractItemView::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_QAbstractItemView_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])); + } + + QAbstractItemView::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) { + QAbstractItemView::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_QAbstractItemView_RowsInserted(this, handle__RowsInserted, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsInserted(QModelIndex* parent, int start, int end) { + + QAbstractItemView::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) { + QAbstractItemView::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_QAbstractItemView_RowsAboutToBeRemoved(this, handle__RowsAboutToBeRemoved, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RowsAboutToBeRemoved(QModelIndex* parent, int start, int end) { + + QAbstractItemView::rowsAboutToBeRemoved(*parent, static_cast(start), static_cast(end)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QAbstractItemView::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QAbstractItemView_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QAbstractItemView::selectionChanged(*selected, *deselected); + + } + + // 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) { + QAbstractItemView::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_QAbstractItemView_CurrentChanged(this, handle__CurrentChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CurrentChanged(QModelIndex* current, QModelIndex* previous) { + + QAbstractItemView::currentChanged(*current, *previous); + + } + + // 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) { + QAbstractItemView::updateEditorData(); + return; + } + + + miqt_exec_callback_QAbstractItemView_UpdateEditorData(this, handle__UpdateEditorData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorData() { + + QAbstractItemView::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) { + QAbstractItemView::updateEditorGeometries(); + return; + } + + + miqt_exec_callback_QAbstractItemView_UpdateEditorGeometries(this, handle__UpdateEditorGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateEditorGeometries() { + + QAbstractItemView::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) { + QAbstractItemView::updateGeometries(); + return; + } + + + miqt_exec_callback_QAbstractItemView_UpdateGeometries(this, handle__UpdateGeometries); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometries() { + + QAbstractItemView::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) { + QAbstractItemView::verticalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QAbstractItemView_VerticalScrollbarAction(this, handle__VerticalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarAction(int action) { + + QAbstractItemView::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) { + QAbstractItemView::horizontalScrollbarAction(action); + return; + } + + int sigval1 = action; + + miqt_exec_callback_QAbstractItemView_HorizontalScrollbarAction(this, handle__HorizontalScrollbarAction, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarAction(int action) { + + QAbstractItemView::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) { + QAbstractItemView::verticalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QAbstractItemView_VerticalScrollbarValueChanged(this, handle__VerticalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VerticalScrollbarValueChanged(int value) { + + QAbstractItemView::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) { + QAbstractItemView::horizontalScrollbarValueChanged(value); + return; + } + + int sigval1 = value; + + miqt_exec_callback_QAbstractItemView_HorizontalScrollbarValueChanged(this, handle__HorizontalScrollbarValueChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HorizontalScrollbarValueChanged(int value) { + + QAbstractItemView::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) { + QAbstractItemView::closeEditor(editor, hint); + return; + } + + QWidget* sigval1 = editor; + QAbstractItemDelegate::EndEditHint hint_ret = hint; + int sigval2 = static_cast(hint_ret); + + miqt_exec_callback_QAbstractItemView_CloseEditor(this, handle__CloseEditor, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEditor(QWidget* editor, int hint) { + + QAbstractItemView::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) { + QAbstractItemView::commitData(editor); + return; + } + + QWidget* sigval1 = editor; + + miqt_exec_callback_QAbstractItemView_CommitData(this, handle__CommitData, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CommitData(QWidget* editor) { + + QAbstractItemView::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) { + QAbstractItemView::editorDestroyed(editor); + return; + } + + QObject* sigval1 = editor; + + miqt_exec_callback_QAbstractItemView_EditorDestroyed(this, handle__EditorDestroyed, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EditorDestroyed(QObject* editor) { + + QAbstractItemView::editorDestroyed(editor); + + } + + // 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 QModelIndex(); // Pure virtual, there is no base we can call + } + + 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_QAbstractItemView_MoveCursor(this, handle__MoveCursor, sigval1, sigval2); + + return *callback_return_value; + } + + // 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 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QAbstractItemView_HorizontalOffset(const_cast(this), handle__HorizontalOffset); + + return static_cast(callback_return_value); + } + + // 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 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QAbstractItemView_VerticalOffset(const_cast(this), handle__VerticalOffset); + + return static_cast(callback_return_value); + } + + // 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 false; // Pure virtual, there is no base we can call + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractItemView_IsIndexHidden(const_cast(this), handle__IsIndexHidden, sigval1); + + return callback_return_value; + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + 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_QAbstractItemView_SetSelection(this, handle__SetSelection, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QRegion(); // Pure virtual, there is no base we can call + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QAbstractItemView_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // 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 QAbstractItemView::selectedIndexes(); + } + + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QAbstractItemView_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 = QAbstractItemView::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 QAbstractItemView::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_QAbstractItemView_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 QAbstractItemView::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 QAbstractItemView::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_QAbstractItemView_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 = QAbstractItemView::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) { + QAbstractItemView::startDrag(supportedActions); + return; + } + + Qt::DropActions supportedActions_ret = supportedActions; + int sigval1 = static_cast(supportedActions_ret); + + miqt_exec_callback_QAbstractItemView_StartDrag(this, handle__StartDrag, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_StartDrag(int supportedActions) { + + QAbstractItemView::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) { + QAbstractItemView::initViewItemOption(option); + return; + } + + QStyleOptionViewItem* sigval1 = option; + + miqt_exec_callback_QAbstractItemView_InitViewItemOption(const_cast(this), handle__InitViewItemOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitViewItemOption(QStyleOptionViewItem* option) const { + + QAbstractItemView::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 QAbstractItemView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QAbstractItemView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QAbstractItemView::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 QAbstractItemView::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractItemView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAbstractItemView::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 QAbstractItemView::viewportEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractItemView_ViewportEvent(this, handle__ViewportEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ViewportEvent(QEvent* event) { + + return QAbstractItemView::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) { + QAbstractItemView::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractItemView::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) { + QAbstractItemView::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QAbstractItemView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QAbstractItemView::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 QAbstractItemView::eventFilter(object, event); + } + + QObject* sigval1 = object; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractItemView_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* object, QEvent* event) { + + return QAbstractItemView::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 QAbstractItemView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractItemView_ViewportSizeHint(const_cast(this), handle__ViewportSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ViewportSizeHint() const { + + return new QSize(QAbstractItemView::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 QAbstractItemView::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractItemView_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QAbstractItemView::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 QAbstractItemView::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QAbstractItemView_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QAbstractItemView::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) { + QAbstractItemView::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_QAbstractItemView_SetupViewport(this, handle__SetupViewport, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetupViewport(QWidget* viewport) { + + QAbstractItemView::setupViewport(viewport); + + } + + // 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) { + QAbstractItemView::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractItemView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QAbstractItemView::paintEvent(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) { + QAbstractItemView::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractItemView_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QAbstractItemView::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) { + QAbstractItemView::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QAbstractItemView_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QAbstractItemView::contextMenuEvent(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) { + QAbstractItemView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QAbstractItemView_ScrollContentsBy(this, handle__ScrollContentsBy, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScrollContentsBy(int dx, int dy) { + + QAbstractItemView::scrollContentsBy(static_cast(dx), static_cast(dy)); + + } + +}; + +void QAbstractItemView_new(QWidget* parent, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractItemView* ret = new MiqtVirtualQAbstractItemView(parent); + *outptr_QAbstractItemView = 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 QAbstractItemView_new2(QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQAbstractItemView* ret = new MiqtVirtualQAbstractItemView(); + *outptr_QAbstractItemView = 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* QAbstractItemView_MetaObject(const QAbstractItemView* self) { return (QMetaObject*) self->metaObject(); } @@ -350,7 +1971,7 @@ void QAbstractItemView_Pressed(QAbstractItemView* self, QModelIndex* index) { } void QAbstractItemView_connect_Pressed(QAbstractItemView* self, intptr_t slot) { - QAbstractItemView::connect(self, static_cast(&QAbstractItemView::pressed), self, [=](const QModelIndex& index) { + MiqtVirtualQAbstractItemView::connect(self, static_cast(&QAbstractItemView::pressed), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); @@ -363,7 +1984,7 @@ void QAbstractItemView_Clicked(QAbstractItemView* self, QModelIndex* index) { } void QAbstractItemView_connect_Clicked(QAbstractItemView* self, intptr_t slot) { - QAbstractItemView::connect(self, static_cast(&QAbstractItemView::clicked), self, [=](const QModelIndex& index) { + MiqtVirtualQAbstractItemView::connect(self, static_cast(&QAbstractItemView::clicked), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); @@ -376,7 +1997,7 @@ void QAbstractItemView_DoubleClicked(QAbstractItemView* self, QModelIndex* index } void QAbstractItemView_connect_DoubleClicked(QAbstractItemView* self, intptr_t slot) { - QAbstractItemView::connect(self, static_cast(&QAbstractItemView::doubleClicked), self, [=](const QModelIndex& index) { + MiqtVirtualQAbstractItemView::connect(self, static_cast(&QAbstractItemView::doubleClicked), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); @@ -389,7 +2010,7 @@ void QAbstractItemView_Activated(QAbstractItemView* self, QModelIndex* index) { } void QAbstractItemView_connect_Activated(QAbstractItemView* self, intptr_t slot) { - QAbstractItemView::connect(self, static_cast(&QAbstractItemView::activated), self, [=](const QModelIndex& index) { + MiqtVirtualQAbstractItemView::connect(self, static_cast(&QAbstractItemView::activated), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); @@ -402,7 +2023,7 @@ void QAbstractItemView_Entered(QAbstractItemView* self, QModelIndex* index) { } void QAbstractItemView_connect_Entered(QAbstractItemView* self, intptr_t slot) { - QAbstractItemView::connect(self, static_cast(&QAbstractItemView::entered), self, [=](const QModelIndex& index) { + MiqtVirtualQAbstractItemView::connect(self, static_cast(&QAbstractItemView::entered), self, [=](const QModelIndex& index) { const QModelIndex& index_ret = index; // Cast returned reference into pointer QModelIndex* sigval1 = const_cast(&index_ret); @@ -415,7 +2036,7 @@ void QAbstractItemView_ViewportEntered(QAbstractItemView* self) { } void QAbstractItemView_connect_ViewportEntered(QAbstractItemView* self, intptr_t slot) { - QAbstractItemView::connect(self, static_cast(&QAbstractItemView::viewportEntered), self, [=]() { + MiqtVirtualQAbstractItemView::connect(self, static_cast(&QAbstractItemView::viewportEntered), self, [=]() { miqt_exec_callback_QAbstractItemView_ViewportEntered(slot); }); } @@ -425,7 +2046,7 @@ void QAbstractItemView_IconSizeChanged(QAbstractItemView* self, QSize* size) { } void QAbstractItemView_connect_IconSizeChanged(QAbstractItemView* self, intptr_t slot) { - QAbstractItemView::connect(self, static_cast(&QAbstractItemView::iconSizeChanged), self, [=](const QSize& size) { + MiqtVirtualQAbstractItemView::connect(self, static_cast(&QAbstractItemView::iconSizeChanged), self, [=](const QSize& size) { const QSize& size_ret = size; // Cast returned reference into pointer QSize* sigval1 = const_cast(&size_ret); @@ -455,9 +2076,501 @@ struct miqt_string QAbstractItemView_Tr3(const char* s, const char* c, int n) { return _ms; } +void QAbstractItemView_override_virtual_SetModel(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SetModel = slot; +} + +void QAbstractItemView_virtualbase_SetModel(void* self, QAbstractItemModel* model) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SetModel(model); +} + +void QAbstractItemView_override_virtual_SetSelectionModel(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SetSelectionModel = slot; +} + +void QAbstractItemView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SetSelectionModel(selectionModel); +} + +void QAbstractItemView_override_virtual_KeyboardSearch(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__KeyboardSearch = slot; +} + +void QAbstractItemView_virtualbase_KeyboardSearch(void* self, struct miqt_string search) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_KeyboardSearch(search); +} + +void QAbstractItemView_override_virtual_VisualRect(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__VisualRect = slot; +} + +void QAbstractItemView_override_virtual_ScrollTo(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__ScrollTo = slot; +} + +void QAbstractItemView_override_virtual_IndexAt(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__IndexAt = slot; +} + +void QAbstractItemView_override_virtual_SizeHintForRow(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SizeHintForRow = slot; +} + +int QAbstractItemView_virtualbase_SizeHintForRow(const void* self, int row) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SizeHintForRow(row); +} + +void QAbstractItemView_override_virtual_SizeHintForColumn(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SizeHintForColumn = slot; +} + +int QAbstractItemView_virtualbase_SizeHintForColumn(const void* self, int column) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SizeHintForColumn(column); +} + +void QAbstractItemView_override_virtual_ItemDelegateForIndex(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__ItemDelegateForIndex = slot; +} + +QAbstractItemDelegate* QAbstractItemView_virtualbase_ItemDelegateForIndex(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_ItemDelegateForIndex(index); +} + +void QAbstractItemView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QAbstractItemView_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QAbstractItemView_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__Reset = slot; +} + +void QAbstractItemView_virtualbase_Reset(void* self) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_Reset(); +} + +void QAbstractItemView_override_virtual_SetRootIndex(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SetRootIndex = slot; +} + +void QAbstractItemView_virtualbase_SetRootIndex(void* self, QModelIndex* index) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SetRootIndex(index); +} + +void QAbstractItemView_override_virtual_DoItemsLayout(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__DoItemsLayout = slot; +} + +void QAbstractItemView_virtualbase_DoItemsLayout(void* self) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_DoItemsLayout(); +} + +void QAbstractItemView_override_virtual_SelectAll(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SelectAll = slot; +} + +void QAbstractItemView_virtualbase_SelectAll(void* self) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SelectAll(); +} + +void QAbstractItemView_override_virtual_DataChanged(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__DataChanged = slot; +} + +void QAbstractItemView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_DataChanged(topLeft, bottomRight, roles); +} + +void QAbstractItemView_override_virtual_RowsInserted(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__RowsInserted = slot; +} + +void QAbstractItemView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_RowsInserted(parent, start, end); +} + +void QAbstractItemView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__RowsAboutToBeRemoved = slot; +} + +void QAbstractItemView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); +} + +void QAbstractItemView_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SelectionChanged = slot; +} + +void QAbstractItemView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + +void QAbstractItemView_override_virtual_CurrentChanged(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__CurrentChanged = slot; +} + +void QAbstractItemView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_CurrentChanged(current, previous); +} + +void QAbstractItemView_override_virtual_UpdateEditorData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__UpdateEditorData = slot; +} + +void QAbstractItemView_virtualbase_UpdateEditorData(void* self) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_UpdateEditorData(); +} + +void QAbstractItemView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__UpdateEditorGeometries = slot; +} + +void QAbstractItemView_virtualbase_UpdateEditorGeometries(void* self) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_UpdateEditorGeometries(); +} + +void QAbstractItemView_override_virtual_UpdateGeometries(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__UpdateGeometries = slot; +} + +void QAbstractItemView_virtualbase_UpdateGeometries(void* self) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_UpdateGeometries(); +} + +void QAbstractItemView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__VerticalScrollbarAction = slot; +} + +void QAbstractItemView_virtualbase_VerticalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_VerticalScrollbarAction(action); +} + +void QAbstractItemView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__HorizontalScrollbarAction = slot; +} + +void QAbstractItemView_virtualbase_HorizontalScrollbarAction(void* self, int action) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_HorizontalScrollbarAction(action); +} + +void QAbstractItemView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__VerticalScrollbarValueChanged = slot; +} + +void QAbstractItemView_virtualbase_VerticalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_VerticalScrollbarValueChanged(value); +} + +void QAbstractItemView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__HorizontalScrollbarValueChanged = slot; +} + +void QAbstractItemView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_HorizontalScrollbarValueChanged(value); +} + +void QAbstractItemView_override_virtual_CloseEditor(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__CloseEditor = slot; +} + +void QAbstractItemView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_CloseEditor(editor, hint); +} + +void QAbstractItemView_override_virtual_CommitData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__CommitData = slot; +} + +void QAbstractItemView_virtualbase_CommitData(void* self, QWidget* editor) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_CommitData(editor); +} + +void QAbstractItemView_override_virtual_EditorDestroyed(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__EditorDestroyed = slot; +} + +void QAbstractItemView_virtualbase_EditorDestroyed(void* self, QObject* editor) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_EditorDestroyed(editor); +} + +void QAbstractItemView_override_virtual_MoveCursor(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__MoveCursor = slot; +} + +void QAbstractItemView_override_virtual_HorizontalOffset(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__HorizontalOffset = slot; +} + +void QAbstractItemView_override_virtual_VerticalOffset(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__VerticalOffset = slot; +} + +void QAbstractItemView_override_virtual_IsIndexHidden(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__IsIndexHidden = slot; +} + +void QAbstractItemView_override_virtual_SetSelection(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SetSelection = slot; +} + +void QAbstractItemView_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__VisualRegionForSelection = slot; +} + +void QAbstractItemView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SelectedIndexes = slot; +} + +struct miqt_array /* of QModelIndex* */ QAbstractItemView_virtualbase_SelectedIndexes(const void* self) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SelectedIndexes(); +} + +void QAbstractItemView_override_virtual_Edit2(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__Edit2 = slot; +} + +bool QAbstractItemView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event) { + return ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_Edit2(index, trigger, event); +} + +void QAbstractItemView_override_virtual_SelectionCommand(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SelectionCommand = slot; +} + +int QAbstractItemView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SelectionCommand(index, event); +} + +void QAbstractItemView_override_virtual_StartDrag(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__StartDrag = slot; +} + +void QAbstractItemView_virtualbase_StartDrag(void* self, int supportedActions) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_StartDrag(supportedActions); +} + +void QAbstractItemView_override_virtual_InitViewItemOption(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__InitViewItemOption = slot; +} + +void QAbstractItemView_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option) { + ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_InitViewItemOption(option); +} + +void QAbstractItemView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QAbstractItemView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QAbstractItemView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__Event = slot; +} + +bool QAbstractItemView_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_Event(event); +} + +void QAbstractItemView_override_virtual_ViewportEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__ViewportEvent = slot; +} + +bool QAbstractItemView_virtualbase_ViewportEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_ViewportEvent(event); +} + +void QAbstractItemView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__MousePressEvent = slot; +} + +void QAbstractItemView_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_MousePressEvent(event); +} + +void QAbstractItemView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QAbstractItemView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QAbstractItemView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QAbstractItemView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QAbstractItemView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QAbstractItemView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QAbstractItemView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__DragEnterEvent = slot; +} + +void QAbstractItemView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QAbstractItemView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__DragMoveEvent = slot; +} + +void QAbstractItemView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QAbstractItemView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QAbstractItemView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QAbstractItemView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__DropEvent = slot; +} + +void QAbstractItemView_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_DropEvent(event); +} + +void QAbstractItemView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__FocusInEvent = slot; +} + +void QAbstractItemView_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_FocusInEvent(event); +} + +void QAbstractItemView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__FocusOutEvent = slot; +} + +void QAbstractItemView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QAbstractItemView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__KeyPressEvent = slot; +} + +void QAbstractItemView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QAbstractItemView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__ResizeEvent = slot; +} + +void QAbstractItemView_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_ResizeEvent(event); +} + +void QAbstractItemView_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractItemView_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractItemView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__InputMethodEvent = slot; +} + +void QAbstractItemView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QAbstractItemView_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractItemView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event) { + return ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_EventFilter(object, event); +} + +void QAbstractItemView_override_virtual_ViewportSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__ViewportSizeHint = slot; +} + +QSize* QAbstractItemView_virtualbase_ViewportSizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_ViewportSizeHint(); +} + +void QAbstractItemView_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QAbstractItemView_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QAbstractItemView_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SizeHint = slot; +} + +QSize* QAbstractItemView_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SizeHint(); +} + +void QAbstractItemView_override_virtual_SetupViewport(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__SetupViewport = slot; +} + +void QAbstractItemView_virtualbase_SetupViewport(void* self, QWidget* viewport) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_SetupViewport(viewport); +} + +void QAbstractItemView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__PaintEvent = slot; +} + +void QAbstractItemView_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_PaintEvent(param1); +} + +void QAbstractItemView_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__WheelEvent = slot; +} + +void QAbstractItemView_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_WheelEvent(param1); +} + +void QAbstractItemView_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__ContextMenuEvent = slot; +} + +void QAbstractItemView_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QAbstractItemView_override_virtual_ScrollContentsBy(void* self, intptr_t slot) { + dynamic_cast( (QAbstractItemView*)(self) )->handle__ScrollContentsBy = slot; +} + +void QAbstractItemView_virtualbase_ScrollContentsBy(void* self, int dx, int dy) { + ( (MiqtVirtualQAbstractItemView*)(self) )->virtualbase_ScrollContentsBy(dx, dy); +} + void QAbstractItemView_Delete(QAbstractItemView* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qabstractitemview.go b/qt6/gen_qabstractitemview.go index 64865728..23c57b52 100644 --- a/qt6/gen_qabstractitemview.go +++ b/qt6/gen_qabstractitemview.go @@ -145,6 +145,36 @@ func UnsafeNewQAbstractItemView(h unsafe.Pointer, h_QAbstractScrollArea unsafe.P QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} } +// NewQAbstractItemView constructs a new QAbstractItemView object. +func NewQAbstractItemView(parent *QWidget) *QAbstractItemView { + 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.QAbstractItemView_new(parent.cPointer(), &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractItemView(outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQAbstractItemView2 constructs a new QAbstractItemView object. +func NewQAbstractItemView2() *QAbstractItemView { + 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.QAbstractItemView_new2(&outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQAbstractItemView(outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + func (this *QAbstractItemView) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractItemView_MetaObject(this.h))) } @@ -632,6 +662,1543 @@ func QAbstractItemView_Tr3(s string, c string, n int) string { return _ret } +func (this *QAbstractItemView) callVirtualBase_SetModel(model *QAbstractItemModel) { + + C.QAbstractItemView_virtualbase_SetModel(unsafe.Pointer(this.h), model.cPointer()) + +} +func (this *QAbstractItemView) OnSetModel(slot func(super func(model *QAbstractItemModel), model *QAbstractItemModel)) { + C.QAbstractItemView_override_virtual_SetModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SetModel +func miqt_exec_callback_QAbstractItemView_SetModel(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_SetModel, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_SetSelectionModel(selectionModel *QItemSelectionModel) { + + C.QAbstractItemView_virtualbase_SetSelectionModel(unsafe.Pointer(this.h), selectionModel.cPointer()) + +} +func (this *QAbstractItemView) OnSetSelectionModel(slot func(super func(selectionModel *QItemSelectionModel), selectionModel *QItemSelectionModel)) { + C.QAbstractItemView_override_virtual_SetSelectionModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SetSelectionModel +func miqt_exec_callback_QAbstractItemView_SetSelectionModel(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_SetSelectionModel, slotval1) + +} + +func (this *QAbstractItemView) 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.QAbstractItemView_virtualbase_KeyboardSearch(unsafe.Pointer(this.h), search_ms) + +} +func (this *QAbstractItemView) OnKeyboardSearch(slot func(super func(search string), search string)) { + C.QAbstractItemView_override_virtual_KeyboardSearch(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_KeyboardSearch +func miqt_exec_callback_QAbstractItemView_KeyboardSearch(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_KeyboardSearch, slotval1) + +} +func (this *QAbstractItemView) OnVisualRect(slot func(index *QModelIndex) *QRect) { + C.QAbstractItemView_override_virtual_VisualRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_VisualRect +func miqt_exec_callback_QAbstractItemView_VisualRect(self *C.QAbstractItemView, cb C.intptr_t, index *C.QModelIndex) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} +func (this *QAbstractItemView) OnScrollTo(slot func(index *QModelIndex, hint QAbstractItemView__ScrollHint)) { + C.QAbstractItemView_override_virtual_ScrollTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_ScrollTo +func miqt_exec_callback_QAbstractItemView_ScrollTo(self *C.QAbstractItemView, cb C.intptr_t, index *C.QModelIndex, hint C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + +} +func (this *QAbstractItemView) OnIndexAt(slot func(point *QPoint) *QModelIndex) { + C.QAbstractItemView_override_virtual_IndexAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_IndexAt +func miqt_exec_callback_QAbstractItemView_IndexAt(self *C.QAbstractItemView, cb C.intptr_t, point *C.QPoint) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemView) callVirtualBase_SizeHintForRow(row int) int { + + return (int)(C.QAbstractItemView_virtualbase_SizeHintForRow(unsafe.Pointer(this.h), (C.int)(row))) + +} +func (this *QAbstractItemView) OnSizeHintForRow(slot func(super func(row int) int, row int) int) { + C.QAbstractItemView_override_virtual_SizeHintForRow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SizeHintForRow +func miqt_exec_callback_QAbstractItemView_SizeHintForRow(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_SizeHintForRow, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractItemView) callVirtualBase_SizeHintForColumn(column int) int { + + return (int)(C.QAbstractItemView_virtualbase_SizeHintForColumn(unsafe.Pointer(this.h), (C.int)(column))) + +} +func (this *QAbstractItemView) OnSizeHintForColumn(slot func(super func(column int) int, column int) int) { + C.QAbstractItemView_override_virtual_SizeHintForColumn(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SizeHintForColumn +func miqt_exec_callback_QAbstractItemView_SizeHintForColumn(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_SizeHintForColumn, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractItemView) callVirtualBase_ItemDelegateForIndex(index *QModelIndex) *QAbstractItemDelegate { + + return UnsafeNewQAbstractItemDelegate(unsafe.Pointer(C.QAbstractItemView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer())), nil) +} +func (this *QAbstractItemView) OnItemDelegateForIndex(slot func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) { + C.QAbstractItemView_override_virtual_ItemDelegateForIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_ItemDelegateForIndex +func miqt_exec_callback_QAbstractItemView_ItemDelegateForIndex(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_ItemDelegateForIndex, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemView) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QAbstractItemView_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 *QAbstractItemView) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QAbstractItemView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_InputMethodQuery +func miqt_exec_callback_QAbstractItemView_InputMethodQuery(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemView) callVirtualBase_Reset() { + + C.QAbstractItemView_virtualbase_Reset(unsafe.Pointer(this.h)) + +} +func (this *QAbstractItemView) OnReset(slot func(super func())) { + C.QAbstractItemView_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_Reset +func miqt_exec_callback_QAbstractItemView_Reset(self *C.QAbstractItemView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractItemView{h: self}).callVirtualBase_Reset) + +} + +func (this *QAbstractItemView) callVirtualBase_SetRootIndex(index *QModelIndex) { + + C.QAbstractItemView_virtualbase_SetRootIndex(unsafe.Pointer(this.h), index.cPointer()) + +} +func (this *QAbstractItemView) OnSetRootIndex(slot func(super func(index *QModelIndex), index *QModelIndex)) { + C.QAbstractItemView_override_virtual_SetRootIndex(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SetRootIndex +func miqt_exec_callback_QAbstractItemView_SetRootIndex(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_SetRootIndex, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_DoItemsLayout() { + + C.QAbstractItemView_virtualbase_DoItemsLayout(unsafe.Pointer(this.h)) + +} +func (this *QAbstractItemView) OnDoItemsLayout(slot func(super func())) { + C.QAbstractItemView_override_virtual_DoItemsLayout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_DoItemsLayout +func miqt_exec_callback_QAbstractItemView_DoItemsLayout(self *C.QAbstractItemView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractItemView{h: self}).callVirtualBase_DoItemsLayout) + +} + +func (this *QAbstractItemView) callVirtualBase_SelectAll() { + + C.QAbstractItemView_virtualbase_SelectAll(unsafe.Pointer(this.h)) + +} +func (this *QAbstractItemView) OnSelectAll(slot func(super func())) { + C.QAbstractItemView_override_virtual_SelectAll(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SelectAll +func miqt_exec_callback_QAbstractItemView_SelectAll(self *C.QAbstractItemView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractItemView{h: self}).callVirtualBase_SelectAll) + +} + +func (this *QAbstractItemView) 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.QAbstractItemView_virtualbase_DataChanged(unsafe.Pointer(this.h), topLeft.cPointer(), bottomRight.cPointer(), roles_ma) + +} +func (this *QAbstractItemView) OnDataChanged(slot func(super func(topLeft *QModelIndex, bottomRight *QModelIndex, roles []int), topLeft *QModelIndex, bottomRight *QModelIndex, roles []int)) { + C.QAbstractItemView_override_virtual_DataChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_DataChanged +func miqt_exec_callback_QAbstractItemView_DataChanged(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_DataChanged, slotval1, slotval2, slotval3) + +} + +func (this *QAbstractItemView) callVirtualBase_RowsInserted(parent *QModelIndex, start int, end int) { + + C.QAbstractItemView_virtualbase_RowsInserted(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QAbstractItemView) OnRowsInserted(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QAbstractItemView_override_virtual_RowsInserted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_RowsInserted +func miqt_exec_callback_QAbstractItemView_RowsInserted(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_RowsInserted, slotval1, slotval2, slotval3) + +} + +func (this *QAbstractItemView) callVirtualBase_RowsAboutToBeRemoved(parent *QModelIndex, start int, end int) { + + C.QAbstractItemView_virtualbase_RowsAboutToBeRemoved(unsafe.Pointer(this.h), parent.cPointer(), (C.int)(start), (C.int)(end)) + +} +func (this *QAbstractItemView) OnRowsAboutToBeRemoved(slot func(super func(parent *QModelIndex, start int, end int), parent *QModelIndex, start int, end int)) { + C.QAbstractItemView_override_virtual_RowsAboutToBeRemoved(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_RowsAboutToBeRemoved +func miqt_exec_callback_QAbstractItemView_RowsAboutToBeRemoved(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_RowsAboutToBeRemoved, slotval1, slotval2, slotval3) + +} + +func (this *QAbstractItemView) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QAbstractItemView_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QAbstractItemView) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QAbstractItemView_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SelectionChanged +func miqt_exec_callback_QAbstractItemView_SelectionChanged(self *C.QAbstractItemView, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QAbstractItemView{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + +func (this *QAbstractItemView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { + + C.QAbstractItemView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) + +} +func (this *QAbstractItemView) OnCurrentChanged(slot func(super func(current *QModelIndex, previous *QModelIndex), current *QModelIndex, previous *QModelIndex)) { + C.QAbstractItemView_override_virtual_CurrentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_CurrentChanged +func miqt_exec_callback_QAbstractItemView_CurrentChanged(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_CurrentChanged, slotval1, slotval2) + +} + +func (this *QAbstractItemView) callVirtualBase_UpdateEditorData() { + + C.QAbstractItemView_virtualbase_UpdateEditorData(unsafe.Pointer(this.h)) + +} +func (this *QAbstractItemView) OnUpdateEditorData(slot func(super func())) { + C.QAbstractItemView_override_virtual_UpdateEditorData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_UpdateEditorData +func miqt_exec_callback_QAbstractItemView_UpdateEditorData(self *C.QAbstractItemView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractItemView{h: self}).callVirtualBase_UpdateEditorData) + +} + +func (this *QAbstractItemView) callVirtualBase_UpdateEditorGeometries() { + + C.QAbstractItemView_virtualbase_UpdateEditorGeometries(unsafe.Pointer(this.h)) + +} +func (this *QAbstractItemView) OnUpdateEditorGeometries(slot func(super func())) { + C.QAbstractItemView_override_virtual_UpdateEditorGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_UpdateEditorGeometries +func miqt_exec_callback_QAbstractItemView_UpdateEditorGeometries(self *C.QAbstractItemView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractItemView{h: self}).callVirtualBase_UpdateEditorGeometries) + +} + +func (this *QAbstractItemView) callVirtualBase_UpdateGeometries() { + + C.QAbstractItemView_virtualbase_UpdateGeometries(unsafe.Pointer(this.h)) + +} +func (this *QAbstractItemView) OnUpdateGeometries(slot func(super func())) { + C.QAbstractItemView_override_virtual_UpdateGeometries(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_UpdateGeometries +func miqt_exec_callback_QAbstractItemView_UpdateGeometries(self *C.QAbstractItemView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractItemView{h: self}).callVirtualBase_UpdateGeometries) + +} + +func (this *QAbstractItemView) callVirtualBase_VerticalScrollbarAction(action int) { + + C.QAbstractItemView_virtualbase_VerticalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QAbstractItemView) OnVerticalScrollbarAction(slot func(super func(action int), action int)) { + C.QAbstractItemView_override_virtual_VerticalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_VerticalScrollbarAction +func miqt_exec_callback_QAbstractItemView_VerticalScrollbarAction(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_VerticalScrollbarAction, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_HorizontalScrollbarAction(action int) { + + C.QAbstractItemView_virtualbase_HorizontalScrollbarAction(unsafe.Pointer(this.h), (C.int)(action)) + +} +func (this *QAbstractItemView) OnHorizontalScrollbarAction(slot func(super func(action int), action int)) { + C.QAbstractItemView_override_virtual_HorizontalScrollbarAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_HorizontalScrollbarAction +func miqt_exec_callback_QAbstractItemView_HorizontalScrollbarAction(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_HorizontalScrollbarAction, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_VerticalScrollbarValueChanged(value int) { + + C.QAbstractItemView_virtualbase_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QAbstractItemView) OnVerticalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QAbstractItemView_override_virtual_VerticalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_VerticalScrollbarValueChanged +func miqt_exec_callback_QAbstractItemView_VerticalScrollbarValueChanged(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_VerticalScrollbarValueChanged, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_HorizontalScrollbarValueChanged(value int) { + + C.QAbstractItemView_virtualbase_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), (C.int)(value)) + +} +func (this *QAbstractItemView) OnHorizontalScrollbarValueChanged(slot func(super func(value int), value int)) { + C.QAbstractItemView_override_virtual_HorizontalScrollbarValueChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_HorizontalScrollbarValueChanged +func miqt_exec_callback_QAbstractItemView_HorizontalScrollbarValueChanged(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_HorizontalScrollbarValueChanged, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_CloseEditor(editor *QWidget, hint QAbstractItemDelegate__EndEditHint) { + + C.QAbstractItemView_virtualbase_CloseEditor(unsafe.Pointer(this.h), editor.cPointer(), (C.int)(hint)) + +} +func (this *QAbstractItemView) OnCloseEditor(slot func(super func(editor *QWidget, hint QAbstractItemDelegate__EndEditHint), editor *QWidget, hint QAbstractItemDelegate__EndEditHint)) { + C.QAbstractItemView_override_virtual_CloseEditor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_CloseEditor +func miqt_exec_callback_QAbstractItemView_CloseEditor(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_CloseEditor, slotval1, slotval2) + +} + +func (this *QAbstractItemView) callVirtualBase_CommitData(editor *QWidget) { + + C.QAbstractItemView_virtualbase_CommitData(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QAbstractItemView) OnCommitData(slot func(super func(editor *QWidget), editor *QWidget)) { + C.QAbstractItemView_override_virtual_CommitData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_CommitData +func miqt_exec_callback_QAbstractItemView_CommitData(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_CommitData, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_EditorDestroyed(editor *QObject) { + + C.QAbstractItemView_virtualbase_EditorDestroyed(unsafe.Pointer(this.h), editor.cPointer()) + +} +func (this *QAbstractItemView) OnEditorDestroyed(slot func(super func(editor *QObject), editor *QObject)) { + C.QAbstractItemView_override_virtual_EditorDestroyed(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_EditorDestroyed +func miqt_exec_callback_QAbstractItemView_EditorDestroyed(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_EditorDestroyed, slotval1) + +} +func (this *QAbstractItemView) OnMoveCursor(slot func(cursorAction QAbstractItemView__CursorAction, modifiers KeyboardModifier) *QModelIndex) { + C.QAbstractItemView_override_virtual_MoveCursor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_MoveCursor +func miqt_exec_callback_QAbstractItemView_MoveCursor(self *C.QAbstractItemView, cb C.intptr_t, cursorAction C.int, modifiers C.int) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return virtualReturn.cPointer() + +} +func (this *QAbstractItemView) OnHorizontalOffset(slot func() int) { + C.QAbstractItemView_override_virtual_HorizontalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_HorizontalOffset +func miqt_exec_callback_QAbstractItemView_HorizontalOffset(self *C.QAbstractItemView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *QAbstractItemView) OnVerticalOffset(slot func() int) { + C.QAbstractItemView_override_virtual_VerticalOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_VerticalOffset +func miqt_exec_callback_QAbstractItemView_VerticalOffset(self *C.QAbstractItemView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *QAbstractItemView) OnIsIndexHidden(slot func(index *QModelIndex) bool) { + C.QAbstractItemView_override_virtual_IsIndexHidden(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_IsIndexHidden +func miqt_exec_callback_QAbstractItemView_IsIndexHidden(self *C.QAbstractItemView, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QAbstractItemView) OnSetSelection(slot func(rect *QRect, command QItemSelectionModel__SelectionFlag)) { + C.QAbstractItemView_override_virtual_SetSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SetSelection +func miqt_exec_callback_QAbstractItemView_SetSelection(self *C.QAbstractItemView, cb C.intptr_t, rect *C.QRect, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + +} +func (this *QAbstractItemView) OnVisualRegionForSelection(slot func(selection *QItemSelection) *QRegion) { + C.QAbstractItemView_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_VisualRegionForSelection +func miqt_exec_callback_QAbstractItemView_VisualRegionForSelection(self *C.QAbstractItemView, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc(slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemView) callVirtualBase_SelectedIndexes() []QModelIndex { + + var _ma C.struct_miqt_array = C.QAbstractItemView_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 *QAbstractItemView) OnSelectedIndexes(slot func(super func() []QModelIndex) []QModelIndex) { + C.QAbstractItemView_override_virtual_SelectedIndexes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SelectedIndexes +func miqt_exec_callback_QAbstractItemView_SelectedIndexes(self *C.QAbstractItemView, 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((&QAbstractItemView{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 *QAbstractItemView) callVirtualBase_Edit2(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool { + + return (bool)(C.QAbstractItemView_virtualbase_Edit2(unsafe.Pointer(this.h), index.cPointer(), (C.int)(trigger), event.cPointer())) + +} +func (this *QAbstractItemView) OnEdit2(slot func(super func(index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool, index *QModelIndex, trigger QAbstractItemView__EditTrigger, event *QEvent) bool) { + C.QAbstractItemView_override_virtual_Edit2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_Edit2 +func miqt_exec_callback_QAbstractItemView_Edit2(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_Edit2, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemView) callVirtualBase_SelectionCommand(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag { + + return (QItemSelectionModel__SelectionFlag)(C.QAbstractItemView_virtualbase_SelectionCommand(unsafe.Pointer(this.h), index.cPointer(), event.cPointer())) + +} +func (this *QAbstractItemView) OnSelectionCommand(slot func(super func(index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag, index *QModelIndex, event *QEvent) QItemSelectionModel__SelectionFlag) { + C.QAbstractItemView_override_virtual_SelectionCommand(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SelectionCommand +func miqt_exec_callback_QAbstractItemView_SelectionCommand(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_SelectionCommand, slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractItemView) callVirtualBase_StartDrag(supportedActions DropAction) { + + C.QAbstractItemView_virtualbase_StartDrag(unsafe.Pointer(this.h), (C.int)(supportedActions)) + +} +func (this *QAbstractItemView) OnStartDrag(slot func(super func(supportedActions DropAction), supportedActions DropAction)) { + C.QAbstractItemView_override_virtual_StartDrag(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_StartDrag +func miqt_exec_callback_QAbstractItemView_StartDrag(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_StartDrag, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_InitViewItemOption(option *QStyleOptionViewItem) { + + C.QAbstractItemView_virtualbase_InitViewItemOption(unsafe.Pointer(this.h), option.cPointer()) + +} +func (this *QAbstractItemView) OnInitViewItemOption(slot func(super func(option *QStyleOptionViewItem), option *QStyleOptionViewItem)) { + C.QAbstractItemView_override_virtual_InitViewItemOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_InitViewItemOption +func miqt_exec_callback_QAbstractItemView_InitViewItemOption(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_InitViewItemOption, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QAbstractItemView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QAbstractItemView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QAbstractItemView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_FocusNextPrevChild +func miqt_exec_callback_QAbstractItemView_FocusNextPrevChild(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemView) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAbstractItemView_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractItemView) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractItemView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_Event +func miqt_exec_callback_QAbstractItemView_Event(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemView) callVirtualBase_ViewportEvent(event *QEvent) bool { + + return (bool)(C.QAbstractItemView_virtualbase_ViewportEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractItemView) OnViewportEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractItemView_override_virtual_ViewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_ViewportEvent +func miqt_exec_callback_QAbstractItemView_ViewportEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemView) callVirtualBase_MousePressEvent(event *QMouseEvent) { + + C.QAbstractItemView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnMousePressEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractItemView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_MousePressEvent +func miqt_exec_callback_QAbstractItemView_MousePressEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_MouseMoveEvent(event *QMouseEvent) { + + C.QAbstractItemView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnMouseMoveEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractItemView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_MouseMoveEvent +func miqt_exec_callback_QAbstractItemView_MouseMoveEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_MouseReleaseEvent(event *QMouseEvent) { + + C.QAbstractItemView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnMouseReleaseEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractItemView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_MouseReleaseEvent +func miqt_exec_callback_QAbstractItemView_MouseReleaseEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_MouseDoubleClickEvent(event *QMouseEvent) { + + C.QAbstractItemView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnMouseDoubleClickEvent(slot func(super func(event *QMouseEvent), event *QMouseEvent)) { + C.QAbstractItemView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_MouseDoubleClickEvent +func miqt_exec_callback_QAbstractItemView_MouseDoubleClickEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_DragEnterEvent(event *QDragEnterEvent) { + + C.QAbstractItemView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnDragEnterEvent(slot func(super func(event *QDragEnterEvent), event *QDragEnterEvent)) { + C.QAbstractItemView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_DragEnterEvent +func miqt_exec_callback_QAbstractItemView_DragEnterEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_DragMoveEvent(event *QDragMoveEvent) { + + C.QAbstractItemView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnDragMoveEvent(slot func(super func(event *QDragMoveEvent), event *QDragMoveEvent)) { + C.QAbstractItemView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_DragMoveEvent +func miqt_exec_callback_QAbstractItemView_DragMoveEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_DragLeaveEvent(event *QDragLeaveEvent) { + + C.QAbstractItemView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnDragLeaveEvent(slot func(super func(event *QDragLeaveEvent), event *QDragLeaveEvent)) { + C.QAbstractItemView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_DragLeaveEvent +func miqt_exec_callback_QAbstractItemView_DragLeaveEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_DropEvent(event *QDropEvent) { + + C.QAbstractItemView_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnDropEvent(slot func(super func(event *QDropEvent), event *QDropEvent)) { + C.QAbstractItemView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_DropEvent +func miqt_exec_callback_QAbstractItemView_DropEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QAbstractItemView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QAbstractItemView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_FocusInEvent +func miqt_exec_callback_QAbstractItemView_FocusInEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QAbstractItemView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QAbstractItemView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_FocusOutEvent +func miqt_exec_callback_QAbstractItemView_FocusOutEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QAbstractItemView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QAbstractItemView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_KeyPressEvent +func miqt_exec_callback_QAbstractItemView_KeyPressEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_ResizeEvent(event *QResizeEvent) { + + C.QAbstractItemView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnResizeEvent(slot func(super func(event *QResizeEvent), event *QResizeEvent)) { + C.QAbstractItemView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_ResizeEvent +func miqt_exec_callback_QAbstractItemView_ResizeEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAbstractItemView_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAbstractItemView_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_TimerEvent +func miqt_exec_callback_QAbstractItemView_TimerEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QAbstractItemView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractItemView) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QAbstractItemView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_InputMethodEvent +func miqt_exec_callback_QAbstractItemView_InputMethodEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_EventFilter(object *QObject, event *QEvent) bool { + + return (bool)(C.QAbstractItemView_virtualbase_EventFilter(unsafe.Pointer(this.h), object.cPointer(), event.cPointer())) + +} +func (this *QAbstractItemView) OnEventFilter(slot func(super func(object *QObject, event *QEvent) bool, object *QObject, event *QEvent) bool) { + C.QAbstractItemView_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_EventFilter +func miqt_exec_callback_QAbstractItemView_EventFilter(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractItemView) callVirtualBase_ViewportSizeHint() *QSize { + + _ret := C.QAbstractItemView_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 *QAbstractItemView) OnViewportSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractItemView_override_virtual_ViewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_ViewportSizeHint +func miqt_exec_callback_QAbstractItemView_ViewportSizeHint(self *C.QAbstractItemView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractItemView{h: self}).callVirtualBase_ViewportSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemView) callVirtualBase_MinimumSizeHint() *QSize { + + _ret := C.QAbstractItemView_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 *QAbstractItemView) OnMinimumSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractItemView_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_MinimumSizeHint +func miqt_exec_callback_QAbstractItemView_MinimumSizeHint(self *C.QAbstractItemView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractItemView{h: self}).callVirtualBase_MinimumSizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemView) callVirtualBase_SizeHint() *QSize { + + _ret := C.QAbstractItemView_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 *QAbstractItemView) OnSizeHint(slot func(super func() *QSize) *QSize) { + C.QAbstractItemView_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SizeHint +func miqt_exec_callback_QAbstractItemView_SizeHint(self *C.QAbstractItemView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractItemView{h: self}).callVirtualBase_SizeHint) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractItemView) callVirtualBase_SetupViewport(viewport *QWidget) { + + C.QAbstractItemView_virtualbase_SetupViewport(unsafe.Pointer(this.h), viewport.cPointer()) + +} +func (this *QAbstractItemView) OnSetupViewport(slot func(super func(viewport *QWidget), viewport *QWidget)) { + C.QAbstractItemView_override_virtual_SetupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_SetupViewport +func miqt_exec_callback_QAbstractItemView_SetupViewport(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_PaintEvent(param1 *QPaintEvent) { + + C.QAbstractItemView_virtualbase_PaintEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractItemView) OnPaintEvent(slot func(super func(param1 *QPaintEvent), param1 *QPaintEvent)) { + C.QAbstractItemView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_PaintEvent +func miqt_exec_callback_QAbstractItemView_PaintEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_WheelEvent(param1 *QWheelEvent) { + + C.QAbstractItemView_virtualbase_WheelEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractItemView) OnWheelEvent(slot func(super func(param1 *QWheelEvent), param1 *QWheelEvent)) { + C.QAbstractItemView_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_WheelEvent +func miqt_exec_callback_QAbstractItemView_WheelEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_ContextMenuEvent(param1 *QContextMenuEvent) { + + C.QAbstractItemView_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), param1.cPointer()) + +} +func (this *QAbstractItemView) OnContextMenuEvent(slot func(super func(param1 *QContextMenuEvent), param1 *QContextMenuEvent)) { + C.QAbstractItemView_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_ContextMenuEvent +func miqt_exec_callback_QAbstractItemView_ContextMenuEvent(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QAbstractItemView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QAbstractItemView_virtualbase_ScrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QAbstractItemView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + C.QAbstractItemView_override_virtual_ScrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractItemView_ScrollContentsBy +func miqt_exec_callback_QAbstractItemView_ScrollContentsBy(self *C.QAbstractItemView, 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((&QAbstractItemView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + // Delete this object from C++ memory. func (this *QAbstractItemView) Delete() { C.QAbstractItemView_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qabstractitemview.h b/qt6/gen_qabstractitemview.h index 377d9ba1..860844df 100644 --- a/qt6/gen_qabstractitemview.h +++ b/qt6/gen_qabstractitemview.h @@ -19,6 +19,7 @@ class QAbstractItemDelegate; class QAbstractItemModel; class QAbstractItemView; class QAbstractScrollArea; +class QContextMenuEvent; class QDragEnterEvent; class QDragLeaveEvent; class QDragMoveEvent; @@ -27,6 +28,7 @@ class QEvent; class QFocusEvent; class QFrame; class QInputMethodEvent; +class QItemSelection; class QItemSelectionModel; class QKeyEvent; class QMetaObject; @@ -34,19 +36,23 @@ class QModelIndex; class QMouseEvent; class QObject; class QPaintDevice; +class QPaintEvent; class QPoint; class QRect; +class QRegion; 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 QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; typedef struct QDragLeaveEvent QDragLeaveEvent; typedef struct QDragMoveEvent QDragMoveEvent; @@ -55,6 +61,7 @@ typedef struct QEvent QEvent; typedef struct QFocusEvent QFocusEvent; typedef struct QFrame QFrame; typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; @@ -62,16 +69,21 @@ 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 QRegion QRegion; 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 +void QAbstractItemView_new(QWidget* parent, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QAbstractItemView_new2(QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QAbstractItemView_MetaObject(const QAbstractItemView* self); void* QAbstractItemView_Metacast(QAbstractItemView* self, const char* param1); struct miqt_string QAbstractItemView_Tr(const char* s); @@ -149,6 +161,7 @@ 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_SelectionChanged(QAbstractItemView* self, QItemSelection* selected, QItemSelection* deselected); void QAbstractItemView_CurrentChanged(QAbstractItemView* self, QModelIndex* current, QModelIndex* previous); void QAbstractItemView_UpdateEditorData(QAbstractItemView* self); void QAbstractItemView_UpdateEditorGeometries(QAbstractItemView* self); @@ -179,6 +192,7 @@ 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); +QRegion* QAbstractItemView_VisualRegionForSelection(const QAbstractItemView* self, QItemSelection* selection); 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); @@ -205,6 +219,138 @@ bool QAbstractItemView_EventFilter(QAbstractItemView* self, QObject* object, QEv 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_override_virtual_SetModel(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_SetModel(void* self, QAbstractItemModel* model); +void QAbstractItemView_override_virtual_SetSelectionModel(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_SetSelectionModel(void* self, QItemSelectionModel* selectionModel); +void QAbstractItemView_override_virtual_KeyboardSearch(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_KeyboardSearch(void* self, struct miqt_string search); +void QAbstractItemView_override_virtual_VisualRect(void* self, intptr_t slot); +QRect* QAbstractItemView_virtualbase_VisualRect(const void* self, QModelIndex* index); +void QAbstractItemView_override_virtual_ScrollTo(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_ScrollTo(void* self, QModelIndex* index, int hint); +void QAbstractItemView_override_virtual_IndexAt(void* self, intptr_t slot); +QModelIndex* QAbstractItemView_virtualbase_IndexAt(const void* self, QPoint* point); +void QAbstractItemView_override_virtual_SizeHintForRow(void* self, intptr_t slot); +int QAbstractItemView_virtualbase_SizeHintForRow(const void* self, int row); +void QAbstractItemView_override_virtual_SizeHintForColumn(void* self, intptr_t slot); +int QAbstractItemView_virtualbase_SizeHintForColumn(const void* self, int column); +void QAbstractItemView_override_virtual_ItemDelegateForIndex(void* self, intptr_t slot); +QAbstractItemDelegate* QAbstractItemView_virtualbase_ItemDelegateForIndex(const void* self, QModelIndex* index); +void QAbstractItemView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QAbstractItemView_virtualbase_InputMethodQuery(const void* self, int query); +void QAbstractItemView_override_virtual_Reset(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_Reset(void* self); +void QAbstractItemView_override_virtual_SetRootIndex(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_SetRootIndex(void* self, QModelIndex* index); +void QAbstractItemView_override_virtual_DoItemsLayout(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_DoItemsLayout(void* self); +void QAbstractItemView_override_virtual_SelectAll(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_SelectAll(void* self); +void QAbstractItemView_override_virtual_DataChanged(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_DataChanged(void* self, QModelIndex* topLeft, QModelIndex* bottomRight, struct miqt_array /* of int */ roles); +void QAbstractItemView_override_virtual_RowsInserted(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_RowsInserted(void* self, QModelIndex* parent, int start, int end); +void QAbstractItemView_override_virtual_RowsAboutToBeRemoved(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* parent, int start, int end); +void QAbstractItemView_override_virtual_SelectionChanged(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); +void QAbstractItemView_override_virtual_CurrentChanged(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_CurrentChanged(void* self, QModelIndex* current, QModelIndex* previous); +void QAbstractItemView_override_virtual_UpdateEditorData(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_UpdateEditorData(void* self); +void QAbstractItemView_override_virtual_UpdateEditorGeometries(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_UpdateEditorGeometries(void* self); +void QAbstractItemView_override_virtual_UpdateGeometries(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_UpdateGeometries(void* self); +void QAbstractItemView_override_virtual_VerticalScrollbarAction(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_VerticalScrollbarAction(void* self, int action); +void QAbstractItemView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_HorizontalScrollbarAction(void* self, int action); +void QAbstractItemView_override_virtual_VerticalScrollbarValueChanged(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_VerticalScrollbarValueChanged(void* self, int value); +void QAbstractItemView_override_virtual_HorizontalScrollbarValueChanged(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_HorizontalScrollbarValueChanged(void* self, int value); +void QAbstractItemView_override_virtual_CloseEditor(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_CloseEditor(void* self, QWidget* editor, int hint); +void QAbstractItemView_override_virtual_CommitData(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_CommitData(void* self, QWidget* editor); +void QAbstractItemView_override_virtual_EditorDestroyed(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_EditorDestroyed(void* self, QObject* editor); +void QAbstractItemView_override_virtual_MoveCursor(void* self, intptr_t slot); +QModelIndex* QAbstractItemView_virtualbase_MoveCursor(void* self, int cursorAction, int modifiers); +void QAbstractItemView_override_virtual_HorizontalOffset(void* self, intptr_t slot); +int QAbstractItemView_virtualbase_HorizontalOffset(const void* self); +void QAbstractItemView_override_virtual_VerticalOffset(void* self, intptr_t slot); +int QAbstractItemView_virtualbase_VerticalOffset(const void* self); +void QAbstractItemView_override_virtual_IsIndexHidden(void* self, intptr_t slot); +bool QAbstractItemView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index); +void QAbstractItemView_override_virtual_SetSelection(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_SetSelection(void* self, QRect* rect, int command); +void QAbstractItemView_override_virtual_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QAbstractItemView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); +void QAbstractItemView_override_virtual_SelectedIndexes(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QAbstractItemView_virtualbase_SelectedIndexes(const void* self); +void QAbstractItemView_override_virtual_Edit2(void* self, intptr_t slot); +bool QAbstractItemView_virtualbase_Edit2(void* self, QModelIndex* index, int trigger, QEvent* event); +void QAbstractItemView_override_virtual_SelectionCommand(void* self, intptr_t slot); +int QAbstractItemView_virtualbase_SelectionCommand(const void* self, QModelIndex* index, QEvent* event); +void QAbstractItemView_override_virtual_StartDrag(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_StartDrag(void* self, int supportedActions); +void QAbstractItemView_override_virtual_InitViewItemOption(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_InitViewItemOption(const void* self, QStyleOptionViewItem* option); +void QAbstractItemView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QAbstractItemView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QAbstractItemView_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractItemView_virtualbase_Event(void* self, QEvent* event); +void QAbstractItemView_override_virtual_ViewportEvent(void* self, intptr_t slot); +bool QAbstractItemView_virtualbase_ViewportEvent(void* self, QEvent* event); +void QAbstractItemView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QAbstractItemView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QAbstractItemView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QAbstractItemView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QAbstractItemView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QAbstractItemView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QAbstractItemView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QAbstractItemView_override_virtual_DropEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_DropEvent(void* self, QDropEvent* event); +void QAbstractItemView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QAbstractItemView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QAbstractItemView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QAbstractItemView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QAbstractItemView_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractItemView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QAbstractItemView_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractItemView_virtualbase_EventFilter(void* self, QObject* object, QEvent* event); +void QAbstractItemView_override_virtual_ViewportSizeHint(void* self, intptr_t slot); +QSize* QAbstractItemView_virtualbase_ViewportSizeHint(const void* self); +void QAbstractItemView_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QAbstractItemView_virtualbase_MinimumSizeHint(const void* self); +void QAbstractItemView_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QAbstractItemView_virtualbase_SizeHint(const void* self); +void QAbstractItemView_override_virtual_SetupViewport(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_SetupViewport(void* self, QWidget* viewport); +void QAbstractItemView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QAbstractItemView_override_virtual_WheelEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QAbstractItemView_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QAbstractItemView_override_virtual_ScrollContentsBy(void* self, intptr_t slot); +void QAbstractItemView_virtualbase_ScrollContentsBy(void* self, int dx, int dy); void QAbstractItemView_Delete(QAbstractItemView* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qabstractnativeeventfilter.cpp b/qt6/gen_qabstractnativeeventfilter.cpp index 299e7fd1..caaf4679 100644 --- a/qt6/gen_qabstractnativeeventfilter.cpp +++ b/qt6/gen_qabstractnativeeventfilter.cpp @@ -4,14 +4,56 @@ #include "gen_qabstractnativeeventfilter.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractNativeEventFilter : public virtual QAbstractNativeEventFilter { +public: + + MiqtVirtualQAbstractNativeEventFilter(): QAbstractNativeEventFilter() {}; + + virtual ~MiqtVirtualQAbstractNativeEventFilter() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEventFilter(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__NativeEventFilter == 0) { + return false; // Pure virtual, there is no base we can call + } + + 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 = (intptr_t*)(result_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractNativeEventFilter_NativeEventFilter(this, handle__NativeEventFilter, sigval1, sigval2, sigval3); + + return callback_return_value; + } + +}; + +void QAbstractNativeEventFilter_new(QAbstractNativeEventFilter** outptr_QAbstractNativeEventFilter) { + MiqtVirtualQAbstractNativeEventFilter* ret = new MiqtVirtualQAbstractNativeEventFilter(); + *outptr_QAbstractNativeEventFilter = ret; +} + bool QAbstractNativeEventFilter_NativeEventFilter(QAbstractNativeEventFilter* self, struct miqt_string eventType, void* message, intptr_t* result) { QByteArray eventType_QByteArray(eventType.data, eventType.len); return self->nativeEventFilter(eventType_QByteArray, message, (qintptr*)(result)); } +void QAbstractNativeEventFilter_override_virtual_NativeEventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractNativeEventFilter*)(self) )->handle__NativeEventFilter = slot; +} + void QAbstractNativeEventFilter_Delete(QAbstractNativeEventFilter* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qabstractnativeeventfilter.go b/qt6/gen_qabstractnativeeventfilter.go index a52ace08..add60410 100644 --- a/qt6/gen_qabstractnativeeventfilter.go +++ b/qt6/gen_qabstractnativeeventfilter.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -49,12 +50,47 @@ func UnsafeNewQAbstractNativeEventFilter(h unsafe.Pointer) *QAbstractNativeEvent return &QAbstractNativeEventFilter{h: (*C.QAbstractNativeEventFilter)(h)} } +// NewQAbstractNativeEventFilter constructs a new QAbstractNativeEventFilter object. +func NewQAbstractNativeEventFilter() *QAbstractNativeEventFilter { + var outptr_QAbstractNativeEventFilter *C.QAbstractNativeEventFilter = nil + + C.QAbstractNativeEventFilter_new(&outptr_QAbstractNativeEventFilter) + ret := newQAbstractNativeEventFilter(outptr_QAbstractNativeEventFilter) + ret.isSubclass = true + return ret +} + func (this *QAbstractNativeEventFilter) NativeEventFilter(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.QAbstractNativeEventFilter_NativeEventFilter(this.h, eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) } +func (this *QAbstractNativeEventFilter) OnNativeEventFilter(slot func(eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QAbstractNativeEventFilter_override_virtual_NativeEventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractNativeEventFilter_NativeEventFilter +func miqt_exec_callback_QAbstractNativeEventFilter_NativeEventFilter(self *C.QAbstractNativeEventFilter, 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(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(slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} // Delete this object from C++ memory. func (this *QAbstractNativeEventFilter) Delete() { diff --git a/qt6/gen_qabstractnativeeventfilter.h b/qt6/gen_qabstractnativeeventfilter.h index 758800f1..724faac3 100644 --- a/qt6/gen_qabstractnativeeventfilter.h +++ b/qt6/gen_qabstractnativeeventfilter.h @@ -22,7 +22,10 @@ typedef struct QAbstractNativeEventFilter QAbstractNativeEventFilter; typedef struct QByteArray QByteArray; #endif +void QAbstractNativeEventFilter_new(QAbstractNativeEventFilter** outptr_QAbstractNativeEventFilter); bool QAbstractNativeEventFilter_NativeEventFilter(QAbstractNativeEventFilter* self, struct miqt_string eventType, void* message, intptr_t* result); +void QAbstractNativeEventFilter_override_virtual_NativeEventFilter(void* self, intptr_t slot); +bool QAbstractNativeEventFilter_virtualbase_NativeEventFilter(void* self, struct miqt_string eventType, void* message, intptr_t* result); void QAbstractNativeEventFilter_Delete(QAbstractNativeEventFilter* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qabstractproxymodel.cpp b/qt6/gen_qabstractproxymodel.cpp index f19bcedd..50ee9fa5 100644 --- a/qt6/gen_qabstractproxymodel.cpp +++ b/qt6/gen_qabstractproxymodel.cpp @@ -1,11 +1,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -16,6 +18,1195 @@ #include "gen_qabstractproxymodel.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractProxyModel : public virtual QAbstractProxyModel { +public: + + MiqtVirtualQAbstractProxyModel(): QAbstractProxyModel() {}; + MiqtVirtualQAbstractProxyModel(QObject* parent): QAbstractProxyModel(parent) {}; + + virtual ~MiqtVirtualQAbstractProxyModel() = 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) { + QAbstractProxyModel::setSourceModel(sourceModel); + return; + } + + QAbstractItemModel* sigval1 = sourceModel; + + miqt_exec_callback_QAbstractProxyModel_SetSourceModel(this, handle__SetSourceModel, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSourceModel(QAbstractItemModel* sourceModel) { + + QAbstractProxyModel::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 QModelIndex(); // Pure virtual, there is no base we can call + } + + const QModelIndex& proxyIndex_ret = proxyIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&proxyIndex_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QAbstractProxyModel_MapToSource(const_cast(this), handle__MapToSource, sigval1); + + return *callback_return_value; + } + + // 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 QModelIndex(); // Pure virtual, there is no base we can call + } + + const QModelIndex& sourceIndex_ret = sourceIndex; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceIndex_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QAbstractProxyModel_MapFromSource(const_cast(this), handle__MapFromSource, sigval1); + + return *callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapSelectionToSource = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelection mapSelectionToSource(const QItemSelection& selection) const override { + if (handle__MapSelectionToSource == 0) { + return QAbstractProxyModel::mapSelectionToSource(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QItemSelection* callback_return_value = miqt_exec_callback_QAbstractProxyModel_MapSelectionToSource(const_cast(this), handle__MapSelectionToSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QItemSelection* virtualbase_MapSelectionToSource(QItemSelection* selection) const { + + return new QItemSelection(QAbstractProxyModel::mapSelectionToSource(*selection)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapSelectionFromSource = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelection mapSelectionFromSource(const QItemSelection& selection) const override { + if (handle__MapSelectionFromSource == 0) { + return QAbstractProxyModel::mapSelectionFromSource(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QItemSelection* callback_return_value = miqt_exec_callback_QAbstractProxyModel_MapSelectionFromSource(const_cast(this), handle__MapSelectionFromSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QItemSelection* virtualbase_MapSelectionFromSource(QItemSelection* selection) const { + + return new QItemSelection(QAbstractProxyModel::mapSelectionFromSource(*selection)); + + } + + // 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 QAbstractProxyModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QAbstractProxyModel_Submit(this, handle__Submit); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Submit() { + + return QAbstractProxyModel::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) { + QAbstractProxyModel::revert(); + return; + } + + + miqt_exec_callback_QAbstractProxyModel_Revert(this, handle__Revert); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Revert() { + + QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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(QAbstractProxyModel::data(*proxyIndex, 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 QAbstractProxyModel::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_QAbstractProxyModel_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(QAbstractProxyModel::headerData(static_cast(section), static_cast(orientation), 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 QAbstractProxyModel::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_QAbstractProxyModel_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 = QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 = QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_ClearItemData(this, handle__ClearItemData, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ClearItemData(QModelIndex* index) { + + return QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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(QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_CanFetchMore(const_cast(this), handle__CanFetchMore, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanFetchMore(QModelIndex* parent) const { + + return QAbstractProxyModel::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) { + QAbstractProxyModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QAbstractProxyModel_FetchMore(this, handle__FetchMore, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FetchMore(QModelIndex* parent) { + + QAbstractProxyModel::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) { + QAbstractProxyModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QAbstractProxyModel_Sort(this, handle__Sort, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Sort(int column, int order) { + + QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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(QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_HasChildren(const_cast(this), handle__HasChildren, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasChildren(QModelIndex* parent) const { + + return QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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(QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QAbstractProxyModel_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 = QAbstractProxyModel::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 QAbstractProxyModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractProxyModel_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 = QAbstractProxyModel::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 QAbstractProxyModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractProxyModel_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 = QAbstractProxyModel::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 QAbstractProxyModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QAbstractProxyModel_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 = QAbstractProxyModel::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__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 QModelIndex(); // Pure virtual, there is no base we can call + } + + 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_QAbstractProxyModel_Index(const_cast(this), handle__Index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // 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 QModelIndex(); // Pure virtual, there is no base we can call + } + + const QModelIndex& child_ret = child; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&child_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QAbstractProxyModel_Parent(const_cast(this), handle__Parent, sigval1); + + return *callback_return_value; + } + + // 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 0; // Pure virtual, there is no base we can call + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QAbstractProxyModel_RowCount(const_cast(this), handle__RowCount, sigval1); + + return static_cast(callback_return_value); + } + + // 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 0; // Pure virtual, there is no base we can call + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QAbstractProxyModel_ColumnCount(const_cast(this), handle__ColumnCount, sigval1); + + return static_cast(callback_return_value); + } + + // 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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::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 QAbstractProxyModel::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_QAbstractProxyModel_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 QAbstractProxyModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + + } + + // 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 QAbstractProxyModel::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_QAbstractProxyModel_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 = QAbstractProxyModel::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__MultiData = 0; + + // Subclass to allow providing a Go implementation + virtual void multiData(const QModelIndex& index, QModelRoleDataSpan roleDataSpan) const override { + if (handle__MultiData == 0) { + QAbstractProxyModel::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_QAbstractProxyModel_MultiData(const_cast(this), handle__MultiData, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MultiData(QModelIndex* index, QModelRoleDataSpan* roleDataSpan) const { + + QAbstractProxyModel::multiData(*index, *roleDataSpan); + + } + + // 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) { + QAbstractProxyModel::resetInternalData(); + return; + } + + + miqt_exec_callback_QAbstractProxyModel_ResetInternalData(this, handle__ResetInternalData); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResetInternalData() { + + QAbstractProxyModel::resetInternalData(); + + } + +}; + +void QAbstractProxyModel_new(QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQAbstractProxyModel* ret = new MiqtVirtualQAbstractProxyModel(); + *outptr_QAbstractProxyModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QAbstractProxyModel_new2(QObject* parent, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { + MiqtVirtualQAbstractProxyModel* ret = new MiqtVirtualQAbstractProxyModel(parent); + *outptr_QAbstractProxyModel = ret; + *outptr_QAbstractItemModel = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractProxyModel_MetaObject(const QAbstractProxyModel* self) { return (QMetaObject*) self->metaObject(); } @@ -51,6 +1242,14 @@ QModelIndex* QAbstractProxyModel_MapFromSource(const QAbstractProxyModel* self, return new QModelIndex(self->mapFromSource(*sourceIndex)); } +QItemSelection* QAbstractProxyModel_MapSelectionToSource(const QAbstractProxyModel* self, QItemSelection* selection) { + return new QItemSelection(self->mapSelectionToSource(*selection)); +} + +QItemSelection* QAbstractProxyModel_MapSelectionFromSource(const QAbstractProxyModel* self, QItemSelection* selection) { + return new QItemSelection(self->mapSelectionFromSource(*selection)); +} + bool QAbstractProxyModel_Submit(QAbstractProxyModel* self) { return self->submit(); } @@ -233,9 +1432,321 @@ struct miqt_string QAbstractProxyModel_Tr3(const char* s, const char* c, int n) return _ms; } +void QAbstractProxyModel_override_virtual_SetSourceModel(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__SetSourceModel = slot; +} + +void QAbstractProxyModel_virtualbase_SetSourceModel(void* self, QAbstractItemModel* sourceModel) { + ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_SetSourceModel(sourceModel); +} + +void QAbstractProxyModel_override_virtual_MapToSource(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MapToSource = slot; +} + +void QAbstractProxyModel_override_virtual_MapFromSource(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MapFromSource = slot; +} + +void QAbstractProxyModel_override_virtual_MapSelectionToSource(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MapSelectionToSource = slot; +} + +QItemSelection* QAbstractProxyModel_virtualbase_MapSelectionToSource(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_MapSelectionToSource(selection); +} + +void QAbstractProxyModel_override_virtual_MapSelectionFromSource(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MapSelectionFromSource = slot; +} + +QItemSelection* QAbstractProxyModel_virtualbase_MapSelectionFromSource(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_MapSelectionFromSource(selection); +} + +void QAbstractProxyModel_override_virtual_Submit(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Submit = slot; +} + +bool QAbstractProxyModel_virtualbase_Submit(void* self) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Submit(); +} + +void QAbstractProxyModel_override_virtual_Revert(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Revert = slot; +} + +void QAbstractProxyModel_virtualbase_Revert(void* self) { + ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Revert(); +} + +void QAbstractProxyModel_override_virtual_Data(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Data = slot; +} + +QVariant* QAbstractProxyModel_virtualbase_Data(const void* self, QModelIndex* proxyIndex, int role) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Data(proxyIndex, role); +} + +void QAbstractProxyModel_override_virtual_HeaderData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__HeaderData = slot; +} + +QVariant* QAbstractProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_HeaderData(section, orientation, role); +} + +void QAbstractProxyModel_override_virtual_ItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__ItemData = slot; +} + +struct miqt_map /* of int to QVariant* */ QAbstractProxyModel_virtualbase_ItemData(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_ItemData(index); +} + +void QAbstractProxyModel_override_virtual_Flags(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Flags = slot; +} + +int QAbstractProxyModel_virtualbase_Flags(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Flags(index); +} + +void QAbstractProxyModel_override_virtual_SetData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__SetData = slot; +} + +bool QAbstractProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_SetData(index, value, role); +} + +void QAbstractProxyModel_override_virtual_SetItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__SetItemData = slot; +} + +bool QAbstractProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_SetItemData(index, roles); +} + +void QAbstractProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__SetHeaderData = slot; +} + +bool QAbstractProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_SetHeaderData(section, orientation, value, role); +} + +void QAbstractProxyModel_override_virtual_ClearItemData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__ClearItemData = slot; +} + +bool QAbstractProxyModel_virtualbase_ClearItemData(void* self, QModelIndex* index) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_ClearItemData(index); +} + +void QAbstractProxyModel_override_virtual_Buddy(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Buddy = slot; +} + +QModelIndex* QAbstractProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Buddy(index); +} + +void QAbstractProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__CanFetchMore = slot; +} + +bool QAbstractProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_CanFetchMore(parent); +} + +void QAbstractProxyModel_override_virtual_FetchMore(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__FetchMore = slot; +} + +void QAbstractProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent) { + ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_FetchMore(parent); +} + +void QAbstractProxyModel_override_virtual_Sort(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Sort = slot; +} + +void QAbstractProxyModel_virtualbase_Sort(void* self, int column, int order) { + ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Sort(column, order); +} + +void QAbstractProxyModel_override_virtual_Span(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Span = slot; +} + +QSize* QAbstractProxyModel_virtualbase_Span(const void* self, QModelIndex* index) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Span(index); +} + +void QAbstractProxyModel_override_virtual_HasChildren(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__HasChildren = slot; +} + +bool QAbstractProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_HasChildren(parent); +} + +void QAbstractProxyModel_override_virtual_Sibling(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Sibling = slot; +} + +QModelIndex* QAbstractProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Sibling(row, column, idx); +} + +void QAbstractProxyModel_override_virtual_MimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MimeData = slot; +} + +QMimeData* QAbstractProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_MimeData(indexes); +} + +void QAbstractProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__CanDropMimeData = slot; +} + +bool QAbstractProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_CanDropMimeData(data, action, row, column, parent); +} + +void QAbstractProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__DropMimeData = slot; +} + +bool QAbstractProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_DropMimeData(data, action, row, column, parent); +} + +void QAbstractProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MimeTypes = slot; +} + +struct miqt_array /* of struct miqt_string */ QAbstractProxyModel_virtualbase_MimeTypes(const void* self) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_MimeTypes(); +} + +void QAbstractProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__SupportedDragActions = slot; +} + +int QAbstractProxyModel_virtualbase_SupportedDragActions(const void* self) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_SupportedDragActions(); +} + +void QAbstractProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__SupportedDropActions = slot; +} + +int QAbstractProxyModel_virtualbase_SupportedDropActions(const void* self) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_SupportedDropActions(); +} + +void QAbstractProxyModel_override_virtual_RoleNames(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__RoleNames = slot; +} + +struct miqt_map /* of int to struct miqt_string */ QAbstractProxyModel_virtualbase_RoleNames(const void* self) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_RoleNames(); +} + +void QAbstractProxyModel_override_virtual_Index(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Index = slot; +} + +void QAbstractProxyModel_override_virtual_Parent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Parent = slot; +} + +void QAbstractProxyModel_override_virtual_RowCount(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__RowCount = slot; +} + +void QAbstractProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__ColumnCount = slot; +} + +void QAbstractProxyModel_override_virtual_InsertRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__InsertRows = slot; +} + +bool QAbstractProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_InsertRows(row, count, parent); +} + +void QAbstractProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__InsertColumns = slot; +} + +bool QAbstractProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_InsertColumns(column, count, parent); +} + +void QAbstractProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__RemoveRows = slot; +} + +bool QAbstractProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_RemoveRows(row, count, parent); +} + +void QAbstractProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__RemoveColumns = slot; +} + +bool QAbstractProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_RemoveColumns(column, count, parent); +} + +void QAbstractProxyModel_override_virtual_MoveRows(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MoveRows = slot; +} + +bool QAbstractProxyModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_MoveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); +} + +void QAbstractProxyModel_override_virtual_MoveColumns(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MoveColumns = slot; +} + +bool QAbstractProxyModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + return ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_MoveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); +} + +void QAbstractProxyModel_override_virtual_Match(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__Match = slot; +} + +struct miqt_array /* of QModelIndex* */ QAbstractProxyModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + return ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_Match(start, role, value, hits, flags); +} + +void QAbstractProxyModel_override_virtual_MultiData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__MultiData = slot; +} + +void QAbstractProxyModel_virtualbase_MultiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan) { + ( (const MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_MultiData(index, roleDataSpan); +} + +void QAbstractProxyModel_override_virtual_ResetInternalData(void* self, intptr_t slot) { + dynamic_cast( (QAbstractProxyModel*)(self) )->handle__ResetInternalData = slot; +} + +void QAbstractProxyModel_virtualbase_ResetInternalData(void* self) { + ( (MiqtVirtualQAbstractProxyModel*)(self) )->virtualbase_ResetInternalData(); +} + void QAbstractProxyModel_Delete(QAbstractProxyModel* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qabstractproxymodel.go b/qt6/gen_qabstractproxymodel.go index d8da4232..b533cd6c 100644 --- a/qt6/gen_qabstractproxymodel.go +++ b/qt6/gen_qabstractproxymodel.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,30 @@ func UnsafeNewQAbstractProxyModel(h unsafe.Pointer, h_QAbstractItemModel unsafe. QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} } +// NewQAbstractProxyModel constructs a new QAbstractProxyModel object. +func NewQAbstractProxyModel() *QAbstractProxyModel { + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractProxyModel_new(&outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQAbstractProxyModel(outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAbstractProxyModel2 constructs a new QAbstractProxyModel object. +func NewQAbstractProxyModel2(parent *QObject) *QAbstractProxyModel { + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractProxyModel_new2(parent.cPointer(), &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) + ret := newQAbstractProxyModel(outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractProxyModel) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractProxyModel_MetaObject(this.h))) } @@ -93,6 +118,20 @@ func (this *QAbstractProxyModel) MapFromSource(sourceIndex *QModelIndex) *QModel return _goptr } +func (this *QAbstractProxyModel) MapSelectionToSource(selection *QItemSelection) *QItemSelection { + _ret := C.QAbstractProxyModel_MapSelectionToSource(this.h, selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QAbstractProxyModel) MapSelectionFromSource(selection *QItemSelection) *QItemSelection { + _ret := C.QAbstractProxyModel_MapSelectionFromSource(this.h, selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QAbstractProxyModel) Submit() bool { return (bool)(C.QAbstractProxyModel_Submit(this.h)) } @@ -283,6 +322,1220 @@ func QAbstractProxyModel_Tr3(s string, c string, n int) string { return _ret } +func (this *QAbstractProxyModel) callVirtualBase_SetSourceModel(sourceModel *QAbstractItemModel) { + + C.QAbstractProxyModel_virtualbase_SetSourceModel(unsafe.Pointer(this.h), sourceModel.cPointer()) + +} +func (this *QAbstractProxyModel) OnSetSourceModel(slot func(super func(sourceModel *QAbstractItemModel), sourceModel *QAbstractItemModel)) { + C.QAbstractProxyModel_override_virtual_SetSourceModel(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_SetSourceModel +func miqt_exec_callback_QAbstractProxyModel_SetSourceModel(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_SetSourceModel, slotval1) + +} +func (this *QAbstractProxyModel) OnMapToSource(slot func(proxyIndex *QModelIndex) *QModelIndex) { + C.QAbstractProxyModel_override_virtual_MapToSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MapToSource +func miqt_exec_callback_QAbstractProxyModel_MapToSource(self *C.QAbstractProxyModel, cb C.intptr_t, proxyIndex *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} +func (this *QAbstractProxyModel) OnMapFromSource(slot func(sourceIndex *QModelIndex) *QModelIndex) { + C.QAbstractProxyModel_override_virtual_MapFromSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MapFromSource +func miqt_exec_callback_QAbstractProxyModel_MapFromSource(self *C.QAbstractProxyModel, cb C.intptr_t, sourceIndex *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) callVirtualBase_MapSelectionToSource(selection *QItemSelection) *QItemSelection { + + _ret := C.QAbstractProxyModel_virtualbase_MapSelectionToSource(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractProxyModel) OnMapSelectionToSource(slot func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) { + C.QAbstractProxyModel_override_virtual_MapSelectionToSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MapSelectionToSource +func miqt_exec_callback_QAbstractProxyModel_MapSelectionToSource(self *C.QAbstractProxyModel, cb C.intptr_t, selection *C.QItemSelection) *C.QItemSelection { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QAbstractProxyModel{h: self}).callVirtualBase_MapSelectionToSource, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) callVirtualBase_MapSelectionFromSource(selection *QItemSelection) *QItemSelection { + + _ret := C.QAbstractProxyModel_virtualbase_MapSelectionFromSource(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QAbstractProxyModel) OnMapSelectionFromSource(slot func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) { + C.QAbstractProxyModel_override_virtual_MapSelectionFromSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MapSelectionFromSource +func miqt_exec_callback_QAbstractProxyModel_MapSelectionFromSource(self *C.QAbstractProxyModel, cb C.intptr_t, selection *C.QItemSelection) *C.QItemSelection { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QAbstractProxyModel{h: self}).callVirtualBase_MapSelectionFromSource, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) callVirtualBase_Submit() bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_Submit(unsafe.Pointer(this.h))) + +} +func (this *QAbstractProxyModel) OnSubmit(slot func(super func() bool) bool) { + C.QAbstractProxyModel_override_virtual_Submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Submit +func miqt_exec_callback_QAbstractProxyModel_Submit(self *C.QAbstractProxyModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractProxyModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_Revert() { + + C.QAbstractProxyModel_virtualbase_Revert(unsafe.Pointer(this.h)) + +} +func (this *QAbstractProxyModel) OnRevert(slot func(super func())) { + C.QAbstractProxyModel_override_virtual_Revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Revert +func miqt_exec_callback_QAbstractProxyModel_Revert(self *C.QAbstractProxyModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractProxyModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QAbstractProxyModel) callVirtualBase_Data(proxyIndex *QModelIndex, role int) *QVariant { + + _ret := C.QAbstractProxyModel_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 *QAbstractProxyModel) OnData(slot func(super func(proxyIndex *QModelIndex, role int) *QVariant, proxyIndex *QModelIndex, role int) *QVariant) { + C.QAbstractProxyModel_override_virtual_Data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Data +func miqt_exec_callback_QAbstractProxyModel_Data(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) callVirtualBase_HeaderData(section int, orientation Orientation, role int) *QVariant { + + _ret := C.QAbstractProxyModel_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 *QAbstractProxyModel) OnHeaderData(slot func(super func(section int, orientation Orientation, role int) *QVariant, section int, orientation Orientation, role int) *QVariant) { + C.QAbstractProxyModel_override_virtual_HeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_HeaderData +func miqt_exec_callback_QAbstractProxyModel_HeaderData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) callVirtualBase_ItemData(index *QModelIndex) map[int]QVariant { + + var _mm C.struct_miqt_map = C.QAbstractProxyModel_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 *QAbstractProxyModel) OnItemData(slot func(super func(index *QModelIndex) map[int]QVariant, index *QModelIndex) map[int]QVariant) { + C.QAbstractProxyModel_override_virtual_ItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_ItemData +func miqt_exec_callback_QAbstractProxyModel_ItemData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{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 *QAbstractProxyModel) callVirtualBase_Flags(index *QModelIndex) ItemFlag { + + return (ItemFlag)(C.QAbstractProxyModel_virtualbase_Flags(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QAbstractProxyModel) OnFlags(slot func(super func(index *QModelIndex) ItemFlag, index *QModelIndex) ItemFlag) { + C.QAbstractProxyModel_override_virtual_Flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Flags +func miqt_exec_callback_QAbstractProxyModel_Flags(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_SetData(index *QModelIndex, value *QVariant, role int) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_SetData(unsafe.Pointer(this.h), index.cPointer(), value.cPointer(), (C.int)(role))) + +} +func (this *QAbstractProxyModel) OnSetData(slot func(super func(index *QModelIndex, value *QVariant, role int) bool, index *QModelIndex, value *QVariant, role int) bool) { + C.QAbstractProxyModel_override_virtual_SetData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_SetData +func miqt_exec_callback_QAbstractProxyModel_SetData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) 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.QAbstractProxyModel_virtualbase_SetItemData(unsafe.Pointer(this.h), index.cPointer(), roles_mm)) + +} +func (this *QAbstractProxyModel) OnSetItemData(slot func(super func(index *QModelIndex, roles map[int]QVariant) bool, index *QModelIndex, roles map[int]QVariant) bool) { + C.QAbstractProxyModel_override_virtual_SetItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_SetItemData +func miqt_exec_callback_QAbstractProxyModel_SetItemData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_SetHeaderData(section int, orientation Orientation, value *QVariant, role int) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_SetHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), value.cPointer(), (C.int)(role))) + +} +func (this *QAbstractProxyModel) OnSetHeaderData(slot func(super func(section int, orientation Orientation, value *QVariant, role int) bool, section int, orientation Orientation, value *QVariant, role int) bool) { + C.QAbstractProxyModel_override_virtual_SetHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_SetHeaderData +func miqt_exec_callback_QAbstractProxyModel_SetHeaderData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_ClearItemData(index *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_ClearItemData(unsafe.Pointer(this.h), index.cPointer())) + +} +func (this *QAbstractProxyModel) OnClearItemData(slot func(super func(index *QModelIndex) bool, index *QModelIndex) bool) { + C.QAbstractProxyModel_override_virtual_ClearItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_ClearItemData +func miqt_exec_callback_QAbstractProxyModel_ClearItemData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_ClearItemData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_Buddy(index *QModelIndex) *QModelIndex { + + _ret := C.QAbstractProxyModel_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 *QAbstractProxyModel) OnBuddy(slot func(super func(index *QModelIndex) *QModelIndex, index *QModelIndex) *QModelIndex) { + C.QAbstractProxyModel_override_virtual_Buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Buddy +func miqt_exec_callback_QAbstractProxyModel_Buddy(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_Buddy, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) callVirtualBase_CanFetchMore(parent *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_CanFetchMore(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QAbstractProxyModel) OnCanFetchMore(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QAbstractProxyModel_override_virtual_CanFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_CanFetchMore +func miqt_exec_callback_QAbstractProxyModel_CanFetchMore(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_FetchMore(parent *QModelIndex) { + + C.QAbstractProxyModel_virtualbase_FetchMore(unsafe.Pointer(this.h), parent.cPointer()) + +} +func (this *QAbstractProxyModel) OnFetchMore(slot func(super func(parent *QModelIndex), parent *QModelIndex)) { + C.QAbstractProxyModel_override_virtual_FetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_FetchMore +func miqt_exec_callback_QAbstractProxyModel_FetchMore(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QAbstractProxyModel) callVirtualBase_Sort(column int, order SortOrder) { + + C.QAbstractProxyModel_virtualbase_Sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QAbstractProxyModel) OnSort(slot func(super func(column int, order SortOrder), column int, order SortOrder)) { + C.QAbstractProxyModel_override_virtual_Sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Sort +func miqt_exec_callback_QAbstractProxyModel_Sort(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QAbstractProxyModel) callVirtualBase_Span(index *QModelIndex) *QSize { + + _ret := C.QAbstractProxyModel_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 *QAbstractProxyModel) OnSpan(slot func(super func(index *QModelIndex) *QSize, index *QModelIndex) *QSize) { + C.QAbstractProxyModel_override_virtual_Span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Span +func miqt_exec_callback_QAbstractProxyModel_Span(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_Span, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) callVirtualBase_HasChildren(parent *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_HasChildren(unsafe.Pointer(this.h), parent.cPointer())) + +} +func (this *QAbstractProxyModel) OnHasChildren(slot func(super func(parent *QModelIndex) bool, parent *QModelIndex) bool) { + C.QAbstractProxyModel_override_virtual_HasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_HasChildren +func miqt_exec_callback_QAbstractProxyModel_HasChildren(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_Sibling(row int, column int, idx *QModelIndex) *QModelIndex { + + _ret := C.QAbstractProxyModel_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 *QAbstractProxyModel) OnSibling(slot func(super func(row int, column int, idx *QModelIndex) *QModelIndex, row int, column int, idx *QModelIndex) *QModelIndex) { + C.QAbstractProxyModel_override_virtual_Sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Sibling +func miqt_exec_callback_QAbstractProxyModel_Sibling(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) 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.QAbstractProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)), nil) +} +func (this *QAbstractProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { + C.QAbstractProxyModel_override_virtual_MimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MimeData +func miqt_exec_callback_QAbstractProxyModel_MimeData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_MimeData, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractProxyModel) callVirtualBase_CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_CanDropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QAbstractProxyModel) 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.QAbstractProxyModel_override_virtual_CanDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_CanDropMimeData +func miqt_exec_callback_QAbstractProxyModel_CanDropMimeData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_DropMimeData(unsafe.Pointer(this.h), data.cPointer(), (C.int)(action), (C.int)(row), (C.int)(column), parent.cPointer())) + +} +func (this *QAbstractProxyModel) 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.QAbstractProxyModel_override_virtual_DropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_DropMimeData +func miqt_exec_callback_QAbstractProxyModel_DropMimeData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QAbstractProxyModel_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 *QAbstractProxyModel) OnMimeTypes(slot func(super func() []string) []string) { + C.QAbstractProxyModel_override_virtual_MimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MimeTypes +func miqt_exec_callback_QAbstractProxyModel_MimeTypes(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{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 *QAbstractProxyModel) callVirtualBase_SupportedDragActions() DropAction { + + return (DropAction)(C.QAbstractProxyModel_virtualbase_SupportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QAbstractProxyModel) OnSupportedDragActions(slot func(super func() DropAction) DropAction) { + C.QAbstractProxyModel_override_virtual_SupportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_SupportedDragActions +func miqt_exec_callback_QAbstractProxyModel_SupportedDragActions(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_SupportedDropActions() DropAction { + + return (DropAction)(C.QAbstractProxyModel_virtualbase_SupportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QAbstractProxyModel) OnSupportedDropActions(slot func(super func() DropAction) DropAction) { + C.QAbstractProxyModel_override_virtual_SupportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_SupportedDropActions +func miqt_exec_callback_QAbstractProxyModel_SupportedDropActions(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QAbstractProxyModel_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 *QAbstractProxyModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + C.QAbstractProxyModel_override_virtual_RoleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_RoleNames +func miqt_exec_callback_QAbstractProxyModel_RoleNames(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{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 *QAbstractProxyModel) OnIndex(slot func(row int, column int, parent *QModelIndex) *QModelIndex) { + C.QAbstractProxyModel_override_virtual_Index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Index +func miqt_exec_callback_QAbstractProxyModel_Index(self *C.QAbstractProxyModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} +func (this *QAbstractProxyModel) OnParent(slot func(child *QModelIndex) *QModelIndex) { + C.QAbstractProxyModel_override_virtual_Parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Parent +func miqt_exec_callback_QAbstractProxyModel_Parent(self *C.QAbstractProxyModel, cb C.intptr_t, child *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} +func (this *QAbstractProxyModel) OnRowCount(slot func(parent *QModelIndex) int) { + C.QAbstractProxyModel_override_virtual_RowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_RowCount +func miqt_exec_callback_QAbstractProxyModel_RowCount(self *C.QAbstractProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractProxyModel) OnColumnCount(slot func(parent *QModelIndex) int) { + C.QAbstractProxyModel_override_virtual_ColumnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_ColumnCount +func miqt_exec_callback_QAbstractProxyModel_ColumnCount(self *C.QAbstractProxyModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_InsertRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_InsertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractProxyModel) OnInsertRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QAbstractProxyModel_override_virtual_InsertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_InsertRows +func miqt_exec_callback_QAbstractProxyModel_InsertRows(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_InsertColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_InsertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractProxyModel) OnInsertColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QAbstractProxyModel_override_virtual_InsertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_InsertColumns +func miqt_exec_callback_QAbstractProxyModel_InsertColumns(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_RemoveRows(row int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_RemoveRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractProxyModel) OnRemoveRows(slot func(super func(row int, count int, parent *QModelIndex) bool, row int, count int, parent *QModelIndex) bool) { + C.QAbstractProxyModel_override_virtual_RemoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_RemoveRows +func miqt_exec_callback_QAbstractProxyModel_RemoveRows(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_RemoveColumns(column int, count int, parent *QModelIndex) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_RemoveColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), parent.cPointer())) + +} +func (this *QAbstractProxyModel) OnRemoveColumns(slot func(super func(column int, count int, parent *QModelIndex) bool, column int, count int, parent *QModelIndex) bool) { + C.QAbstractProxyModel_override_virtual_RemoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_RemoveColumns +func miqt_exec_callback_QAbstractProxyModel_RemoveColumns(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_MoveRows(sourceParent *QModelIndex, sourceRow int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_MoveRows(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceRow), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QAbstractProxyModel) 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.QAbstractProxyModel_override_virtual_MoveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MoveRows +func miqt_exec_callback_QAbstractProxyModel_MoveRows(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_MoveColumns(sourceParent *QModelIndex, sourceColumn int, count int, destinationParent *QModelIndex, destinationChild int) bool { + + return (bool)(C.QAbstractProxyModel_virtualbase_MoveColumns(unsafe.Pointer(this.h), sourceParent.cPointer(), (C.int)(sourceColumn), (C.int)(count), destinationParent.cPointer(), (C.int)(destinationChild))) + +} +func (this *QAbstractProxyModel) 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.QAbstractProxyModel_override_virtual_MoveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MoveColumns +func miqt_exec_callback_QAbstractProxyModel_MoveColumns(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractProxyModel) callVirtualBase_Match(start *QModelIndex, role int, value *QVariant, hits int, flags MatchFlag) []QModelIndex { + + var _ma C.struct_miqt_array = C.QAbstractProxyModel_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 *QAbstractProxyModel) 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.QAbstractProxyModel_override_virtual_Match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_Match +func miqt_exec_callback_QAbstractProxyModel_Match(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{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 *QAbstractProxyModel) callVirtualBase_MultiData(index *QModelIndex, roleDataSpan QModelRoleDataSpan) { + + C.QAbstractProxyModel_virtualbase_MultiData(unsafe.Pointer(this.h), index.cPointer(), roleDataSpan.cPointer()) + +} +func (this *QAbstractProxyModel) OnMultiData(slot func(super func(index *QModelIndex, roleDataSpan QModelRoleDataSpan), index *QModelIndex, roleDataSpan QModelRoleDataSpan)) { + C.QAbstractProxyModel_override_virtual_MultiData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_MultiData +func miqt_exec_callback_QAbstractProxyModel_MultiData(self *C.QAbstractProxyModel, 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((&QAbstractProxyModel{h: self}).callVirtualBase_MultiData, slotval1, slotval2) + +} + +func (this *QAbstractProxyModel) callVirtualBase_ResetInternalData() { + + C.QAbstractProxyModel_virtualbase_ResetInternalData(unsafe.Pointer(this.h)) + +} +func (this *QAbstractProxyModel) OnResetInternalData(slot func(super func())) { + C.QAbstractProxyModel_override_virtual_ResetInternalData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractProxyModel_ResetInternalData +func miqt_exec_callback_QAbstractProxyModel_ResetInternalData(self *C.QAbstractProxyModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QAbstractProxyModel{h: self}).callVirtualBase_ResetInternalData) + +} + // Delete this object from C++ memory. func (this *QAbstractProxyModel) Delete() { C.QAbstractProxyModel_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qabstractproxymodel.h b/qt6/gen_qabstractproxymodel.h index 841b6979..77b51480 100644 --- a/qt6/gen_qabstractproxymodel.h +++ b/qt6/gen_qabstractproxymodel.h @@ -18,9 +18,11 @@ extern "C" { class QAbstractItemModel; class QAbstractProxyModel; class QByteArray; +class QItemSelection; class QMetaObject; class QMimeData; class QModelIndex; +class QModelRoleDataSpan; class QObject; class QSize; class QVariant; @@ -28,14 +30,18 @@ class QVariant; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractProxyModel QAbstractProxyModel; typedef struct QByteArray QByteArray; +typedef struct QItemSelection QItemSelection; 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 +void QAbstractProxyModel_new(QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +void QAbstractProxyModel_new2(QObject* parent, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); QMetaObject* QAbstractProxyModel_MetaObject(const QAbstractProxyModel* self); void* QAbstractProxyModel_Metacast(QAbstractProxyModel* self, const char* param1); struct miqt_string QAbstractProxyModel_Tr(const char* s); @@ -43,6 +49,8 @@ void QAbstractProxyModel_SetSourceModel(QAbstractProxyModel* self, QAbstractItem QAbstractItemModel* QAbstractProxyModel_SourceModel(const QAbstractProxyModel* self); QModelIndex* QAbstractProxyModel_MapToSource(const QAbstractProxyModel* self, QModelIndex* proxyIndex); QModelIndex* QAbstractProxyModel_MapFromSource(const QAbstractProxyModel* self, QModelIndex* sourceIndex); +QItemSelection* QAbstractProxyModel_MapSelectionToSource(const QAbstractProxyModel* self, QItemSelection* selection); +QItemSelection* QAbstractProxyModel_MapSelectionFromSource(const QAbstractProxyModel* self, QItemSelection* selection); bool QAbstractProxyModel_Submit(QAbstractProxyModel* self); void QAbstractProxyModel_Revert(QAbstractProxyModel* self); QVariant* QAbstractProxyModel_Data(const QAbstractProxyModel* self, QModelIndex* proxyIndex, int role); @@ -69,6 +77,90 @@ 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); +void QAbstractProxyModel_override_virtual_SetSourceModel(void* self, intptr_t slot); +void QAbstractProxyModel_virtualbase_SetSourceModel(void* self, QAbstractItemModel* sourceModel); +void QAbstractProxyModel_override_virtual_MapToSource(void* self, intptr_t slot); +QModelIndex* QAbstractProxyModel_virtualbase_MapToSource(const void* self, QModelIndex* proxyIndex); +void QAbstractProxyModel_override_virtual_MapFromSource(void* self, intptr_t slot); +QModelIndex* QAbstractProxyModel_virtualbase_MapFromSource(const void* self, QModelIndex* sourceIndex); +void QAbstractProxyModel_override_virtual_MapSelectionToSource(void* self, intptr_t slot); +QItemSelection* QAbstractProxyModel_virtualbase_MapSelectionToSource(const void* self, QItemSelection* selection); +void QAbstractProxyModel_override_virtual_MapSelectionFromSource(void* self, intptr_t slot); +QItemSelection* QAbstractProxyModel_virtualbase_MapSelectionFromSource(const void* self, QItemSelection* selection); +void QAbstractProxyModel_override_virtual_Submit(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_Submit(void* self); +void QAbstractProxyModel_override_virtual_Revert(void* self, intptr_t slot); +void QAbstractProxyModel_virtualbase_Revert(void* self); +void QAbstractProxyModel_override_virtual_Data(void* self, intptr_t slot); +QVariant* QAbstractProxyModel_virtualbase_Data(const void* self, QModelIndex* proxyIndex, int role); +void QAbstractProxyModel_override_virtual_HeaderData(void* self, intptr_t slot); +QVariant* QAbstractProxyModel_virtualbase_HeaderData(const void* self, int section, int orientation, int role); +void QAbstractProxyModel_override_virtual_ItemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QAbstractProxyModel_virtualbase_ItemData(const void* self, QModelIndex* index); +void QAbstractProxyModel_override_virtual_Flags(void* self, intptr_t slot); +int QAbstractProxyModel_virtualbase_Flags(const void* self, QModelIndex* index); +void QAbstractProxyModel_override_virtual_SetData(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_SetData(void* self, QModelIndex* index, QVariant* value, int role); +void QAbstractProxyModel_override_virtual_SetItemData(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_SetItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +void QAbstractProxyModel_override_virtual_SetHeaderData(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_SetHeaderData(void* self, int section, int orientation, QVariant* value, int role); +void QAbstractProxyModel_override_virtual_ClearItemData(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_ClearItemData(void* self, QModelIndex* index); +void QAbstractProxyModel_override_virtual_Buddy(void* self, intptr_t slot); +QModelIndex* QAbstractProxyModel_virtualbase_Buddy(const void* self, QModelIndex* index); +void QAbstractProxyModel_override_virtual_CanFetchMore(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_CanFetchMore(const void* self, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_FetchMore(void* self, intptr_t slot); +void QAbstractProxyModel_virtualbase_FetchMore(void* self, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_Sort(void* self, intptr_t slot); +void QAbstractProxyModel_virtualbase_Sort(void* self, int column, int order); +void QAbstractProxyModel_override_virtual_Span(void* self, intptr_t slot); +QSize* QAbstractProxyModel_virtualbase_Span(const void* self, QModelIndex* index); +void QAbstractProxyModel_override_virtual_HasChildren(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_HasChildren(const void* self, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_Sibling(void* self, intptr_t slot); +QModelIndex* QAbstractProxyModel_virtualbase_Sibling(const void* self, int row, int column, QModelIndex* idx); +void QAbstractProxyModel_override_virtual_MimeData(void* self, intptr_t slot); +QMimeData* QAbstractProxyModel_virtualbase_MimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +void QAbstractProxyModel_override_virtual_CanDropMimeData(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_CanDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_DropMimeData(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_DropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_MimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QAbstractProxyModel_virtualbase_MimeTypes(const void* self); +void QAbstractProxyModel_override_virtual_SupportedDragActions(void* self, intptr_t slot); +int QAbstractProxyModel_virtualbase_SupportedDragActions(const void* self); +void QAbstractProxyModel_override_virtual_SupportedDropActions(void* self, intptr_t slot); +int QAbstractProxyModel_virtualbase_SupportedDropActions(const void* self); +void QAbstractProxyModel_override_virtual_RoleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QAbstractProxyModel_virtualbase_RoleNames(const void* self); +void QAbstractProxyModel_override_virtual_Index(void* self, intptr_t slot); +QModelIndex* QAbstractProxyModel_virtualbase_Index(const void* self, int row, int column, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_Parent(void* self, intptr_t slot); +QModelIndex* QAbstractProxyModel_virtualbase_Parent(const void* self, QModelIndex* child); +void QAbstractProxyModel_override_virtual_RowCount(void* self, intptr_t slot); +int QAbstractProxyModel_virtualbase_RowCount(const void* self, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_ColumnCount(void* self, intptr_t slot); +int QAbstractProxyModel_virtualbase_ColumnCount(const void* self, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_InsertRows(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_InsertRows(void* self, int row, int count, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_InsertColumns(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_InsertColumns(void* self, int column, int count, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_RemoveRows(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_RemoveRows(void* self, int row, int count, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_RemoveColumns(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_RemoveColumns(void* self, int column, int count, QModelIndex* parent); +void QAbstractProxyModel_override_virtual_MoveRows(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_MoveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +void QAbstractProxyModel_override_virtual_MoveColumns(void* self, intptr_t slot); +bool QAbstractProxyModel_virtualbase_MoveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +void QAbstractProxyModel_override_virtual_Match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QAbstractProxyModel_virtualbase_Match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +void QAbstractProxyModel_override_virtual_MultiData(void* self, intptr_t slot); +void QAbstractProxyModel_virtualbase_MultiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan); +void QAbstractProxyModel_override_virtual_ResetInternalData(void* self, intptr_t slot); +void QAbstractProxyModel_virtualbase_ResetInternalData(void* self); void QAbstractProxyModel_Delete(QAbstractProxyModel* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qabstracttextdocumentlayout.cpp b/qt6/gen_qabstracttextdocumentlayout.cpp index 4665d1a2..41eef399 100644 --- a/qt6/gen_qabstracttextdocumentlayout.cpp +++ b/qt6/gen_qabstracttextdocumentlayout.cpp @@ -1,6 +1,9 @@ #include #define WORKAROUND_INNER_CLASS_DEFINITION_QAbstractTextDocumentLayout__PaintContext #define WORKAROUND_INNER_CLASS_DEFINITION_QAbstractTextDocumentLayout__Selection +#include +#include +#include #include #include #include @@ -17,10 +20,406 @@ #include #include #include +#include #include #include "gen_qabstracttextdocumentlayout.h" #include "_cgo_export.h" +class MiqtVirtualQAbstractTextDocumentLayout : public virtual QAbstractTextDocumentLayout { +public: + + MiqtVirtualQAbstractTextDocumentLayout(QTextDocument* doc): QAbstractTextDocumentLayout(doc) {}; + + virtual ~MiqtVirtualQAbstractTextDocumentLayout() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Draw = 0; + + // Subclass to allow providing a Go implementation + virtual void draw(QPainter* painter, const QAbstractTextDocumentLayout::PaintContext& context) override { + if (handle__Draw == 0) { + return; // Pure virtual, there is no base we can call + } + + QPainter* sigval1 = painter; + const QAbstractTextDocumentLayout::PaintContext& context_ret = context; + // Cast returned reference into pointer + QAbstractTextDocumentLayout__PaintContext* sigval2 = const_cast(&context_ret); + + miqt_exec_callback_QAbstractTextDocumentLayout_Draw(this, handle__Draw, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HitTest = 0; + + // Subclass to allow providing a Go implementation + virtual int hitTest(const QPointF& point, Qt::HitTestAccuracy accuracy) const override { + if (handle__HitTest == 0) { + return 0; // Pure virtual, there is no base we can call + } + + const QPointF& point_ret = point; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&point_ret); + Qt::HitTestAccuracy accuracy_ret = accuracy; + int sigval2 = static_cast(accuracy_ret); + + int callback_return_value = miqt_exec_callback_QAbstractTextDocumentLayout_HitTest(const_cast(this), handle__HitTest, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // 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 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QAbstractTextDocumentLayout_PageCount(const_cast(this), handle__PageCount); + + return static_cast(callback_return_value); + } + + // 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 QSizeF(); // Pure virtual, there is no base we can call + } + + + QSizeF* callback_return_value = miqt_exec_callback_QAbstractTextDocumentLayout_DocumentSize(const_cast(this), handle__DocumentSize); + + return *callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FrameBoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF frameBoundingRect(QTextFrame* frame) const override { + if (handle__FrameBoundingRect == 0) { + return QRectF(); // Pure virtual, there is no base we can call + } + + QTextFrame* sigval1 = frame; + + QRectF* callback_return_value = miqt_exec_callback_QAbstractTextDocumentLayout_FrameBoundingRect(const_cast(this), handle__FrameBoundingRect, sigval1); + + return *callback_return_value; + } + + // 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 QRectF(); // Pure virtual, there is no base we can call + } + + const QTextBlock& block_ret = block; + // Cast returned reference into pointer + QTextBlock* sigval1 = const_cast(&block_ret); + + QRectF* callback_return_value = miqt_exec_callback_QAbstractTextDocumentLayout_BlockBoundingRect(const_cast(this), handle__BlockBoundingRect, sigval1); + + return *callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DocumentChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void documentChanged(int from, int charsRemoved, int charsAdded) override { + if (handle__DocumentChanged == 0) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = from; + int sigval2 = charsRemoved; + int sigval3 = charsAdded; + + miqt_exec_callback_QAbstractTextDocumentLayout_DocumentChanged(this, handle__DocumentChanged, sigval1, sigval2, sigval3); + + + } + + // 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) { + QAbstractTextDocumentLayout::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_QAbstractTextDocumentLayout_ResizeInlineObject(this, handle__ResizeInlineObject, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeInlineObject(QTextInlineObject* item, int posInDocument, QTextFormat* format) { + + QAbstractTextDocumentLayout::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) { + QAbstractTextDocumentLayout::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_QAbstractTextDocumentLayout_PositionInlineObject(this, handle__PositionInlineObject, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PositionInlineObject(QTextInlineObject* item, int posInDocument, QTextFormat* format) { + + QAbstractTextDocumentLayout::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) { + QAbstractTextDocumentLayout::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_QAbstractTextDocumentLayout_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) { + + QAbstractTextDocumentLayout::drawInlineObject(painter, *rect, *object, static_cast(posInDocument), *format); + + } + + // 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 QAbstractTextDocumentLayout::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractTextDocumentLayout_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAbstractTextDocumentLayout::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 QAbstractTextDocumentLayout::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractTextDocumentLayout_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAbstractTextDocumentLayout::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) { + QAbstractTextDocumentLayout::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAbstractTextDocumentLayout_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAbstractTextDocumentLayout::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) { + QAbstractTextDocumentLayout::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAbstractTextDocumentLayout_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAbstractTextDocumentLayout::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) { + QAbstractTextDocumentLayout::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAbstractTextDocumentLayout_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAbstractTextDocumentLayout::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) { + QAbstractTextDocumentLayout::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractTextDocumentLayout_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAbstractTextDocumentLayout::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) { + QAbstractTextDocumentLayout::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAbstractTextDocumentLayout_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAbstractTextDocumentLayout::disconnectNotify(*signal); + + } + +}; + +void QAbstractTextDocumentLayout_new(QTextDocument* doc, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout, QObject** outptr_QObject) { + MiqtVirtualQAbstractTextDocumentLayout* ret = new MiqtVirtualQAbstractTextDocumentLayout(doc); + *outptr_QAbstractTextDocumentLayout = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAbstractTextDocumentLayout_MetaObject(const QAbstractTextDocumentLayout* self) { return (QMetaObject*) self->metaObject(); } @@ -123,7 +522,7 @@ void QAbstractTextDocumentLayout_Update(QAbstractTextDocumentLayout* self) { } void QAbstractTextDocumentLayout_connect_Update(QAbstractTextDocumentLayout* self, intptr_t slot) { - QAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::update), self, [=]() { + MiqtVirtualQAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::update), self, [=]() { miqt_exec_callback_QAbstractTextDocumentLayout_Update(slot); }); } @@ -133,7 +532,7 @@ void QAbstractTextDocumentLayout_UpdateBlock(QAbstractTextDocumentLayout* self, } void QAbstractTextDocumentLayout_connect_UpdateBlock(QAbstractTextDocumentLayout* self, intptr_t slot) { - QAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::updateBlock), self, [=](const QTextBlock& block) { + MiqtVirtualQAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::updateBlock), self, [=](const QTextBlock& block) { const QTextBlock& block_ret = block; // Cast returned reference into pointer QTextBlock* sigval1 = const_cast(&block_ret); @@ -146,7 +545,7 @@ void QAbstractTextDocumentLayout_DocumentSizeChanged(QAbstractTextDocumentLayout } void QAbstractTextDocumentLayout_connect_DocumentSizeChanged(QAbstractTextDocumentLayout* self, intptr_t slot) { - QAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::documentSizeChanged), self, [=](const QSizeF& newSize) { + MiqtVirtualQAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::documentSizeChanged), self, [=](const QSizeF& newSize) { const QSizeF& newSize_ret = newSize; // Cast returned reference into pointer QSizeF* sigval1 = const_cast(&newSize_ret); @@ -159,7 +558,7 @@ void QAbstractTextDocumentLayout_PageCountChanged(QAbstractTextDocumentLayout* s } void QAbstractTextDocumentLayout_connect_PageCountChanged(QAbstractTextDocumentLayout* self, intptr_t slot) { - QAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::pageCountChanged), self, [=](int newPages) { + MiqtVirtualQAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::pageCountChanged), self, [=](int newPages) { int sigval1 = newPages; miqt_exec_callback_QAbstractTextDocumentLayout_PageCountChanged(slot, sigval1); }); @@ -196,7 +595,7 @@ void QAbstractTextDocumentLayout_Update1(QAbstractTextDocumentLayout* self, QRec } void QAbstractTextDocumentLayout_connect_Update1(QAbstractTextDocumentLayout* self, intptr_t slot) { - QAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::update), self, [=](const QRectF& param1) { + MiqtVirtualQAbstractTextDocumentLayout::connect(self, static_cast(&QAbstractTextDocumentLayout::update), self, [=](const QRectF& param1) { const QRectF& param1_ret = param1; // Cast returned reference into pointer QRectF* sigval1 = const_cast(¶m1_ret); @@ -204,9 +603,117 @@ void QAbstractTextDocumentLayout_connect_Update1(QAbstractTextDocumentLayout* se }); } +void QAbstractTextDocumentLayout_override_virtual_Draw(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__Draw = slot; +} + +void QAbstractTextDocumentLayout_override_virtual_HitTest(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__HitTest = slot; +} + +void QAbstractTextDocumentLayout_override_virtual_PageCount(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__PageCount = slot; +} + +void QAbstractTextDocumentLayout_override_virtual_DocumentSize(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__DocumentSize = slot; +} + +void QAbstractTextDocumentLayout_override_virtual_FrameBoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__FrameBoundingRect = slot; +} + +void QAbstractTextDocumentLayout_override_virtual_BlockBoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__BlockBoundingRect = slot; +} + +void QAbstractTextDocumentLayout_override_virtual_DocumentChanged(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__DocumentChanged = slot; +} + +void QAbstractTextDocumentLayout_override_virtual_ResizeInlineObject(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__ResizeInlineObject = slot; +} + +void QAbstractTextDocumentLayout_virtualbase_ResizeInlineObject(void* self, QTextInlineObject* item, int posInDocument, QTextFormat* format) { + ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_ResizeInlineObject(item, posInDocument, format); +} + +void QAbstractTextDocumentLayout_override_virtual_PositionInlineObject(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__PositionInlineObject = slot; +} + +void QAbstractTextDocumentLayout_virtualbase_PositionInlineObject(void* self, QTextInlineObject* item, int posInDocument, QTextFormat* format) { + ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_PositionInlineObject(item, posInDocument, format); +} + +void QAbstractTextDocumentLayout_override_virtual_DrawInlineObject(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__DrawInlineObject = slot; +} + +void QAbstractTextDocumentLayout_virtualbase_DrawInlineObject(void* self, QPainter* painter, QRectF* rect, QTextInlineObject* object, int posInDocument, QTextFormat* format) { + ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_DrawInlineObject(painter, rect, object, posInDocument, format); +} + +void QAbstractTextDocumentLayout_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__Event = slot; +} + +bool QAbstractTextDocumentLayout_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_Event(event); +} + +void QAbstractTextDocumentLayout_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__EventFilter = slot; +} + +bool QAbstractTextDocumentLayout_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAbstractTextDocumentLayout_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__TimerEvent = slot; +} + +void QAbstractTextDocumentLayout_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_TimerEvent(event); +} + +void QAbstractTextDocumentLayout_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__ChildEvent = slot; +} + +void QAbstractTextDocumentLayout_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_ChildEvent(event); +} + +void QAbstractTextDocumentLayout_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__CustomEvent = slot; +} + +void QAbstractTextDocumentLayout_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_CustomEvent(event); +} + +void QAbstractTextDocumentLayout_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__ConnectNotify = slot; +} + +void QAbstractTextDocumentLayout_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAbstractTextDocumentLayout_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAbstractTextDocumentLayout*)(self) )->handle__DisconnectNotify = slot; +} + +void QAbstractTextDocumentLayout_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAbstractTextDocumentLayout*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAbstractTextDocumentLayout_Delete(QAbstractTextDocumentLayout* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qabstracttextdocumentlayout.go b/qt6/gen_qabstracttextdocumentlayout.go index 28b312d0..3526d006 100644 --- a/qt6/gen_qabstracttextdocumentlayout.go +++ b/qt6/gen_qabstracttextdocumentlayout.go @@ -53,6 +53,17 @@ func UnsafeNewQAbstractTextDocumentLayout(h unsafe.Pointer, h_QObject unsafe.Poi QObject: UnsafeNewQObject(h_QObject)} } +// NewQAbstractTextDocumentLayout constructs a new QAbstractTextDocumentLayout object. +func NewQAbstractTextDocumentLayout(doc *QTextDocument) *QAbstractTextDocumentLayout { + var outptr_QAbstractTextDocumentLayout *C.QAbstractTextDocumentLayout = nil + var outptr_QObject *C.QObject = nil + + C.QAbstractTextDocumentLayout_new(doc.cPointer(), &outptr_QAbstractTextDocumentLayout, &outptr_QObject) + ret := newQAbstractTextDocumentLayout(outptr_QAbstractTextDocumentLayout, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAbstractTextDocumentLayout) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractTextDocumentLayout_MetaObject(this.h))) } @@ -280,6 +291,394 @@ func miqt_exec_callback_QAbstractTextDocumentLayout_Update1(cb C.intptr_t, param gofunc(slotval1) } +func (this *QAbstractTextDocumentLayout) OnDraw(slot func(painter *QPainter, context *QAbstractTextDocumentLayout__PaintContext)) { + C.QAbstractTextDocumentLayout_override_virtual_Draw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_Draw +func miqt_exec_callback_QAbstractTextDocumentLayout_Draw(self *C.QAbstractTextDocumentLayout, cb C.intptr_t, painter *C.QPainter, context *C.QAbstractTextDocumentLayout__PaintContext) { + gofunc, ok := cgo.Handle(cb).Value().(func(painter *QPainter, context *QAbstractTextDocumentLayout__PaintContext)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := UnsafeNewQAbstractTextDocumentLayout__PaintContext(unsafe.Pointer(context)) + + gofunc(slotval1, slotval2) + +} +func (this *QAbstractTextDocumentLayout) OnHitTest(slot func(point *QPointF, accuracy HitTestAccuracy) int) { + C.QAbstractTextDocumentLayout_override_virtual_HitTest(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_HitTest +func miqt_exec_callback_QAbstractTextDocumentLayout_HitTest(self *C.QAbstractTextDocumentLayout, cb C.intptr_t, point *C.QPointF, accuracy C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(point *QPointF, accuracy HitTestAccuracy) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(point)) + slotval2 := (HitTestAccuracy)(accuracy) + + virtualReturn := gofunc(slotval1, slotval2) + + return (C.int)(virtualReturn) + +} +func (this *QAbstractTextDocumentLayout) OnPageCount(slot func() int) { + C.QAbstractTextDocumentLayout_override_virtual_PageCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_PageCount +func miqt_exec_callback_QAbstractTextDocumentLayout_PageCount(self *C.QAbstractTextDocumentLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *QAbstractTextDocumentLayout) OnDocumentSize(slot func() *QSizeF) { + C.QAbstractTextDocumentLayout_override_virtual_DocumentSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_DocumentSize +func miqt_exec_callback_QAbstractTextDocumentLayout_DocumentSize(self *C.QAbstractTextDocumentLayout, cb C.intptr_t) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func() *QSizeF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} +func (this *QAbstractTextDocumentLayout) OnFrameBoundingRect(slot func(frame *QTextFrame) *QRectF) { + C.QAbstractTextDocumentLayout_override_virtual_FrameBoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_FrameBoundingRect +func miqt_exec_callback_QAbstractTextDocumentLayout_FrameBoundingRect(self *C.QAbstractTextDocumentLayout, cb C.intptr_t, frame *C.QTextFrame) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(frame *QTextFrame) *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQTextFrame(unsafe.Pointer(frame), nil, nil) + + virtualReturn := gofunc(slotval1) + + return virtualReturn.cPointer() + +} +func (this *QAbstractTextDocumentLayout) OnBlockBoundingRect(slot func(block *QTextBlock) *QRectF) { + C.QAbstractTextDocumentLayout_override_virtual_BlockBoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_BlockBoundingRect +func miqt_exec_callback_QAbstractTextDocumentLayout_BlockBoundingRect(self *C.QAbstractTextDocumentLayout, cb C.intptr_t, block *C.QTextBlock) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} +func (this *QAbstractTextDocumentLayout) OnDocumentChanged(slot func(from int, charsRemoved int, charsAdded int)) { + C.QAbstractTextDocumentLayout_override_virtual_DocumentChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_DocumentChanged +func miqt_exec_callback_QAbstractTextDocumentLayout_DocumentChanged(self *C.QAbstractTextDocumentLayout, cb C.intptr_t, from C.int, charsRemoved C.int, charsAdded C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(from int, charsRemoved 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)(charsRemoved) + + slotval3 := (int)(charsAdded) + + gofunc(slotval1, slotval2, slotval3) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_ResizeInlineObject(item QTextInlineObject, posInDocument int, format *QTextFormat) { + + C.QAbstractTextDocumentLayout_virtualbase_ResizeInlineObject(unsafe.Pointer(this.h), item.cPointer(), (C.int)(posInDocument), format.cPointer()) + +} +func (this *QAbstractTextDocumentLayout) OnResizeInlineObject(slot func(super func(item QTextInlineObject, posInDocument int, format *QTextFormat), item QTextInlineObject, posInDocument int, format *QTextFormat)) { + C.QAbstractTextDocumentLayout_override_virtual_ResizeInlineObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_ResizeInlineObject +func miqt_exec_callback_QAbstractTextDocumentLayout_ResizeInlineObject(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_ResizeInlineObject, slotval1, slotval2, slotval3) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_PositionInlineObject(item QTextInlineObject, posInDocument int, format *QTextFormat) { + + C.QAbstractTextDocumentLayout_virtualbase_PositionInlineObject(unsafe.Pointer(this.h), item.cPointer(), (C.int)(posInDocument), format.cPointer()) + +} +func (this *QAbstractTextDocumentLayout) OnPositionInlineObject(slot func(super func(item QTextInlineObject, posInDocument int, format *QTextFormat), item QTextInlineObject, posInDocument int, format *QTextFormat)) { + C.QAbstractTextDocumentLayout_override_virtual_PositionInlineObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_PositionInlineObject +func miqt_exec_callback_QAbstractTextDocumentLayout_PositionInlineObject(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_PositionInlineObject, slotval1, slotval2, slotval3) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_DrawInlineObject(painter *QPainter, rect *QRectF, object QTextInlineObject, posInDocument int, format *QTextFormat) { + + C.QAbstractTextDocumentLayout_virtualbase_DrawInlineObject(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), object.cPointer(), (C.int)(posInDocument), format.cPointer()) + +} +func (this *QAbstractTextDocumentLayout) 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.QAbstractTextDocumentLayout_override_virtual_DrawInlineObject(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_DrawInlineObject +func miqt_exec_callback_QAbstractTextDocumentLayout_DrawInlineObject(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_DrawInlineObject, slotval1, slotval2, slotval3, slotval4, slotval5) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAbstractTextDocumentLayout_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractTextDocumentLayout) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractTextDocumentLayout_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_Event +func miqt_exec_callback_QAbstractTextDocumentLayout_Event(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAbstractTextDocumentLayout_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAbstractTextDocumentLayout) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAbstractTextDocumentLayout_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_EventFilter +func miqt_exec_callback_QAbstractTextDocumentLayout_EventFilter(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAbstractTextDocumentLayout_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractTextDocumentLayout) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAbstractTextDocumentLayout_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_TimerEvent +func miqt_exec_callback_QAbstractTextDocumentLayout_TimerEvent(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAbstractTextDocumentLayout_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractTextDocumentLayout) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAbstractTextDocumentLayout_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_ChildEvent +func miqt_exec_callback_QAbstractTextDocumentLayout_ChildEvent(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAbstractTextDocumentLayout_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractTextDocumentLayout) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAbstractTextDocumentLayout_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_CustomEvent +func miqt_exec_callback_QAbstractTextDocumentLayout_CustomEvent(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAbstractTextDocumentLayout_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractTextDocumentLayout) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractTextDocumentLayout_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_ConnectNotify +func miqt_exec_callback_QAbstractTextDocumentLayout_ConnectNotify(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAbstractTextDocumentLayout) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAbstractTextDocumentLayout_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAbstractTextDocumentLayout) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAbstractTextDocumentLayout_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractTextDocumentLayout_DisconnectNotify +func miqt_exec_callback_QAbstractTextDocumentLayout_DisconnectNotify(self *C.QAbstractTextDocumentLayout, 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((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QAbstractTextDocumentLayout) Delete() { C.QAbstractTextDocumentLayout_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qabstracttextdocumentlayout.h b/qt6/gen_qabstracttextdocumentlayout.h index b3d12bab..fdde2c18 100644 --- a/qt6/gen_qabstracttextdocumentlayout.h +++ b/qt6/gen_qabstracttextdocumentlayout.h @@ -26,6 +26,9 @@ typedef QAbstractTextDocumentLayout::Selection QAbstractTextDocumentLayout__Sele #else class QAbstractTextDocumentLayout__Selection; #endif +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QPaintDevice; @@ -39,10 +42,14 @@ class QTextFormat; class QTextFrame; class QTextInlineObject; class QTextObjectInterface; +class QTimerEvent; #else typedef struct QAbstractTextDocumentLayout QAbstractTextDocumentLayout; typedef struct QAbstractTextDocumentLayout__PaintContext QAbstractTextDocumentLayout__PaintContext; typedef struct QAbstractTextDocumentLayout__Selection QAbstractTextDocumentLayout__Selection; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPaintDevice QPaintDevice; @@ -56,8 +63,10 @@ typedef struct QTextFormat QTextFormat; typedef struct QTextFrame QTextFrame; typedef struct QTextInlineObject QTextInlineObject; typedef struct QTextObjectInterface QTextObjectInterface; +typedef struct QTimerEvent QTimerEvent; #endif +void QAbstractTextDocumentLayout_new(QTextDocument* doc, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout, QObject** outptr_QObject); QMetaObject* QAbstractTextDocumentLayout_MetaObject(const QAbstractTextDocumentLayout* self); void* QAbstractTextDocumentLayout_Metacast(QAbstractTextDocumentLayout* self, const char* param1); struct miqt_string QAbstractTextDocumentLayout_Tr(const char* s); @@ -94,6 +103,40 @@ struct miqt_string QAbstractTextDocumentLayout_Tr3(const char* s, const char* c, 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_override_virtual_Draw(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_Draw(void* self, QPainter* painter, QAbstractTextDocumentLayout__PaintContext* context); +void QAbstractTextDocumentLayout_override_virtual_HitTest(void* self, intptr_t slot); +int QAbstractTextDocumentLayout_virtualbase_HitTest(const void* self, QPointF* point, int accuracy); +void QAbstractTextDocumentLayout_override_virtual_PageCount(void* self, intptr_t slot); +int QAbstractTextDocumentLayout_virtualbase_PageCount(const void* self); +void QAbstractTextDocumentLayout_override_virtual_DocumentSize(void* self, intptr_t slot); +QSizeF* QAbstractTextDocumentLayout_virtualbase_DocumentSize(const void* self); +void QAbstractTextDocumentLayout_override_virtual_FrameBoundingRect(void* self, intptr_t slot); +QRectF* QAbstractTextDocumentLayout_virtualbase_FrameBoundingRect(const void* self, QTextFrame* frame); +void QAbstractTextDocumentLayout_override_virtual_BlockBoundingRect(void* self, intptr_t slot); +QRectF* QAbstractTextDocumentLayout_virtualbase_BlockBoundingRect(const void* self, QTextBlock* block); +void QAbstractTextDocumentLayout_override_virtual_DocumentChanged(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_DocumentChanged(void* self, int from, int charsRemoved, int charsAdded); +void QAbstractTextDocumentLayout_override_virtual_ResizeInlineObject(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_ResizeInlineObject(void* self, QTextInlineObject* item, int posInDocument, QTextFormat* format); +void QAbstractTextDocumentLayout_override_virtual_PositionInlineObject(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_PositionInlineObject(void* self, QTextInlineObject* item, int posInDocument, QTextFormat* format); +void QAbstractTextDocumentLayout_override_virtual_DrawInlineObject(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_DrawInlineObject(void* self, QPainter* painter, QRectF* rect, QTextInlineObject* object, int posInDocument, QTextFormat* format); +void QAbstractTextDocumentLayout_override_virtual_Event(void* self, intptr_t slot); +bool QAbstractTextDocumentLayout_virtualbase_Event(void* self, QEvent* event); +void QAbstractTextDocumentLayout_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAbstractTextDocumentLayout_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAbstractTextDocumentLayout_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAbstractTextDocumentLayout_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAbstractTextDocumentLayout_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_CustomEvent(void* self, QEvent* event); +void QAbstractTextDocumentLayout_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAbstractTextDocumentLayout_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAbstractTextDocumentLayout_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractTextDocumentLayout_Delete(QAbstractTextDocumentLayout* self, bool isSubclass); QSizeF* QTextObjectInterface_IntrinsicSize(QTextObjectInterface* self, QTextDocument* doc, int posInDocument, QTextFormat* format); diff --git a/qt6/gen_qaccessiblebridge.cpp b/qt6/gen_qaccessiblebridge.cpp index be0cd144..36670002 100644 --- a/qt6/gen_qaccessiblebridge.cpp +++ b/qt6/gen_qaccessiblebridge.cpp @@ -2,11 +2,15 @@ #include #include #include +#include +#include +#include #include #include #include #include #include +#include #include #include "gen_qaccessiblebridge.h" #include "_cgo_export.h" @@ -31,6 +35,222 @@ void QAccessibleBridge_Delete(QAccessibleBridge* self, bool isSubclass) { } } +class MiqtVirtualQAccessibleBridgePlugin : public virtual QAccessibleBridgePlugin { +public: + + MiqtVirtualQAccessibleBridgePlugin(): QAccessibleBridgePlugin() {}; + MiqtVirtualQAccessibleBridgePlugin(QObject* parent): QAccessibleBridgePlugin(parent) {}; + + virtual ~MiqtVirtualQAccessibleBridgePlugin() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Create = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleBridge* create(const QString& key) override { + if (handle__Create == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + 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(); + struct miqt_string key_ms; + key_ms.len = key_b.length(); + key_ms.data = static_cast(malloc(key_ms.len)); + memcpy(key_ms.data, key_b.data(), key_ms.len); + struct miqt_string sigval1 = key_ms; + + QAccessibleBridge* callback_return_value = miqt_exec_callback_QAccessibleBridgePlugin_Create(this, handle__Create, sigval1); + + return callback_return_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 QAccessibleBridgePlugin::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAccessibleBridgePlugin_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAccessibleBridgePlugin::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 QAccessibleBridgePlugin::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAccessibleBridgePlugin_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAccessibleBridgePlugin::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) { + QAccessibleBridgePlugin::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAccessibleBridgePlugin_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAccessibleBridgePlugin::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) { + QAccessibleBridgePlugin::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAccessibleBridgePlugin_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAccessibleBridgePlugin::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) { + QAccessibleBridgePlugin::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAccessibleBridgePlugin_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAccessibleBridgePlugin::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) { + QAccessibleBridgePlugin::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAccessibleBridgePlugin_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAccessibleBridgePlugin::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) { + QAccessibleBridgePlugin::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAccessibleBridgePlugin_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAccessibleBridgePlugin::disconnectNotify(*signal); + + } + +}; + +void QAccessibleBridgePlugin_new(QAccessibleBridgePlugin** outptr_QAccessibleBridgePlugin, QObject** outptr_QObject) { + MiqtVirtualQAccessibleBridgePlugin* ret = new MiqtVirtualQAccessibleBridgePlugin(); + *outptr_QAccessibleBridgePlugin = ret; + *outptr_QObject = static_cast(ret); +} + +void QAccessibleBridgePlugin_new2(QObject* parent, QAccessibleBridgePlugin** outptr_QAccessibleBridgePlugin, QObject** outptr_QObject) { + MiqtVirtualQAccessibleBridgePlugin* ret = new MiqtVirtualQAccessibleBridgePlugin(parent); + *outptr_QAccessibleBridgePlugin = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAccessibleBridgePlugin_MetaObject(const QAccessibleBridgePlugin* self) { return (QMetaObject*) self->metaObject(); } @@ -77,9 +297,69 @@ struct miqt_string QAccessibleBridgePlugin_Tr3(const char* s, const char* c, int return _ms; } +void QAccessibleBridgePlugin_override_virtual_Create(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleBridgePlugin*)(self) )->handle__Create = slot; +} + +void QAccessibleBridgePlugin_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleBridgePlugin*)(self) )->handle__Event = slot; +} + +bool QAccessibleBridgePlugin_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAccessibleBridgePlugin*)(self) )->virtualbase_Event(event); +} + +void QAccessibleBridgePlugin_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleBridgePlugin*)(self) )->handle__EventFilter = slot; +} + +bool QAccessibleBridgePlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAccessibleBridgePlugin*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAccessibleBridgePlugin_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleBridgePlugin*)(self) )->handle__TimerEvent = slot; +} + +void QAccessibleBridgePlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAccessibleBridgePlugin*)(self) )->virtualbase_TimerEvent(event); +} + +void QAccessibleBridgePlugin_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleBridgePlugin*)(self) )->handle__ChildEvent = slot; +} + +void QAccessibleBridgePlugin_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAccessibleBridgePlugin*)(self) )->virtualbase_ChildEvent(event); +} + +void QAccessibleBridgePlugin_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleBridgePlugin*)(self) )->handle__CustomEvent = slot; +} + +void QAccessibleBridgePlugin_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAccessibleBridgePlugin*)(self) )->virtualbase_CustomEvent(event); +} + +void QAccessibleBridgePlugin_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleBridgePlugin*)(self) )->handle__ConnectNotify = slot; +} + +void QAccessibleBridgePlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAccessibleBridgePlugin*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAccessibleBridgePlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAccessibleBridgePlugin*)(self) )->handle__DisconnectNotify = slot; +} + +void QAccessibleBridgePlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAccessibleBridgePlugin*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAccessibleBridgePlugin_Delete(QAccessibleBridgePlugin* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qaccessiblebridge.go b/qt6/gen_qaccessiblebridge.go index 829d6d10..fbab9a7f 100644 --- a/qt6/gen_qaccessiblebridge.go +++ b/qt6/gen_qaccessiblebridge.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -114,6 +115,28 @@ func UnsafeNewQAccessibleBridgePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer QObject: UnsafeNewQObject(h_QObject)} } +// NewQAccessibleBridgePlugin constructs a new QAccessibleBridgePlugin object. +func NewQAccessibleBridgePlugin() *QAccessibleBridgePlugin { + var outptr_QAccessibleBridgePlugin *C.QAccessibleBridgePlugin = nil + var outptr_QObject *C.QObject = nil + + C.QAccessibleBridgePlugin_new(&outptr_QAccessibleBridgePlugin, &outptr_QObject) + ret := newQAccessibleBridgePlugin(outptr_QAccessibleBridgePlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAccessibleBridgePlugin2 constructs a new QAccessibleBridgePlugin object. +func NewQAccessibleBridgePlugin2(parent *QObject) *QAccessibleBridgePlugin { + var outptr_QAccessibleBridgePlugin *C.QAccessibleBridgePlugin = nil + var outptr_QObject *C.QObject = nil + + C.QAccessibleBridgePlugin_new2(parent.cPointer(), &outptr_QAccessibleBridgePlugin, &outptr_QObject) + ret := newQAccessibleBridgePlugin(outptr_QAccessibleBridgePlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAccessibleBridgePlugin) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAccessibleBridgePlugin_MetaObject(this.h))) } @@ -162,6 +185,194 @@ func QAccessibleBridgePlugin_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QAccessibleBridgePlugin) OnCreate(slot func(key string) *QAccessibleBridge) { + C.QAccessibleBridgePlugin_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleBridgePlugin_Create +func miqt_exec_callback_QAccessibleBridgePlugin_Create(self *C.QAccessibleBridgePlugin, cb C.intptr_t, key C.struct_miqt_string) *C.QAccessibleBridge { + gofunc, ok := cgo.Handle(cb).Value().(func(key string) *QAccessibleBridge) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var key_ms C.struct_miqt_string = key + key_ret := C.GoStringN(key_ms.data, C.int(int64(key_ms.len))) + C.free(unsafe.Pointer(key_ms.data)) + slotval1 := key_ret + + virtualReturn := gofunc(slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAccessibleBridgePlugin) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAccessibleBridgePlugin_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAccessibleBridgePlugin) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAccessibleBridgePlugin_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleBridgePlugin_Event +func miqt_exec_callback_QAccessibleBridgePlugin_Event(self *C.QAccessibleBridgePlugin, 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((&QAccessibleBridgePlugin{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAccessibleBridgePlugin) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAccessibleBridgePlugin_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAccessibleBridgePlugin) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAccessibleBridgePlugin_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleBridgePlugin_EventFilter +func miqt_exec_callback_QAccessibleBridgePlugin_EventFilter(self *C.QAccessibleBridgePlugin, 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((&QAccessibleBridgePlugin{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAccessibleBridgePlugin) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAccessibleBridgePlugin_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAccessibleBridgePlugin) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAccessibleBridgePlugin_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleBridgePlugin_TimerEvent +func miqt_exec_callback_QAccessibleBridgePlugin_TimerEvent(self *C.QAccessibleBridgePlugin, 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((&QAccessibleBridgePlugin{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAccessibleBridgePlugin) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAccessibleBridgePlugin_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAccessibleBridgePlugin) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAccessibleBridgePlugin_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleBridgePlugin_ChildEvent +func miqt_exec_callback_QAccessibleBridgePlugin_ChildEvent(self *C.QAccessibleBridgePlugin, 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((&QAccessibleBridgePlugin{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAccessibleBridgePlugin) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAccessibleBridgePlugin_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAccessibleBridgePlugin) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAccessibleBridgePlugin_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleBridgePlugin_CustomEvent +func miqt_exec_callback_QAccessibleBridgePlugin_CustomEvent(self *C.QAccessibleBridgePlugin, 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((&QAccessibleBridgePlugin{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAccessibleBridgePlugin) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAccessibleBridgePlugin_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAccessibleBridgePlugin) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAccessibleBridgePlugin_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleBridgePlugin_ConnectNotify +func miqt_exec_callback_QAccessibleBridgePlugin_ConnectNotify(self *C.QAccessibleBridgePlugin, 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((&QAccessibleBridgePlugin{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAccessibleBridgePlugin) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAccessibleBridgePlugin_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAccessibleBridgePlugin) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAccessibleBridgePlugin_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessibleBridgePlugin_DisconnectNotify +func miqt_exec_callback_QAccessibleBridgePlugin_DisconnectNotify(self *C.QAccessibleBridgePlugin, 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((&QAccessibleBridgePlugin{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QAccessibleBridgePlugin) Delete() { diff --git a/qt6/gen_qaccessiblebridge.h b/qt6/gen_qaccessiblebridge.h index ecb1af41..53deffcb 100644 --- a/qt6/gen_qaccessiblebridge.h +++ b/qt6/gen_qaccessiblebridge.h @@ -19,15 +19,23 @@ class QAccessibleBridge; class QAccessibleBridgePlugin; class QAccessibleEvent; class QAccessibleInterface; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAccessibleBridge QAccessibleBridge; typedef struct QAccessibleBridgePlugin QAccessibleBridgePlugin; typedef struct QAccessibleEvent QAccessibleEvent; typedef struct QAccessibleInterface QAccessibleInterface; +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 void QAccessibleBridge_SetRootObject(QAccessibleBridge* self, QAccessibleInterface* rootObject); @@ -35,12 +43,30 @@ void QAccessibleBridge_NotifyAccessibilityUpdate(QAccessibleBridge* self, QAcces void QAccessibleBridge_OperatorAssign(QAccessibleBridge* self, QAccessibleBridge* param1); void QAccessibleBridge_Delete(QAccessibleBridge* self, bool isSubclass); +void QAccessibleBridgePlugin_new(QAccessibleBridgePlugin** outptr_QAccessibleBridgePlugin, QObject** outptr_QObject); +void QAccessibleBridgePlugin_new2(QObject* parent, QAccessibleBridgePlugin** outptr_QAccessibleBridgePlugin, QObject** outptr_QObject); QMetaObject* QAccessibleBridgePlugin_MetaObject(const QAccessibleBridgePlugin* self); void* QAccessibleBridgePlugin_Metacast(QAccessibleBridgePlugin* self, const char* param1); 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_override_virtual_Create(void* self, intptr_t slot); +QAccessibleBridge* QAccessibleBridgePlugin_virtualbase_Create(void* self, struct miqt_string key); +void QAccessibleBridgePlugin_override_virtual_Event(void* self, intptr_t slot); +bool QAccessibleBridgePlugin_virtualbase_Event(void* self, QEvent* event); +void QAccessibleBridgePlugin_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAccessibleBridgePlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAccessibleBridgePlugin_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAccessibleBridgePlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAccessibleBridgePlugin_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAccessibleBridgePlugin_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAccessibleBridgePlugin_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAccessibleBridgePlugin_virtualbase_CustomEvent(void* self, QEvent* event); +void QAccessibleBridgePlugin_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAccessibleBridgePlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAccessibleBridgePlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAccessibleBridgePlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAccessibleBridgePlugin_Delete(QAccessibleBridgePlugin* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qaccessibleobject.cpp b/qt6/gen_qaccessibleobject.cpp index b948ed6d..5a54f869 100644 --- a/qt6/gen_qaccessibleobject.cpp +++ b/qt6/gen_qaccessibleobject.cpp @@ -33,352 +33,8 @@ QAccessibleInterface* QAccessibleObject_ChildAt(const QAccessibleObject* self, i return self->childAt(static_cast(x), static_cast(y)); } -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(); + QAccessibleApplication* ret = new QAccessibleApplication(); *outptr_QAccessibleApplication = ret; *outptr_QAccessibleObject = static_cast(ret); *outptr_QAccessibleInterface = static_cast(ret); @@ -428,121 +84,9 @@ QAccessible__State* QAccessibleApplication_State(const QAccessibleApplication* s return new QAccessible::State(self->state()); } -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 ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qaccessibleobject.go b/qt6/gen_qaccessibleobject.go index 43e4a38f..f1a7fa75 100644 --- a/qt6/gen_qaccessibleobject.go +++ b/qt6/gen_qaccessibleobject.go @@ -10,7 +10,6 @@ import "C" import ( "runtime" - "runtime/cgo" "unsafe" ) @@ -173,344 +172,6 @@ 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.bool(this.isSubclass)) diff --git a/qt6/gen_qaccessibleobject.h b/qt6/gen_qaccessibleobject.h index e4baa807..3a0d3c2d 100644 --- a/qt6/gen_qaccessibleobject.h +++ b/qt6/gen_qaccessibleobject.h @@ -52,34 +52,6 @@ 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_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 diff --git a/qt6/gen_qaccessibleplugin.cpp b/qt6/gen_qaccessibleplugin.cpp index 0bebff96..eff9735c 100644 --- a/qt6/gen_qaccessibleplugin.cpp +++ b/qt6/gen_qaccessibleplugin.cpp @@ -1,14 +1,235 @@ #include #include +#include +#include +#include #include #include #include #include #include +#include #include #include "gen_qaccessibleplugin.h" #include "_cgo_export.h" +class MiqtVirtualQAccessiblePlugin : public virtual QAccessiblePlugin { +public: + + MiqtVirtualQAccessiblePlugin(): QAccessiblePlugin() {}; + MiqtVirtualQAccessiblePlugin(QObject* parent): QAccessiblePlugin(parent) {}; + + virtual ~MiqtVirtualQAccessiblePlugin() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Create = 0; + + // Subclass to allow providing a Go implementation + virtual QAccessibleInterface* create(const QString& key, QObject* object) override { + if (handle__Create == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + 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(); + struct miqt_string key_ms; + key_ms.len = key_b.length(); + key_ms.data = static_cast(malloc(key_ms.len)); + memcpy(key_ms.data, key_b.data(), key_ms.len); + struct miqt_string sigval1 = key_ms; + QObject* sigval2 = object; + + QAccessibleInterface* callback_return_value = miqt_exec_callback_QAccessiblePlugin_Create(this, handle__Create, sigval1, sigval2); + + return callback_return_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 QAccessiblePlugin::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAccessiblePlugin_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAccessiblePlugin::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 QAccessiblePlugin::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAccessiblePlugin_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QAccessiblePlugin::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) { + QAccessiblePlugin::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QAccessiblePlugin_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QAccessiblePlugin::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) { + QAccessiblePlugin::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QAccessiblePlugin_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QAccessiblePlugin::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) { + QAccessiblePlugin::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QAccessiblePlugin_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QAccessiblePlugin::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) { + QAccessiblePlugin::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAccessiblePlugin_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QAccessiblePlugin::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) { + QAccessiblePlugin::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QAccessiblePlugin_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QAccessiblePlugin::disconnectNotify(*signal); + + } + +}; + +void QAccessiblePlugin_new(QAccessiblePlugin** outptr_QAccessiblePlugin, QObject** outptr_QObject) { + MiqtVirtualQAccessiblePlugin* ret = new MiqtVirtualQAccessiblePlugin(); + *outptr_QAccessiblePlugin = ret; + *outptr_QObject = static_cast(ret); +} + +void QAccessiblePlugin_new2(QObject* parent, QAccessiblePlugin** outptr_QAccessiblePlugin, QObject** outptr_QObject) { + MiqtVirtualQAccessiblePlugin* ret = new MiqtVirtualQAccessiblePlugin(parent); + *outptr_QAccessiblePlugin = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAccessiblePlugin_MetaObject(const QAccessiblePlugin* self) { return (QMetaObject*) self->metaObject(); } @@ -55,9 +276,69 @@ struct miqt_string QAccessiblePlugin_Tr3(const char* s, const char* c, int n) { return _ms; } +void QAccessiblePlugin_override_virtual_Create(void* self, intptr_t slot) { + dynamic_cast( (QAccessiblePlugin*)(self) )->handle__Create = slot; +} + +void QAccessiblePlugin_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAccessiblePlugin*)(self) )->handle__Event = slot; +} + +bool QAccessiblePlugin_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAccessiblePlugin*)(self) )->virtualbase_Event(event); +} + +void QAccessiblePlugin_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAccessiblePlugin*)(self) )->handle__EventFilter = slot; +} + +bool QAccessiblePlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQAccessiblePlugin*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QAccessiblePlugin_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QAccessiblePlugin*)(self) )->handle__TimerEvent = slot; +} + +void QAccessiblePlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQAccessiblePlugin*)(self) )->virtualbase_TimerEvent(event); +} + +void QAccessiblePlugin_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QAccessiblePlugin*)(self) )->handle__ChildEvent = slot; +} + +void QAccessiblePlugin_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQAccessiblePlugin*)(self) )->virtualbase_ChildEvent(event); +} + +void QAccessiblePlugin_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QAccessiblePlugin*)(self) )->handle__CustomEvent = slot; +} + +void QAccessiblePlugin_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQAccessiblePlugin*)(self) )->virtualbase_CustomEvent(event); +} + +void QAccessiblePlugin_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAccessiblePlugin*)(self) )->handle__ConnectNotify = slot; +} + +void QAccessiblePlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAccessiblePlugin*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QAccessiblePlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QAccessiblePlugin*)(self) )->handle__DisconnectNotify = slot; +} + +void QAccessiblePlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQAccessiblePlugin*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QAccessiblePlugin_Delete(QAccessiblePlugin* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qaccessibleplugin.go b/qt6/gen_qaccessibleplugin.go index 8b414383..81d05d0f 100644 --- a/qt6/gen_qaccessibleplugin.go +++ b/qt6/gen_qaccessibleplugin.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,28 @@ func UnsafeNewQAccessiblePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAc QObject: UnsafeNewQObject(h_QObject)} } +// NewQAccessiblePlugin constructs a new QAccessiblePlugin object. +func NewQAccessiblePlugin() *QAccessiblePlugin { + var outptr_QAccessiblePlugin *C.QAccessiblePlugin = nil + var outptr_QObject *C.QObject = nil + + C.QAccessiblePlugin_new(&outptr_QAccessiblePlugin, &outptr_QObject) + ret := newQAccessiblePlugin(outptr_QAccessiblePlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAccessiblePlugin2 constructs a new QAccessiblePlugin object. +func NewQAccessiblePlugin2(parent *QObject) *QAccessiblePlugin { + var outptr_QAccessiblePlugin *C.QAccessiblePlugin = nil + var outptr_QObject *C.QObject = nil + + C.QAccessiblePlugin_new2(parent.cPointer(), &outptr_QAccessiblePlugin, &outptr_QObject) + ret := newQAccessiblePlugin(outptr_QAccessiblePlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAccessiblePlugin) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAccessiblePlugin_MetaObject(this.h))) } @@ -100,6 +123,195 @@ func QAccessiblePlugin_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QAccessiblePlugin) OnCreate(slot func(key string, object *QObject) *QAccessibleInterface) { + C.QAccessiblePlugin_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessiblePlugin_Create +func miqt_exec_callback_QAccessiblePlugin_Create(self *C.QAccessiblePlugin, cb C.intptr_t, key C.struct_miqt_string, object *C.QObject) *C.QAccessibleInterface { + gofunc, ok := cgo.Handle(cb).Value().(func(key string, object *QObject) *QAccessibleInterface) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var key_ms C.struct_miqt_string = key + key_ret := C.GoStringN(key_ms.data, C.int(int64(key_ms.len))) + C.free(unsafe.Pointer(key_ms.data)) + slotval1 := key_ret + slotval2 := UnsafeNewQObject(unsafe.Pointer(object)) + + virtualReturn := gofunc(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QAccessiblePlugin) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAccessiblePlugin_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAccessiblePlugin) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAccessiblePlugin_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessiblePlugin_Event +func miqt_exec_callback_QAccessiblePlugin_Event(self *C.QAccessiblePlugin, 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((&QAccessiblePlugin{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAccessiblePlugin) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QAccessiblePlugin_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAccessiblePlugin) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QAccessiblePlugin_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessiblePlugin_EventFilter +func miqt_exec_callback_QAccessiblePlugin_EventFilter(self *C.QAccessiblePlugin, 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((&QAccessiblePlugin{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAccessiblePlugin) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QAccessiblePlugin_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAccessiblePlugin) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QAccessiblePlugin_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessiblePlugin_TimerEvent +func miqt_exec_callback_QAccessiblePlugin_TimerEvent(self *C.QAccessiblePlugin, 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((&QAccessiblePlugin{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QAccessiblePlugin) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QAccessiblePlugin_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAccessiblePlugin) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QAccessiblePlugin_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessiblePlugin_ChildEvent +func miqt_exec_callback_QAccessiblePlugin_ChildEvent(self *C.QAccessiblePlugin, 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((&QAccessiblePlugin{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QAccessiblePlugin) callVirtualBase_CustomEvent(event *QEvent) { + + C.QAccessiblePlugin_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAccessiblePlugin) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QAccessiblePlugin_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessiblePlugin_CustomEvent +func miqt_exec_callback_QAccessiblePlugin_CustomEvent(self *C.QAccessiblePlugin, 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((&QAccessiblePlugin{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QAccessiblePlugin) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QAccessiblePlugin_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAccessiblePlugin) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAccessiblePlugin_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessiblePlugin_ConnectNotify +func miqt_exec_callback_QAccessiblePlugin_ConnectNotify(self *C.QAccessiblePlugin, 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((&QAccessiblePlugin{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QAccessiblePlugin) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QAccessiblePlugin_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QAccessiblePlugin) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QAccessiblePlugin_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAccessiblePlugin_DisconnectNotify +func miqt_exec_callback_QAccessiblePlugin_DisconnectNotify(self *C.QAccessiblePlugin, 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((&QAccessiblePlugin{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QAccessiblePlugin) Delete() { diff --git a/qt6/gen_qaccessibleplugin.h b/qt6/gen_qaccessibleplugin.h index 7dda9e4f..3f382fa2 100644 --- a/qt6/gen_qaccessibleplugin.h +++ b/qt6/gen_qaccessibleplugin.h @@ -17,21 +17,47 @@ extern "C" { #ifdef __cplusplus class QAccessibleInterface; class QAccessiblePlugin; +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QAccessibleInterface QAccessibleInterface; typedef struct QAccessiblePlugin QAccessiblePlugin; +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 +void QAccessiblePlugin_new(QAccessiblePlugin** outptr_QAccessiblePlugin, QObject** outptr_QObject); +void QAccessiblePlugin_new2(QObject* parent, QAccessiblePlugin** outptr_QAccessiblePlugin, QObject** outptr_QObject); QMetaObject* QAccessiblePlugin_MetaObject(const QAccessiblePlugin* self); void* QAccessiblePlugin_Metacast(QAccessiblePlugin* self, const char* param1); 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_override_virtual_Create(void* self, intptr_t slot); +QAccessibleInterface* QAccessiblePlugin_virtualbase_Create(void* self, struct miqt_string key, QObject* object); +void QAccessiblePlugin_override_virtual_Event(void* self, intptr_t slot); +bool QAccessiblePlugin_virtualbase_Event(void* self, QEvent* event); +void QAccessiblePlugin_override_virtual_EventFilter(void* self, intptr_t slot); +bool QAccessiblePlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QAccessiblePlugin_override_virtual_TimerEvent(void* self, intptr_t slot); +void QAccessiblePlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QAccessiblePlugin_override_virtual_ChildEvent(void* self, intptr_t slot); +void QAccessiblePlugin_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QAccessiblePlugin_override_virtual_CustomEvent(void* self, intptr_t slot); +void QAccessiblePlugin_virtualbase_CustomEvent(void* self, QEvent* event); +void QAccessiblePlugin_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QAccessiblePlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QAccessiblePlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QAccessiblePlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAccessiblePlugin_Delete(QAccessiblePlugin* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qanimationgroup.cpp b/qt6/gen_qanimationgroup.cpp index 1495fb1b..e7b1515c 100644 --- a/qt6/gen_qanimationgroup.cpp +++ b/qt6/gen_qanimationgroup.cpp @@ -10,6 +10,136 @@ #include "gen_qanimationgroup.h" #include "_cgo_export.h" +class MiqtVirtualQAnimationGroup : public virtual QAnimationGroup { +public: + + MiqtVirtualQAnimationGroup(): QAnimationGroup() {}; + MiqtVirtualQAnimationGroup(QObject* parent): QAnimationGroup(parent) {}; + + virtual ~MiqtVirtualQAnimationGroup() = 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 QAnimationGroup::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAnimationGroup_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QAnimationGroup::event(event); + + } + + // 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 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QAnimationGroup_Duration(const_cast(this), handle__Duration); + + return static_cast(callback_return_value); + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = currentTime; + + miqt_exec_callback_QAnimationGroup_UpdateCurrentTime(this, handle__UpdateCurrentTime, sigval1); + + + } + + // 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) { + QAnimationGroup::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_QAnimationGroup_UpdateState(this, handle__UpdateState, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateState(int newState, int oldState) { + + QAnimationGroup::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) { + QAnimationGroup::updateDirection(direction); + return; + } + + QAbstractAnimation::Direction direction_ret = direction; + int sigval1 = static_cast(direction_ret); + + miqt_exec_callback_QAnimationGroup_UpdateDirection(this, handle__UpdateDirection, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateDirection(int direction) { + + QAnimationGroup::updateDirection(static_cast(direction)); + + } + +}; + +void QAnimationGroup_new(QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQAnimationGroup* ret = new MiqtVirtualQAnimationGroup(); + *outptr_QAnimationGroup = ret; + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + +void QAnimationGroup_new2(QObject* parent, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { + MiqtVirtualQAnimationGroup* ret = new MiqtVirtualQAnimationGroup(parent); + *outptr_QAnimationGroup = ret; + *outptr_QAbstractAnimation = static_cast(ret); + *outptr_QObject = static_cast(ret); +} + QMetaObject* QAnimationGroup_MetaObject(const QAnimationGroup* self) { return (QMetaObject*) self->metaObject(); } @@ -83,9 +213,41 @@ struct miqt_string QAnimationGroup_Tr3(const char* s, const char* c, int n) { return _ms; } +void QAnimationGroup_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QAnimationGroup*)(self) )->handle__Event = slot; +} + +bool QAnimationGroup_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQAnimationGroup*)(self) )->virtualbase_Event(event); +} + +void QAnimationGroup_override_virtual_Duration(void* self, intptr_t slot) { + dynamic_cast( (QAnimationGroup*)(self) )->handle__Duration = slot; +} + +void QAnimationGroup_override_virtual_UpdateCurrentTime(void* self, intptr_t slot) { + dynamic_cast( (QAnimationGroup*)(self) )->handle__UpdateCurrentTime = slot; +} + +void QAnimationGroup_override_virtual_UpdateState(void* self, intptr_t slot) { + dynamic_cast( (QAnimationGroup*)(self) )->handle__UpdateState = slot; +} + +void QAnimationGroup_virtualbase_UpdateState(void* self, int newState, int oldState) { + ( (MiqtVirtualQAnimationGroup*)(self) )->virtualbase_UpdateState(newState, oldState); +} + +void QAnimationGroup_override_virtual_UpdateDirection(void* self, intptr_t slot) { + dynamic_cast( (QAnimationGroup*)(self) )->handle__UpdateDirection = slot; +} + +void QAnimationGroup_virtualbase_UpdateDirection(void* self, int direction) { + ( (MiqtVirtualQAnimationGroup*)(self) )->virtualbase_UpdateDirection(direction); +} + void QAnimationGroup_Delete(QAnimationGroup* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qanimationgroup.go b/qt6/gen_qanimationgroup.go index e631c61c..0d2b11f8 100644 --- a/qt6/gen_qanimationgroup.go +++ b/qt6/gen_qanimationgroup.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,30 @@ func UnsafeNewQAnimationGroup(h unsafe.Pointer, h_QAbstractAnimation unsafe.Poin QAbstractAnimation: UnsafeNewQAbstractAnimation(h_QAbstractAnimation, h_QObject)} } +// NewQAnimationGroup constructs a new QAnimationGroup object. +func NewQAnimationGroup() *QAnimationGroup { + var outptr_QAnimationGroup *C.QAnimationGroup = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QAnimationGroup_new(&outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQAnimationGroup(outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQAnimationGroup2 constructs a new QAnimationGroup object. +func NewQAnimationGroup2(parent *QObject) *QAnimationGroup { + var outptr_QAnimationGroup *C.QAnimationGroup = nil + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + var outptr_QObject *C.QObject = nil + + C.QAnimationGroup_new2(parent.cPointer(), &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) + ret := newQAnimationGroup(outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QAnimationGroup) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAnimationGroup_MetaObject(this.h))) } @@ -125,6 +150,112 @@ func QAnimationGroup_Tr3(s string, c string, n int) string { return _ret } +func (this *QAnimationGroup) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QAnimationGroup_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAnimationGroup) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAnimationGroup_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationGroup_Event +func miqt_exec_callback_QAnimationGroup_Event(self *C.QAnimationGroup, 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((&QAnimationGroup{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QAnimationGroup) OnDuration(slot func() int) { + C.QAnimationGroup_override_virtual_Duration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationGroup_Duration +func miqt_exec_callback_QAnimationGroup_Duration(self *C.QAnimationGroup, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *QAnimationGroup) OnUpdateCurrentTime(slot func(currentTime int)) { + C.QAnimationGroup_override_virtual_UpdateCurrentTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationGroup_UpdateCurrentTime +func miqt_exec_callback_QAnimationGroup_UpdateCurrentTime(self *C.QAnimationGroup, cb C.intptr_t, currentTime C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(currentTime int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(currentTime) + + gofunc(slotval1) + +} + +func (this *QAnimationGroup) callVirtualBase_UpdateState(newState QAbstractAnimation__State, oldState QAbstractAnimation__State) { + + C.QAnimationGroup_virtualbase_UpdateState(unsafe.Pointer(this.h), (C.int)(newState), (C.int)(oldState)) + +} +func (this *QAnimationGroup) OnUpdateState(slot func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) { + C.QAnimationGroup_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationGroup_UpdateState +func miqt_exec_callback_QAnimationGroup_UpdateState(self *C.QAnimationGroup, 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((&QAnimationGroup{h: self}).callVirtualBase_UpdateState, slotval1, slotval2) + +} + +func (this *QAnimationGroup) callVirtualBase_UpdateDirection(direction QAbstractAnimation__Direction) { + + C.QAnimationGroup_virtualbase_UpdateDirection(unsafe.Pointer(this.h), (C.int)(direction)) + +} +func (this *QAnimationGroup) OnUpdateDirection(slot func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) { + C.QAnimationGroup_override_virtual_UpdateDirection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAnimationGroup_UpdateDirection +func miqt_exec_callback_QAnimationGroup_UpdateDirection(self *C.QAnimationGroup, 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((&QAnimationGroup{h: self}).callVirtualBase_UpdateDirection, slotval1) + +} + // Delete this object from C++ memory. func (this *QAnimationGroup) Delete() { C.QAnimationGroup_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qanimationgroup.h b/qt6/gen_qanimationgroup.h index 7a57f0e9..37ddef07 100644 --- a/qt6/gen_qanimationgroup.h +++ b/qt6/gen_qanimationgroup.h @@ -28,6 +28,8 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QAnimationGroup_new(QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +void QAnimationGroup_new2(QObject* parent, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); QMetaObject* QAnimationGroup_MetaObject(const QAnimationGroup* self); void* QAnimationGroup_Metacast(QAnimationGroup* self, const char* param1); struct miqt_string QAnimationGroup_Tr(const char* s); @@ -42,6 +44,16 @@ 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_override_virtual_Event(void* self, intptr_t slot); +bool QAnimationGroup_virtualbase_Event(void* self, QEvent* event); +void QAnimationGroup_override_virtual_Duration(void* self, intptr_t slot); +int QAnimationGroup_virtualbase_Duration(const void* self); +void QAnimationGroup_override_virtual_UpdateCurrentTime(void* self, intptr_t slot); +void QAnimationGroup_virtualbase_UpdateCurrentTime(void* self, int currentTime); +void QAnimationGroup_override_virtual_UpdateState(void* self, intptr_t slot); +void QAnimationGroup_virtualbase_UpdateState(void* self, int newState, int oldState); +void QAnimationGroup_override_virtual_UpdateDirection(void* self, intptr_t slot); +void QAnimationGroup_virtualbase_UpdateDirection(void* self, int direction); void QAnimationGroup_Delete(QAnimationGroup* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qcolumnview.cpp b/qt6/gen_qcolumnview.cpp index 4e4705d1..9d90f960 100644 --- a/qt6/gen_qcolumnview.cpp +++ b/qt6/gen_qcolumnview.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -21,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -342,6 +344,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QColumnView::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QColumnView_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QColumnView::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__HorizontalOffset = 0; @@ -739,6 +766,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QColumnView::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QColumnView_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QColumnView::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__UpdateEditorData = 0; @@ -1791,6 +1847,14 @@ void QColumnView_virtualbase_SetSelection(void* self, QRect* rect, int command) ( (MiqtVirtualQColumnView*)(self) )->virtualbase_SetSelection(rect, command); } +void QColumnView_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QColumnView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQColumnView*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QColumnView_override_virtual_HorizontalOffset(void* self, intptr_t slot) { dynamic_cast( (QColumnView*)(self) )->handle__HorizontalOffset = slot; } @@ -1911,6 +1975,14 @@ void QColumnView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* paren ( (MiqtVirtualQColumnView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); } +void QColumnView_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QColumnView*)(self) )->handle__SelectionChanged = slot; +} + +void QColumnView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQColumnView*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QColumnView_override_virtual_UpdateEditorData(void* self, intptr_t slot) { dynamic_cast( (QColumnView*)(self) )->handle__UpdateEditorData = slot; } diff --git a/qt6/gen_qcolumnview.go b/qt6/gen_qcolumnview.go index 3ec3c8a5..0bb5d48a 100644 --- a/qt6/gen_qcolumnview.go +++ b/qt6/gen_qcolumnview.go @@ -519,6 +519,34 @@ func miqt_exec_callback_QColumnView_SetSelection(self *C.QColumnView, cb C.intpt } +func (this *QColumnView) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QColumnView_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QColumnView) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QColumnView_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_VisualRegionForSelection +func miqt_exec_callback_QColumnView_VisualRegionForSelection(self *C.QColumnView, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QColumnView{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QColumnView) callVirtualBase_HorizontalOffset() int { return (int)(C.QColumnView_virtualbase_HorizontalOffset(unsafe.Pointer(this.h))) @@ -897,6 +925,30 @@ func miqt_exec_callback_QColumnView_RowsAboutToBeRemoved(self *C.QColumnView, cb } +func (this *QColumnView) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QColumnView_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QColumnView) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QColumnView_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QColumnView_SelectionChanged +func miqt_exec_callback_QColumnView_SelectionChanged(self *C.QColumnView, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QColumnView{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QColumnView) callVirtualBase_UpdateEditorData() { C.QColumnView_virtualbase_UpdateEditorData(unsafe.Pointer(this.h)) diff --git a/qt6/gen_qcolumnview.h b/qt6/gen_qcolumnview.h index 0b95bac2..7e218a5d 100644 --- a/qt6/gen_qcolumnview.h +++ b/qt6/gen_qcolumnview.h @@ -28,6 +28,7 @@ class QEvent; class QFocusEvent; class QFrame; class QInputMethodEvent; +class QItemSelection; class QItemSelectionModel; class QKeyEvent; class QMetaObject; @@ -37,6 +38,7 @@ class QObject; class QPaintDevice; class QPoint; class QRect; +class QRegion; class QResizeEvent; class QSize; class QStyleOptionViewItem; @@ -57,6 +59,7 @@ typedef struct QEvent QEvent; typedef struct QFocusEvent QFocusEvent; typedef struct QFrame QFrame; typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; @@ -66,6 +69,7 @@ typedef struct QObject QObject; typedef struct QPaintDevice QPaintDevice; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; @@ -99,6 +103,7 @@ 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); +QRegion* QColumnView_VisualRegionForSelection(const QColumnView* self, QItemSelection* selection); int QColumnView_HorizontalOffset(const QColumnView* self); int QColumnView_VerticalOffset(const QColumnView* self); void QColumnView_RowsInserted(QColumnView* self, QModelIndex* parent, int start, int end); @@ -131,6 +136,8 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QColumnView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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); @@ -161,6 +168,8 @@ 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_SelectionChanged(void* self, intptr_t slot); +void QColumnView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt6/gen_qgenericplugin.cpp b/qt6/gen_qgenericplugin.cpp index e3337f89..f371f628 100644 --- a/qt6/gen_qgenericplugin.cpp +++ b/qt6/gen_qgenericplugin.cpp @@ -1,13 +1,241 @@ +#include +#include #include +#include #include #include #include #include #include +#include #include #include "gen_qgenericplugin.h" #include "_cgo_export.h" +class MiqtVirtualQGenericPlugin : public virtual QGenericPlugin { +public: + + MiqtVirtualQGenericPlugin(): QGenericPlugin() {}; + MiqtVirtualQGenericPlugin(QObject* parent): QGenericPlugin(parent) {}; + + virtual ~MiqtVirtualQGenericPlugin() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Create = 0; + + // Subclass to allow providing a Go implementation + virtual QObject* create(const QString& name, const QString& spec) override { + if (handle__Create == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + 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(); + struct miqt_string name_ms; + name_ms.len = name_b.length(); + name_ms.data = static_cast(malloc(name_ms.len)); + memcpy(name_ms.data, name_b.data(), name_ms.len); + struct miqt_string sigval1 = name_ms; + const QString spec_ret = spec; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray spec_b = spec_ret.toUtf8(); + struct miqt_string spec_ms; + spec_ms.len = spec_b.length(); + spec_ms.data = static_cast(malloc(spec_ms.len)); + memcpy(spec_ms.data, spec_b.data(), spec_ms.len); + struct miqt_string sigval2 = spec_ms; + + QObject* callback_return_value = miqt_exec_callback_QGenericPlugin_Create(this, handle__Create, sigval1, sigval2); + + return callback_return_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 QGenericPlugin::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGenericPlugin_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGenericPlugin::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 QGenericPlugin::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGenericPlugin_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QGenericPlugin::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) { + QGenericPlugin::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QGenericPlugin_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QGenericPlugin::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) { + QGenericPlugin::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QGenericPlugin_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QGenericPlugin::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) { + QGenericPlugin::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGenericPlugin_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QGenericPlugin::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) { + QGenericPlugin::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGenericPlugin_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QGenericPlugin::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) { + QGenericPlugin::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGenericPlugin_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QGenericPlugin::disconnectNotify(*signal); + + } + +}; + +void QGenericPlugin_new(QGenericPlugin** outptr_QGenericPlugin, QObject** outptr_QObject) { + MiqtVirtualQGenericPlugin* ret = new MiqtVirtualQGenericPlugin(); + *outptr_QGenericPlugin = ret; + *outptr_QObject = static_cast(ret); +} + +void QGenericPlugin_new2(QObject* parent, QGenericPlugin** outptr_QGenericPlugin, QObject** outptr_QObject) { + MiqtVirtualQGenericPlugin* ret = new MiqtVirtualQGenericPlugin(parent); + *outptr_QGenericPlugin = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QGenericPlugin_MetaObject(const QGenericPlugin* self) { return (QMetaObject*) self->metaObject(); } @@ -55,9 +283,69 @@ struct miqt_string QGenericPlugin_Tr3(const char* s, const char* c, int n) { return _ms; } +void QGenericPlugin_override_virtual_Create(void* self, intptr_t slot) { + dynamic_cast( (QGenericPlugin*)(self) )->handle__Create = slot; +} + +void QGenericPlugin_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGenericPlugin*)(self) )->handle__Event = slot; +} + +bool QGenericPlugin_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGenericPlugin*)(self) )->virtualbase_Event(event); +} + +void QGenericPlugin_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGenericPlugin*)(self) )->handle__EventFilter = slot; +} + +bool QGenericPlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQGenericPlugin*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QGenericPlugin_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QGenericPlugin*)(self) )->handle__TimerEvent = slot; +} + +void QGenericPlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQGenericPlugin*)(self) )->virtualbase_TimerEvent(event); +} + +void QGenericPlugin_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGenericPlugin*)(self) )->handle__ChildEvent = slot; +} + +void QGenericPlugin_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQGenericPlugin*)(self) )->virtualbase_ChildEvent(event); +} + +void QGenericPlugin_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QGenericPlugin*)(self) )->handle__CustomEvent = slot; +} + +void QGenericPlugin_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGenericPlugin*)(self) )->virtualbase_CustomEvent(event); +} + +void QGenericPlugin_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGenericPlugin*)(self) )->handle__ConnectNotify = slot; +} + +void QGenericPlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGenericPlugin*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QGenericPlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGenericPlugin*)(self) )->handle__DisconnectNotify = slot; +} + +void QGenericPlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGenericPlugin*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QGenericPlugin_Delete(QGenericPlugin* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qgenericplugin.go b/qt6/gen_qgenericplugin.go index 647290f9..e59c1e03 100644 --- a/qt6/gen_qgenericplugin.go +++ b/qt6/gen_qgenericplugin.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,28 @@ func UnsafeNewQGenericPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGener QObject: UnsafeNewQObject(h_QObject)} } +// NewQGenericPlugin constructs a new QGenericPlugin object. +func NewQGenericPlugin() *QGenericPlugin { + var outptr_QGenericPlugin *C.QGenericPlugin = nil + var outptr_QObject *C.QObject = nil + + C.QGenericPlugin_new(&outptr_QGenericPlugin, &outptr_QObject) + ret := newQGenericPlugin(outptr_QGenericPlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQGenericPlugin2 constructs a new QGenericPlugin object. +func NewQGenericPlugin2(parent *QObject) *QGenericPlugin { + var outptr_QGenericPlugin *C.QGenericPlugin = nil + var outptr_QObject *C.QObject = nil + + C.QGenericPlugin_new2(parent.cPointer(), &outptr_QGenericPlugin, &outptr_QObject) + ret := newQGenericPlugin(outptr_QGenericPlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QGenericPlugin) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QGenericPlugin_MetaObject(this.h))) } @@ -104,6 +127,198 @@ func QGenericPlugin_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QGenericPlugin) OnCreate(slot func(name string, spec string) *QObject) { + C.QGenericPlugin_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGenericPlugin_Create +func miqt_exec_callback_QGenericPlugin_Create(self *C.QGenericPlugin, cb C.intptr_t, name C.struct_miqt_string, spec C.struct_miqt_string) *C.QObject { + gofunc, ok := cgo.Handle(cb).Value().(func(name string, spec string) *QObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var name_ms C.struct_miqt_string = name + name_ret := C.GoStringN(name_ms.data, C.int(int64(name_ms.len))) + C.free(unsafe.Pointer(name_ms.data)) + slotval1 := name_ret + var spec_ms C.struct_miqt_string = spec + spec_ret := C.GoStringN(spec_ms.data, C.int(int64(spec_ms.len))) + C.free(unsafe.Pointer(spec_ms.data)) + slotval2 := spec_ret + + virtualReturn := gofunc(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGenericPlugin) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGenericPlugin_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGenericPlugin) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGenericPlugin_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGenericPlugin_Event +func miqt_exec_callback_QGenericPlugin_Event(self *C.QGenericPlugin, 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((&QGenericPlugin{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGenericPlugin) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QGenericPlugin_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGenericPlugin) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QGenericPlugin_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGenericPlugin_EventFilter +func miqt_exec_callback_QGenericPlugin_EventFilter(self *C.QGenericPlugin, 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((&QGenericPlugin{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGenericPlugin) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QGenericPlugin_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGenericPlugin) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QGenericPlugin_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGenericPlugin_TimerEvent +func miqt_exec_callback_QGenericPlugin_TimerEvent(self *C.QGenericPlugin, 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((&QGenericPlugin{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QGenericPlugin) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QGenericPlugin_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGenericPlugin) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QGenericPlugin_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGenericPlugin_ChildEvent +func miqt_exec_callback_QGenericPlugin_ChildEvent(self *C.QGenericPlugin, 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((&QGenericPlugin{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QGenericPlugin) callVirtualBase_CustomEvent(event *QEvent) { + + C.QGenericPlugin_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGenericPlugin) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGenericPlugin_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGenericPlugin_CustomEvent +func miqt_exec_callback_QGenericPlugin_CustomEvent(self *C.QGenericPlugin, 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((&QGenericPlugin{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QGenericPlugin) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QGenericPlugin_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGenericPlugin) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGenericPlugin_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGenericPlugin_ConnectNotify +func miqt_exec_callback_QGenericPlugin_ConnectNotify(self *C.QGenericPlugin, 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((&QGenericPlugin{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QGenericPlugin) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QGenericPlugin_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGenericPlugin) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGenericPlugin_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGenericPlugin_DisconnectNotify +func miqt_exec_callback_QGenericPlugin_DisconnectNotify(self *C.QGenericPlugin, 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((&QGenericPlugin{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QGenericPlugin) Delete() { diff --git a/qt6/gen_qgenericplugin.h b/qt6/gen_qgenericplugin.h index bf647ff1..adac9697 100644 --- a/qt6/gen_qgenericplugin.h +++ b/qt6/gen_qgenericplugin.h @@ -15,21 +15,47 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QGenericPlugin; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QGenericPlugin QGenericPlugin; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif +void QGenericPlugin_new(QGenericPlugin** outptr_QGenericPlugin, QObject** outptr_QObject); +void QGenericPlugin_new2(QObject* parent, QGenericPlugin** outptr_QGenericPlugin, QObject** outptr_QObject); QMetaObject* QGenericPlugin_MetaObject(const QGenericPlugin* self); void* QGenericPlugin_Metacast(QGenericPlugin* self, const char* param1); 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_override_virtual_Create(void* self, intptr_t slot); +QObject* QGenericPlugin_virtualbase_Create(void* self, struct miqt_string name, struct miqt_string spec); +void QGenericPlugin_override_virtual_Event(void* self, intptr_t slot); +bool QGenericPlugin_virtualbase_Event(void* self, QEvent* event); +void QGenericPlugin_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGenericPlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QGenericPlugin_override_virtual_TimerEvent(void* self, intptr_t slot); +void QGenericPlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QGenericPlugin_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGenericPlugin_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QGenericPlugin_override_virtual_CustomEvent(void* self, intptr_t slot); +void QGenericPlugin_virtualbase_CustomEvent(void* self, QEvent* event); +void QGenericPlugin_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QGenericPlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QGenericPlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QGenericPlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QGenericPlugin_Delete(QGenericPlugin* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qgesturerecognizer.cpp b/qt6/gen_qgesturerecognizer.cpp index 2e305523..61a64702 100644 --- a/qt6/gen_qgesturerecognizer.cpp +++ b/qt6/gen_qgesturerecognizer.cpp @@ -6,6 +6,85 @@ #include "gen_qgesturerecognizer.h" #include "_cgo_export.h" +class MiqtVirtualQGestureRecognizer : public virtual QGestureRecognizer { +public: + + MiqtVirtualQGestureRecognizer(): QGestureRecognizer() {}; + + virtual ~MiqtVirtualQGestureRecognizer() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Create = 0; + + // Subclass to allow providing a Go implementation + virtual QGesture* create(QObject* target) override { + if (handle__Create == 0) { + return QGestureRecognizer::create(target); + } + + QObject* sigval1 = target; + + QGesture* callback_return_value = miqt_exec_callback_QGestureRecognizer_Create(this, handle__Create, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QGesture* virtualbase_Create(QObject* target) { + + return QGestureRecognizer::create(target); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Recognize = 0; + + // Subclass to allow providing a Go implementation + virtual QGestureRecognizer::Result recognize(QGesture* state, QObject* watched, QEvent* event) override { + if (handle__Recognize == 0) { + return QGestureRecognizer::Result(); // Pure virtual, there is no base we can call + } + + QGesture* sigval1 = state; + QObject* sigval2 = watched; + QEvent* sigval3 = event; + + int callback_return_value = miqt_exec_callback_QGestureRecognizer_Recognize(this, handle__Recognize, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Reset = 0; + + // Subclass to allow providing a Go implementation + virtual void reset(QGesture* state) override { + if (handle__Reset == 0) { + QGestureRecognizer::reset(state); + return; + } + + QGesture* sigval1 = state; + + miqt_exec_callback_QGestureRecognizer_Reset(this, handle__Reset, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Reset(QGesture* state) { + + QGestureRecognizer::reset(state); + + } + +}; + +void QGestureRecognizer_new(QGestureRecognizer** outptr_QGestureRecognizer) { + MiqtVirtualQGestureRecognizer* ret = new MiqtVirtualQGestureRecognizer(); + *outptr_QGestureRecognizer = ret; +} + QGesture* QGestureRecognizer_Create(QGestureRecognizer* self, QObject* target) { return self->create(target); } @@ -32,9 +111,29 @@ void QGestureRecognizer_OperatorAssign(QGestureRecognizer* self, QGestureRecogni self->operator=(*param1); } +void QGestureRecognizer_override_virtual_Create(void* self, intptr_t slot) { + dynamic_cast( (QGestureRecognizer*)(self) )->handle__Create = slot; +} + +QGesture* QGestureRecognizer_virtualbase_Create(void* self, QObject* target) { + return ( (MiqtVirtualQGestureRecognizer*)(self) )->virtualbase_Create(target); +} + +void QGestureRecognizer_override_virtual_Recognize(void* self, intptr_t slot) { + dynamic_cast( (QGestureRecognizer*)(self) )->handle__Recognize = slot; +} + +void QGestureRecognizer_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QGestureRecognizer*)(self) )->handle__Reset = slot; +} + +void QGestureRecognizer_virtualbase_Reset(void* self, QGesture* state) { + ( (MiqtVirtualQGestureRecognizer*)(self) )->virtualbase_Reset(state); +} + void QGestureRecognizer_Delete(QGestureRecognizer* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qgesturerecognizer.go b/qt6/gen_qgesturerecognizer.go index ca6e6544..f545fbce 100644 --- a/qt6/gen_qgesturerecognizer.go +++ b/qt6/gen_qgesturerecognizer.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -62,6 +63,16 @@ func UnsafeNewQGestureRecognizer(h unsafe.Pointer) *QGestureRecognizer { return &QGestureRecognizer{h: (*C.QGestureRecognizer)(h)} } +// NewQGestureRecognizer constructs a new QGestureRecognizer object. +func NewQGestureRecognizer() *QGestureRecognizer { + var outptr_QGestureRecognizer *C.QGestureRecognizer = nil + + C.QGestureRecognizer_new(&outptr_QGestureRecognizer) + ret := newQGestureRecognizer(outptr_QGestureRecognizer) + ret.isSubclass = true + return ret +} + func (this *QGestureRecognizer) Create(target *QObject) *QGesture { return UnsafeNewQGesture(unsafe.Pointer(C.QGestureRecognizer_Create(this.h, target.cPointer())), nil) } @@ -86,6 +97,74 @@ func (this *QGestureRecognizer) OperatorAssign(param1 *QGestureRecognizer) { C.QGestureRecognizer_OperatorAssign(this.h, param1.cPointer()) } +func (this *QGestureRecognizer) callVirtualBase_Create(target *QObject) *QGesture { + + return UnsafeNewQGesture(unsafe.Pointer(C.QGestureRecognizer_virtualbase_Create(unsafe.Pointer(this.h), target.cPointer())), nil) +} +func (this *QGestureRecognizer) OnCreate(slot func(super func(target *QObject) *QGesture, target *QObject) *QGesture) { + C.QGestureRecognizer_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGestureRecognizer_Create +func miqt_exec_callback_QGestureRecognizer_Create(self *C.QGestureRecognizer, cb C.intptr_t, target *C.QObject) *C.QGesture { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(target *QObject) *QGesture, target *QObject) *QGesture) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQObject(unsafe.Pointer(target)) + + virtualReturn := gofunc((&QGestureRecognizer{h: self}).callVirtualBase_Create, slotval1) + + return virtualReturn.cPointer() + +} +func (this *QGestureRecognizer) OnRecognize(slot func(state *QGesture, watched *QObject, event *QEvent) QGestureRecognizer__ResultFlag) { + C.QGestureRecognizer_override_virtual_Recognize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGestureRecognizer_Recognize +func miqt_exec_callback_QGestureRecognizer_Recognize(self *C.QGestureRecognizer, cb C.intptr_t, state *C.QGesture, watched *C.QObject, event *C.QEvent) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(state *QGesture, watched *QObject, event *QEvent) QGestureRecognizer__ResultFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGesture(unsafe.Pointer(state), nil) + slotval2 := UnsafeNewQObject(unsafe.Pointer(watched)) + slotval3 := UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc(slotval1, slotval2, slotval3) + + return (C.int)(virtualReturn) + +} + +func (this *QGestureRecognizer) callVirtualBase_Reset(state *QGesture) { + + C.QGestureRecognizer_virtualbase_Reset(unsafe.Pointer(this.h), state.cPointer()) + +} +func (this *QGestureRecognizer) OnReset(slot func(super func(state *QGesture), state *QGesture)) { + C.QGestureRecognizer_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGestureRecognizer_Reset +func miqt_exec_callback_QGestureRecognizer_Reset(self *C.QGestureRecognizer, cb C.intptr_t, state *C.QGesture) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(state *QGesture), state *QGesture)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQGesture(unsafe.Pointer(state), nil) + + gofunc((&QGestureRecognizer{h: self}).callVirtualBase_Reset, slotval1) + +} + // Delete this object from C++ memory. func (this *QGestureRecognizer) Delete() { C.QGestureRecognizer_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qgesturerecognizer.h b/qt6/gen_qgesturerecognizer.h index 62ec8d3e..65d69b96 100644 --- a/qt6/gen_qgesturerecognizer.h +++ b/qt6/gen_qgesturerecognizer.h @@ -26,12 +26,19 @@ typedef struct QGestureRecognizer QGestureRecognizer; typedef struct QObject QObject; #endif +void QGestureRecognizer_new(QGestureRecognizer** outptr_QGestureRecognizer); QGesture* QGestureRecognizer_Create(QGestureRecognizer* self, QObject* target); int QGestureRecognizer_Recognize(QGestureRecognizer* self, QGesture* state, QObject* watched, QEvent* event); 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_override_virtual_Create(void* self, intptr_t slot); +QGesture* QGestureRecognizer_virtualbase_Create(void* self, QObject* target); +void QGestureRecognizer_override_virtual_Recognize(void* self, intptr_t slot); +int QGestureRecognizer_virtualbase_Recognize(void* self, QGesture* state, QObject* watched, QEvent* event); +void QGestureRecognizer_override_virtual_Reset(void* self, intptr_t slot); +void QGestureRecognizer_virtualbase_Reset(void* self, QGesture* state); void QGestureRecognizer_Delete(QGestureRecognizer* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qgraphicseffect.cpp b/qt6/gen_qgraphicseffect.cpp index 8f1f7db1..026e5bcf 100644 --- a/qt6/gen_qgraphicseffect.cpp +++ b/qt6/gen_qgraphicseffect.cpp @@ -1,10 +1,13 @@ #include +#include #include +#include #include #include #include #include #include +#include #include #include #include @@ -13,10 +16,270 @@ #include #include #include +#include #include #include "gen_qgraphicseffect.h" #include "_cgo_export.h" +class MiqtVirtualQGraphicsEffect : public virtual QGraphicsEffect { +public: + + MiqtVirtualQGraphicsEffect(): QGraphicsEffect() {}; + MiqtVirtualQGraphicsEffect(QObject* parent): QGraphicsEffect(parent) {}; + + virtual ~MiqtVirtualQGraphicsEffect() = default; + + // 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 QGraphicsEffect::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_QGraphicsEffect_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(QGraphicsEffect::boundingRectFor(*sourceRect)); + + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QGraphicsEffect_Draw(this, handle__Draw, sigval1); + + + } + + // 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) { + QGraphicsEffect::sourceChanged(flags); + return; + } + + QGraphicsEffect::ChangeFlags flags_ret = flags; + int sigval1 = static_cast(flags_ret); + + miqt_exec_callback_QGraphicsEffect_SourceChanged(this, handle__SourceChanged, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SourceChanged(int flags) { + + QGraphicsEffect::sourceChanged(static_cast(flags)); + + } + + // 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 QGraphicsEffect::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsEffect_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGraphicsEffect::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 QGraphicsEffect::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsEffect_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QGraphicsEffect::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) { + QGraphicsEffect::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsEffect_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QGraphicsEffect::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) { + QGraphicsEffect::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsEffect_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QGraphicsEffect::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) { + QGraphicsEffect::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsEffect_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QGraphicsEffect::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) { + QGraphicsEffect::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsEffect_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QGraphicsEffect::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) { + QGraphicsEffect::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsEffect_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QGraphicsEffect::disconnectNotify(*signal); + + } + +}; + +void QGraphicsEffect_new(QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsEffect* ret = new MiqtVirtualQGraphicsEffect(); + *outptr_QGraphicsEffect = ret; + *outptr_QObject = static_cast(ret); +} + +void QGraphicsEffect_new2(QObject* parent, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { + MiqtVirtualQGraphicsEffect* ret = new MiqtVirtualQGraphicsEffect(parent); + *outptr_QGraphicsEffect = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QGraphicsEffect_MetaObject(const QGraphicsEffect* self) { return (QMetaObject*) self->metaObject(); } @@ -61,7 +324,7 @@ void QGraphicsEffect_EnabledChanged(QGraphicsEffect* self, bool enabled) { } void QGraphicsEffect_connect_EnabledChanged(QGraphicsEffect* self, intptr_t slot) { - QGraphicsEffect::connect(self, static_cast(&QGraphicsEffect::enabledChanged), self, [=](bool enabled) { + MiqtVirtualQGraphicsEffect::connect(self, static_cast(&QGraphicsEffect::enabledChanged), self, [=](bool enabled) { bool sigval1 = enabled; miqt_exec_callback_QGraphicsEffect_EnabledChanged(slot, sigval1); }); @@ -89,9 +352,85 @@ struct miqt_string QGraphicsEffect_Tr3(const char* s, const char* c, int n) { return _ms; } +void QGraphicsEffect_override_virtual_BoundingRectFor(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__BoundingRectFor = slot; +} + +QRectF* QGraphicsEffect_virtualbase_BoundingRectFor(const void* self, QRectF* sourceRect) { + return ( (const MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_BoundingRectFor(sourceRect); +} + +void QGraphicsEffect_override_virtual_Draw(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__Draw = slot; +} + +void QGraphicsEffect_override_virtual_SourceChanged(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__SourceChanged = slot; +} + +void QGraphicsEffect_virtualbase_SourceChanged(void* self, int flags) { + ( (MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_SourceChanged(flags); +} + +void QGraphicsEffect_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__Event = slot; +} + +bool QGraphicsEffect_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_Event(event); +} + +void QGraphicsEffect_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__EventFilter = slot; +} + +bool QGraphicsEffect_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QGraphicsEffect_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__TimerEvent = slot; +} + +void QGraphicsEffect_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_TimerEvent(event); +} + +void QGraphicsEffect_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__ChildEvent = slot; +} + +void QGraphicsEffect_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_ChildEvent(event); +} + +void QGraphicsEffect_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__CustomEvent = slot; +} + +void QGraphicsEffect_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_CustomEvent(event); +} + +void QGraphicsEffect_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__ConnectNotify = slot; +} + +void QGraphicsEffect_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QGraphicsEffect_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsEffect*)(self) )->handle__DisconnectNotify = slot; +} + +void QGraphicsEffect_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsEffect*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QGraphicsEffect_Delete(QGraphicsEffect* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qgraphicseffect.go b/qt6/gen_qgraphicseffect.go index 085efda6..153e0edb 100644 --- a/qt6/gen_qgraphicseffect.go +++ b/qt6/gen_qgraphicseffect.go @@ -78,6 +78,28 @@ func UnsafeNewQGraphicsEffect(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGrap QObject: UnsafeNewQObject(h_QObject)} } +// NewQGraphicsEffect constructs a new QGraphicsEffect object. +func NewQGraphicsEffect() *QGraphicsEffect { + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsEffect_new(&outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsEffect(outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQGraphicsEffect2 constructs a new QGraphicsEffect object. +func NewQGraphicsEffect2(parent *QObject) *QGraphicsEffect { + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsEffect_new2(parent.cPointer(), &outptr_QGraphicsEffect, &outptr_QObject) + ret := newQGraphicsEffect(outptr_QGraphicsEffect, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QGraphicsEffect) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QGraphicsEffect_MetaObject(this.h))) } @@ -165,6 +187,240 @@ func QGraphicsEffect_Tr3(s string, c string, n int) string { return _ret } +func (this *QGraphicsEffect) callVirtualBase_BoundingRectFor(sourceRect *QRectF) *QRectF { + + _ret := C.QGraphicsEffect_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 *QGraphicsEffect) OnBoundingRectFor(slot func(super func(sourceRect *QRectF) *QRectF, sourceRect *QRectF) *QRectF) { + C.QGraphicsEffect_override_virtual_BoundingRectFor(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_BoundingRectFor +func miqt_exec_callback_QGraphicsEffect_BoundingRectFor(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_BoundingRectFor, slotval1) + + return virtualReturn.cPointer() + +} +func (this *QGraphicsEffect) OnDraw(slot func(painter *QPainter)) { + C.QGraphicsEffect_override_virtual_Draw(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_Draw +func miqt_exec_callback_QGraphicsEffect_Draw(self *C.QGraphicsEffect, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + +} + +func (this *QGraphicsEffect) callVirtualBase_SourceChanged(flags QGraphicsEffect__ChangeFlag) { + + C.QGraphicsEffect_virtualbase_SourceChanged(unsafe.Pointer(this.h), (C.int)(flags)) + +} +func (this *QGraphicsEffect) OnSourceChanged(slot func(super func(flags QGraphicsEffect__ChangeFlag), flags QGraphicsEffect__ChangeFlag)) { + C.QGraphicsEffect_override_virtual_SourceChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_SourceChanged +func miqt_exec_callback_QGraphicsEffect_SourceChanged(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_SourceChanged, slotval1) + +} + +func (this *QGraphicsEffect) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGraphicsEffect_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsEffect) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsEffect_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_Event +func miqt_exec_callback_QGraphicsEffect_Event(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsEffect) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QGraphicsEffect_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsEffect) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QGraphicsEffect_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_EventFilter +func miqt_exec_callback_QGraphicsEffect_EventFilter(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsEffect) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QGraphicsEffect_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsEffect) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QGraphicsEffect_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_TimerEvent +func miqt_exec_callback_QGraphicsEffect_TimerEvent(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QGraphicsEffect) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QGraphicsEffect_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsEffect) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QGraphicsEffect_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_ChildEvent +func miqt_exec_callback_QGraphicsEffect_ChildEvent(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QGraphicsEffect) callVirtualBase_CustomEvent(event *QEvent) { + + C.QGraphicsEffect_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsEffect) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsEffect_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_CustomEvent +func miqt_exec_callback_QGraphicsEffect_CustomEvent(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QGraphicsEffect) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QGraphicsEffect_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsEffect) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsEffect_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_ConnectNotify +func miqt_exec_callback_QGraphicsEffect_ConnectNotify(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QGraphicsEffect) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QGraphicsEffect_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsEffect) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsEffect_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsEffect_DisconnectNotify +func miqt_exec_callback_QGraphicsEffect_DisconnectNotify(self *C.QGraphicsEffect, 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((&QGraphicsEffect{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QGraphicsEffect) Delete() { C.QGraphicsEffect_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qgraphicseffect.h b/qt6/gen_qgraphicseffect.h index b5e79137..220ef2d3 100644 --- a/qt6/gen_qgraphicseffect.h +++ b/qt6/gen_qgraphicseffect.h @@ -16,32 +16,42 @@ extern "C" { #ifdef __cplusplus class QBrush; +class QChildEvent; class QColor; +class QEvent; class QGraphicsBlurEffect; class QGraphicsColorizeEffect; class QGraphicsDropShadowEffect; class QGraphicsEffect; class QGraphicsOpacityEffect; +class QMetaMethod; class QMetaObject; class QObject; class QPainter; class QPointF; class QRectF; +class QTimerEvent; #else typedef struct QBrush QBrush; +typedef struct QChildEvent QChildEvent; typedef struct QColor QColor; +typedef struct QEvent QEvent; typedef struct QGraphicsBlurEffect QGraphicsBlurEffect; typedef struct QGraphicsColorizeEffect QGraphicsColorizeEffect; typedef struct QGraphicsDropShadowEffect QGraphicsDropShadowEffect; typedef struct QGraphicsEffect QGraphicsEffect; typedef struct QGraphicsOpacityEffect QGraphicsOpacityEffect; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPainter QPainter; typedef struct QPointF QPointF; typedef struct QRectF QRectF; +typedef struct QTimerEvent QTimerEvent; #endif +void QGraphicsEffect_new(QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +void QGraphicsEffect_new2(QObject* parent, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); QMetaObject* QGraphicsEffect_MetaObject(const QGraphicsEffect* self); void* QGraphicsEffect_Metacast(QGraphicsEffect* self, const char* param1); struct miqt_string QGraphicsEffect_Tr(const char* s); @@ -56,6 +66,26 @@ 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_override_virtual_BoundingRectFor(void* self, intptr_t slot); +QRectF* QGraphicsEffect_virtualbase_BoundingRectFor(const void* self, QRectF* sourceRect); +void QGraphicsEffect_override_virtual_Draw(void* self, intptr_t slot); +void QGraphicsEffect_virtualbase_Draw(void* self, QPainter* painter); +void QGraphicsEffect_override_virtual_SourceChanged(void* self, intptr_t slot); +void QGraphicsEffect_virtualbase_SourceChanged(void* self, int flags); +void QGraphicsEffect_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsEffect_virtualbase_Event(void* self, QEvent* event); +void QGraphicsEffect_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGraphicsEffect_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QGraphicsEffect_override_virtual_TimerEvent(void* self, intptr_t slot); +void QGraphicsEffect_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QGraphicsEffect_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGraphicsEffect_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QGraphicsEffect_override_virtual_CustomEvent(void* self, intptr_t slot); +void QGraphicsEffect_virtualbase_CustomEvent(void* self, QEvent* event); +void QGraphicsEffect_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QGraphicsEffect_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QGraphicsEffect_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QGraphicsEffect_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QGraphicsEffect_Delete(QGraphicsEffect* self, bool isSubclass); void QGraphicsColorizeEffect_new(QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); diff --git a/qt6/gen_qgraphicsitem.cpp b/qt6/gen_qgraphicsitem.cpp index 35c4181e..f02236e2 100644 --- a/qt6/gen_qgraphicsitem.cpp +++ b/qt6/gen_qgraphicsitem.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -29,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -45,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -52,6 +55,856 @@ #include "gen_qgraphicsitem.h" #include "_cgo_export.h" +class MiqtVirtualQGraphicsItem : public virtual QGraphicsItem { +public: + + MiqtVirtualQGraphicsItem(): QGraphicsItem() {}; + MiqtVirtualQGraphicsItem(QGraphicsItem* parent): QGraphicsItem(parent) {}; + + virtual ~MiqtVirtualQGraphicsItem() = default; + + // 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) { + QGraphicsItem::advance(phase); + return; + } + + int sigval1 = phase; + + miqt_exec_callback_QGraphicsItem_Advance(this, handle__Advance, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Advance(int phase) { + + QGraphicsItem::advance(static_cast(phase)); + + } + + // 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 QRectF(); // Pure virtual, there is no base we can call + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // 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 QGraphicsItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsItem::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 QGraphicsItem::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_QGraphicsItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsItem::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 QGraphicsItem::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_QGraphicsItem_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 QGraphicsItem::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 QGraphicsItem::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_QGraphicsItem_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 QGraphicsItem::collidesWithPath(*path, static_cast(mode)); + + } + + // 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 QGraphicsItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsItem::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 QGraphicsItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsItem::opaqueArea()); + + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // 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 QGraphicsItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsItem::type(); + + } + + // 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 QGraphicsItem::sceneEventFilter(watched, event); + } + + QGraphicsItem* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsItem_SceneEventFilter(this, handle__SceneEventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEventFilter(QGraphicsItem* watched, QEvent* event) { + + return QGraphicsItem::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 QGraphicsItem::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsItem_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QGraphicsItem::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) { + QGraphicsItem::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::hoverEnterEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_HoverEnterEvent(this, handle__HoverEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverEnterEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::wheelEvent(event); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* event) { + + QGraphicsItem::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) { + QGraphicsItem::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsItem_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsItem::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 QGraphicsItem::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsItem_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(QGraphicsItem::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 QGraphicsItem::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_QGraphicsItem_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(QGraphicsItem::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 QGraphicsItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsItem::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) { + QGraphicsItem::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_QGraphicsItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsItem::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 QGraphicsItem::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_QGraphicsItem_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(QGraphicsItem::extension(*variant)); + + } + +}; + +void QGraphicsItem_new(QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsItem* ret = new MiqtVirtualQGraphicsItem(); + *outptr_QGraphicsItem = ret; +} + +void QGraphicsItem_new2(QGraphicsItem* parent, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsItem* ret = new MiqtVirtualQGraphicsItem(parent); + *outptr_QGraphicsItem = ret; +} + QGraphicsScene* QGraphicsItem_Scene(const QGraphicsItem* self) { return self->scene(); } @@ -815,14 +1668,1311 @@ void QGraphicsItem_Scroll3(QGraphicsItem* self, double dx, double dy, QRectF* re self->scroll(static_cast(dx), static_cast(dy), *rect); } +void QGraphicsItem_override_virtual_Advance(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__Advance = slot; +} + +void QGraphicsItem_virtualbase_Advance(void* self, int phase) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_Advance(phase); +} + +void QGraphicsItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__BoundingRect = slot; +} + +void QGraphicsItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_Shape(); +} + +void QGraphicsItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__Contains = slot; +} + +bool QGraphicsItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsItem_override_virtual_CollidesWithItem(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__CollidesWithItem = slot; +} + +bool QGraphicsItem_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_CollidesWithItem(other, mode); +} + +void QGraphicsItem_override_virtual_CollidesWithPath(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__CollidesWithPath = slot; +} + +bool QGraphicsItem_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_CollidesWithPath(path, mode); +} + +void QGraphicsItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__Type = slot; +} + +int QGraphicsItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsItem_override_virtual_SceneEventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__SceneEventFilter = slot; +} + +bool QGraphicsItem_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_SceneEventFilter(watched, event); +} + +void QGraphicsItem_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__SceneEvent = slot; +} + +bool QGraphicsItem_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_SceneEvent(event); +} + +void QGraphicsItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGraphicsItem_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGraphicsItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGraphicsItem_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGraphicsItem_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_DropEvent(event); +} + +void QGraphicsItem_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsItem_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__HoverEnterEvent = slot; +} + +void QGraphicsItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_HoverEnterEvent(event); +} + +void QGraphicsItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__HoverMoveEvent = slot; +} + +void QGraphicsItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_HoverMoveEvent(event); +} + +void QGraphicsItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QGraphicsItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_HoverLeaveEvent(event); +} + +void QGraphicsItem_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGraphicsItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGraphicsItem_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGraphicsItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGraphicsItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGraphicsItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGraphicsItem_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__WheelEvent = slot; +} + +void QGraphicsItem_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_WheelEvent(event); +} + +void QGraphicsItem_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsItem_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsItem_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsItem_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsItem_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsItem*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsItem*)(self) )->virtualbase_Extension(variant); +} + void QGraphicsItem_Delete(QGraphicsItem* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } } +class MiqtVirtualQGraphicsObject : public virtual QGraphicsObject { +public: + + MiqtVirtualQGraphicsObject(): QGraphicsObject() {}; + MiqtVirtualQGraphicsObject(QGraphicsItem* parent): QGraphicsObject(parent) {}; + + virtual ~MiqtVirtualQGraphicsObject() = default; + + // 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 QGraphicsObject::event(ev); + } + + QEvent* sigval1 = ev; + + bool callback_return_value = miqt_exec_callback_QGraphicsObject_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* ev) { + + return QGraphicsObject::event(ev); + + } + + // 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 QGraphicsObject::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsObject_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QGraphicsObject::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) { + QGraphicsObject::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsObject_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QGraphicsObject::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) { + QGraphicsObject::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsObject_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QGraphicsObject::disconnectNotify(*signal); + + } + + // 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) { + QGraphicsObject::advance(phase); + return; + } + + int sigval1 = phase; + + miqt_exec_callback_QGraphicsObject_Advance(this, handle__Advance, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Advance(int phase) { + + QGraphicsObject::advance(static_cast(phase)); + + } + + // 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 QRectF(); // Pure virtual, there is no base we can call + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsObject_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // 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 QGraphicsObject::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsObject_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsObject::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 QGraphicsObject::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_QGraphicsObject_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QGraphicsObject::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 QGraphicsObject::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_QGraphicsObject_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 QGraphicsObject::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 QGraphicsObject::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_QGraphicsObject_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 QGraphicsObject::collidesWithPath(*path, static_cast(mode)); + + } + + // 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 QGraphicsObject::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QGraphicsObject_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QGraphicsObject::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 QGraphicsObject::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsObject_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QGraphicsObject::opaqueArea()); + + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsObject_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // 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 QGraphicsObject::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsObject_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsObject::type(); + + } + + // 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 QGraphicsObject::sceneEventFilter(watched, event); + } + + QGraphicsItem* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsObject_SceneEventFilter(this, handle__SceneEventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEventFilter(QGraphicsItem* watched, QEvent* event) { + + return QGraphicsObject::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 QGraphicsObject::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsObject_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QGraphicsObject::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) { + QGraphicsObject::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::hoverEnterEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_HoverEnterEvent(this, handle__HoverEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverEnterEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::wheelEvent(event); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* event) { + + QGraphicsObject::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) { + QGraphicsObject::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsObject_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QGraphicsObject::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 QGraphicsObject::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsObject_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(QGraphicsObject::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 QGraphicsObject::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_QGraphicsObject_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(QGraphicsObject::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 QGraphicsObject::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QGraphicsObject_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QGraphicsObject::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) { + QGraphicsObject::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_QGraphicsObject_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QGraphicsObject::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 QGraphicsObject::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_QGraphicsObject_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(QGraphicsObject::extension(*variant)); + + } + +}; + +void QGraphicsObject_new(QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsObject* ret = new MiqtVirtualQGraphicsObject(); + *outptr_QGraphicsObject = ret; + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsObject_new2(QGraphicsItem* parent, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsObject* ret = new MiqtVirtualQGraphicsObject(parent); + *outptr_QGraphicsObject = ret; + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + QMetaObject* QGraphicsObject_MetaObject(const QGraphicsObject* self) { return (QMetaObject*) self->metaObject(); } @@ -855,7 +3005,7 @@ void QGraphicsObject_ParentChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_ParentChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::parentChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::parentChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_ParentChanged(slot); }); } @@ -865,7 +3015,7 @@ void QGraphicsObject_OpacityChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_OpacityChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::opacityChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::opacityChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_OpacityChanged(slot); }); } @@ -875,7 +3025,7 @@ void QGraphicsObject_VisibleChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_VisibleChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::visibleChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::visibleChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_VisibleChanged(slot); }); } @@ -885,7 +3035,7 @@ void QGraphicsObject_EnabledChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_EnabledChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::enabledChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::enabledChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_EnabledChanged(slot); }); } @@ -895,7 +3045,7 @@ void QGraphicsObject_XChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_XChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::xChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::xChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_XChanged(slot); }); } @@ -905,7 +3055,7 @@ void QGraphicsObject_YChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_YChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::yChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::yChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_YChanged(slot); }); } @@ -915,7 +3065,7 @@ void QGraphicsObject_ZChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_ZChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::zChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::zChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_ZChanged(slot); }); } @@ -925,7 +3075,7 @@ void QGraphicsObject_RotationChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_RotationChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::rotationChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::rotationChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_RotationChanged(slot); }); } @@ -935,7 +3085,7 @@ void QGraphicsObject_ScaleChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_ScaleChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::scaleChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::scaleChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_ScaleChanged(slot); }); } @@ -945,7 +3095,7 @@ void QGraphicsObject_ChildrenChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_ChildrenChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::childrenChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::childrenChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_ChildrenChanged(slot); }); } @@ -955,7 +3105,7 @@ void QGraphicsObject_WidthChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_WidthChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::widthChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::widthChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_WidthChanged(slot); }); } @@ -965,7 +3115,7 @@ void QGraphicsObject_HeightChanged(QGraphicsObject* self) { } void QGraphicsObject_connect_HeightChanged(QGraphicsObject* self, intptr_t slot) { - QGraphicsObject::connect(self, static_cast(&QGraphicsObject::heightChanged), self, [=]() { + MiqtVirtualQGraphicsObject::connect(self, static_cast(&QGraphicsObject::heightChanged), self, [=]() { miqt_exec_callback_QGraphicsObject_HeightChanged(slot); }); } @@ -996,14 +3146,1194 @@ void QGraphicsObject_GrabGesture2(QGraphicsObject* self, int typeVal, int flags) self->grabGesture(static_cast(typeVal), static_cast(flags)); } +void QGraphicsObject_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__Event = slot; +} + +bool QGraphicsObject_virtualbase_Event(void* self, QEvent* ev) { + return ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_Event(ev); +} + +void QGraphicsObject_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__EventFilter = slot; +} + +bool QGraphicsObject_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QGraphicsObject_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__TimerEvent = slot; +} + +void QGraphicsObject_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_TimerEvent(event); +} + +void QGraphicsObject_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__ChildEvent = slot; +} + +void QGraphicsObject_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_ChildEvent(event); +} + +void QGraphicsObject_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__CustomEvent = slot; +} + +void QGraphicsObject_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_CustomEvent(event); +} + +void QGraphicsObject_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__ConnectNotify = slot; +} + +void QGraphicsObject_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QGraphicsObject_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__DisconnectNotify = slot; +} + +void QGraphicsObject_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QGraphicsObject_override_virtual_Advance(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__Advance = slot; +} + +void QGraphicsObject_virtualbase_Advance(void* self, int phase) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_Advance(phase); +} + +void QGraphicsObject_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__BoundingRect = slot; +} + +void QGraphicsObject_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsObject_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_Shape(); +} + +void QGraphicsObject_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__Contains = slot; +} + +bool QGraphicsObject_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_Contains(point); +} + +void QGraphicsObject_override_virtual_CollidesWithItem(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__CollidesWithItem = slot; +} + +bool QGraphicsObject_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_CollidesWithItem(other, mode); +} + +void QGraphicsObject_override_virtual_CollidesWithPath(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__CollidesWithPath = slot; +} + +bool QGraphicsObject_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_CollidesWithPath(path, mode); +} + +void QGraphicsObject_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__IsObscuredBy = slot; +} + +bool QGraphicsObject_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QGraphicsObject_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QGraphicsObject_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_OpaqueArea(); +} + +void QGraphicsObject_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__Paint = slot; +} + +void QGraphicsObject_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__Type = slot; +} + +int QGraphicsObject_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_Type(); +} + +void QGraphicsObject_override_virtual_SceneEventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__SceneEventFilter = slot; +} + +bool QGraphicsObject_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_SceneEventFilter(watched, event); +} + +void QGraphicsObject_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__SceneEvent = slot; +} + +bool QGraphicsObject_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_SceneEvent(event); +} + +void QGraphicsObject_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsObject_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QGraphicsObject_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsObject_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QGraphicsObject_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsObject_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QGraphicsObject_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsObject_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QGraphicsObject_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsObject_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_DropEvent(event); +} + +void QGraphicsObject_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsObject_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_FocusInEvent(event); +} + +void QGraphicsObject_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsObject_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QGraphicsObject_override_virtual_HoverEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__HoverEnterEvent = slot; +} + +void QGraphicsObject_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_HoverEnterEvent(event); +} + +void QGraphicsObject_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__HoverMoveEvent = slot; +} + +void QGraphicsObject_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_HoverMoveEvent(event); +} + +void QGraphicsObject_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QGraphicsObject_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_HoverLeaveEvent(event); +} + +void QGraphicsObject_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsObject_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QGraphicsObject_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsObject_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QGraphicsObject_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsObject_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_MousePressEvent(event); +} + +void QGraphicsObject_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsObject_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QGraphicsObject_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsObject_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QGraphicsObject_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsObject_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QGraphicsObject_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__WheelEvent = slot; +} + +void QGraphicsObject_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_WheelEvent(event); +} + +void QGraphicsObject_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsObject_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QGraphicsObject_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsObject_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsObject_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsObject_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsObject_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__SupportsExtension = slot; +} + +bool QGraphicsObject_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QGraphicsObject_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__SetExtension = slot; +} + +void QGraphicsObject_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQGraphicsObject*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QGraphicsObject_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsObject*)(self) )->handle__Extension = slot; +} + +QVariant* QGraphicsObject_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQGraphicsObject*)(self) )->virtualbase_Extension(variant); +} + void QGraphicsObject_Delete(QGraphicsObject* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } } +class MiqtVirtualQAbstractGraphicsShapeItem : public virtual QAbstractGraphicsShapeItem { +public: + + MiqtVirtualQAbstractGraphicsShapeItem(): QAbstractGraphicsShapeItem() {}; + MiqtVirtualQAbstractGraphicsShapeItem(QGraphicsItem* parent): QAbstractGraphicsShapeItem(parent) {}; + + virtual ~MiqtVirtualQAbstractGraphicsShapeItem() = default; + + // 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 QAbstractGraphicsShapeItem::isObscuredBy(item); + } + + QGraphicsItem* sigval1 = (QGraphicsItem*) item; + + bool callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_IsObscuredBy(const_cast(this), handle__IsObscuredBy, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsObscuredBy(QGraphicsItem* item) const { + + return QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::opaqueArea(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_OpaqueArea(const_cast(this), handle__OpaqueArea); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_OpaqueArea() const { + + return new QPainterPath(QAbstractGraphicsShapeItem::opaqueArea()); + + } + + // 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) { + QAbstractGraphicsShapeItem::advance(phase); + return; + } + + int sigval1 = phase; + + miqt_exec_callback_QAbstractGraphicsShapeItem_Advance(this, handle__Advance, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Advance(int phase) { + + QAbstractGraphicsShapeItem::advance(static_cast(phase)); + + } + + // 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 QRectF(); // Pure virtual, there is no base we can call + } + + + QRectF* callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // 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 QAbstractGraphicsShapeItem::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::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_QAbstractGraphicsShapeItem_Contains(const_cast(this), handle__Contains, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Contains(QPointF* point) const { + + return QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::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_QAbstractGraphicsShapeItem_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 QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::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_QAbstractGraphicsShapeItem_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 QAbstractGraphicsShapeItem::collidesWithPath(*path, static_cast(mode)); + + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QAbstractGraphicsShapeItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // 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 QAbstractGraphicsShapeItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QAbstractGraphicsShapeItem::type(); + + } + + // 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 QAbstractGraphicsShapeItem::sceneEventFilter(watched, event); + } + + QGraphicsItem* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_SceneEventFilter(this, handle__SceneEventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEventFilter(QGraphicsItem* watched, QEvent* event) { + + return QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::sceneEvent(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* event) { + + return QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::contextMenuEvent(event); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::dragEnterEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::dragLeaveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::dragMoveEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::dropEvent(event); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::hoverEnterEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_HoverEnterEvent(this, handle__HoverEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverEnterEvent(QGraphicsSceneHoverEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::hoverMoveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::hoverLeaveEvent(event); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::mousePressEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::mouseMoveEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::mouseReleaseEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::mouseDoubleClickEvent(event); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::wheelEvent(event); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* event) { + + QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::inputMethodEvent(event); + return; + } + + QInputMethodEvent* sigval1 = event; + + miqt_exec_callback_QAbstractGraphicsShapeItem_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* event) { + + QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_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(QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::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_QAbstractGraphicsShapeItem_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(QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::supportsExtension(extension); + } + + QGraphicsItem::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QAbstractGraphicsShapeItem_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QAbstractGraphicsShapeItem::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) { + QAbstractGraphicsShapeItem::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_QAbstractGraphicsShapeItem_SetExtension(this, handle__SetExtension, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetExtension(int extension, QVariant* variant) { + + QAbstractGraphicsShapeItem::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 QAbstractGraphicsShapeItem::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_QAbstractGraphicsShapeItem_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(QAbstractGraphicsShapeItem::extension(*variant)); + + } + +}; + +void QAbstractGraphicsShapeItem_new(QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQAbstractGraphicsShapeItem* ret = new MiqtVirtualQAbstractGraphicsShapeItem(); + *outptr_QAbstractGraphicsShapeItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + +void QAbstractGraphicsShapeItem_new2(QGraphicsItem* parent, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQAbstractGraphicsShapeItem* ret = new MiqtVirtualQAbstractGraphicsShapeItem(parent); + *outptr_QAbstractGraphicsShapeItem = ret; + *outptr_QGraphicsItem = static_cast(ret); +} + QPen* QAbstractGraphicsShapeItem_Pen(const QAbstractGraphicsShapeItem* self) { return new QPen(self->pen()); } @@ -1028,9 +4358,281 @@ QPainterPath* QAbstractGraphicsShapeItem_OpaqueArea(const QAbstractGraphicsShape return new QPainterPath(self->opaqueArea()); } +void QAbstractGraphicsShapeItem_override_virtual_IsObscuredBy(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__IsObscuredBy = slot; +} + +bool QAbstractGraphicsShapeItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_IsObscuredBy(item); +} + +void QAbstractGraphicsShapeItem_override_virtual_OpaqueArea(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__OpaqueArea = slot; +} + +QPainterPath* QAbstractGraphicsShapeItem_virtualbase_OpaqueArea(const void* self) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_OpaqueArea(); +} + +void QAbstractGraphicsShapeItem_override_virtual_Advance(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__Advance = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_Advance(void* self, int phase) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_Advance(phase); +} + +void QAbstractGraphicsShapeItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__BoundingRect = slot; +} + +void QAbstractGraphicsShapeItem_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__Shape = slot; +} + +QPainterPath* QAbstractGraphicsShapeItem_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_Shape(); +} + +void QAbstractGraphicsShapeItem_override_virtual_Contains(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__Contains = slot; +} + +bool QAbstractGraphicsShapeItem_virtualbase_Contains(const void* self, QPointF* point) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_Contains(point); +} + +void QAbstractGraphicsShapeItem_override_virtual_CollidesWithItem(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__CollidesWithItem = slot; +} + +bool QAbstractGraphicsShapeItem_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_CollidesWithItem(other, mode); +} + +void QAbstractGraphicsShapeItem_override_virtual_CollidesWithPath(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__CollidesWithPath = slot; +} + +bool QAbstractGraphicsShapeItem_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_CollidesWithPath(path, mode); +} + +void QAbstractGraphicsShapeItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__Paint = slot; +} + +void QAbstractGraphicsShapeItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__Type = slot; +} + +int QAbstractGraphicsShapeItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_Type(); +} + +void QAbstractGraphicsShapeItem_override_virtual_SceneEventFilter(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__SceneEventFilter = slot; +} + +bool QAbstractGraphicsShapeItem_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event) { + return ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_SceneEventFilter(watched, event); +} + +void QAbstractGraphicsShapeItem_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__SceneEvent = slot; +} + +bool QAbstractGraphicsShapeItem_virtualbase_SceneEvent(void* self, QEvent* event) { + return ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_SceneEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__ContextMenuEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__DragEnterEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__DragLeaveEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__DragMoveEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__DropEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_DropEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__FocusInEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_FocusInEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__FocusOutEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__HoverEnterEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_HoverEnterEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__HoverMoveEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_HoverMoveEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_HoverLeaveEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__KeyPressEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__MousePressEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_MousePressEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__MouseMoveEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__WheelEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_WheelEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__InputMethodEvent = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_InputMethodEvent(event); +} + +void QAbstractGraphicsShapeItem_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QAbstractGraphicsShapeItem_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QAbstractGraphicsShapeItem_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__ItemChange = slot; +} + +QVariant* QAbstractGraphicsShapeItem_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_ItemChange(change, value); +} + +void QAbstractGraphicsShapeItem_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__SupportsExtension = slot; +} + +bool QAbstractGraphicsShapeItem_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QAbstractGraphicsShapeItem_override_virtual_SetExtension(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__SetExtension = slot; +} + +void QAbstractGraphicsShapeItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant) { + ( (MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_SetExtension(extension, variant); +} + +void QAbstractGraphicsShapeItem_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QAbstractGraphicsShapeItem*)(self) )->handle__Extension = slot; +} + +QVariant* QAbstractGraphicsShapeItem_virtualbase_Extension(const void* self, QVariant* variant) { + return ( (const MiqtVirtualQAbstractGraphicsShapeItem*)(self) )->virtualbase_Extension(variant); +} + void QAbstractGraphicsShapeItem_Delete(QAbstractGraphicsShapeItem* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qgraphicsitem.go b/qt6/gen_qgraphicsitem.go index 1577b2f7..8d7c967b 100644 --- a/qt6/gen_qgraphicsitem.go +++ b/qt6/gen_qgraphicsitem.go @@ -204,6 +204,26 @@ func UnsafeNewQGraphicsItem(h unsafe.Pointer) *QGraphicsItem { return &QGraphicsItem{h: (*C.QGraphicsItem)(h)} } +// NewQGraphicsItem constructs a new QGraphicsItem object. +func NewQGraphicsItem() *QGraphicsItem { + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsItem_new(&outptr_QGraphicsItem) + ret := newQGraphicsItem(outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsItem2 constructs a new QGraphicsItem object. +func NewQGraphicsItem2(parent *QGraphicsItem) *QGraphicsItem { + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsItem_new2(parent.cPointer(), &outptr_QGraphicsItem) + ret := newQGraphicsItem(outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + func (this *QGraphicsItem) Scene() *QGraphicsScene { return UnsafeNewQGraphicsScene(unsafe.Pointer(C.QGraphicsItem_Scene(this.h)), nil) } @@ -1082,6 +1102,839 @@ func (this *QGraphicsItem) Scroll3(dx float64, dy float64, rect *QRectF) { C.QGraphicsItem_Scroll3(this.h, (C.double)(dx), (C.double)(dy), rect.cPointer()) } +func (this *QGraphicsItem) callVirtualBase_Advance(phase int) { + + C.QGraphicsItem_virtualbase_Advance(unsafe.Pointer(this.h), (C.int)(phase)) + +} +func (this *QGraphicsItem) OnAdvance(slot func(super func(phase int), phase int)) { + C.QGraphicsItem_override_virtual_Advance(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_Advance +func miqt_exec_callback_QGraphicsItem_Advance(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_Advance, slotval1) + +} +func (this *QGraphicsItem) OnBoundingRect(slot func() *QRectF) { + C.QGraphicsItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_BoundingRect +func miqt_exec_callback_QGraphicsItem_BoundingRect(self *C.QGraphicsItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func() *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsItem_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 *QGraphicsItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_Shape +func miqt_exec_callback_QGraphicsItem_Shape(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_Contains +func miqt_exec_callback_QGraphicsItem_Contains(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItem) callVirtualBase_CollidesWithItem(other *QGraphicsItem, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsItem_virtualbase_CollidesWithItem(unsafe.Pointer(this.h), other.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsItem) OnCollidesWithItem(slot func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) { + C.QGraphicsItem_override_virtual_CollidesWithItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_CollidesWithItem +func miqt_exec_callback_QGraphicsItem_CollidesWithItem(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_CollidesWithItem, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItem) callVirtualBase_CollidesWithPath(path *QPainterPath, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsItem_virtualbase_CollidesWithPath(unsafe.Pointer(this.h), path.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsItem) OnCollidesWithPath(slot func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) { + C.QGraphicsItem_override_virtual_CollidesWithPath(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_CollidesWithPath +func miqt_exec_callback_QGraphicsItem_CollidesWithPath(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_CollidesWithPath, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_IsObscuredBy +func miqt_exec_callback_QGraphicsItem_IsObscuredBy(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsItem_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 *QGraphicsItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_OpaqueArea +func miqt_exec_callback_QGraphicsItem_OpaqueArea(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} +func (this *QGraphicsItem) OnPaint(slot func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_Paint +func miqt_exec_callback_QGraphicsItem_Paint(self *C.QGraphicsItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsItem) OnType(slot func(super func() int) int) { + C.QGraphicsItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_Type +func miqt_exec_callback_QGraphicsItem_Type(self *C.QGraphicsItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsItem) callVirtualBase_SceneEventFilter(watched *QGraphicsItem, event *QEvent) bool { + + return (bool)(C.QGraphicsItem_virtualbase_SceneEventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsItem) OnSceneEventFilter(slot func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) { + C.QGraphicsItem_override_virtual_SceneEventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_SceneEventFilter +func miqt_exec_callback_QGraphicsItem_SceneEventFilter(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_SceneEventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItem) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsItem_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsItem) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsItem_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_SceneEvent +func miqt_exec_callback_QGraphicsItem_SceneEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItem) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QGraphicsItem_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QGraphicsItem_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_ContextMenuEvent +func miqt_exec_callback_QGraphicsItem_ContextMenuEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsItem_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsItem_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_DragEnterEvent +func miqt_exec_callback_QGraphicsItem_DragEnterEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsItem_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsItem_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_DragLeaveEvent +func miqt_exec_callback_QGraphicsItem_DragLeaveEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsItem_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsItem_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_DragMoveEvent +func miqt_exec_callback_QGraphicsItem_DragMoveEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsItem_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsItem_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_DropEvent +func miqt_exec_callback_QGraphicsItem_DropEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsItem_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsItem_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_FocusInEvent +func miqt_exec_callback_QGraphicsItem_FocusInEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsItem_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsItem_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_FocusOutEvent +func miqt_exec_callback_QGraphicsItem_FocusOutEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_HoverEnterEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsItem_virtualbase_HoverEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnHoverEnterEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsItem_override_virtual_HoverEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_HoverEnterEvent +func miqt_exec_callback_QGraphicsItem_HoverEnterEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsItem_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsItem_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_HoverMoveEvent +func miqt_exec_callback_QGraphicsItem_HoverMoveEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsItem_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsItem_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_HoverLeaveEvent +func miqt_exec_callback_QGraphicsItem_HoverLeaveEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsItem_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsItem_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_KeyPressEvent +func miqt_exec_callback_QGraphicsItem_KeyPressEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsItem_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsItem_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_KeyReleaseEvent +func miqt_exec_callback_QGraphicsItem_KeyReleaseEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsItem_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsItem_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_MousePressEvent +func miqt_exec_callback_QGraphicsItem_MousePressEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsItem_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsItem_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_MouseMoveEvent +func miqt_exec_callback_QGraphicsItem_MouseMoveEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsItem_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsItem_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_MouseReleaseEvent +func miqt_exec_callback_QGraphicsItem_MouseReleaseEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsItem_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsItem_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsItem_MouseDoubleClickEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_WheelEvent(event *QGraphicsSceneWheelEvent) { + + C.QGraphicsItem_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnWheelEvent(slot func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) { + C.QGraphicsItem_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_WheelEvent +func miqt_exec_callback_QGraphicsItem_WheelEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsItem_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsItem) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsItem_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_InputMethodEvent +func miqt_exec_callback_QGraphicsItem_InputMethodEvent(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsItem) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsItem_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 *QGraphicsItem) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsItem_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_InputMethodQuery +func miqt_exec_callback_QGraphicsItem_InputMethodQuery(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItem) callVirtualBase_ItemChange(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant { + + _ret := C.QGraphicsItem_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 *QGraphicsItem) OnItemChange(slot func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) { + C.QGraphicsItem_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_ItemChange +func miqt_exec_callback_QGraphicsItem_ItemChange(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_SupportsExtension +func miqt_exec_callback_QGraphicsItem_SupportsExtension(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_SetExtension +func miqt_exec_callback_QGraphicsItem_SetExtension(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QGraphicsItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsItem_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 *QGraphicsItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsItem_Extension +func miqt_exec_callback_QGraphicsItem_Extension(self *C.QGraphicsItem, 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((&QGraphicsItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QGraphicsItem) Delete() { C.QGraphicsItem_Delete(this.h, C.bool(this.isSubclass)) @@ -1138,6 +1991,30 @@ func UnsafeNewQGraphicsObject(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QGra QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} } +// NewQGraphicsObject constructs a new QGraphicsObject object. +func NewQGraphicsObject() *QGraphicsObject { + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsObject_new(&outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsObject(outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsObject2 constructs a new QGraphicsObject object. +func NewQGraphicsObject2(parent *QGraphicsItem) *QGraphicsObject { + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsObject_new2(parent.cPointer(), &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsObject(outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + func (this *QGraphicsObject) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QGraphicsObject_MetaObject(this.h))) } @@ -1395,6 +2272,1005 @@ func (this *QGraphicsObject) GrabGesture2(typeVal GestureType, flags GestureFlag C.QGraphicsObject_GrabGesture2(this.h, (C.int)(typeVal), (C.int)(flags)) } +func (this *QGraphicsObject) callVirtualBase_Event(ev *QEvent) bool { + + return (bool)(C.QGraphicsObject_virtualbase_Event(unsafe.Pointer(this.h), ev.cPointer())) + +} +func (this *QGraphicsObject) OnEvent(slot func(super func(ev *QEvent) bool, ev *QEvent) bool) { + C.QGraphicsObject_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_Event +func miqt_exec_callback_QGraphicsObject_Event(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QGraphicsObject_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsObject) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QGraphicsObject_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_EventFilter +func miqt_exec_callback_QGraphicsObject_EventFilter(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QGraphicsObject_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QGraphicsObject_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_TimerEvent +func miqt_exec_callback_QGraphicsObject_TimerEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QGraphicsObject_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QGraphicsObject_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_ChildEvent +func miqt_exec_callback_QGraphicsObject_ChildEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_CustomEvent(event *QEvent) { + + C.QGraphicsObject_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsObject_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_CustomEvent +func miqt_exec_callback_QGraphicsObject_CustomEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QGraphicsObject_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsObject) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsObject_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_ConnectNotify +func miqt_exec_callback_QGraphicsObject_ConnectNotify(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QGraphicsObject_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsObject) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsObject_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_DisconnectNotify +func miqt_exec_callback_QGraphicsObject_DisconnectNotify(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_Advance(phase int) { + + C.QGraphicsObject_virtualbase_Advance(unsafe.Pointer(this.h), (C.int)(phase)) + +} +func (this *QGraphicsObject) OnAdvance(slot func(super func(phase int), phase int)) { + C.QGraphicsObject_override_virtual_Advance(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_Advance +func miqt_exec_callback_QGraphicsObject_Advance(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_Advance, slotval1) + +} +func (this *QGraphicsObject) OnBoundingRect(slot func() *QRectF) { + C.QGraphicsObject_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_BoundingRect +func miqt_exec_callback_QGraphicsObject_BoundingRect(self *C.QGraphicsObject, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func() *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsObject) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QGraphicsObject_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 *QGraphicsObject) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsObject_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_Shape +func miqt_exec_callback_QGraphicsObject_Shape(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsObject) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QGraphicsObject_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QGraphicsObject) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QGraphicsObject_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_Contains +func miqt_exec_callback_QGraphicsObject_Contains(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_CollidesWithItem(other *QGraphicsItem, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsObject_virtualbase_CollidesWithItem(unsafe.Pointer(this.h), other.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsObject) OnCollidesWithItem(slot func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) { + C.QGraphicsObject_override_virtual_CollidesWithItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_CollidesWithItem +func miqt_exec_callback_QGraphicsObject_CollidesWithItem(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_CollidesWithItem, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_CollidesWithPath(path *QPainterPath, mode ItemSelectionMode) bool { + + return (bool)(C.QGraphicsObject_virtualbase_CollidesWithPath(unsafe.Pointer(this.h), path.cPointer(), (C.int)(mode))) + +} +func (this *QGraphicsObject) OnCollidesWithPath(slot func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) { + C.QGraphicsObject_override_virtual_CollidesWithPath(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_CollidesWithPath +func miqt_exec_callback_QGraphicsObject_CollidesWithPath(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_CollidesWithPath, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QGraphicsObject_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QGraphicsObject) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QGraphicsObject_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_IsObscuredBy +func miqt_exec_callback_QGraphicsObject_IsObscuredBy(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QGraphicsObject_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 *QGraphicsObject) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QGraphicsObject_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_OpaqueArea +func miqt_exec_callback_QGraphicsObject_OpaqueArea(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} +func (this *QGraphicsObject) OnPaint(slot func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QGraphicsObject_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_Paint +func miqt_exec_callback_QGraphicsObject_Paint(self *C.QGraphicsObject, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsObject) callVirtualBase_Type() int { + + return (int)(C.QGraphicsObject_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsObject) OnType(slot func(super func() int) int) { + C.QGraphicsObject_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_Type +func miqt_exec_callback_QGraphicsObject_Type(self *C.QGraphicsObject, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsObject{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_SceneEventFilter(watched *QGraphicsItem, event *QEvent) bool { + + return (bool)(C.QGraphicsObject_virtualbase_SceneEventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsObject) OnSceneEventFilter(slot func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) { + C.QGraphicsObject_override_virtual_SceneEventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_SceneEventFilter +func miqt_exec_callback_QGraphicsObject_SceneEventFilter(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_SceneEventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QGraphicsObject_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsObject) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsObject_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_SceneEvent +func miqt_exec_callback_QGraphicsObject_SceneEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QGraphicsObject_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QGraphicsObject_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_ContextMenuEvent +func miqt_exec_callback_QGraphicsObject_ContextMenuEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsObject_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsObject_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_DragEnterEvent +func miqt_exec_callback_QGraphicsObject_DragEnterEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsObject_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsObject_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_DragLeaveEvent +func miqt_exec_callback_QGraphicsObject_DragLeaveEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsObject_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsObject_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_DragMoveEvent +func miqt_exec_callback_QGraphicsObject_DragMoveEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QGraphicsObject_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QGraphicsObject_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_DropEvent +func miqt_exec_callback_QGraphicsObject_DropEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QGraphicsObject_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsObject_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_FocusInEvent +func miqt_exec_callback_QGraphicsObject_FocusInEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QGraphicsObject_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QGraphicsObject_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_FocusOutEvent +func miqt_exec_callback_QGraphicsObject_FocusOutEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_HoverEnterEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsObject_virtualbase_HoverEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnHoverEnterEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsObject_override_virtual_HoverEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_HoverEnterEvent +func miqt_exec_callback_QGraphicsObject_HoverEnterEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_HoverEnterEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsObject_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsObject_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_HoverMoveEvent +func miqt_exec_callback_QGraphicsObject_HoverMoveEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QGraphicsObject_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QGraphicsObject_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_HoverLeaveEvent +func miqt_exec_callback_QGraphicsObject_HoverLeaveEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QGraphicsObject_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsObject_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_KeyPressEvent +func miqt_exec_callback_QGraphicsObject_KeyPressEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QGraphicsObject_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QGraphicsObject_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_KeyReleaseEvent +func miqt_exec_callback_QGraphicsObject_KeyReleaseEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsObject_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsObject_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_MousePressEvent +func miqt_exec_callback_QGraphicsObject_MousePressEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsObject_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsObject_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_MouseMoveEvent +func miqt_exec_callback_QGraphicsObject_MouseMoveEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsObject_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsObject_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_MouseReleaseEvent +func miqt_exec_callback_QGraphicsObject_MouseReleaseEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QGraphicsObject_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QGraphicsObject_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsObject_MouseDoubleClickEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_WheelEvent(event *QGraphicsSceneWheelEvent) { + + C.QGraphicsObject_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnWheelEvent(slot func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) { + C.QGraphicsObject_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_WheelEvent +func miqt_exec_callback_QGraphicsObject_WheelEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QGraphicsObject_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsObject) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QGraphicsObject_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_InputMethodEvent +func miqt_exec_callback_QGraphicsObject_InputMethodEvent(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsObject) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QGraphicsObject_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 *QGraphicsObject) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QGraphicsObject_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_InputMethodQuery +func miqt_exec_callback_QGraphicsObject_InputMethodQuery(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsObject) callVirtualBase_ItemChange(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant { + + _ret := C.QGraphicsObject_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 *QGraphicsObject) OnItemChange(slot func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) { + C.QGraphicsObject_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_ItemChange +func miqt_exec_callback_QGraphicsObject_ItemChange(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QGraphicsObject) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QGraphicsObject_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QGraphicsObject) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QGraphicsObject_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_SupportsExtension +func miqt_exec_callback_QGraphicsObject_SupportsExtension(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsObject) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QGraphicsObject_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QGraphicsObject) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QGraphicsObject_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_SetExtension +func miqt_exec_callback_QGraphicsObject_SetExtension(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QGraphicsObject) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QGraphicsObject_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 *QGraphicsObject) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QGraphicsObject_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsObject_Extension +func miqt_exec_callback_QGraphicsObject_Extension(self *C.QGraphicsObject, 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((&QGraphicsObject{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QGraphicsObject) Delete() { C.QGraphicsObject_Delete(this.h, C.bool(this.isSubclass)) @@ -1448,6 +3324,28 @@ func UnsafeNewQAbstractGraphicsShapeItem(h unsafe.Pointer, h_QGraphicsItem unsaf QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} } +// NewQAbstractGraphicsShapeItem constructs a new QAbstractGraphicsShapeItem object. +func NewQAbstractGraphicsShapeItem() *QAbstractGraphicsShapeItem { + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QAbstractGraphicsShapeItem_new(&outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQAbstractGraphicsShapeItem2 constructs a new QAbstractGraphicsShapeItem object. +func NewQAbstractGraphicsShapeItem2(parent *QGraphicsItem) *QAbstractGraphicsShapeItem { + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QAbstractGraphicsShapeItem_new2(parent.cPointer(), &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) + ret := newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + func (this *QAbstractGraphicsShapeItem) Pen() *QPen { _ret := C.QAbstractGraphicsShapeItem_Pen(this.h) _goptr := newQPen(_ret) @@ -1481,6 +3379,839 @@ func (this *QAbstractGraphicsShapeItem) OpaqueArea() *QPainterPath { return _goptr } +func (this *QAbstractGraphicsShapeItem) callVirtualBase_IsObscuredBy(item *QGraphicsItem) bool { + + return (bool)(C.QAbstractGraphicsShapeItem_virtualbase_IsObscuredBy(unsafe.Pointer(this.h), item.cPointer())) + +} +func (this *QAbstractGraphicsShapeItem) OnIsObscuredBy(slot func(super func(item *QGraphicsItem) bool, item *QGraphicsItem) bool) { + C.QAbstractGraphicsShapeItem_override_virtual_IsObscuredBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_IsObscuredBy +func miqt_exec_callback_QAbstractGraphicsShapeItem_IsObscuredBy(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_IsObscuredBy, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_OpaqueArea() *QPainterPath { + + _ret := C.QAbstractGraphicsShapeItem_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 *QAbstractGraphicsShapeItem) OnOpaqueArea(slot func(super func() *QPainterPath) *QPainterPath) { + C.QAbstractGraphicsShapeItem_override_virtual_OpaqueArea(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_OpaqueArea +func miqt_exec_callback_QAbstractGraphicsShapeItem_OpaqueArea(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_OpaqueArea) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_Advance(phase int) { + + C.QAbstractGraphicsShapeItem_virtualbase_Advance(unsafe.Pointer(this.h), (C.int)(phase)) + +} +func (this *QAbstractGraphicsShapeItem) OnAdvance(slot func(super func(phase int), phase int)) { + C.QAbstractGraphicsShapeItem_override_virtual_Advance(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_Advance +func miqt_exec_callback_QAbstractGraphicsShapeItem_Advance(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_Advance, slotval1) + +} +func (this *QAbstractGraphicsShapeItem) OnBoundingRect(slot func() *QRectF) { + C.QAbstractGraphicsShapeItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_BoundingRect +func miqt_exec_callback_QAbstractGraphicsShapeItem_BoundingRect(self *C.QAbstractGraphicsShapeItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func() *QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_Shape() *QPainterPath { + + _ret := C.QAbstractGraphicsShapeItem_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 *QAbstractGraphicsShapeItem) OnShape(slot func(super func() *QPainterPath) *QPainterPath) { + C.QAbstractGraphicsShapeItem_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_Shape +func miqt_exec_callback_QAbstractGraphicsShapeItem_Shape(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_Shape) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_Contains(point *QPointF) bool { + + return (bool)(C.QAbstractGraphicsShapeItem_virtualbase_Contains(unsafe.Pointer(this.h), point.cPointer())) + +} +func (this *QAbstractGraphicsShapeItem) OnContains(slot func(super func(point *QPointF) bool, point *QPointF) bool) { + C.QAbstractGraphicsShapeItem_override_virtual_Contains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_Contains +func miqt_exec_callback_QAbstractGraphicsShapeItem_Contains(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_Contains, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_CollidesWithItem(other *QGraphicsItem, mode ItemSelectionMode) bool { + + return (bool)(C.QAbstractGraphicsShapeItem_virtualbase_CollidesWithItem(unsafe.Pointer(this.h), other.cPointer(), (C.int)(mode))) + +} +func (this *QAbstractGraphicsShapeItem) OnCollidesWithItem(slot func(super func(other *QGraphicsItem, mode ItemSelectionMode) bool, other *QGraphicsItem, mode ItemSelectionMode) bool) { + C.QAbstractGraphicsShapeItem_override_virtual_CollidesWithItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_CollidesWithItem +func miqt_exec_callback_QAbstractGraphicsShapeItem_CollidesWithItem(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_CollidesWithItem, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_CollidesWithPath(path *QPainterPath, mode ItemSelectionMode) bool { + + return (bool)(C.QAbstractGraphicsShapeItem_virtualbase_CollidesWithPath(unsafe.Pointer(this.h), path.cPointer(), (C.int)(mode))) + +} +func (this *QAbstractGraphicsShapeItem) OnCollidesWithPath(slot func(super func(path *QPainterPath, mode ItemSelectionMode) bool, path *QPainterPath, mode ItemSelectionMode) bool) { + C.QAbstractGraphicsShapeItem_override_virtual_CollidesWithPath(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_CollidesWithPath +func miqt_exec_callback_QAbstractGraphicsShapeItem_CollidesWithPath(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_CollidesWithPath, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} +func (this *QAbstractGraphicsShapeItem) OnPaint(slot func(painter *QPainter, option *QStyleOptionGraphicsItem, widget *QWidget)) { + C.QAbstractGraphicsShapeItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_Paint +func miqt_exec_callback_QAbstractGraphicsShapeItem_Paint(self *C.QAbstractGraphicsShapeItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_Type() int { + + return (int)(C.QAbstractGraphicsShapeItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QAbstractGraphicsShapeItem) OnType(slot func(super func() int) int) { + C.QAbstractGraphicsShapeItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_Type +func miqt_exec_callback_QAbstractGraphicsShapeItem_Type(self *C.QAbstractGraphicsShapeItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_SceneEventFilter(watched *QGraphicsItem, event *QEvent) bool { + + return (bool)(C.QAbstractGraphicsShapeItem_virtualbase_SceneEventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QAbstractGraphicsShapeItem) OnSceneEventFilter(slot func(super func(watched *QGraphicsItem, event *QEvent) bool, watched *QGraphicsItem, event *QEvent) bool) { + C.QAbstractGraphicsShapeItem_override_virtual_SceneEventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_SceneEventFilter +func miqt_exec_callback_QAbstractGraphicsShapeItem_SceneEventFilter(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_SceneEventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_SceneEvent(event *QEvent) bool { + + return (bool)(C.QAbstractGraphicsShapeItem_virtualbase_SceneEvent(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QAbstractGraphicsShapeItem) OnSceneEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QAbstractGraphicsShapeItem_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_SceneEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_SceneEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_ContextMenuEvent(event *QGraphicsSceneContextMenuEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnContextMenuEvent(slot func(super func(event *QGraphicsSceneContextMenuEvent), event *QGraphicsSceneContextMenuEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_ContextMenuEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_ContextMenuEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_DragEnterEvent(event *QGraphicsSceneDragDropEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnDragEnterEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_DragEnterEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_DragEnterEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_DragLeaveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnDragLeaveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_DragLeaveEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_DragLeaveEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_DragMoveEvent(event *QGraphicsSceneDragDropEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnDragMoveEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_DragMoveEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_DragMoveEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_DropEvent(event *QGraphicsSceneDragDropEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_DropEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnDropEvent(slot func(super func(event *QGraphicsSceneDragDropEvent), event *QGraphicsSceneDragDropEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_DropEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_DropEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_FocusInEvent(event *QFocusEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_FocusInEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnFocusInEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_FocusInEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_FocusInEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_FocusOutEvent(event *QFocusEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnFocusOutEvent(slot func(super func(event *QFocusEvent), event *QFocusEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_FocusOutEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_FocusOutEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_HoverEnterEvent(event *QGraphicsSceneHoverEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_HoverEnterEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnHoverEnterEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_HoverEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_HoverEnterEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_HoverEnterEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_HoverMoveEvent(event *QGraphicsSceneHoverEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnHoverMoveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_HoverMoveEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_HoverMoveEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_HoverLeaveEvent(event *QGraphicsSceneHoverEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnHoverLeaveEvent(slot func(super func(event *QGraphicsSceneHoverEvent), event *QGraphicsSceneHoverEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_HoverLeaveEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_HoverLeaveEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_KeyPressEvent(event *QKeyEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnKeyPressEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_KeyPressEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_KeyPressEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_KeyReleaseEvent(event *QKeyEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnKeyReleaseEvent(slot func(super func(event *QKeyEvent), event *QKeyEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_KeyReleaseEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_KeyReleaseEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_MousePressEvent(event *QGraphicsSceneMouseEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_MousePressEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnMousePressEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_MousePressEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_MousePressEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_MouseMoveEvent(event *QGraphicsSceneMouseEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnMouseMoveEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_MouseMoveEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_MouseMoveEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_MouseReleaseEvent(event *QGraphicsSceneMouseEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnMouseReleaseEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_MouseReleaseEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_MouseReleaseEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_MouseDoubleClickEvent(event *QGraphicsSceneMouseEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnMouseDoubleClickEvent(slot func(super func(event *QGraphicsSceneMouseEvent), event *QGraphicsSceneMouseEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_MouseDoubleClickEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_MouseDoubleClickEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_WheelEvent(event *QGraphicsSceneWheelEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_WheelEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnWheelEvent(slot func(super func(event *QGraphicsSceneWheelEvent), event *QGraphicsSceneWheelEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_WheelEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_WheelEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_InputMethodEvent(event *QInputMethodEvent) { + + C.QAbstractGraphicsShapeItem_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnInputMethodEvent(slot func(super func(event *QInputMethodEvent), event *QInputMethodEvent)) { + C.QAbstractGraphicsShapeItem_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_InputMethodEvent +func miqt_exec_callback_QAbstractGraphicsShapeItem_InputMethodEvent(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_InputMethodQuery(query InputMethodQuery) *QVariant { + + _ret := C.QAbstractGraphicsShapeItem_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 *QAbstractGraphicsShapeItem) OnInputMethodQuery(slot func(super func(query InputMethodQuery) *QVariant, query InputMethodQuery) *QVariant) { + C.QAbstractGraphicsShapeItem_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_InputMethodQuery +func miqt_exec_callback_QAbstractGraphicsShapeItem_InputMethodQuery(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_ItemChange(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant { + + _ret := C.QAbstractGraphicsShapeItem_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 *QAbstractGraphicsShapeItem) OnItemChange(slot func(super func(change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant, change QGraphicsItem__GraphicsItemChange, value *QVariant) *QVariant) { + C.QAbstractGraphicsShapeItem_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_ItemChange +func miqt_exec_callback_QAbstractGraphicsShapeItem_ItemChange(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_SupportsExtension(extension QGraphicsItem__Extension) bool { + + return (bool)(C.QAbstractGraphicsShapeItem_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QAbstractGraphicsShapeItem) OnSupportsExtension(slot func(super func(extension QGraphicsItem__Extension) bool, extension QGraphicsItem__Extension) bool) { + C.QAbstractGraphicsShapeItem_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_SupportsExtension +func miqt_exec_callback_QAbstractGraphicsShapeItem_SupportsExtension(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_SetExtension(extension QGraphicsItem__Extension, variant *QVariant) { + + C.QAbstractGraphicsShapeItem_virtualbase_SetExtension(unsafe.Pointer(this.h), (C.int)(extension), variant.cPointer()) + +} +func (this *QAbstractGraphicsShapeItem) OnSetExtension(slot func(super func(extension QGraphicsItem__Extension, variant *QVariant), extension QGraphicsItem__Extension, variant *QVariant)) { + C.QAbstractGraphicsShapeItem_override_virtual_SetExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_SetExtension +func miqt_exec_callback_QAbstractGraphicsShapeItem_SetExtension(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_SetExtension, slotval1, slotval2) + +} + +func (this *QAbstractGraphicsShapeItem) callVirtualBase_Extension(variant *QVariant) *QVariant { + + _ret := C.QAbstractGraphicsShapeItem_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 *QAbstractGraphicsShapeItem) OnExtension(slot func(super func(variant *QVariant) *QVariant, variant *QVariant) *QVariant) { + C.QAbstractGraphicsShapeItem_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QAbstractGraphicsShapeItem_Extension +func miqt_exec_callback_QAbstractGraphicsShapeItem_Extension(self *C.QAbstractGraphicsShapeItem, 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((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_Extension, slotval1) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QAbstractGraphicsShapeItem) Delete() { C.QAbstractGraphicsShapeItem_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qgraphicsitem.h b/qt6/gen_qgraphicsitem.h index 0b55b51c..5b1a157c 100644 --- a/qt6/gen_qgraphicsitem.h +++ b/qt6/gen_qgraphicsitem.h @@ -17,6 +17,7 @@ extern "C" { #ifdef __cplusplus class QAbstractGraphicsShapeItem; class QBrush; +class QChildEvent; class QColor; class QCursor; class QEvent; @@ -45,6 +46,7 @@ class QGraphicsWidget; class QInputMethodEvent; class QKeyEvent; class QLineF; +class QMetaMethod; class QMetaObject; class QObject; class QPainter; @@ -58,12 +60,14 @@ class QSize; class QStyleOptionGraphicsItem; class QTextCursor; class QTextDocument; +class QTimerEvent; class QTransform; class QVariant; class QWidget; #else typedef struct QAbstractGraphicsShapeItem QAbstractGraphicsShapeItem; typedef struct QBrush QBrush; +typedef struct QChildEvent QChildEvent; typedef struct QColor QColor; typedef struct QCursor QCursor; typedef struct QEvent QEvent; @@ -92,6 +96,7 @@ 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; @@ -105,11 +110,14 @@ typedef struct QSize QSize; typedef struct QStyleOptionGraphicsItem QStyleOptionGraphicsItem; typedef struct QTextCursor QTextCursor; typedef struct QTextDocument QTextDocument; +typedef struct QTimerEvent QTimerEvent; typedef struct QTransform QTransform; typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif +void QGraphicsItem_new(QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsItem_new2(QGraphicsItem* parent, QGraphicsItem** outptr_QGraphicsItem); QGraphicsScene* QGraphicsItem_Scene(const QGraphicsItem* self); QGraphicsItem* QGraphicsItem_ParentItem(const QGraphicsItem* self); QGraphicsItem* QGraphicsItem_TopLevelItem(const QGraphicsItem* self); @@ -310,8 +318,80 @@ struct miqt_array /* of QGraphicsItem* */ QGraphicsItem_CollidingItems1(const Q bool QGraphicsItem_IsObscured1(const QGraphicsItem* self, QRectF* rect); void QGraphicsItem_Update1(QGraphicsItem* self, QRectF* rect); void QGraphicsItem_Scroll3(QGraphicsItem* self, double dx, double dy, QRectF* rect); +void QGraphicsItem_override_virtual_Advance(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_Advance(void* self, int phase); +void QGraphicsItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsItem_virtualbase_BoundingRect(const void* self); +void QGraphicsItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsItem_virtualbase_Shape(const void* self); +void QGraphicsItem_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsItem_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsItem_override_virtual_CollidesWithItem(void* self, intptr_t slot); +bool QGraphicsItem_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode); +void QGraphicsItem_override_virtual_CollidesWithPath(void* self, intptr_t slot); +bool QGraphicsItem_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode); +void QGraphicsItem_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsItem_virtualbase_OpaqueArea(const void* self); +void QGraphicsItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsItem_virtualbase_Type(const void* self); +void QGraphicsItem_override_virtual_SceneEventFilter(void* self, intptr_t slot); +bool QGraphicsItem_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event); +void QGraphicsItem_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsItem_virtualbase_SceneEvent(void* self, QEvent* event); +void QGraphicsItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsItem_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItem_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItem_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsItem_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsItem_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsItem_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsItem_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsItem_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event); +void QGraphicsItem_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsItem_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsItem_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsItem_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsItem_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsItem_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsItem_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsItem_Delete(QGraphicsItem* self, bool isSubclass); +void QGraphicsObject_new(QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsObject_new2(QGraphicsItem* parent, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); QMetaObject* QGraphicsObject_MetaObject(const QGraphicsObject* self); void* QGraphicsObject_Metacast(QGraphicsObject* self, const char* param1); struct miqt_string QGraphicsObject_Tr(const char* s); @@ -345,14 +425,170 @@ 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_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_Event(void* self, QEvent* ev); +void QGraphicsObject_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QGraphicsObject_override_virtual_TimerEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QGraphicsObject_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QGraphicsObject_override_virtual_CustomEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_CustomEvent(void* self, QEvent* event); +void QGraphicsObject_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QGraphicsObject_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QGraphicsObject_override_virtual_Advance(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_Advance(void* self, int phase); +void QGraphicsObject_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsObject_virtualbase_BoundingRect(const void* self); +void QGraphicsObject_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsObject_virtualbase_Shape(const void* self); +void QGraphicsObject_override_virtual_Contains(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_Contains(const void* self, QPointF* point); +void QGraphicsObject_override_virtual_CollidesWithItem(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode); +void QGraphicsObject_override_virtual_CollidesWithPath(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode); +void QGraphicsObject_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QGraphicsObject_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QGraphicsObject_virtualbase_OpaqueArea(const void* self); +void QGraphicsObject_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsObject_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsObject_virtualbase_Type(const void* self); +void QGraphicsObject_override_virtual_SceneEventFilter(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event); +void QGraphicsObject_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_SceneEvent(void* self, QEvent* event); +void QGraphicsObject_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QGraphicsObject_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsObject_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsObject_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsObject_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QGraphicsObject_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QGraphicsObject_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QGraphicsObject_override_virtual_HoverEnterEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsObject_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsObject_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QGraphicsObject_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QGraphicsObject_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QGraphicsObject_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsObject_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsObject_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsObject_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QGraphicsObject_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event); +void QGraphicsObject_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QGraphicsObject_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsObject_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsObject_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsObject_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsObject_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QGraphicsObject_virtualbase_SupportsExtension(const void* self, int extension); +void QGraphicsObject_override_virtual_SetExtension(void* self, intptr_t slot); +void QGraphicsObject_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QGraphicsObject_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QGraphicsObject_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsObject_Delete(QGraphicsObject* self, bool isSubclass); +void QAbstractGraphicsShapeItem_new(QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +void QAbstractGraphicsShapeItem_new2(QGraphicsItem* parent, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); QPen* QAbstractGraphicsShapeItem_Pen(const QAbstractGraphicsShapeItem* self); void QAbstractGraphicsShapeItem_SetPen(QAbstractGraphicsShapeItem* self, QPen* pen); 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_override_virtual_IsObscuredBy(void* self, intptr_t slot); +bool QAbstractGraphicsShapeItem_virtualbase_IsObscuredBy(const void* self, QGraphicsItem* item); +void QAbstractGraphicsShapeItem_override_virtual_OpaqueArea(void* self, intptr_t slot); +QPainterPath* QAbstractGraphicsShapeItem_virtualbase_OpaqueArea(const void* self); +void QAbstractGraphicsShapeItem_override_virtual_Advance(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_Advance(void* self, int phase); +void QAbstractGraphicsShapeItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QAbstractGraphicsShapeItem_virtualbase_BoundingRect(const void* self); +void QAbstractGraphicsShapeItem_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QAbstractGraphicsShapeItem_virtualbase_Shape(const void* self); +void QAbstractGraphicsShapeItem_override_virtual_Contains(void* self, intptr_t slot); +bool QAbstractGraphicsShapeItem_virtualbase_Contains(const void* self, QPointF* point); +void QAbstractGraphicsShapeItem_override_virtual_CollidesWithItem(void* self, intptr_t slot); +bool QAbstractGraphicsShapeItem_virtualbase_CollidesWithItem(const void* self, QGraphicsItem* other, int mode); +void QAbstractGraphicsShapeItem_override_virtual_CollidesWithPath(void* self, intptr_t slot); +bool QAbstractGraphicsShapeItem_virtualbase_CollidesWithPath(const void* self, QPainterPath* path, int mode); +void QAbstractGraphicsShapeItem_override_virtual_Paint(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QAbstractGraphicsShapeItem_override_virtual_Type(void* self, intptr_t slot); +int QAbstractGraphicsShapeItem_virtualbase_Type(const void* self); +void QAbstractGraphicsShapeItem_override_virtual_SceneEventFilter(void* self, intptr_t slot); +bool QAbstractGraphicsShapeItem_virtualbase_SceneEventFilter(void* self, QGraphicsItem* watched, QEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QAbstractGraphicsShapeItem_virtualbase_SceneEvent(void* self, QEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_DropEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_HoverEnterEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_HoverEnterEvent(void* self, QGraphicsSceneHoverEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_WheelEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* event); +void QAbstractGraphicsShapeItem_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QAbstractGraphicsShapeItem_virtualbase_InputMethodQuery(const void* self, int query); +void QAbstractGraphicsShapeItem_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QAbstractGraphicsShapeItem_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QAbstractGraphicsShapeItem_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QAbstractGraphicsShapeItem_virtualbase_SupportsExtension(const void* self, int extension); +void QAbstractGraphicsShapeItem_override_virtual_SetExtension(void* self, intptr_t slot); +void QAbstractGraphicsShapeItem_virtualbase_SetExtension(void* self, int extension, QVariant* variant); +void QAbstractGraphicsShapeItem_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QAbstractGraphicsShapeItem_virtualbase_Extension(const void* self, QVariant* variant); void QAbstractGraphicsShapeItem_Delete(QAbstractGraphicsShapeItem* self, bool isSubclass); void QGraphicsPathItem_new(QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); diff --git a/qt6/gen_qgraphicslayout.cpp b/qt6/gen_qgraphicslayout.cpp index 96fa07da..496eb83c 100644 --- a/qt6/gen_qgraphicslayout.cpp +++ b/qt6/gen_qgraphicslayout.cpp @@ -1,10 +1,250 @@ #include #include #include +#include +#include #include #include "gen_qgraphicslayout.h" #include "_cgo_export.h" +class MiqtVirtualQGraphicsLayout : public virtual QGraphicsLayout { +public: + + MiqtVirtualQGraphicsLayout(): QGraphicsLayout() {}; + MiqtVirtualQGraphicsLayout(QGraphicsLayoutItem* parent): QGraphicsLayout(parent) {}; + + virtual ~MiqtVirtualQGraphicsLayout() = default; + + // 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) { + QGraphicsLayout::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_QGraphicsLayout_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 { + + QGraphicsLayout::getContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + + } + + // 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) { + QGraphicsLayout::invalidate(); + return; + } + + + miqt_exec_callback_QGraphicsLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QGraphicsLayout::invalidate(); + + } + + // 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) { + QGraphicsLayout::updateGeometry(); + return; + } + + + miqt_exec_callback_QGraphicsLayout_UpdateGeometry(this, handle__UpdateGeometry); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometry() { + + QGraphicsLayout::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) { + QGraphicsLayout::widgetEvent(e); + return; + } + + QEvent* sigval1 = e; + + miqt_exec_callback_QGraphicsLayout_WidgetEvent(this, handle__WidgetEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WidgetEvent(QEvent* e) { + + QGraphicsLayout::widgetEvent(e); + + } + + // 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 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QGraphicsLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ItemAt = 0; + + // Subclass to allow providing a Go implementation + virtual QGraphicsLayoutItem* itemAt(int i) const override { + if (handle__ItemAt == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + int sigval1 = i; + + QGraphicsLayoutItem* callback_return_value = miqt_exec_callback_QGraphicsLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + int sigval1 = index; + + miqt_exec_callback_QGraphicsLayout_RemoveAt(this, handle__RemoveAt, sigval1); + + + } + + // 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) { + QGraphicsLayout::setGeometry(rect); + return; + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRectF* rect) { + + QGraphicsLayout::setGeometry(*rect); + + } + + // 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 QGraphicsLayout::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QGraphicsLayout_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QGraphicsLayout::isEmpty(); + + } + + // 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 QSizeF(); // Pure virtual, there is no base we can call + } + + 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_QGraphicsLayout_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + +}; + +void QGraphicsLayout_new(QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLayout* ret = new MiqtVirtualQGraphicsLayout(); + *outptr_QGraphicsLayout = ret; + *outptr_QGraphicsLayoutItem = static_cast(ret); +} + +void QGraphicsLayout_new2(QGraphicsLayoutItem* parent, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLayout* ret = new MiqtVirtualQGraphicsLayout(parent); + *outptr_QGraphicsLayout = ret; + *outptr_QGraphicsLayoutItem = static_cast(ret); +} + void QGraphicsLayout_SetContentsMargins(QGraphicsLayout* self, double left, double top, double right, double bottom) { self->setContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); } @@ -53,9 +293,73 @@ bool QGraphicsLayout_InstantInvalidatePropagation() { return QGraphicsLayout::instantInvalidatePropagation(); } +void QGraphicsLayout_override_virtual_GetContentsMargins(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__GetContentsMargins = slot; +} + +void QGraphicsLayout_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom) { + ( (const MiqtVirtualQGraphicsLayout*)(self) )->virtualbase_GetContentsMargins(left, top, right, bottom); +} + +void QGraphicsLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__Invalidate = slot; +} + +void QGraphicsLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQGraphicsLayout*)(self) )->virtualbase_Invalidate(); +} + +void QGraphicsLayout_override_virtual_UpdateGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__UpdateGeometry = slot; +} + +void QGraphicsLayout_virtualbase_UpdateGeometry(void* self) { + ( (MiqtVirtualQGraphicsLayout*)(self) )->virtualbase_UpdateGeometry(); +} + +void QGraphicsLayout_override_virtual_WidgetEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__WidgetEvent = slot; +} + +void QGraphicsLayout_virtualbase_WidgetEvent(void* self, QEvent* e) { + ( (MiqtVirtualQGraphicsLayout*)(self) )->virtualbase_WidgetEvent(e); +} + +void QGraphicsLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__Count = slot; +} + +void QGraphicsLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__ItemAt = slot; +} + +void QGraphicsLayout_override_virtual_RemoveAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__RemoveAt = slot; +} + +void QGraphicsLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__SetGeometry = slot; +} + +void QGraphicsLayout_virtualbase_SetGeometry(void* self, QRectF* rect) { + ( (MiqtVirtualQGraphicsLayout*)(self) )->virtualbase_SetGeometry(rect); +} + +void QGraphicsLayout_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__IsEmpty = slot; +} + +bool QGraphicsLayout_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQGraphicsLayout*)(self) )->virtualbase_IsEmpty(); +} + +void QGraphicsLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayout*)(self) )->handle__SizeHint = slot; +} + void QGraphicsLayout_Delete(QGraphicsLayout* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qgraphicslayout.go b/qt6/gen_qgraphicslayout.go index f14e03d7..001bcb38 100644 --- a/qt6/gen_qgraphicslayout.go +++ b/qt6/gen_qgraphicslayout.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,28 @@ func UnsafeNewQGraphicsLayout(h unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Poi QGraphicsLayoutItem: UnsafeNewQGraphicsLayoutItem(h_QGraphicsLayoutItem)} } +// NewQGraphicsLayout constructs a new QGraphicsLayout object. +func NewQGraphicsLayout() *QGraphicsLayout { + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLayout_new(&outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayout(outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsLayout2 constructs a new QGraphicsLayout object. +func NewQGraphicsLayout2(parent *QGraphicsLayoutItem) *QGraphicsLayout { + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLayout_new2(parent.cPointer(), &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayout(outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret +} + func (this *QGraphicsLayout) SetContentsMargins(left float64, top float64, right float64, bottom float64) { C.QGraphicsLayout_SetContentsMargins(this.h, (C.double)(left), (C.double)(top), (C.double)(right), (C.double)(bottom)) } @@ -100,6 +123,216 @@ func QGraphicsLayout_InstantInvalidatePropagation() bool { return (bool)(C.QGraphicsLayout_InstantInvalidatePropagation()) } +func (this *QGraphicsLayout) callVirtualBase_GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) { + + C.QGraphicsLayout_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 *QGraphicsLayout) OnGetContentsMargins(slot func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) { + C.QGraphicsLayout_override_virtual_GetContentsMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_GetContentsMargins +func miqt_exec_callback_QGraphicsLayout_GetContentsMargins(self *C.QGraphicsLayout, 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((&QGraphicsLayout{h: self}).callVirtualBase_GetContentsMargins, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QGraphicsLayout) callVirtualBase_Invalidate() { + + C.QGraphicsLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsLayout) OnInvalidate(slot func(super func())) { + C.QGraphicsLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_Invalidate +func miqt_exec_callback_QGraphicsLayout_Invalidate(self *C.QGraphicsLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QGraphicsLayout) callVirtualBase_UpdateGeometry() { + + C.QGraphicsLayout_virtualbase_UpdateGeometry(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsLayout) OnUpdateGeometry(slot func(super func())) { + C.QGraphicsLayout_override_virtual_UpdateGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_UpdateGeometry +func miqt_exec_callback_QGraphicsLayout_UpdateGeometry(self *C.QGraphicsLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsLayout{h: self}).callVirtualBase_UpdateGeometry) + +} + +func (this *QGraphicsLayout) callVirtualBase_WidgetEvent(e *QEvent) { + + C.QGraphicsLayout_virtualbase_WidgetEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QGraphicsLayout) OnWidgetEvent(slot func(super func(e *QEvent), e *QEvent)) { + C.QGraphicsLayout_override_virtual_WidgetEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_WidgetEvent +func miqt_exec_callback_QGraphicsLayout_WidgetEvent(self *C.QGraphicsLayout, 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((&QGraphicsLayout{h: self}).callVirtualBase_WidgetEvent, slotval1) + +} +func (this *QGraphicsLayout) OnCount(slot func() int) { + C.QGraphicsLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_Count +func miqt_exec_callback_QGraphicsLayout_Count(self *C.QGraphicsLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *QGraphicsLayout) OnItemAt(slot func(i int) *QGraphicsLayoutItem) { + C.QGraphicsLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_ItemAt +func miqt_exec_callback_QGraphicsLayout_ItemAt(self *C.QGraphicsLayout, cb C.intptr_t, i C.int) *C.QGraphicsLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(i int) *QGraphicsLayoutItem) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(i) + + virtualReturn := gofunc(slotval1) + + return virtualReturn.cPointer() + +} +func (this *QGraphicsLayout) OnRemoveAt(slot func(index int)) { + C.QGraphicsLayout_override_virtual_RemoveAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_RemoveAt +func miqt_exec_callback_QGraphicsLayout_RemoveAt(self *C.QGraphicsLayout, cb C.intptr_t, index C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(index int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + gofunc(slotval1) + +} + +func (this *QGraphicsLayout) callVirtualBase_SetGeometry(rect *QRectF) { + + C.QGraphicsLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QGraphicsLayout) OnSetGeometry(slot func(super func(rect *QRectF), rect *QRectF)) { + C.QGraphicsLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_SetGeometry +func miqt_exec_callback_QGraphicsLayout_SetGeometry(self *C.QGraphicsLayout, 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((&QGraphicsLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QGraphicsLayout) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QGraphicsLayout_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsLayout) OnIsEmpty(slot func(super func() bool) bool) { + C.QGraphicsLayout_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_IsEmpty +func miqt_exec_callback_QGraphicsLayout_IsEmpty(self *C.QGraphicsLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsLayout{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} +func (this *QGraphicsLayout) OnSizeHint(slot func(which SizeHint, constraint *QSizeF) *QSizeF) { + C.QGraphicsLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayout_SizeHint +func miqt_exec_callback_QGraphicsLayout_SizeHint(self *C.QGraphicsLayout, cb C.intptr_t, which C.int, constraint *C.QSizeF) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QGraphicsLayout) Delete() { C.QGraphicsLayout_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qgraphicslayout.h b/qt6/gen_qgraphicslayout.h index 0fba91dc..1e015e7e 100644 --- a/qt6/gen_qgraphicslayout.h +++ b/qt6/gen_qgraphicslayout.h @@ -18,12 +18,18 @@ extern "C" { class QEvent; class QGraphicsLayout; class QGraphicsLayoutItem; +class QRectF; +class QSizeF; #else typedef struct QEvent QEvent; typedef struct QGraphicsLayout QGraphicsLayout; typedef struct QGraphicsLayoutItem QGraphicsLayoutItem; +typedef struct QRectF QRectF; +typedef struct QSizeF QSizeF; #endif +void QGraphicsLayout_new(QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsLayout_new2(QGraphicsLayoutItem* parent, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); void QGraphicsLayout_SetContentsMargins(QGraphicsLayout* self, double left, double top, double right, double bottom); void QGraphicsLayout_GetContentsMargins(const QGraphicsLayout* self, double* left, double* top, double* right, double* bottom); void QGraphicsLayout_Activate(QGraphicsLayout* self); @@ -36,6 +42,26 @@ 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_override_virtual_GetContentsMargins(void* self, intptr_t slot); +void QGraphicsLayout_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom); +void QGraphicsLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QGraphicsLayout_virtualbase_Invalidate(void* self); +void QGraphicsLayout_override_virtual_UpdateGeometry(void* self, intptr_t slot); +void QGraphicsLayout_virtualbase_UpdateGeometry(void* self); +void QGraphicsLayout_override_virtual_WidgetEvent(void* self, intptr_t slot); +void QGraphicsLayout_virtualbase_WidgetEvent(void* self, QEvent* e); +void QGraphicsLayout_override_virtual_Count(void* self, intptr_t slot); +int QGraphicsLayout_virtualbase_Count(const void* self); +void QGraphicsLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QGraphicsLayoutItem* QGraphicsLayout_virtualbase_ItemAt(const void* self, int i); +void QGraphicsLayout_override_virtual_RemoveAt(void* self, intptr_t slot); +void QGraphicsLayout_virtualbase_RemoveAt(void* self, int index); +void QGraphicsLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGraphicsLayout_virtualbase_SetGeometry(void* self, QRectF* rect); +void QGraphicsLayout_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QGraphicsLayout_virtualbase_IsEmpty(const void* self); +void QGraphicsLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSizeF* QGraphicsLayout_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint); void QGraphicsLayout_Delete(QGraphicsLayout* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qgraphicslayoutitem.cpp b/qt6/gen_qgraphicslayoutitem.cpp index 600f5596..6796ba74 100644 --- a/qt6/gen_qgraphicslayoutitem.cpp +++ b/qt6/gen_qgraphicslayoutitem.cpp @@ -7,6 +7,154 @@ #include "gen_qgraphicslayoutitem.h" #include "_cgo_export.h" +class MiqtVirtualQGraphicsLayoutItem : public virtual QGraphicsLayoutItem { +public: + + MiqtVirtualQGraphicsLayoutItem(): QGraphicsLayoutItem() {}; + MiqtVirtualQGraphicsLayoutItem(QGraphicsLayoutItem* parent): QGraphicsLayoutItem(parent) {}; + MiqtVirtualQGraphicsLayoutItem(QGraphicsLayoutItem* parent, bool isLayout): QGraphicsLayoutItem(parent, isLayout) {}; + + virtual ~MiqtVirtualQGraphicsLayoutItem() = 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) { + QGraphicsLayoutItem::setGeometry(rect); + return; + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsLayoutItem_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRectF* rect) { + + QGraphicsLayoutItem::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) { + QGraphicsLayoutItem::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_QGraphicsLayoutItem_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 { + + QGraphicsLayoutItem::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) { + QGraphicsLayoutItem::updateGeometry(); + return; + } + + + miqt_exec_callback_QGraphicsLayoutItem_UpdateGeometry(this, handle__UpdateGeometry); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometry() { + + QGraphicsLayoutItem::updateGeometry(); + + } + + // 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 QGraphicsLayoutItem::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QGraphicsLayoutItem_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QGraphicsLayoutItem::isEmpty(); + + } + + // 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 QSizeF(); // Pure virtual, there is no base we can call + } + + 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_QGraphicsLayoutItem_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + +}; + +void QGraphicsLayoutItem_new(QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLayoutItem* ret = new MiqtVirtualQGraphicsLayoutItem(); + *outptr_QGraphicsLayoutItem = ret; +} + +void QGraphicsLayoutItem_new2(QGraphicsLayoutItem* parent, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLayoutItem* ret = new MiqtVirtualQGraphicsLayoutItem(parent); + *outptr_QGraphicsLayoutItem = ret; +} + +void QGraphicsLayoutItem_new3(QGraphicsLayoutItem* parent, bool isLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsLayoutItem* ret = new MiqtVirtualQGraphicsLayoutItem(parent, isLayout); + *outptr_QGraphicsLayoutItem = ret; +} + void QGraphicsLayoutItem_SetSizePolicy(QGraphicsLayoutItem* self, QSizePolicy* policy) { self->setSizePolicy(*policy); } @@ -165,9 +313,45 @@ QSizeF* QGraphicsLayoutItem_EffectiveSizeHint2(const QGraphicsLayoutItem* self, return new QSizeF(self->effectiveSizeHint(static_cast(which), *constraint)); } +void QGraphicsLayoutItem_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayoutItem*)(self) )->handle__SetGeometry = slot; +} + +void QGraphicsLayoutItem_virtualbase_SetGeometry(void* self, QRectF* rect) { + ( (MiqtVirtualQGraphicsLayoutItem*)(self) )->virtualbase_SetGeometry(rect); +} + +void QGraphicsLayoutItem_override_virtual_GetContentsMargins(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayoutItem*)(self) )->handle__GetContentsMargins = slot; +} + +void QGraphicsLayoutItem_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom) { + ( (const MiqtVirtualQGraphicsLayoutItem*)(self) )->virtualbase_GetContentsMargins(left, top, right, bottom); +} + +void QGraphicsLayoutItem_override_virtual_UpdateGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayoutItem*)(self) )->handle__UpdateGeometry = slot; +} + +void QGraphicsLayoutItem_virtualbase_UpdateGeometry(void* self) { + ( (MiqtVirtualQGraphicsLayoutItem*)(self) )->virtualbase_UpdateGeometry(); +} + +void QGraphicsLayoutItem_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayoutItem*)(self) )->handle__IsEmpty = slot; +} + +bool QGraphicsLayoutItem_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQGraphicsLayoutItem*)(self) )->virtualbase_IsEmpty(); +} + +void QGraphicsLayoutItem_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsLayoutItem*)(self) )->handle__SizeHint = slot; +} + void QGraphicsLayoutItem_Delete(QGraphicsLayoutItem* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qgraphicslayoutitem.go b/qt6/gen_qgraphicslayoutitem.go index 101d4256..22ae43be 100644 --- a/qt6/gen_qgraphicslayoutitem.go +++ b/qt6/gen_qgraphicslayoutitem.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -49,6 +50,36 @@ func UnsafeNewQGraphicsLayoutItem(h unsafe.Pointer) *QGraphicsLayoutItem { return &QGraphicsLayoutItem{h: (*C.QGraphicsLayoutItem)(h)} } +// NewQGraphicsLayoutItem constructs a new QGraphicsLayoutItem object. +func NewQGraphicsLayoutItem() *QGraphicsLayoutItem { + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLayoutItem_new(&outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayoutItem(outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsLayoutItem2 constructs a new QGraphicsLayoutItem object. +func NewQGraphicsLayoutItem2(parent *QGraphicsLayoutItem) *QGraphicsLayoutItem { + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLayoutItem_new2(parent.cPointer(), &outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayoutItem(outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsLayoutItem3 constructs a new QGraphicsLayoutItem object. +func NewQGraphicsLayoutItem3(parent *QGraphicsLayoutItem, isLayout bool) *QGraphicsLayoutItem { + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsLayoutItem_new3(parent.cPointer(), (C.bool)(isLayout), &outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayoutItem(outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret +} + func (this *QGraphicsLayoutItem) SetSizePolicy(policy *QSizePolicy) { C.QGraphicsLayoutItem_SetSizePolicy(this.h, policy.cPointer()) } @@ -225,6 +256,121 @@ func (this *QGraphicsLayoutItem) EffectiveSizeHint2(which SizeHint, constraint * return _goptr } +func (this *QGraphicsLayoutItem) callVirtualBase_SetGeometry(rect *QRectF) { + + C.QGraphicsLayoutItem_virtualbase_SetGeometry(unsafe.Pointer(this.h), rect.cPointer()) + +} +func (this *QGraphicsLayoutItem) OnSetGeometry(slot func(super func(rect *QRectF), rect *QRectF)) { + C.QGraphicsLayoutItem_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayoutItem_SetGeometry +func miqt_exec_callback_QGraphicsLayoutItem_SetGeometry(self *C.QGraphicsLayoutItem, 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((&QGraphicsLayoutItem{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QGraphicsLayoutItem) callVirtualBase_GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) { + + C.QGraphicsLayoutItem_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 *QGraphicsLayoutItem) OnGetContentsMargins(slot func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) { + C.QGraphicsLayoutItem_override_virtual_GetContentsMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayoutItem_GetContentsMargins +func miqt_exec_callback_QGraphicsLayoutItem_GetContentsMargins(self *C.QGraphicsLayoutItem, 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((&QGraphicsLayoutItem{h: self}).callVirtualBase_GetContentsMargins, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QGraphicsLayoutItem) callVirtualBase_UpdateGeometry() { + + C.QGraphicsLayoutItem_virtualbase_UpdateGeometry(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsLayoutItem) OnUpdateGeometry(slot func(super func())) { + C.QGraphicsLayoutItem_override_virtual_UpdateGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayoutItem_UpdateGeometry +func miqt_exec_callback_QGraphicsLayoutItem_UpdateGeometry(self *C.QGraphicsLayoutItem, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsLayoutItem{h: self}).callVirtualBase_UpdateGeometry) + +} + +func (this *QGraphicsLayoutItem) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QGraphicsLayoutItem_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsLayoutItem) OnIsEmpty(slot func(super func() bool) bool) { + C.QGraphicsLayoutItem_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayoutItem_IsEmpty +func miqt_exec_callback_QGraphicsLayoutItem_IsEmpty(self *C.QGraphicsLayoutItem, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsLayoutItem{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} +func (this *QGraphicsLayoutItem) OnSizeHint(slot func(which SizeHint, constraint *QSizeF) *QSizeF) { + C.QGraphicsLayoutItem_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsLayoutItem_SizeHint +func miqt_exec_callback_QGraphicsLayoutItem_SizeHint(self *C.QGraphicsLayoutItem, cb C.intptr_t, which C.int, constraint *C.QSizeF) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QGraphicsLayoutItem) Delete() { C.QGraphicsLayoutItem_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qgraphicslayoutitem.h b/qt6/gen_qgraphicslayoutitem.h index 2d28f296..3a54c8b2 100644 --- a/qt6/gen_qgraphicslayoutitem.h +++ b/qt6/gen_qgraphicslayoutitem.h @@ -28,6 +28,9 @@ typedef struct QSizeF QSizeF; typedef struct QSizePolicy QSizePolicy; #endif +void QGraphicsLayoutItem_new(QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsLayoutItem_new2(QGraphicsLayoutItem* parent, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsLayoutItem_new3(QGraphicsLayoutItem* parent, bool isLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); void QGraphicsLayoutItem_SetSizePolicy(QGraphicsLayoutItem* self, QSizePolicy* policy); void QGraphicsLayoutItem_SetSizePolicy2(QGraphicsLayoutItem* self, int hPolicy, int vPolicy); QSizePolicy* QGraphicsLayoutItem_SizePolicy(const QGraphicsLayoutItem* self); @@ -67,6 +70,16 @@ 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_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGraphicsLayoutItem_virtualbase_SetGeometry(void* self, QRectF* rect); +void QGraphicsLayoutItem_override_virtual_GetContentsMargins(void* self, intptr_t slot); +void QGraphicsLayoutItem_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom); +void QGraphicsLayoutItem_override_virtual_UpdateGeometry(void* self, intptr_t slot); +void QGraphicsLayoutItem_virtualbase_UpdateGeometry(void* self); +void QGraphicsLayoutItem_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QGraphicsLayoutItem_virtualbase_IsEmpty(const void* self); +void QGraphicsLayoutItem_override_virtual_SizeHint(void* self, intptr_t slot); +QSizeF* QGraphicsLayoutItem_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint); void QGraphicsLayoutItem_Delete(QGraphicsLayoutItem* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qgraphicstransform.cpp b/qt6/gen_qgraphicstransform.cpp index 71a3a067..9963920f 100644 --- a/qt6/gen_qgraphicstransform.cpp +++ b/qt6/gen_qgraphicstransform.cpp @@ -1,17 +1,230 @@ +#include +#include #include #include #include #include +#include #include #include #include #include #include +#include #include #include #include "gen_qgraphicstransform.h" #include "_cgo_export.h" +class MiqtVirtualQGraphicsTransform : public virtual QGraphicsTransform { +public: + + MiqtVirtualQGraphicsTransform(): QGraphicsTransform() {}; + MiqtVirtualQGraphicsTransform(QObject* parent): QGraphicsTransform(parent) {}; + + virtual ~MiqtVirtualQGraphicsTransform() = 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) { + return; // Pure virtual, there is no base we can call + } + + QMatrix4x4* sigval1 = matrix; + + miqt_exec_callback_QGraphicsTransform_ApplyTo(const_cast(this), handle__ApplyTo, sigval1); + + + } + + // 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 QGraphicsTransform::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsTransform_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QGraphicsTransform::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 QGraphicsTransform::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QGraphicsTransform_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QGraphicsTransform::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) { + QGraphicsTransform::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTransform_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QGraphicsTransform::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) { + QGraphicsTransform::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTransform_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QGraphicsTransform::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) { + QGraphicsTransform::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsTransform_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QGraphicsTransform::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) { + QGraphicsTransform::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsTransform_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QGraphicsTransform::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) { + QGraphicsTransform::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QGraphicsTransform_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QGraphicsTransform::disconnectNotify(*signal); + + } + +}; + +void QGraphicsTransform_new(QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { + MiqtVirtualQGraphicsTransform* ret = new MiqtVirtualQGraphicsTransform(); + *outptr_QGraphicsTransform = ret; + *outptr_QObject = static_cast(ret); +} + +void QGraphicsTransform_new2(QObject* parent, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { + MiqtVirtualQGraphicsTransform* ret = new MiqtVirtualQGraphicsTransform(parent); + *outptr_QGraphicsTransform = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QGraphicsTransform_MetaObject(const QGraphicsTransform* self) { return (QMetaObject*) self->metaObject(); } @@ -57,9 +270,69 @@ struct miqt_string QGraphicsTransform_Tr3(const char* s, const char* c, int n) { return _ms; } +void QGraphicsTransform_override_virtual_ApplyTo(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTransform*)(self) )->handle__ApplyTo = slot; +} + +void QGraphicsTransform_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTransform*)(self) )->handle__Event = slot; +} + +bool QGraphicsTransform_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQGraphicsTransform*)(self) )->virtualbase_Event(event); +} + +void QGraphicsTransform_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTransform*)(self) )->handle__EventFilter = slot; +} + +bool QGraphicsTransform_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQGraphicsTransform*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QGraphicsTransform_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTransform*)(self) )->handle__TimerEvent = slot; +} + +void QGraphicsTransform_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQGraphicsTransform*)(self) )->virtualbase_TimerEvent(event); +} + +void QGraphicsTransform_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTransform*)(self) )->handle__ChildEvent = slot; +} + +void QGraphicsTransform_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQGraphicsTransform*)(self) )->virtualbase_ChildEvent(event); +} + +void QGraphicsTransform_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTransform*)(self) )->handle__CustomEvent = slot; +} + +void QGraphicsTransform_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsTransform*)(self) )->virtualbase_CustomEvent(event); +} + +void QGraphicsTransform_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTransform*)(self) )->handle__ConnectNotify = slot; +} + +void QGraphicsTransform_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsTransform*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QGraphicsTransform_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsTransform*)(self) )->handle__DisconnectNotify = slot; +} + +void QGraphicsTransform_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQGraphicsTransform*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QGraphicsTransform_Delete(QGraphicsTransform* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qgraphicstransform.go b/qt6/gen_qgraphicstransform.go index 0d436cc3..116903b4 100644 --- a/qt6/gen_qgraphicstransform.go +++ b/qt6/gen_qgraphicstransform.go @@ -53,6 +53,28 @@ func UnsafeNewQGraphicsTransform(h unsafe.Pointer, h_QObject unsafe.Pointer) *QG QObject: UnsafeNewQObject(h_QObject)} } +// NewQGraphicsTransform constructs a new QGraphicsTransform object. +func NewQGraphicsTransform() *QGraphicsTransform { + var outptr_QGraphicsTransform *C.QGraphicsTransform = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsTransform_new(&outptr_QGraphicsTransform, &outptr_QObject) + ret := newQGraphicsTransform(outptr_QGraphicsTransform, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQGraphicsTransform2 constructs a new QGraphicsTransform object. +func NewQGraphicsTransform2(parent *QObject) *QGraphicsTransform { + var outptr_QGraphicsTransform *C.QGraphicsTransform = nil + var outptr_QObject *C.QObject = nil + + C.QGraphicsTransform_new2(parent.cPointer(), &outptr_QGraphicsTransform, &outptr_QObject) + ret := newQGraphicsTransform(outptr_QGraphicsTransform, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QGraphicsTransform) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QGraphicsTransform_MetaObject(this.h))) } @@ -97,6 +119,189 @@ func QGraphicsTransform_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QGraphicsTransform) OnApplyTo(slot func(matrix *QMatrix4x4)) { + C.QGraphicsTransform_override_virtual_ApplyTo(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTransform_ApplyTo +func miqt_exec_callback_QGraphicsTransform_ApplyTo(self *C.QGraphicsTransform, cb C.intptr_t, matrix *C.QMatrix4x4) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + +} + +func (this *QGraphicsTransform) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QGraphicsTransform_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QGraphicsTransform) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QGraphicsTransform_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTransform_Event +func miqt_exec_callback_QGraphicsTransform_Event(self *C.QGraphicsTransform, 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((&QGraphicsTransform{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsTransform) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QGraphicsTransform_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QGraphicsTransform) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QGraphicsTransform_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTransform_EventFilter +func miqt_exec_callback_QGraphicsTransform_EventFilter(self *C.QGraphicsTransform, 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((&QGraphicsTransform{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsTransform) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QGraphicsTransform_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTransform) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QGraphicsTransform_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTransform_TimerEvent +func miqt_exec_callback_QGraphicsTransform_TimerEvent(self *C.QGraphicsTransform, 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((&QGraphicsTransform{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QGraphicsTransform) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QGraphicsTransform_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTransform) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QGraphicsTransform_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTransform_ChildEvent +func miqt_exec_callback_QGraphicsTransform_ChildEvent(self *C.QGraphicsTransform, 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((&QGraphicsTransform{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QGraphicsTransform) callVirtualBase_CustomEvent(event *QEvent) { + + C.QGraphicsTransform_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QGraphicsTransform) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QGraphicsTransform_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTransform_CustomEvent +func miqt_exec_callback_QGraphicsTransform_CustomEvent(self *C.QGraphicsTransform, 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((&QGraphicsTransform{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QGraphicsTransform) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QGraphicsTransform_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsTransform) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsTransform_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTransform_ConnectNotify +func miqt_exec_callback_QGraphicsTransform_ConnectNotify(self *C.QGraphicsTransform, 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((&QGraphicsTransform{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QGraphicsTransform) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QGraphicsTransform_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QGraphicsTransform) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QGraphicsTransform_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsTransform_DisconnectNotify +func miqt_exec_callback_QGraphicsTransform_DisconnectNotify(self *C.QGraphicsTransform, 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((&QGraphicsTransform{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QGraphicsTransform) Delete() { diff --git a/qt6/gen_qgraphicstransform.h b/qt6/gen_qgraphicstransform.h index 51a1328a..3389b1c4 100644 --- a/qt6/gen_qgraphicstransform.h +++ b/qt6/gen_qgraphicstransform.h @@ -15,29 +15,55 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QGraphicsRotation; class QGraphicsScale; class QGraphicsTransform; class QMatrix4x4; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; class QVector3D; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QGraphicsRotation QGraphicsRotation; typedef struct QGraphicsScale QGraphicsScale; typedef struct QGraphicsTransform QGraphicsTransform; typedef struct QMatrix4x4 QMatrix4x4; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; typedef struct QVector3D QVector3D; #endif +void QGraphicsTransform_new(QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); +void QGraphicsTransform_new2(QObject* parent, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); QMetaObject* QGraphicsTransform_MetaObject(const QGraphicsTransform* self); void* QGraphicsTransform_Metacast(QGraphicsTransform* self, const char* param1); 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_override_virtual_ApplyTo(void* self, intptr_t slot); +void QGraphicsTransform_virtualbase_ApplyTo(const void* self, QMatrix4x4* matrix); +void QGraphicsTransform_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsTransform_virtualbase_Event(void* self, QEvent* event); +void QGraphicsTransform_override_virtual_EventFilter(void* self, intptr_t slot); +bool QGraphicsTransform_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QGraphicsTransform_override_virtual_TimerEvent(void* self, intptr_t slot); +void QGraphicsTransform_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QGraphicsTransform_override_virtual_ChildEvent(void* self, intptr_t slot); +void QGraphicsTransform_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QGraphicsTransform_override_virtual_CustomEvent(void* self, intptr_t slot); +void QGraphicsTransform_virtualbase_CustomEvent(void* self, QEvent* event); +void QGraphicsTransform_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QGraphicsTransform_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QGraphicsTransform_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QGraphicsTransform_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QGraphicsTransform_Delete(QGraphicsTransform* self, bool isSubclass); void QGraphicsScale_new(QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); diff --git a/qt6/gen_qheaderview.cpp b/qt6/gen_qheaderview.cpp index e4388f18..1d088b4e 100644 --- a/qt6/gen_qheaderview.cpp +++ b/qt6/gen_qheaderview.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -24,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -730,6 +732,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QHeaderView::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QHeaderView_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QHeaderView::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__InitStyleOptionForIndex = 0; @@ -1007,6 +1034,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QHeaderView::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QHeaderView_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QHeaderView::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__UpdateEditorData = 0; @@ -2371,6 +2427,14 @@ void QHeaderView_virtualbase_SetSelection(void* self, QRect* rect, int flags) { ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_SetSelection(rect, flags); } +void QHeaderView_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QHeaderView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQHeaderView*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QHeaderView_override_virtual_InitStyleOptionForIndex(void* self, intptr_t slot) { dynamic_cast( (QHeaderView*)(self) )->handle__InitStyleOptionForIndex = slot; } @@ -2459,6 +2523,14 @@ void QHeaderView_virtualbase_RowsAboutToBeRemoved(void* self, QModelIndex* paren ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_RowsAboutToBeRemoved(parent, start, end); } +void QHeaderView_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QHeaderView*)(self) )->handle__SelectionChanged = slot; +} + +void QHeaderView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQHeaderView*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QHeaderView_override_virtual_UpdateEditorData(void* self, intptr_t slot) { dynamic_cast( (QHeaderView*)(self) )->handle__UpdateEditorData = slot; } diff --git a/qt6/gen_qheaderview.go b/qt6/gen_qheaderview.go index ccbb2f20..88cfe8d7 100644 --- a/qt6/gen_qheaderview.go +++ b/qt6/gen_qheaderview.go @@ -1318,6 +1318,34 @@ func miqt_exec_callback_QHeaderView_SetSelection(self *C.QHeaderView, cb C.intpt } +func (this *QHeaderView) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QHeaderView_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QHeaderView) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QHeaderView_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_VisualRegionForSelection +func miqt_exec_callback_QHeaderView_VisualRegionForSelection(self *C.QHeaderView, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QHeaderView{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QHeaderView) callVirtualBase_InitStyleOptionForIndex(option *QStyleOptionHeader, logicalIndex int) { C.QHeaderView_virtualbase_InitStyleOptionForIndex(unsafe.Pointer(this.h), option.cPointer(), (C.int)(logicalIndex)) @@ -1589,6 +1617,30 @@ func miqt_exec_callback_QHeaderView_RowsAboutToBeRemoved(self *C.QHeaderView, cb } +func (this *QHeaderView) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QHeaderView_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QHeaderView) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QHeaderView_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QHeaderView_SelectionChanged +func miqt_exec_callback_QHeaderView_SelectionChanged(self *C.QHeaderView, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QHeaderView{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QHeaderView) callVirtualBase_UpdateEditorData() { C.QHeaderView_virtualbase_UpdateEditorData(unsafe.Pointer(this.h)) diff --git a/qt6/gen_qheaderview.h b/qt6/gen_qheaderview.h index 4174931e..bdaaeace 100644 --- a/qt6/gen_qheaderview.h +++ b/qt6/gen_qheaderview.h @@ -29,6 +29,7 @@ class QFocusEvent; class QFrame; class QHeaderView; class QInputMethodEvent; +class QItemSelection; class QItemSelectionModel; class QKeyEvent; class QMetaObject; @@ -40,6 +41,7 @@ class QPaintEvent; class QPainter; class QPoint; class QRect; +class QRegion; class QResizeEvent; class QSize; class QStyleOptionHeader; @@ -62,6 +64,7 @@ typedef struct QFocusEvent QFocusEvent; typedef struct QFrame QFrame; typedef struct QHeaderView QHeaderView; typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; @@ -73,6 +76,7 @@ typedef struct QPaintEvent QPaintEvent; typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; typedef struct QStyleOptionHeader QStyleOptionHeader; @@ -201,6 +205,7 @@ 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); +QRegion* QHeaderView_VisualRegionForSelection(const QHeaderView* self, QItemSelection* selection); 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); @@ -259,6 +264,8 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QHeaderView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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); @@ -281,6 +288,8 @@ 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_SelectionChanged(void* self, intptr_t slot); +void QHeaderView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt6/gen_qiconengine.cpp b/qt6/gen_qiconengine.cpp index eb0b697d..a9b2866f 100644 --- a/qt6/gen_qiconengine.cpp +++ b/qt6/gen_qiconengine.cpp @@ -13,6 +13,414 @@ #include "gen_qiconengine.h" #include "_cgo_export.h" +class MiqtVirtualQIconEngine : public virtual QIconEngine { +public: + + MiqtVirtualQIconEngine(): QIconEngine() {}; + + virtual ~MiqtVirtualQIconEngine() = 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 QRect& rect, QIcon::Mode mode, QIcon::State state) override { + if (handle__Paint == 0) { + return; // Pure virtual, there is no base we can call + } + + QPainter* sigval1 = painter; + const QRect& rect_ret = rect; + // Cast returned reference into pointer + QRect* sigval2 = const_cast(&rect_ret); + QIcon::Mode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + QIcon::State state_ret = state; + int sigval4 = static_cast(state_ret); + + miqt_exec_callback_QIconEngine_Paint(this, handle__Paint, sigval1, sigval2, sigval3, sigval4); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ActualSize = 0; + + // Subclass to allow providing a Go implementation + virtual QSize actualSize(const QSize& size, QIcon::Mode mode, QIcon::State state) override { + if (handle__ActualSize == 0) { + return QIconEngine::actualSize(size, mode, state); + } + + const QSize& size_ret = size; + // Cast returned reference into pointer + QSize* sigval1 = const_cast(&size_ret); + QIcon::Mode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + QIcon::State state_ret = state; + int sigval3 = static_cast(state_ret); + + QSize* callback_return_value = miqt_exec_callback_QIconEngine_ActualSize(this, handle__ActualSize, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_ActualSize(QSize* size, int mode, int state) { + + return new QSize(QIconEngine::actualSize(*size, static_cast(mode), static_cast(state))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Pixmap = 0; + + // Subclass to allow providing a Go implementation + virtual QPixmap pixmap(const QSize& size, QIcon::Mode mode, QIcon::State state) override { + if (handle__Pixmap == 0) { + return QIconEngine::pixmap(size, mode, state); + } + + const QSize& size_ret = size; + // Cast returned reference into pointer + QSize* sigval1 = const_cast(&size_ret); + QIcon::Mode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + QIcon::State state_ret = state; + int sigval3 = static_cast(state_ret); + + QPixmap* callback_return_value = miqt_exec_callback_QIconEngine_Pixmap(this, handle__Pixmap, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPixmap* virtualbase_Pixmap(QSize* size, int mode, int state) { + + return new QPixmap(QIconEngine::pixmap(*size, static_cast(mode), static_cast(state))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual void addPixmap(const QPixmap& pixmap, QIcon::Mode mode, QIcon::State state) override { + if (handle__AddPixmap == 0) { + QIconEngine::addPixmap(pixmap, mode, state); + return; + } + + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval1 = const_cast(&pixmap_ret); + QIcon::Mode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + QIcon::State state_ret = state; + int sigval3 = static_cast(state_ret); + + miqt_exec_callback_QIconEngine_AddPixmap(this, handle__AddPixmap, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AddPixmap(QPixmap* pixmap, int mode, int state) { + + QIconEngine::addPixmap(*pixmap, static_cast(mode), static_cast(state)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddFile = 0; + + // Subclass to allow providing a Go implementation + virtual void addFile(const QString& fileName, const QSize& size, QIcon::Mode mode, QIcon::State state) override { + if (handle__AddFile == 0) { + QIconEngine::addFile(fileName, size, mode, state); + return; + } + + const QString fileName_ret = fileName; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray fileName_b = fileName_ret.toUtf8(); + struct miqt_string fileName_ms; + fileName_ms.len = fileName_b.length(); + fileName_ms.data = static_cast(malloc(fileName_ms.len)); + memcpy(fileName_ms.data, fileName_b.data(), fileName_ms.len); + struct miqt_string sigval1 = fileName_ms; + const QSize& size_ret = size; + // Cast returned reference into pointer + QSize* sigval2 = const_cast(&size_ret); + QIcon::Mode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + QIcon::State state_ret = state; + int sigval4 = static_cast(state_ret); + + miqt_exec_callback_QIconEngine_AddFile(this, handle__AddFile, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_AddFile(struct miqt_string fileName, QSize* size, int mode, int state) { + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + + QIconEngine::addFile(fileName_QString, *size, static_cast(mode), static_cast(state)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Key = 0; + + // Subclass to allow providing a Go implementation + virtual QString key() const override { + if (handle__Key == 0) { + return QIconEngine::key(); + } + + + struct miqt_string callback_return_value = miqt_exec_callback_QIconEngine_Key(const_cast(this), handle__Key); + 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_Key() const { + + QString _ret = QIconEngine::key(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 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__Clone = 0; + + // Subclass to allow providing a Go implementation + virtual QIconEngine* clone() const override { + if (handle__Clone == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + + QIconEngine* callback_return_value = miqt_exec_callback_QIconEngine_Clone(const_cast(this), handle__Clone); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Read = 0; + + // Subclass to allow providing a Go implementation + virtual bool read(QDataStream& in) override { + if (handle__Read == 0) { + return QIconEngine::read(in); + } + + QDataStream& in_ret = in; + // Cast returned reference into pointer + QDataStream* sigval1 = &in_ret; + + bool callback_return_value = miqt_exec_callback_QIconEngine_Read(this, handle__Read, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Read(QDataStream* in) { + + return QIconEngine::read(*in); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Write = 0; + + // Subclass to allow providing a Go implementation + virtual bool write(QDataStream& out) const override { + if (handle__Write == 0) { + return QIconEngine::write(out); + } + + QDataStream& out_ret = out; + // Cast returned reference into pointer + QDataStream* sigval1 = &out_ret; + + bool callback_return_value = miqt_exec_callback_QIconEngine_Write(const_cast(this), handle__Write, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Write(QDataStream* out) const { + + return QIconEngine::write(*out); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AvailableSizes = 0; + + // Subclass to allow providing a Go implementation + virtual QList availableSizes(QIcon::Mode mode, QIcon::State state) override { + if (handle__AvailableSizes == 0) { + return QIconEngine::availableSizes(mode, state); + } + + QIcon::Mode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + QIcon::State state_ret = state; + int sigval2 = static_cast(state_ret); + + struct miqt_array /* of QSize* */ callback_return_value = miqt_exec_callback_QIconEngine_AvailableSizes(this, handle__AvailableSizes, sigval1, sigval2); + QList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QSize** 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 QSize* */ virtualbase_AvailableSizes(int mode, int state) { + + QList _ret = QIconEngine::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; + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IconName = 0; + + // Subclass to allow providing a Go implementation + virtual QString iconName() override { + if (handle__IconName == 0) { + return QIconEngine::iconName(); + } + + + struct miqt_string callback_return_value = miqt_exec_callback_QIconEngine_IconName(this, handle__IconName); + 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_IconName() { + + QString _ret = QIconEngine::iconName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 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__IsNull = 0; + + // Subclass to allow providing a Go implementation + virtual bool isNull() override { + if (handle__IsNull == 0) { + return QIconEngine::isNull(); + } + + + bool callback_return_value = miqt_exec_callback_QIconEngine_IsNull(this, handle__IsNull); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsNull() { + + return QIconEngine::isNull(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScaledPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual QPixmap scaledPixmap(const QSize& size, QIcon::Mode mode, QIcon::State state, qreal scale) override { + if (handle__ScaledPixmap == 0) { + return QIconEngine::scaledPixmap(size, mode, state, scale); + } + + const QSize& size_ret = size; + // Cast returned reference into pointer + QSize* sigval1 = const_cast(&size_ret); + QIcon::Mode mode_ret = mode; + int sigval2 = static_cast(mode_ret); + QIcon::State state_ret = state; + int sigval3 = static_cast(state_ret); + qreal scale_ret = scale; + double sigval4 = static_cast(scale_ret); + + QPixmap* callback_return_value = miqt_exec_callback_QIconEngine_ScaledPixmap(this, handle__ScaledPixmap, sigval1, sigval2, sigval3, sigval4); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPixmap* virtualbase_ScaledPixmap(QSize* size, int mode, int state, double scale) { + + return new QPixmap(QIconEngine::scaledPixmap(*size, static_cast(mode), static_cast(state), static_cast(scale))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__VirtualHook = 0; + + // Subclass to allow providing a Go implementation + virtual void virtual_hook(int id, void* data) override { + if (handle__VirtualHook == 0) { + QIconEngine::virtual_hook(id, data); + return; + } + + int sigval1 = id; + void* sigval2 = data; + + miqt_exec_callback_QIconEngine_VirtualHook(this, handle__VirtualHook, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_VirtualHook(int id, void* data) { + + QIconEngine::virtual_hook(static_cast(id), data); + + } + +}; + +void QIconEngine_new(QIconEngine** outptr_QIconEngine) { + MiqtVirtualQIconEngine* ret = new MiqtVirtualQIconEngine(); + *outptr_QIconEngine = ret; +} + void QIconEngine_Paint(QIconEngine* self, QPainter* painter, QRect* rect, int mode, int state) { self->paint(painter, *rect, static_cast(mode), static_cast(state)); } @@ -93,9 +501,113 @@ void QIconEngine_VirtualHook(QIconEngine* self, int id, void* data) { self->virtual_hook(static_cast(id), data); } +void QIconEngine_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__Paint = slot; +} + +void QIconEngine_override_virtual_ActualSize(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__ActualSize = slot; +} + +QSize* QIconEngine_virtualbase_ActualSize(void* self, QSize* size, int mode, int state) { + return ( (MiqtVirtualQIconEngine*)(self) )->virtualbase_ActualSize(size, mode, state); +} + +void QIconEngine_override_virtual_Pixmap(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__Pixmap = slot; +} + +QPixmap* QIconEngine_virtualbase_Pixmap(void* self, QSize* size, int mode, int state) { + return ( (MiqtVirtualQIconEngine*)(self) )->virtualbase_Pixmap(size, mode, state); +} + +void QIconEngine_override_virtual_AddPixmap(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__AddPixmap = slot; +} + +void QIconEngine_virtualbase_AddPixmap(void* self, QPixmap* pixmap, int mode, int state) { + ( (MiqtVirtualQIconEngine*)(self) )->virtualbase_AddPixmap(pixmap, mode, state); +} + +void QIconEngine_override_virtual_AddFile(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__AddFile = slot; +} + +void QIconEngine_virtualbase_AddFile(void* self, struct miqt_string fileName, QSize* size, int mode, int state) { + ( (MiqtVirtualQIconEngine*)(self) )->virtualbase_AddFile(fileName, size, mode, state); +} + +void QIconEngine_override_virtual_Key(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__Key = slot; +} + +struct miqt_string QIconEngine_virtualbase_Key(const void* self) { + return ( (const MiqtVirtualQIconEngine*)(self) )->virtualbase_Key(); +} + +void QIconEngine_override_virtual_Clone(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__Clone = slot; +} + +void QIconEngine_override_virtual_Read(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__Read = slot; +} + +bool QIconEngine_virtualbase_Read(void* self, QDataStream* in) { + return ( (MiqtVirtualQIconEngine*)(self) )->virtualbase_Read(in); +} + +void QIconEngine_override_virtual_Write(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__Write = slot; +} + +bool QIconEngine_virtualbase_Write(const void* self, QDataStream* out) { + return ( (const MiqtVirtualQIconEngine*)(self) )->virtualbase_Write(out); +} + +void QIconEngine_override_virtual_AvailableSizes(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__AvailableSizes = slot; +} + +struct miqt_array /* of QSize* */ QIconEngine_virtualbase_AvailableSizes(void* self, int mode, int state) { + return ( (MiqtVirtualQIconEngine*)(self) )->virtualbase_AvailableSizes(mode, state); +} + +void QIconEngine_override_virtual_IconName(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__IconName = slot; +} + +struct miqt_string QIconEngine_virtualbase_IconName(void* self) { + return ( (MiqtVirtualQIconEngine*)(self) )->virtualbase_IconName(); +} + +void QIconEngine_override_virtual_IsNull(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__IsNull = slot; +} + +bool QIconEngine_virtualbase_IsNull(void* self) { + return ( (MiqtVirtualQIconEngine*)(self) )->virtualbase_IsNull(); +} + +void QIconEngine_override_virtual_ScaledPixmap(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__ScaledPixmap = slot; +} + +QPixmap* QIconEngine_virtualbase_ScaledPixmap(void* self, QSize* size, int mode, int state, double scale) { + return ( (MiqtVirtualQIconEngine*)(self) )->virtualbase_ScaledPixmap(size, mode, state, scale); +} + +void QIconEngine_override_virtual_VirtualHook(void* self, intptr_t slot) { + dynamic_cast( (QIconEngine*)(self) )->handle__VirtualHook = slot; +} + +void QIconEngine_virtualbase_VirtualHook(void* self, int id, void* data) { + ( (MiqtVirtualQIconEngine*)(self) )->virtualbase_VirtualHook(id, data); +} + void QIconEngine_Delete(QIconEngine* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qiconengine.go b/qt6/gen_qiconengine.go index 0c39a676..40fdaf37 100644 --- a/qt6/gen_qiconengine.go +++ b/qt6/gen_qiconengine.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -56,6 +57,16 @@ func UnsafeNewQIconEngine(h unsafe.Pointer) *QIconEngine { return &QIconEngine{h: (*C.QIconEngine)(h)} } +// NewQIconEngine constructs a new QIconEngine object. +func NewQIconEngine() *QIconEngine { + var outptr_QIconEngine *C.QIconEngine = nil + + C.QIconEngine_new(&outptr_QIconEngine) + ret := newQIconEngine(outptr_QIconEngine) + ret.isSubclass = true + return ret +} + func (this *QIconEngine) Paint(painter *QPainter, rect *QRect, mode QIcon__Mode, state QIcon__State) { C.QIconEngine_Paint(this.h, painter.cPointer(), rect.cPointer(), (C.int)(mode), (C.int)(state)) } @@ -139,6 +150,393 @@ func (this *QIconEngine) ScaledPixmap(size *QSize, mode QIcon__Mode, state QIcon func (this *QIconEngine) VirtualHook(id int, data unsafe.Pointer) { C.QIconEngine_VirtualHook(this.h, (C.int)(id), data) } +func (this *QIconEngine) OnPaint(slot func(painter *QPainter, rect *QRect, mode QIcon__Mode, state QIcon__State)) { + C.QIconEngine_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_Paint +func miqt_exec_callback_QIconEngine_Paint(self *C.QIconEngine, cb C.intptr_t, painter *C.QPainter, rect *C.QRect, mode C.int, state C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(painter *QPainter, rect *QRect, mode QIcon__Mode, state QIcon__State)) + 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 := (QIcon__Mode)(mode) + + slotval4 := (QIcon__State)(state) + + gofunc(slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QIconEngine) callVirtualBase_ActualSize(size *QSize, mode QIcon__Mode, state QIcon__State) *QSize { + + _ret := C.QIconEngine_virtualbase_ActualSize(unsafe.Pointer(this.h), size.cPointer(), (C.int)(mode), (C.int)(state)) + _goptr := newQSize(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIconEngine) OnActualSize(slot func(super func(size *QSize, mode QIcon__Mode, state QIcon__State) *QSize, size *QSize, mode QIcon__Mode, state QIcon__State) *QSize) { + C.QIconEngine_override_virtual_ActualSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_ActualSize +func miqt_exec_callback_QIconEngine_ActualSize(self *C.QIconEngine, cb C.intptr_t, size *C.QSize, mode C.int, state C.int) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size *QSize, mode QIcon__Mode, state QIcon__State) *QSize, size *QSize, mode QIcon__Mode, state QIcon__State) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQSize(unsafe.Pointer(size)) + slotval2 := (QIcon__Mode)(mode) + + slotval3 := (QIcon__State)(state) + + virtualReturn := gofunc((&QIconEngine{h: self}).callVirtualBase_ActualSize, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QIconEngine) callVirtualBase_Pixmap(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap { + + _ret := C.QIconEngine_virtualbase_Pixmap(unsafe.Pointer(this.h), size.cPointer(), (C.int)(mode), (C.int)(state)) + _goptr := newQPixmap(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIconEngine) OnPixmap(slot func(super func(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap, size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap) { + C.QIconEngine_override_virtual_Pixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_Pixmap +func miqt_exec_callback_QIconEngine_Pixmap(self *C.QIconEngine, cb C.intptr_t, size *C.QSize, mode C.int, state C.int) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap, size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQSize(unsafe.Pointer(size)) + slotval2 := (QIcon__Mode)(mode) + + slotval3 := (QIcon__State)(state) + + virtualReturn := gofunc((&QIconEngine{h: self}).callVirtualBase_Pixmap, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QIconEngine) callVirtualBase_AddPixmap(pixmap *QPixmap, mode QIcon__Mode, state QIcon__State) { + + C.QIconEngine_virtualbase_AddPixmap(unsafe.Pointer(this.h), pixmap.cPointer(), (C.int)(mode), (C.int)(state)) + +} +func (this *QIconEngine) OnAddPixmap(slot func(super func(pixmap *QPixmap, mode QIcon__Mode, state QIcon__State), pixmap *QPixmap, mode QIcon__Mode, state QIcon__State)) { + C.QIconEngine_override_virtual_AddPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_AddPixmap +func miqt_exec_callback_QIconEngine_AddPixmap(self *C.QIconEngine, cb C.intptr_t, pixmap *C.QPixmap, mode C.int, state C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pixmap *QPixmap, mode QIcon__Mode, state QIcon__State), pixmap *QPixmap, mode QIcon__Mode, state QIcon__State)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + slotval2 := (QIcon__Mode)(mode) + + slotval3 := (QIcon__State)(state) + + gofunc((&QIconEngine{h: self}).callVirtualBase_AddPixmap, slotval1, slotval2, slotval3) + +} + +func (this *QIconEngine) callVirtualBase_AddFile(fileName string, size *QSize, mode QIcon__Mode, state QIcon__State) { + 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)) + + C.QIconEngine_virtualbase_AddFile(unsafe.Pointer(this.h), fileName_ms, size.cPointer(), (C.int)(mode), (C.int)(state)) + +} +func (this *QIconEngine) OnAddFile(slot func(super func(fileName string, size *QSize, mode QIcon__Mode, state QIcon__State), fileName string, size *QSize, mode QIcon__Mode, state QIcon__State)) { + C.QIconEngine_override_virtual_AddFile(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_AddFile +func miqt_exec_callback_QIconEngine_AddFile(self *C.QIconEngine, cb C.intptr_t, fileName C.struct_miqt_string, size *C.QSize, mode C.int, state C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(fileName string, size *QSize, mode QIcon__Mode, state QIcon__State), fileName string, size *QSize, mode QIcon__Mode, state QIcon__State)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var fileName_ms C.struct_miqt_string = fileName + fileName_ret := C.GoStringN(fileName_ms.data, C.int(int64(fileName_ms.len))) + C.free(unsafe.Pointer(fileName_ms.data)) + slotval1 := fileName_ret + slotval2 := UnsafeNewQSize(unsafe.Pointer(size)) + slotval3 := (QIcon__Mode)(mode) + + slotval4 := (QIcon__State)(state) + + gofunc((&QIconEngine{h: self}).callVirtualBase_AddFile, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QIconEngine) callVirtualBase_Key() string { + + var _ms C.struct_miqt_string = C.QIconEngine_virtualbase_Key(unsafe.Pointer(this.h)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QIconEngine) OnKey(slot func(super func() string) string) { + C.QIconEngine_override_virtual_Key(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_Key +func miqt_exec_callback_QIconEngine_Key(self *C.QIconEngine, 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((&QIconEngine{h: self}).callVirtualBase_Key) + 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 *QIconEngine) OnClone(slot func() *QIconEngine) { + C.QIconEngine_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_Clone +func miqt_exec_callback_QIconEngine_Clone(self *C.QIconEngine, cb C.intptr_t) *C.QIconEngine { + gofunc, ok := cgo.Handle(cb).Value().(func() *QIconEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} + +func (this *QIconEngine) callVirtualBase_Read(in *QDataStream) bool { + + return (bool)(C.QIconEngine_virtualbase_Read(unsafe.Pointer(this.h), in.cPointer())) + +} +func (this *QIconEngine) OnRead(slot func(super func(in *QDataStream) bool, in *QDataStream) bool) { + C.QIconEngine_override_virtual_Read(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_Read +func miqt_exec_callback_QIconEngine_Read(self *C.QIconEngine, cb C.intptr_t, in *C.QDataStream) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(in *QDataStream) bool, in *QDataStream) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(in), nil) + + virtualReturn := gofunc((&QIconEngine{h: self}).callVirtualBase_Read, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIconEngine) callVirtualBase_Write(out *QDataStream) bool { + + return (bool)(C.QIconEngine_virtualbase_Write(unsafe.Pointer(this.h), out.cPointer())) + +} +func (this *QIconEngine) OnWrite(slot func(super func(out *QDataStream) bool, out *QDataStream) bool) { + C.QIconEngine_override_virtual_Write(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_Write +func miqt_exec_callback_QIconEngine_Write(self *C.QIconEngine, cb C.intptr_t, out *C.QDataStream) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(out *QDataStream) bool, out *QDataStream) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQDataStream(unsafe.Pointer(out), nil) + + virtualReturn := gofunc((&QIconEngine{h: self}).callVirtualBase_Write, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIconEngine) callVirtualBase_AvailableSizes(mode QIcon__Mode, state QIcon__State) []QSize { + + var _ma C.struct_miqt_array = C.QIconEngine_virtualbase_AvailableSizes(unsafe.Pointer(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 + +} +func (this *QIconEngine) OnAvailableSizes(slot func(super func(mode QIcon__Mode, state QIcon__State) []QSize, mode QIcon__Mode, state QIcon__State) []QSize) { + C.QIconEngine_override_virtual_AvailableSizes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_AvailableSizes +func miqt_exec_callback_QIconEngine_AvailableSizes(self *C.QIconEngine, cb C.intptr_t, mode C.int, state C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(mode QIcon__Mode, state QIcon__State) []QSize, mode QIcon__Mode, state QIcon__State) []QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QIcon__Mode)(mode) + + slotval2 := (QIcon__State)(state) + + virtualReturn := gofunc((&QIconEngine{h: self}).callVirtualBase_AvailableSizes, slotval1, slotval2) + virtualReturn_CArray := (*[0xffff]*C.QSize)(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 *QIconEngine) callVirtualBase_IconName() string { + + var _ms C.struct_miqt_string = C.QIconEngine_virtualbase_IconName(unsafe.Pointer(this.h)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QIconEngine) OnIconName(slot func(super func() string) string) { + C.QIconEngine_override_virtual_IconName(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_IconName +func miqt_exec_callback_QIconEngine_IconName(self *C.QIconEngine, 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((&QIconEngine{h: self}).callVirtualBase_IconName) + 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 *QIconEngine) callVirtualBase_IsNull() bool { + + return (bool)(C.QIconEngine_virtualbase_IsNull(unsafe.Pointer(this.h))) + +} +func (this *QIconEngine) OnIsNull(slot func(super func() bool) bool) { + C.QIconEngine_override_virtual_IsNull(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_IsNull +func miqt_exec_callback_QIconEngine_IsNull(self *C.QIconEngine, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIconEngine{h: self}).callVirtualBase_IsNull) + + return (C.bool)(virtualReturn) + +} + +func (this *QIconEngine) callVirtualBase_ScaledPixmap(size *QSize, mode QIcon__Mode, state QIcon__State, scale float64) *QPixmap { + + _ret := C.QIconEngine_virtualbase_ScaledPixmap(unsafe.Pointer(this.h), size.cPointer(), (C.int)(mode), (C.int)(state), (C.double)(scale)) + _goptr := newQPixmap(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIconEngine) OnScaledPixmap(slot func(super func(size *QSize, mode QIcon__Mode, state QIcon__State, scale float64) *QPixmap, size *QSize, mode QIcon__Mode, state QIcon__State, scale float64) *QPixmap) { + C.QIconEngine_override_virtual_ScaledPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_ScaledPixmap +func miqt_exec_callback_QIconEngine_ScaledPixmap(self *C.QIconEngine, cb C.intptr_t, size *C.QSize, mode C.int, state C.int, scale C.double) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size *QSize, mode QIcon__Mode, state QIcon__State, scale float64) *QPixmap, size *QSize, mode QIcon__Mode, state QIcon__State, scale float64) *QPixmap) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQSize(unsafe.Pointer(size)) + slotval2 := (QIcon__Mode)(mode) + + slotval3 := (QIcon__State)(state) + + slotval4 := (float64)(scale) + + virtualReturn := gofunc((&QIconEngine{h: self}).callVirtualBase_ScaledPixmap, slotval1, slotval2, slotval3, slotval4) + + return virtualReturn.cPointer() + +} + +func (this *QIconEngine) callVirtualBase_VirtualHook(id int, data unsafe.Pointer) { + + C.QIconEngine_virtualbase_VirtualHook(unsafe.Pointer(this.h), (C.int)(id), data) + +} +func (this *QIconEngine) OnVirtualHook(slot func(super func(id int, data unsafe.Pointer), id int, data unsafe.Pointer)) { + C.QIconEngine_override_virtual_VirtualHook(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEngine_VirtualHook +func miqt_exec_callback_QIconEngine_VirtualHook(self *C.QIconEngine, cb C.intptr_t, id C.int, data unsafe.Pointer) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(id int, data unsafe.Pointer), id int, data unsafe.Pointer)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(id) + + slotval2 := (unsafe.Pointer)(data) + + gofunc((&QIconEngine{h: self}).callVirtualBase_VirtualHook, slotval1, slotval2) + +} // Delete this object from C++ memory. func (this *QIconEngine) Delete() { diff --git a/qt6/gen_qiconengine.h b/qt6/gen_qiconengine.h index d8177041..eb54a82e 100644 --- a/qt6/gen_qiconengine.h +++ b/qt6/gen_qiconengine.h @@ -36,6 +36,7 @@ typedef struct QRect QRect; typedef struct QSize QSize; #endif +void QIconEngine_new(QIconEngine** outptr_QIconEngine); void QIconEngine_Paint(QIconEngine* self, QPainter* painter, QRect* rect, int mode, int state); QSize* QIconEngine_ActualSize(QIconEngine* self, QSize* size, int mode, int state); QPixmap* QIconEngine_Pixmap(QIconEngine* self, QSize* size, int mode, int state); @@ -50,6 +51,34 @@ 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); +void QIconEngine_override_virtual_Paint(void* self, intptr_t slot); +void QIconEngine_virtualbase_Paint(void* self, QPainter* painter, QRect* rect, int mode, int state); +void QIconEngine_override_virtual_ActualSize(void* self, intptr_t slot); +QSize* QIconEngine_virtualbase_ActualSize(void* self, QSize* size, int mode, int state); +void QIconEngine_override_virtual_Pixmap(void* self, intptr_t slot); +QPixmap* QIconEngine_virtualbase_Pixmap(void* self, QSize* size, int mode, int state); +void QIconEngine_override_virtual_AddPixmap(void* self, intptr_t slot); +void QIconEngine_virtualbase_AddPixmap(void* self, QPixmap* pixmap, int mode, int state); +void QIconEngine_override_virtual_AddFile(void* self, intptr_t slot); +void QIconEngine_virtualbase_AddFile(void* self, struct miqt_string fileName, QSize* size, int mode, int state); +void QIconEngine_override_virtual_Key(void* self, intptr_t slot); +struct miqt_string QIconEngine_virtualbase_Key(const void* self); +void QIconEngine_override_virtual_Clone(void* self, intptr_t slot); +QIconEngine* QIconEngine_virtualbase_Clone(const void* self); +void QIconEngine_override_virtual_Read(void* self, intptr_t slot); +bool QIconEngine_virtualbase_Read(void* self, QDataStream* in); +void QIconEngine_override_virtual_Write(void* self, intptr_t slot); +bool QIconEngine_virtualbase_Write(const void* self, QDataStream* out); +void QIconEngine_override_virtual_AvailableSizes(void* self, intptr_t slot); +struct miqt_array /* of QSize* */ QIconEngine_virtualbase_AvailableSizes(void* self, int mode, int state); +void QIconEngine_override_virtual_IconName(void* self, intptr_t slot); +struct miqt_string QIconEngine_virtualbase_IconName(void* self); +void QIconEngine_override_virtual_IsNull(void* self, intptr_t slot); +bool QIconEngine_virtualbase_IsNull(void* self); +void QIconEngine_override_virtual_ScaledPixmap(void* self, intptr_t slot); +QPixmap* QIconEngine_virtualbase_ScaledPixmap(void* self, QSize* size, int mode, int state, double scale); +void QIconEngine_override_virtual_VirtualHook(void* self, intptr_t slot); +void QIconEngine_virtualbase_VirtualHook(void* self, int id, void* data); void QIconEngine_Delete(QIconEngine* self, bool isSubclass); void QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1, QIconEngine__ScaledPixmapArgument** outptr_QIconEngine__ScaledPixmapArgument); diff --git a/qt6/gen_qiconengineplugin.cpp b/qt6/gen_qiconengineplugin.cpp index f5f1f618..0ffa14d3 100644 --- a/qt6/gen_qiconengineplugin.cpp +++ b/qt6/gen_qiconengineplugin.cpp @@ -1,14 +1,234 @@ +#include +#include #include #include +#include #include #include #include #include #include +#include #include #include "gen_qiconengineplugin.h" #include "_cgo_export.h" +class MiqtVirtualQIconEnginePlugin : public virtual QIconEnginePlugin { +public: + + MiqtVirtualQIconEnginePlugin(): QIconEnginePlugin() {}; + MiqtVirtualQIconEnginePlugin(QObject* parent): QIconEnginePlugin(parent) {}; + + virtual ~MiqtVirtualQIconEnginePlugin() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Create = 0; + + // Subclass to allow providing a Go implementation + virtual QIconEngine* create(const QString& filename) override { + if (handle__Create == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + const QString filename_ret = filename; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray filename_b = filename_ret.toUtf8(); + struct miqt_string filename_ms; + filename_ms.len = filename_b.length(); + filename_ms.data = static_cast(malloc(filename_ms.len)); + memcpy(filename_ms.data, filename_b.data(), filename_ms.len); + struct miqt_string sigval1 = filename_ms; + + QIconEngine* callback_return_value = miqt_exec_callback_QIconEnginePlugin_Create(this, handle__Create, sigval1); + + return callback_return_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 QIconEnginePlugin::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QIconEnginePlugin_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QIconEnginePlugin::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 QIconEnginePlugin::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QIconEnginePlugin_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QIconEnginePlugin::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) { + QIconEnginePlugin::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QIconEnginePlugin_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QIconEnginePlugin::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) { + QIconEnginePlugin::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QIconEnginePlugin_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QIconEnginePlugin::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) { + QIconEnginePlugin::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QIconEnginePlugin_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QIconEnginePlugin::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) { + QIconEnginePlugin::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QIconEnginePlugin_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QIconEnginePlugin::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) { + QIconEnginePlugin::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QIconEnginePlugin_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QIconEnginePlugin::disconnectNotify(*signal); + + } + +}; + +void QIconEnginePlugin_new(QIconEnginePlugin** outptr_QIconEnginePlugin, QObject** outptr_QObject) { + MiqtVirtualQIconEnginePlugin* ret = new MiqtVirtualQIconEnginePlugin(); + *outptr_QIconEnginePlugin = ret; + *outptr_QObject = static_cast(ret); +} + +void QIconEnginePlugin_new2(QObject* parent, QIconEnginePlugin** outptr_QIconEnginePlugin, QObject** outptr_QObject) { + MiqtVirtualQIconEnginePlugin* ret = new MiqtVirtualQIconEnginePlugin(parent); + *outptr_QIconEnginePlugin = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QIconEnginePlugin_MetaObject(const QIconEnginePlugin* self) { return (QMetaObject*) self->metaObject(); } @@ -55,9 +275,69 @@ struct miqt_string QIconEnginePlugin_Tr3(const char* s, const char* c, int n) { return _ms; } +void QIconEnginePlugin_override_virtual_Create(void* self, intptr_t slot) { + dynamic_cast( (QIconEnginePlugin*)(self) )->handle__Create = slot; +} + +void QIconEnginePlugin_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QIconEnginePlugin*)(self) )->handle__Event = slot; +} + +bool QIconEnginePlugin_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQIconEnginePlugin*)(self) )->virtualbase_Event(event); +} + +void QIconEnginePlugin_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QIconEnginePlugin*)(self) )->handle__EventFilter = slot; +} + +bool QIconEnginePlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQIconEnginePlugin*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QIconEnginePlugin_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QIconEnginePlugin*)(self) )->handle__TimerEvent = slot; +} + +void QIconEnginePlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQIconEnginePlugin*)(self) )->virtualbase_TimerEvent(event); +} + +void QIconEnginePlugin_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QIconEnginePlugin*)(self) )->handle__ChildEvent = slot; +} + +void QIconEnginePlugin_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQIconEnginePlugin*)(self) )->virtualbase_ChildEvent(event); +} + +void QIconEnginePlugin_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QIconEnginePlugin*)(self) )->handle__CustomEvent = slot; +} + +void QIconEnginePlugin_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQIconEnginePlugin*)(self) )->virtualbase_CustomEvent(event); +} + +void QIconEnginePlugin_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QIconEnginePlugin*)(self) )->handle__ConnectNotify = slot; +} + +void QIconEnginePlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQIconEnginePlugin*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QIconEnginePlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QIconEnginePlugin*)(self) )->handle__DisconnectNotify = slot; +} + +void QIconEnginePlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQIconEnginePlugin*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QIconEnginePlugin_Delete(QIconEnginePlugin* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qiconengineplugin.go b/qt6/gen_qiconengineplugin.go index f32108aa..ff31d1f8 100644 --- a/qt6/gen_qiconengineplugin.go +++ b/qt6/gen_qiconengineplugin.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,28 @@ func UnsafeNewQIconEnginePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QIc QObject: UnsafeNewQObject(h_QObject)} } +// NewQIconEnginePlugin constructs a new QIconEnginePlugin object. +func NewQIconEnginePlugin() *QIconEnginePlugin { + var outptr_QIconEnginePlugin *C.QIconEnginePlugin = nil + var outptr_QObject *C.QObject = nil + + C.QIconEnginePlugin_new(&outptr_QIconEnginePlugin, &outptr_QObject) + ret := newQIconEnginePlugin(outptr_QIconEnginePlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQIconEnginePlugin2 constructs a new QIconEnginePlugin object. +func NewQIconEnginePlugin2(parent *QObject) *QIconEnginePlugin { + var outptr_QIconEnginePlugin *C.QIconEnginePlugin = nil + var outptr_QObject *C.QObject = nil + + C.QIconEnginePlugin_new2(parent.cPointer(), &outptr_QIconEnginePlugin, &outptr_QObject) + ret := newQIconEnginePlugin(outptr_QIconEnginePlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QIconEnginePlugin) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QIconEnginePlugin_MetaObject(this.h))) } @@ -100,6 +123,194 @@ func QIconEnginePlugin_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QIconEnginePlugin) OnCreate(slot func(filename string) *QIconEngine) { + C.QIconEnginePlugin_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEnginePlugin_Create +func miqt_exec_callback_QIconEnginePlugin_Create(self *C.QIconEnginePlugin, cb C.intptr_t, filename C.struct_miqt_string) *C.QIconEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(filename string) *QIconEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var filename_ms C.struct_miqt_string = filename + filename_ret := C.GoStringN(filename_ms.data, C.int(int64(filename_ms.len))) + C.free(unsafe.Pointer(filename_ms.data)) + slotval1 := filename_ret + + virtualReturn := gofunc(slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QIconEnginePlugin) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QIconEnginePlugin_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QIconEnginePlugin) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QIconEnginePlugin_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEnginePlugin_Event +func miqt_exec_callback_QIconEnginePlugin_Event(self *C.QIconEnginePlugin, 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((&QIconEnginePlugin{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIconEnginePlugin) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QIconEnginePlugin_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QIconEnginePlugin) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QIconEnginePlugin_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEnginePlugin_EventFilter +func miqt_exec_callback_QIconEnginePlugin_EventFilter(self *C.QIconEnginePlugin, 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((&QIconEnginePlugin{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QIconEnginePlugin) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QIconEnginePlugin_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QIconEnginePlugin) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QIconEnginePlugin_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEnginePlugin_TimerEvent +func miqt_exec_callback_QIconEnginePlugin_TimerEvent(self *C.QIconEnginePlugin, 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((&QIconEnginePlugin{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QIconEnginePlugin) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QIconEnginePlugin_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QIconEnginePlugin) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QIconEnginePlugin_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEnginePlugin_ChildEvent +func miqt_exec_callback_QIconEnginePlugin_ChildEvent(self *C.QIconEnginePlugin, 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((&QIconEnginePlugin{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QIconEnginePlugin) callVirtualBase_CustomEvent(event *QEvent) { + + C.QIconEnginePlugin_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QIconEnginePlugin) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QIconEnginePlugin_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEnginePlugin_CustomEvent +func miqt_exec_callback_QIconEnginePlugin_CustomEvent(self *C.QIconEnginePlugin, 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((&QIconEnginePlugin{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QIconEnginePlugin) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QIconEnginePlugin_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QIconEnginePlugin) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QIconEnginePlugin_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEnginePlugin_ConnectNotify +func miqt_exec_callback_QIconEnginePlugin_ConnectNotify(self *C.QIconEnginePlugin, 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((&QIconEnginePlugin{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QIconEnginePlugin) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QIconEnginePlugin_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QIconEnginePlugin) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QIconEnginePlugin_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIconEnginePlugin_DisconnectNotify +func miqt_exec_callback_QIconEnginePlugin_DisconnectNotify(self *C.QIconEnginePlugin, 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((&QIconEnginePlugin{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QIconEnginePlugin) Delete() { diff --git a/qt6/gen_qiconengineplugin.h b/qt6/gen_qiconengineplugin.h index 1deef096..7acea96f 100644 --- a/qt6/gen_qiconengineplugin.h +++ b/qt6/gen_qiconengineplugin.h @@ -15,23 +15,49 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; class QIconEngine; class QIconEnginePlugin; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIconEngine QIconEngine; typedef struct QIconEnginePlugin QIconEnginePlugin; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif +void QIconEnginePlugin_new(QIconEnginePlugin** outptr_QIconEnginePlugin, QObject** outptr_QObject); +void QIconEnginePlugin_new2(QObject* parent, QIconEnginePlugin** outptr_QIconEnginePlugin, QObject** outptr_QObject); 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, 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); +void QIconEnginePlugin_override_virtual_Create(void* self, intptr_t slot); +QIconEngine* QIconEnginePlugin_virtualbase_Create(void* self, struct miqt_string filename); +void QIconEnginePlugin_override_virtual_Event(void* self, intptr_t slot); +bool QIconEnginePlugin_virtualbase_Event(void* self, QEvent* event); +void QIconEnginePlugin_override_virtual_EventFilter(void* self, intptr_t slot); +bool QIconEnginePlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QIconEnginePlugin_override_virtual_TimerEvent(void* self, intptr_t slot); +void QIconEnginePlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QIconEnginePlugin_override_virtual_ChildEvent(void* self, intptr_t slot); +void QIconEnginePlugin_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QIconEnginePlugin_override_virtual_CustomEvent(void* self, intptr_t slot); +void QIconEnginePlugin_virtualbase_CustomEvent(void* self, QEvent* event); +void QIconEnginePlugin_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QIconEnginePlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QIconEnginePlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QIconEnginePlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QIconEnginePlugin_Delete(QIconEnginePlugin* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qidentityproxymodel.cpp b/qt6/gen_qidentityproxymodel.cpp index 1b3d73d1..c6589f45 100644 --- a/qt6/gen_qidentityproxymodel.cpp +++ b/qt6/gen_qidentityproxymodel.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -260,6 +261,56 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__MapSelectionFromSource = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelection mapSelectionFromSource(const QItemSelection& selection) const override { + if (handle__MapSelectionFromSource == 0) { + return QIdentityProxyModel::mapSelectionFromSource(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QItemSelection* callback_return_value = miqt_exec_callback_QIdentityProxyModel_MapSelectionFromSource(const_cast(this), handle__MapSelectionFromSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QItemSelection* virtualbase_MapSelectionFromSource(QItemSelection* selection) const { + + return new QItemSelection(QIdentityProxyModel::mapSelectionFromSource(*selection)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapSelectionToSource = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelection mapSelectionToSource(const QItemSelection& selection) const override { + if (handle__MapSelectionToSource == 0) { + return QIdentityProxyModel::mapSelectionToSource(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QItemSelection* callback_return_value = miqt_exec_callback_QIdentityProxyModel_MapSelectionToSource(const_cast(this), handle__MapSelectionToSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QItemSelection* virtualbase_MapSelectionToSource(QItemSelection* selection) const { + + return new QItemSelection(QIdentityProxyModel::mapSelectionToSource(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__Match = 0; @@ -1205,6 +1256,14 @@ QModelIndex* QIdentityProxyModel_Sibling(const QIdentityProxyModel* self, int ro return new QModelIndex(self->sibling(static_cast(row), static_cast(column), *idx)); } +QItemSelection* QIdentityProxyModel_MapSelectionFromSource(const QIdentityProxyModel* self, QItemSelection* selection) { + return new QItemSelection(self->mapSelectionFromSource(*selection)); +} + +QItemSelection* QIdentityProxyModel_MapSelectionToSource(const QIdentityProxyModel* self, QItemSelection* selection) { + return new QItemSelection(self->mapSelectionToSource(*selection)); +} + 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 @@ -1340,6 +1399,22 @@ QModelIndex* QIdentityProxyModel_virtualbase_Sibling(const void* self, int row, return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_Sibling(row, column, idx); } +void QIdentityProxyModel_override_virtual_MapSelectionFromSource(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__MapSelectionFromSource = slot; +} + +QItemSelection* QIdentityProxyModel_virtualbase_MapSelectionFromSource(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_MapSelectionFromSource(selection); +} + +void QIdentityProxyModel_override_virtual_MapSelectionToSource(void* self, intptr_t slot) { + dynamic_cast( (QIdentityProxyModel*)(self) )->handle__MapSelectionToSource = slot; +} + +QItemSelection* QIdentityProxyModel_virtualbase_MapSelectionToSource(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQIdentityProxyModel*)(self) )->virtualbase_MapSelectionToSource(selection); +} + void QIdentityProxyModel_override_virtual_Match(void* self, intptr_t slot) { dynamic_cast( (QIdentityProxyModel*)(self) )->handle__Match = slot; } diff --git a/qt6/gen_qidentityproxymodel.go b/qt6/gen_qidentityproxymodel.go index 87e88757..5bf47f8b 100644 --- a/qt6/gen_qidentityproxymodel.go +++ b/qt6/gen_qidentityproxymodel.go @@ -152,6 +152,20 @@ func (this *QIdentityProxyModel) Sibling(row int, column int, idx *QModelIndex) return _goptr } +func (this *QIdentityProxyModel) MapSelectionFromSource(selection *QItemSelection) *QItemSelection { + _ret := C.QIdentityProxyModel_MapSelectionFromSource(this.h, selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QIdentityProxyModel) MapSelectionToSource(selection *QItemSelection) *QItemSelection { + _ret := C.QIdentityProxyModel_MapSelectionToSource(this.h, selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + 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)) @@ -477,6 +491,62 @@ func miqt_exec_callback_QIdentityProxyModel_Sibling(self *C.QIdentityProxyModel, } +func (this *QIdentityProxyModel) callVirtualBase_MapSelectionFromSource(selection *QItemSelection) *QItemSelection { + + _ret := C.QIdentityProxyModel_virtualbase_MapSelectionFromSource(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnMapSelectionFromSource(slot func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) { + C.QIdentityProxyModel_override_virtual_MapSelectionFromSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_MapSelectionFromSource +func miqt_exec_callback_QIdentityProxyModel_MapSelectionFromSource(self *C.QIdentityProxyModel, cb C.intptr_t, selection *C.QItemSelection) *C.QItemSelection { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_MapSelectionFromSource, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QIdentityProxyModel) callVirtualBase_MapSelectionToSource(selection *QItemSelection) *QItemSelection { + + _ret := C.QIdentityProxyModel_virtualbase_MapSelectionToSource(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QIdentityProxyModel) OnMapSelectionToSource(slot func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) { + C.QIdentityProxyModel_override_virtual_MapSelectionToSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIdentityProxyModel_MapSelectionToSource +func miqt_exec_callback_QIdentityProxyModel_MapSelectionToSource(self *C.QIdentityProxyModel, cb C.intptr_t, selection *C.QItemSelection) *C.QItemSelection { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_MapSelectionToSource, slotval1) + + 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)) diff --git a/qt6/gen_qidentityproxymodel.h b/qt6/gen_qidentityproxymodel.h index b282558a..7412676a 100644 --- a/qt6/gen_qidentityproxymodel.h +++ b/qt6/gen_qidentityproxymodel.h @@ -19,6 +19,7 @@ class QAbstractItemModel; class QAbstractProxyModel; class QByteArray; class QIdentityProxyModel; +class QItemSelection; class QMetaObject; class QMimeData; class QModelIndex; @@ -30,6 +31,7 @@ typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractProxyModel QAbstractProxyModel; typedef struct QByteArray QByteArray; typedef struct QIdentityProxyModel QIdentityProxyModel; +typedef struct QItemSelection QItemSelection; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; @@ -52,6 +54,8 @@ int QIdentityProxyModel_RowCount(const QIdentityProxyModel* self, QModelIndex* p 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); +QItemSelection* QIdentityProxyModel_MapSelectionFromSource(const QIdentityProxyModel* self, QItemSelection* selection); +QItemSelection* QIdentityProxyModel_MapSelectionToSource(const QIdentityProxyModel* self, QItemSelection* selection); 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, QModelIndex* parent); @@ -80,6 +84,10 @@ 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_MapSelectionFromSource(void* self, intptr_t slot); +QItemSelection* QIdentityProxyModel_virtualbase_MapSelectionFromSource(const void* self, QItemSelection* selection); +void QIdentityProxyModel_override_virtual_MapSelectionToSource(void* self, intptr_t slot); +QItemSelection* QIdentityProxyModel_virtualbase_MapSelectionToSource(const void* self, QItemSelection* selection); 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); diff --git a/qt6/gen_qimageiohandler.cpp b/qt6/gen_qimageiohandler.cpp index 4e8c39b6..122de1e9 100644 --- a/qt6/gen_qimageiohandler.cpp +++ b/qt6/gen_qimageiohandler.cpp @@ -1,8 +1,11 @@ #include +#include +#include #include #include #include #include +#include #include #include #include @@ -10,11 +13,313 @@ #include #include #include +#include #include #include #include "gen_qimageiohandler.h" #include "_cgo_export.h" +class MiqtVirtualQImageIOHandler : public virtual QImageIOHandler { +public: + + MiqtVirtualQImageIOHandler(): QImageIOHandler() {}; + + virtual ~MiqtVirtualQImageIOHandler() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__CanRead = 0; + + // Subclass to allow providing a Go implementation + virtual bool canRead() const override { + if (handle__CanRead == 0) { + return false; // Pure virtual, there is no base we can call + } + + + bool callback_return_value = miqt_exec_callback_QImageIOHandler_CanRead(const_cast(this), handle__CanRead); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Read = 0; + + // Subclass to allow providing a Go implementation + virtual bool read(QImage* image) override { + if (handle__Read == 0) { + return false; // Pure virtual, there is no base we can call + } + + QImage* sigval1 = image; + + bool callback_return_value = miqt_exec_callback_QImageIOHandler_Read(this, handle__Read, sigval1); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Write = 0; + + // Subclass to allow providing a Go implementation + virtual bool write(const QImage& image) override { + if (handle__Write == 0) { + return QImageIOHandler::write(image); + } + + const QImage& image_ret = image; + // Cast returned reference into pointer + QImage* sigval1 = const_cast(&image_ret); + + bool callback_return_value = miqt_exec_callback_QImageIOHandler_Write(this, handle__Write, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Write(QImage* image) { + + return QImageIOHandler::write(*image); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Option = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant option(QImageIOHandler::ImageOption option) const override { + if (handle__Option == 0) { + return QImageIOHandler::option(option); + } + + QImageIOHandler::ImageOption option_ret = option; + int sigval1 = static_cast(option_ret); + + QVariant* callback_return_value = miqt_exec_callback_QImageIOHandler_Option(const_cast(this), handle__Option, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Option(int option) const { + + return new QVariant(QImageIOHandler::option(static_cast(option))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetOption = 0; + + // Subclass to allow providing a Go implementation + virtual void setOption(QImageIOHandler::ImageOption option, const QVariant& value) override { + if (handle__SetOption == 0) { + QImageIOHandler::setOption(option, value); + return; + } + + QImageIOHandler::ImageOption 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_QImageIOHandler_SetOption(this, handle__SetOption, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetOption(int option, QVariant* value) { + + QImageIOHandler::setOption(static_cast(option), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsOption = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsOption(QImageIOHandler::ImageOption option) const override { + if (handle__SupportsOption == 0) { + return QImageIOHandler::supportsOption(option); + } + + QImageIOHandler::ImageOption option_ret = option; + int sigval1 = static_cast(option_ret); + + bool callback_return_value = miqt_exec_callback_QImageIOHandler_SupportsOption(const_cast(this), handle__SupportsOption, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsOption(int option) const { + + return QImageIOHandler::supportsOption(static_cast(option)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__JumpToNextImage = 0; + + // Subclass to allow providing a Go implementation + virtual bool jumpToNextImage() override { + if (handle__JumpToNextImage == 0) { + return QImageIOHandler::jumpToNextImage(); + } + + + bool callback_return_value = miqt_exec_callback_QImageIOHandler_JumpToNextImage(this, handle__JumpToNextImage); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_JumpToNextImage() { + + return QImageIOHandler::jumpToNextImage(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__JumpToImage = 0; + + // Subclass to allow providing a Go implementation + virtual bool jumpToImage(int imageNumber) override { + if (handle__JumpToImage == 0) { + return QImageIOHandler::jumpToImage(imageNumber); + } + + int sigval1 = imageNumber; + + bool callback_return_value = miqt_exec_callback_QImageIOHandler_JumpToImage(this, handle__JumpToImage, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_JumpToImage(int imageNumber) { + + return QImageIOHandler::jumpToImage(static_cast(imageNumber)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__LoopCount = 0; + + // Subclass to allow providing a Go implementation + virtual int loopCount() const override { + if (handle__LoopCount == 0) { + return QImageIOHandler::loopCount(); + } + + + int callback_return_value = miqt_exec_callback_QImageIOHandler_LoopCount(const_cast(this), handle__LoopCount); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_LoopCount() const { + + return QImageIOHandler::loopCount(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ImageCount = 0; + + // Subclass to allow providing a Go implementation + virtual int imageCount() const override { + if (handle__ImageCount == 0) { + return QImageIOHandler::imageCount(); + } + + + int callback_return_value = miqt_exec_callback_QImageIOHandler_ImageCount(const_cast(this), handle__ImageCount); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_ImageCount() const { + + return QImageIOHandler::imageCount(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NextImageDelay = 0; + + // Subclass to allow providing a Go implementation + virtual int nextImageDelay() const override { + if (handle__NextImageDelay == 0) { + return QImageIOHandler::nextImageDelay(); + } + + + int callback_return_value = miqt_exec_callback_QImageIOHandler_NextImageDelay(const_cast(this), handle__NextImageDelay); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_NextImageDelay() const { + + return QImageIOHandler::nextImageDelay(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentImageNumber = 0; + + // Subclass to allow providing a Go implementation + virtual int currentImageNumber() const override { + if (handle__CurrentImageNumber == 0) { + return QImageIOHandler::currentImageNumber(); + } + + + int callback_return_value = miqt_exec_callback_QImageIOHandler_CurrentImageNumber(const_cast(this), handle__CurrentImageNumber); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_CurrentImageNumber() const { + + return QImageIOHandler::currentImageNumber(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CurrentImageRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect currentImageRect() const override { + if (handle__CurrentImageRect == 0) { + return QImageIOHandler::currentImageRect(); + } + + + QRect* callback_return_value = miqt_exec_callback_QImageIOHandler_CurrentImageRect(const_cast(this), handle__CurrentImageRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_CurrentImageRect() const { + + return new QRect(QImageIOHandler::currentImageRect()); + + } + +}; + +void QImageIOHandler_new(QImageIOHandler** outptr_QImageIOHandler) { + MiqtVirtualQImageIOHandler* ret = new MiqtVirtualQImageIOHandler(); + *outptr_QImageIOHandler = ret; +} + void QImageIOHandler_SetDevice(QImageIOHandler* self, QIODevice* device) { self->setDevice(device); } @@ -98,14 +403,347 @@ bool QImageIOHandler_AllocateImage(QSize* size, int format, QImage* image) { return QImageIOHandler::allocateImage(*size, static_cast(format), image); } +void QImageIOHandler_override_virtual_CanRead(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__CanRead = slot; +} + +void QImageIOHandler_override_virtual_Read(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__Read = slot; +} + +void QImageIOHandler_override_virtual_Write(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__Write = slot; +} + +bool QImageIOHandler_virtualbase_Write(void* self, QImage* image) { + return ( (MiqtVirtualQImageIOHandler*)(self) )->virtualbase_Write(image); +} + +void QImageIOHandler_override_virtual_Option(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__Option = slot; +} + +QVariant* QImageIOHandler_virtualbase_Option(const void* self, int option) { + return ( (const MiqtVirtualQImageIOHandler*)(self) )->virtualbase_Option(option); +} + +void QImageIOHandler_override_virtual_SetOption(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__SetOption = slot; +} + +void QImageIOHandler_virtualbase_SetOption(void* self, int option, QVariant* value) { + ( (MiqtVirtualQImageIOHandler*)(self) )->virtualbase_SetOption(option, value); +} + +void QImageIOHandler_override_virtual_SupportsOption(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__SupportsOption = slot; +} + +bool QImageIOHandler_virtualbase_SupportsOption(const void* self, int option) { + return ( (const MiqtVirtualQImageIOHandler*)(self) )->virtualbase_SupportsOption(option); +} + +void QImageIOHandler_override_virtual_JumpToNextImage(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__JumpToNextImage = slot; +} + +bool QImageIOHandler_virtualbase_JumpToNextImage(void* self) { + return ( (MiqtVirtualQImageIOHandler*)(self) )->virtualbase_JumpToNextImage(); +} + +void QImageIOHandler_override_virtual_JumpToImage(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__JumpToImage = slot; +} + +bool QImageIOHandler_virtualbase_JumpToImage(void* self, int imageNumber) { + return ( (MiqtVirtualQImageIOHandler*)(self) )->virtualbase_JumpToImage(imageNumber); +} + +void QImageIOHandler_override_virtual_LoopCount(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__LoopCount = slot; +} + +int QImageIOHandler_virtualbase_LoopCount(const void* self) { + return ( (const MiqtVirtualQImageIOHandler*)(self) )->virtualbase_LoopCount(); +} + +void QImageIOHandler_override_virtual_ImageCount(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__ImageCount = slot; +} + +int QImageIOHandler_virtualbase_ImageCount(const void* self) { + return ( (const MiqtVirtualQImageIOHandler*)(self) )->virtualbase_ImageCount(); +} + +void QImageIOHandler_override_virtual_NextImageDelay(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__NextImageDelay = slot; +} + +int QImageIOHandler_virtualbase_NextImageDelay(const void* self) { + return ( (const MiqtVirtualQImageIOHandler*)(self) )->virtualbase_NextImageDelay(); +} + +void QImageIOHandler_override_virtual_CurrentImageNumber(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__CurrentImageNumber = slot; +} + +int QImageIOHandler_virtualbase_CurrentImageNumber(const void* self) { + return ( (const MiqtVirtualQImageIOHandler*)(self) )->virtualbase_CurrentImageNumber(); +} + +void QImageIOHandler_override_virtual_CurrentImageRect(void* self, intptr_t slot) { + dynamic_cast( (QImageIOHandler*)(self) )->handle__CurrentImageRect = slot; +} + +QRect* QImageIOHandler_virtualbase_CurrentImageRect(const void* self) { + return ( (const MiqtVirtualQImageIOHandler*)(self) )->virtualbase_CurrentImageRect(); +} + void QImageIOHandler_Delete(QImageIOHandler* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } } +class MiqtVirtualQImageIOPlugin : public virtual QImageIOPlugin { +public: + + MiqtVirtualQImageIOPlugin(): QImageIOPlugin() {}; + MiqtVirtualQImageIOPlugin(QObject* parent): QImageIOPlugin(parent) {}; + + virtual ~MiqtVirtualQImageIOPlugin() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Capabilities = 0; + + // Subclass to allow providing a Go implementation + virtual QImageIOPlugin::Capabilities capabilities(QIODevice* device, const QByteArray& format) const override { + if (handle__Capabilities == 0) { + return QImageIOPlugin::Capabilities(); // Pure virtual, there is no base we can call + } + + QIODevice* sigval1 = device; + const QByteArray format_qb = format; + struct miqt_string format_ms; + format_ms.len = format_qb.length(); + format_ms.data = static_cast(malloc(format_ms.len)); + memcpy(format_ms.data, format_qb.data(), format_ms.len); + struct miqt_string sigval2 = format_ms; + + int callback_return_value = miqt_exec_callback_QImageIOPlugin_Capabilities(const_cast(this), handle__Capabilities, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Create = 0; + + // Subclass to allow providing a Go implementation + virtual QImageIOHandler* create(QIODevice* device, const QByteArray& format) const override { + if (handle__Create == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + QIODevice* sigval1 = device; + const QByteArray format_qb = format; + struct miqt_string format_ms; + format_ms.len = format_qb.length(); + format_ms.data = static_cast(malloc(format_ms.len)); + memcpy(format_ms.data, format_qb.data(), format_ms.len); + struct miqt_string sigval2 = format_ms; + + QImageIOHandler* callback_return_value = miqt_exec_callback_QImageIOPlugin_Create(const_cast(this), handle__Create, sigval1, sigval2); + + return callback_return_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 QImageIOPlugin::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QImageIOPlugin_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QImageIOPlugin::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 QImageIOPlugin::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QImageIOPlugin_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QImageIOPlugin::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) { + QImageIOPlugin::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QImageIOPlugin_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QImageIOPlugin::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) { + QImageIOPlugin::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QImageIOPlugin_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QImageIOPlugin::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) { + QImageIOPlugin::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QImageIOPlugin_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QImageIOPlugin::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) { + QImageIOPlugin::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QImageIOPlugin_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QImageIOPlugin::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) { + QImageIOPlugin::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QImageIOPlugin_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QImageIOPlugin::disconnectNotify(*signal); + + } + +}; + +void QImageIOPlugin_new(QImageIOPlugin** outptr_QImageIOPlugin, QObject** outptr_QObject) { + MiqtVirtualQImageIOPlugin* ret = new MiqtVirtualQImageIOPlugin(); + *outptr_QImageIOPlugin = ret; + *outptr_QObject = static_cast(ret); +} + +void QImageIOPlugin_new2(QObject* parent, QImageIOPlugin** outptr_QImageIOPlugin, QObject** outptr_QObject) { + MiqtVirtualQImageIOPlugin* ret = new MiqtVirtualQImageIOPlugin(parent); + *outptr_QImageIOPlugin = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QImageIOPlugin_MetaObject(const QImageIOPlugin* self) { return (QMetaObject*) self->metaObject(); } @@ -158,9 +796,73 @@ struct miqt_string QImageIOPlugin_Tr3(const char* s, const char* c, int n) { return _ms; } +void QImageIOPlugin_override_virtual_Capabilities(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__Capabilities = slot; +} + +void QImageIOPlugin_override_virtual_Create(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__Create = slot; +} + +void QImageIOPlugin_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__Event = slot; +} + +bool QImageIOPlugin_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQImageIOPlugin*)(self) )->virtualbase_Event(event); +} + +void QImageIOPlugin_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__EventFilter = slot; +} + +bool QImageIOPlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQImageIOPlugin*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QImageIOPlugin_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__TimerEvent = slot; +} + +void QImageIOPlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQImageIOPlugin*)(self) )->virtualbase_TimerEvent(event); +} + +void QImageIOPlugin_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__ChildEvent = slot; +} + +void QImageIOPlugin_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQImageIOPlugin*)(self) )->virtualbase_ChildEvent(event); +} + +void QImageIOPlugin_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__CustomEvent = slot; +} + +void QImageIOPlugin_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQImageIOPlugin*)(self) )->virtualbase_CustomEvent(event); +} + +void QImageIOPlugin_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__ConnectNotify = slot; +} + +void QImageIOPlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQImageIOPlugin*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QImageIOPlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QImageIOPlugin*)(self) )->handle__DisconnectNotify = slot; +} + +void QImageIOPlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQImageIOPlugin*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QImageIOPlugin_Delete(QImageIOPlugin* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qimageiohandler.go b/qt6/gen_qimageiohandler.go index 119f292d..d143d19d 100644 --- a/qt6/gen_qimageiohandler.go +++ b/qt6/gen_qimageiohandler.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -94,6 +95,16 @@ func UnsafeNewQImageIOHandler(h unsafe.Pointer) *QImageIOHandler { return &QImageIOHandler{h: (*C.QImageIOHandler)(h)} } +// NewQImageIOHandler constructs a new QImageIOHandler object. +func NewQImageIOHandler() *QImageIOHandler { + var outptr_QImageIOHandler *C.QImageIOHandler = nil + + C.QImageIOHandler_new(&outptr_QImageIOHandler) + ret := newQImageIOHandler(outptr_QImageIOHandler) + ret.isSubclass = true + return ret +} + func (this *QImageIOHandler) SetDevice(device *QIODevice) { C.QImageIOHandler_SetDevice(this.h, device.cPointer()) } @@ -184,6 +195,304 @@ func (this *QImageIOHandler) CurrentImageRect() *QRect { func QImageIOHandler_AllocateImage(size QSize, format QImage__Format, image *QImage) bool { return (bool)(C.QImageIOHandler_AllocateImage(size.cPointer(), (C.int)(format), image.cPointer())) } +func (this *QImageIOHandler) OnCanRead(slot func() bool) { + C.QImageIOHandler_override_virtual_CanRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_CanRead +func miqt_exec_callback_QImageIOHandler_CanRead(self *C.QImageIOHandler, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func() bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.bool)(virtualReturn) + +} +func (this *QImageIOHandler) OnRead(slot func(image *QImage) bool) { + C.QImageIOHandler_override_virtual_Read(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_Read +func miqt_exec_callback_QImageIOHandler_Read(self *C.QImageIOHandler, cb C.intptr_t, image *C.QImage) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(image *QImage) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQImage(unsafe.Pointer(image), nil) + + virtualReturn := gofunc(slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_Write(image *QImage) bool { + + return (bool)(C.QImageIOHandler_virtualbase_Write(unsafe.Pointer(this.h), image.cPointer())) + +} +func (this *QImageIOHandler) OnWrite(slot func(super func(image *QImage) bool, image *QImage) bool) { + C.QImageIOHandler_override_virtual_Write(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_Write +func miqt_exec_callback_QImageIOHandler_Write(self *C.QImageIOHandler, cb C.intptr_t, image *C.QImage) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(image *QImage) bool, image *QImage) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQImage(unsafe.Pointer(image), nil) + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_Write, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_Option(option QImageIOHandler__ImageOption) *QVariant { + + _ret := C.QImageIOHandler_virtualbase_Option(unsafe.Pointer(this.h), (C.int)(option)) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QImageIOHandler) OnOption(slot func(super func(option QImageIOHandler__ImageOption) *QVariant, option QImageIOHandler__ImageOption) *QVariant) { + C.QImageIOHandler_override_virtual_Option(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_Option +func miqt_exec_callback_QImageIOHandler_Option(self *C.QImageIOHandler, cb C.intptr_t, option C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QImageIOHandler__ImageOption) *QVariant, option QImageIOHandler__ImageOption) *QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QImageIOHandler__ImageOption)(option) + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_Option, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QImageIOHandler) callVirtualBase_SetOption(option QImageIOHandler__ImageOption, value *QVariant) { + + C.QImageIOHandler_virtualbase_SetOption(unsafe.Pointer(this.h), (C.int)(option), value.cPointer()) + +} +func (this *QImageIOHandler) OnSetOption(slot func(super func(option QImageIOHandler__ImageOption, value *QVariant), option QImageIOHandler__ImageOption, value *QVariant)) { + C.QImageIOHandler_override_virtual_SetOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_SetOption +func miqt_exec_callback_QImageIOHandler_SetOption(self *C.QImageIOHandler, cb C.intptr_t, option C.int, value *C.QVariant) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QImageIOHandler__ImageOption, value *QVariant), option QImageIOHandler__ImageOption, value *QVariant)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QImageIOHandler__ImageOption)(option) + + slotval2 := UnsafeNewQVariant(unsafe.Pointer(value)) + + gofunc((&QImageIOHandler{h: self}).callVirtualBase_SetOption, slotval1, slotval2) + +} + +func (this *QImageIOHandler) callVirtualBase_SupportsOption(option QImageIOHandler__ImageOption) bool { + + return (bool)(C.QImageIOHandler_virtualbase_SupportsOption(unsafe.Pointer(this.h), (C.int)(option))) + +} +func (this *QImageIOHandler) OnSupportsOption(slot func(super func(option QImageIOHandler__ImageOption) bool, option QImageIOHandler__ImageOption) bool) { + C.QImageIOHandler_override_virtual_SupportsOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_SupportsOption +func miqt_exec_callback_QImageIOHandler_SupportsOption(self *C.QImageIOHandler, cb C.intptr_t, option C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option QImageIOHandler__ImageOption) bool, option QImageIOHandler__ImageOption) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QImageIOHandler__ImageOption)(option) + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_SupportsOption, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_JumpToNextImage() bool { + + return (bool)(C.QImageIOHandler_virtualbase_JumpToNextImage(unsafe.Pointer(this.h))) + +} +func (this *QImageIOHandler) OnJumpToNextImage(slot func(super func() bool) bool) { + C.QImageIOHandler_override_virtual_JumpToNextImage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_JumpToNextImage +func miqt_exec_callback_QImageIOHandler_JumpToNextImage(self *C.QImageIOHandler, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_JumpToNextImage) + + return (C.bool)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_JumpToImage(imageNumber int) bool { + + return (bool)(C.QImageIOHandler_virtualbase_JumpToImage(unsafe.Pointer(this.h), (C.int)(imageNumber))) + +} +func (this *QImageIOHandler) OnJumpToImage(slot func(super func(imageNumber int) bool, imageNumber int) bool) { + C.QImageIOHandler_override_virtual_JumpToImage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_JumpToImage +func miqt_exec_callback_QImageIOHandler_JumpToImage(self *C.QImageIOHandler, cb C.intptr_t, imageNumber C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(imageNumber int) bool, imageNumber int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(imageNumber) + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_JumpToImage, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_LoopCount() int { + + return (int)(C.QImageIOHandler_virtualbase_LoopCount(unsafe.Pointer(this.h))) + +} +func (this *QImageIOHandler) OnLoopCount(slot func(super func() int) int) { + C.QImageIOHandler_override_virtual_LoopCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_LoopCount +func miqt_exec_callback_QImageIOHandler_LoopCount(self *C.QImageIOHandler, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_LoopCount) + + return (C.int)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_ImageCount() int { + + return (int)(C.QImageIOHandler_virtualbase_ImageCount(unsafe.Pointer(this.h))) + +} +func (this *QImageIOHandler) OnImageCount(slot func(super func() int) int) { + C.QImageIOHandler_override_virtual_ImageCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_ImageCount +func miqt_exec_callback_QImageIOHandler_ImageCount(self *C.QImageIOHandler, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_ImageCount) + + return (C.int)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_NextImageDelay() int { + + return (int)(C.QImageIOHandler_virtualbase_NextImageDelay(unsafe.Pointer(this.h))) + +} +func (this *QImageIOHandler) OnNextImageDelay(slot func(super func() int) int) { + C.QImageIOHandler_override_virtual_NextImageDelay(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_NextImageDelay +func miqt_exec_callback_QImageIOHandler_NextImageDelay(self *C.QImageIOHandler, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_NextImageDelay) + + return (C.int)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_CurrentImageNumber() int { + + return (int)(C.QImageIOHandler_virtualbase_CurrentImageNumber(unsafe.Pointer(this.h))) + +} +func (this *QImageIOHandler) OnCurrentImageNumber(slot func(super func() int) int) { + C.QImageIOHandler_override_virtual_CurrentImageNumber(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_CurrentImageNumber +func miqt_exec_callback_QImageIOHandler_CurrentImageNumber(self *C.QImageIOHandler, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_CurrentImageNumber) + + return (C.int)(virtualReturn) + +} + +func (this *QImageIOHandler) callVirtualBase_CurrentImageRect() *QRect { + + _ret := C.QImageIOHandler_virtualbase_CurrentImageRect(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 *QImageIOHandler) OnCurrentImageRect(slot func(super func() *QRect) *QRect) { + C.QImageIOHandler_override_virtual_CurrentImageRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOHandler_CurrentImageRect +func miqt_exec_callback_QImageIOHandler_CurrentImageRect(self *C.QImageIOHandler, 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((&QImageIOHandler{h: self}).callVirtualBase_CurrentImageRect) + + return virtualReturn.cPointer() + +} // Delete this object from C++ memory. func (this *QImageIOHandler) Delete() { @@ -238,6 +547,28 @@ func UnsafeNewQImageIOPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QImage QObject: UnsafeNewQObject(h_QObject)} } +// NewQImageIOPlugin constructs a new QImageIOPlugin object. +func NewQImageIOPlugin() *QImageIOPlugin { + var outptr_QImageIOPlugin *C.QImageIOPlugin = nil + var outptr_QObject *C.QObject = nil + + C.QImageIOPlugin_new(&outptr_QImageIOPlugin, &outptr_QObject) + ret := newQImageIOPlugin(outptr_QImageIOPlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQImageIOPlugin2 constructs a new QImageIOPlugin object. +func NewQImageIOPlugin2(parent *QObject) *QImageIOPlugin { + var outptr_QImageIOPlugin *C.QImageIOPlugin = nil + var outptr_QObject *C.QObject = nil + + C.QImageIOPlugin_new2(parent.cPointer(), &outptr_QImageIOPlugin, &outptr_QObject) + ret := newQImageIOPlugin(outptr_QImageIOPlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QImageIOPlugin) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QImageIOPlugin_MetaObject(this.h))) } @@ -292,6 +623,218 @@ func QImageIOPlugin_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QImageIOPlugin) OnCapabilities(slot func(device *QIODevice, format []byte) QImageIOPlugin__Capability) { + C.QImageIOPlugin_override_virtual_Capabilities(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_Capabilities +func miqt_exec_callback_QImageIOPlugin_Capabilities(self *C.QImageIOPlugin, cb C.intptr_t, device *C.QIODevice, format C.struct_miqt_string) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(device *QIODevice, format []byte) QImageIOPlugin__Capability) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQIODevice(unsafe.Pointer(device), nil, nil) + var format_bytearray C.struct_miqt_string = format + format_ret := C.GoBytes(unsafe.Pointer(format_bytearray.data), C.int(int64(format_bytearray.len))) + C.free(unsafe.Pointer(format_bytearray.data)) + slotval2 := format_ret + + virtualReturn := gofunc(slotval1, slotval2) + + return (C.int)(virtualReturn) + +} +func (this *QImageIOPlugin) OnCreate(slot func(device *QIODevice, format []byte) *QImageIOHandler) { + C.QImageIOPlugin_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_Create +func miqt_exec_callback_QImageIOPlugin_Create(self *C.QImageIOPlugin, cb C.intptr_t, device *C.QIODevice, format C.struct_miqt_string) *C.QImageIOHandler { + gofunc, ok := cgo.Handle(cb).Value().(func(device *QIODevice, format []byte) *QImageIOHandler) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQIODevice(unsafe.Pointer(device), nil, nil) + var format_bytearray C.struct_miqt_string = format + format_ret := C.GoBytes(unsafe.Pointer(format_bytearray.data), C.int(int64(format_bytearray.len))) + C.free(unsafe.Pointer(format_bytearray.data)) + slotval2 := format_ret + + virtualReturn := gofunc(slotval1, slotval2) + + return virtualReturn.cPointer() + +} + +func (this *QImageIOPlugin) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QImageIOPlugin_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QImageIOPlugin) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QImageIOPlugin_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_Event +func miqt_exec_callback_QImageIOPlugin_Event(self *C.QImageIOPlugin, 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((&QImageIOPlugin{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QImageIOPlugin) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QImageIOPlugin_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QImageIOPlugin) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QImageIOPlugin_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_EventFilter +func miqt_exec_callback_QImageIOPlugin_EventFilter(self *C.QImageIOPlugin, 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((&QImageIOPlugin{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QImageIOPlugin) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QImageIOPlugin_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QImageIOPlugin) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QImageIOPlugin_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_TimerEvent +func miqt_exec_callback_QImageIOPlugin_TimerEvent(self *C.QImageIOPlugin, 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((&QImageIOPlugin{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QImageIOPlugin) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QImageIOPlugin_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QImageIOPlugin) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QImageIOPlugin_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_ChildEvent +func miqt_exec_callback_QImageIOPlugin_ChildEvent(self *C.QImageIOPlugin, 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((&QImageIOPlugin{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QImageIOPlugin) callVirtualBase_CustomEvent(event *QEvent) { + + C.QImageIOPlugin_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QImageIOPlugin) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QImageIOPlugin_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_CustomEvent +func miqt_exec_callback_QImageIOPlugin_CustomEvent(self *C.QImageIOPlugin, 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((&QImageIOPlugin{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QImageIOPlugin) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QImageIOPlugin_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QImageIOPlugin) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QImageIOPlugin_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_ConnectNotify +func miqt_exec_callback_QImageIOPlugin_ConnectNotify(self *C.QImageIOPlugin, 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((&QImageIOPlugin{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QImageIOPlugin) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QImageIOPlugin_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QImageIOPlugin) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QImageIOPlugin_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QImageIOPlugin_DisconnectNotify +func miqt_exec_callback_QImageIOPlugin_DisconnectNotify(self *C.QImageIOPlugin, 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((&QImageIOPlugin{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QImageIOPlugin) Delete() { diff --git a/qt6/gen_qimageiohandler.h b/qt6/gen_qimageiohandler.h index f2bbea0b..15c27460 100644 --- a/qt6/gen_qimageiohandler.h +++ b/qt6/gen_qimageiohandler.h @@ -16,28 +16,37 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; +class QEvent; class QIODevice; class QImage; class QImageIOHandler; class QImageIOPlugin; +class QMetaMethod; class QMetaObject; class QObject; class QRect; class QSize; +class QTimerEvent; class QVariant; #else typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; typedef struct QImage QImage; typedef struct QImageIOHandler QImageIOHandler; typedef struct QImageIOPlugin QImageIOPlugin; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif +void QImageIOHandler_new(QImageIOHandler** outptr_QImageIOHandler); void QImageIOHandler_SetDevice(QImageIOHandler* self, QIODevice* device); QIODevice* QImageIOHandler_Device(const QImageIOHandler* self); void QImageIOHandler_SetFormat(QImageIOHandler* self, struct miqt_string format); @@ -57,8 +66,36 @@ 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_override_virtual_CanRead(void* self, intptr_t slot); +bool QImageIOHandler_virtualbase_CanRead(const void* self); +void QImageIOHandler_override_virtual_Read(void* self, intptr_t slot); +bool QImageIOHandler_virtualbase_Read(void* self, QImage* image); +void QImageIOHandler_override_virtual_Write(void* self, intptr_t slot); +bool QImageIOHandler_virtualbase_Write(void* self, QImage* image); +void QImageIOHandler_override_virtual_Option(void* self, intptr_t slot); +QVariant* QImageIOHandler_virtualbase_Option(const void* self, int option); +void QImageIOHandler_override_virtual_SetOption(void* self, intptr_t slot); +void QImageIOHandler_virtualbase_SetOption(void* self, int option, QVariant* value); +void QImageIOHandler_override_virtual_SupportsOption(void* self, intptr_t slot); +bool QImageIOHandler_virtualbase_SupportsOption(const void* self, int option); +void QImageIOHandler_override_virtual_JumpToNextImage(void* self, intptr_t slot); +bool QImageIOHandler_virtualbase_JumpToNextImage(void* self); +void QImageIOHandler_override_virtual_JumpToImage(void* self, intptr_t slot); +bool QImageIOHandler_virtualbase_JumpToImage(void* self, int imageNumber); +void QImageIOHandler_override_virtual_LoopCount(void* self, intptr_t slot); +int QImageIOHandler_virtualbase_LoopCount(const void* self); +void QImageIOHandler_override_virtual_ImageCount(void* self, intptr_t slot); +int QImageIOHandler_virtualbase_ImageCount(const void* self); +void QImageIOHandler_override_virtual_NextImageDelay(void* self, intptr_t slot); +int QImageIOHandler_virtualbase_NextImageDelay(const void* self); +void QImageIOHandler_override_virtual_CurrentImageNumber(void* self, intptr_t slot); +int QImageIOHandler_virtualbase_CurrentImageNumber(const void* self); +void QImageIOHandler_override_virtual_CurrentImageRect(void* self, intptr_t slot); +QRect* QImageIOHandler_virtualbase_CurrentImageRect(const void* self); void QImageIOHandler_Delete(QImageIOHandler* self, bool isSubclass); +void QImageIOPlugin_new(QImageIOPlugin** outptr_QImageIOPlugin, QObject** outptr_QObject); +void QImageIOPlugin_new2(QObject* parent, QImageIOPlugin** outptr_QImageIOPlugin, QObject** outptr_QObject); QMetaObject* QImageIOPlugin_MetaObject(const QImageIOPlugin* self); void* QImageIOPlugin_Metacast(QImageIOPlugin* self, const char* param1); struct miqt_string QImageIOPlugin_Tr(const char* s); @@ -66,6 +103,24 @@ int QImageIOPlugin_Capabilities(const QImageIOPlugin* self, QIODevice* device, s 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); +void QImageIOPlugin_override_virtual_Capabilities(void* self, intptr_t slot); +int QImageIOPlugin_virtualbase_Capabilities(const void* self, QIODevice* device, struct miqt_string format); +void QImageIOPlugin_override_virtual_Create(void* self, intptr_t slot); +QImageIOHandler* QImageIOPlugin_virtualbase_Create(const void* self, QIODevice* device, struct miqt_string format); +void QImageIOPlugin_override_virtual_Event(void* self, intptr_t slot); +bool QImageIOPlugin_virtualbase_Event(void* self, QEvent* event); +void QImageIOPlugin_override_virtual_EventFilter(void* self, intptr_t slot); +bool QImageIOPlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QImageIOPlugin_override_virtual_TimerEvent(void* self, intptr_t slot); +void QImageIOPlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QImageIOPlugin_override_virtual_ChildEvent(void* self, intptr_t slot); +void QImageIOPlugin_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QImageIOPlugin_override_virtual_CustomEvent(void* self, intptr_t slot); +void QImageIOPlugin_virtualbase_CustomEvent(void* self, QEvent* event); +void QImageIOPlugin_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QImageIOPlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QImageIOPlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QImageIOPlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QImageIOPlugin_Delete(QImageIOPlugin* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qiodevice.cpp b/qt6/gen_qiodevice.cpp index fc7325f2..2c73ad7c 100644 --- a/qt6/gen_qiodevice.cpp +++ b/qt6/gen_qiodevice.cpp @@ -1,15 +1,598 @@ #include +#include +#include #include #include +#include #include #include #include #include #include +#include #include #include "gen_qiodevice.h" #include "_cgo_export.h" +class MiqtVirtualQIODevice : public virtual QIODevice { +public: + + MiqtVirtualQIODevice(): QIODevice() {}; + MiqtVirtualQIODevice(QObject* parent): QIODevice(parent) {}; + + virtual ~MiqtVirtualQIODevice() = 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 QIODevice::isSequential(); + } + + + bool callback_return_value = miqt_exec_callback_QIODevice_IsSequential(const_cast(this), handle__IsSequential); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsSequential() const { + + return QIODevice::isSequential(); + + } + + // 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 QIODevice::open(mode); + } + + QIODeviceBase::OpenMode mode_ret = mode; + int sigval1 = static_cast(mode_ret); + + bool callback_return_value = miqt_exec_callback_QIODevice_Open(this, handle__Open, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Open(int mode) { + + return QIODevice::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) { + QIODevice::close(); + return; + } + + + miqt_exec_callback_QIODevice_Close(this, handle__Close); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Close() { + + QIODevice::close(); + + } + + // 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 QIODevice::pos(); + } + + + long long callback_return_value = miqt_exec_callback_QIODevice_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 = QIODevice::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 QIODevice::size(); + } + + + long long callback_return_value = miqt_exec_callback_QIODevice_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 = QIODevice::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 QIODevice::seek(pos); + } + + qint64 pos_ret = pos; + long long sigval1 = static_cast(pos_ret); + + bool callback_return_value = miqt_exec_callback_QIODevice_Seek(this, handle__Seek, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Seek(long long pos) { + + return QIODevice::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 QIODevice::atEnd(); + } + + + bool callback_return_value = miqt_exec_callback_QIODevice_AtEnd(const_cast(this), handle__AtEnd); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AtEnd() const { + + return QIODevice::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 QIODevice::reset(); + } + + + bool callback_return_value = miqt_exec_callback_QIODevice_Reset(this, handle__Reset); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Reset() { + + return QIODevice::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 QIODevice::bytesAvailable(); + } + + + long long callback_return_value = miqt_exec_callback_QIODevice_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 = QIODevice::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 QIODevice::bytesToWrite(); + } + + + long long callback_return_value = miqt_exec_callback_QIODevice_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 = QIODevice::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 QIODevice::canReadLine(); + } + + + bool callback_return_value = miqt_exec_callback_QIODevice_CanReadLine(const_cast(this), handle__CanReadLine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_CanReadLine() const { + + return QIODevice::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 QIODevice::waitForReadyRead(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QIODevice_WaitForReadyRead(this, handle__WaitForReadyRead, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForReadyRead(int msecs) { + + return QIODevice::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 QIODevice::waitForBytesWritten(msecs); + } + + int sigval1 = msecs; + + bool callback_return_value = miqt_exec_callback_QIODevice_WaitForBytesWritten(this, handle__WaitForBytesWritten, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WaitForBytesWritten(int msecs) { + + return QIODevice::waitForBytesWritten(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 0; // Pure virtual, there is no base we can call + } + + char* sigval1 = data; + qint64 maxlen_ret = maxlen; + long long sigval2 = static_cast(maxlen_ret); + + long long callback_return_value = miqt_exec_callback_QIODevice_ReadData(this, handle__ReadData, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // 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 QIODevice::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_QIODevice_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 = QIODevice::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 QIODevice::skipData(maxSize); + } + + qint64 maxSize_ret = maxSize; + long long sigval1 = static_cast(maxSize_ret); + + long long callback_return_value = miqt_exec_callback_QIODevice_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 = QIODevice::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 0; // Pure virtual, there is no base we can call + } + + 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_QIODevice_WriteData(this, handle__WriteData, sigval1, sigval2); + + return static_cast(callback_return_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 QIODevice::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QIODevice_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QIODevice::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 QIODevice::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QIODevice_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QIODevice::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) { + QIODevice::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QIODevice_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QIODevice::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) { + QIODevice::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QIODevice_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QIODevice::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) { + QIODevice::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QIODevice_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QIODevice::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) { + QIODevice::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QIODevice_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QIODevice::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) { + QIODevice::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QIODevice_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QIODevice::disconnectNotify(*signal); + + } + +}; + +void QIODevice_new(QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQIODevice* ret = new MiqtVirtualQIODevice(); + *outptr_QIODevice = ret; + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); +} + +void QIODevice_new2(QObject* parent, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + MiqtVirtualQIODevice* ret = new MiqtVirtualQIODevice(parent); + *outptr_QIODevice = ret; + *outptr_QObject = static_cast(ret); + *outptr_QIODeviceBase = static_cast(ret); +} + QMetaObject* QIODevice_MetaObject(const QIODevice* self) { return (QMetaObject*) self->metaObject(); } @@ -250,7 +833,7 @@ void QIODevice_ReadyRead(QIODevice* self) { } void QIODevice_connect_ReadyRead(QIODevice* self, intptr_t slot) { - QIODevice::connect(self, static_cast(&QIODevice::readyRead), self, [=]() { + MiqtVirtualQIODevice::connect(self, static_cast(&QIODevice::readyRead), self, [=]() { miqt_exec_callback_QIODevice_ReadyRead(slot); }); } @@ -260,7 +843,7 @@ void QIODevice_ChannelReadyRead(QIODevice* self, int channel) { } void QIODevice_connect_ChannelReadyRead(QIODevice* self, intptr_t slot) { - QIODevice::connect(self, static_cast(&QIODevice::channelReadyRead), self, [=](int channel) { + MiqtVirtualQIODevice::connect(self, static_cast(&QIODevice::channelReadyRead), self, [=](int channel) { int sigval1 = channel; miqt_exec_callback_QIODevice_ChannelReadyRead(slot, sigval1); }); @@ -271,7 +854,7 @@ void QIODevice_BytesWritten(QIODevice* self, long long bytes) { } void QIODevice_connect_BytesWritten(QIODevice* self, intptr_t slot) { - QIODevice::connect(self, static_cast(&QIODevice::bytesWritten), self, [=](qint64 bytes) { + MiqtVirtualQIODevice::connect(self, static_cast(&QIODevice::bytesWritten), self, [=](qint64 bytes) { qint64 bytes_ret = bytes; long long sigval1 = static_cast(bytes_ret); miqt_exec_callback_QIODevice_BytesWritten(slot, sigval1); @@ -283,7 +866,7 @@ void QIODevice_ChannelBytesWritten(QIODevice* self, int channel, long long bytes } void QIODevice_connect_ChannelBytesWritten(QIODevice* self, intptr_t slot) { - QIODevice::connect(self, static_cast(&QIODevice::channelBytesWritten), self, [=](int channel, qint64 bytes) { + MiqtVirtualQIODevice::connect(self, static_cast(&QIODevice::channelBytesWritten), self, [=](int channel, qint64 bytes) { int sigval1 = channel; qint64 bytes_ret = bytes; long long sigval2 = static_cast(bytes_ret); @@ -296,7 +879,7 @@ void QIODevice_AboutToClose(QIODevice* self) { } void QIODevice_connect_AboutToClose(QIODevice* self, intptr_t slot) { - QIODevice::connect(self, static_cast(&QIODevice::aboutToClose), self, [=]() { + MiqtVirtualQIODevice::connect(self, static_cast(&QIODevice::aboutToClose), self, [=]() { miqt_exec_callback_QIODevice_AboutToClose(slot); }); } @@ -306,7 +889,7 @@ void QIODevice_ReadChannelFinished(QIODevice* self) { } void QIODevice_connect_ReadChannelFinished(QIODevice* self, intptr_t slot) { - QIODevice::connect(self, static_cast(&QIODevice::readChannelFinished), self, [=]() { + MiqtVirtualQIODevice::connect(self, static_cast(&QIODevice::readChannelFinished), self, [=]() { miqt_exec_callback_QIODevice_ReadChannelFinished(slot); }); } @@ -342,9 +925,193 @@ struct miqt_string QIODevice_ReadLine1(QIODevice* self, long long maxlen) { return _ms; } +void QIODevice_override_virtual_IsSequential(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__IsSequential = slot; +} + +bool QIODevice_virtualbase_IsSequential(const void* self) { + return ( (const MiqtVirtualQIODevice*)(self) )->virtualbase_IsSequential(); +} + +void QIODevice_override_virtual_Open(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__Open = slot; +} + +bool QIODevice_virtualbase_Open(void* self, int mode) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_Open(mode); +} + +void QIODevice_override_virtual_Close(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__Close = slot; +} + +void QIODevice_virtualbase_Close(void* self) { + ( (MiqtVirtualQIODevice*)(self) )->virtualbase_Close(); +} + +void QIODevice_override_virtual_Pos(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__Pos = slot; +} + +long long QIODevice_virtualbase_Pos(const void* self) { + return ( (const MiqtVirtualQIODevice*)(self) )->virtualbase_Pos(); +} + +void QIODevice_override_virtual_Size(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__Size = slot; +} + +long long QIODevice_virtualbase_Size(const void* self) { + return ( (const MiqtVirtualQIODevice*)(self) )->virtualbase_Size(); +} + +void QIODevice_override_virtual_Seek(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__Seek = slot; +} + +bool QIODevice_virtualbase_Seek(void* self, long long pos) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_Seek(pos); +} + +void QIODevice_override_virtual_AtEnd(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__AtEnd = slot; +} + +bool QIODevice_virtualbase_AtEnd(const void* self) { + return ( (const MiqtVirtualQIODevice*)(self) )->virtualbase_AtEnd(); +} + +void QIODevice_override_virtual_Reset(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__Reset = slot; +} + +bool QIODevice_virtualbase_Reset(void* self) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_Reset(); +} + +void QIODevice_override_virtual_BytesAvailable(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__BytesAvailable = slot; +} + +long long QIODevice_virtualbase_BytesAvailable(const void* self) { + return ( (const MiqtVirtualQIODevice*)(self) )->virtualbase_BytesAvailable(); +} + +void QIODevice_override_virtual_BytesToWrite(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__BytesToWrite = slot; +} + +long long QIODevice_virtualbase_BytesToWrite(const void* self) { + return ( (const MiqtVirtualQIODevice*)(self) )->virtualbase_BytesToWrite(); +} + +void QIODevice_override_virtual_CanReadLine(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__CanReadLine = slot; +} + +bool QIODevice_virtualbase_CanReadLine(const void* self) { + return ( (const MiqtVirtualQIODevice*)(self) )->virtualbase_CanReadLine(); +} + +void QIODevice_override_virtual_WaitForReadyRead(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__WaitForReadyRead = slot; +} + +bool QIODevice_virtualbase_WaitForReadyRead(void* self, int msecs) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_WaitForReadyRead(msecs); +} + +void QIODevice_override_virtual_WaitForBytesWritten(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__WaitForBytesWritten = slot; +} + +bool QIODevice_virtualbase_WaitForBytesWritten(void* self, int msecs) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_WaitForBytesWritten(msecs); +} + +void QIODevice_override_virtual_ReadData(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__ReadData = slot; +} + +void QIODevice_override_virtual_ReadLineData(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__ReadLineData = slot; +} + +long long QIODevice_virtualbase_ReadLineData(void* self, char* data, long long maxlen) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_ReadLineData(data, maxlen); +} + +void QIODevice_override_virtual_SkipData(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__SkipData = slot; +} + +long long QIODevice_virtualbase_SkipData(void* self, long long maxSize) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_SkipData(maxSize); +} + +void QIODevice_override_virtual_WriteData(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__WriteData = slot; +} + +void QIODevice_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__Event = slot; +} + +bool QIODevice_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_Event(event); +} + +void QIODevice_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__EventFilter = slot; +} + +bool QIODevice_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQIODevice*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QIODevice_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__TimerEvent = slot; +} + +void QIODevice_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQIODevice*)(self) )->virtualbase_TimerEvent(event); +} + +void QIODevice_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__ChildEvent = slot; +} + +void QIODevice_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQIODevice*)(self) )->virtualbase_ChildEvent(event); +} + +void QIODevice_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__CustomEvent = slot; +} + +void QIODevice_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQIODevice*)(self) )->virtualbase_CustomEvent(event); +} + +void QIODevice_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__ConnectNotify = slot; +} + +void QIODevice_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQIODevice*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QIODevice_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QIODevice*)(self) )->handle__DisconnectNotify = slot; +} + +void QIODevice_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQIODevice*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QIODevice_Delete(QIODevice* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qiodevice.go b/qt6/gen_qiodevice.go index 439d809e..8d0c3f13 100644 --- a/qt6/gen_qiodevice.go +++ b/qt6/gen_qiodevice.go @@ -56,6 +56,30 @@ func UnsafeNewQIODevice(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceB QIODeviceBase: UnsafeNewQIODeviceBase(h_QIODeviceBase)} } +// NewQIODevice constructs a new QIODevice object. +func NewQIODevice() *QIODevice { + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QIODevice_new(&outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQIODevice(outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret +} + +// NewQIODevice2 constructs a new QIODevice object. +func NewQIODevice2(parent *QObject) *QIODevice { + var outptr_QIODevice *C.QIODevice = nil + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + + C.QIODevice_new2(parent.cPointer(), &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) + ret := newQIODevice(outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret.isSubclass = true + return ret +} + func (this *QIODevice) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QIODevice_MetaObject(this.h))) } @@ -423,6 +447,567 @@ func (this *QIODevice) ReadLine1(maxlen int64) []byte { return _ret } +func (this *QIODevice) callVirtualBase_IsSequential() bool { + + return (bool)(C.QIODevice_virtualbase_IsSequential(unsafe.Pointer(this.h))) + +} +func (this *QIODevice) OnIsSequential(slot func(super func() bool) bool) { + C.QIODevice_override_virtual_IsSequential(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_IsSequential +func miqt_exec_callback_QIODevice_IsSequential(self *C.QIODevice, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_IsSequential) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_Open(mode QIODeviceBase__OpenModeFlag) bool { + + return (bool)(C.QIODevice_virtualbase_Open(unsafe.Pointer(this.h), (C.int)(mode))) + +} +func (this *QIODevice) OnOpen(slot func(super func(mode QIODeviceBase__OpenModeFlag) bool, mode QIODeviceBase__OpenModeFlag) bool) { + C.QIODevice_override_virtual_Open(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_Open +func miqt_exec_callback_QIODevice_Open(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_Open, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_Close() { + + C.QIODevice_virtualbase_Close(unsafe.Pointer(this.h)) + +} +func (this *QIODevice) OnClose(slot func(super func())) { + C.QIODevice_override_virtual_Close(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_Close +func miqt_exec_callback_QIODevice_Close(self *C.QIODevice, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QIODevice{h: self}).callVirtualBase_Close) + +} + +func (this *QIODevice) callVirtualBase_Pos() int64 { + + return (int64)(C.QIODevice_virtualbase_Pos(unsafe.Pointer(this.h))) + +} +func (this *QIODevice) OnPos(slot func(super func() int64) int64) { + C.QIODevice_override_virtual_Pos(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_Pos +func miqt_exec_callback_QIODevice_Pos(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_Pos) + + return (C.longlong)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_Size() int64 { + + return (int64)(C.QIODevice_virtualbase_Size(unsafe.Pointer(this.h))) + +} +func (this *QIODevice) OnSize(slot func(super func() int64) int64) { + C.QIODevice_override_virtual_Size(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_Size +func miqt_exec_callback_QIODevice_Size(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_Size) + + return (C.longlong)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_Seek(pos int64) bool { + + return (bool)(C.QIODevice_virtualbase_Seek(unsafe.Pointer(this.h), (C.longlong)(pos))) + +} +func (this *QIODevice) OnSeek(slot func(super func(pos int64) bool, pos int64) bool) { + C.QIODevice_override_virtual_Seek(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_Seek +func miqt_exec_callback_QIODevice_Seek(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_Seek, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_AtEnd() bool { + + return (bool)(C.QIODevice_virtualbase_AtEnd(unsafe.Pointer(this.h))) + +} +func (this *QIODevice) OnAtEnd(slot func(super func() bool) bool) { + C.QIODevice_override_virtual_AtEnd(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_AtEnd +func miqt_exec_callback_QIODevice_AtEnd(self *C.QIODevice, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_AtEnd) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_Reset() bool { + + return (bool)(C.QIODevice_virtualbase_Reset(unsafe.Pointer(this.h))) + +} +func (this *QIODevice) OnReset(slot func(super func() bool) bool) { + C.QIODevice_override_virtual_Reset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_Reset +func miqt_exec_callback_QIODevice_Reset(self *C.QIODevice, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_Reset) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_BytesAvailable() int64 { + + return (int64)(C.QIODevice_virtualbase_BytesAvailable(unsafe.Pointer(this.h))) + +} +func (this *QIODevice) OnBytesAvailable(slot func(super func() int64) int64) { + C.QIODevice_override_virtual_BytesAvailable(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_BytesAvailable +func miqt_exec_callback_QIODevice_BytesAvailable(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_BytesAvailable) + + return (C.longlong)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_BytesToWrite() int64 { + + return (int64)(C.QIODevice_virtualbase_BytesToWrite(unsafe.Pointer(this.h))) + +} +func (this *QIODevice) OnBytesToWrite(slot func(super func() int64) int64) { + C.QIODevice_override_virtual_BytesToWrite(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_BytesToWrite +func miqt_exec_callback_QIODevice_BytesToWrite(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_BytesToWrite) + + return (C.longlong)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_CanReadLine() bool { + + return (bool)(C.QIODevice_virtualbase_CanReadLine(unsafe.Pointer(this.h))) + +} +func (this *QIODevice) OnCanReadLine(slot func(super func() bool) bool) { + C.QIODevice_override_virtual_CanReadLine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_CanReadLine +func miqt_exec_callback_QIODevice_CanReadLine(self *C.QIODevice, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QIODevice{h: self}).callVirtualBase_CanReadLine) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_WaitForReadyRead(msecs int) bool { + + return (bool)(C.QIODevice_virtualbase_WaitForReadyRead(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QIODevice) OnWaitForReadyRead(slot func(super func(msecs int) bool, msecs int) bool) { + C.QIODevice_override_virtual_WaitForReadyRead(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_WaitForReadyRead +func miqt_exec_callback_QIODevice_WaitForReadyRead(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_WaitForReadyRead, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_WaitForBytesWritten(msecs int) bool { + + return (bool)(C.QIODevice_virtualbase_WaitForBytesWritten(unsafe.Pointer(this.h), (C.int)(msecs))) + +} +func (this *QIODevice) OnWaitForBytesWritten(slot func(super func(msecs int) bool, msecs int) bool) { + C.QIODevice_override_virtual_WaitForBytesWritten(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_WaitForBytesWritten +func miqt_exec_callback_QIODevice_WaitForBytesWritten(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_WaitForBytesWritten, slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QIODevice) OnReadData(slot func(data string, maxlen int64) int64) { + C.QIODevice_override_virtual_ReadData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_ReadData +func miqt_exec_callback_QIODevice_ReadData(self *C.QIODevice, cb C.intptr_t, data *C.char, maxlen C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_ReadLineData(data string, maxlen int64) int64 { + data_Cstring := C.CString(data) + defer C.free(unsafe.Pointer(data_Cstring)) + + return (int64)(C.QIODevice_virtualbase_ReadLineData(unsafe.Pointer(this.h), data_Cstring, (C.longlong)(maxlen))) + +} +func (this *QIODevice) OnReadLineData(slot func(super func(data string, maxlen int64) int64, data string, maxlen int64) int64) { + C.QIODevice_override_virtual_ReadLineData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_ReadLineData +func miqt_exec_callback_QIODevice_ReadLineData(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_ReadLineData, slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_SkipData(maxSize int64) int64 { + + return (int64)(C.QIODevice_virtualbase_SkipData(unsafe.Pointer(this.h), (C.longlong)(maxSize))) + +} +func (this *QIODevice) OnSkipData(slot func(super func(maxSize int64) int64, maxSize int64) int64) { + C.QIODevice_override_virtual_SkipData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_SkipData +func miqt_exec_callback_QIODevice_SkipData(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_SkipData, slotval1) + + return (C.longlong)(virtualReturn) + +} +func (this *QIODevice) OnWriteData(slot func(data string, lenVal int64) int64) { + C.QIODevice_override_virtual_WriteData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_WriteData +func miqt_exec_callback_QIODevice_WriteData(self *C.QIODevice, cb C.intptr_t, data *C.const_char, lenVal C.longlong) C.longlong { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return (C.longlong)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QIODevice_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QIODevice) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QIODevice_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_Event +func miqt_exec_callback_QIODevice_Event(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QIODevice_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QIODevice) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QIODevice_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_EventFilter +func miqt_exec_callback_QIODevice_EventFilter(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QIODevice) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QIODevice_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QIODevice) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QIODevice_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_TimerEvent +func miqt_exec_callback_QIODevice_TimerEvent(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QIODevice) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QIODevice_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QIODevice) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QIODevice_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_ChildEvent +func miqt_exec_callback_QIODevice_ChildEvent(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QIODevice) callVirtualBase_CustomEvent(event *QEvent) { + + C.QIODevice_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QIODevice) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QIODevice_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_CustomEvent +func miqt_exec_callback_QIODevice_CustomEvent(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QIODevice) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QIODevice_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QIODevice) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QIODevice_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_ConnectNotify +func miqt_exec_callback_QIODevice_ConnectNotify(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QIODevice) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QIODevice_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QIODevice) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QIODevice_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QIODevice_DisconnectNotify +func miqt_exec_callback_QIODevice_DisconnectNotify(self *C.QIODevice, 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((&QIODevice{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QIODevice) Delete() { C.QIODevice_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qiodevice.h b/qt6/gen_qiodevice.h index 20d1e324..c73df608 100644 --- a/qt6/gen_qiodevice.h +++ b/qt6/gen_qiodevice.h @@ -16,18 +16,28 @@ extern "C" { #ifdef __cplusplus class QByteArray; +class QChildEvent; +class QEvent; class QIODevice; class QIODeviceBase; +class QMetaMethod; class QMetaObject; class QObject; +class QTimerEvent; #else typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; typedef struct QIODeviceBase QIODeviceBase; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; +typedef struct QTimerEvent QTimerEvent; #endif +void QIODevice_new(QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +void QIODevice_new2(QObject* parent, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); QMetaObject* QIODevice_MetaObject(const QIODevice* self); void* QIODevice_Metacast(QIODevice* self, const char* param1); struct miqt_string QIODevice_Tr(const char* s); @@ -94,6 +104,54 @@ long long QIODevice_WriteData(QIODevice* self, const char* data, long long lenVa 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_override_virtual_IsSequential(void* self, intptr_t slot); +bool QIODevice_virtualbase_IsSequential(const void* self); +void QIODevice_override_virtual_Open(void* self, intptr_t slot); +bool QIODevice_virtualbase_Open(void* self, int mode); +void QIODevice_override_virtual_Close(void* self, intptr_t slot); +void QIODevice_virtualbase_Close(void* self); +void QIODevice_override_virtual_Pos(void* self, intptr_t slot); +long long QIODevice_virtualbase_Pos(const void* self); +void QIODevice_override_virtual_Size(void* self, intptr_t slot); +long long QIODevice_virtualbase_Size(const void* self); +void QIODevice_override_virtual_Seek(void* self, intptr_t slot); +bool QIODevice_virtualbase_Seek(void* self, long long pos); +void QIODevice_override_virtual_AtEnd(void* self, intptr_t slot); +bool QIODevice_virtualbase_AtEnd(const void* self); +void QIODevice_override_virtual_Reset(void* self, intptr_t slot); +bool QIODevice_virtualbase_Reset(void* self); +void QIODevice_override_virtual_BytesAvailable(void* self, intptr_t slot); +long long QIODevice_virtualbase_BytesAvailable(const void* self); +void QIODevice_override_virtual_BytesToWrite(void* self, intptr_t slot); +long long QIODevice_virtualbase_BytesToWrite(const void* self); +void QIODevice_override_virtual_CanReadLine(void* self, intptr_t slot); +bool QIODevice_virtualbase_CanReadLine(const void* self); +void QIODevice_override_virtual_WaitForReadyRead(void* self, intptr_t slot); +bool QIODevice_virtualbase_WaitForReadyRead(void* self, int msecs); +void QIODevice_override_virtual_WaitForBytesWritten(void* self, intptr_t slot); +bool QIODevice_virtualbase_WaitForBytesWritten(void* self, int msecs); +void QIODevice_override_virtual_ReadData(void* self, intptr_t slot); +long long QIODevice_virtualbase_ReadData(void* self, char* data, long long maxlen); +void QIODevice_override_virtual_ReadLineData(void* self, intptr_t slot); +long long QIODevice_virtualbase_ReadLineData(void* self, char* data, long long maxlen); +void QIODevice_override_virtual_SkipData(void* self, intptr_t slot); +long long QIODevice_virtualbase_SkipData(void* self, long long maxSize); +void QIODevice_override_virtual_WriteData(void* self, intptr_t slot); +long long QIODevice_virtualbase_WriteData(void* self, const char* data, long long lenVal); +void QIODevice_override_virtual_Event(void* self, intptr_t slot); +bool QIODevice_virtualbase_Event(void* self, QEvent* event); +void QIODevice_override_virtual_EventFilter(void* self, intptr_t slot); +bool QIODevice_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QIODevice_override_virtual_TimerEvent(void* self, intptr_t slot); +void QIODevice_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QIODevice_override_virtual_ChildEvent(void* self, intptr_t slot); +void QIODevice_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QIODevice_override_virtual_CustomEvent(void* self, intptr_t slot); +void QIODevice_virtualbase_CustomEvent(void* self, QEvent* event); +void QIODevice_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QIODevice_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QIODevice_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QIODevice_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QIODevice_Delete(QIODevice* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qitemselectionmodel.cpp b/qt6/gen_qitemselectionmodel.cpp index cd2d958b..fc76707a 100644 --- a/qt6/gen_qitemselectionmodel.cpp +++ b/qt6/gen_qitemselectionmodel.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -203,6 +204,34 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__Select2 = 0; + + // Subclass to allow providing a Go implementation + virtual void select(const QItemSelection& selection, QItemSelectionModel::SelectionFlags command) override { + if (handle__Select2 == 0) { + QItemSelectionModel::select(selection, command); + return; + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + QItemSelectionModel::SelectionFlags command_ret = command; + int sigval2 = static_cast(command_ret); + + miqt_exec_callback_QItemSelectionModel_Select2(this, handle__Select2, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Select2(QItemSelection* selection, int command) { + + QItemSelectionModel::select(*selection, static_cast(command)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__Clear = 0; @@ -549,6 +578,10 @@ struct miqt_array /* of QModelIndex* */ QItemSelectionModel_SelectedColumns(con return _out; } +QItemSelection* QItemSelectionModel_Selection(const QItemSelectionModel* self) { + return new QItemSelection(self->selection()); +} + QAbstractItemModel* QItemSelectionModel_Model(const QItemSelectionModel* self) { return (QAbstractItemModel*) self->model(); } @@ -569,6 +602,10 @@ void QItemSelectionModel_Select(QItemSelectionModel* self, QModelIndex* index, i self->select(*index, static_cast(command)); } +void QItemSelectionModel_Select2(QItemSelectionModel* self, QItemSelection* selection, int command) { + self->select(*selection, static_cast(command)); +} + void QItemSelectionModel_Clear(QItemSelectionModel* self) { self->clear(); } @@ -585,6 +622,22 @@ void QItemSelectionModel_ClearCurrentIndex(QItemSelectionModel* self) { self->clearCurrentIndex(); } +void QItemSelectionModel_SelectionChanged(QItemSelectionModel* self, QItemSelection* selected, QItemSelection* deselected) { + self->selectionChanged(*selected, *deselected); +} + +void QItemSelectionModel_connect_SelectionChanged(QItemSelectionModel* self, intptr_t slot) { + MiqtVirtualQItemSelectionModel::connect(self, static_cast(&QItemSelectionModel::selectionChanged), self, [=](const QItemSelection& selected, const QItemSelection& deselected) { + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + miqt_exec_callback_QItemSelectionModel_SelectionChanged(slot, sigval1, sigval2); + }); +} + void QItemSelectionModel_CurrentChanged(QItemSelectionModel* self, QModelIndex* current, QModelIndex* previous) { self->currentChanged(*current, *previous); } @@ -724,6 +777,14 @@ void QItemSelectionModel_virtualbase_Select(void* self, QModelIndex* index, int ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_Select(index, command); } +void QItemSelectionModel_override_virtual_Select2(void* self, intptr_t slot) { + dynamic_cast( (QItemSelectionModel*)(self) )->handle__Select2 = slot; +} + +void QItemSelectionModel_virtualbase_Select2(void* self, QItemSelection* selection, int command) { + ( (MiqtVirtualQItemSelectionModel*)(self) )->virtualbase_Select2(selection, command); +} + void QItemSelectionModel_override_virtual_Clear(void* self, intptr_t slot) { dynamic_cast( (QItemSelectionModel*)(self) )->handle__Clear = slot; } @@ -812,3 +873,55 @@ void QItemSelectionModel_Delete(QItemSelectionModel* self, bool isSubclass) { } } +void QItemSelection_new(QModelIndex* topLeft, QModelIndex* bottomRight, QItemSelection** outptr_QItemSelection) { + QItemSelection* ret = new QItemSelection(*topLeft, *bottomRight); + *outptr_QItemSelection = ret; +} + +void QItemSelection_new2(QItemSelection** outptr_QItemSelection) { + QItemSelection* ret = new QItemSelection(); + *outptr_QItemSelection = ret; +} + +void QItemSelection_new3(QItemSelection* param1, QItemSelection** outptr_QItemSelection) { + QItemSelection* ret = new QItemSelection(*param1); + *outptr_QItemSelection = ret; +} + +void QItemSelection_Select(QItemSelection* self, QModelIndex* topLeft, QModelIndex* bottomRight) { + self->select(*topLeft, *bottomRight); +} + +bool QItemSelection_Contains(const QItemSelection* self, QModelIndex* index) { + return self->contains(*index); +} + +struct miqt_array /* of QModelIndex* */ QItemSelection_Indexes(const QItemSelection* self) { + QModelIndexList _ret = self->indexes(); + // 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 QItemSelection_Merge(QItemSelection* self, QItemSelection* other, int command) { + self->merge(*other, static_cast(command)); +} + +void QItemSelection_Split(QItemSelectionRange* rangeVal, QItemSelectionRange* other, QItemSelection* result) { + QItemSelection::split(*rangeVal, *other, result); +} + +void QItemSelection_Delete(QItemSelection* 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 1291d06d..ec07dde6 100644 --- a/qt6/gen_qitemselectionmodel.go +++ b/qt6/gen_qitemselectionmodel.go @@ -376,6 +376,13 @@ func (this *QItemSelectionModel) SelectedColumns() []QModelIndex { return _ret } +func (this *QItemSelectionModel) Selection() *QItemSelection { + _ret := C.QItemSelectionModel_Selection(this.h) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QItemSelectionModel) Model() *QAbstractItemModel { return UnsafeNewQAbstractItemModel(unsafe.Pointer(C.QItemSelectionModel_Model(this.h)), nil) } @@ -396,6 +403,10 @@ func (this *QItemSelectionModel) Select(index *QModelIndex, command QItemSelecti C.QItemSelectionModel_Select(this.h, index.cPointer(), (C.int)(command)) } +func (this *QItemSelectionModel) Select2(selection *QItemSelection, command QItemSelectionModel__SelectionFlag) { + C.QItemSelectionModel_Select2(this.h, selection.cPointer(), (C.int)(command)) +} + func (this *QItemSelectionModel) Clear() { C.QItemSelectionModel_Clear(this.h) } @@ -412,6 +423,27 @@ func (this *QItemSelectionModel) ClearCurrentIndex() { C.QItemSelectionModel_ClearCurrentIndex(this.h) } +func (this *QItemSelectionModel) SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + C.QItemSelectionModel_SelectionChanged(this.h, selected.cPointer(), deselected.cPointer()) +} +func (this *QItemSelectionModel) OnSelectionChanged(slot func(selected *QItemSelection, deselected *QItemSelection)) { + C.QItemSelectionModel_connect_SelectionChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_SelectionChanged +func miqt_exec_callback_QItemSelectionModel_SelectionChanged(cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc(slotval1, slotval2) +} + func (this *QItemSelectionModel) CurrentChanged(current *QModelIndex, previous *QModelIndex) { C.QItemSelectionModel_CurrentChanged(this.h, current.cPointer(), previous.cPointer()) } @@ -607,6 +639,30 @@ func miqt_exec_callback_QItemSelectionModel_Select(self *C.QItemSelectionModel, } +func (this *QItemSelectionModel) callVirtualBase_Select2(selection *QItemSelection, command QItemSelectionModel__SelectionFlag) { + + C.QItemSelectionModel_virtualbase_Select2(unsafe.Pointer(this.h), selection.cPointer(), (C.int)(command)) + +} +func (this *QItemSelectionModel) OnSelect2(slot func(super func(selection *QItemSelection, command QItemSelectionModel__SelectionFlag), selection *QItemSelection, command QItemSelectionModel__SelectionFlag)) { + C.QItemSelectionModel_override_virtual_Select2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QItemSelectionModel_Select2 +func miqt_exec_callback_QItemSelectionModel_Select2(self *C.QItemSelectionModel, cb C.intptr_t, selection *C.QItemSelection, command C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection, command QItemSelectionModel__SelectionFlag), selection *QItemSelection, command QItemSelectionModel__SelectionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + slotval2 := (QItemSelectionModel__SelectionFlag)(command) + + gofunc((&QItemSelectionModel{h: self}).callVirtualBase_Select2, slotval1, slotval2) + +} + func (this *QItemSelectionModel) callVirtualBase_Clear() { C.QItemSelectionModel_virtualbase_Clear(unsafe.Pointer(this.h)) @@ -846,3 +902,114 @@ func (this *QItemSelectionModel) GoGC() { runtime.KeepAlive(this.h) }) } + +type QItemSelection struct { + h *C.QItemSelection + isSubclass bool + /* Also inherits unprojectable QList */ + +} + +func (this *QItemSelection) cPointer() *C.QItemSelection { + if this == nil { + return nil + } + return this.h +} + +func (this *QItemSelection) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQItemSelection constructs the type using only CGO pointers. +func newQItemSelection(h *C.QItemSelection) *QItemSelection { + if h == nil { + return nil + } + return &QItemSelection{h: h} +} + +// UnsafeNewQItemSelection constructs the type using only unsafe pointers. +func UnsafeNewQItemSelection(h unsafe.Pointer) *QItemSelection { + if h == nil { + return nil + } + + return &QItemSelection{h: (*C.QItemSelection)(h)} +} + +// NewQItemSelection constructs a new QItemSelection object. +func NewQItemSelection(topLeft *QModelIndex, bottomRight *QModelIndex) *QItemSelection { + var outptr_QItemSelection *C.QItemSelection = nil + + C.QItemSelection_new(topLeft.cPointer(), bottomRight.cPointer(), &outptr_QItemSelection) + ret := newQItemSelection(outptr_QItemSelection) + ret.isSubclass = true + return ret +} + +// NewQItemSelection2 constructs a new QItemSelection object. +func NewQItemSelection2() *QItemSelection { + var outptr_QItemSelection *C.QItemSelection = nil + + C.QItemSelection_new2(&outptr_QItemSelection) + ret := newQItemSelection(outptr_QItemSelection) + ret.isSubclass = true + return ret +} + +// NewQItemSelection3 constructs a new QItemSelection object. +func NewQItemSelection3(param1 *QItemSelection) *QItemSelection { + var outptr_QItemSelection *C.QItemSelection = nil + + C.QItemSelection_new3(param1.cPointer(), &outptr_QItemSelection) + ret := newQItemSelection(outptr_QItemSelection) + ret.isSubclass = true + return ret +} + +func (this *QItemSelection) Select(topLeft *QModelIndex, bottomRight *QModelIndex) { + C.QItemSelection_Select(this.h, topLeft.cPointer(), bottomRight.cPointer()) +} + +func (this *QItemSelection) Contains(index *QModelIndex) bool { + return (bool)(C.QItemSelection_Contains(this.h, index.cPointer())) +} + +func (this *QItemSelection) Indexes() []QModelIndex { + var _ma C.struct_miqt_array = C.QItemSelection_Indexes(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 *QItemSelection) Merge(other *QItemSelection, command QItemSelectionModel__SelectionFlag) { + C.QItemSelection_Merge(this.h, other.cPointer(), (C.int)(command)) +} + +func QItemSelection_Split(rangeVal *QItemSelectionRange, other *QItemSelectionRange, result *QItemSelection) { + C.QItemSelection_Split(rangeVal.cPointer(), other.cPointer(), result.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QItemSelection) Delete() { + C.QItemSelection_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 *QItemSelection) GoGC() { + runtime.SetFinalizer(this, func(this *QItemSelection) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/gen_qitemselectionmodel.h b/qt6/gen_qitemselectionmodel.h index 2540fef1..99c6264e 100644 --- a/qt6/gen_qitemselectionmodel.h +++ b/qt6/gen_qitemselectionmodel.h @@ -18,6 +18,7 @@ extern "C" { class QAbstractItemModel; class QChildEvent; class QEvent; +class QItemSelection; class QItemSelectionModel; class QItemSelectionRange; class QMetaMethod; @@ -30,6 +31,7 @@ class QTimerEvent; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QItemSelectionRange QItemSelectionRange; typedef struct QMetaMethod QMetaMethod; @@ -82,15 +84,19 @@ bool QItemSelectionModel_HasSelection(const QItemSelectionModel* self); struct miqt_array /* of QModelIndex* */ QItemSelectionModel_SelectedIndexes(const QItemSelectionModel* self); struct miqt_array /* of QModelIndex* */ QItemSelectionModel_SelectedRows(const QItemSelectionModel* self); struct miqt_array /* of QModelIndex* */ QItemSelectionModel_SelectedColumns(const QItemSelectionModel* self); +QItemSelection* QItemSelectionModel_Selection(const QItemSelectionModel* self); QAbstractItemModel* QItemSelectionModel_Model(const QItemSelectionModel* self); QAbstractItemModel* QItemSelectionModel_Model2(QItemSelectionModel* self); void QItemSelectionModel_SetModel(QItemSelectionModel* self, QAbstractItemModel* model); void QItemSelectionModel_SetCurrentIndex(QItemSelectionModel* self, QModelIndex* index, int command); void QItemSelectionModel_Select(QItemSelectionModel* self, QModelIndex* index, int command); +void QItemSelectionModel_Select2(QItemSelectionModel* self, QItemSelection* selection, int command); void QItemSelectionModel_Clear(QItemSelectionModel* self); void QItemSelectionModel_Reset(QItemSelectionModel* self); void QItemSelectionModel_ClearSelection(QItemSelectionModel* self); void QItemSelectionModel_ClearCurrentIndex(QItemSelectionModel* self); +void QItemSelectionModel_SelectionChanged(QItemSelectionModel* self, QItemSelection* selected, QItemSelection* deselected); +void QItemSelectionModel_connect_SelectionChanged(QItemSelectionModel* self, intptr_t slot); void QItemSelectionModel_CurrentChanged(QItemSelectionModel* self, QModelIndex* current, QModelIndex* previous); void QItemSelectionModel_connect_CurrentChanged(QItemSelectionModel* self, intptr_t slot); void QItemSelectionModel_CurrentRowChanged(QItemSelectionModel* self, QModelIndex* current, QModelIndex* previous); @@ -111,6 +117,8 @@ void QItemSelectionModel_override_virtual_SetCurrentIndex(void* self, intptr_t s 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_Select2(void* self, intptr_t slot); +void QItemSelectionModel_virtualbase_Select2(void* self, QItemSelection* selection, 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); @@ -133,6 +141,16 @@ void QItemSelectionModel_override_virtual_DisconnectNotify(void* self, intptr_t void QItemSelectionModel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QItemSelectionModel_Delete(QItemSelectionModel* self, bool isSubclass); +void QItemSelection_new(QModelIndex* topLeft, QModelIndex* bottomRight, QItemSelection** outptr_QItemSelection); +void QItemSelection_new2(QItemSelection** outptr_QItemSelection); +void QItemSelection_new3(QItemSelection* param1, QItemSelection** outptr_QItemSelection); +void QItemSelection_Select(QItemSelection* self, QModelIndex* topLeft, QModelIndex* bottomRight); +bool QItemSelection_Contains(const QItemSelection* self, QModelIndex* index); +struct miqt_array /* of QModelIndex* */ QItemSelection_Indexes(const QItemSelection* self); +void QItemSelection_Merge(QItemSelection* self, QItemSelection* other, int command); +void QItemSelection_Split(QItemSelectionRange* rangeVal, QItemSelectionRange* other, QItemSelection* result); +void QItemSelection_Delete(QItemSelection* self, bool isSubclass); + #ifdef __cplusplus } /* extern C */ #endif diff --git a/qt6/gen_qlayout.cpp b/qt6/gen_qlayout.cpp index dd92835a..8a95d24d 100644 --- a/qt6/gen_qlayout.cpp +++ b/qt6/gen_qlayout.cpp @@ -1,19 +1,731 @@ #include +#include #include #include #include +#include #include #include #include #include +#include #include #include #include +#include #include #include #include "gen_qlayout.h" #include "_cgo_export.h" +class MiqtVirtualQLayout : public virtual QLayout { +public: + + MiqtVirtualQLayout(QWidget* parent): QLayout(parent) {}; + MiqtVirtualQLayout(): QLayout() {}; + + virtual ~MiqtVirtualQLayout() = 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 QLayout::spacing(); + } + + + int callback_return_value = miqt_exec_callback_QLayout_Spacing(const_cast(this), handle__Spacing); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Spacing() const { + + return QLayout::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) { + QLayout::setSpacing(spacing); + return; + } + + int sigval1 = spacing; + + miqt_exec_callback_QLayout_SetSpacing(this, handle__SetSpacing, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetSpacing(int spacing) { + + QLayout::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) { + QLayout::invalidate(); + return; + } + + + miqt_exec_callback_QLayout_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QLayout::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 QLayout::geometry(); + } + + + QRect* callback_return_value = miqt_exec_callback_QLayout_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRect* virtualbase_Geometry() const { + + return new QRect(QLayout::geometry()); + + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + QLayoutItem* sigval1 = param1; + + miqt_exec_callback_QLayout_AddItem(this, handle__AddItem, sigval1); + + + } + + // 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 QLayout::expandingDirections(); + } + + + int callback_return_value = miqt_exec_callback_QLayout_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 = QLayout::expandingDirections(); + return static_cast(_ret); + + } + + // 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 QLayout::minimumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QLayout_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSize() const { + + return new QSize(QLayout::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 QLayout::maximumSize(); + } + + + QSize* callback_return_value = miqt_exec_callback_QLayout_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MaximumSize() const { + + return new QSize(QLayout::maximumSize()); + + } + + // 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) { + QLayout::setGeometry(geometry); + return; + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QLayout_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRect* geometry) { + + QLayout::setGeometry(*geometry); + + } + + // 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 nullptr; // Pure virtual, there is no base we can call + } + + int sigval1 = index; + + QLayoutItem* callback_return_value = miqt_exec_callback_QLayout_ItemAt(const_cast(this), handle__ItemAt, sigval1); + + return callback_return_value; + } + + // 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 nullptr; // Pure virtual, there is no base we can call + } + + int sigval1 = index; + + QLayoutItem* callback_return_value = miqt_exec_callback_QLayout_TakeAt(this, handle__TakeAt, sigval1); + + return callback_return_value; + } + + // 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 QLayout::indexOf(param1); + } + + QWidget* sigval1 = (QWidget*) param1; + + int callback_return_value = miqt_exec_callback_QLayout_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 QLayout::indexOf(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__IndexOfWithQLayoutItem = 0; + + // Subclass to allow providing a Go implementation + virtual int indexOf(const QLayoutItem* param1) const override { + if (handle__IndexOfWithQLayoutItem == 0) { + return QLayout::indexOf(param1); + } + + QLayoutItem* sigval1 = (QLayoutItem*) param1; + + int callback_return_value = miqt_exec_callback_QLayout_IndexOfWithQLayoutItem(const_cast(this), handle__IndexOfWithQLayoutItem, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_IndexOfWithQLayoutItem(QLayoutItem* param1) const { + + return QLayout::indexOf(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 0; // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QLayout_Count(const_cast(this), handle__Count); + + return static_cast(callback_return_value); + } + + // 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 QLayout::isEmpty(); + } + + + bool callback_return_value = miqt_exec_callback_QLayout_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_IsEmpty() const { + + return QLayout::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 QLayout::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QLayout_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 = QLayout::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 QLayout::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_QLayout_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 QLayout::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 QLayout::layout(); + } + + + QLayout* callback_return_value = miqt_exec_callback_QLayout_Layout(this, handle__Layout); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayout* virtualbase_Layout() { + + return QLayout::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) { + QLayout::childEvent(e); + return; + } + + QChildEvent* sigval1 = e; + + miqt_exec_callback_QLayout_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* e) { + + QLayout::childEvent(e); + + } + + // 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 QLayout::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QLayout_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QLayout::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 QLayout::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QLayout_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QLayout::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) { + QLayout::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QLayout_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QLayout::timerEvent(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) { + QLayout::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QLayout_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QLayout::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) { + QLayout::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QLayout_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QLayout::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) { + QLayout::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QLayout_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QLayout::disconnectNotify(*signal); + + } + + // 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 QSize(); // Pure virtual, there is no base we can call + } + + + QSize* callback_return_value = miqt_exec_callback_QLayout_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // 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 QLayout::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QLayout_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QLayout::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 QLayout::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QLayout_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 QLayout::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 QLayout::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QLayout_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 QLayout::minimumHeightForWidth(static_cast(param1)); + + } + + // 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 QLayout::widget(); + } + + + QWidget* callback_return_value = miqt_exec_callback_QLayout_Widget(const_cast(this), handle__Widget); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_Widget() const { + + return QLayout::widget(); + + } + + // 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 QLayout::spacerItem(); + } + + + QSpacerItem* callback_return_value = miqt_exec_callback_QLayout_SpacerItem(this, handle__SpacerItem); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QSpacerItem* virtualbase_SpacerItem() { + + return QLayout::spacerItem(); + + } + +}; + +void QLayout_new(QWidget* parent, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQLayout* ret = new MiqtVirtualQLayout(parent); + *outptr_QLayout = ret; + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); +} + +void QLayout_new2(QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQLayout* ret = new MiqtVirtualQLayout(); + *outptr_QLayout = ret; + *outptr_QObject = static_cast(ret); + *outptr_QLayoutItem = static_cast(ret); +} + QMetaObject* QLayout_MetaObject(const QLayout* self) { return (QMetaObject*) self->metaObject(); } @@ -234,9 +946,237 @@ struct miqt_string QLayout_Tr3(const char* s, const char* c, int n) { return _ms; } +void QLayout_override_virtual_Spacing(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__Spacing = slot; +} + +int QLayout_virtualbase_Spacing(const void* self) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_Spacing(); +} + +void QLayout_override_virtual_SetSpacing(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__SetSpacing = slot; +} + +void QLayout_virtualbase_SetSpacing(void* self, int spacing) { + ( (MiqtVirtualQLayout*)(self) )->virtualbase_SetSpacing(spacing); +} + +void QLayout_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__Invalidate = slot; +} + +void QLayout_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQLayout*)(self) )->virtualbase_Invalidate(); +} + +void QLayout_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__Geometry = slot; +} + +QRect* QLayout_virtualbase_Geometry(const void* self) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_Geometry(); +} + +void QLayout_override_virtual_AddItem(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__AddItem = slot; +} + +void QLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__ExpandingDirections = slot; +} + +int QLayout_virtualbase_ExpandingDirections(const void* self) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_ExpandingDirections(); +} + +void QLayout_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__MinimumSize = slot; +} + +QSize* QLayout_virtualbase_MinimumSize(const void* self) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_MinimumSize(); +} + +void QLayout_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__MaximumSize = slot; +} + +QSize* QLayout_virtualbase_MaximumSize(const void* self) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_MaximumSize(); +} + +void QLayout_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__SetGeometry = slot; +} + +void QLayout_virtualbase_SetGeometry(void* self, QRect* geometry) { + ( (MiqtVirtualQLayout*)(self) )->virtualbase_SetGeometry(geometry); +} + +void QLayout_override_virtual_ItemAt(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__ItemAt = slot; +} + +void QLayout_override_virtual_TakeAt(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__TakeAt = slot; +} + +void QLayout_override_virtual_IndexOf(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__IndexOf = slot; +} + +int QLayout_virtualbase_IndexOf(const void* self, QWidget* param1) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_IndexOf(param1); +} + +void QLayout_override_virtual_IndexOfWithQLayoutItem(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__IndexOfWithQLayoutItem = slot; +} + +int QLayout_virtualbase_IndexOfWithQLayoutItem(const void* self, QLayoutItem* param1) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_IndexOfWithQLayoutItem(param1); +} + +void QLayout_override_virtual_Count(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__Count = slot; +} + +void QLayout_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__IsEmpty = slot; +} + +bool QLayout_virtualbase_IsEmpty(const void* self) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_IsEmpty(); +} + +void QLayout_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__ControlTypes = slot; +} + +int QLayout_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_ControlTypes(); +} + +void QLayout_override_virtual_ReplaceWidget(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__ReplaceWidget = slot; +} + +QLayoutItem* QLayout_virtualbase_ReplaceWidget(void* self, QWidget* from, QWidget* to, int options) { + return ( (MiqtVirtualQLayout*)(self) )->virtualbase_ReplaceWidget(from, to, options); +} + +void QLayout_override_virtual_Layout(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__Layout = slot; +} + +QLayout* QLayout_virtualbase_Layout(void* self) { + return ( (MiqtVirtualQLayout*)(self) )->virtualbase_Layout(); +} + +void QLayout_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__ChildEvent = slot; +} + +void QLayout_virtualbase_ChildEvent(void* self, QChildEvent* e) { + ( (MiqtVirtualQLayout*)(self) )->virtualbase_ChildEvent(e); +} + +void QLayout_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__Event = slot; +} + +bool QLayout_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQLayout*)(self) )->virtualbase_Event(event); +} + +void QLayout_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__EventFilter = slot; +} + +bool QLayout_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQLayout*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QLayout_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__TimerEvent = slot; +} + +void QLayout_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQLayout*)(self) )->virtualbase_TimerEvent(event); +} + +void QLayout_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__CustomEvent = slot; +} + +void QLayout_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQLayout*)(self) )->virtualbase_CustomEvent(event); +} + +void QLayout_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__ConnectNotify = slot; +} + +void QLayout_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQLayout*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QLayout_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__DisconnectNotify = slot; +} + +void QLayout_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQLayout*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QLayout_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__SizeHint = slot; +} + +void QLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QLayout_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QLayout_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__HeightForWidth = slot; +} + +int QLayout_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QLayout_override_virtual_Widget(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__Widget = slot; +} + +QWidget* QLayout_virtualbase_Widget(const void* self) { + return ( (const MiqtVirtualQLayout*)(self) )->virtualbase_Widget(); +} + +void QLayout_override_virtual_SpacerItem(void* self, intptr_t slot) { + dynamic_cast( (QLayout*)(self) )->handle__SpacerItem = slot; +} + +QSpacerItem* QLayout_virtualbase_SpacerItem(void* self) { + return ( (MiqtVirtualQLayout*)(self) )->virtualbase_SpacerItem(); +} + void QLayout_Delete(QLayout* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qlayout.go b/qt6/gen_qlayout.go index bf291d2c..7b0bf6d6 100644 --- a/qt6/gen_qlayout.go +++ b/qt6/gen_qlayout.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -66,6 +67,30 @@ func UnsafeNewQLayout(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem QLayoutItem: UnsafeNewQLayoutItem(h_QLayoutItem)} } +// NewQLayout constructs a new QLayout object. +func NewQLayout(parent *QWidget) *QLayout { + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QLayout_new(parent.cPointer(), &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQLayout(outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret +} + +// NewQLayout2 constructs a new QLayout object. +func NewQLayout2() *QLayout { + var outptr_QLayout *C.QLayout = nil + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QLayout_new2(&outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) + ret := newQLayout(outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret.isSubclass = true + return ret +} + func (this *QLayout) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QLayout_MetaObject(this.h))) } @@ -310,6 +335,699 @@ func QLayout_Tr3(s string, c string, n int) string { return _ret } +func (this *QLayout) callVirtualBase_Spacing() int { + + return (int)(C.QLayout_virtualbase_Spacing(unsafe.Pointer(this.h))) + +} +func (this *QLayout) OnSpacing(slot func(super func() int) int) { + C.QLayout_override_virtual_Spacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_Spacing +func miqt_exec_callback_QLayout_Spacing(self *C.QLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLayout{h: self}).callVirtualBase_Spacing) + + return (C.int)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_SetSpacing(spacing int) { + + C.QLayout_virtualbase_SetSpacing(unsafe.Pointer(this.h), (C.int)(spacing)) + +} +func (this *QLayout) OnSetSpacing(slot func(super func(spacing int), spacing int)) { + C.QLayout_override_virtual_SetSpacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_SetSpacing +func miqt_exec_callback_QLayout_SetSpacing(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_SetSpacing, slotval1) + +} + +func (this *QLayout) callVirtualBase_Invalidate() { + + C.QLayout_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QLayout) OnInvalidate(slot func(super func())) { + C.QLayout_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_Invalidate +func miqt_exec_callback_QLayout_Invalidate(self *C.QLayout, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QLayout{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QLayout) callVirtualBase_Geometry() *QRect { + + _ret := C.QLayout_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 *QLayout) OnGeometry(slot func(super func() *QRect) *QRect) { + C.QLayout_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_Geometry +func miqt_exec_callback_QLayout_Geometry(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_Geometry) + + return virtualReturn.cPointer() + +} +func (this *QLayout) OnAddItem(slot func(param1 *QLayoutItem)) { + C.QLayout_override_virtual_AddItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_AddItem +func miqt_exec_callback_QLayout_AddItem(self *C.QLayout, cb C.intptr_t, param1 *C.QLayoutItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + +} + +func (this *QLayout) callVirtualBase_ExpandingDirections() Orientation { + + return (Orientation)(C.QLayout_virtualbase_ExpandingDirections(unsafe.Pointer(this.h))) + +} +func (this *QLayout) OnExpandingDirections(slot func(super func() Orientation) Orientation) { + C.QLayout_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_ExpandingDirections +func miqt_exec_callback_QLayout_ExpandingDirections(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_ExpandingDirections) + + return (C.int)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_MinimumSize() *QSize { + + _ret := C.QLayout_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 *QLayout) OnMinimumSize(slot func(super func() *QSize) *QSize) { + C.QLayout_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_MinimumSize +func miqt_exec_callback_QLayout_MinimumSize(self *C.QLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLayout{h: self}).callVirtualBase_MinimumSize) + + return virtualReturn.cPointer() + +} + +func (this *QLayout) callVirtualBase_MaximumSize() *QSize { + + _ret := C.QLayout_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 *QLayout) OnMaximumSize(slot func(super func() *QSize) *QSize) { + C.QLayout_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_MaximumSize +func miqt_exec_callback_QLayout_MaximumSize(self *C.QLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QSize) *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLayout{h: self}).callVirtualBase_MaximumSize) + + return virtualReturn.cPointer() + +} + +func (this *QLayout) callVirtualBase_SetGeometry(geometry *QRect) { + + C.QLayout_virtualbase_SetGeometry(unsafe.Pointer(this.h), geometry.cPointer()) + +} +func (this *QLayout) OnSetGeometry(slot func(super func(geometry *QRect), geometry *QRect)) { + C.QLayout_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_SetGeometry +func miqt_exec_callback_QLayout_SetGeometry(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_SetGeometry, slotval1) + +} +func (this *QLayout) OnItemAt(slot func(index int) *QLayoutItem) { + C.QLayout_override_virtual_ItemAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_ItemAt +func miqt_exec_callback_QLayout_ItemAt(self *C.QLayout, cb C.intptr_t, index C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} +func (this *QLayout) OnTakeAt(slot func(index int) *QLayoutItem) { + C.QLayout_override_virtual_TakeAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_TakeAt +func miqt_exec_callback_QLayout_TakeAt(self *C.QLayout, cb C.intptr_t, index C.int) *C.QLayoutItem { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QLayout) callVirtualBase_IndexOf(param1 *QWidget) int { + + return (int)(C.QLayout_virtualbase_IndexOf(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QLayout) OnIndexOf(slot func(super func(param1 *QWidget) int, param1 *QWidget) int) { + C.QLayout_override_virtual_IndexOf(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_IndexOf +func miqt_exec_callback_QLayout_IndexOf(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_IndexOf, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_IndexOfWithQLayoutItem(param1 *QLayoutItem) int { + + return (int)(C.QLayout_virtualbase_IndexOfWithQLayoutItem(unsafe.Pointer(this.h), param1.cPointer())) + +} +func (this *QLayout) OnIndexOfWithQLayoutItem(slot func(super func(param1 *QLayoutItem) int, param1 *QLayoutItem) int) { + C.QLayout_override_virtual_IndexOfWithQLayoutItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_IndexOfWithQLayoutItem +func miqt_exec_callback_QLayout_IndexOfWithQLayoutItem(self *C.QLayout, cb C.intptr_t, param1 *C.QLayoutItem) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *QLayoutItem) int, param1 *QLayoutItem) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLayoutItem(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QLayout{h: self}).callVirtualBase_IndexOfWithQLayoutItem, slotval1) + + return (C.int)(virtualReturn) + +} +func (this *QLayout) OnCount(slot func() int) { + C.QLayout_override_virtual_Count(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_Count +func miqt_exec_callback_QLayout_Count(self *C.QLayout, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_IsEmpty() bool { + + return (bool)(C.QLayout_virtualbase_IsEmpty(unsafe.Pointer(this.h))) + +} +func (this *QLayout) OnIsEmpty(slot func(super func() bool) bool) { + C.QLayout_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_IsEmpty +func miqt_exec_callback_QLayout_IsEmpty(self *C.QLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLayout{h: self}).callVirtualBase_IsEmpty) + + return (C.bool)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QLayout_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QLayout) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QLayout_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_ControlTypes +func miqt_exec_callback_QLayout_ControlTypes(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_ReplaceWidget(from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem { + + return UnsafeNewQLayoutItem(unsafe.Pointer(C.QLayout_virtualbase_ReplaceWidget(unsafe.Pointer(this.h), from.cPointer(), to.cPointer(), (C.int)(options)))) +} +func (this *QLayout) OnReplaceWidget(slot func(super func(from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem, from *QWidget, to *QWidget, options FindChildOption) *QLayoutItem) { + C.QLayout_override_virtual_ReplaceWidget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_ReplaceWidget +func miqt_exec_callback_QLayout_ReplaceWidget(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_ReplaceWidget, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QLayout) callVirtualBase_Layout() *QLayout { + + return UnsafeNewQLayout(unsafe.Pointer(C.QLayout_virtualbase_Layout(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { + C.QLayout_override_virtual_Layout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_Layout +func miqt_exec_callback_QLayout_Layout(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_Layout) + + return virtualReturn.cPointer() + +} + +func (this *QLayout) callVirtualBase_ChildEvent(e *QChildEvent) { + + C.QLayout_virtualbase_ChildEvent(unsafe.Pointer(this.h), e.cPointer()) + +} +func (this *QLayout) OnChildEvent(slot func(super func(e *QChildEvent), e *QChildEvent)) { + C.QLayout_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_ChildEvent +func miqt_exec_callback_QLayout_ChildEvent(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QLayout) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QLayout_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QLayout) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QLayout_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_Event +func miqt_exec_callback_QLayout_Event(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QLayout_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QLayout) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QLayout_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_EventFilter +func miqt_exec_callback_QLayout_EventFilter(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QLayout_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLayout) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QLayout_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_TimerEvent +func miqt_exec_callback_QLayout_TimerEvent(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QLayout) callVirtualBase_CustomEvent(event *QEvent) { + + C.QLayout_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QLayout) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QLayout_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_CustomEvent +func miqt_exec_callback_QLayout_CustomEvent(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QLayout) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QLayout_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QLayout) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QLayout_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_ConnectNotify +func miqt_exec_callback_QLayout_ConnectNotify(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QLayout) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QLayout_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QLayout) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QLayout_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_DisconnectNotify +func miqt_exec_callback_QLayout_DisconnectNotify(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} +func (this *QLayout) OnSizeHint(slot func() *QSize) { + C.QLayout_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_SizeHint +func miqt_exec_callback_QLayout_SizeHint(self *C.QLayout, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func() *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} + +func (this *QLayout) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QLayout_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QLayout) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QLayout_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_HasHeightForWidth +func miqt_exec_callback_QLayout_HasHeightForWidth(self *C.QLayout, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLayout{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QLayout_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QLayout) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QLayout_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_HeightForWidth +func miqt_exec_callback_QLayout_HeightForWidth(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QLayout_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QLayout) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QLayout_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_MinimumHeightForWidth +func miqt_exec_callback_QLayout_MinimumHeightForWidth(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QLayout) callVirtualBase_Widget() *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QLayout_virtualbase_Widget(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QLayout) OnWidget(slot func(super func() *QWidget) *QWidget) { + C.QLayout_override_virtual_Widget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_Widget +func miqt_exec_callback_QLayout_Widget(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_Widget) + + return virtualReturn.cPointer() + +} + +func (this *QLayout) callVirtualBase_SpacerItem() *QSpacerItem { + + return UnsafeNewQSpacerItem(unsafe.Pointer(C.QLayout_virtualbase_SpacerItem(unsafe.Pointer(this.h))), nil) +} +func (this *QLayout) OnSpacerItem(slot func(super func() *QSpacerItem) *QSpacerItem) { + C.QLayout_override_virtual_SpacerItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayout_SpacerItem +func miqt_exec_callback_QLayout_SpacerItem(self *C.QLayout, 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((&QLayout{h: self}).callVirtualBase_SpacerItem) + + return virtualReturn.cPointer() + +} + // Delete this object from C++ memory. func (this *QLayout) Delete() { C.QLayout_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qlayout.h b/qt6/gen_qlayout.h index 3c580843..a84a62eb 100644 --- a/qt6/gen_qlayout.h +++ b/qt6/gen_qlayout.h @@ -16,26 +16,36 @@ extern "C" { #ifdef __cplusplus class QChildEvent; +class QEvent; class QLayout; class QLayoutItem; class QMargins; +class QMetaMethod; class QMetaObject; class QObject; class QRect; class QSize; +class QSpacerItem; +class QTimerEvent; class QWidget; #else typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QLayout QLayout; typedef struct QLayoutItem QLayoutItem; typedef struct QMargins QMargins; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QRect QRect; typedef struct QSize QSize; +typedef struct QSpacerItem QSpacerItem; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif +void QLayout_new(QWidget* parent, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +void QLayout_new2(QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); QMetaObject* QLayout_MetaObject(const QLayout* self); void* QLayout_Metacast(QLayout* self, const char* param1); struct miqt_string QLayout_Tr(const char* s); @@ -86,6 +96,68 @@ 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); +void QLayout_override_virtual_Spacing(void* self, intptr_t slot); +int QLayout_virtualbase_Spacing(const void* self); +void QLayout_override_virtual_SetSpacing(void* self, intptr_t slot); +void QLayout_virtualbase_SetSpacing(void* self, int spacing); +void QLayout_override_virtual_Invalidate(void* self, intptr_t slot); +void QLayout_virtualbase_Invalidate(void* self); +void QLayout_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QLayout_virtualbase_Geometry(const void* self); +void QLayout_override_virtual_AddItem(void* self, intptr_t slot); +void QLayout_virtualbase_AddItem(void* self, QLayoutItem* param1); +void QLayout_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QLayout_virtualbase_ExpandingDirections(const void* self); +void QLayout_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QLayout_virtualbase_MinimumSize(const void* self); +void QLayout_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QLayout_virtualbase_MaximumSize(const void* self); +void QLayout_override_virtual_SetGeometry(void* self, intptr_t slot); +void QLayout_virtualbase_SetGeometry(void* self, QRect* geometry); +void QLayout_override_virtual_ItemAt(void* self, intptr_t slot); +QLayoutItem* QLayout_virtualbase_ItemAt(const void* self, int index); +void QLayout_override_virtual_TakeAt(void* self, intptr_t slot); +QLayoutItem* QLayout_virtualbase_TakeAt(void* self, int index); +void QLayout_override_virtual_IndexOf(void* self, intptr_t slot); +int QLayout_virtualbase_IndexOf(const void* self, QWidget* param1); +void QLayout_override_virtual_IndexOfWithQLayoutItem(void* self, intptr_t slot); +int QLayout_virtualbase_IndexOfWithQLayoutItem(const void* self, QLayoutItem* param1); +void QLayout_override_virtual_Count(void* self, intptr_t slot); +int QLayout_virtualbase_Count(const void* self); +void QLayout_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QLayout_virtualbase_IsEmpty(const void* self); +void QLayout_override_virtual_ControlTypes(void* self, intptr_t slot); +int QLayout_virtualbase_ControlTypes(const void* self); +void QLayout_override_virtual_ReplaceWidget(void* self, intptr_t slot); +QLayoutItem* QLayout_virtualbase_ReplaceWidget(void* self, QWidget* from, QWidget* to, int options); +void QLayout_override_virtual_Layout(void* self, intptr_t slot); +QLayout* QLayout_virtualbase_Layout(void* self); +void QLayout_override_virtual_ChildEvent(void* self, intptr_t slot); +void QLayout_virtualbase_ChildEvent(void* self, QChildEvent* e); +void QLayout_override_virtual_Event(void* self, intptr_t slot); +bool QLayout_virtualbase_Event(void* self, QEvent* event); +void QLayout_override_virtual_EventFilter(void* self, intptr_t slot); +bool QLayout_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QLayout_override_virtual_TimerEvent(void* self, intptr_t slot); +void QLayout_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QLayout_override_virtual_CustomEvent(void* self, intptr_t slot); +void QLayout_virtualbase_CustomEvent(void* self, QEvent* event); +void QLayout_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QLayout_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QLayout_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QLayout_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QLayout_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QLayout_virtualbase_SizeHint(const void* self); +void QLayout_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QLayout_virtualbase_HasHeightForWidth(const void* self); +void QLayout_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QLayout_virtualbase_HeightForWidth(const void* self, int param1); +void QLayout_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QLayout_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QLayout_override_virtual_Widget(void* self, intptr_t slot); +QWidget* QLayout_virtualbase_Widget(const void* self); +void QLayout_override_virtual_SpacerItem(void* self, intptr_t slot); +QSpacerItem* QLayout_virtualbase_SpacerItem(void* self); void QLayout_Delete(QLayout* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qlayoutitem.cpp b/qt6/gen_qlayoutitem.cpp index 8212b982..6b25d2e6 100644 --- a/qt6/gen_qlayoutitem.cpp +++ b/qt6/gen_qlayoutitem.cpp @@ -11,6 +11,320 @@ #include "gen_qlayoutitem.h" #include "_cgo_export.h" +class MiqtVirtualQLayoutItem : public virtual QLayoutItem { +public: + + MiqtVirtualQLayoutItem(): QLayoutItem() {}; + MiqtVirtualQLayoutItem(const QLayoutItem& param1): QLayoutItem(param1) {}; + MiqtVirtualQLayoutItem(Qt::Alignment alignment): QLayoutItem(alignment) {}; + + virtual ~MiqtVirtualQLayoutItem() = 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 QSize(); // Pure virtual, there is no base we can call + } + + + QSize* callback_return_value = miqt_exec_callback_QLayoutItem_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // 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 QSize(); // Pure virtual, there is no base we can call + } + + + QSize* callback_return_value = miqt_exec_callback_QLayoutItem_MinimumSize(const_cast(this), handle__MinimumSize); + + return *callback_return_value; + } + + // 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 QSize(); // Pure virtual, there is no base we can call + } + + + QSize* callback_return_value = miqt_exec_callback_QLayoutItem_MaximumSize(const_cast(this), handle__MaximumSize); + + return *callback_return_value; + } + + // 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 Qt::Orientations(); // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QLayoutItem_ExpandingDirections(const_cast(this), handle__ExpandingDirections); + + return static_cast(callback_return_value); + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + const QRect& geometry_ret = geometry; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geometry_ret); + + miqt_exec_callback_QLayoutItem_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // 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 QRect(); // Pure virtual, there is no base we can call + } + + + QRect* callback_return_value = miqt_exec_callback_QLayoutItem_Geometry(const_cast(this), handle__Geometry); + + return *callback_return_value; + } + + // 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 false; // Pure virtual, there is no base we can call + } + + + bool callback_return_value = miqt_exec_callback_QLayoutItem_IsEmpty(const_cast(this), handle__IsEmpty); + + return callback_return_value; + } + + // 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 QLayoutItem::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QLayoutItem_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QLayoutItem::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 QLayoutItem::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QLayoutItem_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 QLayoutItem::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 QLayoutItem::minimumHeightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QLayoutItem_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 QLayoutItem::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) { + QLayoutItem::invalidate(); + return; + } + + + miqt_exec_callback_QLayoutItem_Invalidate(this, handle__Invalidate); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Invalidate() { + + QLayoutItem::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 QLayoutItem::widget(); + } + + + QWidget* callback_return_value = miqt_exec_callback_QLayoutItem_Widget(const_cast(this), handle__Widget); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWidget* virtualbase_Widget() const { + + return QLayoutItem::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 QLayoutItem::layout(); + } + + + QLayout* callback_return_value = miqt_exec_callback_QLayoutItem_Layout(this, handle__Layout); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QLayout* virtualbase_Layout() { + + return QLayoutItem::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 QLayoutItem::spacerItem(); + } + + + QSpacerItem* callback_return_value = miqt_exec_callback_QLayoutItem_SpacerItem(this, handle__SpacerItem); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QSpacerItem* virtualbase_SpacerItem() { + + return QLayoutItem::spacerItem(); + + } + + // 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 QLayoutItem::controlTypes(); + } + + + int callback_return_value = miqt_exec_callback_QLayoutItem_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 = QLayoutItem::controlTypes(); + return static_cast(_ret); + + } + +}; + +void QLayoutItem_new(QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQLayoutItem* ret = new MiqtVirtualQLayoutItem(); + *outptr_QLayoutItem = ret; +} + +void QLayoutItem_new2(QLayoutItem* param1, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQLayoutItem* ret = new MiqtVirtualQLayoutItem(*param1); + *outptr_QLayoutItem = ret; +} + +void QLayoutItem_new3(int alignment, QLayoutItem** outptr_QLayoutItem) { + MiqtVirtualQLayoutItem* ret = new MiqtVirtualQLayoutItem(static_cast(alignment)); + *outptr_QLayoutItem = ret; +} + QSize* QLayoutItem_SizeHint(const QLayoutItem* self) { return new QSize(self->sizeHint()); } @@ -82,9 +396,101 @@ int QLayoutItem_ControlTypes(const QLayoutItem* self) { return static_cast(_ret); } +void QLayoutItem_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__SizeHint = slot; +} + +void QLayoutItem_override_virtual_MinimumSize(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__MinimumSize = slot; +} + +void QLayoutItem_override_virtual_MaximumSize(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__MaximumSize = slot; +} + +void QLayoutItem_override_virtual_ExpandingDirections(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__ExpandingDirections = slot; +} + +void QLayoutItem_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__SetGeometry = slot; +} + +void QLayoutItem_override_virtual_Geometry(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__Geometry = slot; +} + +void QLayoutItem_override_virtual_IsEmpty(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__IsEmpty = slot; +} + +void QLayoutItem_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QLayoutItem_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQLayoutItem*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QLayoutItem_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__HeightForWidth = slot; +} + +int QLayoutItem_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQLayoutItem*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QLayoutItem_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__MinimumHeightForWidth = slot; +} + +int QLayoutItem_virtualbase_MinimumHeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQLayoutItem*)(self) )->virtualbase_MinimumHeightForWidth(param1); +} + +void QLayoutItem_override_virtual_Invalidate(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__Invalidate = slot; +} + +void QLayoutItem_virtualbase_Invalidate(void* self) { + ( (MiqtVirtualQLayoutItem*)(self) )->virtualbase_Invalidate(); +} + +void QLayoutItem_override_virtual_Widget(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__Widget = slot; +} + +QWidget* QLayoutItem_virtualbase_Widget(const void* self) { + return ( (const MiqtVirtualQLayoutItem*)(self) )->virtualbase_Widget(); +} + +void QLayoutItem_override_virtual_Layout(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__Layout = slot; +} + +QLayout* QLayoutItem_virtualbase_Layout(void* self) { + return ( (MiqtVirtualQLayoutItem*)(self) )->virtualbase_Layout(); +} + +void QLayoutItem_override_virtual_SpacerItem(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__SpacerItem = slot; +} + +QSpacerItem* QLayoutItem_virtualbase_SpacerItem(void* self) { + return ( (MiqtVirtualQLayoutItem*)(self) )->virtualbase_SpacerItem(); +} + +void QLayoutItem_override_virtual_ControlTypes(void* self, intptr_t slot) { + dynamic_cast( (QLayoutItem*)(self) )->handle__ControlTypes = slot; +} + +int QLayoutItem_virtualbase_ControlTypes(const void* self) { + return ( (const MiqtVirtualQLayoutItem*)(self) )->virtualbase_ControlTypes(); +} + void QLayoutItem_Delete(QLayoutItem* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qlayoutitem.go b/qt6/gen_qlayoutitem.go index ec0c56f6..8a4d5e57 100644 --- a/qt6/gen_qlayoutitem.go +++ b/qt6/gen_qlayoutitem.go @@ -50,6 +50,36 @@ func UnsafeNewQLayoutItem(h unsafe.Pointer) *QLayoutItem { return &QLayoutItem{h: (*C.QLayoutItem)(h)} } +// NewQLayoutItem constructs a new QLayoutItem object. +func NewQLayoutItem() *QLayoutItem { + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QLayoutItem_new(&outptr_QLayoutItem) + ret := newQLayoutItem(outptr_QLayoutItem) + ret.isSubclass = true + return ret +} + +// NewQLayoutItem2 constructs a new QLayoutItem object. +func NewQLayoutItem2(param1 *QLayoutItem) *QLayoutItem { + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QLayoutItem_new2(param1.cPointer(), &outptr_QLayoutItem) + ret := newQLayoutItem(outptr_QLayoutItem) + ret.isSubclass = true + return ret +} + +// NewQLayoutItem3 constructs a new QLayoutItem object. +func NewQLayoutItem3(alignment AlignmentFlag) *QLayoutItem { + var outptr_QLayoutItem *C.QLayoutItem = nil + + C.QLayoutItem_new3((C.int)(alignment), &outptr_QLayoutItem) + ret := newQLayoutItem(outptr_QLayoutItem) + ret.isSubclass = true + return ret +} + func (this *QLayoutItem) SizeHint() *QSize { _ret := C.QLayoutItem_SizeHint(this.h) _goptr := newQSize(_ret) @@ -129,6 +159,296 @@ func (this *QLayoutItem) SetAlignment(a AlignmentFlag) { func (this *QLayoutItem) ControlTypes() QSizePolicy__ControlType { return (QSizePolicy__ControlType)(C.QLayoutItem_ControlTypes(this.h)) } +func (this *QLayoutItem) OnSizeHint(slot func() *QSize) { + C.QLayoutItem_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_SizeHint +func miqt_exec_callback_QLayoutItem_SizeHint(self *C.QLayoutItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func() *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} +func (this *QLayoutItem) OnMinimumSize(slot func() *QSize) { + C.QLayoutItem_override_virtual_MinimumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_MinimumSize +func miqt_exec_callback_QLayoutItem_MinimumSize(self *C.QLayoutItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func() *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} +func (this *QLayoutItem) OnMaximumSize(slot func() *QSize) { + C.QLayoutItem_override_virtual_MaximumSize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_MaximumSize +func miqt_exec_callback_QLayoutItem_MaximumSize(self *C.QLayoutItem, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func() *QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} +func (this *QLayoutItem) OnExpandingDirections(slot func() Orientation) { + C.QLayoutItem_override_virtual_ExpandingDirections(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_ExpandingDirections +func miqt_exec_callback_QLayoutItem_ExpandingDirections(self *C.QLayoutItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() Orientation) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} +func (this *QLayoutItem) OnSetGeometry(slot func(geometry *QRect)) { + C.QLayoutItem_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_SetGeometry +func miqt_exec_callback_QLayoutItem_SetGeometry(self *C.QLayoutItem, cb C.intptr_t, geometry *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + +} +func (this *QLayoutItem) OnGeometry(slot func() *QRect) { + C.QLayoutItem_override_virtual_Geometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_Geometry +func miqt_exec_callback_QLayoutItem_Geometry(self *C.QLayoutItem, cb C.intptr_t) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func() *QRect) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return virtualReturn.cPointer() + +} +func (this *QLayoutItem) OnIsEmpty(slot func() bool) { + C.QLayoutItem_override_virtual_IsEmpty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_IsEmpty +func miqt_exec_callback_QLayoutItem_IsEmpty(self *C.QLayoutItem, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func() bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.bool)(virtualReturn) + +} + +func (this *QLayoutItem) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QLayoutItem_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QLayoutItem) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QLayoutItem_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_HasHeightForWidth +func miqt_exec_callback_QLayoutItem_HasHeightForWidth(self *C.QLayoutItem, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QLayoutItem{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QLayoutItem) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QLayoutItem_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QLayoutItem) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QLayoutItem_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_HeightForWidth +func miqt_exec_callback_QLayoutItem_HeightForWidth(self *C.QLayoutItem, 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((&QLayoutItem{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QLayoutItem) callVirtualBase_MinimumHeightForWidth(param1 int) int { + + return (int)(C.QLayoutItem_virtualbase_MinimumHeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QLayoutItem) OnMinimumHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QLayoutItem_override_virtual_MinimumHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_MinimumHeightForWidth +func miqt_exec_callback_QLayoutItem_MinimumHeightForWidth(self *C.QLayoutItem, 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((&QLayoutItem{h: self}).callVirtualBase_MinimumHeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QLayoutItem) callVirtualBase_Invalidate() { + + C.QLayoutItem_virtualbase_Invalidate(unsafe.Pointer(this.h)) + +} +func (this *QLayoutItem) OnInvalidate(slot func(super func())) { + C.QLayoutItem_override_virtual_Invalidate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_Invalidate +func miqt_exec_callback_QLayoutItem_Invalidate(self *C.QLayoutItem, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QLayoutItem{h: self}).callVirtualBase_Invalidate) + +} + +func (this *QLayoutItem) callVirtualBase_Widget() *QWidget { + + return UnsafeNewQWidget(unsafe.Pointer(C.QLayoutItem_virtualbase_Widget(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QLayoutItem) OnWidget(slot func(super func() *QWidget) *QWidget) { + C.QLayoutItem_override_virtual_Widget(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_Widget +func miqt_exec_callback_QLayoutItem_Widget(self *C.QLayoutItem, 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((&QLayoutItem{h: self}).callVirtualBase_Widget) + + return virtualReturn.cPointer() + +} + +func (this *QLayoutItem) callVirtualBase_Layout() *QLayout { + + return UnsafeNewQLayout(unsafe.Pointer(C.QLayoutItem_virtualbase_Layout(unsafe.Pointer(this.h))), nil, nil) +} +func (this *QLayoutItem) OnLayout(slot func(super func() *QLayout) *QLayout) { + C.QLayoutItem_override_virtual_Layout(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_Layout +func miqt_exec_callback_QLayoutItem_Layout(self *C.QLayoutItem, 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((&QLayoutItem{h: self}).callVirtualBase_Layout) + + return virtualReturn.cPointer() + +} + +func (this *QLayoutItem) callVirtualBase_SpacerItem() *QSpacerItem { + + return UnsafeNewQSpacerItem(unsafe.Pointer(C.QLayoutItem_virtualbase_SpacerItem(unsafe.Pointer(this.h))), nil) +} +func (this *QLayoutItem) OnSpacerItem(slot func(super func() *QSpacerItem) *QSpacerItem) { + C.QLayoutItem_override_virtual_SpacerItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_SpacerItem +func miqt_exec_callback_QLayoutItem_SpacerItem(self *C.QLayoutItem, 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((&QLayoutItem{h: self}).callVirtualBase_SpacerItem) + + return virtualReturn.cPointer() + +} + +func (this *QLayoutItem) callVirtualBase_ControlTypes() QSizePolicy__ControlType { + + return (QSizePolicy__ControlType)(C.QLayoutItem_virtualbase_ControlTypes(unsafe.Pointer(this.h))) + +} +func (this *QLayoutItem) OnControlTypes(slot func(super func() QSizePolicy__ControlType) QSizePolicy__ControlType) { + C.QLayoutItem_override_virtual_ControlTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QLayoutItem_ControlTypes +func miqt_exec_callback_QLayoutItem_ControlTypes(self *C.QLayoutItem, 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((&QLayoutItem{h: self}).callVirtualBase_ControlTypes) + + return (C.int)(virtualReturn) + +} // Delete this object from C++ memory. func (this *QLayoutItem) Delete() { diff --git a/qt6/gen_qlayoutitem.h b/qt6/gen_qlayoutitem.h index 767410fe..b82f54e6 100644 --- a/qt6/gen_qlayoutitem.h +++ b/qt6/gen_qlayoutitem.h @@ -36,6 +36,9 @@ typedef struct QWidgetItem QWidgetItem; typedef struct QWidgetItemV2 QWidgetItemV2; #endif +void QLayoutItem_new(QLayoutItem** outptr_QLayoutItem); +void QLayoutItem_new2(QLayoutItem* param1, QLayoutItem** outptr_QLayoutItem); +void QLayoutItem_new3(int alignment, QLayoutItem** outptr_QLayoutItem); QSize* QLayoutItem_SizeHint(const QLayoutItem* self); QSize* QLayoutItem_MinimumSize(const QLayoutItem* self); QSize* QLayoutItem_MaximumSize(const QLayoutItem* self); @@ -53,6 +56,36 @@ 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_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QLayoutItem_virtualbase_SizeHint(const void* self); +void QLayoutItem_override_virtual_MinimumSize(void* self, intptr_t slot); +QSize* QLayoutItem_virtualbase_MinimumSize(const void* self); +void QLayoutItem_override_virtual_MaximumSize(void* self, intptr_t slot); +QSize* QLayoutItem_virtualbase_MaximumSize(const void* self); +void QLayoutItem_override_virtual_ExpandingDirections(void* self, intptr_t slot); +int QLayoutItem_virtualbase_ExpandingDirections(const void* self); +void QLayoutItem_override_virtual_SetGeometry(void* self, intptr_t slot); +void QLayoutItem_virtualbase_SetGeometry(void* self, QRect* geometry); +void QLayoutItem_override_virtual_Geometry(void* self, intptr_t slot); +QRect* QLayoutItem_virtualbase_Geometry(const void* self); +void QLayoutItem_override_virtual_IsEmpty(void* self, intptr_t slot); +bool QLayoutItem_virtualbase_IsEmpty(const void* self); +void QLayoutItem_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QLayoutItem_virtualbase_HasHeightForWidth(const void* self); +void QLayoutItem_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QLayoutItem_virtualbase_HeightForWidth(const void* self, int param1); +void QLayoutItem_override_virtual_MinimumHeightForWidth(void* self, intptr_t slot); +int QLayoutItem_virtualbase_MinimumHeightForWidth(const void* self, int param1); +void QLayoutItem_override_virtual_Invalidate(void* self, intptr_t slot); +void QLayoutItem_virtualbase_Invalidate(void* self); +void QLayoutItem_override_virtual_Widget(void* self, intptr_t slot); +QWidget* QLayoutItem_virtualbase_Widget(const void* self); +void QLayoutItem_override_virtual_Layout(void* self, intptr_t slot); +QLayout* QLayoutItem_virtualbase_Layout(void* self); +void QLayoutItem_override_virtual_SpacerItem(void* self, intptr_t slot); +QSpacerItem* QLayoutItem_virtualbase_SpacerItem(void* self); +void QLayoutItem_override_virtual_ControlTypes(void* self, intptr_t slot); +int QLayoutItem_virtualbase_ControlTypes(const void* self); void QLayoutItem_Delete(QLayoutItem* self, bool isSubclass); void QSpacerItem_new(int w, int h, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); diff --git a/qt6/gen_qlistview.cpp b/qt6/gen_qlistview.cpp index a411c065..f29e084f 100644 --- a/qt6/gen_qlistview.cpp +++ b/qt6/gen_qlistview.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -22,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -706,6 +708,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QListView::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QListView_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QListView::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__SelectedIndexes = 0; @@ -791,6 +818,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QListView::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QListView_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QListView::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__CurrentChanged = 0; @@ -2002,6 +2058,14 @@ void QListView_virtualbase_SetSelection(void* self, QRect* rect, int command) { ( (MiqtVirtualQListView*)(self) )->virtualbase_SetSelection(rect, command); } +void QListView_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QListView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQListView*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QListView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { dynamic_cast( (QListView*)(self) )->handle__SelectedIndexes = slot; } @@ -2026,6 +2090,14 @@ bool QListView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { return ( (const MiqtVirtualQListView*)(self) )->virtualbase_IsIndexHidden(index); } +void QListView_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QListView*)(self) )->handle__SelectionChanged = slot; +} + +void QListView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQListView*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QListView_override_virtual_CurrentChanged(void* self, intptr_t slot) { dynamic_cast( (QListView*)(self) )->handle__CurrentChanged = slot; } diff --git a/qt6/gen_qlistview.go b/qt6/gen_qlistview.go index f4b2f5b2..b15f0d11 100644 --- a/qt6/gen_qlistview.go +++ b/qt6/gen_qlistview.go @@ -987,6 +987,34 @@ func miqt_exec_callback_QListView_SetSelection(self *C.QListView, cb C.intptr_t, } +func (this *QListView) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QListView_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListView) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QListView_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_VisualRegionForSelection +func miqt_exec_callback_QListView_VisualRegionForSelection(self *C.QListView, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QListView{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QListView) callVirtualBase_SelectedIndexes() []QModelIndex { var _ma C.struct_miqt_array = C.QListView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) @@ -1069,6 +1097,30 @@ func miqt_exec_callback_QListView_IsIndexHidden(self *C.QListView, cb C.intptr_t } +func (this *QListView) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QListView_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QListView) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QListView_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListView_SelectionChanged +func miqt_exec_callback_QListView_SelectionChanged(self *C.QListView, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QListView{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QListView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { C.QListView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) diff --git a/qt6/gen_qlistview.h b/qt6/gen_qlistview.h index d6e46f51..164b982e 100644 --- a/qt6/gen_qlistview.h +++ b/qt6/gen_qlistview.h @@ -27,6 +27,7 @@ class QEvent; class QFocusEvent; class QFrame; class QInputMethodEvent; +class QItemSelection; class QItemSelectionModel; class QKeyEvent; class QListView; @@ -38,6 +39,7 @@ class QPaintDevice; class QPaintEvent; class QPoint; class QRect; +class QRegion; class QResizeEvent; class QSize; class QStyleOptionViewItem; @@ -58,6 +60,7 @@ typedef struct QEvent QEvent; typedef struct QFocusEvent QFocusEvent; typedef struct QFrame QFrame; typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QKeyEvent QKeyEvent; typedef struct QListView QListView; @@ -69,6 +72,7 @@ typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; @@ -142,9 +146,11 @@ 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); +QRegion* QListView_VisualRegionForSelection(const QListView* self, QItemSelection* selection); 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_SelectionChanged(QListView* self, QItemSelection* selected, QItemSelection* deselected); 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); @@ -201,12 +207,16 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QListView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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_SelectionChanged(void* self, intptr_t slot); +void QListView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt6/gen_qlistwidget.cpp b/qt6/gen_qlistwidget.cpp index 2412ba9f..a2f540fe 100644 --- a/qt6/gen_qlistwidget.cpp +++ b/qt6/gen_qlistwidget.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -23,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -1332,6 +1334,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QListWidget::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QListWidget_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QListWidget::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__SelectedIndexes = 0; @@ -1417,6 +1444,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QListWidget::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QListWidget_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QListWidget::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__CurrentChanged = 0; @@ -2101,6 +2157,14 @@ void QListWidget_virtualbase_SetSelection(void* self, QRect* rect, int command) ( (MiqtVirtualQListWidget*)(self) )->virtualbase_SetSelection(rect, command); } +void QListWidget_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QListWidget_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QListWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot) { dynamic_cast( (QListWidget*)(self) )->handle__SelectedIndexes = slot; } @@ -2125,6 +2189,14 @@ bool QListWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) return ( (const MiqtVirtualQListWidget*)(self) )->virtualbase_IsIndexHidden(index); } +void QListWidget_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QListWidget*)(self) )->handle__SelectionChanged = slot; +} + +void QListWidget_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQListWidget*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QListWidget_override_virtual_CurrentChanged(void* self, intptr_t slot) { dynamic_cast( (QListWidget*)(self) )->handle__CurrentChanged = slot; } diff --git a/qt6/gen_qlistwidget.go b/qt6/gen_qlistwidget.go index 76b85db4..d1fd418f 100644 --- a/qt6/gen_qlistwidget.go +++ b/qt6/gen_qlistwidget.go @@ -1856,6 +1856,34 @@ func miqt_exec_callback_QListWidget_SetSelection(self *C.QListWidget, cb C.intpt } +func (this *QListWidget) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QListWidget_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QListWidget) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QListWidget_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_VisualRegionForSelection +func miqt_exec_callback_QListWidget_VisualRegionForSelection(self *C.QListWidget, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QListWidget{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QListWidget) callVirtualBase_SelectedIndexes() []QModelIndex { var _ma C.struct_miqt_array = C.QListWidget_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) @@ -1938,6 +1966,30 @@ func miqt_exec_callback_QListWidget_IsIndexHidden(self *C.QListWidget, cb C.intp } +func (this *QListWidget) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QListWidget_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QListWidget) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QListWidget_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QListWidget_SelectionChanged +func miqt_exec_callback_QListWidget_SelectionChanged(self *C.QListWidget, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QListWidget{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QListWidget) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { C.QListWidget_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) diff --git a/qt6/gen_qlistwidget.h b/qt6/gen_qlistwidget.h index 9add824b..5bb28f48 100644 --- a/qt6/gen_qlistwidget.h +++ b/qt6/gen_qlistwidget.h @@ -26,6 +26,7 @@ class QEvent; class QFont; class QFrame; class QIcon; +class QItemSelection; class QItemSelectionModel; class QListView; class QListWidget; @@ -39,6 +40,7 @@ class QPaintDevice; class QPaintEvent; class QPoint; class QRect; +class QRegion; class QResizeEvent; class QSize; class QStyleOptionViewItem; @@ -58,6 +60,7 @@ typedef struct QEvent QEvent; typedef struct QFont QFont; typedef struct QFrame QFrame; typedef struct QIcon QIcon; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QListView QListView; typedef struct QListWidget QListWidget; @@ -71,6 +74,7 @@ typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; @@ -277,12 +281,16 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QListWidget_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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_SelectionChanged(void* self, intptr_t slot); +void QListWidget_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt6/gen_qpaintengine.cpp b/qt6/gen_qpaintengine.cpp index 3bc02694..4cc655b9 100644 --- a/qt6/gen_qpaintengine.cpp +++ b/qt6/gen_qpaintengine.cpp @@ -68,6 +68,561 @@ void QTextItem_Delete(QTextItem* self, bool isSubclass) { } } +class MiqtVirtualQPaintEngine : public virtual QPaintEngine { +public: + + MiqtVirtualQPaintEngine(): QPaintEngine() {}; + MiqtVirtualQPaintEngine(QPaintEngine::PaintEngineFeatures features): QPaintEngine(features) {}; + + virtual ~MiqtVirtualQPaintEngine() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Begin = 0; + + // Subclass to allow providing a Go implementation + virtual bool begin(QPaintDevice* pdev) override { + if (handle__Begin == 0) { + return false; // Pure virtual, there is no base we can call + } + + QPaintDevice* sigval1 = pdev; + + bool callback_return_value = miqt_exec_callback_QPaintEngine_Begin(this, handle__Begin, sigval1); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__End = 0; + + // Subclass to allow providing a Go implementation + virtual bool end() override { + if (handle__End == 0) { + return false; // Pure virtual, there is no base we can call + } + + + bool callback_return_value = miqt_exec_callback_QPaintEngine_End(this, handle__End); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UpdateState = 0; + + // Subclass to allow providing a Go implementation + virtual void updateState(const QPaintEngineState& state) override { + if (handle__UpdateState == 0) { + return; // Pure virtual, there is no base we can call + } + + const QPaintEngineState& state_ret = state; + // Cast returned reference into pointer + QPaintEngineState* sigval1 = const_cast(&state_ret); + + miqt_exec_callback_QPaintEngine_UpdateState(this, handle__UpdateState, sigval1); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawRects = 0; + + // Subclass to allow providing a Go implementation + virtual void drawRects(const QRect* rects, int rectCount) override { + if (handle__DrawRects == 0) { + QPaintEngine::drawRects(rects, rectCount); + return; + } + + QRect* sigval1 = (QRect*) rects; + int sigval2 = rectCount; + + miqt_exec_callback_QPaintEngine_DrawRects(this, handle__DrawRects, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawRects(QRect* rects, int rectCount) { + + QPaintEngine::drawRects(rects, static_cast(rectCount)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawRects2 = 0; + + // Subclass to allow providing a Go implementation + virtual void drawRects(const QRectF* rects, int rectCount) override { + if (handle__DrawRects2 == 0) { + QPaintEngine::drawRects(rects, rectCount); + return; + } + + QRectF* sigval1 = (QRectF*) rects; + int sigval2 = rectCount; + + miqt_exec_callback_QPaintEngine_DrawRects2(this, handle__DrawRects2, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawRects2(QRectF* rects, int rectCount) { + + QPaintEngine::drawRects(rects, static_cast(rectCount)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawLines = 0; + + // Subclass to allow providing a Go implementation + virtual void drawLines(const QLine* lines, int lineCount) override { + if (handle__DrawLines == 0) { + QPaintEngine::drawLines(lines, lineCount); + return; + } + + QLine* sigval1 = (QLine*) lines; + int sigval2 = lineCount; + + miqt_exec_callback_QPaintEngine_DrawLines(this, handle__DrawLines, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawLines(QLine* lines, int lineCount) { + + QPaintEngine::drawLines(lines, static_cast(lineCount)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawLines2 = 0; + + // Subclass to allow providing a Go implementation + virtual void drawLines(const QLineF* lines, int lineCount) override { + if (handle__DrawLines2 == 0) { + QPaintEngine::drawLines(lines, lineCount); + return; + } + + QLineF* sigval1 = (QLineF*) lines; + int sigval2 = lineCount; + + miqt_exec_callback_QPaintEngine_DrawLines2(this, handle__DrawLines2, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawLines2(QLineF* lines, int lineCount) { + + QPaintEngine::drawLines(lines, static_cast(lineCount)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawEllipse = 0; + + // Subclass to allow providing a Go implementation + virtual void drawEllipse(const QRectF& r) override { + if (handle__DrawEllipse == 0) { + QPaintEngine::drawEllipse(r); + return; + } + + const QRectF& r_ret = r; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&r_ret); + + miqt_exec_callback_QPaintEngine_DrawEllipse(this, handle__DrawEllipse, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawEllipse(QRectF* r) { + + QPaintEngine::drawEllipse(*r); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawEllipseWithQRect = 0; + + // Subclass to allow providing a Go implementation + virtual void drawEllipse(const QRect& r) override { + if (handle__DrawEllipseWithQRect == 0) { + QPaintEngine::drawEllipse(r); + return; + } + + const QRect& r_ret = r; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&r_ret); + + miqt_exec_callback_QPaintEngine_DrawEllipseWithQRect(this, handle__DrawEllipseWithQRect, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawEllipseWithQRect(QRect* r) { + + QPaintEngine::drawEllipse(*r); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawPath = 0; + + // Subclass to allow providing a Go implementation + virtual void drawPath(const QPainterPath& path) override { + if (handle__DrawPath == 0) { + QPaintEngine::drawPath(path); + return; + } + + const QPainterPath& path_ret = path; + // Cast returned reference into pointer + QPainterPath* sigval1 = const_cast(&path_ret); + + miqt_exec_callback_QPaintEngine_DrawPath(this, handle__DrawPath, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawPath(QPainterPath* path) { + + QPaintEngine::drawPath(*path); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawPoints = 0; + + // Subclass to allow providing a Go implementation + virtual void drawPoints(const QPointF* points, int pointCount) override { + if (handle__DrawPoints == 0) { + QPaintEngine::drawPoints(points, pointCount); + return; + } + + QPointF* sigval1 = (QPointF*) points; + int sigval2 = pointCount; + + miqt_exec_callback_QPaintEngine_DrawPoints(this, handle__DrawPoints, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawPoints(QPointF* points, int pointCount) { + + QPaintEngine::drawPoints(points, static_cast(pointCount)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawPoints2 = 0; + + // Subclass to allow providing a Go implementation + virtual void drawPoints(const QPoint* points, int pointCount) override { + if (handle__DrawPoints2 == 0) { + QPaintEngine::drawPoints(points, pointCount); + return; + } + + QPoint* sigval1 = (QPoint*) points; + int sigval2 = pointCount; + + miqt_exec_callback_QPaintEngine_DrawPoints2(this, handle__DrawPoints2, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawPoints2(QPoint* points, int pointCount) { + + QPaintEngine::drawPoints(points, static_cast(pointCount)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawPolygon = 0; + + // Subclass to allow providing a Go implementation + virtual void drawPolygon(const QPointF* points, int pointCount, QPaintEngine::PolygonDrawMode mode) override { + if (handle__DrawPolygon == 0) { + QPaintEngine::drawPolygon(points, pointCount, mode); + return; + } + + QPointF* sigval1 = (QPointF*) points; + int sigval2 = pointCount; + QPaintEngine::PolygonDrawMode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + + miqt_exec_callback_QPaintEngine_DrawPolygon(this, handle__DrawPolygon, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawPolygon(QPointF* points, int pointCount, int mode) { + + QPaintEngine::drawPolygon(points, static_cast(pointCount), static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawPolygon2 = 0; + + // Subclass to allow providing a Go implementation + virtual void drawPolygon(const QPoint* points, int pointCount, QPaintEngine::PolygonDrawMode mode) override { + if (handle__DrawPolygon2 == 0) { + QPaintEngine::drawPolygon(points, pointCount, mode); + return; + } + + QPoint* sigval1 = (QPoint*) points; + int sigval2 = pointCount; + QPaintEngine::PolygonDrawMode mode_ret = mode; + int sigval3 = static_cast(mode_ret); + + miqt_exec_callback_QPaintEngine_DrawPolygon2(this, handle__DrawPolygon2, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawPolygon2(QPoint* points, int pointCount, int mode) { + + QPaintEngine::drawPolygon(points, static_cast(pointCount), static_cast(mode)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual void drawPixmap(const QRectF& r, const QPixmap& pm, const QRectF& sr) override { + if (handle__DrawPixmap == 0) { + return; // Pure virtual, there is no base we can call + } + + const QRectF& r_ret = r; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&r_ret); + const QPixmap& pm_ret = pm; + // Cast returned reference into pointer + QPixmap* sigval2 = const_cast(&pm_ret); + const QRectF& sr_ret = sr; + // Cast returned reference into pointer + QRectF* sigval3 = const_cast(&sr_ret); + + miqt_exec_callback_QPaintEngine_DrawPixmap(this, handle__DrawPixmap, sigval1, sigval2, sigval3); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawTextItem = 0; + + // Subclass to allow providing a Go implementation + virtual void drawTextItem(const QPointF& p, const QTextItem& textItem) override { + if (handle__DrawTextItem == 0) { + QPaintEngine::drawTextItem(p, textItem); + return; + } + + const QPointF& p_ret = p; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&p_ret); + const QTextItem& textItem_ret = textItem; + // Cast returned reference into pointer + QTextItem* sigval2 = const_cast(&textItem_ret); + + miqt_exec_callback_QPaintEngine_DrawTextItem(this, handle__DrawTextItem, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawTextItem(QPointF* p, QTextItem* textItem) { + + QPaintEngine::drawTextItem(*p, *textItem); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawTiledPixmap = 0; + + // Subclass to allow providing a Go implementation + virtual void drawTiledPixmap(const QRectF& r, const QPixmap& pixmap, const QPointF& s) override { + if (handle__DrawTiledPixmap == 0) { + QPaintEngine::drawTiledPixmap(r, pixmap, s); + return; + } + + const QRectF& r_ret = r; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&r_ret); + const QPixmap& pixmap_ret = pixmap; + // Cast returned reference into pointer + QPixmap* sigval2 = const_cast(&pixmap_ret); + const QPointF& s_ret = s; + // Cast returned reference into pointer + QPointF* sigval3 = const_cast(&s_ret); + + miqt_exec_callback_QPaintEngine_DrawTiledPixmap(this, handle__DrawTiledPixmap, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawTiledPixmap(QRectF* r, QPixmap* pixmap, QPointF* s) { + + QPaintEngine::drawTiledPixmap(*r, *pixmap, *s); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DrawImage = 0; + + // Subclass to allow providing a Go implementation + virtual void drawImage(const QRectF& r, const QImage& pm, const QRectF& sr, Qt::ImageConversionFlags flags) override { + if (handle__DrawImage == 0) { + QPaintEngine::drawImage(r, pm, sr, flags); + return; + } + + const QRectF& r_ret = r; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&r_ret); + const QImage& pm_ret = pm; + // Cast returned reference into pointer + QImage* sigval2 = const_cast(&pm_ret); + const QRectF& sr_ret = sr; + // Cast returned reference into pointer + QRectF* sigval3 = const_cast(&sr_ret); + Qt::ImageConversionFlags flags_ret = flags; + int sigval4 = static_cast(flags_ret); + + miqt_exec_callback_QPaintEngine_DrawImage(this, handle__DrawImage, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DrawImage(QRectF* r, QImage* pm, QRectF* sr, int flags) { + + QPaintEngine::drawImage(*r, *pm, *sr, static_cast(flags)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CoordinateOffset = 0; + + // Subclass to allow providing a Go implementation + virtual QPoint coordinateOffset() const override { + if (handle__CoordinateOffset == 0) { + return QPaintEngine::coordinateOffset(); + } + + + QPoint* callback_return_value = miqt_exec_callback_QPaintEngine_CoordinateOffset(const_cast(this), handle__CoordinateOffset); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPoint* virtualbase_CoordinateOffset() const { + + return new QPoint(QPaintEngine::coordinateOffset()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine::Type type() const override { + if (handle__Type == 0) { + return (QPaintEngine::Type)(0); // Pure virtual, there is no base we can call + } + + + int callback_return_value = miqt_exec_callback_QPaintEngine_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreatePixmap = 0; + + // Subclass to allow providing a Go implementation + virtual QPixmap createPixmap(QSize size) override { + if (handle__CreatePixmap == 0) { + return QPaintEngine::createPixmap(size); + } + + QSize* sigval1 = new QSize(size); + + QPixmap* callback_return_value = miqt_exec_callback_QPaintEngine_CreatePixmap(this, handle__CreatePixmap, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPixmap* virtualbase_CreatePixmap(QSize* size) { + + return new QPixmap(QPaintEngine::createPixmap(*size)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreatePixmapFromImage = 0; + + // Subclass to allow providing a Go implementation + virtual QPixmap createPixmapFromImage(QImage image, Qt::ImageConversionFlags flags) override { + if (handle__CreatePixmapFromImage == 0) { + return QPaintEngine::createPixmapFromImage(image, flags); + } + + QImage* sigval1 = new QImage(image); + Qt::ImageConversionFlags flags_ret = flags; + int sigval2 = static_cast(flags_ret); + + QPixmap* callback_return_value = miqt_exec_callback_QPaintEngine_CreatePixmapFromImage(this, handle__CreatePixmapFromImage, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPixmap* virtualbase_CreatePixmapFromImage(QImage* image, int flags) { + + return new QPixmap(QPaintEngine::createPixmapFromImage(*image, static_cast(flags))); + + } + +}; + +void QPaintEngine_new(QPaintEngine** outptr_QPaintEngine) { + MiqtVirtualQPaintEngine* ret = new MiqtVirtualQPaintEngine(); + *outptr_QPaintEngine = ret; +} + +void QPaintEngine_new2(int features, QPaintEngine** outptr_QPaintEngine) { + MiqtVirtualQPaintEngine* ret = new MiqtVirtualQPaintEngine(static_cast(features)); + *outptr_QPaintEngine = ret; +} + bool QPaintEngine_IsActive(const QPaintEngine* self) { return self->isActive(); } @@ -221,9 +776,165 @@ QPixmap* QPaintEngine_CreatePixmapFromImage(QPaintEngine* self, QImage* image, i return new QPixmap(self->createPixmapFromImage(*image, static_cast(flags))); } +void QPaintEngine_override_virtual_Begin(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__Begin = slot; +} + +void QPaintEngine_override_virtual_End(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__End = slot; +} + +void QPaintEngine_override_virtual_UpdateState(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__UpdateState = slot; +} + +void QPaintEngine_override_virtual_DrawRects(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawRects = slot; +} + +void QPaintEngine_virtualbase_DrawRects(void* self, QRect* rects, int rectCount) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawRects(rects, rectCount); +} + +void QPaintEngine_override_virtual_DrawRects2(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawRects2 = slot; +} + +void QPaintEngine_virtualbase_DrawRects2(void* self, QRectF* rects, int rectCount) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawRects2(rects, rectCount); +} + +void QPaintEngine_override_virtual_DrawLines(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawLines = slot; +} + +void QPaintEngine_virtualbase_DrawLines(void* self, QLine* lines, int lineCount) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawLines(lines, lineCount); +} + +void QPaintEngine_override_virtual_DrawLines2(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawLines2 = slot; +} + +void QPaintEngine_virtualbase_DrawLines2(void* self, QLineF* lines, int lineCount) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawLines2(lines, lineCount); +} + +void QPaintEngine_override_virtual_DrawEllipse(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawEllipse = slot; +} + +void QPaintEngine_virtualbase_DrawEllipse(void* self, QRectF* r) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawEllipse(r); +} + +void QPaintEngine_override_virtual_DrawEllipseWithQRect(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawEllipseWithQRect = slot; +} + +void QPaintEngine_virtualbase_DrawEllipseWithQRect(void* self, QRect* r) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawEllipseWithQRect(r); +} + +void QPaintEngine_override_virtual_DrawPath(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawPath = slot; +} + +void QPaintEngine_virtualbase_DrawPath(void* self, QPainterPath* path) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawPath(path); +} + +void QPaintEngine_override_virtual_DrawPoints(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawPoints = slot; +} + +void QPaintEngine_virtualbase_DrawPoints(void* self, QPointF* points, int pointCount) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawPoints(points, pointCount); +} + +void QPaintEngine_override_virtual_DrawPoints2(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawPoints2 = slot; +} + +void QPaintEngine_virtualbase_DrawPoints2(void* self, QPoint* points, int pointCount) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawPoints2(points, pointCount); +} + +void QPaintEngine_override_virtual_DrawPolygon(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawPolygon = slot; +} + +void QPaintEngine_virtualbase_DrawPolygon(void* self, QPointF* points, int pointCount, int mode) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawPolygon(points, pointCount, mode); +} + +void QPaintEngine_override_virtual_DrawPolygon2(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawPolygon2 = slot; +} + +void QPaintEngine_virtualbase_DrawPolygon2(void* self, QPoint* points, int pointCount, int mode) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawPolygon2(points, pointCount, mode); +} + +void QPaintEngine_override_virtual_DrawPixmap(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawPixmap = slot; +} + +void QPaintEngine_override_virtual_DrawTextItem(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawTextItem = slot; +} + +void QPaintEngine_virtualbase_DrawTextItem(void* self, QPointF* p, QTextItem* textItem) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawTextItem(p, textItem); +} + +void QPaintEngine_override_virtual_DrawTiledPixmap(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawTiledPixmap = slot; +} + +void QPaintEngine_virtualbase_DrawTiledPixmap(void* self, QRectF* r, QPixmap* pixmap, QPointF* s) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawTiledPixmap(r, pixmap, s); +} + +void QPaintEngine_override_virtual_DrawImage(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__DrawImage = slot; +} + +void QPaintEngine_virtualbase_DrawImage(void* self, QRectF* r, QImage* pm, QRectF* sr, int flags) { + ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_DrawImage(r, pm, sr, flags); +} + +void QPaintEngine_override_virtual_CoordinateOffset(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__CoordinateOffset = slot; +} + +QPoint* QPaintEngine_virtualbase_CoordinateOffset(const void* self) { + return ( (const MiqtVirtualQPaintEngine*)(self) )->virtualbase_CoordinateOffset(); +} + +void QPaintEngine_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__Type = slot; +} + +void QPaintEngine_override_virtual_CreatePixmap(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__CreatePixmap = slot; +} + +QPixmap* QPaintEngine_virtualbase_CreatePixmap(void* self, QSize* size) { + return ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_CreatePixmap(size); +} + +void QPaintEngine_override_virtual_CreatePixmapFromImage(void* self, intptr_t slot) { + dynamic_cast( (QPaintEngine*)(self) )->handle__CreatePixmapFromImage = slot; +} + +QPixmap* QPaintEngine_virtualbase_CreatePixmapFromImage(void* self, QImage* image, int flags) { + return ( (MiqtVirtualQPaintEngine*)(self) )->virtualbase_CreatePixmapFromImage(image, flags); +} + void QPaintEngine_Delete(QPaintEngine* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qpaintengine.go b/qt6/gen_qpaintengine.go index 45694218..4e163eba 100644 --- a/qt6/gen_qpaintengine.go +++ b/qt6/gen_qpaintengine.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -216,6 +217,26 @@ func UnsafeNewQPaintEngine(h unsafe.Pointer) *QPaintEngine { return &QPaintEngine{h: (*C.QPaintEngine)(h)} } +// NewQPaintEngine constructs a new QPaintEngine object. +func NewQPaintEngine() *QPaintEngine { + var outptr_QPaintEngine *C.QPaintEngine = nil + + C.QPaintEngine_new(&outptr_QPaintEngine) + ret := newQPaintEngine(outptr_QPaintEngine) + ret.isSubclass = true + return ret +} + +// NewQPaintEngine2 constructs a new QPaintEngine object. +func NewQPaintEngine2(features QPaintEngine__PaintEngineFeature) *QPaintEngine { + var outptr_QPaintEngine *C.QPaintEngine = nil + + C.QPaintEngine_new2((C.int)(features), &outptr_QPaintEngine) + ret := newQPaintEngine(outptr_QPaintEngine) + ret.isSubclass = true + return ret +} + func (this *QPaintEngine) IsActive() bool { return (bool)(C.QPaintEngine_IsActive(this.h)) } @@ -382,6 +403,522 @@ func (this *QPaintEngine) CreatePixmapFromImage(image QImage, flags ImageConvers _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } +func (this *QPaintEngine) OnBegin(slot func(pdev *QPaintDevice) bool) { + C.QPaintEngine_override_virtual_Begin(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_Begin +func miqt_exec_callback_QPaintEngine_Begin(self *C.QPaintEngine, cb C.intptr_t, pdev *C.QPaintDevice) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(pdev *QPaintDevice) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintDevice(unsafe.Pointer(pdev)) + + virtualReturn := gofunc(slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QPaintEngine) OnEnd(slot func() bool) { + C.QPaintEngine_override_virtual_End(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_End +func miqt_exec_callback_QPaintEngine_End(self *C.QPaintEngine, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func() bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.bool)(virtualReturn) + +} +func (this *QPaintEngine) OnUpdateState(slot func(state *QPaintEngineState)) { + C.QPaintEngine_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_UpdateState +func miqt_exec_callback_QPaintEngine_UpdateState(self *C.QPaintEngine, cb C.intptr_t, state *C.QPaintEngineState) { + gofunc, ok := cgo.Handle(cb).Value().(func(state *QPaintEngineState)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPaintEngineState(unsafe.Pointer(state)) + + gofunc(slotval1) + +} + +func (this *QPaintEngine) callVirtualBase_DrawRects(rects *QRect, rectCount int) { + + C.QPaintEngine_virtualbase_DrawRects(unsafe.Pointer(this.h), rects.cPointer(), (C.int)(rectCount)) + +} +func (this *QPaintEngine) OnDrawRects(slot func(super func(rects *QRect, rectCount int), rects *QRect, rectCount int)) { + C.QPaintEngine_override_virtual_DrawRects(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawRects +func miqt_exec_callback_QPaintEngine_DrawRects(self *C.QPaintEngine, cb C.intptr_t, rects *C.QRect, rectCount C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rects *QRect, rectCount int), rects *QRect, rectCount int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(rects)) + slotval2 := (int)(rectCount) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawRects, slotval1, slotval2) + +} + +func (this *QPaintEngine) callVirtualBase_DrawRects2(rects *QRectF, rectCount int) { + + C.QPaintEngine_virtualbase_DrawRects2(unsafe.Pointer(this.h), rects.cPointer(), (C.int)(rectCount)) + +} +func (this *QPaintEngine) OnDrawRects2(slot func(super func(rects *QRectF, rectCount int), rects *QRectF, rectCount int)) { + C.QPaintEngine_override_virtual_DrawRects2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawRects2 +func miqt_exec_callback_QPaintEngine_DrawRects2(self *C.QPaintEngine, cb C.intptr_t, rects *C.QRectF, rectCount C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rects *QRectF, rectCount int), rects *QRectF, rectCount int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(rects)) + slotval2 := (int)(rectCount) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawRects2, slotval1, slotval2) + +} + +func (this *QPaintEngine) callVirtualBase_DrawLines(lines *QLine, lineCount int) { + + C.QPaintEngine_virtualbase_DrawLines(unsafe.Pointer(this.h), lines.cPointer(), (C.int)(lineCount)) + +} +func (this *QPaintEngine) OnDrawLines(slot func(super func(lines *QLine, lineCount int), lines *QLine, lineCount int)) { + C.QPaintEngine_override_virtual_DrawLines(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawLines +func miqt_exec_callback_QPaintEngine_DrawLines(self *C.QPaintEngine, cb C.intptr_t, lines *C.QLine, lineCount C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(lines *QLine, lineCount int), lines *QLine, lineCount int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLine(unsafe.Pointer(lines)) + slotval2 := (int)(lineCount) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawLines, slotval1, slotval2) + +} + +func (this *QPaintEngine) callVirtualBase_DrawLines2(lines *QLineF, lineCount int) { + + C.QPaintEngine_virtualbase_DrawLines2(unsafe.Pointer(this.h), lines.cPointer(), (C.int)(lineCount)) + +} +func (this *QPaintEngine) OnDrawLines2(slot func(super func(lines *QLineF, lineCount int), lines *QLineF, lineCount int)) { + C.QPaintEngine_override_virtual_DrawLines2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawLines2 +func miqt_exec_callback_QPaintEngine_DrawLines2(self *C.QPaintEngine, cb C.intptr_t, lines *C.QLineF, lineCount C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(lines *QLineF, lineCount int), lines *QLineF, lineCount int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQLineF(unsafe.Pointer(lines)) + slotval2 := (int)(lineCount) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawLines2, slotval1, slotval2) + +} + +func (this *QPaintEngine) callVirtualBase_DrawEllipse(r *QRectF) { + + C.QPaintEngine_virtualbase_DrawEllipse(unsafe.Pointer(this.h), r.cPointer()) + +} +func (this *QPaintEngine) OnDrawEllipse(slot func(super func(r *QRectF), r *QRectF)) { + C.QPaintEngine_override_virtual_DrawEllipse(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawEllipse +func miqt_exec_callback_QPaintEngine_DrawEllipse(self *C.QPaintEngine, cb C.intptr_t, r *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(r *QRectF), r *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(r)) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawEllipse, slotval1) + +} + +func (this *QPaintEngine) callVirtualBase_DrawEllipseWithQRect(r *QRect) { + + C.QPaintEngine_virtualbase_DrawEllipseWithQRect(unsafe.Pointer(this.h), r.cPointer()) + +} +func (this *QPaintEngine) OnDrawEllipseWithQRect(slot func(super func(r *QRect), r *QRect)) { + C.QPaintEngine_override_virtual_DrawEllipseWithQRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawEllipseWithQRect +func miqt_exec_callback_QPaintEngine_DrawEllipseWithQRect(self *C.QPaintEngine, cb C.intptr_t, r *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(r *QRect), r *QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRect(unsafe.Pointer(r)) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawEllipseWithQRect, slotval1) + +} + +func (this *QPaintEngine) callVirtualBase_DrawPath(path *QPainterPath) { + + C.QPaintEngine_virtualbase_DrawPath(unsafe.Pointer(this.h), path.cPointer()) + +} +func (this *QPaintEngine) OnDrawPath(slot func(super func(path *QPainterPath), path *QPainterPath)) { + C.QPaintEngine_override_virtual_DrawPath(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawPath +func miqt_exec_callback_QPaintEngine_DrawPath(self *C.QPaintEngine, cb C.intptr_t, path *C.QPainterPath) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(path *QPainterPath), path *QPainterPath)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPainterPath(unsafe.Pointer(path)) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawPath, slotval1) + +} + +func (this *QPaintEngine) callVirtualBase_DrawPoints(points *QPointF, pointCount int) { + + C.QPaintEngine_virtualbase_DrawPoints(unsafe.Pointer(this.h), points.cPointer(), (C.int)(pointCount)) + +} +func (this *QPaintEngine) OnDrawPoints(slot func(super func(points *QPointF, pointCount int), points *QPointF, pointCount int)) { + C.QPaintEngine_override_virtual_DrawPoints(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawPoints +func miqt_exec_callback_QPaintEngine_DrawPoints(self *C.QPaintEngine, cb C.intptr_t, points *C.QPointF, pointCount C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(points *QPointF, pointCount int), points *QPointF, pointCount int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(points)) + slotval2 := (int)(pointCount) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawPoints, slotval1, slotval2) + +} + +func (this *QPaintEngine) callVirtualBase_DrawPoints2(points *QPoint, pointCount int) { + + C.QPaintEngine_virtualbase_DrawPoints2(unsafe.Pointer(this.h), points.cPointer(), (C.int)(pointCount)) + +} +func (this *QPaintEngine) OnDrawPoints2(slot func(super func(points *QPoint, pointCount int), points *QPoint, pointCount int)) { + C.QPaintEngine_override_virtual_DrawPoints2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawPoints2 +func miqt_exec_callback_QPaintEngine_DrawPoints2(self *C.QPaintEngine, cb C.intptr_t, points *C.QPoint, pointCount C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(points *QPoint, pointCount int), points *QPoint, pointCount int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(points)) + slotval2 := (int)(pointCount) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawPoints2, slotval1, slotval2) + +} + +func (this *QPaintEngine) callVirtualBase_DrawPolygon(points *QPointF, pointCount int, mode QPaintEngine__PolygonDrawMode) { + + C.QPaintEngine_virtualbase_DrawPolygon(unsafe.Pointer(this.h), points.cPointer(), (C.int)(pointCount), (C.int)(mode)) + +} +func (this *QPaintEngine) OnDrawPolygon(slot func(super func(points *QPointF, pointCount int, mode QPaintEngine__PolygonDrawMode), points *QPointF, pointCount int, mode QPaintEngine__PolygonDrawMode)) { + C.QPaintEngine_override_virtual_DrawPolygon(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawPolygon +func miqt_exec_callback_QPaintEngine_DrawPolygon(self *C.QPaintEngine, cb C.intptr_t, points *C.QPointF, pointCount C.int, mode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(points *QPointF, pointCount int, mode QPaintEngine__PolygonDrawMode), points *QPointF, pointCount int, mode QPaintEngine__PolygonDrawMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(points)) + slotval2 := (int)(pointCount) + + slotval3 := (QPaintEngine__PolygonDrawMode)(mode) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawPolygon, slotval1, slotval2, slotval3) + +} + +func (this *QPaintEngine) callVirtualBase_DrawPolygon2(points *QPoint, pointCount int, mode QPaintEngine__PolygonDrawMode) { + + C.QPaintEngine_virtualbase_DrawPolygon2(unsafe.Pointer(this.h), points.cPointer(), (C.int)(pointCount), (C.int)(mode)) + +} +func (this *QPaintEngine) OnDrawPolygon2(slot func(super func(points *QPoint, pointCount int, mode QPaintEngine__PolygonDrawMode), points *QPoint, pointCount int, mode QPaintEngine__PolygonDrawMode)) { + C.QPaintEngine_override_virtual_DrawPolygon2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawPolygon2 +func miqt_exec_callback_QPaintEngine_DrawPolygon2(self *C.QPaintEngine, cb C.intptr_t, points *C.QPoint, pointCount C.int, mode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(points *QPoint, pointCount int, mode QPaintEngine__PolygonDrawMode), points *QPoint, pointCount int, mode QPaintEngine__PolygonDrawMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPoint(unsafe.Pointer(points)) + slotval2 := (int)(pointCount) + + slotval3 := (QPaintEngine__PolygonDrawMode)(mode) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawPolygon2, slotval1, slotval2, slotval3) + +} +func (this *QPaintEngine) OnDrawPixmap(slot func(r *QRectF, pm *QPixmap, sr *QRectF)) { + C.QPaintEngine_override_virtual_DrawPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawPixmap +func miqt_exec_callback_QPaintEngine_DrawPixmap(self *C.QPaintEngine, cb C.intptr_t, r *C.QRectF, pm *C.QPixmap, sr *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(r *QRectF, pm *QPixmap, sr *QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(r)) + slotval2 := UnsafeNewQPixmap(unsafe.Pointer(pm), nil) + slotval3 := UnsafeNewQRectF(unsafe.Pointer(sr)) + + gofunc(slotval1, slotval2, slotval3) + +} + +func (this *QPaintEngine) callVirtualBase_DrawTextItem(p *QPointF, textItem *QTextItem) { + + C.QPaintEngine_virtualbase_DrawTextItem(unsafe.Pointer(this.h), p.cPointer(), textItem.cPointer()) + +} +func (this *QPaintEngine) OnDrawTextItem(slot func(super func(p *QPointF, textItem *QTextItem), p *QPointF, textItem *QTextItem)) { + C.QPaintEngine_override_virtual_DrawTextItem(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawTextItem +func miqt_exec_callback_QPaintEngine_DrawTextItem(self *C.QPaintEngine, cb C.intptr_t, p *C.QPointF, textItem *C.QTextItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(p *QPointF, textItem *QTextItem), p *QPointF, textItem *QTextItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPointF(unsafe.Pointer(p)) + slotval2 := UnsafeNewQTextItem(unsafe.Pointer(textItem)) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawTextItem, slotval1, slotval2) + +} + +func (this *QPaintEngine) callVirtualBase_DrawTiledPixmap(r *QRectF, pixmap *QPixmap, s *QPointF) { + + C.QPaintEngine_virtualbase_DrawTiledPixmap(unsafe.Pointer(this.h), r.cPointer(), pixmap.cPointer(), s.cPointer()) + +} +func (this *QPaintEngine) OnDrawTiledPixmap(slot func(super func(r *QRectF, pixmap *QPixmap, s *QPointF), r *QRectF, pixmap *QPixmap, s *QPointF)) { + C.QPaintEngine_override_virtual_DrawTiledPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawTiledPixmap +func miqt_exec_callback_QPaintEngine_DrawTiledPixmap(self *C.QPaintEngine, cb C.intptr_t, r *C.QRectF, pixmap *C.QPixmap, s *C.QPointF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(r *QRectF, pixmap *QPixmap, s *QPointF), r *QRectF, pixmap *QPixmap, s *QPointF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(r)) + slotval2 := UnsafeNewQPixmap(unsafe.Pointer(pixmap), nil) + slotval3 := UnsafeNewQPointF(unsafe.Pointer(s)) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawTiledPixmap, slotval1, slotval2, slotval3) + +} + +func (this *QPaintEngine) callVirtualBase_DrawImage(r *QRectF, pm *QImage, sr *QRectF, flags ImageConversionFlag) { + + C.QPaintEngine_virtualbase_DrawImage(unsafe.Pointer(this.h), r.cPointer(), pm.cPointer(), sr.cPointer(), (C.int)(flags)) + +} +func (this *QPaintEngine) OnDrawImage(slot func(super func(r *QRectF, pm *QImage, sr *QRectF, flags ImageConversionFlag), r *QRectF, pm *QImage, sr *QRectF, flags ImageConversionFlag)) { + C.QPaintEngine_override_virtual_DrawImage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_DrawImage +func miqt_exec_callback_QPaintEngine_DrawImage(self *C.QPaintEngine, cb C.intptr_t, r *C.QRectF, pm *C.QImage, sr *C.QRectF, flags C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(r *QRectF, pm *QImage, sr *QRectF, flags ImageConversionFlag), r *QRectF, pm *QImage, sr *QRectF, flags ImageConversionFlag)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQRectF(unsafe.Pointer(r)) + slotval2 := UnsafeNewQImage(unsafe.Pointer(pm), nil) + slotval3 := UnsafeNewQRectF(unsafe.Pointer(sr)) + slotval4 := (ImageConversionFlag)(flags) + + gofunc((&QPaintEngine{h: self}).callVirtualBase_DrawImage, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QPaintEngine) callVirtualBase_CoordinateOffset() *QPoint { + + _ret := C.QPaintEngine_virtualbase_CoordinateOffset(unsafe.Pointer(this.h)) + _goptr := newQPoint(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPaintEngine) OnCoordinateOffset(slot func(super func() *QPoint) *QPoint) { + C.QPaintEngine_override_virtual_CoordinateOffset(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_CoordinateOffset +func miqt_exec_callback_QPaintEngine_CoordinateOffset(self *C.QPaintEngine, cb C.intptr_t) *C.QPoint { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QPoint) *QPoint) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPaintEngine{h: self}).callVirtualBase_CoordinateOffset) + + return virtualReturn.cPointer() + +} +func (this *QPaintEngine) OnType(slot func() QPaintEngine__Type) { + C.QPaintEngine_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_Type +func miqt_exec_callback_QPaintEngine_Type(self *C.QPaintEngine, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func() QPaintEngine__Type) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + + return (C.int)(virtualReturn) + +} + +func (this *QPaintEngine) callVirtualBase_CreatePixmap(size QSize) *QPixmap { + + _ret := C.QPaintEngine_virtualbase_CreatePixmap(unsafe.Pointer(this.h), size.cPointer()) + _goptr := newQPixmap(_ret, nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPaintEngine) OnCreatePixmap(slot func(super func(size QSize) *QPixmap, size QSize) *QPixmap) { + C.QPaintEngine_override_virtual_CreatePixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_CreatePixmap +func miqt_exec_callback_QPaintEngine_CreatePixmap(self *C.QPaintEngine, cb C.intptr_t, size *C.QSize) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(size QSize) *QPixmap, size QSize) *QPixmap) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + size_ret := size + size_goptr := newQSize(size_ret) + size_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *size_goptr + + virtualReturn := gofunc((&QPaintEngine{h: self}).callVirtualBase_CreatePixmap, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QPaintEngine) callVirtualBase_CreatePixmapFromImage(image QImage, flags ImageConversionFlag) *QPixmap { + + _ret := C.QPaintEngine_virtualbase_CreatePixmapFromImage(unsafe.Pointer(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 + +} +func (this *QPaintEngine) OnCreatePixmapFromImage(slot func(super func(image QImage, flags ImageConversionFlag) *QPixmap, image QImage, flags ImageConversionFlag) *QPixmap) { + C.QPaintEngine_override_virtual_CreatePixmapFromImage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPaintEngine_CreatePixmapFromImage +func miqt_exec_callback_QPaintEngine_CreatePixmapFromImage(self *C.QPaintEngine, cb C.intptr_t, image *C.QImage, flags C.int) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(image QImage, flags ImageConversionFlag) *QPixmap, image QImage, flags ImageConversionFlag) *QPixmap) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + image_ret := image + image_goptr := newQImage(image_ret, nil) + image_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *image_goptr + + slotval2 := (ImageConversionFlag)(flags) + + virtualReturn := gofunc((&QPaintEngine{h: self}).callVirtualBase_CreatePixmapFromImage, slotval1, slotval2) + + return virtualReturn.cPointer() + +} // Delete this object from C++ memory. func (this *QPaintEngine) Delete() { diff --git a/qt6/gen_qpaintengine.h b/qt6/gen_qpaintengine.h index 83ad1a2f..19ecbed7 100644 --- a/qt6/gen_qpaintengine.h +++ b/qt6/gen_qpaintengine.h @@ -66,6 +66,8 @@ struct miqt_string QTextItem_Text(const QTextItem* self); QFont* QTextItem_Font(const QTextItem* self); void QTextItem_Delete(QTextItem* self, bool isSubclass); +void QPaintEngine_new(QPaintEngine** outptr_QPaintEngine); +void QPaintEngine_new2(int features, QPaintEngine** outptr_QPaintEngine); bool QPaintEngine_IsActive(const QPaintEngine* self); void QPaintEngine_SetActive(QPaintEngine* self, bool newState); bool QPaintEngine_Begin(QPaintEngine* self, QPaintDevice* pdev); @@ -104,6 +106,50 @@ 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, int flags); +void QPaintEngine_override_virtual_Begin(void* self, intptr_t slot); +bool QPaintEngine_virtualbase_Begin(void* self, QPaintDevice* pdev); +void QPaintEngine_override_virtual_End(void* self, intptr_t slot); +bool QPaintEngine_virtualbase_End(void* self); +void QPaintEngine_override_virtual_UpdateState(void* self, intptr_t slot); +void QPaintEngine_virtualbase_UpdateState(void* self, QPaintEngineState* state); +void QPaintEngine_override_virtual_DrawRects(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawRects(void* self, QRect* rects, int rectCount); +void QPaintEngine_override_virtual_DrawRects2(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawRects2(void* self, QRectF* rects, int rectCount); +void QPaintEngine_override_virtual_DrawLines(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawLines(void* self, QLine* lines, int lineCount); +void QPaintEngine_override_virtual_DrawLines2(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawLines2(void* self, QLineF* lines, int lineCount); +void QPaintEngine_override_virtual_DrawEllipse(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawEllipse(void* self, QRectF* r); +void QPaintEngine_override_virtual_DrawEllipseWithQRect(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawEllipseWithQRect(void* self, QRect* r); +void QPaintEngine_override_virtual_DrawPath(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawPath(void* self, QPainterPath* path); +void QPaintEngine_override_virtual_DrawPoints(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawPoints(void* self, QPointF* points, int pointCount); +void QPaintEngine_override_virtual_DrawPoints2(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawPoints2(void* self, QPoint* points, int pointCount); +void QPaintEngine_override_virtual_DrawPolygon(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawPolygon(void* self, QPointF* points, int pointCount, int mode); +void QPaintEngine_override_virtual_DrawPolygon2(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawPolygon2(void* self, QPoint* points, int pointCount, int mode); +void QPaintEngine_override_virtual_DrawPixmap(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawPixmap(void* self, QRectF* r, QPixmap* pm, QRectF* sr); +void QPaintEngine_override_virtual_DrawTextItem(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawTextItem(void* self, QPointF* p, QTextItem* textItem); +void QPaintEngine_override_virtual_DrawTiledPixmap(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawTiledPixmap(void* self, QRectF* r, QPixmap* pixmap, QPointF* s); +void QPaintEngine_override_virtual_DrawImage(void* self, intptr_t slot); +void QPaintEngine_virtualbase_DrawImage(void* self, QRectF* r, QImage* pm, QRectF* sr, int flags); +void QPaintEngine_override_virtual_CoordinateOffset(void* self, intptr_t slot); +QPoint* QPaintEngine_virtualbase_CoordinateOffset(const void* self); +void QPaintEngine_override_virtual_Type(void* self, intptr_t slot); +int QPaintEngine_virtualbase_Type(const void* self); +void QPaintEngine_override_virtual_CreatePixmap(void* self, intptr_t slot); +QPixmap* QPaintEngine_virtualbase_CreatePixmap(void* self, QSize* size); +void QPaintEngine_override_virtual_CreatePixmapFromImage(void* self, intptr_t slot); +QPixmap* QPaintEngine_virtualbase_CreatePixmapFromImage(void* self, QImage* image, int flags); void QPaintEngine_Delete(QPaintEngine* self, bool isSubclass); int QPaintEngineState_State(const QPaintEngineState* self); diff --git a/qt6/gen_qrunnable.cpp b/qt6/gen_qrunnable.cpp index cdfa63b9..129fc5d9 100644 --- a/qt6/gen_qrunnable.cpp +++ b/qt6/gen_qrunnable.cpp @@ -3,6 +3,35 @@ #include "gen_qrunnable.h" #include "_cgo_export.h" +class MiqtVirtualQRunnable : public virtual QRunnable { +public: + + MiqtVirtualQRunnable(): QRunnable() {}; + + virtual ~MiqtVirtualQRunnable() = default; + + // 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) { + return; // Pure virtual, there is no base we can call + } + + + miqt_exec_callback_QRunnable_Run(this, handle__Run); + + + } + +}; + +void QRunnable_new(QRunnable** outptr_QRunnable) { + MiqtVirtualQRunnable* ret = new MiqtVirtualQRunnable(); + *outptr_QRunnable = ret; +} + void QRunnable_Run(QRunnable* self) { self->run(); } @@ -15,9 +44,13 @@ void QRunnable_SetAutoDelete(QRunnable* self, bool autoDelete) { self->setAutoDelete(autoDelete); } +void QRunnable_override_virtual_Run(void* self, intptr_t slot) { + dynamic_cast( (QRunnable*)(self) )->handle__Run = slot; +} + void QRunnable_Delete(QRunnable* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qrunnable.go b/qt6/gen_qrunnable.go index 00597a6c..ce944d38 100644 --- a/qt6/gen_qrunnable.go +++ b/qt6/gen_qrunnable.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -49,6 +50,16 @@ func UnsafeNewQRunnable(h unsafe.Pointer) *QRunnable { return &QRunnable{h: (*C.QRunnable)(h)} } +// NewQRunnable constructs a new QRunnable object. +func NewQRunnable() *QRunnable { + var outptr_QRunnable *C.QRunnable = nil + + C.QRunnable_new(&outptr_QRunnable) + ret := newQRunnable(outptr_QRunnable) + ret.isSubclass = true + return ret +} + func (this *QRunnable) Run() { C.QRunnable_Run(this.h) } @@ -60,6 +71,20 @@ func (this *QRunnable) AutoDelete() bool { func (this *QRunnable) SetAutoDelete(autoDelete bool) { C.QRunnable_SetAutoDelete(this.h, (C.bool)(autoDelete)) } +func (this *QRunnable) OnRun(slot func()) { + C.QRunnable_override_virtual_Run(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QRunnable_Run +func miqt_exec_callback_QRunnable_Run(self *C.QRunnable, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() + +} // Delete this object from C++ memory. func (this *QRunnable) Delete() { diff --git a/qt6/gen_qrunnable.h b/qt6/gen_qrunnable.h index 6903485a..194eaba8 100644 --- a/qt6/gen_qrunnable.h +++ b/qt6/gen_qrunnable.h @@ -20,9 +20,12 @@ class QRunnable; typedef struct QRunnable QRunnable; #endif +void QRunnable_new(QRunnable** outptr_QRunnable); void QRunnable_Run(QRunnable* self); bool QRunnable_AutoDelete(const QRunnable* self); void QRunnable_SetAutoDelete(QRunnable* self, bool autoDelete); +void QRunnable_override_virtual_Run(void* self, intptr_t slot); +void QRunnable_virtualbase_Run(void* self); void QRunnable_Delete(QRunnable* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qsortfilterproxymodel.cpp b/qt6/gen_qsortfilterproxymodel.cpp index 0c0a2233..abc4ed8e 100644 --- a/qt6/gen_qsortfilterproxymodel.cpp +++ b/qt6/gen_qsortfilterproxymodel.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -100,6 +101,56 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__MapSelectionToSource = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelection mapSelectionToSource(const QItemSelection& proxySelection) const override { + if (handle__MapSelectionToSource == 0) { + return QSortFilterProxyModel::mapSelectionToSource(proxySelection); + } + + const QItemSelection& proxySelection_ret = proxySelection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&proxySelection_ret); + + QItemSelection* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_MapSelectionToSource(const_cast(this), handle__MapSelectionToSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QItemSelection* virtualbase_MapSelectionToSource(QItemSelection* proxySelection) const { + + return new QItemSelection(QSortFilterProxyModel::mapSelectionToSource(*proxySelection)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapSelectionFromSource = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelection mapSelectionFromSource(const QItemSelection& sourceSelection) const override { + if (handle__MapSelectionFromSource == 0) { + return QSortFilterProxyModel::mapSelectionFromSource(sourceSelection); + } + + const QItemSelection& sourceSelection_ret = sourceSelection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&sourceSelection_ret); + + QItemSelection* callback_return_value = miqt_exec_callback_QSortFilterProxyModel_MapSelectionFromSource(const_cast(this), handle__MapSelectionFromSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QItemSelection* virtualbase_MapSelectionFromSource(QItemSelection* sourceSelection) const { + + return new QItemSelection(QSortFilterProxyModel::mapSelectionFromSource(*sourceSelection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__FilterAcceptsRow = 0; @@ -1200,6 +1251,14 @@ QModelIndex* QSortFilterProxyModel_MapFromSource(const QSortFilterProxyModel* se return new QModelIndex(self->mapFromSource(*sourceIndex)); } +QItemSelection* QSortFilterProxyModel_MapSelectionToSource(const QSortFilterProxyModel* self, QItemSelection* proxySelection) { + return new QItemSelection(self->mapSelectionToSource(*proxySelection)); +} + +QItemSelection* QSortFilterProxyModel_MapSelectionFromSource(const QSortFilterProxyModel* self, QItemSelection* sourceSelection) { + return new QItemSelection(self->mapSelectionFromSource(*sourceSelection)); +} + QRegularExpression* QSortFilterProxyModel_FilterRegularExpression(const QSortFilterProxyModel* self) { return new QRegularExpression(self->filterRegularExpression()); } @@ -1579,6 +1638,22 @@ QModelIndex* QSortFilterProxyModel_virtualbase_MapFromSource(const void* self, Q return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_MapFromSource(sourceIndex); } +void QSortFilterProxyModel_override_virtual_MapSelectionToSource(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__MapSelectionToSource = slot; +} + +QItemSelection* QSortFilterProxyModel_virtualbase_MapSelectionToSource(const void* self, QItemSelection* proxySelection) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_MapSelectionToSource(proxySelection); +} + +void QSortFilterProxyModel_override_virtual_MapSelectionFromSource(void* self, intptr_t slot) { + dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__MapSelectionFromSource = slot; +} + +QItemSelection* QSortFilterProxyModel_virtualbase_MapSelectionFromSource(const void* self, QItemSelection* sourceSelection) { + return ( (const MiqtVirtualQSortFilterProxyModel*)(self) )->virtualbase_MapSelectionFromSource(sourceSelection); +} + void QSortFilterProxyModel_override_virtual_FilterAcceptsRow(void* self, intptr_t slot) { dynamic_cast( (QSortFilterProxyModel*)(self) )->handle__FilterAcceptsRow = slot; } diff --git a/qt6/gen_qsortfilterproxymodel.go b/qt6/gen_qsortfilterproxymodel.go index c8f33d77..10e26445 100644 --- a/qt6/gen_qsortfilterproxymodel.go +++ b/qt6/gen_qsortfilterproxymodel.go @@ -116,6 +116,20 @@ func (this *QSortFilterProxyModel) MapFromSource(sourceIndex *QModelIndex) *QMod return _goptr } +func (this *QSortFilterProxyModel) MapSelectionToSource(proxySelection *QItemSelection) *QItemSelection { + _ret := C.QSortFilterProxyModel_MapSelectionToSource(this.h, proxySelection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSortFilterProxyModel) MapSelectionFromSource(sourceSelection *QItemSelection) *QItemSelection { + _ret := C.QSortFilterProxyModel_MapSelectionFromSource(this.h, sourceSelection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + func (this *QSortFilterProxyModel) FilterRegularExpression() *QRegularExpression { _ret := C.QSortFilterProxyModel_FilterRegularExpression(this.h) _goptr := newQRegularExpression(_ret) @@ -641,6 +655,62 @@ func miqt_exec_callback_QSortFilterProxyModel_MapFromSource(self *C.QSortFilterP } +func (this *QSortFilterProxyModel) callVirtualBase_MapSelectionToSource(proxySelection *QItemSelection) *QItemSelection { + + _ret := C.QSortFilterProxyModel_virtualbase_MapSelectionToSource(unsafe.Pointer(this.h), proxySelection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSortFilterProxyModel) OnMapSelectionToSource(slot func(super func(proxySelection *QItemSelection) *QItemSelection, proxySelection *QItemSelection) *QItemSelection) { + C.QSortFilterProxyModel_override_virtual_MapSelectionToSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_MapSelectionToSource +func miqt_exec_callback_QSortFilterProxyModel_MapSelectionToSource(self *C.QSortFilterProxyModel, cb C.intptr_t, proxySelection *C.QItemSelection) *C.QItemSelection { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(proxySelection *QItemSelection) *QItemSelection, proxySelection *QItemSelection) *QItemSelection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(proxySelection)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_MapSelectionToSource, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QSortFilterProxyModel) callVirtualBase_MapSelectionFromSource(sourceSelection *QItemSelection) *QItemSelection { + + _ret := C.QSortFilterProxyModel_virtualbase_MapSelectionFromSource(unsafe.Pointer(this.h), sourceSelection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSortFilterProxyModel) OnMapSelectionFromSource(slot func(super func(sourceSelection *QItemSelection) *QItemSelection, sourceSelection *QItemSelection) *QItemSelection) { + C.QSortFilterProxyModel_override_virtual_MapSelectionFromSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSortFilterProxyModel_MapSelectionFromSource +func miqt_exec_callback_QSortFilterProxyModel_MapSelectionFromSource(self *C.QSortFilterProxyModel, cb C.intptr_t, sourceSelection *C.QItemSelection) *C.QItemSelection { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceSelection *QItemSelection) *QItemSelection, sourceSelection *QItemSelection) *QItemSelection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(sourceSelection)) + + virtualReturn := gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_MapSelectionFromSource, slotval1) + + return virtualReturn.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())) diff --git a/qt6/gen_qsortfilterproxymodel.h b/qt6/gen_qsortfilterproxymodel.h index 93760a8b..0f903ec2 100644 --- a/qt6/gen_qsortfilterproxymodel.h +++ b/qt6/gen_qsortfilterproxymodel.h @@ -18,6 +18,7 @@ extern "C" { class QAbstractItemModel; class QAbstractProxyModel; class QByteArray; +class QItemSelection; class QMetaObject; class QMimeData; class QModelIndex; @@ -30,6 +31,7 @@ class QVariant; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractProxyModel QAbstractProxyModel; typedef struct QByteArray QByteArray; +typedef struct QItemSelection QItemSelection; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; @@ -48,6 +50,8 @@ struct miqt_string QSortFilterProxyModel_Tr(const char* s); void QSortFilterProxyModel_SetSourceModel(QSortFilterProxyModel* self, QAbstractItemModel* sourceModel); QModelIndex* QSortFilterProxyModel_MapToSource(const QSortFilterProxyModel* self, QModelIndex* proxyIndex); QModelIndex* QSortFilterProxyModel_MapFromSource(const QSortFilterProxyModel* self, QModelIndex* sourceIndex); +QItemSelection* QSortFilterProxyModel_MapSelectionToSource(const QSortFilterProxyModel* self, QItemSelection* proxySelection); +QItemSelection* QSortFilterProxyModel_MapSelectionFromSource(const QSortFilterProxyModel* self, QItemSelection* sourceSelection); QRegularExpression* QSortFilterProxyModel_FilterRegularExpression(const QSortFilterProxyModel* self); int QSortFilterProxyModel_FilterKeyColumn(const QSortFilterProxyModel* self); void QSortFilterProxyModel_SetFilterKeyColumn(QSortFilterProxyModel* self, int column); @@ -126,6 +130,10 @@ void QSortFilterProxyModel_override_virtual_MapToSource(void* self, intptr_t slo 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_MapSelectionToSource(void* self, intptr_t slot); +QItemSelection* QSortFilterProxyModel_virtualbase_MapSelectionToSource(const void* self, QItemSelection* proxySelection); +void QSortFilterProxyModel_override_virtual_MapSelectionFromSource(void* self, intptr_t slot); +QItemSelection* QSortFilterProxyModel_virtualbase_MapSelectionFromSource(const void* self, QItemSelection* sourceSelection); 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); diff --git a/qt6/gen_qstyle.cpp b/qt6/gen_qstyle.cpp index 6da08c74..d2d44a15 100644 --- a/qt6/gen_qstyle.cpp +++ b/qt6/gen_qstyle.cpp @@ -1,6 +1,9 @@ #include +#include +#include #include #include +#include #include #include #include @@ -16,11 +19,749 @@ #include #include #include +#include #include #include #include "gen_qstyle.h" #include "_cgo_export.h" +class MiqtVirtualQStyle : public virtual QStyle { +public: + + MiqtVirtualQStyle(): QStyle() {}; + + virtual ~MiqtVirtualQStyle() = default; + + // 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) { + QStyle::polish(widget); + return; + } + + QWidget* sigval1 = widget; + + miqt_exec_callback_QStyle_Polish(this, handle__Polish, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Polish(QWidget* widget) { + + QStyle::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) { + QStyle::unpolish(widget); + return; + } + + QWidget* sigval1 = widget; + + miqt_exec_callback_QStyle_Unpolish(this, handle__Unpolish, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Unpolish(QWidget* widget) { + + QStyle::unpolish(widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishWithApplication = 0; + + // Subclass to allow providing a Go implementation + virtual void polish(QApplication* application) override { + if (handle__PolishWithApplication == 0) { + QStyle::polish(application); + return; + } + + QApplication* sigval1 = application; + + miqt_exec_callback_QStyle_PolishWithApplication(this, handle__PolishWithApplication, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishWithApplication(QApplication* application) { + + QStyle::polish(application); + + } + + // 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) { + QStyle::unpolish(application); + return; + } + + QApplication* sigval1 = application; + + miqt_exec_callback_QStyle_UnpolishWithApplication(this, handle__UnpolishWithApplication, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UnpolishWithApplication(QApplication* application) { + + QStyle::unpolish(application); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishWithPalette = 0; + + // Subclass to allow providing a Go implementation + virtual void polish(QPalette& palette) override { + if (handle__PolishWithPalette == 0) { + QStyle::polish(palette); + return; + } + + QPalette& palette_ret = palette; + // Cast returned reference into pointer + QPalette* sigval1 = &palette_ret; + + miqt_exec_callback_QStyle_PolishWithPalette(this, handle__PolishWithPalette, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishWithPalette(QPalette* palette) { + + QStyle::polish(*palette); + + } + + // 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 QStyle::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_QStyle_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(QStyle::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 QStyle::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_QStyle_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(QStyle::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) { + QStyle::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_QStyle_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); + + QStyle::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) { + QStyle::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_QStyle_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 { + + QStyle::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 QStyle::standardPalette(); + } + + + QPalette* callback_return_value = miqt_exec_callback_QStyle_StandardPalette(const_cast(this), handle__StandardPalette); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPalette* virtualbase_StandardPalette() const { + + return new QPalette(QStyle::standardPalette()); + + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + 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_QStyle_DrawPrimitive(const_cast(this), handle__DrawPrimitive, sigval1, sigval2, sigval3, sigval4); + + + } + + // 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) { + return; // Pure virtual, there is no base we can call + } + + 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_QStyle_DrawControl(const_cast(this), handle__DrawControl, sigval1, sigval2, sigval3, sigval4); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SubElementRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRect subElementRect(QStyle::SubElement subElement, const QStyleOption* option, const QWidget* widget) const override { + if (handle__SubElementRect == 0) { + return QRect(); // Pure virtual, there is no base we can call + } + + QStyle::SubElement subElement_ret = subElement; + int sigval1 = static_cast(subElement_ret); + QStyleOption* sigval2 = (QStyleOption*) option; + QWidget* sigval3 = (QWidget*) widget; + + QRect* callback_return_value = miqt_exec_callback_QStyle_SubElementRect(const_cast(this), handle__SubElementRect, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // 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* widget) const override { + if (handle__DrawComplexControl == 0) { + return; // Pure virtual, there is no base we can call + } + + QStyle::ComplexControl cc_ret = cc; + int sigval1 = static_cast(cc_ret); + QStyleOptionComplex* sigval2 = (QStyleOptionComplex*) opt; + QPainter* sigval3 = p; + QWidget* sigval4 = (QWidget*) widget; + + miqt_exec_callback_QStyle_DrawComplexControl(const_cast(this), handle__DrawComplexControl, sigval1, sigval2, sigval3, sigval4); + + + } + + // 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* widget) const override { + if (handle__HitTestComplexControl == 0) { + return (QStyle::SubControl)(0); // Pure virtual, there is no base we can call + } + + 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*) widget; + + int callback_return_value = miqt_exec_callback_QStyle_HitTestComplexControl(const_cast(this), handle__HitTestComplexControl, sigval1, sigval2, sigval3, sigval4); + + return static_cast(callback_return_value); + } + + // 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 QRect(); // Pure virtual, there is no base we can call + } + + 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_QStyle_SubControlRect(const_cast(this), handle__SubControlRect, sigval1, sigval2, sigval3, sigval4); + + return *callback_return_value; + } + + // 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 0; // Pure virtual, there is no base we can call + } + + 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_QStyle_PixelMetric(const_cast(this), handle__PixelMetric, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // 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* w) const override { + if (handle__SizeFromContents == 0) { + return QSize(); // Pure virtual, there is no base we can call + } + + 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*) w; + + QSize* callback_return_value = miqt_exec_callback_QStyle_SizeFromContents(const_cast(this), handle__SizeFromContents, sigval1, sigval2, sigval3, sigval4); + + return *callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__StyleHint = 0; + + // Subclass to allow providing a Go implementation + virtual int styleHint(QStyle::StyleHint stylehint, const QStyleOption* opt, const QWidget* widget, QStyleHintReturn* returnData) const override { + if (handle__StyleHint == 0) { + return 0; // Pure virtual, there is no base we can call + } + + QStyle::StyleHint stylehint_ret = stylehint; + int sigval1 = static_cast(stylehint_ret); + QStyleOption* sigval2 = (QStyleOption*) opt; + QWidget* sigval3 = (QWidget*) widget; + QStyleHintReturn* sigval4 = returnData; + + int callback_return_value = miqt_exec_callback_QStyle_StyleHint(const_cast(this), handle__StyleHint, sigval1, sigval2, sigval3, sigval4); + + return static_cast(callback_return_value); + } + + // 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 QPixmap(); // Pure virtual, there is no base we can call + } + + 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_QStyle_StandardPixmap(const_cast(this), handle__StandardPixmap, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // 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 QIcon(); // Pure virtual, there is no base we can call + } + + 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_QStyle_StandardIcon(const_cast(this), handle__StandardIcon, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // 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 QPixmap(); // Pure virtual, there is no base we can call + } + + 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_QStyle_GeneratedIconPixmap(const_cast(this), handle__GeneratedIconPixmap, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // 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 0; // Pure virtual, there is no base we can call + } + + 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_QStyle_LayoutSpacing(const_cast(this), handle__LayoutSpacing, sigval1, sigval2, sigval3, sigval4, sigval5); + + return static_cast(callback_return_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 QStyle::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QStyle_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QStyle::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 QStyle::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QStyle_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QStyle::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) { + QStyle::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QStyle_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QStyle::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) { + QStyle::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QStyle_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QStyle::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) { + QStyle::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QStyle_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QStyle::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) { + QStyle::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QStyle_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QStyle::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) { + QStyle::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QStyle_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QStyle::disconnectNotify(*signal); + + } + +}; + +void QStyle_new(QStyle** outptr_QStyle, QObject** outptr_QObject) { + MiqtVirtualQStyle* ret = new MiqtVirtualQStyle(); + *outptr_QStyle = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QStyle_MetaObject(const QStyle* self) { return (QMetaObject*) self->metaObject(); } @@ -217,9 +958,197 @@ 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_override_virtual_Polish(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__Polish = slot; +} + +void QStyle_virtualbase_Polish(void* self, QWidget* widget) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_Polish(widget); +} + +void QStyle_override_virtual_Unpolish(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__Unpolish = slot; +} + +void QStyle_virtualbase_Unpolish(void* self, QWidget* widget) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_Unpolish(widget); +} + +void QStyle_override_virtual_PolishWithApplication(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__PolishWithApplication = slot; +} + +void QStyle_virtualbase_PolishWithApplication(void* self, QApplication* application) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_PolishWithApplication(application); +} + +void QStyle_override_virtual_UnpolishWithApplication(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__UnpolishWithApplication = slot; +} + +void QStyle_virtualbase_UnpolishWithApplication(void* self, QApplication* application) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_UnpolishWithApplication(application); +} + +void QStyle_override_virtual_PolishWithPalette(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__PolishWithPalette = slot; +} + +void QStyle_virtualbase_PolishWithPalette(void* self, QPalette* palette) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_PolishWithPalette(palette); +} + +void QStyle_override_virtual_ItemTextRect(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__ItemTextRect = slot; +} + +QRect* QStyle_virtualbase_ItemTextRect(const void* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text) { + return ( (const MiqtVirtualQStyle*)(self) )->virtualbase_ItemTextRect(fm, r, flags, enabled, text); +} + +void QStyle_override_virtual_ItemPixmapRect(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__ItemPixmapRect = slot; +} + +QRect* QStyle_virtualbase_ItemPixmapRect(const void* self, QRect* r, int flags, QPixmap* pixmap) { + return ( (const MiqtVirtualQStyle*)(self) )->virtualbase_ItemPixmapRect(r, flags, pixmap); +} + +void QStyle_override_virtual_DrawItemText(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__DrawItemText = slot; +} + +void QStyle_virtualbase_DrawItemText(const void* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) { + ( (const MiqtVirtualQStyle*)(self) )->virtualbase_DrawItemText(painter, rect, flags, pal, enabled, text, textRole); +} + +void QStyle_override_virtual_DrawItemPixmap(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__DrawItemPixmap = slot; +} + +void QStyle_virtualbase_DrawItemPixmap(const void* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap) { + ( (const MiqtVirtualQStyle*)(self) )->virtualbase_DrawItemPixmap(painter, rect, alignment, pixmap); +} + +void QStyle_override_virtual_StandardPalette(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__StandardPalette = slot; +} + +QPalette* QStyle_virtualbase_StandardPalette(const void* self) { + return ( (const MiqtVirtualQStyle*)(self) )->virtualbase_StandardPalette(); +} + +void QStyle_override_virtual_DrawPrimitive(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__DrawPrimitive = slot; +} + +void QStyle_override_virtual_DrawControl(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__DrawControl = slot; +} + +void QStyle_override_virtual_SubElementRect(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__SubElementRect = slot; +} + +void QStyle_override_virtual_DrawComplexControl(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__DrawComplexControl = slot; +} + +void QStyle_override_virtual_HitTestComplexControl(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__HitTestComplexControl = slot; +} + +void QStyle_override_virtual_SubControlRect(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__SubControlRect = slot; +} + +void QStyle_override_virtual_PixelMetric(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__PixelMetric = slot; +} + +void QStyle_override_virtual_SizeFromContents(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__SizeFromContents = slot; +} + +void QStyle_override_virtual_StyleHint(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__StyleHint = slot; +} + +void QStyle_override_virtual_StandardPixmap(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__StandardPixmap = slot; +} + +void QStyle_override_virtual_StandardIcon(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__StandardIcon = slot; +} + +void QStyle_override_virtual_GeneratedIconPixmap(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__GeneratedIconPixmap = slot; +} + +void QStyle_override_virtual_LayoutSpacing(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__LayoutSpacing = slot; +} + +void QStyle_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__Event = slot; +} + +bool QStyle_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQStyle*)(self) )->virtualbase_Event(event); +} + +void QStyle_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__EventFilter = slot; +} + +bool QStyle_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQStyle*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QStyle_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__TimerEvent = slot; +} + +void QStyle_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_TimerEvent(event); +} + +void QStyle_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__ChildEvent = slot; +} + +void QStyle_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_ChildEvent(event); +} + +void QStyle_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__CustomEvent = slot; +} + +void QStyle_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_CustomEvent(event); +} + +void QStyle_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__ConnectNotify = slot; +} + +void QStyle_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QStyle_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QStyle*)(self) )->handle__DisconnectNotify = slot; +} + +void QStyle_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQStyle*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QStyle_Delete(QStyle* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qstyle.go b/qt6/gen_qstyle.go index 0cdc4a6d..d6315bde 100644 --- a/qt6/gen_qstyle.go +++ b/qt6/gen_qstyle.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -671,6 +672,17 @@ func UnsafeNewQStyle(h unsafe.Pointer, h_QObject unsafe.Pointer) *QStyle { QObject: UnsafeNewQObject(h_QObject)} } +// NewQStyle constructs a new QStyle object. +func NewQStyle() *QStyle { + var outptr_QStyle *C.QStyle = nil + var outptr_QObject *C.QObject = nil + + C.QStyle_new(&outptr_QStyle, &outptr_QObject) + ret := newQStyle(outptr_QStyle, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QStyle) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QStyle_MetaObject(this.h))) } @@ -903,6 +915,741 @@ func (this *QStyle) CombinedLayoutSpacing5(controls1 QSizePolicy__ControlType, c return (int)(C.QStyle_CombinedLayoutSpacing5(this.h, (C.int)(controls1), (C.int)(controls2), (C.int)(orientation), option.cPointer(), widget.cPointer())) } +func (this *QStyle) callVirtualBase_Polish(widget *QWidget) { + + C.QStyle_virtualbase_Polish(unsafe.Pointer(this.h), widget.cPointer()) + +} +func (this *QStyle) OnPolish(slot func(super func(widget *QWidget), widget *QWidget)) { + C.QStyle_override_virtual_Polish(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_Polish +func miqt_exec_callback_QStyle_Polish(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_Polish, slotval1) + +} + +func (this *QStyle) callVirtualBase_Unpolish(widget *QWidget) { + + C.QStyle_virtualbase_Unpolish(unsafe.Pointer(this.h), widget.cPointer()) + +} +func (this *QStyle) OnUnpolish(slot func(super func(widget *QWidget), widget *QWidget)) { + C.QStyle_override_virtual_Unpolish(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_Unpolish +func miqt_exec_callback_QStyle_Unpolish(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_Unpolish, slotval1) + +} + +func (this *QStyle) callVirtualBase_PolishWithApplication(application *QApplication) { + + C.QStyle_virtualbase_PolishWithApplication(unsafe.Pointer(this.h), application.cPointer()) + +} +func (this *QStyle) OnPolishWithApplication(slot func(super func(application *QApplication), application *QApplication)) { + C.QStyle_override_virtual_PolishWithApplication(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_PolishWithApplication +func miqt_exec_callback_QStyle_PolishWithApplication(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_PolishWithApplication, slotval1) + +} + +func (this *QStyle) callVirtualBase_UnpolishWithApplication(application *QApplication) { + + C.QStyle_virtualbase_UnpolishWithApplication(unsafe.Pointer(this.h), application.cPointer()) + +} +func (this *QStyle) OnUnpolishWithApplication(slot func(super func(application *QApplication), application *QApplication)) { + C.QStyle_override_virtual_UnpolishWithApplication(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_UnpolishWithApplication +func miqt_exec_callback_QStyle_UnpolishWithApplication(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_UnpolishWithApplication, slotval1) + +} + +func (this *QStyle) callVirtualBase_PolishWithPalette(palette *QPalette) { + + C.QStyle_virtualbase_PolishWithPalette(unsafe.Pointer(this.h), palette.cPointer()) + +} +func (this *QStyle) OnPolishWithPalette(slot func(super func(palette *QPalette), palette *QPalette)) { + C.QStyle_override_virtual_PolishWithPalette(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_PolishWithPalette +func miqt_exec_callback_QStyle_PolishWithPalette(self *C.QStyle, cb C.intptr_t, palette *C.QPalette) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(palette *QPalette), palette *QPalette)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQPalette(unsafe.Pointer(palette)) + + gofunc((&QStyle{h: self}).callVirtualBase_PolishWithPalette, slotval1) + +} + +func (this *QStyle) 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.QStyle_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 *QStyle) 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.QStyle_override_virtual_ItemTextRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_ItemTextRect +func miqt_exec_callback_QStyle_ItemTextRect(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_ItemTextRect, slotval1, slotval2, slotval3, slotval4, slotval5) + + return virtualReturn.cPointer() + +} + +func (this *QStyle) callVirtualBase_ItemPixmapRect(r *QRect, flags int, pixmap *QPixmap) *QRect { + + _ret := C.QStyle_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 *QStyle) OnItemPixmapRect(slot func(super func(r *QRect, flags int, pixmap *QPixmap) *QRect, r *QRect, flags int, pixmap *QPixmap) *QRect) { + C.QStyle_override_virtual_ItemPixmapRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_ItemPixmapRect +func miqt_exec_callback_QStyle_ItemPixmapRect(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_ItemPixmapRect, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QStyle) 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.QStyle_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 *QStyle) 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.QStyle_override_virtual_DrawItemText(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_DrawItemText +func miqt_exec_callback_QStyle_DrawItemText(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_DrawItemText, slotval1, slotval2, slotval3, slotval4, slotval5, slotval6, slotval7) + +} + +func (this *QStyle) callVirtualBase_DrawItemPixmap(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap) { + + C.QStyle_virtualbase_DrawItemPixmap(unsafe.Pointer(this.h), painter.cPointer(), rect.cPointer(), (C.int)(alignment), pixmap.cPointer()) + +} +func (this *QStyle) OnDrawItemPixmap(slot func(super func(painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap), painter *QPainter, rect *QRect, alignment int, pixmap *QPixmap)) { + C.QStyle_override_virtual_DrawItemPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_DrawItemPixmap +func miqt_exec_callback_QStyle_DrawItemPixmap(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_DrawItemPixmap, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QStyle) callVirtualBase_StandardPalette() *QPalette { + + _ret := C.QStyle_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 *QStyle) OnStandardPalette(slot func(super func() *QPalette) *QPalette) { + C.QStyle_override_virtual_StandardPalette(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_StandardPalette +func miqt_exec_callback_QStyle_StandardPalette(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_StandardPalette) + + return virtualReturn.cPointer() + +} +func (this *QStyle) OnDrawPrimitive(slot func(pe QStyle__PrimitiveElement, opt *QStyleOption, p *QPainter, w *QWidget)) { + C.QStyle_override_virtual_DrawPrimitive(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_DrawPrimitive +func miqt_exec_callback_QStyle_DrawPrimitive(self *C.QStyle, cb C.intptr_t, pe C.int, opt *C.QStyleOption, p *C.QPainter, w *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3, slotval4) + +} +func (this *QStyle) OnDrawControl(slot func(element QStyle__ControlElement, opt *QStyleOption, p *QPainter, w *QWidget)) { + C.QStyle_override_virtual_DrawControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_DrawControl +func miqt_exec_callback_QStyle_DrawControl(self *C.QStyle, cb C.intptr_t, element C.int, opt *C.QStyleOption, p *C.QPainter, w *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3, slotval4) + +} +func (this *QStyle) OnSubElementRect(slot func(subElement QStyle__SubElement, option *QStyleOption, widget *QWidget) *QRect) { + C.QStyle_override_virtual_SubElementRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_SubElementRect +func miqt_exec_callback_QStyle_SubElementRect(self *C.QStyle, cb C.intptr_t, subElement C.int, option *C.QStyleOption, widget *C.QWidget) *C.QRect { + gofunc, ok := cgo.Handle(cb).Value().(func(subElement 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)(subElement) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc(slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} +func (this *QStyle) OnDrawComplexControl(slot func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, widget *QWidget)) { + C.QStyle_override_virtual_DrawComplexControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_DrawComplexControl +func miqt_exec_callback_QStyle_DrawComplexControl(self *C.QStyle, cb C.intptr_t, cc C.int, opt *C.QStyleOptionComplex, p *C.QPainter, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, p *QPainter, widget *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(widget), nil, nil) + + gofunc(slotval1, slotval2, slotval3, slotval4) + +} +func (this *QStyle) OnHitTestComplexControl(slot func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *QPoint, widget *QWidget) QStyle__SubControl) { + C.QStyle_override_virtual_HitTestComplexControl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_HitTestComplexControl +func miqt_exec_callback_QStyle_HitTestComplexControl(self *C.QStyle, cb C.intptr_t, cc C.int, opt *C.QStyleOptionComplex, pt *C.QPoint, widget *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, pt *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)(cc) + + slotval2 := UnsafeNewQStyleOptionComplex(unsafe.Pointer(opt), nil) + slotval3 := UnsafeNewQPoint(unsafe.Pointer(pt)) + slotval4 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + virtualReturn := gofunc(slotval1, slotval2, slotval3, slotval4) + + return (C.int)(virtualReturn) + +} +func (this *QStyle) OnSubControlRect(slot func(cc QStyle__ComplexControl, opt *QStyleOptionComplex, sc QStyle__SubControl, widget *QWidget) *QRect) { + C.QStyle_override_virtual_SubControlRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_SubControlRect +func miqt_exec_callback_QStyle_SubControlRect(self *C.QStyle, 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(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(slotval1, slotval2, slotval3, slotval4) + + return virtualReturn.cPointer() + +} +func (this *QStyle) OnPixelMetric(slot func(metric QStyle__PixelMetric, option *QStyleOption, widget *QWidget) int) { + C.QStyle_override_virtual_PixelMetric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_PixelMetric +func miqt_exec_callback_QStyle_PixelMetric(self *C.QStyle, cb C.intptr_t, metric C.int, option *C.QStyleOption, widget *C.QWidget) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + + return (C.int)(virtualReturn) + +} +func (this *QStyle) OnSizeFromContents(slot func(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, w *QWidget) *QSize) { + C.QStyle_override_virtual_SizeFromContents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_SizeFromContents +func miqt_exec_callback_QStyle_SizeFromContents(self *C.QStyle, cb C.intptr_t, ct C.int, opt *C.QStyleOption, contentsSize *C.QSize, w *C.QWidget) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(ct QStyle__ContentsType, opt *QStyleOption, contentsSize *QSize, w *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(w), nil, nil) + + virtualReturn := gofunc(slotval1, slotval2, slotval3, slotval4) + + return virtualReturn.cPointer() + +} +func (this *QStyle) OnStyleHint(slot func(stylehint QStyle__StyleHint, opt *QStyleOption, widget *QWidget, returnData *QStyleHintReturn) int) { + C.QStyle_override_virtual_StyleHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_StyleHint +func miqt_exec_callback_QStyle_StyleHint(self *C.QStyle, cb C.intptr_t, stylehint C.int, opt *C.QStyleOption, widget *C.QWidget, returnData *C.QStyleHintReturn) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(stylehint QStyle__StyleHint, opt *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)(stylehint) + + slotval2 := UnsafeNewQStyleOption(unsafe.Pointer(opt)) + slotval3 := UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + slotval4 := UnsafeNewQStyleHintReturn(unsafe.Pointer(returnData)) + + virtualReturn := gofunc(slotval1, slotval2, slotval3, slotval4) + + return (C.int)(virtualReturn) + +} +func (this *QStyle) OnStandardPixmap(slot func(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap) { + C.QStyle_override_virtual_StandardPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_StandardPixmap +func miqt_exec_callback_QStyle_StandardPixmap(self *C.QStyle, cb C.intptr_t, standardPixmap C.int, opt *C.QStyleOption, widget *C.QWidget) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} +func (this *QStyle) OnStandardIcon(slot func(standardIcon QStyle__StandardPixmap, option *QStyleOption, widget *QWidget) *QIcon) { + C.QStyle_override_virtual_StandardIcon(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_StandardIcon +func miqt_exec_callback_QStyle_StandardIcon(self *C.QStyle, cb C.intptr_t, standardIcon C.int, option *C.QStyleOption, widget *C.QWidget) *C.QIcon { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} +func (this *QStyle) OnGeneratedIconPixmap(slot func(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap) { + C.QStyle_override_virtual_GeneratedIconPixmap(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_GeneratedIconPixmap +func miqt_exec_callback_QStyle_GeneratedIconPixmap(self *C.QStyle, cb C.intptr_t, iconMode C.int, pixmap *C.QPixmap, opt *C.QStyleOption) *C.QPixmap { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} +func (this *QStyle) OnLayoutSpacing(slot func(control1 QSizePolicy__ControlType, control2 QSizePolicy__ControlType, orientation Orientation, option *QStyleOption, widget *QWidget) int) { + C.QStyle_override_virtual_LayoutSpacing(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_LayoutSpacing +func miqt_exec_callback_QStyle_LayoutSpacing(self *C.QStyle, 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(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(slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.int)(virtualReturn) + +} + +func (this *QStyle) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QStyle_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QStyle) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QStyle_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_Event +func miqt_exec_callback_QStyle_Event(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QStyle) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QStyle_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QStyle) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QStyle_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_EventFilter +func miqt_exec_callback_QStyle_EventFilter(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QStyle) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QStyle_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStyle) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QStyle_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_TimerEvent +func miqt_exec_callback_QStyle_TimerEvent(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QStyle) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QStyle_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStyle) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QStyle_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_ChildEvent +func miqt_exec_callback_QStyle_ChildEvent(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QStyle) callVirtualBase_CustomEvent(event *QEvent) { + + C.QStyle_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStyle) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QStyle_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_CustomEvent +func miqt_exec_callback_QStyle_CustomEvent(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QStyle) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QStyle_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QStyle) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QStyle_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_ConnectNotify +func miqt_exec_callback_QStyle_ConnectNotify(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QStyle) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QStyle_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QStyle) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QStyle_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStyle_DisconnectNotify +func miqt_exec_callback_QStyle_DisconnectNotify(self *C.QStyle, 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((&QStyle{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + // Delete this object from C++ memory. func (this *QStyle) Delete() { C.QStyle_Delete(this.h, C.bool(this.isSubclass)) diff --git a/qt6/gen_qstyle.h b/qt6/gen_qstyle.h index ceb43ee0..8d306e2c 100644 --- a/qt6/gen_qstyle.h +++ b/qt6/gen_qstyle.h @@ -16,8 +16,11 @@ extern "C" { #ifdef __cplusplus class QApplication; +class QChildEvent; +class QEvent; class QFontMetrics; class QIcon; +class QMetaMethod; class QMetaObject; class QObject; class QPainter; @@ -30,11 +33,15 @@ class QStyle; class QStyleHintReturn; class QStyleOption; class QStyleOptionComplex; +class QTimerEvent; class QWidget; #else typedef struct QApplication QApplication; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; typedef struct QFontMetrics QFontMetrics; typedef struct QIcon QIcon; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QPainter QPainter; @@ -47,9 +54,11 @@ typedef struct QStyle QStyle; typedef struct QStyleHintReturn QStyleHintReturn; typedef struct QStyleOption QStyleOption; typedef struct QStyleOptionComplex QStyleOptionComplex; +typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif +void QStyle_new(QStyle** outptr_QStyle, QObject** outptr_QObject); QMetaObject* QStyle_MetaObject(const QStyle* self); void* QStyle_Metacast(QStyle* self, const char* param1); struct miqt_string QStyle_Tr(const char* s); @@ -91,6 +100,66 @@ int QStyle_SliderPositionFromValue5(int min, int max, int val, int space, bool u int QStyle_SliderValueFromPosition5(int min, int max, int pos, int space, bool upsideDown); 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_override_virtual_Polish(void* self, intptr_t slot); +void QStyle_virtualbase_Polish(void* self, QWidget* widget); +void QStyle_override_virtual_Unpolish(void* self, intptr_t slot); +void QStyle_virtualbase_Unpolish(void* self, QWidget* widget); +void QStyle_override_virtual_PolishWithApplication(void* self, intptr_t slot); +void QStyle_virtualbase_PolishWithApplication(void* self, QApplication* application); +void QStyle_override_virtual_UnpolishWithApplication(void* self, intptr_t slot); +void QStyle_virtualbase_UnpolishWithApplication(void* self, QApplication* application); +void QStyle_override_virtual_PolishWithPalette(void* self, intptr_t slot); +void QStyle_virtualbase_PolishWithPalette(void* self, QPalette* palette); +void QStyle_override_virtual_ItemTextRect(void* self, intptr_t slot); +QRect* QStyle_virtualbase_ItemTextRect(const void* self, QFontMetrics* fm, QRect* r, int flags, bool enabled, struct miqt_string text); +void QStyle_override_virtual_ItemPixmapRect(void* self, intptr_t slot); +QRect* QStyle_virtualbase_ItemPixmapRect(const void* self, QRect* r, int flags, QPixmap* pixmap); +void QStyle_override_virtual_DrawItemText(void* self, intptr_t slot); +void QStyle_virtualbase_DrawItemText(const void* self, QPainter* painter, QRect* rect, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole); +void QStyle_override_virtual_DrawItemPixmap(void* self, intptr_t slot); +void QStyle_virtualbase_DrawItemPixmap(const void* self, QPainter* painter, QRect* rect, int alignment, QPixmap* pixmap); +void QStyle_override_virtual_StandardPalette(void* self, intptr_t slot); +QPalette* QStyle_virtualbase_StandardPalette(const void* self); +void QStyle_override_virtual_DrawPrimitive(void* self, intptr_t slot); +void QStyle_virtualbase_DrawPrimitive(const void* self, int pe, QStyleOption* opt, QPainter* p, QWidget* w); +void QStyle_override_virtual_DrawControl(void* self, intptr_t slot); +void QStyle_virtualbase_DrawControl(const void* self, int element, QStyleOption* opt, QPainter* p, QWidget* w); +void QStyle_override_virtual_SubElementRect(void* self, intptr_t slot); +QRect* QStyle_virtualbase_SubElementRect(const void* self, int subElement, QStyleOption* option, QWidget* widget); +void QStyle_override_virtual_DrawComplexControl(void* self, intptr_t slot); +void QStyle_virtualbase_DrawComplexControl(const void* self, int cc, QStyleOptionComplex* opt, QPainter* p, QWidget* widget); +void QStyle_override_virtual_HitTestComplexControl(void* self, intptr_t slot); +int QStyle_virtualbase_HitTestComplexControl(const void* self, int cc, QStyleOptionComplex* opt, QPoint* pt, QWidget* widget); +void QStyle_override_virtual_SubControlRect(void* self, intptr_t slot); +QRect* QStyle_virtualbase_SubControlRect(const void* self, int cc, QStyleOptionComplex* opt, int sc, QWidget* widget); +void QStyle_override_virtual_PixelMetric(void* self, intptr_t slot); +int QStyle_virtualbase_PixelMetric(const void* self, int metric, QStyleOption* option, QWidget* widget); +void QStyle_override_virtual_SizeFromContents(void* self, intptr_t slot); +QSize* QStyle_virtualbase_SizeFromContents(const void* self, int ct, QStyleOption* opt, QSize* contentsSize, QWidget* w); +void QStyle_override_virtual_StyleHint(void* self, intptr_t slot); +int QStyle_virtualbase_StyleHint(const void* self, int stylehint, QStyleOption* opt, QWidget* widget, QStyleHintReturn* returnData); +void QStyle_override_virtual_StandardPixmap(void* self, intptr_t slot); +QPixmap* QStyle_virtualbase_StandardPixmap(const void* self, int standardPixmap, QStyleOption* opt, QWidget* widget); +void QStyle_override_virtual_StandardIcon(void* self, intptr_t slot); +QIcon* QStyle_virtualbase_StandardIcon(const void* self, int standardIcon, QStyleOption* option, QWidget* widget); +void QStyle_override_virtual_GeneratedIconPixmap(void* self, intptr_t slot); +QPixmap* QStyle_virtualbase_GeneratedIconPixmap(const void* self, int iconMode, QPixmap* pixmap, QStyleOption* opt); +void QStyle_override_virtual_LayoutSpacing(void* self, intptr_t slot); +int QStyle_virtualbase_LayoutSpacing(const void* self, int control1, int control2, int orientation, QStyleOption* option, QWidget* widget); +void QStyle_override_virtual_Event(void* self, intptr_t slot); +bool QStyle_virtualbase_Event(void* self, QEvent* event); +void QStyle_override_virtual_EventFilter(void* self, intptr_t slot); +bool QStyle_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QStyle_override_virtual_TimerEvent(void* self, intptr_t slot); +void QStyle_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QStyle_override_virtual_ChildEvent(void* self, intptr_t slot); +void QStyle_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QStyle_override_virtual_CustomEvent(void* self, intptr_t slot); +void QStyle_virtualbase_CustomEvent(void* self, QEvent* event); +void QStyle_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QStyle_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QStyle_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QStyle_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QStyle_Delete(QStyle* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qstyleplugin.cpp b/qt6/gen_qstyleplugin.cpp index d9a1dc5e..f3ee5c18 100644 --- a/qt6/gen_qstyleplugin.cpp +++ b/qt6/gen_qstyleplugin.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -5,10 +8,227 @@ #include #include #include +#include #include #include "gen_qstyleplugin.h" #include "_cgo_export.h" +class MiqtVirtualQStylePlugin : public virtual QStylePlugin { +public: + + MiqtVirtualQStylePlugin(): QStylePlugin() {}; + MiqtVirtualQStylePlugin(QObject* parent): QStylePlugin(parent) {}; + + virtual ~MiqtVirtualQStylePlugin() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Create = 0; + + // Subclass to allow providing a Go implementation + virtual QStyle* create(const QString& key) override { + if (handle__Create == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + 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(); + struct miqt_string key_ms; + key_ms.len = key_b.length(); + key_ms.data = static_cast(malloc(key_ms.len)); + memcpy(key_ms.data, key_b.data(), key_ms.len); + struct miqt_string sigval1 = key_ms; + + QStyle* callback_return_value = miqt_exec_callback_QStylePlugin_Create(this, handle__Create, sigval1); + + return callback_return_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 QStylePlugin::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QStylePlugin_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QStylePlugin::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 QStylePlugin::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QStylePlugin_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QStylePlugin::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) { + QStylePlugin::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QStylePlugin_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QStylePlugin::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) { + QStylePlugin::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QStylePlugin_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QStylePlugin::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) { + QStylePlugin::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QStylePlugin_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QStylePlugin::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) { + QStylePlugin::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QStylePlugin_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QStylePlugin::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) { + QStylePlugin::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QStylePlugin_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QStylePlugin::disconnectNotify(*signal); + + } + +}; + +void QStylePlugin_new(QStylePlugin** outptr_QStylePlugin, QObject** outptr_QObject) { + MiqtVirtualQStylePlugin* ret = new MiqtVirtualQStylePlugin(); + *outptr_QStylePlugin = ret; + *outptr_QObject = static_cast(ret); +} + +void QStylePlugin_new2(QObject* parent, QStylePlugin** outptr_QStylePlugin, QObject** outptr_QObject) { + MiqtVirtualQStylePlugin* ret = new MiqtVirtualQStylePlugin(parent); + *outptr_QStylePlugin = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QStylePlugin_MetaObject(const QStylePlugin* self) { return (QMetaObject*) self->metaObject(); } @@ -55,9 +275,69 @@ struct miqt_string QStylePlugin_Tr3(const char* s, const char* c, int n) { return _ms; } +void QStylePlugin_override_virtual_Create(void* self, intptr_t slot) { + dynamic_cast( (QStylePlugin*)(self) )->handle__Create = slot; +} + +void QStylePlugin_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QStylePlugin*)(self) )->handle__Event = slot; +} + +bool QStylePlugin_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQStylePlugin*)(self) )->virtualbase_Event(event); +} + +void QStylePlugin_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QStylePlugin*)(self) )->handle__EventFilter = slot; +} + +bool QStylePlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQStylePlugin*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QStylePlugin_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QStylePlugin*)(self) )->handle__TimerEvent = slot; +} + +void QStylePlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQStylePlugin*)(self) )->virtualbase_TimerEvent(event); +} + +void QStylePlugin_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QStylePlugin*)(self) )->handle__ChildEvent = slot; +} + +void QStylePlugin_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQStylePlugin*)(self) )->virtualbase_ChildEvent(event); +} + +void QStylePlugin_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QStylePlugin*)(self) )->handle__CustomEvent = slot; +} + +void QStylePlugin_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQStylePlugin*)(self) )->virtualbase_CustomEvent(event); +} + +void QStylePlugin_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QStylePlugin*)(self) )->handle__ConnectNotify = slot; +} + +void QStylePlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQStylePlugin*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QStylePlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QStylePlugin*)(self) )->handle__DisconnectNotify = slot; +} + +void QStylePlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQStylePlugin*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QStylePlugin_Delete(QStylePlugin* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qstyleplugin.go b/qt6/gen_qstyleplugin.go index 0d00e465..b93df992 100644 --- a/qt6/gen_qstyleplugin.go +++ b/qt6/gen_qstyleplugin.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,28 @@ func UnsafeNewQStylePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QStylePl QObject: UnsafeNewQObject(h_QObject)} } +// NewQStylePlugin constructs a new QStylePlugin object. +func NewQStylePlugin() *QStylePlugin { + var outptr_QStylePlugin *C.QStylePlugin = nil + var outptr_QObject *C.QObject = nil + + C.QStylePlugin_new(&outptr_QStylePlugin, &outptr_QObject) + ret := newQStylePlugin(outptr_QStylePlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQStylePlugin2 constructs a new QStylePlugin object. +func NewQStylePlugin2(parent *QObject) *QStylePlugin { + var outptr_QStylePlugin *C.QStylePlugin = nil + var outptr_QObject *C.QObject = nil + + C.QStylePlugin_new2(parent.cPointer(), &outptr_QStylePlugin, &outptr_QObject) + ret := newQStylePlugin(outptr_QStylePlugin, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QStylePlugin) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QStylePlugin_MetaObject(this.h))) } @@ -100,6 +123,194 @@ func QStylePlugin_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QStylePlugin) OnCreate(slot func(key string) *QStyle) { + C.QStylePlugin_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStylePlugin_Create +func miqt_exec_callback_QStylePlugin_Create(self *C.QStylePlugin, cb C.intptr_t, key C.struct_miqt_string) *C.QStyle { + gofunc, ok := cgo.Handle(cb).Value().(func(key string) *QStyle) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var key_ms C.struct_miqt_string = key + key_ret := C.GoStringN(key_ms.data, C.int(int64(key_ms.len))) + C.free(unsafe.Pointer(key_ms.data)) + slotval1 := key_ret + + virtualReturn := gofunc(slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QStylePlugin) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QStylePlugin_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QStylePlugin) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QStylePlugin_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStylePlugin_Event +func miqt_exec_callback_QStylePlugin_Event(self *C.QStylePlugin, 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((&QStylePlugin{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QStylePlugin) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QStylePlugin_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QStylePlugin) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QStylePlugin_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStylePlugin_EventFilter +func miqt_exec_callback_QStylePlugin_EventFilter(self *C.QStylePlugin, 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((&QStylePlugin{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QStylePlugin) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QStylePlugin_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStylePlugin) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QStylePlugin_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStylePlugin_TimerEvent +func miqt_exec_callback_QStylePlugin_TimerEvent(self *C.QStylePlugin, 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((&QStylePlugin{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QStylePlugin) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QStylePlugin_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStylePlugin) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QStylePlugin_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStylePlugin_ChildEvent +func miqt_exec_callback_QStylePlugin_ChildEvent(self *C.QStylePlugin, 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((&QStylePlugin{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QStylePlugin) callVirtualBase_CustomEvent(event *QEvent) { + + C.QStylePlugin_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QStylePlugin) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QStylePlugin_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStylePlugin_CustomEvent +func miqt_exec_callback_QStylePlugin_CustomEvent(self *C.QStylePlugin, 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((&QStylePlugin{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QStylePlugin) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QStylePlugin_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QStylePlugin) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QStylePlugin_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStylePlugin_ConnectNotify +func miqt_exec_callback_QStylePlugin_ConnectNotify(self *C.QStylePlugin, 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((&QStylePlugin{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QStylePlugin) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QStylePlugin_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QStylePlugin) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QStylePlugin_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QStylePlugin_DisconnectNotify +func miqt_exec_callback_QStylePlugin_DisconnectNotify(self *C.QStylePlugin, 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((&QStylePlugin{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QStylePlugin) Delete() { diff --git a/qt6/gen_qstyleplugin.h b/qt6/gen_qstyleplugin.h index 525a638f..46282673 100644 --- a/qt6/gen_qstyleplugin.h +++ b/qt6/gen_qstyleplugin.h @@ -15,23 +15,49 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QStyle; class QStylePlugin; +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 QStyle QStyle; typedef struct QStylePlugin QStylePlugin; +typedef struct QTimerEvent QTimerEvent; #endif +void QStylePlugin_new(QStylePlugin** outptr_QStylePlugin, QObject** outptr_QObject); +void QStylePlugin_new2(QObject* parent, QStylePlugin** outptr_QStylePlugin, QObject** outptr_QObject); QMetaObject* QStylePlugin_MetaObject(const QStylePlugin* self); void* QStylePlugin_Metacast(QStylePlugin* self, const char* param1); 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_override_virtual_Create(void* self, intptr_t slot); +QStyle* QStylePlugin_virtualbase_Create(void* self, struct miqt_string key); +void QStylePlugin_override_virtual_Event(void* self, intptr_t slot); +bool QStylePlugin_virtualbase_Event(void* self, QEvent* event); +void QStylePlugin_override_virtual_EventFilter(void* self, intptr_t slot); +bool QStylePlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QStylePlugin_override_virtual_TimerEvent(void* self, intptr_t slot); +void QStylePlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QStylePlugin_override_virtual_ChildEvent(void* self, intptr_t slot); +void QStylePlugin_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QStylePlugin_override_virtual_CustomEvent(void* self, intptr_t slot); +void QStylePlugin_virtualbase_CustomEvent(void* self, QEvent* event); +void QStylePlugin_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QStylePlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QStylePlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QStylePlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QStylePlugin_Delete(QStylePlugin* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qsyntaxhighlighter.cpp b/qt6/gen_qsyntaxhighlighter.cpp index ff9da23b..20e9a266 100644 --- a/qt6/gen_qsyntaxhighlighter.cpp +++ b/qt6/gen_qsyntaxhighlighter.cpp @@ -1,3 +1,6 @@ +#include +#include +#include #include #include #include @@ -6,10 +9,227 @@ #include #include #include +#include #include #include "gen_qsyntaxhighlighter.h" #include "_cgo_export.h" +class MiqtVirtualQSyntaxHighlighter : public virtual QSyntaxHighlighter { +public: + + MiqtVirtualQSyntaxHighlighter(QObject* parent): QSyntaxHighlighter(parent) {}; + MiqtVirtualQSyntaxHighlighter(QTextDocument* parent): QSyntaxHighlighter(parent) {}; + + virtual ~MiqtVirtualQSyntaxHighlighter() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__HighlightBlock = 0; + + // Subclass to allow providing a Go implementation + virtual void highlightBlock(const QString& text) override { + if (handle__HighlightBlock == 0) { + return; // Pure virtual, there is no base we can call + } + + 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_QSyntaxHighlighter_HighlightBlock(this, handle__HighlightBlock, sigval1); + + + } + + // 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 QSyntaxHighlighter::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSyntaxHighlighter_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSyntaxHighlighter::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 QSyntaxHighlighter::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSyntaxHighlighter_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSyntaxHighlighter::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) { + QSyntaxHighlighter::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSyntaxHighlighter_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSyntaxHighlighter::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) { + QSyntaxHighlighter::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSyntaxHighlighter_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSyntaxHighlighter::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) { + QSyntaxHighlighter::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSyntaxHighlighter_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSyntaxHighlighter::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) { + QSyntaxHighlighter::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSyntaxHighlighter_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSyntaxHighlighter::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) { + QSyntaxHighlighter::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSyntaxHighlighter_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSyntaxHighlighter::disconnectNotify(*signal); + + } + +}; + +void QSyntaxHighlighter_new(QObject* parent, QSyntaxHighlighter** outptr_QSyntaxHighlighter, QObject** outptr_QObject) { + MiqtVirtualQSyntaxHighlighter* ret = new MiqtVirtualQSyntaxHighlighter(parent); + *outptr_QSyntaxHighlighter = ret; + *outptr_QObject = static_cast(ret); +} + +void QSyntaxHighlighter_new2(QTextDocument* parent, QSyntaxHighlighter** outptr_QSyntaxHighlighter, QObject** outptr_QObject) { + MiqtVirtualQSyntaxHighlighter* ret = new MiqtVirtualQSyntaxHighlighter(parent); + *outptr_QSyntaxHighlighter = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QSyntaxHighlighter_MetaObject(const QSyntaxHighlighter* self) { return (QMetaObject*) self->metaObject(); } @@ -67,9 +287,69 @@ struct miqt_string QSyntaxHighlighter_Tr3(const char* s, const char* c, int n) { return _ms; } +void QSyntaxHighlighter_override_virtual_HighlightBlock(void* self, intptr_t slot) { + dynamic_cast( (QSyntaxHighlighter*)(self) )->handle__HighlightBlock = slot; +} + +void QSyntaxHighlighter_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSyntaxHighlighter*)(self) )->handle__Event = slot; +} + +bool QSyntaxHighlighter_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSyntaxHighlighter*)(self) )->virtualbase_Event(event); +} + +void QSyntaxHighlighter_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSyntaxHighlighter*)(self) )->handle__EventFilter = slot; +} + +bool QSyntaxHighlighter_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSyntaxHighlighter*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSyntaxHighlighter_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSyntaxHighlighter*)(self) )->handle__TimerEvent = slot; +} + +void QSyntaxHighlighter_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSyntaxHighlighter*)(self) )->virtualbase_TimerEvent(event); +} + +void QSyntaxHighlighter_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSyntaxHighlighter*)(self) )->handle__ChildEvent = slot; +} + +void QSyntaxHighlighter_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSyntaxHighlighter*)(self) )->virtualbase_ChildEvent(event); +} + +void QSyntaxHighlighter_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSyntaxHighlighter*)(self) )->handle__CustomEvent = slot; +} + +void QSyntaxHighlighter_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSyntaxHighlighter*)(self) )->virtualbase_CustomEvent(event); +} + +void QSyntaxHighlighter_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSyntaxHighlighter*)(self) )->handle__ConnectNotify = slot; +} + +void QSyntaxHighlighter_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSyntaxHighlighter*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSyntaxHighlighter_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSyntaxHighlighter*)(self) )->handle__DisconnectNotify = slot; +} + +void QSyntaxHighlighter_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSyntaxHighlighter*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QSyntaxHighlighter_Delete(QSyntaxHighlighter* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qsyntaxhighlighter.go b/qt6/gen_qsyntaxhighlighter.go index 6c82cbea..3492f852 100644 --- a/qt6/gen_qsyntaxhighlighter.go +++ b/qt6/gen_qsyntaxhighlighter.go @@ -10,6 +10,7 @@ import "C" import ( "runtime" + "runtime/cgo" "unsafe" ) @@ -52,6 +53,28 @@ func UnsafeNewQSyntaxHighlighter(h unsafe.Pointer, h_QObject unsafe.Pointer) *QS QObject: UnsafeNewQObject(h_QObject)} } +// NewQSyntaxHighlighter constructs a new QSyntaxHighlighter object. +func NewQSyntaxHighlighter(parent *QObject) *QSyntaxHighlighter { + var outptr_QSyntaxHighlighter *C.QSyntaxHighlighter = nil + var outptr_QObject *C.QObject = nil + + C.QSyntaxHighlighter_new(parent.cPointer(), &outptr_QSyntaxHighlighter, &outptr_QObject) + ret := newQSyntaxHighlighter(outptr_QSyntaxHighlighter, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQSyntaxHighlighter2 constructs a new QSyntaxHighlighter object. +func NewQSyntaxHighlighter2(parent *QTextDocument) *QSyntaxHighlighter { + var outptr_QSyntaxHighlighter *C.QSyntaxHighlighter = nil + var outptr_QObject *C.QObject = nil + + C.QSyntaxHighlighter_new2(parent.cPointer(), &outptr_QSyntaxHighlighter, &outptr_QObject) + ret := newQSyntaxHighlighter(outptr_QSyntaxHighlighter, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QSyntaxHighlighter) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QSyntaxHighlighter_MetaObject(this.h))) } @@ -108,6 +131,192 @@ func QSyntaxHighlighter_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QSyntaxHighlighter) OnHighlightBlock(slot func(text string)) { + C.QSyntaxHighlighter_override_virtual_HighlightBlock(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSyntaxHighlighter_HighlightBlock +func miqt_exec_callback_QSyntaxHighlighter_HighlightBlock(self *C.QSyntaxHighlighter, cb C.intptr_t, text C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1) + +} + +func (this *QSyntaxHighlighter) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QSyntaxHighlighter_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QSyntaxHighlighter) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QSyntaxHighlighter_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSyntaxHighlighter_Event +func miqt_exec_callback_QSyntaxHighlighter_Event(self *C.QSyntaxHighlighter, 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((&QSyntaxHighlighter{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSyntaxHighlighter) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QSyntaxHighlighter_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QSyntaxHighlighter) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QSyntaxHighlighter_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSyntaxHighlighter_EventFilter +func miqt_exec_callback_QSyntaxHighlighter_EventFilter(self *C.QSyntaxHighlighter, 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((&QSyntaxHighlighter{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSyntaxHighlighter) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QSyntaxHighlighter_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSyntaxHighlighter) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QSyntaxHighlighter_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSyntaxHighlighter_TimerEvent +func miqt_exec_callback_QSyntaxHighlighter_TimerEvent(self *C.QSyntaxHighlighter, 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((&QSyntaxHighlighter{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSyntaxHighlighter) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QSyntaxHighlighter_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSyntaxHighlighter) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QSyntaxHighlighter_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSyntaxHighlighter_ChildEvent +func miqt_exec_callback_QSyntaxHighlighter_ChildEvent(self *C.QSyntaxHighlighter, 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((&QSyntaxHighlighter{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSyntaxHighlighter) callVirtualBase_CustomEvent(event *QEvent) { + + C.QSyntaxHighlighter_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QSyntaxHighlighter) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QSyntaxHighlighter_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSyntaxHighlighter_CustomEvent +func miqt_exec_callback_QSyntaxHighlighter_CustomEvent(self *C.QSyntaxHighlighter, 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((&QSyntaxHighlighter{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSyntaxHighlighter) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QSyntaxHighlighter_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSyntaxHighlighter) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSyntaxHighlighter_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSyntaxHighlighter_ConnectNotify +func miqt_exec_callback_QSyntaxHighlighter_ConnectNotify(self *C.QSyntaxHighlighter, 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((&QSyntaxHighlighter{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSyntaxHighlighter) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QSyntaxHighlighter_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QSyntaxHighlighter) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QSyntaxHighlighter_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSyntaxHighlighter_DisconnectNotify +func miqt_exec_callback_QSyntaxHighlighter_DisconnectNotify(self *C.QSyntaxHighlighter, 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((&QSyntaxHighlighter{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QSyntaxHighlighter) Delete() { diff --git a/qt6/gen_qsyntaxhighlighter.h b/qt6/gen_qsyntaxhighlighter.h index 42e0c13f..2a852976 100644 --- a/qt6/gen_qsyntaxhighlighter.h +++ b/qt6/gen_qsyntaxhighlighter.h @@ -15,19 +15,29 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; class QMetaObject; class QObject; class QSyntaxHighlighter; class QTextBlock; class QTextDocument; +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 QSyntaxHighlighter QSyntaxHighlighter; typedef struct QTextBlock QTextBlock; typedef struct QTextDocument QTextDocument; +typedef struct QTimerEvent QTimerEvent; #endif +void QSyntaxHighlighter_new(QObject* parent, QSyntaxHighlighter** outptr_QSyntaxHighlighter, QObject** outptr_QObject); +void QSyntaxHighlighter_new2(QTextDocument* parent, QSyntaxHighlighter** outptr_QSyntaxHighlighter, QObject** outptr_QObject); QMetaObject* QSyntaxHighlighter_MetaObject(const QSyntaxHighlighter* self); void* QSyntaxHighlighter_Metacast(QSyntaxHighlighter* self, const char* param1); struct miqt_string QSyntaxHighlighter_Tr(const char* s); @@ -38,6 +48,22 @@ void QSyntaxHighlighter_RehighlightBlock(QSyntaxHighlighter* self, QTextBlock* b 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_override_virtual_HighlightBlock(void* self, intptr_t slot); +void QSyntaxHighlighter_virtualbase_HighlightBlock(void* self, struct miqt_string text); +void QSyntaxHighlighter_override_virtual_Event(void* self, intptr_t slot); +bool QSyntaxHighlighter_virtualbase_Event(void* self, QEvent* event); +void QSyntaxHighlighter_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSyntaxHighlighter_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSyntaxHighlighter_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSyntaxHighlighter_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSyntaxHighlighter_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSyntaxHighlighter_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSyntaxHighlighter_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSyntaxHighlighter_virtualbase_CustomEvent(void* self, QEvent* event); +void QSyntaxHighlighter_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSyntaxHighlighter_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSyntaxHighlighter_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSyntaxHighlighter_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QSyntaxHighlighter_Delete(QSyntaxHighlighter* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qtableview.cpp b/qt6/gen_qtableview.cpp index 2fe4d11c..ae14f464 100644 --- a/qt6/gen_qtableview.cpp +++ b/qt6/gen_qtableview.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -22,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -414,6 +416,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QTableView::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QTableView_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QTableView::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__SelectedIndexes = 0; @@ -615,6 +642,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QTableView::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QTableView_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QTableView::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__CurrentChanged = 0; @@ -1903,6 +1959,14 @@ void QTableView_virtualbase_SetSelection(void* self, QRect* rect, int command) { ( (MiqtVirtualQTableView*)(self) )->virtualbase_SetSelection(rect, command); } +void QTableView_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QTableView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QTableView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { dynamic_cast( (QTableView*)(self) )->handle__SelectedIndexes = slot; } @@ -1967,6 +2031,14 @@ bool QTableView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) return ( (const MiqtVirtualQTableView*)(self) )->virtualbase_IsIndexHidden(index); } +void QTableView_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QTableView*)(self) )->handle__SelectionChanged = slot; +} + +void QTableView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQTableView*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QTableView_override_virtual_CurrentChanged(void* self, intptr_t slot) { dynamic_cast( (QTableView*)(self) )->handle__CurrentChanged = slot; } diff --git a/qt6/gen_qtableview.go b/qt6/gen_qtableview.go index e42b319f..2da52517 100644 --- a/qt6/gen_qtableview.go +++ b/qt6/gen_qtableview.go @@ -685,6 +685,34 @@ func miqt_exec_callback_QTableView_SetSelection(self *C.QTableView, cb C.intptr_ } +func (this *QTableView) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QTableView_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableView) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QTableView_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_VisualRegionForSelection +func miqt_exec_callback_QTableView_VisualRegionForSelection(self *C.QTableView, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QTableView{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QTableView) callVirtualBase_SelectedIndexes() []QModelIndex { var _ma C.struct_miqt_array = C.QTableView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) @@ -888,6 +916,30 @@ func miqt_exec_callback_QTableView_IsIndexHidden(self *C.QTableView, cb C.intptr } +func (this *QTableView) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QTableView_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QTableView) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QTableView_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableView_SelectionChanged +func miqt_exec_callback_QTableView_SelectionChanged(self *C.QTableView, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QTableView{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QTableView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { C.QTableView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) diff --git a/qt6/gen_qtableview.h b/qt6/gen_qtableview.h index d8e51d4e..a6a4d05e 100644 --- a/qt6/gen_qtableview.h +++ b/qt6/gen_qtableview.h @@ -28,6 +28,7 @@ class QFocusEvent; class QFrame; class QHeaderView; class QInputMethodEvent; +class QItemSelection; class QItemSelectionModel; class QKeyEvent; class QMetaObject; @@ -38,6 +39,7 @@ class QPaintDevice; class QPaintEvent; class QPoint; class QRect; +class QRegion; class QResizeEvent; class QSize; class QStyleOptionViewItem; @@ -59,6 +61,7 @@ typedef struct QFocusEvent QFocusEvent; typedef struct QFrame QFrame; typedef struct QHeaderView QHeaderView; typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; @@ -69,6 +72,7 @@ typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; @@ -139,6 +143,7 @@ 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); +QRegion* QTableView_VisualRegionForSelection(const QTableView* self, QItemSelection* selection); struct miqt_array /* of QModelIndex* */ QTableView_SelectedIndexes(const QTableView* self); void QTableView_UpdateGeometries(QTableView* self); QSize* QTableView_ViewportSizeHint(const QTableView* self); @@ -147,6 +152,7 @@ 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_SelectionChanged(QTableView* self, QItemSelection* selected, QItemSelection* deselected); 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); @@ -180,6 +186,8 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QTableView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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); @@ -196,6 +204,8 @@ void QTableView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t 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_SelectionChanged(void* self, intptr_t slot); +void QTableView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt6/gen_qtablewidget.cpp b/qt6/gen_qtablewidget.cpp index e6a2f90b..32cf1c90 100644 --- a/qt6/gen_qtablewidget.cpp +++ b/qt6/gen_qtablewidget.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -17,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -1060,6 +1062,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QTableWidget::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QTableWidget_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QTableWidget::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__SelectedIndexes = 0; @@ -1261,6 +1288,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QTableWidget::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QTableWidget_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QTableWidget::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__CurrentChanged = 0; @@ -1994,6 +2050,14 @@ void QTableWidget_virtualbase_SetSelection(void* self, QRect* rect, int command) ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_SetSelection(rect, command); } +void QTableWidget_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QTableWidget_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QTableWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot) { dynamic_cast( (QTableWidget*)(self) )->handle__SelectedIndexes = slot; } @@ -2058,6 +2122,14 @@ bool QTableWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index return ( (const MiqtVirtualQTableWidget*)(self) )->virtualbase_IsIndexHidden(index); } +void QTableWidget_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QTableWidget*)(self) )->handle__SelectionChanged = slot; +} + +void QTableWidget_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQTableWidget*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QTableWidget_override_virtual_CurrentChanged(void* self, intptr_t slot) { dynamic_cast( (QTableWidget*)(self) )->handle__CurrentChanged = slot; } diff --git a/qt6/gen_qtablewidget.go b/qt6/gen_qtablewidget.go index 5834c573..0d3a60cb 100644 --- a/qt6/gen_qtablewidget.go +++ b/qt6/gen_qtablewidget.go @@ -1862,6 +1862,34 @@ func miqt_exec_callback_QTableWidget_SetSelection(self *C.QTableWidget, cb C.int } +func (this *QTableWidget) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QTableWidget_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTableWidget) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QTableWidget_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_VisualRegionForSelection +func miqt_exec_callback_QTableWidget_VisualRegionForSelection(self *C.QTableWidget, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QTableWidget{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QTableWidget) callVirtualBase_SelectedIndexes() []QModelIndex { var _ma C.struct_miqt_array = C.QTableWidget_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) @@ -2065,6 +2093,30 @@ func miqt_exec_callback_QTableWidget_IsIndexHidden(self *C.QTableWidget, cb C.in } +func (this *QTableWidget) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QTableWidget_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QTableWidget) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QTableWidget_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTableWidget_SelectionChanged +func miqt_exec_callback_QTableWidget_SelectionChanged(self *C.QTableWidget, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QTableWidget{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QTableWidget) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { C.QTableWidget_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) diff --git a/qt6/gen_qtablewidget.h b/qt6/gen_qtablewidget.h index 0531b34c..f6b3ade5 100644 --- a/qt6/gen_qtablewidget.h +++ b/qt6/gen_qtablewidget.h @@ -24,6 +24,7 @@ class QEvent; class QFont; class QFrame; class QIcon; +class QItemSelection; class QItemSelectionModel; class QMetaObject; class QMimeData; @@ -33,6 +34,7 @@ class QPaintDevice; class QPaintEvent; class QPoint; class QRect; +class QRegion; class QSize; class QStyleOptionViewItem; class QTableView; @@ -52,6 +54,7 @@ typedef struct QEvent QEvent; typedef struct QFont QFont; typedef struct QFrame QFrame; typedef struct QIcon QIcon; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; @@ -61,6 +64,7 @@ typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; typedef struct QTableView QTableView; @@ -284,6 +288,8 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QTableWidget_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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); @@ -300,6 +306,8 @@ void QTableWidget_override_virtual_HorizontalScrollbarAction(void* self, intptr_ 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_SelectionChanged(void* self, intptr_t slot); +void QTableWidget_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt6/gen_qtransposeproxymodel.cpp b/qt6/gen_qtransposeproxymodel.cpp index 7a939407..c188d510 100644 --- a/qt6/gen_qtransposeproxymodel.cpp +++ b/qt6/gen_qtransposeproxymodel.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -568,6 +569,56 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__MapSelectionToSource = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelection mapSelectionToSource(const QItemSelection& selection) const override { + if (handle__MapSelectionToSource == 0) { + return QTransposeProxyModel::mapSelectionToSource(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QItemSelection* callback_return_value = miqt_exec_callback_QTransposeProxyModel_MapSelectionToSource(const_cast(this), handle__MapSelectionToSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QItemSelection* virtualbase_MapSelectionToSource(QItemSelection* selection) const { + + return new QItemSelection(QTransposeProxyModel::mapSelectionToSource(*selection)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MapSelectionFromSource = 0; + + // Subclass to allow providing a Go implementation + virtual QItemSelection mapSelectionFromSource(const QItemSelection& selection) const override { + if (handle__MapSelectionFromSource == 0) { + return QTransposeProxyModel::mapSelectionFromSource(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QItemSelection* callback_return_value = miqt_exec_callback_QTransposeProxyModel_MapSelectionFromSource(const_cast(this), handle__MapSelectionFromSource, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QItemSelection* virtualbase_MapSelectionFromSource(QItemSelection* selection) const { + + return new QItemSelection(QTransposeProxyModel::mapSelectionFromSource(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__Submit = 0; @@ -1392,6 +1443,22 @@ void QTransposeProxyModel_virtualbase_Sort(void* self, int column, int order) { ( (MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_Sort(column, order); } +void QTransposeProxyModel_override_virtual_MapSelectionToSource(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__MapSelectionToSource = slot; +} + +QItemSelection* QTransposeProxyModel_virtualbase_MapSelectionToSource(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_MapSelectionToSource(selection); +} + +void QTransposeProxyModel_override_virtual_MapSelectionFromSource(void* self, intptr_t slot) { + dynamic_cast( (QTransposeProxyModel*)(self) )->handle__MapSelectionFromSource = slot; +} + +QItemSelection* QTransposeProxyModel_virtualbase_MapSelectionFromSource(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQTransposeProxyModel*)(self) )->virtualbase_MapSelectionFromSource(selection); +} + void QTransposeProxyModel_override_virtual_Submit(void* self, intptr_t slot) { dynamic_cast( (QTransposeProxyModel*)(self) )->handle__Submit = slot; } diff --git a/qt6/gen_qtransposeproxymodel.go b/qt6/gen_qtransposeproxymodel.go index 5a3cd13f..2179b645 100644 --- a/qt6/gen_qtransposeproxymodel.go +++ b/qt6/gen_qtransposeproxymodel.go @@ -834,6 +834,62 @@ func miqt_exec_callback_QTransposeProxyModel_Sort(self *C.QTransposeProxyModel, } +func (this *QTransposeProxyModel) callVirtualBase_MapSelectionToSource(selection *QItemSelection) *QItemSelection { + + _ret := C.QTransposeProxyModel_virtualbase_MapSelectionToSource(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTransposeProxyModel) OnMapSelectionToSource(slot func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) { + C.QTransposeProxyModel_override_virtual_MapSelectionToSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_MapSelectionToSource +func miqt_exec_callback_QTransposeProxyModel_MapSelectionToSource(self *C.QTransposeProxyModel, cb C.intptr_t, selection *C.QItemSelection) *C.QItemSelection { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_MapSelectionToSource, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QTransposeProxyModel) callVirtualBase_MapSelectionFromSource(selection *QItemSelection) *QItemSelection { + + _ret := C.QTransposeProxyModel_virtualbase_MapSelectionFromSource(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQItemSelection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTransposeProxyModel) OnMapSelectionFromSource(slot func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) { + C.QTransposeProxyModel_override_virtual_MapSelectionFromSource(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTransposeProxyModel_MapSelectionFromSource +func miqt_exec_callback_QTransposeProxyModel_MapSelectionFromSource(self *C.QTransposeProxyModel, cb C.intptr_t, selection *C.QItemSelection) *C.QItemSelection { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QItemSelection, selection *QItemSelection) *QItemSelection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_MapSelectionFromSource, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QTransposeProxyModel) callVirtualBase_Submit() bool { return (bool)(C.QTransposeProxyModel_virtualbase_Submit(unsafe.Pointer(this.h))) diff --git a/qt6/gen_qtransposeproxymodel.h b/qt6/gen_qtransposeproxymodel.h index cbec9e45..d7f3473d 100644 --- a/qt6/gen_qtransposeproxymodel.h +++ b/qt6/gen_qtransposeproxymodel.h @@ -18,6 +18,7 @@ extern "C" { class QAbstractItemModel; class QAbstractProxyModel; class QByteArray; +class QItemSelection; class QMetaObject; class QMimeData; class QModelIndex; @@ -29,6 +30,7 @@ class QVariant; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractProxyModel QAbstractProxyModel; typedef struct QByteArray QByteArray; +typedef struct QItemSelection QItemSelection; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; typedef struct QModelIndex QModelIndex; @@ -102,6 +104,10 @@ 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_MapSelectionToSource(void* self, intptr_t slot); +QItemSelection* QTransposeProxyModel_virtualbase_MapSelectionToSource(const void* self, QItemSelection* selection); +void QTransposeProxyModel_override_virtual_MapSelectionFromSource(void* self, intptr_t slot); +QItemSelection* QTransposeProxyModel_virtualbase_MapSelectionFromSource(const void* self, QItemSelection* selection); 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); diff --git a/qt6/gen_qtreeview.cpp b/qt6/gen_qtreeview.cpp index b2ba20a1..d36e0289 100644 --- a/qt6/gen_qtreeview.cpp +++ b/qt6/gen_qtreeview.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -23,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -546,6 +548,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QTreeView::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QTreeView_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QTreeView::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__SelectedIndexes = 0; @@ -999,6 +1026,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QTreeView::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QTreeView_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QTreeView::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__CurrentChanged = 0; @@ -2112,6 +2168,14 @@ void QTreeView_virtualbase_SetSelection(void* self, QRect* rect, int command) { ( (MiqtVirtualQTreeView*)(self) )->virtualbase_SetSelection(rect, command); } +void QTreeView_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QTreeView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QTreeView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { dynamic_cast( (QTreeView*)(self) )->handle__SelectedIndexes = slot; } @@ -2256,6 +2320,14 @@ bool QTreeView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { return ( (const MiqtVirtualQTreeView*)(self) )->virtualbase_IsIndexHidden(index); } +void QTreeView_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeView*)(self) )->handle__SelectionChanged = slot; +} + +void QTreeView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQTreeView*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QTreeView_override_virtual_CurrentChanged(void* self, intptr_t slot) { dynamic_cast( (QTreeView*)(self) )->handle__CurrentChanged = slot; } diff --git a/qt6/gen_qtreeview.go b/qt6/gen_qtreeview.go index 36c40bcd..c1b9a795 100644 --- a/qt6/gen_qtreeview.go +++ b/qt6/gen_qtreeview.go @@ -914,6 +914,34 @@ func miqt_exec_callback_QTreeView_SetSelection(self *C.QTreeView, cb C.intptr_t, } +func (this *QTreeView) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QTreeView_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeView) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QTreeView_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_VisualRegionForSelection +func miqt_exec_callback_QTreeView_VisualRegionForSelection(self *C.QTreeView, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QTreeView{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QTreeView) callVirtualBase_SelectedIndexes() []QModelIndex { var _ma C.struct_miqt_array = C.QTreeView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) @@ -1351,6 +1379,30 @@ func miqt_exec_callback_QTreeView_IsIndexHidden(self *C.QTreeView, cb C.intptr_t } +func (this *QTreeView) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QTreeView_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QTreeView) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QTreeView_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeView_SelectionChanged +func miqt_exec_callback_QTreeView_SelectionChanged(self *C.QTreeView, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QTreeView{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QTreeView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { C.QTreeView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) diff --git a/qt6/gen_qtreeview.h b/qt6/gen_qtreeview.h index b75173e0..98bfa7c9 100644 --- a/qt6/gen_qtreeview.h +++ b/qt6/gen_qtreeview.h @@ -28,6 +28,7 @@ class QFocusEvent; class QFrame; class QHeaderView; class QInputMethodEvent; +class QItemSelection; class QItemSelectionModel; class QKeyEvent; class QMetaObject; @@ -39,6 +40,7 @@ class QPaintEvent; class QPainter; class QPoint; class QRect; +class QRegion; class QResizeEvent; class QSize; class QStyleOptionViewItem; @@ -60,6 +62,7 @@ typedef struct QFocusEvent QFocusEvent; typedef struct QFrame QFrame; typedef struct QHeaderView QHeaderView; typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; @@ -71,6 +74,7 @@ typedef struct QPaintEvent QPaintEvent; typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; @@ -159,6 +163,7 @@ QModelIndex* QTreeView_MoveCursor(QTreeView* self, int cursorAction, int modifie int QTreeView_HorizontalOffset(const QTreeView* self); int QTreeView_VerticalOffset(const QTreeView* self); void QTreeView_SetSelection(QTreeView* self, QRect* rect, int command); +QRegion* QTreeView_VisualRegionForSelection(const QTreeView* self, QItemSelection* selection); struct miqt_array /* of QModelIndex* */ QTreeView_SelectedIndexes(const QTreeView* self); void QTreeView_ChangeEvent(QTreeView* self, QEvent* event); void QTreeView_TimerEvent(QTreeView* self, QTimerEvent* event); @@ -177,6 +182,7 @@ 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_SelectionChanged(QTreeView* self, QItemSelection* selected, QItemSelection* deselected); 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); @@ -219,6 +225,8 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QTreeView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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); @@ -255,6 +263,8 @@ void QTreeView_override_virtual_HorizontalScrollbarAction(void* self, intptr_t s 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_SelectionChanged(void* self, intptr_t slot); +void QTreeView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt6/gen_qtreewidget.cpp b/qt6/gen_qtreewidget.cpp index 67bdb2e6..45d7ff7a 100644 --- a/qt6/gen_qtreewidget.cpp +++ b/qt6/gen_qtreewidget.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -21,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -1356,6 +1358,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QTreeWidget::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QTreeWidget_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QTreeWidget::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__SelectedIndexes = 0; @@ -1809,6 +1836,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QTreeWidget::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QTreeWidget_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QTreeWidget::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__CurrentChanged = 0; @@ -2462,6 +2518,14 @@ void QTreeWidget_virtualbase_SetSelection(void* self, QRect* rect, int command) ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_SetSelection(rect, command); } +void QTreeWidget_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QTreeWidget_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QTreeWidget_override_virtual_SelectedIndexes(void* self, intptr_t slot) { dynamic_cast( (QTreeWidget*)(self) )->handle__SelectedIndexes = slot; } @@ -2606,6 +2670,14 @@ bool QTreeWidget_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) return ( (const MiqtVirtualQTreeWidget*)(self) )->virtualbase_IsIndexHidden(index); } +void QTreeWidget_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QTreeWidget*)(self) )->handle__SelectionChanged = slot; +} + +void QTreeWidget_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQTreeWidget*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QTreeWidget_override_virtual_CurrentChanged(void* self, intptr_t slot) { dynamic_cast( (QTreeWidget*)(self) )->handle__CurrentChanged = slot; } diff --git a/qt6/gen_qtreewidget.go b/qt6/gen_qtreewidget.go index 7c3f31c9..187e9e73 100644 --- a/qt6/gen_qtreewidget.go +++ b/qt6/gen_qtreewidget.go @@ -1968,6 +1968,34 @@ func miqt_exec_callback_QTreeWidget_SetSelection(self *C.QTreeWidget, cb C.intpt } +func (this *QTreeWidget) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QTreeWidget_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QTreeWidget) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QTreeWidget_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_VisualRegionForSelection +func miqt_exec_callback_QTreeWidget_VisualRegionForSelection(self *C.QTreeWidget, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QTreeWidget{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QTreeWidget) callVirtualBase_SelectedIndexes() []QModelIndex { var _ma C.struct_miqt_array = C.QTreeWidget_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) @@ -2405,6 +2433,30 @@ func miqt_exec_callback_QTreeWidget_IsIndexHidden(self *C.QTreeWidget, cb C.intp } +func (this *QTreeWidget) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QTreeWidget_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QTreeWidget) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QTreeWidget_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QTreeWidget_SelectionChanged +func miqt_exec_callback_QTreeWidget_SelectionChanged(self *C.QTreeWidget, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QTreeWidget{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QTreeWidget) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { C.QTreeWidget_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) diff --git a/qt6/gen_qtreewidget.h b/qt6/gen_qtreewidget.h index 81b271d9..d8a85d91 100644 --- a/qt6/gen_qtreewidget.h +++ b/qt6/gen_qtreewidget.h @@ -25,6 +25,7 @@ class QEvent; class QFont; class QFrame; class QIcon; +class QItemSelection; class QItemSelectionModel; class QKeyEvent; class QMetaObject; @@ -37,6 +38,7 @@ class QPaintEvent; class QPainter; class QPoint; class QRect; +class QRegion; class QSize; class QStyleOptionViewItem; class QTimerEvent; @@ -56,6 +58,7 @@ typedef struct QEvent QEvent; typedef struct QFont QFont; typedef struct QFrame QFrame; typedef struct QIcon QIcon; +typedef struct QItemSelection QItemSelection; typedef struct QItemSelectionModel QItemSelectionModel; typedef struct QKeyEvent QKeyEvent; typedef struct QMetaObject QMetaObject; @@ -68,6 +71,7 @@ typedef struct QPaintEvent QPaintEvent; typedef struct QPainter QPainter; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; typedef struct QTimerEvent QTimerEvent; @@ -300,6 +304,8 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QTreeWidget_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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); @@ -336,6 +342,8 @@ void QTreeWidget_override_virtual_HorizontalScrollbarAction(void* self, intptr_t 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_SelectionChanged(void* self, intptr_t slot); +void QTreeWidget_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt6/gen_qundoview.cpp b/qt6/gen_qundoview.cpp index 45c73e4b..59e10181 100644 --- a/qt6/gen_qundoview.cpp +++ b/qt6/gen_qundoview.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -16,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -706,6 +708,31 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__VisualRegionForSelection = 0; + + // Subclass to allow providing a Go implementation + virtual QRegion visualRegionForSelection(const QItemSelection& selection) const override { + if (handle__VisualRegionForSelection == 0) { + return QUndoView::visualRegionForSelection(selection); + } + + const QItemSelection& selection_ret = selection; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selection_ret); + + QRegion* callback_return_value = miqt_exec_callback_QUndoView_VisualRegionForSelection(const_cast(this), handle__VisualRegionForSelection, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRegion* virtualbase_VisualRegionForSelection(QItemSelection* selection) const { + + return new QRegion(QUndoView::visualRegionForSelection(*selection)); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__SelectedIndexes = 0; @@ -791,6 +818,35 @@ public: } + // cgo.Handle value for overwritten implementation + intptr_t handle__SelectionChanged = 0; + + // Subclass to allow providing a Go implementation + virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) override { + if (handle__SelectionChanged == 0) { + QUndoView::selectionChanged(selected, deselected); + return; + } + + const QItemSelection& selected_ret = selected; + // Cast returned reference into pointer + QItemSelection* sigval1 = const_cast(&selected_ret); + const QItemSelection& deselected_ret = deselected; + // Cast returned reference into pointer + QItemSelection* sigval2 = const_cast(&deselected_ret); + + miqt_exec_callback_QUndoView_SelectionChanged(this, handle__SelectionChanged, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SelectionChanged(QItemSelection* selected, QItemSelection* deselected) { + + QUndoView::selectionChanged(*selected, *deselected); + + } + // cgo.Handle value for overwritten implementation intptr_t handle__CurrentChanged = 0; @@ -1205,6 +1261,14 @@ void QUndoView_virtualbase_SetSelection(void* self, QRect* rect, int command) { ( (MiqtVirtualQUndoView*)(self) )->virtualbase_SetSelection(rect, command); } +void QUndoView_override_virtual_VisualRegionForSelection(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__VisualRegionForSelection = slot; +} + +QRegion* QUndoView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection) { + return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_VisualRegionForSelection(selection); +} + void QUndoView_override_virtual_SelectedIndexes(void* self, intptr_t slot) { dynamic_cast( (QUndoView*)(self) )->handle__SelectedIndexes = slot; } @@ -1229,6 +1293,14 @@ bool QUndoView_virtualbase_IsIndexHidden(const void* self, QModelIndex* index) { return ( (const MiqtVirtualQUndoView*)(self) )->virtualbase_IsIndexHidden(index); } +void QUndoView_override_virtual_SelectionChanged(void* self, intptr_t slot) { + dynamic_cast( (QUndoView*)(self) )->handle__SelectionChanged = slot; +} + +void QUndoView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected) { + ( (MiqtVirtualQUndoView*)(self) )->virtualbase_SelectionChanged(selected, deselected); +} + void QUndoView_override_virtual_CurrentChanged(void* self, intptr_t slot) { dynamic_cast( (QUndoView*)(self) )->handle__CurrentChanged = slot; } diff --git a/qt6/gen_qundoview.go b/qt6/gen_qundoview.go index 80a1f719..073c4f3d 100644 --- a/qt6/gen_qundoview.go +++ b/qt6/gen_qundoview.go @@ -871,6 +871,34 @@ func miqt_exec_callback_QUndoView_SetSelection(self *C.QUndoView, cb C.intptr_t, } +func (this *QUndoView) callVirtualBase_VisualRegionForSelection(selection *QItemSelection) *QRegion { + + _ret := C.QUndoView_virtualbase_VisualRegionForSelection(unsafe.Pointer(this.h), selection.cPointer()) + _goptr := newQRegion(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QUndoView) OnVisualRegionForSelection(slot func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) { + C.QUndoView_override_virtual_VisualRegionForSelection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_VisualRegionForSelection +func miqt_exec_callback_QUndoView_VisualRegionForSelection(self *C.QUndoView, cb C.intptr_t, selection *C.QItemSelection) *C.QRegion { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selection *QItemSelection) *QRegion, selection *QItemSelection) *QRegion) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selection)) + + virtualReturn := gofunc((&QUndoView{h: self}).callVirtualBase_VisualRegionForSelection, slotval1) + + return virtualReturn.cPointer() + +} + func (this *QUndoView) callVirtualBase_SelectedIndexes() []QModelIndex { var _ma C.struct_miqt_array = C.QUndoView_virtualbase_SelectedIndexes(unsafe.Pointer(this.h)) @@ -953,6 +981,30 @@ func miqt_exec_callback_QUndoView_IsIndexHidden(self *C.QUndoView, cb C.intptr_t } +func (this *QUndoView) callVirtualBase_SelectionChanged(selected *QItemSelection, deselected *QItemSelection) { + + C.QUndoView_virtualbase_SelectionChanged(unsafe.Pointer(this.h), selected.cPointer(), deselected.cPointer()) + +} +func (this *QUndoView) OnSelectionChanged(slot func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) { + C.QUndoView_override_virtual_SelectionChanged(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QUndoView_SelectionChanged +func miqt_exec_callback_QUndoView_SelectionChanged(self *C.QUndoView, cb C.intptr_t, selected *C.QItemSelection, deselected *C.QItemSelection) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(selected *QItemSelection, deselected *QItemSelection), selected *QItemSelection, deselected *QItemSelection)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQItemSelection(unsafe.Pointer(selected)) + slotval2 := UnsafeNewQItemSelection(unsafe.Pointer(deselected)) + + gofunc((&QUndoView{h: self}).callVirtualBase_SelectionChanged, slotval1, slotval2) + +} + func (this *QUndoView) callVirtualBase_CurrentChanged(current *QModelIndex, previous *QModelIndex) { C.QUndoView_virtualbase_CurrentChanged(unsafe.Pointer(this.h), current.cPointer(), previous.cPointer()) diff --git a/qt6/gen_qundoview.h b/qt6/gen_qundoview.h index 12ead5ed..8759d5cd 100644 --- a/qt6/gen_qundoview.h +++ b/qt6/gen_qundoview.h @@ -23,6 +23,7 @@ class QDropEvent; class QEvent; class QFrame; class QIcon; +class QItemSelection; class QListView; class QMetaObject; class QModelIndex; @@ -32,6 +33,7 @@ class QPaintDevice; class QPaintEvent; class QPoint; class QRect; +class QRegion; class QResizeEvent; class QSize; class QStyleOptionViewItem; @@ -50,6 +52,7 @@ typedef struct QDropEvent QDropEvent; typedef struct QEvent QEvent; typedef struct QFrame QFrame; typedef struct QIcon QIcon; +typedef struct QItemSelection QItemSelection; typedef struct QListView QListView; typedef struct QMetaObject QMetaObject; typedef struct QModelIndex QModelIndex; @@ -59,6 +62,7 @@ typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEvent QPaintEvent; typedef struct QPoint QPoint; typedef struct QRect QRect; +typedef struct QRegion QRegion; typedef struct QResizeEvent QResizeEvent; typedef struct QSize QSize; typedef struct QStyleOptionViewItem QStyleOptionViewItem; @@ -141,12 +145,16 @@ 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_VisualRegionForSelection(void* self, intptr_t slot); +QRegion* QUndoView_virtualbase_VisualRegionForSelection(const void* self, QItemSelection* selection); 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_SelectionChanged(void* self, intptr_t slot); +void QUndoView_virtualbase_SelectionChanged(void* self, QItemSelection* selected, QItemSelection* deselected); 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); diff --git a/qt6/gen_qvalidator.cpp b/qt6/gen_qvalidator.cpp index 08cf4ab6..2a448567 100644 --- a/qt6/gen_qvalidator.cpp +++ b/qt6/gen_qvalidator.cpp @@ -1,6 +1,9 @@ +#include #include +#include #include #include +#include #include #include #include @@ -8,11 +11,261 @@ #include #include #include +#include #include #include #include "gen_qvalidator.h" #include "_cgo_export.h" +class MiqtVirtualQValidator : public virtual QValidator { +public: + + MiqtVirtualQValidator(): QValidator() {}; + MiqtVirtualQValidator(QObject* parent): QValidator(parent) {}; + + virtual ~MiqtVirtualQValidator() = 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 (QValidator::State)(0); // Pure virtual, there is no base we can call + } + + 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_QValidator_Validate(const_cast(this), handle__Validate, sigval1, sigval2); + + return static_cast(callback_return_value); + } + + // 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) { + QValidator::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_QValidator_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); + + QValidator::fixup(param1_QString); + + } + + // 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 QValidator::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QValidator_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QValidator::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 QValidator::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QValidator_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QValidator::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) { + QValidator::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QValidator_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QValidator::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) { + QValidator::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QValidator_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QValidator::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) { + QValidator::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QValidator_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QValidator::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) { + QValidator::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QValidator_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QValidator::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) { + QValidator::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QValidator_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QValidator::disconnectNotify(*signal); + + } + +}; + +void QValidator_new(QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQValidator* ret = new MiqtVirtualQValidator(); + *outptr_QValidator = ret; + *outptr_QObject = static_cast(ret); +} + +void QValidator_new2(QObject* parent, QValidator** outptr_QValidator, QObject** outptr_QObject) { + MiqtVirtualQValidator* ret = new MiqtVirtualQValidator(parent); + *outptr_QValidator = ret; + *outptr_QObject = static_cast(ret); +} + QMetaObject* QValidator_MetaObject(const QValidator* self) { return (QMetaObject*) self->metaObject(); } @@ -56,7 +309,7 @@ void QValidator_Changed(QValidator* self) { } void QValidator_connect_Changed(QValidator* self, intptr_t slot) { - QValidator::connect(self, static_cast(&QValidator::changed), self, [=]() { + MiqtVirtualQValidator::connect(self, static_cast(&QValidator::changed), self, [=]() { miqt_exec_callback_QValidator_Changed(slot); }); } @@ -83,9 +336,77 @@ struct miqt_string QValidator_Tr3(const char* s, const char* c, int n) { return _ms; } +void QValidator_override_virtual_Validate(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__Validate = slot; +} + +void QValidator_override_virtual_Fixup(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__Fixup = slot; +} + +void QValidator_virtualbase_Fixup(const void* self, struct miqt_string param1) { + ( (const MiqtVirtualQValidator*)(self) )->virtualbase_Fixup(param1); +} + +void QValidator_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__Event = slot; +} + +bool QValidator_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQValidator*)(self) )->virtualbase_Event(event); +} + +void QValidator_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__EventFilter = slot; +} + +bool QValidator_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQValidator*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QValidator_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__TimerEvent = slot; +} + +void QValidator_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQValidator*)(self) )->virtualbase_TimerEvent(event); +} + +void QValidator_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__ChildEvent = slot; +} + +void QValidator_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQValidator*)(self) )->virtualbase_ChildEvent(event); +} + +void QValidator_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__CustomEvent = slot; +} + +void QValidator_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQValidator*)(self) )->virtualbase_CustomEvent(event); +} + +void QValidator_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__ConnectNotify = slot; +} + +void QValidator_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQValidator*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QValidator_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QValidator*)(self) )->handle__DisconnectNotify = slot; +} + +void QValidator_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQValidator*)(self) )->virtualbase_DisconnectNotify(signal); +} + void QValidator_Delete(QValidator* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qvalidator.go b/qt6/gen_qvalidator.go index 5f504a35..5af377ec 100644 --- a/qt6/gen_qvalidator.go +++ b/qt6/gen_qvalidator.go @@ -68,6 +68,28 @@ func UnsafeNewQValidator(h unsafe.Pointer, h_QObject unsafe.Pointer) *QValidator QObject: UnsafeNewQObject(h_QObject)} } +// NewQValidator constructs a new QValidator object. +func NewQValidator() *QValidator { + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QValidator_new(&outptr_QValidator, &outptr_QObject) + ret := newQValidator(outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQValidator2 constructs a new QValidator object. +func NewQValidator2(parent *QObject) *QValidator { + var outptr_QValidator *C.QValidator = nil + var outptr_QObject *C.QObject = nil + + C.QValidator_new2(parent.cPointer(), &outptr_QValidator, &outptr_QObject) + ret := newQValidator(outptr_QValidator, outptr_QObject) + ret.isSubclass = true + return ret +} + func (this *QValidator) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QValidator_MetaObject(this.h))) } @@ -152,6 +174,225 @@ func QValidator_Tr3(s string, c string, n int) string { C.free(unsafe.Pointer(_ms.data)) return _ret } +func (this *QValidator) OnValidate(slot func(param1 string, param2 *int) QValidator__State) { + C.QValidator_override_virtual_Validate(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_Validate +func miqt_exec_callback_QValidator_Validate(self *C.QValidator, cb C.intptr_t, param1 C.struct_miqt_string, param2 *C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(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(slotval1, slotval2) + + return (C.int)(virtualReturn) + +} + +func (this *QValidator) 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.QValidator_virtualbase_Fixup(unsafe.Pointer(this.h), param1_ms) + +} +func (this *QValidator) OnFixup(slot func(super func(param1 string), param1 string)) { + C.QValidator_override_virtual_Fixup(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_Fixup +func miqt_exec_callback_QValidator_Fixup(self *C.QValidator, 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((&QValidator{h: self}).callVirtualBase_Fixup, slotval1) + +} + +func (this *QValidator) callVirtualBase_Event(event *QEvent) bool { + + return (bool)(C.QValidator_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) + +} +func (this *QValidator) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { + C.QValidator_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_Event +func miqt_exec_callback_QValidator_Event(self *C.QValidator, 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((&QValidator{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QValidator) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { + + return (bool)(C.QValidator_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) + +} +func (this *QValidator) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { + C.QValidator_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_EventFilter +func miqt_exec_callback_QValidator_EventFilter(self *C.QValidator, 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((&QValidator{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QValidator) callVirtualBase_TimerEvent(event *QTimerEvent) { + + C.QValidator_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QValidator) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { + C.QValidator_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_TimerEvent +func miqt_exec_callback_QValidator_TimerEvent(self *C.QValidator, 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((&QValidator{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QValidator) callVirtualBase_ChildEvent(event *QChildEvent) { + + C.QValidator_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QValidator) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { + C.QValidator_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_ChildEvent +func miqt_exec_callback_QValidator_ChildEvent(self *C.QValidator, 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((&QValidator{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QValidator) callVirtualBase_CustomEvent(event *QEvent) { + + C.QValidator_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) + +} +func (this *QValidator) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { + C.QValidator_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_CustomEvent +func miqt_exec_callback_QValidator_CustomEvent(self *C.QValidator, 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((&QValidator{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QValidator) callVirtualBase_ConnectNotify(signal *QMetaMethod) { + + C.QValidator_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QValidator) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QValidator_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_ConnectNotify +func miqt_exec_callback_QValidator_ConnectNotify(self *C.QValidator, 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((&QValidator{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QValidator) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { + + C.QValidator_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) + +} +func (this *QValidator) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { + C.QValidator_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QValidator_DisconnectNotify +func miqt_exec_callback_QValidator_DisconnectNotify(self *C.QValidator, 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((&QValidator{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} // Delete this object from C++ memory. func (this *QValidator) Delete() { diff --git a/qt6/gen_qvalidator.h b/qt6/gen_qvalidator.h index c4029fa2..3e5ef638 100644 --- a/qt6/gen_qvalidator.h +++ b/qt6/gen_qvalidator.h @@ -15,25 +15,35 @@ extern "C" { #endif #ifdef __cplusplus +class QChildEvent; class QDoubleValidator; +class QEvent; class QIntValidator; class QLocale; +class QMetaMethod; class QMetaObject; class QObject; class QRegularExpression; class QRegularExpressionValidator; +class QTimerEvent; class QValidator; #else +typedef struct QChildEvent QChildEvent; typedef struct QDoubleValidator QDoubleValidator; +typedef struct QEvent QEvent; typedef struct QIntValidator QIntValidator; typedef struct QLocale QLocale; +typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QRegularExpression QRegularExpression; typedef struct QRegularExpressionValidator QRegularExpressionValidator; +typedef struct QTimerEvent QTimerEvent; typedef struct QValidator QValidator; #endif +void QValidator_new(QValidator** outptr_QValidator, QObject** outptr_QObject); +void QValidator_new2(QObject* parent, QValidator** outptr_QValidator, QObject** outptr_QObject); QMetaObject* QValidator_MetaObject(const QValidator* self); void* QValidator_Metacast(QValidator* self, const char* param1); struct miqt_string QValidator_Tr(const char* s); @@ -45,6 +55,24 @@ 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_override_virtual_Validate(void* self, intptr_t slot); +int QValidator_virtualbase_Validate(const void* self, struct miqt_string param1, int* param2); +void QValidator_override_virtual_Fixup(void* self, intptr_t slot); +void QValidator_virtualbase_Fixup(const void* self, struct miqt_string param1); +void QValidator_override_virtual_Event(void* self, intptr_t slot); +bool QValidator_virtualbase_Event(void* self, QEvent* event); +void QValidator_override_virtual_EventFilter(void* self, intptr_t slot); +bool QValidator_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QValidator_override_virtual_TimerEvent(void* self, intptr_t slot); +void QValidator_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QValidator_override_virtual_ChildEvent(void* self, intptr_t slot); +void QValidator_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QValidator_override_virtual_CustomEvent(void* self, intptr_t slot); +void QValidator_virtualbase_CustomEvent(void* self, QEvent* event); +void QValidator_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QValidator_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QValidator_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QValidator_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QValidator_Delete(QValidator* self, bool isSubclass); void QIntValidator_new(QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); diff --git a/qt6/network/gen_qnetworkproxy.cpp b/qt6/network/gen_qnetworkproxy.cpp index 150de07e..cce9fde3 100644 --- a/qt6/network/gen_qnetworkproxy.cpp +++ b/qt6/network/gen_qnetworkproxy.cpp @@ -362,6 +362,44 @@ void QNetworkProxy_Delete(QNetworkProxy* self, bool isSubclass) { } } +class MiqtVirtualQNetworkProxyFactory : public virtual QNetworkProxyFactory { +public: + + MiqtVirtualQNetworkProxyFactory(): QNetworkProxyFactory() {}; + + virtual ~MiqtVirtualQNetworkProxyFactory() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__QueryProxy = 0; + + // Subclass to allow providing a Go implementation + virtual QList queryProxy(const QNetworkProxyQuery& query) override { + if (handle__QueryProxy == 0) { + return QList(); // Pure virtual, there is no base we can call + } + + const QNetworkProxyQuery& query_ret = query; + // Cast returned reference into pointer + QNetworkProxyQuery* sigval1 = const_cast(&query_ret); + + struct miqt_array /* of QNetworkProxy* */ callback_return_value = miqt_exec_callback_QNetworkProxyFactory_QueryProxy(this, handle__QueryProxy, sigval1); + QList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QNetworkProxy** 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 QNetworkProxyFactory_new(QNetworkProxyFactory** outptr_QNetworkProxyFactory) { + MiqtVirtualQNetworkProxyFactory* ret = new MiqtVirtualQNetworkProxyFactory(); + *outptr_QNetworkProxyFactory = ret; +} + 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 @@ -430,9 +468,13 @@ struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_SystemProxyForQu return _out; } +void QNetworkProxyFactory_override_virtual_QueryProxy(void* self, intptr_t slot) { + dynamic_cast( (QNetworkProxyFactory*)(self) )->handle__QueryProxy = slot; +} + void QNetworkProxyFactory_Delete(QNetworkProxyFactory* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/network/gen_qnetworkproxy.go b/qt6/network/gen_qnetworkproxy.go index e6ad8125..c30719a2 100644 --- a/qt6/network/gen_qnetworkproxy.go +++ b/qt6/network/gen_qnetworkproxy.go @@ -11,6 +11,7 @@ import "C" import ( "github.com/mappu/miqt/qt6" "runtime" + "runtime/cgo" "unsafe" ) @@ -646,6 +647,16 @@ func UnsafeNewQNetworkProxyFactory(h unsafe.Pointer) *QNetworkProxyFactory { return &QNetworkProxyFactory{h: (*C.QNetworkProxyFactory)(h)} } +// NewQNetworkProxyFactory constructs a new QNetworkProxyFactory object. +func NewQNetworkProxyFactory() *QNetworkProxyFactory { + var outptr_QNetworkProxyFactory *C.QNetworkProxyFactory = nil + + C.QNetworkProxyFactory_new(&outptr_QNetworkProxyFactory) + ret := newQNetworkProxyFactory(outptr_QNetworkProxyFactory) + ret.isSubclass = true + return ret +} + 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)) @@ -713,6 +724,31 @@ func QNetworkProxyFactory_SystemProxyForQuery1(query *QNetworkProxyQuery) []QNet } return _ret } +func (this *QNetworkProxyFactory) OnQueryProxy(slot func(query *QNetworkProxyQuery) []QNetworkProxy) { + C.QNetworkProxyFactory_override_virtual_QueryProxy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QNetworkProxyFactory_QueryProxy +func miqt_exec_callback_QNetworkProxyFactory_QueryProxy(self *C.QNetworkProxyFactory, cb C.intptr_t, query *C.QNetworkProxyQuery) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(query *QNetworkProxyQuery) []QNetworkProxy) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQNetworkProxyQuery(unsafe.Pointer(query)) + + virtualReturn := gofunc(slotval1) + virtualReturn_CArray := (*[0xffff]*C.QNetworkProxy)(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 + +} // Delete this object from C++ memory. func (this *QNetworkProxyFactory) Delete() { diff --git a/qt6/network/gen_qnetworkproxy.h b/qt6/network/gen_qnetworkproxy.h index 2f70f949..5665ebe7 100644 --- a/qt6/network/gen_qnetworkproxy.h +++ b/qt6/network/gen_qnetworkproxy.h @@ -93,6 +93,7 @@ struct miqt_string QNetworkProxy_RawHeader(const QNetworkProxy* self, struct miq void QNetworkProxy_SetRawHeader(QNetworkProxy* self, struct miqt_string headerName, struct miqt_string value); void QNetworkProxy_Delete(QNetworkProxy* self, bool isSubclass); +void QNetworkProxyFactory_new(QNetworkProxyFactory** outptr_QNetworkProxyFactory); struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy(QNetworkProxyFactory* self, QNetworkProxyQuery* query); bool QNetworkProxyFactory_UsesSystemConfiguration(); void QNetworkProxyFactory_SetUseSystemConfiguration(bool enable); @@ -101,6 +102,8 @@ struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_ProxyForQuery(QN struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_SystemProxyForQuery(); void QNetworkProxyFactory_OperatorAssign(QNetworkProxyFactory* self, QNetworkProxyFactory* param1); struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_SystemProxyForQuery1(QNetworkProxyQuery* query); +void QNetworkProxyFactory_override_virtual_QueryProxy(void* self, intptr_t slot); +struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_virtualbase_QueryProxy(void* self, QNetworkProxyQuery* query); void QNetworkProxyFactory_Delete(QNetworkProxyFactory* self, bool isSubclass); #ifdef __cplusplus From a0e56bf7c208452d9ecfbbd6fe05915f0da19d10 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 23 Nov 2024 20:02:41 +1300 Subject: [PATCH 10/12] examples/modelview: initial commit --- .gitignore | 1 + examples/modelview/main.go | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 examples/modelview/main.go diff --git a/.gitignore b/.gitignore index 2e87edd7..9582fb36 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ examples/windowsmanifest/windowsmanifest examples/uidesigner/uidesigner examples/trivialwizard6/trivialwizard6 examples/subclass/subclass +examples/modelview/modelview examples/libraries/extras-scintillaedit/extras-scintillaedit examples/libraries/qt-multimedia/qt-multimedia examples/libraries/qt-network/qt-network diff --git a/examples/modelview/main.go b/examples/modelview/main.go new file mode 100644 index 00000000..557f3493 --- /dev/null +++ b/examples/modelview/main.go @@ -0,0 +1,38 @@ +package main + +import ( + "fmt" + "os" + + "github.com/mappu/miqt/qt" +) + +func main() { + qt.NewQApplication(os.Args) + + model := qt.NewQAbstractListModel() + + model.OnRowCount(func(parent *qt.QModelIndex) int { + return 1000 + }) + + model.OnData(func(idx *qt.QModelIndex, role int) *qt.QVariant { + if !idx.IsValid() { + return qt.NewQVariant() + } + + switch qt.ItemDataRole(role) { + case qt.DisplayRole: + return qt.NewQVariant14(fmt.Sprintf("this is row %d", idx.Row())) + + default: + return qt.NewQVariant() + } + }) + + v := qt.NewQListView2() + v.SetModel(model.QAbstractItemModel) + v.Show() + + qt.QApplication_Exec() +} From 13deba55b7840e2da04e68db889ee7480808e9e8 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 23 Nov 2024 21:11:24 +1300 Subject: [PATCH 11/12] genbindings/config: do not subclass platform-specific QAbstractEventDispatcher --- cmd/genbindings/config-allowlist.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/genbindings/config-allowlist.go b/cmd/genbindings/config-allowlist.go index 2273cb28..8104cfaf 100644 --- a/cmd/genbindings/config-allowlist.go +++ b/cmd/genbindings/config-allowlist.go @@ -225,6 +225,12 @@ func AllowVirtualForClass(className string) bool { return false // undefined reference to `vtable for MiqtVirtualQAccessibleObject' } + // Pure virtual method registerEventNotifier takes a QWinEventNotifier* on Windows + // which is platform-specific + if className == "QAbstractEventDispatcher" { + return false + } + return true } From 377addf0b19a77bbcc4b6c571b1d36853dd3d206 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 23 Nov 2024 21:11:35 +1300 Subject: [PATCH 12/12] qt: rebuild (do not subclass QAbstractEventDispatcher) --- qt/gen_qabstracteventdispatcher.cpp | 568 +-------------------------- qt/gen_qabstracteventdispatcher.go | 444 --------------------- qt/gen_qabstracteventdispatcher.h | 52 --- qt6/gen_qabstracteventdispatcher.cpp | 531 +------------------------ qt6/gen_qabstracteventdispatcher.go | 414 ------------------- qt6/gen_qabstracteventdispatcher.h | 48 --- 6 files changed, 6 insertions(+), 2051 deletions(-) diff --git a/qt/gen_qabstracteventdispatcher.cpp b/qt/gen_qabstracteventdispatcher.cpp index 21696d64..631137dc 100644 --- a/qt/gen_qabstracteventdispatcher.cpp +++ b/qt/gen_qabstracteventdispatcher.cpp @@ -2,10 +2,7 @@ #define WORKAROUND_INNER_CLASS_DEFINITION_QAbstractEventDispatcher__TimerInfo #include #include -#include -#include #include -#include #include #include #include @@ -13,449 +10,10 @@ #include #include #include -#include #include #include "gen_qabstracteventdispatcher.h" #include "_cgo_export.h" -class MiqtVirtualQAbstractEventDispatcher : public virtual QAbstractEventDispatcher { -public: - - MiqtVirtualQAbstractEventDispatcher(): QAbstractEventDispatcher() {}; - MiqtVirtualQAbstractEventDispatcher(QObject* parent): QAbstractEventDispatcher(parent) {}; - - virtual ~MiqtVirtualQAbstractEventDispatcher() = default; - - // cgo.Handle value for overwritten implementation - intptr_t handle__ProcessEvents = 0; - - // Subclass to allow providing a Go implementation - virtual bool processEvents(QEventLoop::ProcessEventsFlags flags) override { - if (handle__ProcessEvents == 0) { - return false; // Pure virtual, there is no base we can call - } - - QEventLoop::ProcessEventsFlags flags_ret = flags; - int sigval1 = static_cast(flags_ret); - - bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_ProcessEvents(this, handle__ProcessEvents, sigval1); - - return callback_return_value; - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__HasPendingEvents = 0; - - // Subclass to allow providing a Go implementation - virtual bool hasPendingEvents() override { - if (handle__HasPendingEvents == 0) { - return false; // Pure virtual, there is no base we can call - } - - - bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_HasPendingEvents(this, handle__HasPendingEvents); - - return callback_return_value; - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__RegisterSocketNotifier = 0; - - // Subclass to allow providing a Go implementation - virtual void registerSocketNotifier(QSocketNotifier* notifier) override { - if (handle__RegisterSocketNotifier == 0) { - return; // Pure virtual, there is no base we can call - } - - QSocketNotifier* sigval1 = notifier; - - miqt_exec_callback_QAbstractEventDispatcher_RegisterSocketNotifier(this, handle__RegisterSocketNotifier, sigval1); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__UnregisterSocketNotifier = 0; - - // Subclass to allow providing a Go implementation - virtual void unregisterSocketNotifier(QSocketNotifier* notifier) override { - if (handle__UnregisterSocketNotifier == 0) { - return; // Pure virtual, there is no base we can call - } - - QSocketNotifier* sigval1 = notifier; - - miqt_exec_callback_QAbstractEventDispatcher_UnregisterSocketNotifier(this, handle__UnregisterSocketNotifier, sigval1); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__RegisterTimer2 = 0; - - // Subclass to allow providing a Go implementation - virtual void registerTimer(int timerId, int interval, Qt::TimerType timerType, QObject* object) override { - if (handle__RegisterTimer2 == 0) { - return; // Pure virtual, there is no base we can call - } - - int sigval1 = timerId; - int sigval2 = interval; - Qt::TimerType timerType_ret = timerType; - int sigval3 = static_cast(timerType_ret); - QObject* sigval4 = object; - - miqt_exec_callback_QAbstractEventDispatcher_RegisterTimer2(this, handle__RegisterTimer2, sigval1, sigval2, sigval3, sigval4); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__UnregisterTimer = 0; - - // Subclass to allow providing a Go implementation - virtual bool unregisterTimer(int timerId) override { - if (handle__UnregisterTimer == 0) { - return false; // Pure virtual, there is no base we can call - } - - int sigval1 = timerId; - - bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimer(this, handle__UnregisterTimer, sigval1); - - return callback_return_value; - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__UnregisterTimers = 0; - - // Subclass to allow providing a Go implementation - virtual bool unregisterTimers(QObject* object) override { - if (handle__UnregisterTimers == 0) { - return false; // Pure virtual, there is no base we can call - } - - QObject* sigval1 = object; - - bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimers(this, handle__UnregisterTimers, sigval1); - - return callback_return_value; - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__RegisteredTimers = 0; - - // Subclass to allow providing a Go implementation - virtual QList registeredTimers(QObject* object) const override { - if (handle__RegisteredTimers == 0) { - return QList(); // Pure virtual, there is no base we can call - } - - QObject* sigval1 = object; - - struct miqt_array /* of QAbstractEventDispatcher__TimerInfo* */ callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_RegisteredTimers(const_cast(this), handle__RegisteredTimers, sigval1); - QList callback_return_value_QList; - callback_return_value_QList.reserve(callback_return_value.len); - QAbstractEventDispatcher__TimerInfo** 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; - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__RemainingTime = 0; - - // Subclass to allow providing a Go implementation - virtual int remainingTime(int timerId) override { - if (handle__RemainingTime == 0) { - return 0; // Pure virtual, there is no base we can call - } - - int sigval1 = timerId; - - int callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_RemainingTime(this, handle__RemainingTime, sigval1); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__WakeUp = 0; - - // Subclass to allow providing a Go implementation - virtual void wakeUp() override { - if (handle__WakeUp == 0) { - return; // Pure virtual, there is no base we can call - } - - - miqt_exec_callback_QAbstractEventDispatcher_WakeUp(this, handle__WakeUp); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Interrupt = 0; - - // Subclass to allow providing a Go implementation - virtual void interrupt() override { - if (handle__Interrupt == 0) { - return; // Pure virtual, there is no base we can call - } - - - miqt_exec_callback_QAbstractEventDispatcher_Interrupt(this, handle__Interrupt); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Flush = 0; - - // Subclass to allow providing a Go implementation - virtual void flush() override { - if (handle__Flush == 0) { - return; // Pure virtual, there is no base we can call - } - - - miqt_exec_callback_QAbstractEventDispatcher_Flush(this, handle__Flush); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__StartingUp = 0; - - // Subclass to allow providing a Go implementation - virtual void startingUp() override { - if (handle__StartingUp == 0) { - QAbstractEventDispatcher::startingUp(); - return; - } - - - miqt_exec_callback_QAbstractEventDispatcher_StartingUp(this, handle__StartingUp); - - - } - - // Wrapper to allow calling protected method - void virtualbase_StartingUp() { - - QAbstractEventDispatcher::startingUp(); - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__ClosingDown = 0; - - // Subclass to allow providing a Go implementation - virtual void closingDown() override { - if (handle__ClosingDown == 0) { - QAbstractEventDispatcher::closingDown(); - return; - } - - - miqt_exec_callback_QAbstractEventDispatcher_ClosingDown(this, handle__ClosingDown); - - - } - - // Wrapper to allow calling protected method - void virtualbase_ClosingDown() { - - QAbstractEventDispatcher::closingDown(); - - } - - // 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 QAbstractEventDispatcher::event(event); - } - - QEvent* sigval1 = event; - - bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_Event(this, handle__Event, sigval1); - - return callback_return_value; - } - - // Wrapper to allow calling protected method - bool virtualbase_Event(QEvent* event) { - - return QAbstractEventDispatcher::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 QAbstractEventDispatcher::eventFilter(watched, event); - } - - QObject* sigval1 = watched; - QEvent* sigval2 = event; - - bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_EventFilter(this, handle__EventFilter, sigval1, sigval2); - - return callback_return_value; - } - - // Wrapper to allow calling protected method - bool virtualbase_EventFilter(QObject* watched, QEvent* event) { - - return QAbstractEventDispatcher::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) { - QAbstractEventDispatcher::timerEvent(event); - return; - } - - QTimerEvent* sigval1 = event; - - miqt_exec_callback_QAbstractEventDispatcher_TimerEvent(this, handle__TimerEvent, sigval1); - - - } - - // Wrapper to allow calling protected method - void virtualbase_TimerEvent(QTimerEvent* event) { - - QAbstractEventDispatcher::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) { - QAbstractEventDispatcher::childEvent(event); - return; - } - - QChildEvent* sigval1 = event; - - miqt_exec_callback_QAbstractEventDispatcher_ChildEvent(this, handle__ChildEvent, sigval1); - - - } - - // Wrapper to allow calling protected method - void virtualbase_ChildEvent(QChildEvent* event) { - - QAbstractEventDispatcher::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) { - QAbstractEventDispatcher::customEvent(event); - return; - } - - QEvent* sigval1 = event; - - miqt_exec_callback_QAbstractEventDispatcher_CustomEvent(this, handle__CustomEvent, sigval1); - - - } - - // Wrapper to allow calling protected method - void virtualbase_CustomEvent(QEvent* event) { - - QAbstractEventDispatcher::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) { - QAbstractEventDispatcher::connectNotify(signal); - return; - } - - const QMetaMethod& signal_ret = signal; - // Cast returned reference into pointer - QMetaMethod* sigval1 = const_cast(&signal_ret); - - miqt_exec_callback_QAbstractEventDispatcher_ConnectNotify(this, handle__ConnectNotify, sigval1); - - - } - - // Wrapper to allow calling protected method - void virtualbase_ConnectNotify(QMetaMethod* signal) { - - QAbstractEventDispatcher::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) { - QAbstractEventDispatcher::disconnectNotify(signal); - return; - } - - const QMetaMethod& signal_ret = signal; - // Cast returned reference into pointer - QMetaMethod* sigval1 = const_cast(&signal_ret); - - miqt_exec_callback_QAbstractEventDispatcher_DisconnectNotify(this, handle__DisconnectNotify, sigval1); - - - } - - // Wrapper to allow calling protected method - void virtualbase_DisconnectNotify(QMetaMethod* signal) { - - QAbstractEventDispatcher::disconnectNotify(*signal); - - } - -}; - -void QAbstractEventDispatcher_new(QAbstractEventDispatcher** outptr_QAbstractEventDispatcher, QObject** outptr_QObject) { - MiqtVirtualQAbstractEventDispatcher* ret = new MiqtVirtualQAbstractEventDispatcher(); - *outptr_QAbstractEventDispatcher = ret; - *outptr_QObject = static_cast(ret); -} - -void QAbstractEventDispatcher_new2(QObject* parent, QAbstractEventDispatcher** outptr_QAbstractEventDispatcher, QObject** outptr_QObject) { - MiqtVirtualQAbstractEventDispatcher* ret = new MiqtVirtualQAbstractEventDispatcher(parent); - *outptr_QAbstractEventDispatcher = ret; - *outptr_QObject = static_cast(ret); -} - QMetaObject* QAbstractEventDispatcher_MetaObject(const QAbstractEventDispatcher* self) { return (QMetaObject*) self->metaObject(); } @@ -577,7 +135,7 @@ void QAbstractEventDispatcher_AboutToBlock(QAbstractEventDispatcher* self) { } void QAbstractEventDispatcher_connect_AboutToBlock(QAbstractEventDispatcher* self, intptr_t slot) { - MiqtVirtualQAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::aboutToBlock), self, [=]() { + QAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::aboutToBlock), self, [=]() { miqt_exec_callback_QAbstractEventDispatcher_AboutToBlock(slot); }); } @@ -587,7 +145,7 @@ void QAbstractEventDispatcher_Awake(QAbstractEventDispatcher* self) { } void QAbstractEventDispatcher_connect_Awake(QAbstractEventDispatcher* self, intptr_t slot) { - MiqtVirtualQAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::awake), self, [=]() { + QAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::awake), self, [=]() { miqt_exec_callback_QAbstractEventDispatcher_Awake(slot); }); } @@ -640,129 +198,9 @@ QAbstractEventDispatcher* QAbstractEventDispatcher_Instance1(QThread* thread) { return QAbstractEventDispatcher::instance(thread); } -void QAbstractEventDispatcher_override_virtual_ProcessEvents(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__ProcessEvents = slot; -} - -void QAbstractEventDispatcher_override_virtual_HasPendingEvents(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__HasPendingEvents = slot; -} - -void QAbstractEventDispatcher_override_virtual_RegisterSocketNotifier(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__RegisterSocketNotifier = slot; -} - -void QAbstractEventDispatcher_override_virtual_UnregisterSocketNotifier(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__UnregisterSocketNotifier = slot; -} - -void QAbstractEventDispatcher_override_virtual_RegisterTimer2(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__RegisterTimer2 = slot; -} - -void QAbstractEventDispatcher_override_virtual_UnregisterTimer(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__UnregisterTimer = slot; -} - -void QAbstractEventDispatcher_override_virtual_UnregisterTimers(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__UnregisterTimers = slot; -} - -void QAbstractEventDispatcher_override_virtual_RegisteredTimers(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__RegisteredTimers = slot; -} - -void QAbstractEventDispatcher_override_virtual_RemainingTime(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__RemainingTime = slot; -} - -void QAbstractEventDispatcher_override_virtual_WakeUp(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__WakeUp = slot; -} - -void QAbstractEventDispatcher_override_virtual_Interrupt(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__Interrupt = slot; -} - -void QAbstractEventDispatcher_override_virtual_Flush(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__Flush = slot; -} - -void QAbstractEventDispatcher_override_virtual_StartingUp(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__StartingUp = slot; -} - -void QAbstractEventDispatcher_virtualbase_StartingUp(void* self) { - ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_StartingUp(); -} - -void QAbstractEventDispatcher_override_virtual_ClosingDown(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__ClosingDown = slot; -} - -void QAbstractEventDispatcher_virtualbase_ClosingDown(void* self) { - ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_ClosingDown(); -} - -void QAbstractEventDispatcher_override_virtual_Event(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__Event = slot; -} - -bool QAbstractEventDispatcher_virtualbase_Event(void* self, QEvent* event) { - return ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_Event(event); -} - -void QAbstractEventDispatcher_override_virtual_EventFilter(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__EventFilter = slot; -} - -bool QAbstractEventDispatcher_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { - return ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_EventFilter(watched, event); -} - -void QAbstractEventDispatcher_override_virtual_TimerEvent(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__TimerEvent = slot; -} - -void QAbstractEventDispatcher_virtualbase_TimerEvent(void* self, QTimerEvent* event) { - ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_TimerEvent(event); -} - -void QAbstractEventDispatcher_override_virtual_ChildEvent(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__ChildEvent = slot; -} - -void QAbstractEventDispatcher_virtualbase_ChildEvent(void* self, QChildEvent* event) { - ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_ChildEvent(event); -} - -void QAbstractEventDispatcher_override_virtual_CustomEvent(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__CustomEvent = slot; -} - -void QAbstractEventDispatcher_virtualbase_CustomEvent(void* self, QEvent* event) { - ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_CustomEvent(event); -} - -void QAbstractEventDispatcher_override_virtual_ConnectNotify(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__ConnectNotify = slot; -} - -void QAbstractEventDispatcher_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { - ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_ConnectNotify(signal); -} - -void QAbstractEventDispatcher_override_virtual_DisconnectNotify(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__DisconnectNotify = slot; -} - -void QAbstractEventDispatcher_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { - ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_DisconnectNotify(signal); -} - void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt/gen_qabstracteventdispatcher.go b/qt/gen_qabstracteventdispatcher.go index 2486dfe0..2ec38550 100644 --- a/qt/gen_qabstracteventdispatcher.go +++ b/qt/gen_qabstracteventdispatcher.go @@ -53,28 +53,6 @@ func UnsafeNewQAbstractEventDispatcher(h unsafe.Pointer, h_QObject unsafe.Pointe QObject: UnsafeNewQObject(h_QObject)} } -// NewQAbstractEventDispatcher constructs a new QAbstractEventDispatcher object. -func NewQAbstractEventDispatcher() *QAbstractEventDispatcher { - var outptr_QAbstractEventDispatcher *C.QAbstractEventDispatcher = nil - var outptr_QObject *C.QObject = nil - - C.QAbstractEventDispatcher_new(&outptr_QAbstractEventDispatcher, &outptr_QObject) - ret := newQAbstractEventDispatcher(outptr_QAbstractEventDispatcher, outptr_QObject) - ret.isSubclass = true - return ret -} - -// NewQAbstractEventDispatcher2 constructs a new QAbstractEventDispatcher object. -func NewQAbstractEventDispatcher2(parent *QObject) *QAbstractEventDispatcher { - var outptr_QAbstractEventDispatcher *C.QAbstractEventDispatcher = nil - var outptr_QObject *C.QObject = nil - - C.QAbstractEventDispatcher_new2(parent.cPointer(), &outptr_QAbstractEventDispatcher, &outptr_QObject) - ret := newQAbstractEventDispatcher(outptr_QAbstractEventDispatcher, outptr_QObject) - ret.isSubclass = true - return ret -} - func (this *QAbstractEventDispatcher) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractEventDispatcher_MetaObject(this.h))) } @@ -272,428 +250,6 @@ 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())), nil) } -func (this *QAbstractEventDispatcher) OnProcessEvents(slot func(flags QEventLoop__ProcessEventsFlag) bool) { - C.QAbstractEventDispatcher_override_virtual_ProcessEvents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_ProcessEvents -func miqt_exec_callback_QAbstractEventDispatcher_ProcessEvents(self *C.QAbstractEventDispatcher, cb C.intptr_t, flags C.int) C.bool { - gofunc, ok := cgo.Handle(cb).Value().(func(flags QEventLoop__ProcessEventsFlag) bool) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (QEventLoop__ProcessEventsFlag)(flags) - - virtualReturn := gofunc(slotval1) - - return (C.bool)(virtualReturn) - -} -func (this *QAbstractEventDispatcher) OnHasPendingEvents(slot func() bool) { - C.QAbstractEventDispatcher_override_virtual_HasPendingEvents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_HasPendingEvents -func miqt_exec_callback_QAbstractEventDispatcher_HasPendingEvents(self *C.QAbstractEventDispatcher, cb C.intptr_t) C.bool { - gofunc, ok := cgo.Handle(cb).Value().(func() bool) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - virtualReturn := gofunc() - - return (C.bool)(virtualReturn) - -} -func (this *QAbstractEventDispatcher) OnRegisterSocketNotifier(slot func(notifier *QSocketNotifier)) { - C.QAbstractEventDispatcher_override_virtual_RegisterSocketNotifier(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_RegisterSocketNotifier -func miqt_exec_callback_QAbstractEventDispatcher_RegisterSocketNotifier(self *C.QAbstractEventDispatcher, cb C.intptr_t, notifier *C.QSocketNotifier) { - gofunc, ok := cgo.Handle(cb).Value().(func(notifier *QSocketNotifier)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQSocketNotifier(unsafe.Pointer(notifier), nil) - - gofunc(slotval1) - -} -func (this *QAbstractEventDispatcher) OnUnregisterSocketNotifier(slot func(notifier *QSocketNotifier)) { - C.QAbstractEventDispatcher_override_virtual_UnregisterSocketNotifier(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_UnregisterSocketNotifier -func miqt_exec_callback_QAbstractEventDispatcher_UnregisterSocketNotifier(self *C.QAbstractEventDispatcher, cb C.intptr_t, notifier *C.QSocketNotifier) { - gofunc, ok := cgo.Handle(cb).Value().(func(notifier *QSocketNotifier)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQSocketNotifier(unsafe.Pointer(notifier), nil) - - gofunc(slotval1) - -} -func (this *QAbstractEventDispatcher) OnRegisterTimer2(slot func(timerId int, interval int, timerType TimerType, object *QObject)) { - C.QAbstractEventDispatcher_override_virtual_RegisterTimer2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_RegisterTimer2 -func miqt_exec_callback_QAbstractEventDispatcher_RegisterTimer2(self *C.QAbstractEventDispatcher, cb C.intptr_t, timerId C.int, interval C.int, timerType C.int, object *C.QObject) { - gofunc, ok := cgo.Handle(cb).Value().(func(timerId int, interval int, timerType TimerType, object *QObject)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (int)(timerId) - - slotval2 := (int)(interval) - - slotval3 := (TimerType)(timerType) - - slotval4 := UnsafeNewQObject(unsafe.Pointer(object)) - - gofunc(slotval1, slotval2, slotval3, slotval4) - -} -func (this *QAbstractEventDispatcher) OnUnregisterTimer(slot func(timerId int) bool) { - C.QAbstractEventDispatcher_override_virtual_UnregisterTimer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimer -func miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimer(self *C.QAbstractEventDispatcher, cb C.intptr_t, timerId C.int) C.bool { - gofunc, ok := cgo.Handle(cb).Value().(func(timerId int) bool) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (int)(timerId) - - virtualReturn := gofunc(slotval1) - - return (C.bool)(virtualReturn) - -} -func (this *QAbstractEventDispatcher) OnUnregisterTimers(slot func(object *QObject) bool) { - C.QAbstractEventDispatcher_override_virtual_UnregisterTimers(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimers -func miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimers(self *C.QAbstractEventDispatcher, cb C.intptr_t, object *C.QObject) C.bool { - gofunc, ok := cgo.Handle(cb).Value().(func(object *QObject) bool) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) - - virtualReturn := gofunc(slotval1) - - return (C.bool)(virtualReturn) - -} -func (this *QAbstractEventDispatcher) OnRegisteredTimers(slot func(object *QObject) []QAbstractEventDispatcher__TimerInfo) { - C.QAbstractEventDispatcher_override_virtual_RegisteredTimers(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_RegisteredTimers -func miqt_exec_callback_QAbstractEventDispatcher_RegisteredTimers(self *C.QAbstractEventDispatcher, cb C.intptr_t, object *C.QObject) C.struct_miqt_array { - gofunc, ok := cgo.Handle(cb).Value().(func(object *QObject) []QAbstractEventDispatcher__TimerInfo) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) - - virtualReturn := gofunc(slotval1) - virtualReturn_CArray := (*[0xffff]*C.QAbstractEventDispatcher__TimerInfo)(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 *QAbstractEventDispatcher) OnRemainingTime(slot func(timerId int) int) { - C.QAbstractEventDispatcher_override_virtual_RemainingTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_RemainingTime -func miqt_exec_callback_QAbstractEventDispatcher_RemainingTime(self *C.QAbstractEventDispatcher, cb C.intptr_t, timerId C.int) C.int { - gofunc, ok := cgo.Handle(cb).Value().(func(timerId int) int) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (int)(timerId) - - virtualReturn := gofunc(slotval1) - - return (C.int)(virtualReturn) - -} -func (this *QAbstractEventDispatcher) OnWakeUp(slot func()) { - C.QAbstractEventDispatcher_override_virtual_WakeUp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_WakeUp -func miqt_exec_callback_QAbstractEventDispatcher_WakeUp(self *C.QAbstractEventDispatcher, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func()) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc() - -} -func (this *QAbstractEventDispatcher) OnInterrupt(slot func()) { - C.QAbstractEventDispatcher_override_virtual_Interrupt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_Interrupt -func miqt_exec_callback_QAbstractEventDispatcher_Interrupt(self *C.QAbstractEventDispatcher, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func()) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc() - -} -func (this *QAbstractEventDispatcher) OnFlush(slot func()) { - C.QAbstractEventDispatcher_override_virtual_Flush(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_Flush -func miqt_exec_callback_QAbstractEventDispatcher_Flush(self *C.QAbstractEventDispatcher, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func()) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc() - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_StartingUp() { - - C.QAbstractEventDispatcher_virtualbase_StartingUp(unsafe.Pointer(this.h)) - -} -func (this *QAbstractEventDispatcher) OnStartingUp(slot func(super func())) { - C.QAbstractEventDispatcher_override_virtual_StartingUp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_StartingUp -func miqt_exec_callback_QAbstractEventDispatcher_StartingUp(self *C.QAbstractEventDispatcher, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func(super func())) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc((&QAbstractEventDispatcher{h: self}).callVirtualBase_StartingUp) - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_ClosingDown() { - - C.QAbstractEventDispatcher_virtualbase_ClosingDown(unsafe.Pointer(this.h)) - -} -func (this *QAbstractEventDispatcher) OnClosingDown(slot func(super func())) { - C.QAbstractEventDispatcher_override_virtual_ClosingDown(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_ClosingDown -func miqt_exec_callback_QAbstractEventDispatcher_ClosingDown(self *C.QAbstractEventDispatcher, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func(super func())) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc((&QAbstractEventDispatcher{h: self}).callVirtualBase_ClosingDown) - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_Event(event *QEvent) bool { - - return (bool)(C.QAbstractEventDispatcher_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) - -} -func (this *QAbstractEventDispatcher) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { - C.QAbstractEventDispatcher_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_Event -func miqt_exec_callback_QAbstractEventDispatcher_Event(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_Event, slotval1) - - return (C.bool)(virtualReturn) - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { - - return (bool)(C.QAbstractEventDispatcher_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) - -} -func (this *QAbstractEventDispatcher) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { - C.QAbstractEventDispatcher_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_EventFilter -func miqt_exec_callback_QAbstractEventDispatcher_EventFilter(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) - - return (C.bool)(virtualReturn) - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_TimerEvent(event *QTimerEvent) { - - C.QAbstractEventDispatcher_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) - -} -func (this *QAbstractEventDispatcher) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { - C.QAbstractEventDispatcher_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_TimerEvent -func miqt_exec_callback_QAbstractEventDispatcher_TimerEvent(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_TimerEvent, slotval1) - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_ChildEvent(event *QChildEvent) { - - C.QAbstractEventDispatcher_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) - -} -func (this *QAbstractEventDispatcher) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { - C.QAbstractEventDispatcher_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_ChildEvent -func miqt_exec_callback_QAbstractEventDispatcher_ChildEvent(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_ChildEvent, slotval1) - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_CustomEvent(event *QEvent) { - - C.QAbstractEventDispatcher_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) - -} -func (this *QAbstractEventDispatcher) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { - C.QAbstractEventDispatcher_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_CustomEvent -func miqt_exec_callback_QAbstractEventDispatcher_CustomEvent(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_CustomEvent, slotval1) - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_ConnectNotify(signal *QMetaMethod) { - - C.QAbstractEventDispatcher_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) - -} -func (this *QAbstractEventDispatcher) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { - C.QAbstractEventDispatcher_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_ConnectNotify -func miqt_exec_callback_QAbstractEventDispatcher_ConnectNotify(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_ConnectNotify, slotval1) - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { - - C.QAbstractEventDispatcher_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) - -} -func (this *QAbstractEventDispatcher) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { - C.QAbstractEventDispatcher_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_DisconnectNotify -func miqt_exec_callback_QAbstractEventDispatcher_DisconnectNotify(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_DisconnectNotify, slotval1) - -} // Delete this object from C++ memory. func (this *QAbstractEventDispatcher) Delete() { diff --git a/qt/gen_qabstracteventdispatcher.h b/qt/gen_qabstracteventdispatcher.h index 1b3e50a9..04339830 100644 --- a/qt/gen_qabstracteventdispatcher.h +++ b/qt/gen_qabstracteventdispatcher.h @@ -23,31 +23,21 @@ class QAbstractEventDispatcher__TimerInfo; #endif class QAbstractNativeEventFilter; class QByteArray; -class QChildEvent; -class QEvent; -class QMetaMethod; class QMetaObject; class QObject; class QSocketNotifier; class QThread; -class QTimerEvent; #else typedef struct QAbstractEventDispatcher QAbstractEventDispatcher; typedef struct QAbstractEventDispatcher__TimerInfo QAbstractEventDispatcher__TimerInfo; typedef struct QAbstractNativeEventFilter QAbstractNativeEventFilter; typedef struct QByteArray QByteArray; -typedef struct QChildEvent QChildEvent; -typedef struct QEvent QEvent; -typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSocketNotifier QSocketNotifier; typedef struct QThread QThread; -typedef struct QTimerEvent QTimerEvent; #endif -void QAbstractEventDispatcher_new(QAbstractEventDispatcher** outptr_QAbstractEventDispatcher, QObject** outptr_QObject); -void QAbstractEventDispatcher_new2(QObject* parent, QAbstractEventDispatcher** outptr_QAbstractEventDispatcher, QObject** outptr_QObject); QMetaObject* QAbstractEventDispatcher_MetaObject(const QAbstractEventDispatcher* self); void* QAbstractEventDispatcher_Metacast(QAbstractEventDispatcher* self, const char* param1); struct miqt_string QAbstractEventDispatcher_Tr(const char* s); @@ -80,48 +70,6 @@ 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_override_virtual_ProcessEvents(void* self, intptr_t slot); -bool QAbstractEventDispatcher_virtualbase_ProcessEvents(void* self, int flags); -void QAbstractEventDispatcher_override_virtual_HasPendingEvents(void* self, intptr_t slot); -bool QAbstractEventDispatcher_virtualbase_HasPendingEvents(void* self); -void QAbstractEventDispatcher_override_virtual_RegisterSocketNotifier(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_RegisterSocketNotifier(void* self, QSocketNotifier* notifier); -void QAbstractEventDispatcher_override_virtual_UnregisterSocketNotifier(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_UnregisterSocketNotifier(void* self, QSocketNotifier* notifier); -void QAbstractEventDispatcher_override_virtual_RegisterTimer2(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_RegisterTimer2(void* self, int timerId, int interval, int timerType, QObject* object); -void QAbstractEventDispatcher_override_virtual_UnregisterTimer(void* self, intptr_t slot); -bool QAbstractEventDispatcher_virtualbase_UnregisterTimer(void* self, int timerId); -void QAbstractEventDispatcher_override_virtual_UnregisterTimers(void* self, intptr_t slot); -bool QAbstractEventDispatcher_virtualbase_UnregisterTimers(void* self, QObject* object); -void QAbstractEventDispatcher_override_virtual_RegisteredTimers(void* self, intptr_t slot); -struct miqt_array /* of QAbstractEventDispatcher__TimerInfo* */ QAbstractEventDispatcher_virtualbase_RegisteredTimers(const void* self, QObject* object); -void QAbstractEventDispatcher_override_virtual_RemainingTime(void* self, intptr_t slot); -int QAbstractEventDispatcher_virtualbase_RemainingTime(void* self, int timerId); -void QAbstractEventDispatcher_override_virtual_WakeUp(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_WakeUp(void* self); -void QAbstractEventDispatcher_override_virtual_Interrupt(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_Interrupt(void* self); -void QAbstractEventDispatcher_override_virtual_Flush(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_Flush(void* self); -void QAbstractEventDispatcher_override_virtual_StartingUp(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_StartingUp(void* self); -void QAbstractEventDispatcher_override_virtual_ClosingDown(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_ClosingDown(void* self); -void QAbstractEventDispatcher_override_virtual_Event(void* self, intptr_t slot); -bool QAbstractEventDispatcher_virtualbase_Event(void* self, QEvent* event); -void QAbstractEventDispatcher_override_virtual_EventFilter(void* self, intptr_t slot); -bool QAbstractEventDispatcher_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); -void QAbstractEventDispatcher_override_virtual_TimerEvent(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_TimerEvent(void* self, QTimerEvent* event); -void QAbstractEventDispatcher_override_virtual_ChildEvent(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_ChildEvent(void* self, QChildEvent* event); -void QAbstractEventDispatcher_override_virtual_CustomEvent(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_CustomEvent(void* self, QEvent* event); -void QAbstractEventDispatcher_override_virtual_ConnectNotify(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); -void QAbstractEventDispatcher_override_virtual_DisconnectNotify(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubclass); void QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t, QAbstractEventDispatcher__TimerInfo** outptr_QAbstractEventDispatcher__TimerInfo); diff --git a/qt6/gen_qabstracteventdispatcher.cpp b/qt6/gen_qabstracteventdispatcher.cpp index ec40b5a8..86e8893c 100644 --- a/qt6/gen_qabstracteventdispatcher.cpp +++ b/qt6/gen_qabstracteventdispatcher.cpp @@ -2,10 +2,7 @@ #define WORKAROUND_INNER_CLASS_DEFINITION_QAbstractEventDispatcher__TimerInfo #include #include -#include -#include #include -#include #include #include #include @@ -13,420 +10,10 @@ #include #include #include -#include #include #include "gen_qabstracteventdispatcher.h" #include "_cgo_export.h" -class MiqtVirtualQAbstractEventDispatcher : public virtual QAbstractEventDispatcher { -public: - - MiqtVirtualQAbstractEventDispatcher(): QAbstractEventDispatcher() {}; - MiqtVirtualQAbstractEventDispatcher(QObject* parent): QAbstractEventDispatcher(parent) {}; - - virtual ~MiqtVirtualQAbstractEventDispatcher() = default; - - // cgo.Handle value for overwritten implementation - intptr_t handle__ProcessEvents = 0; - - // Subclass to allow providing a Go implementation - virtual bool processEvents(QEventLoop::ProcessEventsFlags flags) override { - if (handle__ProcessEvents == 0) { - return false; // Pure virtual, there is no base we can call - } - - QEventLoop::ProcessEventsFlags flags_ret = flags; - int sigval1 = static_cast(flags_ret); - - bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_ProcessEvents(this, handle__ProcessEvents, sigval1); - - return callback_return_value; - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__RegisterSocketNotifier = 0; - - // Subclass to allow providing a Go implementation - virtual void registerSocketNotifier(QSocketNotifier* notifier) override { - if (handle__RegisterSocketNotifier == 0) { - return; // Pure virtual, there is no base we can call - } - - QSocketNotifier* sigval1 = notifier; - - miqt_exec_callback_QAbstractEventDispatcher_RegisterSocketNotifier(this, handle__RegisterSocketNotifier, sigval1); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__UnregisterSocketNotifier = 0; - - // Subclass to allow providing a Go implementation - virtual void unregisterSocketNotifier(QSocketNotifier* notifier) override { - if (handle__UnregisterSocketNotifier == 0) { - return; // Pure virtual, there is no base we can call - } - - QSocketNotifier* sigval1 = notifier; - - miqt_exec_callback_QAbstractEventDispatcher_UnregisterSocketNotifier(this, handle__UnregisterSocketNotifier, sigval1); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__RegisterTimer2 = 0; - - // Subclass to allow providing a Go implementation - virtual void registerTimer(int timerId, qint64 interval, Qt::TimerType timerType, QObject* object) override { - if (handle__RegisterTimer2 == 0) { - return; // Pure virtual, there is no base we can call - } - - int sigval1 = timerId; - qint64 interval_ret = interval; - long long sigval2 = static_cast(interval_ret); - Qt::TimerType timerType_ret = timerType; - int sigval3 = static_cast(timerType_ret); - QObject* sigval4 = object; - - miqt_exec_callback_QAbstractEventDispatcher_RegisterTimer2(this, handle__RegisterTimer2, sigval1, sigval2, sigval3, sigval4); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__UnregisterTimer = 0; - - // Subclass to allow providing a Go implementation - virtual bool unregisterTimer(int timerId) override { - if (handle__UnregisterTimer == 0) { - return false; // Pure virtual, there is no base we can call - } - - int sigval1 = timerId; - - bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimer(this, handle__UnregisterTimer, sigval1); - - return callback_return_value; - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__UnregisterTimers = 0; - - // Subclass to allow providing a Go implementation - virtual bool unregisterTimers(QObject* object) override { - if (handle__UnregisterTimers == 0) { - return false; // Pure virtual, there is no base we can call - } - - QObject* sigval1 = object; - - bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimers(this, handle__UnregisterTimers, sigval1); - - return callback_return_value; - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__RegisteredTimers = 0; - - // Subclass to allow providing a Go implementation - virtual QList registeredTimers(QObject* object) const override { - if (handle__RegisteredTimers == 0) { - return QList(); // Pure virtual, there is no base we can call - } - - QObject* sigval1 = object; - - struct miqt_array /* of QAbstractEventDispatcher__TimerInfo* */ callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_RegisteredTimers(const_cast(this), handle__RegisteredTimers, sigval1); - QList callback_return_value_QList; - callback_return_value_QList.reserve(callback_return_value.len); - QAbstractEventDispatcher__TimerInfo** 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; - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__RemainingTime = 0; - - // Subclass to allow providing a Go implementation - virtual int remainingTime(int timerId) override { - if (handle__RemainingTime == 0) { - return 0; // Pure virtual, there is no base we can call - } - - int sigval1 = timerId; - - int callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_RemainingTime(this, handle__RemainingTime, sigval1); - - return static_cast(callback_return_value); - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__WakeUp = 0; - - // Subclass to allow providing a Go implementation - virtual void wakeUp() override { - if (handle__WakeUp == 0) { - return; // Pure virtual, there is no base we can call - } - - - miqt_exec_callback_QAbstractEventDispatcher_WakeUp(this, handle__WakeUp); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__Interrupt = 0; - - // Subclass to allow providing a Go implementation - virtual void interrupt() override { - if (handle__Interrupt == 0) { - return; // Pure virtual, there is no base we can call - } - - - miqt_exec_callback_QAbstractEventDispatcher_Interrupt(this, handle__Interrupt); - - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__StartingUp = 0; - - // Subclass to allow providing a Go implementation - virtual void startingUp() override { - if (handle__StartingUp == 0) { - QAbstractEventDispatcher::startingUp(); - return; - } - - - miqt_exec_callback_QAbstractEventDispatcher_StartingUp(this, handle__StartingUp); - - - } - - // Wrapper to allow calling protected method - void virtualbase_StartingUp() { - - QAbstractEventDispatcher::startingUp(); - - } - - // cgo.Handle value for overwritten implementation - intptr_t handle__ClosingDown = 0; - - // Subclass to allow providing a Go implementation - virtual void closingDown() override { - if (handle__ClosingDown == 0) { - QAbstractEventDispatcher::closingDown(); - return; - } - - - miqt_exec_callback_QAbstractEventDispatcher_ClosingDown(this, handle__ClosingDown); - - - } - - // Wrapper to allow calling protected method - void virtualbase_ClosingDown() { - - QAbstractEventDispatcher::closingDown(); - - } - - // 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 QAbstractEventDispatcher::event(event); - } - - QEvent* sigval1 = event; - - bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_Event(this, handle__Event, sigval1); - - return callback_return_value; - } - - // Wrapper to allow calling protected method - bool virtualbase_Event(QEvent* event) { - - return QAbstractEventDispatcher::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 QAbstractEventDispatcher::eventFilter(watched, event); - } - - QObject* sigval1 = watched; - QEvent* sigval2 = event; - - bool callback_return_value = miqt_exec_callback_QAbstractEventDispatcher_EventFilter(this, handle__EventFilter, sigval1, sigval2); - - return callback_return_value; - } - - // Wrapper to allow calling protected method - bool virtualbase_EventFilter(QObject* watched, QEvent* event) { - - return QAbstractEventDispatcher::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) { - QAbstractEventDispatcher::timerEvent(event); - return; - } - - QTimerEvent* sigval1 = event; - - miqt_exec_callback_QAbstractEventDispatcher_TimerEvent(this, handle__TimerEvent, sigval1); - - - } - - // Wrapper to allow calling protected method - void virtualbase_TimerEvent(QTimerEvent* event) { - - QAbstractEventDispatcher::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) { - QAbstractEventDispatcher::childEvent(event); - return; - } - - QChildEvent* sigval1 = event; - - miqt_exec_callback_QAbstractEventDispatcher_ChildEvent(this, handle__ChildEvent, sigval1); - - - } - - // Wrapper to allow calling protected method - void virtualbase_ChildEvent(QChildEvent* event) { - - QAbstractEventDispatcher::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) { - QAbstractEventDispatcher::customEvent(event); - return; - } - - QEvent* sigval1 = event; - - miqt_exec_callback_QAbstractEventDispatcher_CustomEvent(this, handle__CustomEvent, sigval1); - - - } - - // Wrapper to allow calling protected method - void virtualbase_CustomEvent(QEvent* event) { - - QAbstractEventDispatcher::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) { - QAbstractEventDispatcher::connectNotify(signal); - return; - } - - const QMetaMethod& signal_ret = signal; - // Cast returned reference into pointer - QMetaMethod* sigval1 = const_cast(&signal_ret); - - miqt_exec_callback_QAbstractEventDispatcher_ConnectNotify(this, handle__ConnectNotify, sigval1); - - - } - - // Wrapper to allow calling protected method - void virtualbase_ConnectNotify(QMetaMethod* signal) { - - QAbstractEventDispatcher::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) { - QAbstractEventDispatcher::disconnectNotify(signal); - return; - } - - const QMetaMethod& signal_ret = signal; - // Cast returned reference into pointer - QMetaMethod* sigval1 = const_cast(&signal_ret); - - miqt_exec_callback_QAbstractEventDispatcher_DisconnectNotify(this, handle__DisconnectNotify, sigval1); - - - } - - // Wrapper to allow calling protected method - void virtualbase_DisconnectNotify(QMetaMethod* signal) { - - QAbstractEventDispatcher::disconnectNotify(*signal); - - } - -}; - -void QAbstractEventDispatcher_new(QAbstractEventDispatcher** outptr_QAbstractEventDispatcher, QObject** outptr_QObject) { - MiqtVirtualQAbstractEventDispatcher* ret = new MiqtVirtualQAbstractEventDispatcher(); - *outptr_QAbstractEventDispatcher = ret; - *outptr_QObject = static_cast(ret); -} - -void QAbstractEventDispatcher_new2(QObject* parent, QAbstractEventDispatcher** outptr_QAbstractEventDispatcher, QObject** outptr_QObject) { - MiqtVirtualQAbstractEventDispatcher* ret = new MiqtVirtualQAbstractEventDispatcher(parent); - *outptr_QAbstractEventDispatcher = ret; - *outptr_QObject = static_cast(ret); -} - QMetaObject* QAbstractEventDispatcher_MetaObject(const QAbstractEventDispatcher* self) { return (QMetaObject*) self->metaObject(); } @@ -529,7 +116,7 @@ void QAbstractEventDispatcher_AboutToBlock(QAbstractEventDispatcher* self) { } void QAbstractEventDispatcher_connect_AboutToBlock(QAbstractEventDispatcher* self, intptr_t slot) { - MiqtVirtualQAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::aboutToBlock), self, [=]() { + QAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::aboutToBlock), self, [=]() { miqt_exec_callback_QAbstractEventDispatcher_AboutToBlock(slot); }); } @@ -539,7 +126,7 @@ void QAbstractEventDispatcher_Awake(QAbstractEventDispatcher* self) { } void QAbstractEventDispatcher_connect_Awake(QAbstractEventDispatcher* self, intptr_t slot) { - MiqtVirtualQAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::awake), self, [=]() { + QAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::awake), self, [=]() { miqt_exec_callback_QAbstractEventDispatcher_Awake(slot); }); } @@ -570,121 +157,9 @@ QAbstractEventDispatcher* QAbstractEventDispatcher_Instance1(QThread* thread) { return QAbstractEventDispatcher::instance(thread); } -void QAbstractEventDispatcher_override_virtual_ProcessEvents(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__ProcessEvents = slot; -} - -void QAbstractEventDispatcher_override_virtual_RegisterSocketNotifier(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__RegisterSocketNotifier = slot; -} - -void QAbstractEventDispatcher_override_virtual_UnregisterSocketNotifier(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__UnregisterSocketNotifier = slot; -} - -void QAbstractEventDispatcher_override_virtual_RegisterTimer2(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__RegisterTimer2 = slot; -} - -void QAbstractEventDispatcher_override_virtual_UnregisterTimer(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__UnregisterTimer = slot; -} - -void QAbstractEventDispatcher_override_virtual_UnregisterTimers(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__UnregisterTimers = slot; -} - -void QAbstractEventDispatcher_override_virtual_RegisteredTimers(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__RegisteredTimers = slot; -} - -void QAbstractEventDispatcher_override_virtual_RemainingTime(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__RemainingTime = slot; -} - -void QAbstractEventDispatcher_override_virtual_WakeUp(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__WakeUp = slot; -} - -void QAbstractEventDispatcher_override_virtual_Interrupt(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__Interrupt = slot; -} - -void QAbstractEventDispatcher_override_virtual_StartingUp(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__StartingUp = slot; -} - -void QAbstractEventDispatcher_virtualbase_StartingUp(void* self) { - ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_StartingUp(); -} - -void QAbstractEventDispatcher_override_virtual_ClosingDown(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__ClosingDown = slot; -} - -void QAbstractEventDispatcher_virtualbase_ClosingDown(void* self) { - ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_ClosingDown(); -} - -void QAbstractEventDispatcher_override_virtual_Event(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__Event = slot; -} - -bool QAbstractEventDispatcher_virtualbase_Event(void* self, QEvent* event) { - return ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_Event(event); -} - -void QAbstractEventDispatcher_override_virtual_EventFilter(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__EventFilter = slot; -} - -bool QAbstractEventDispatcher_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { - return ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_EventFilter(watched, event); -} - -void QAbstractEventDispatcher_override_virtual_TimerEvent(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__TimerEvent = slot; -} - -void QAbstractEventDispatcher_virtualbase_TimerEvent(void* self, QTimerEvent* event) { - ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_TimerEvent(event); -} - -void QAbstractEventDispatcher_override_virtual_ChildEvent(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__ChildEvent = slot; -} - -void QAbstractEventDispatcher_virtualbase_ChildEvent(void* self, QChildEvent* event) { - ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_ChildEvent(event); -} - -void QAbstractEventDispatcher_override_virtual_CustomEvent(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__CustomEvent = slot; -} - -void QAbstractEventDispatcher_virtualbase_CustomEvent(void* self, QEvent* event) { - ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_CustomEvent(event); -} - -void QAbstractEventDispatcher_override_virtual_ConnectNotify(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__ConnectNotify = slot; -} - -void QAbstractEventDispatcher_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { - ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_ConnectNotify(signal); -} - -void QAbstractEventDispatcher_override_virtual_DisconnectNotify(void* self, intptr_t slot) { - dynamic_cast( (QAbstractEventDispatcher*)(self) )->handle__DisconnectNotify = slot; -} - -void QAbstractEventDispatcher_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { - ( (MiqtVirtualQAbstractEventDispatcher*)(self) )->virtualbase_DisconnectNotify(signal); -} - void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubclass) { if (isSubclass) { - delete dynamic_cast( self ); + delete dynamic_cast( self ); } else { delete self; } diff --git a/qt6/gen_qabstracteventdispatcher.go b/qt6/gen_qabstracteventdispatcher.go index e4f6d85d..2b19cfd9 100644 --- a/qt6/gen_qabstracteventdispatcher.go +++ b/qt6/gen_qabstracteventdispatcher.go @@ -53,28 +53,6 @@ func UnsafeNewQAbstractEventDispatcher(h unsafe.Pointer, h_QObject unsafe.Pointe QObject: UnsafeNewQObject(h_QObject)} } -// NewQAbstractEventDispatcher constructs a new QAbstractEventDispatcher object. -func NewQAbstractEventDispatcher() *QAbstractEventDispatcher { - var outptr_QAbstractEventDispatcher *C.QAbstractEventDispatcher = nil - var outptr_QObject *C.QObject = nil - - C.QAbstractEventDispatcher_new(&outptr_QAbstractEventDispatcher, &outptr_QObject) - ret := newQAbstractEventDispatcher(outptr_QAbstractEventDispatcher, outptr_QObject) - ret.isSubclass = true - return ret -} - -// NewQAbstractEventDispatcher2 constructs a new QAbstractEventDispatcher object. -func NewQAbstractEventDispatcher2(parent *QObject) *QAbstractEventDispatcher { - var outptr_QAbstractEventDispatcher *C.QAbstractEventDispatcher = nil - var outptr_QObject *C.QObject = nil - - C.QAbstractEventDispatcher_new2(parent.cPointer(), &outptr_QAbstractEventDispatcher, &outptr_QObject) - ret := newQAbstractEventDispatcher(outptr_QAbstractEventDispatcher, outptr_QObject) - ret.isSubclass = true - return ret -} - func (this *QAbstractEventDispatcher) MetaObject() *QMetaObject { return UnsafeNewQMetaObject(unsafe.Pointer(C.QAbstractEventDispatcher_MetaObject(this.h))) } @@ -233,398 +211,6 @@ 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())), nil) } -func (this *QAbstractEventDispatcher) OnProcessEvents(slot func(flags QEventLoop__ProcessEventsFlag) bool) { - C.QAbstractEventDispatcher_override_virtual_ProcessEvents(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_ProcessEvents -func miqt_exec_callback_QAbstractEventDispatcher_ProcessEvents(self *C.QAbstractEventDispatcher, cb C.intptr_t, flags C.int) C.bool { - gofunc, ok := cgo.Handle(cb).Value().(func(flags QEventLoop__ProcessEventsFlag) bool) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (QEventLoop__ProcessEventsFlag)(flags) - - virtualReturn := gofunc(slotval1) - - return (C.bool)(virtualReturn) - -} -func (this *QAbstractEventDispatcher) OnRegisterSocketNotifier(slot func(notifier *QSocketNotifier)) { - C.QAbstractEventDispatcher_override_virtual_RegisterSocketNotifier(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_RegisterSocketNotifier -func miqt_exec_callback_QAbstractEventDispatcher_RegisterSocketNotifier(self *C.QAbstractEventDispatcher, cb C.intptr_t, notifier *C.QSocketNotifier) { - gofunc, ok := cgo.Handle(cb).Value().(func(notifier *QSocketNotifier)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQSocketNotifier(unsafe.Pointer(notifier), nil) - - gofunc(slotval1) - -} -func (this *QAbstractEventDispatcher) OnUnregisterSocketNotifier(slot func(notifier *QSocketNotifier)) { - C.QAbstractEventDispatcher_override_virtual_UnregisterSocketNotifier(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_UnregisterSocketNotifier -func miqt_exec_callback_QAbstractEventDispatcher_UnregisterSocketNotifier(self *C.QAbstractEventDispatcher, cb C.intptr_t, notifier *C.QSocketNotifier) { - gofunc, ok := cgo.Handle(cb).Value().(func(notifier *QSocketNotifier)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQSocketNotifier(unsafe.Pointer(notifier), nil) - - gofunc(slotval1) - -} -func (this *QAbstractEventDispatcher) OnRegisterTimer2(slot func(timerId int, interval int64, timerType TimerType, object *QObject)) { - C.QAbstractEventDispatcher_override_virtual_RegisterTimer2(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_RegisterTimer2 -func miqt_exec_callback_QAbstractEventDispatcher_RegisterTimer2(self *C.QAbstractEventDispatcher, cb C.intptr_t, timerId C.int, interval C.longlong, timerType C.int, object *C.QObject) { - gofunc, ok := cgo.Handle(cb).Value().(func(timerId int, interval int64, timerType TimerType, object *QObject)) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (int)(timerId) - - slotval2 := (int64)(interval) - - slotval3 := (TimerType)(timerType) - - slotval4 := UnsafeNewQObject(unsafe.Pointer(object)) - - gofunc(slotval1, slotval2, slotval3, slotval4) - -} -func (this *QAbstractEventDispatcher) OnUnregisterTimer(slot func(timerId int) bool) { - C.QAbstractEventDispatcher_override_virtual_UnregisterTimer(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimer -func miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimer(self *C.QAbstractEventDispatcher, cb C.intptr_t, timerId C.int) C.bool { - gofunc, ok := cgo.Handle(cb).Value().(func(timerId int) bool) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (int)(timerId) - - virtualReturn := gofunc(slotval1) - - return (C.bool)(virtualReturn) - -} -func (this *QAbstractEventDispatcher) OnUnregisterTimers(slot func(object *QObject) bool) { - C.QAbstractEventDispatcher_override_virtual_UnregisterTimers(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimers -func miqt_exec_callback_QAbstractEventDispatcher_UnregisterTimers(self *C.QAbstractEventDispatcher, cb C.intptr_t, object *C.QObject) C.bool { - gofunc, ok := cgo.Handle(cb).Value().(func(object *QObject) bool) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) - - virtualReturn := gofunc(slotval1) - - return (C.bool)(virtualReturn) - -} -func (this *QAbstractEventDispatcher) OnRegisteredTimers(slot func(object *QObject) []QAbstractEventDispatcher__TimerInfo) { - C.QAbstractEventDispatcher_override_virtual_RegisteredTimers(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_RegisteredTimers -func miqt_exec_callback_QAbstractEventDispatcher_RegisteredTimers(self *C.QAbstractEventDispatcher, cb C.intptr_t, object *C.QObject) C.struct_miqt_array { - gofunc, ok := cgo.Handle(cb).Value().(func(object *QObject) []QAbstractEventDispatcher__TimerInfo) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := UnsafeNewQObject(unsafe.Pointer(object)) - - virtualReturn := gofunc(slotval1) - virtualReturn_CArray := (*[0xffff]*C.QAbstractEventDispatcher__TimerInfo)(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 *QAbstractEventDispatcher) OnRemainingTime(slot func(timerId int) int) { - C.QAbstractEventDispatcher_override_virtual_RemainingTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_RemainingTime -func miqt_exec_callback_QAbstractEventDispatcher_RemainingTime(self *C.QAbstractEventDispatcher, cb C.intptr_t, timerId C.int) C.int { - gofunc, ok := cgo.Handle(cb).Value().(func(timerId int) int) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - // Convert all CABI parameters to Go parameters - slotval1 := (int)(timerId) - - virtualReturn := gofunc(slotval1) - - return (C.int)(virtualReturn) - -} -func (this *QAbstractEventDispatcher) OnWakeUp(slot func()) { - C.QAbstractEventDispatcher_override_virtual_WakeUp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_WakeUp -func miqt_exec_callback_QAbstractEventDispatcher_WakeUp(self *C.QAbstractEventDispatcher, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func()) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc() - -} -func (this *QAbstractEventDispatcher) OnInterrupt(slot func()) { - C.QAbstractEventDispatcher_override_virtual_Interrupt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_Interrupt -func miqt_exec_callback_QAbstractEventDispatcher_Interrupt(self *C.QAbstractEventDispatcher, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func()) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc() - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_StartingUp() { - - C.QAbstractEventDispatcher_virtualbase_StartingUp(unsafe.Pointer(this.h)) - -} -func (this *QAbstractEventDispatcher) OnStartingUp(slot func(super func())) { - C.QAbstractEventDispatcher_override_virtual_StartingUp(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_StartingUp -func miqt_exec_callback_QAbstractEventDispatcher_StartingUp(self *C.QAbstractEventDispatcher, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func(super func())) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc((&QAbstractEventDispatcher{h: self}).callVirtualBase_StartingUp) - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_ClosingDown() { - - C.QAbstractEventDispatcher_virtualbase_ClosingDown(unsafe.Pointer(this.h)) - -} -func (this *QAbstractEventDispatcher) OnClosingDown(slot func(super func())) { - C.QAbstractEventDispatcher_override_virtual_ClosingDown(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_ClosingDown -func miqt_exec_callback_QAbstractEventDispatcher_ClosingDown(self *C.QAbstractEventDispatcher, cb C.intptr_t) { - gofunc, ok := cgo.Handle(cb).Value().(func(super func())) - if !ok { - panic("miqt: callback of non-callback type (heap corruption?)") - } - - gofunc((&QAbstractEventDispatcher{h: self}).callVirtualBase_ClosingDown) - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_Event(event *QEvent) bool { - - return (bool)(C.QAbstractEventDispatcher_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer())) - -} -func (this *QAbstractEventDispatcher) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) { - C.QAbstractEventDispatcher_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_Event -func miqt_exec_callback_QAbstractEventDispatcher_Event(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_Event, slotval1) - - return (C.bool)(virtualReturn) - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool { - - return (bool)(C.QAbstractEventDispatcher_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer())) - -} -func (this *QAbstractEventDispatcher) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) { - C.QAbstractEventDispatcher_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_EventFilter -func miqt_exec_callback_QAbstractEventDispatcher_EventFilter(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) - - return (C.bool)(virtualReturn) - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_TimerEvent(event *QTimerEvent) { - - C.QAbstractEventDispatcher_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer()) - -} -func (this *QAbstractEventDispatcher) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) { - C.QAbstractEventDispatcher_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_TimerEvent -func miqt_exec_callback_QAbstractEventDispatcher_TimerEvent(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_TimerEvent, slotval1) - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_ChildEvent(event *QChildEvent) { - - C.QAbstractEventDispatcher_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer()) - -} -func (this *QAbstractEventDispatcher) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) { - C.QAbstractEventDispatcher_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_ChildEvent -func miqt_exec_callback_QAbstractEventDispatcher_ChildEvent(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_ChildEvent, slotval1) - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_CustomEvent(event *QEvent) { - - C.QAbstractEventDispatcher_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer()) - -} -func (this *QAbstractEventDispatcher) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) { - C.QAbstractEventDispatcher_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_CustomEvent -func miqt_exec_callback_QAbstractEventDispatcher_CustomEvent(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_CustomEvent, slotval1) - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_ConnectNotify(signal *QMetaMethod) { - - C.QAbstractEventDispatcher_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer()) - -} -func (this *QAbstractEventDispatcher) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { - C.QAbstractEventDispatcher_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_ConnectNotify -func miqt_exec_callback_QAbstractEventDispatcher_ConnectNotify(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_ConnectNotify, slotval1) - -} - -func (this *QAbstractEventDispatcher) callVirtualBase_DisconnectNotify(signal *QMetaMethod) { - - C.QAbstractEventDispatcher_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer()) - -} -func (this *QAbstractEventDispatcher) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) { - C.QAbstractEventDispatcher_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) -} - -//export miqt_exec_callback_QAbstractEventDispatcher_DisconnectNotify -func miqt_exec_callback_QAbstractEventDispatcher_DisconnectNotify(self *C.QAbstractEventDispatcher, 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((&QAbstractEventDispatcher{h: self}).callVirtualBase_DisconnectNotify, slotval1) - -} // Delete this object from C++ memory. func (this *QAbstractEventDispatcher) Delete() { diff --git a/qt6/gen_qabstracteventdispatcher.h b/qt6/gen_qabstracteventdispatcher.h index fbbc86af..7e1f541e 100644 --- a/qt6/gen_qabstracteventdispatcher.h +++ b/qt6/gen_qabstracteventdispatcher.h @@ -23,31 +23,21 @@ class QAbstractEventDispatcher__TimerInfo; #endif class QAbstractNativeEventFilter; class QByteArray; -class QChildEvent; -class QEvent; -class QMetaMethod; class QMetaObject; class QObject; class QSocketNotifier; class QThread; -class QTimerEvent; #else typedef struct QAbstractEventDispatcher QAbstractEventDispatcher; typedef struct QAbstractEventDispatcher__TimerInfo QAbstractEventDispatcher__TimerInfo; typedef struct QAbstractNativeEventFilter QAbstractNativeEventFilter; typedef struct QByteArray QByteArray; -typedef struct QChildEvent QChildEvent; -typedef struct QEvent QEvent; -typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSocketNotifier QSocketNotifier; typedef struct QThread QThread; -typedef struct QTimerEvent QTimerEvent; #endif -void QAbstractEventDispatcher_new(QAbstractEventDispatcher** outptr_QAbstractEventDispatcher, QObject** outptr_QObject); -void QAbstractEventDispatcher_new2(QObject* parent, QAbstractEventDispatcher** outptr_QAbstractEventDispatcher, QObject** outptr_QObject); QMetaObject* QAbstractEventDispatcher_MetaObject(const QAbstractEventDispatcher* self); void* QAbstractEventDispatcher_Metacast(QAbstractEventDispatcher* self, const char* param1); struct miqt_string QAbstractEventDispatcher_Tr(const char* s); @@ -75,44 +65,6 @@ 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_override_virtual_ProcessEvents(void* self, intptr_t slot); -bool QAbstractEventDispatcher_virtualbase_ProcessEvents(void* self, int flags); -void QAbstractEventDispatcher_override_virtual_RegisterSocketNotifier(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_RegisterSocketNotifier(void* self, QSocketNotifier* notifier); -void QAbstractEventDispatcher_override_virtual_UnregisterSocketNotifier(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_UnregisterSocketNotifier(void* self, QSocketNotifier* notifier); -void QAbstractEventDispatcher_override_virtual_RegisterTimer2(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_RegisterTimer2(void* self, int timerId, long long interval, int timerType, QObject* object); -void QAbstractEventDispatcher_override_virtual_UnregisterTimer(void* self, intptr_t slot); -bool QAbstractEventDispatcher_virtualbase_UnregisterTimer(void* self, int timerId); -void QAbstractEventDispatcher_override_virtual_UnregisterTimers(void* self, intptr_t slot); -bool QAbstractEventDispatcher_virtualbase_UnregisterTimers(void* self, QObject* object); -void QAbstractEventDispatcher_override_virtual_RegisteredTimers(void* self, intptr_t slot); -struct miqt_array /* of QAbstractEventDispatcher__TimerInfo* */ QAbstractEventDispatcher_virtualbase_RegisteredTimers(const void* self, QObject* object); -void QAbstractEventDispatcher_override_virtual_RemainingTime(void* self, intptr_t slot); -int QAbstractEventDispatcher_virtualbase_RemainingTime(void* self, int timerId); -void QAbstractEventDispatcher_override_virtual_WakeUp(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_WakeUp(void* self); -void QAbstractEventDispatcher_override_virtual_Interrupt(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_Interrupt(void* self); -void QAbstractEventDispatcher_override_virtual_StartingUp(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_StartingUp(void* self); -void QAbstractEventDispatcher_override_virtual_ClosingDown(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_ClosingDown(void* self); -void QAbstractEventDispatcher_override_virtual_Event(void* self, intptr_t slot); -bool QAbstractEventDispatcher_virtualbase_Event(void* self, QEvent* event); -void QAbstractEventDispatcher_override_virtual_EventFilter(void* self, intptr_t slot); -bool QAbstractEventDispatcher_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); -void QAbstractEventDispatcher_override_virtual_TimerEvent(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_TimerEvent(void* self, QTimerEvent* event); -void QAbstractEventDispatcher_override_virtual_ChildEvent(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_ChildEvent(void* self, QChildEvent* event); -void QAbstractEventDispatcher_override_virtual_CustomEvent(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_CustomEvent(void* self, QEvent* event); -void QAbstractEventDispatcher_override_virtual_ConnectNotify(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); -void QAbstractEventDispatcher_override_virtual_DisconnectNotify(void* self, intptr_t slot); -void QAbstractEventDispatcher_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubclass); void QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t, QAbstractEventDispatcher__TimerInfo** outptr_QAbstractEventDispatcher__TimerInfo);