From 25e10f2824b0830d00b64741443f0192ed49277d Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 26 Nov 2024 19:52:29 +1300 Subject: [PATCH 01/12] genbindings/cabi: QFlags<>& use C-style cast --- cmd/genbindings/emitcabi.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index 663d7886..7b051134 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -299,7 +299,8 @@ func emitCABI2CppForwarding(p CppParameter, indent string) (preamble string, for p.ParameterType == "qulonglong" || p.GetQtCppType().ParameterType == "qintptr" || p.GetQtCppType().ParameterType == "qsizetype" || // Qt 6 qversionnumber.h: invalid ‘static_cast’ from type ‘ptrdiff_t*’ {aka ‘long int*’} to type ‘qsizetype*’ {aka ‘long long int*’} - p.ParameterType == "qint8" { + p.ParameterType == "qint8" || + (p.IsFlagType() && p.ByRef) { // QDataStream::operator>>() by reference (qint64) // QLockFile::getLockInfo() by pointer // QTextStream::operator>>() by reference (qlonglong + qulonglong) From fc47abea0ec732b8f3d47c3acb86d4a90a3cf5dd Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 26 Nov 2024 19:52:58 +1300 Subject: [PATCH 02/12] svg: add genbindings configuration --- cmd/genbindings/config-libraries.go | 26 ++++++++++++++++++++++++++ docker/genbindings.Dockerfile | 2 ++ 2 files changed, 28 insertions(+) diff --git a/cmd/genbindings/config-libraries.go b/cmd/genbindings/config-libraries.go index a7b66d2e..b70a1078 100644 --- a/cmd/genbindings/config-libraries.go +++ b/cmd/genbindings/config-libraries.go @@ -62,6 +62,18 @@ func ProcessLibraries(clangBin, outDir, extraLibsDir string) { ClangMatchSameHeaderDefinitionOnly, ) + generate( + "qt/svg", + []string{ + "/usr/include/x86_64-linux-gnu/qt5/QtSvg", + }, + AllowAllHeaders, + clangBin, + pkgConfigCflags("Qt5Svg"), + outDir, + ClangMatchSameHeaderDefinitionOnly, + ) + generate( "qt/network", []string{ @@ -173,6 +185,20 @@ func ProcessLibraries(clangBin, outDir, extraLibsDir string) { ClangMatchSameHeaderDefinitionOnly, ) + // Qt 6 SVG + generate( + "qt6/svg", + []string{ + "/usr/include/x86_64-linux-gnu/qt6/QtSvg", + "/usr/include/x86_64-linux-gnu/qt6/QtSvgWidgets", + }, + AllowAllHeaders, + clangBin, + "--std=c++17 "+pkgConfigCflags("Qt6SvgWidgets"), + outDir, + ClangMatchSameHeaderDefinitionOnly, + ) + // Qt 6 QtNetwork generate( "qt6/network", diff --git a/docker/genbindings.Dockerfile b/docker/genbindings.Dockerfile index 228f75af..2bcdd632 100644 --- a/docker/genbindings.Dockerfile +++ b/docker/genbindings.Dockerfile @@ -5,8 +5,10 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ golang-go \ qtbase5-dev \ qtmultimedia5-dev \ + libqt5svg5-dev \ qt6-base-dev \ qt6-multimedia-dev \ + qt6-svg-dev \ libqscintilla2-qt5-dev \ libqscintilla2-qt6-dev \ clang \ From 86a8f2b6b8bc89f5b5beed0fcde7e1014699f6cf Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 26 Nov 2024 19:54:46 +1300 Subject: [PATCH 03/12] svg: initial build --- qt/svg/cflags.go | 6 + qt/svg/gen_qgraphicssvgitem.cpp | 324 +++++++ qt/svg/gen_qgraphicssvgitem.go | 361 ++++++++ qt/svg/gen_qgraphicssvgitem.h | 82 ++ qt/svg/gen_qsvggenerator.cpp | 312 +++++++ qt/svg/gen_qsvggenerator.go | 310 +++++++ qt/svg/gen_qsvggenerator.h | 76 ++ qt/svg/gen_qsvgrenderer.cpp | 518 +++++++++++ qt/svg/gen_qsvgrenderer.go | 575 ++++++++++++ qt/svg/gen_qsvgrenderer.h | 114 +++ qt/svg/gen_qsvgwidget.cpp | 1487 ++++++++++++++++++++++++++++++ qt/svg/gen_qsvgwidget.go | 1193 ++++++++++++++++++++++++ qt/svg/gen_qsvgwidget.h | 188 ++++ qt6/svg/cflags.go | 6 + qt6/svg/gen_qgraphicssvgitem.cpp | 291 ++++++ qt6/svg/gen_qgraphicssvgitem.go | 330 +++++++ qt6/svg/gen_qgraphicssvgitem.h | 79 ++ qt6/svg/gen_qsvggenerator.cpp | 312 +++++++ qt6/svg/gen_qsvggenerator.go | 310 +++++++ qt6/svg/gen_qsvggenerator.h | 76 ++ qt6/svg/gen_qsvgrenderer.cpp | 479 ++++++++++ qt6/svg/gen_qsvgrenderer.go | 533 +++++++++++ qt6/svg/gen_qsvgrenderer.h | 108 +++ qt6/svg/gen_qsvgwidget.cpp | 1456 +++++++++++++++++++++++++++++ qt6/svg/gen_qsvgwidget.go | 1162 +++++++++++++++++++++++ qt6/svg/gen_qsvgwidget.h | 187 ++++ 26 files changed, 10875 insertions(+) create mode 100644 qt/svg/cflags.go create mode 100644 qt/svg/gen_qgraphicssvgitem.cpp create mode 100644 qt/svg/gen_qgraphicssvgitem.go create mode 100644 qt/svg/gen_qgraphicssvgitem.h create mode 100644 qt/svg/gen_qsvggenerator.cpp create mode 100644 qt/svg/gen_qsvggenerator.go create mode 100644 qt/svg/gen_qsvggenerator.h create mode 100644 qt/svg/gen_qsvgrenderer.cpp create mode 100644 qt/svg/gen_qsvgrenderer.go create mode 100644 qt/svg/gen_qsvgrenderer.h create mode 100644 qt/svg/gen_qsvgwidget.cpp create mode 100644 qt/svg/gen_qsvgwidget.go create mode 100644 qt/svg/gen_qsvgwidget.h create mode 100644 qt6/svg/cflags.go create mode 100644 qt6/svg/gen_qgraphicssvgitem.cpp create mode 100644 qt6/svg/gen_qgraphicssvgitem.go create mode 100644 qt6/svg/gen_qgraphicssvgitem.h create mode 100644 qt6/svg/gen_qsvggenerator.cpp create mode 100644 qt6/svg/gen_qsvggenerator.go create mode 100644 qt6/svg/gen_qsvggenerator.h create mode 100644 qt6/svg/gen_qsvgrenderer.cpp create mode 100644 qt6/svg/gen_qsvgrenderer.go create mode 100644 qt6/svg/gen_qsvgrenderer.h create mode 100644 qt6/svg/gen_qsvgwidget.cpp create mode 100644 qt6/svg/gen_qsvgwidget.go create mode 100644 qt6/svg/gen_qsvgwidget.h diff --git a/qt/svg/cflags.go b/qt/svg/cflags.go new file mode 100644 index 00000000..e9b3f840 --- /dev/null +++ b/qt/svg/cflags.go @@ -0,0 +1,6 @@ +package svg + +/* +#cgo pkg-config: Qt5Svg +*/ +import "C" diff --git a/qt/svg/gen_qgraphicssvgitem.cpp b/qt/svg/gen_qgraphicssvgitem.cpp new file mode 100644 index 00000000..8d846a90 --- /dev/null +++ b/qt/svg/gen_qgraphicssvgitem.cpp @@ -0,0 +1,324 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qgraphicssvgitem.h" +#include "_cgo_export.h" + +class MiqtVirtualQGraphicsSvgItem : public virtual QGraphicsSvgItem { +public: + + MiqtVirtualQGraphicsSvgItem(): QGraphicsSvgItem() {}; + MiqtVirtualQGraphicsSvgItem(const QString& fileName): QGraphicsSvgItem(fileName) {}; + MiqtVirtualQGraphicsSvgItem(QGraphicsItem* parentItem): QGraphicsSvgItem(parentItem) {}; + MiqtVirtualQGraphicsSvgItem(const QString& fileName, QGraphicsItem* parentItem): QGraphicsSvgItem(fileName, parentItem) {}; + + virtual ~MiqtVirtualQGraphicsSvgItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsSvgItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsSvgItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsSvgItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsSvgItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsSvgItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsSvgItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsSvgItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsSvgItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsSvgItem::type(); + + } + + // 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 QGraphicsSvgItem::event(ev); + } + + QEvent* sigval1 = ev; + + bool callback_return_value = miqt_exec_callback_QGraphicsSvgItem_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* ev) { + + return QGraphicsSvgItem::event(ev); + + } + +}; + +void QGraphicsSvgItem_new(QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsSvgItem* ret = new MiqtVirtualQGraphicsSvgItem(); + *outptr_QGraphicsSvgItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsSvgItem_new2(struct miqt_string fileName, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + MiqtVirtualQGraphicsSvgItem* ret = new MiqtVirtualQGraphicsSvgItem(fileName_QString); + *outptr_QGraphicsSvgItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsSvgItem_new3(QGraphicsItem* parentItem, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsSvgItem* ret = new MiqtVirtualQGraphicsSvgItem(parentItem); + *outptr_QGraphicsSvgItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsSvgItem_new4(struct miqt_string fileName, QGraphicsItem* parentItem, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + MiqtVirtualQGraphicsSvgItem* ret = new MiqtVirtualQGraphicsSvgItem(fileName_QString, parentItem); + *outptr_QGraphicsSvgItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +QMetaObject* QGraphicsSvgItem_MetaObject(const QGraphicsSvgItem* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QGraphicsSvgItem_Metacast(QGraphicsSvgItem* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QGraphicsSvgItem_Tr(const char* s) { + QString _ret = QGraphicsSvgItem::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QGraphicsSvgItem_TrUtf8(const char* s) { + QString _ret = QGraphicsSvgItem::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QGraphicsSvgItem_SetSharedRenderer(QGraphicsSvgItem* self, QSvgRenderer* renderer) { + self->setSharedRenderer(renderer); +} + +QSvgRenderer* QGraphicsSvgItem_Renderer(const QGraphicsSvgItem* self) { + return self->renderer(); +} + +void QGraphicsSvgItem_SetElementId(QGraphicsSvgItem* self, struct miqt_string id) { + QString id_QString = QString::fromUtf8(id.data, id.len); + self->setElementId(id_QString); +} + +struct miqt_string QGraphicsSvgItem_ElementId(const QGraphicsSvgItem* self) { + QString _ret = self->elementId(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QGraphicsSvgItem_SetCachingEnabled(QGraphicsSvgItem* self, bool cachingEnabled) { + self->setCachingEnabled(cachingEnabled); +} + +bool QGraphicsSvgItem_IsCachingEnabled(const QGraphicsSvgItem* self) { + return self->isCachingEnabled(); +} + +void QGraphicsSvgItem_SetMaximumCacheSize(QGraphicsSvgItem* self, QSize* size) { + self->setMaximumCacheSize(*size); +} + +QSize* QGraphicsSvgItem_MaximumCacheSize(const QGraphicsSvgItem* self) { + return new QSize(self->maximumCacheSize()); +} + +QRectF* QGraphicsSvgItem_BoundingRect(const QGraphicsSvgItem* self) { + return new QRectF(self->boundingRect()); +} + +void QGraphicsSvgItem_Paint(QGraphicsSvgItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); +} + +int QGraphicsSvgItem_Type(const QGraphicsSvgItem* self) { + return self->type(); +} + +struct miqt_string QGraphicsSvgItem_Tr2(const char* s, const char* c) { + QString _ret = QGraphicsSvgItem::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QGraphicsSvgItem_Tr3(const char* s, const char* c, int n) { + QString _ret = QGraphicsSvgItem::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QGraphicsSvgItem_TrUtf82(const char* s, const char* c) { + QString _ret = QGraphicsSvgItem::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QGraphicsSvgItem_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QGraphicsSvgItem::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QGraphicsSvgItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSvgItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsSvgItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsSvgItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsSvgItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSvgItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsSvgItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsSvgItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsSvgItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSvgItem*)(self) )->handle__Type = slot; +} + +int QGraphicsSvgItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsSvgItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsSvgItem_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSvgItem*)(self) )->handle__Event = slot; +} + +bool QGraphicsSvgItem_virtualbase_Event(void* self, QEvent* ev) { + return ( (MiqtVirtualQGraphicsSvgItem*)(self) )->virtualbase_Event(ev); +} + +void QGraphicsSvgItem_Delete(QGraphicsSvgItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/svg/gen_qgraphicssvgitem.go b/qt/svg/gen_qgraphicssvgitem.go new file mode 100644 index 00000000..c2c6ed8c --- /dev/null +++ b/qt/svg/gen_qgraphicssvgitem.go @@ -0,0 +1,361 @@ +package svg + +/* + +#include "gen_qgraphicssvgitem.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QGraphicsSvgItem__ int + +const ( + QGraphicsSvgItem__Type QGraphicsSvgItem__ = 13 +) + +type QGraphicsSvgItem struct { + h *C.QGraphicsSvgItem + isSubclass bool + *qt.QGraphicsObject +} + +func (this *QGraphicsSvgItem) cPointer() *C.QGraphicsSvgItem { + if this == nil { + return nil + } + return this.h +} + +func (this *QGraphicsSvgItem) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQGraphicsSvgItem constructs the type using only CGO pointers. +func newQGraphicsSvgItem(h *C.QGraphicsSvgItem, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsSvgItem { + if h == nil { + return nil + } + return &QGraphicsSvgItem{h: h, + QGraphicsObject: qt.UnsafeNewQGraphicsObject(unsafe.Pointer(h_QGraphicsObject), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QGraphicsItem))} +} + +// UnsafeNewQGraphicsSvgItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSvgItem(h unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsSvgItem { + if h == nil { + return nil + } + + return &QGraphicsSvgItem{h: (*C.QGraphicsSvgItem)(h), + QGraphicsObject: qt.UnsafeNewQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem)} +} + +// NewQGraphicsSvgItem constructs a new QGraphicsSvgItem object. +func NewQGraphicsSvgItem() *QGraphicsSvgItem { + var outptr_QGraphicsSvgItem *C.QGraphicsSvgItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsSvgItem_new(&outptr_QGraphicsSvgItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsSvgItem(outptr_QGraphicsSvgItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsSvgItem2 constructs a new QGraphicsSvgItem object. +func NewQGraphicsSvgItem2(fileName string) *QGraphicsSvgItem { + 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)) + var outptr_QGraphicsSvgItem *C.QGraphicsSvgItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsSvgItem_new2(fileName_ms, &outptr_QGraphicsSvgItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsSvgItem(outptr_QGraphicsSvgItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsSvgItem3 constructs a new QGraphicsSvgItem object. +func NewQGraphicsSvgItem3(parentItem *qt.QGraphicsItem) *QGraphicsSvgItem { + var outptr_QGraphicsSvgItem *C.QGraphicsSvgItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsSvgItem_new3((*C.QGraphicsItem)(parentItem.UnsafePointer()), &outptr_QGraphicsSvgItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsSvgItem(outptr_QGraphicsSvgItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsSvgItem4 constructs a new QGraphicsSvgItem object. +func NewQGraphicsSvgItem4(fileName string, parentItem *qt.QGraphicsItem) *QGraphicsSvgItem { + 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)) + var outptr_QGraphicsSvgItem *C.QGraphicsSvgItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsSvgItem_new4(fileName_ms, (*C.QGraphicsItem)(parentItem.UnsafePointer()), &outptr_QGraphicsSvgItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsSvgItem(outptr_QGraphicsSvgItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +func (this *QGraphicsSvgItem) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QGraphicsSvgItem_MetaObject(this.h))) +} + +func (this *QGraphicsSvgItem) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QGraphicsSvgItem_Metacast(this.h, param1_Cstring)) +} + +func QGraphicsSvgItem_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsSvgItem_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QGraphicsSvgItem_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsSvgItem_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsSvgItem) SetSharedRenderer(renderer *QSvgRenderer) { + C.QGraphicsSvgItem_SetSharedRenderer(this.h, renderer.cPointer()) +} + +func (this *QGraphicsSvgItem) Renderer() *QSvgRenderer { + return UnsafeNewQSvgRenderer(unsafe.Pointer(C.QGraphicsSvgItem_Renderer(this.h)), nil) +} + +func (this *QGraphicsSvgItem) SetElementId(id string) { + id_ms := C.struct_miqt_string{} + id_ms.data = C.CString(id) + id_ms.len = C.size_t(len(id)) + defer C.free(unsafe.Pointer(id_ms.data)) + C.QGraphicsSvgItem_SetElementId(this.h, id_ms) +} + +func (this *QGraphicsSvgItem) ElementId() string { + var _ms C.struct_miqt_string = C.QGraphicsSvgItem_ElementId(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsSvgItem) SetCachingEnabled(cachingEnabled bool) { + C.QGraphicsSvgItem_SetCachingEnabled(this.h, (C.bool)(cachingEnabled)) +} + +func (this *QGraphicsSvgItem) IsCachingEnabled() bool { + return (bool)(C.QGraphicsSvgItem_IsCachingEnabled(this.h)) +} + +func (this *QGraphicsSvgItem) SetMaximumCacheSize(size *qt.QSize) { + C.QGraphicsSvgItem_SetMaximumCacheSize(this.h, (*C.QSize)(size.UnsafePointer())) +} + +func (this *QGraphicsSvgItem) MaximumCacheSize() *qt.QSize { + _ret := C.QGraphicsSvgItem_MaximumCacheSize(this.h) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsSvgItem) BoundingRect() *qt.QRectF { + _ret := C.QGraphicsSvgItem_BoundingRect(this.h) + _goptr := qt.UnsafeNewQRectF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsSvgItem) Paint(painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget) { + C.QGraphicsSvgItem_Paint(this.h, (*C.QPainter)(painter.UnsafePointer()), (*C.QStyleOptionGraphicsItem)(option.UnsafePointer()), (*C.QWidget)(widget.UnsafePointer())) +} + +func (this *QGraphicsSvgItem) Type() int { + return (int)(C.QGraphicsSvgItem_Type(this.h)) +} + +func QGraphicsSvgItem_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsSvgItem_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QGraphicsSvgItem_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsSvgItem_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QGraphicsSvgItem_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsSvgItem_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QGraphicsSvgItem_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsSvgItem_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsSvgItem) callVirtualBase_BoundingRect() *qt.QRectF { + + _ret := C.QGraphicsSvgItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQRectF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsSvgItem) OnBoundingRect(slot func(super func() *qt.QRectF) *qt.QRectF) { + C.QGraphicsSvgItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSvgItem_BoundingRect +func miqt_exec_callback_QGraphicsSvgItem_BoundingRect(self *C.QGraphicsSvgItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QRectF) *qt.QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsSvgItem{h: self}).callVirtualBase_BoundingRect) + + return (*C.QRectF)(virtualReturn.UnsafePointer()) + +} + +func (this *QGraphicsSvgItem) callVirtualBase_Paint(painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget) { + + C.QGraphicsSvgItem_virtualbase_Paint(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer()), (*C.QStyleOptionGraphicsItem)(option.UnsafePointer()), (*C.QWidget)(widget.UnsafePointer())) + +} +func (this *QGraphicsSvgItem) OnPaint(slot func(super func(painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget), painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget)) { + C.QGraphicsSvgItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSvgItem_Paint +func miqt_exec_callback_QGraphicsSvgItem_Paint(self *C.QGraphicsSvgItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget), painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := qt.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := qt.UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsSvgItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsSvgItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsSvgItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsSvgItem) OnType(slot func(super func() int) int) { + C.QGraphicsSvgItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSvgItem_Type +func miqt_exec_callback_QGraphicsSvgItem_Type(self *C.QGraphicsSvgItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsSvgItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsSvgItem) callVirtualBase_Event(ev *qt.QEvent) bool { + + return (bool)(C.QGraphicsSvgItem_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(ev.UnsafePointer()))) + +} +func (this *QGraphicsSvgItem) OnEvent(slot func(super func(ev *qt.QEvent) bool, ev *qt.QEvent) bool) { + C.QGraphicsSvgItem_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSvgItem_Event +func miqt_exec_callback_QGraphicsSvgItem_Event(self *C.QGraphicsSvgItem, cb C.intptr_t, ev *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *qt.QEvent) bool, ev *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(ev)) + + virtualReturn := gofunc((&QGraphicsSvgItem{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +// Delete this object from C++ memory. +func (this *QGraphicsSvgItem) Delete() { + C.QGraphicsSvgItem_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 *QGraphicsSvgItem) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsSvgItem) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/svg/gen_qgraphicssvgitem.h b/qt/svg/gen_qgraphicssvgitem.h new file mode 100644 index 00000000..b500d39a --- /dev/null +++ b/qt/svg/gen_qgraphicssvgitem.h @@ -0,0 +1,82 @@ +#pragma once +#ifndef MIQT_QT_SVG_GEN_QGRAPHICSSVGITEM_H +#define MIQT_QT_SVG_GEN_QGRAPHICSSVGITEM_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QEvent; +class QGraphicsItem; +class QGraphicsObject; +class QGraphicsSvgItem; +class QMetaObject; +class QObject; +class QPainter; +class QRectF; +class QSize; +class QStyleOptionGraphicsItem; +class QSvgRenderer; +class QWidget; +#else +typedef struct QEvent QEvent; +typedef struct QGraphicsItem QGraphicsItem; +typedef struct QGraphicsObject QGraphicsObject; +typedef struct QGraphicsSvgItem QGraphicsSvgItem; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPainter QPainter; +typedef struct QRectF QRectF; +typedef struct QSize QSize; +typedef struct QStyleOptionGraphicsItem QStyleOptionGraphicsItem; +typedef struct QSvgRenderer QSvgRenderer; +typedef struct QWidget QWidget; +#endif + +void QGraphicsSvgItem_new(QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsSvgItem_new2(struct miqt_string fileName, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsSvgItem_new3(QGraphicsItem* parentItem, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsSvgItem_new4(struct miqt_string fileName, QGraphicsItem* parentItem, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +QMetaObject* QGraphicsSvgItem_MetaObject(const QGraphicsSvgItem* self); +void* QGraphicsSvgItem_Metacast(QGraphicsSvgItem* self, const char* param1); +struct miqt_string QGraphicsSvgItem_Tr(const char* s); +struct miqt_string QGraphicsSvgItem_TrUtf8(const char* s); +void QGraphicsSvgItem_SetSharedRenderer(QGraphicsSvgItem* self, QSvgRenderer* renderer); +QSvgRenderer* QGraphicsSvgItem_Renderer(const QGraphicsSvgItem* self); +void QGraphicsSvgItem_SetElementId(QGraphicsSvgItem* self, struct miqt_string id); +struct miqt_string QGraphicsSvgItem_ElementId(const QGraphicsSvgItem* self); +void QGraphicsSvgItem_SetCachingEnabled(QGraphicsSvgItem* self, bool cachingEnabled); +bool QGraphicsSvgItem_IsCachingEnabled(const QGraphicsSvgItem* self); +void QGraphicsSvgItem_SetMaximumCacheSize(QGraphicsSvgItem* self, QSize* size); +QSize* QGraphicsSvgItem_MaximumCacheSize(const QGraphicsSvgItem* self); +QRectF* QGraphicsSvgItem_BoundingRect(const QGraphicsSvgItem* self); +void QGraphicsSvgItem_Paint(QGraphicsSvgItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +int QGraphicsSvgItem_Type(const QGraphicsSvgItem* self); +struct miqt_string QGraphicsSvgItem_Tr2(const char* s, const char* c); +struct miqt_string QGraphicsSvgItem_Tr3(const char* s, const char* c, int n); +struct miqt_string QGraphicsSvgItem_TrUtf82(const char* s, const char* c); +struct miqt_string QGraphicsSvgItem_TrUtf83(const char* s, const char* c, int n); +void QGraphicsSvgItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsSvgItem_virtualbase_BoundingRect(const void* self); +void QGraphicsSvgItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsSvgItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsSvgItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsSvgItem_virtualbase_Type(const void* self); +void QGraphicsSvgItem_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsSvgItem_virtualbase_Event(void* self, QEvent* ev); +void QGraphicsSvgItem_Delete(QGraphicsSvgItem* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/svg/gen_qsvggenerator.cpp b/qt/svg/gen_qsvggenerator.cpp new file mode 100644 index 00000000..24e0877c --- /dev/null +++ b/qt/svg/gen_qsvggenerator.cpp @@ -0,0 +1,312 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qsvggenerator.h" +#include "_cgo_export.h" + +class MiqtVirtualQSvgGenerator : public virtual QSvgGenerator { +public: + + MiqtVirtualQSvgGenerator(): QSvgGenerator() {}; + + virtual ~MiqtVirtualQSvgGenerator() = default; + + // 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 QSvgGenerator::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QSvgGenerator_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QSvgGenerator::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric metric) const override { + if (handle__Metric == 0) { + return QSvgGenerator::metric(metric); + } + + QPaintDevice::PaintDeviceMetric metric_ret = metric; + int sigval1 = static_cast(metric_ret); + + int callback_return_value = miqt_exec_callback_QSvgGenerator_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 QSvgGenerator::metric(static_cast(metric)); + + } + + // 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 QSvgGenerator::devType(); + } + + + int callback_return_value = miqt_exec_callback_QSvgGenerator_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QSvgGenerator::devType(); + + } + + // 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) { + QSvgGenerator::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QSvgGenerator_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QSvgGenerator::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 QSvgGenerator::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QSvgGenerator_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QSvgGenerator::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 QSvgGenerator::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QSvgGenerator_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QSvgGenerator::sharedPainter(); + + } + +}; + +void QSvgGenerator_new(QSvgGenerator** outptr_QSvgGenerator, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSvgGenerator* ret = new MiqtVirtualQSvgGenerator(); + *outptr_QSvgGenerator = ret; + *outptr_QPaintDevice = static_cast(ret); +} + +struct miqt_string QSvgGenerator_Title(const QSvgGenerator* self) { + QString _ret = self->title(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSvgGenerator_SetTitle(QSvgGenerator* self, struct miqt_string title) { + QString title_QString = QString::fromUtf8(title.data, title.len); + self->setTitle(title_QString); +} + +struct miqt_string QSvgGenerator_Description(const QSvgGenerator* self) { + QString _ret = self->description(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSvgGenerator_SetDescription(QSvgGenerator* self, struct miqt_string description) { + QString description_QString = QString::fromUtf8(description.data, description.len); + self->setDescription(description_QString); +} + +QSize* QSvgGenerator_Size(const QSvgGenerator* self) { + return new QSize(self->size()); +} + +void QSvgGenerator_SetSize(QSvgGenerator* self, QSize* size) { + self->setSize(*size); +} + +QRect* QSvgGenerator_ViewBox(const QSvgGenerator* self) { + return new QRect(self->viewBox()); +} + +QRectF* QSvgGenerator_ViewBoxF(const QSvgGenerator* self) { + return new QRectF(self->viewBoxF()); +} + +void QSvgGenerator_SetViewBox(QSvgGenerator* self, QRect* viewBox) { + self->setViewBox(*viewBox); +} + +void QSvgGenerator_SetViewBoxWithViewBox(QSvgGenerator* self, QRectF* viewBox) { + self->setViewBox(*viewBox); +} + +struct miqt_string QSvgGenerator_FileName(const QSvgGenerator* self) { + QString _ret = self->fileName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSvgGenerator_SetFileName(QSvgGenerator* self, struct miqt_string fileName) { + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + self->setFileName(fileName_QString); +} + +QIODevice* QSvgGenerator_OutputDevice(const QSvgGenerator* self) { + return self->outputDevice(); +} + +void QSvgGenerator_SetOutputDevice(QSvgGenerator* self, QIODevice* outputDevice) { + self->setOutputDevice(outputDevice); +} + +void QSvgGenerator_SetResolution(QSvgGenerator* self, int dpi) { + self->setResolution(static_cast(dpi)); +} + +int QSvgGenerator_Resolution(const QSvgGenerator* self) { + return self->resolution(); +} + +void QSvgGenerator_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QSvgGenerator*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QSvgGenerator_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQSvgGenerator*)(self) )->virtualbase_PaintEngine(); +} + +void QSvgGenerator_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QSvgGenerator*)(self) )->handle__Metric = slot; +} + +int QSvgGenerator_virtualbase_Metric(const void* self, int metric) { + return ( (const MiqtVirtualQSvgGenerator*)(self) )->virtualbase_Metric(metric); +} + +void QSvgGenerator_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QSvgGenerator*)(self) )->handle__DevType = slot; +} + +int QSvgGenerator_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQSvgGenerator*)(self) )->virtualbase_DevType(); +} + +void QSvgGenerator_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QSvgGenerator*)(self) )->handle__InitPainter = slot; +} + +void QSvgGenerator_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQSvgGenerator*)(self) )->virtualbase_InitPainter(painter); +} + +void QSvgGenerator_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QSvgGenerator*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QSvgGenerator_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQSvgGenerator*)(self) )->virtualbase_Redirected(offset); +} + +void QSvgGenerator_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QSvgGenerator*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QSvgGenerator_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQSvgGenerator*)(self) )->virtualbase_SharedPainter(); +} + +void QSvgGenerator_Delete(QSvgGenerator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/svg/gen_qsvggenerator.go b/qt/svg/gen_qsvggenerator.go new file mode 100644 index 00000000..b8372a66 --- /dev/null +++ b/qt/svg/gen_qsvggenerator.go @@ -0,0 +1,310 @@ +package svg + +/* + +#include "gen_qsvggenerator.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QSvgGenerator struct { + h *C.QSvgGenerator + isSubclass bool + *qt.QPaintDevice +} + +func (this *QSvgGenerator) cPointer() *C.QSvgGenerator { + if this == nil { + return nil + } + return this.h +} + +func (this *QSvgGenerator) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQSvgGenerator constructs the type using only CGO pointers. +func newQSvgGenerator(h *C.QSvgGenerator, h_QPaintDevice *C.QPaintDevice) *QSvgGenerator { + if h == nil { + return nil + } + return &QSvgGenerator{h: h, + QPaintDevice: qt.UnsafeNewQPaintDevice(unsafe.Pointer(h_QPaintDevice))} +} + +// UnsafeNewQSvgGenerator constructs the type using only unsafe pointers. +func UnsafeNewQSvgGenerator(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSvgGenerator { + if h == nil { + return nil + } + + return &QSvgGenerator{h: (*C.QSvgGenerator)(h), + QPaintDevice: qt.UnsafeNewQPaintDevice(h_QPaintDevice)} +} + +// NewQSvgGenerator constructs a new QSvgGenerator object. +func NewQSvgGenerator() *QSvgGenerator { + var outptr_QSvgGenerator *C.QSvgGenerator = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSvgGenerator_new(&outptr_QSvgGenerator, &outptr_QPaintDevice) + ret := newQSvgGenerator(outptr_QSvgGenerator, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +func (this *QSvgGenerator) Title() string { + var _ms C.struct_miqt_string = C.QSvgGenerator_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QSvgGenerator) SetTitle(title string) { + title_ms := C.struct_miqt_string{} + title_ms.data = C.CString(title) + title_ms.len = C.size_t(len(title)) + defer C.free(unsafe.Pointer(title_ms.data)) + C.QSvgGenerator_SetTitle(this.h, title_ms) +} + +func (this *QSvgGenerator) Description() string { + var _ms C.struct_miqt_string = C.QSvgGenerator_Description(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QSvgGenerator) SetDescription(description string) { + description_ms := C.struct_miqt_string{} + description_ms.data = C.CString(description) + description_ms.len = C.size_t(len(description)) + defer C.free(unsafe.Pointer(description_ms.data)) + C.QSvgGenerator_SetDescription(this.h, description_ms) +} + +func (this *QSvgGenerator) Size() *qt.QSize { + _ret := C.QSvgGenerator_Size(this.h) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgGenerator) SetSize(size *qt.QSize) { + C.QSvgGenerator_SetSize(this.h, (*C.QSize)(size.UnsafePointer())) +} + +func (this *QSvgGenerator) ViewBox() *qt.QRect { + _ret := C.QSvgGenerator_ViewBox(this.h) + _goptr := qt.UnsafeNewQRect(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgGenerator) ViewBoxF() *qt.QRectF { + _ret := C.QSvgGenerator_ViewBoxF(this.h) + _goptr := qt.UnsafeNewQRectF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgGenerator) SetViewBox(viewBox *qt.QRect) { + C.QSvgGenerator_SetViewBox(this.h, (*C.QRect)(viewBox.UnsafePointer())) +} + +func (this *QSvgGenerator) SetViewBoxWithViewBox(viewBox *qt.QRectF) { + C.QSvgGenerator_SetViewBoxWithViewBox(this.h, (*C.QRectF)(viewBox.UnsafePointer())) +} + +func (this *QSvgGenerator) FileName() string { + var _ms C.struct_miqt_string = C.QSvgGenerator_FileName(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QSvgGenerator) SetFileName(fileName string) { + 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.QSvgGenerator_SetFileName(this.h, fileName_ms) +} + +func (this *QSvgGenerator) OutputDevice() *qt.QIODevice { + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QSvgGenerator_OutputDevice(this.h)), nil) +} + +func (this *QSvgGenerator) SetOutputDevice(outputDevice *qt.QIODevice) { + C.QSvgGenerator_SetOutputDevice(this.h, (*C.QIODevice)(outputDevice.UnsafePointer())) +} + +func (this *QSvgGenerator) SetResolution(dpi int) { + C.QSvgGenerator_SetResolution(this.h, (C.int)(dpi)) +} + +func (this *QSvgGenerator) Resolution() int { + return (int)(C.QSvgGenerator_Resolution(this.h)) +} + +func (this *QSvgGenerator) callVirtualBase_PaintEngine() *qt.QPaintEngine { + + return qt.UnsafeNewQPaintEngine(unsafe.Pointer(C.QSvgGenerator_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QSvgGenerator) OnPaintEngine(slot func(super func() *qt.QPaintEngine) *qt.QPaintEngine) { + C.QSvgGenerator_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgGenerator_PaintEngine +func miqt_exec_callback_QSvgGenerator_PaintEngine(self *C.QSvgGenerator, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPaintEngine) *qt.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgGenerator{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QSvgGenerator) callVirtualBase_Metric(metric qt.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QSvgGenerator_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(metric))) + +} +func (this *QSvgGenerator) OnMetric(slot func(super func(metric qt.QPaintDevice__PaintDeviceMetric) int, metric qt.QPaintDevice__PaintDeviceMetric) int) { + C.QSvgGenerator_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgGenerator_Metric +func miqt_exec_callback_QSvgGenerator_Metric(self *C.QSvgGenerator, cb C.intptr_t, metric C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(metric qt.QPaintDevice__PaintDeviceMetric) int, metric qt.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.QPaintDevice__PaintDeviceMetric)(metric) + + virtualReturn := gofunc((&QSvgGenerator{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSvgGenerator) callVirtualBase_DevType() int { + + return (int)(C.QSvgGenerator_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QSvgGenerator) OnDevType(slot func(super func() int) int) { + C.QSvgGenerator_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgGenerator_DevType +func miqt_exec_callback_QSvgGenerator_DevType(self *C.QSvgGenerator, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgGenerator{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QSvgGenerator) callVirtualBase_InitPainter(painter *qt.QPainter) { + + C.QSvgGenerator_virtualbase_InitPainter(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer())) + +} +func (this *QSvgGenerator) OnInitPainter(slot func(super func(painter *qt.QPainter), painter *qt.QPainter)) { + C.QSvgGenerator_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgGenerator_InitPainter +func miqt_exec_callback_QSvgGenerator_InitPainter(self *C.QSvgGenerator, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt.QPainter), painter *qt.QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QSvgGenerator{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QSvgGenerator) callVirtualBase_Redirected(offset *qt.QPoint) *qt.QPaintDevice { + + return qt.UnsafeNewQPaintDevice(unsafe.Pointer(C.QSvgGenerator_virtualbase_Redirected(unsafe.Pointer(this.h), (*C.QPoint)(offset.UnsafePointer())))) +} +func (this *QSvgGenerator) OnRedirected(slot func(super func(offset *qt.QPoint) *qt.QPaintDevice, offset *qt.QPoint) *qt.QPaintDevice) { + C.QSvgGenerator_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgGenerator_Redirected +func miqt_exec_callback_QSvgGenerator_Redirected(self *C.QSvgGenerator, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *qt.QPoint) *qt.QPaintDevice, offset *qt.QPoint) *qt.QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QSvgGenerator{h: self}).callVirtualBase_Redirected, slotval1) + + return (*C.QPaintDevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QSvgGenerator) callVirtualBase_SharedPainter() *qt.QPainter { + + return qt.UnsafeNewQPainter(unsafe.Pointer(C.QSvgGenerator_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QSvgGenerator) OnSharedPainter(slot func(super func() *qt.QPainter) *qt.QPainter) { + C.QSvgGenerator_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgGenerator_SharedPainter +func miqt_exec_callback_QSvgGenerator_SharedPainter(self *C.QSvgGenerator, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPainter) *qt.QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgGenerator{h: self}).callVirtualBase_SharedPainter) + + return (*C.QPainter)(virtualReturn.UnsafePointer()) + +} + +// Delete this object from C++ memory. +func (this *QSvgGenerator) Delete() { + C.QSvgGenerator_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 *QSvgGenerator) GoGC() { + runtime.SetFinalizer(this, func(this *QSvgGenerator) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/svg/gen_qsvggenerator.h b/qt/svg/gen_qsvggenerator.h new file mode 100644 index 00000000..d5dad804 --- /dev/null +++ b/qt/svg/gen_qsvggenerator.h @@ -0,0 +1,76 @@ +#pragma once +#ifndef MIQT_QT_SVG_GEN_QSVGGENERATOR_H +#define MIQT_QT_SVG_GEN_QSVGGENERATOR_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QIODevice; +class QPaintDevice; +class QPaintEngine; +class QPainter; +class QPoint; +class QRect; +class QRectF; +class QSize; +class QSvgGenerator; +#else +typedef struct QIODevice QIODevice; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QRect QRect; +typedef struct QRectF QRectF; +typedef struct QSize QSize; +typedef struct QSvgGenerator QSvgGenerator; +#endif + +void QSvgGenerator_new(QSvgGenerator** outptr_QSvgGenerator, QPaintDevice** outptr_QPaintDevice); +struct miqt_string QSvgGenerator_Title(const QSvgGenerator* self); +void QSvgGenerator_SetTitle(QSvgGenerator* self, struct miqt_string title); +struct miqt_string QSvgGenerator_Description(const QSvgGenerator* self); +void QSvgGenerator_SetDescription(QSvgGenerator* self, struct miqt_string description); +QSize* QSvgGenerator_Size(const QSvgGenerator* self); +void QSvgGenerator_SetSize(QSvgGenerator* self, QSize* size); +QRect* QSvgGenerator_ViewBox(const QSvgGenerator* self); +QRectF* QSvgGenerator_ViewBoxF(const QSvgGenerator* self); +void QSvgGenerator_SetViewBox(QSvgGenerator* self, QRect* viewBox); +void QSvgGenerator_SetViewBoxWithViewBox(QSvgGenerator* self, QRectF* viewBox); +struct miqt_string QSvgGenerator_FileName(const QSvgGenerator* self); +void QSvgGenerator_SetFileName(QSvgGenerator* self, struct miqt_string fileName); +QIODevice* QSvgGenerator_OutputDevice(const QSvgGenerator* self); +void QSvgGenerator_SetOutputDevice(QSvgGenerator* self, QIODevice* outputDevice); +void QSvgGenerator_SetResolution(QSvgGenerator* self, int dpi); +int QSvgGenerator_Resolution(const QSvgGenerator* self); +QPaintEngine* QSvgGenerator_PaintEngine(const QSvgGenerator* self); +int QSvgGenerator_Metric(const QSvgGenerator* self, int metric); +void QSvgGenerator_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QSvgGenerator_virtualbase_PaintEngine(const void* self); +void QSvgGenerator_override_virtual_Metric(void* self, intptr_t slot); +int QSvgGenerator_virtualbase_Metric(const void* self, int metric); +void QSvgGenerator_override_virtual_DevType(void* self, intptr_t slot); +int QSvgGenerator_virtualbase_DevType(const void* self); +void QSvgGenerator_override_virtual_InitPainter(void* self, intptr_t slot); +void QSvgGenerator_virtualbase_InitPainter(const void* self, QPainter* painter); +void QSvgGenerator_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QSvgGenerator_virtualbase_Redirected(const void* self, QPoint* offset); +void QSvgGenerator_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QSvgGenerator_virtualbase_SharedPainter(const void* self); +void QSvgGenerator_Delete(QSvgGenerator* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/svg/gen_qsvgrenderer.cpp b/qt/svg/gen_qsvgrenderer.cpp new file mode 100644 index 00000000..8a82680b --- /dev/null +++ b/qt/svg/gen_qsvgrenderer.cpp @@ -0,0 +1,518 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qsvgrenderer.h" +#include "_cgo_export.h" + +class MiqtVirtualQSvgRenderer : public virtual QSvgRenderer { +public: + + MiqtVirtualQSvgRenderer(): QSvgRenderer() {}; + MiqtVirtualQSvgRenderer(const QString& filename): QSvgRenderer(filename) {}; + MiqtVirtualQSvgRenderer(const QByteArray& contents): QSvgRenderer(contents) {}; + MiqtVirtualQSvgRenderer(QXmlStreamReader* contents): QSvgRenderer(contents) {}; + MiqtVirtualQSvgRenderer(QObject* parent): QSvgRenderer(parent) {}; + MiqtVirtualQSvgRenderer(const QString& filename, QObject* parent): QSvgRenderer(filename, parent) {}; + MiqtVirtualQSvgRenderer(const QByteArray& contents, QObject* parent): QSvgRenderer(contents, parent) {}; + MiqtVirtualQSvgRenderer(QXmlStreamReader* contents, QObject* parent): QSvgRenderer(contents, parent) {}; + + virtual ~MiqtVirtualQSvgRenderer() = 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 QSvgRenderer::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSvgRenderer_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSvgRenderer::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 QSvgRenderer::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSvgRenderer_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSvgRenderer::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) { + QSvgRenderer::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSvgRenderer_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSvgRenderer::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) { + QSvgRenderer::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSvgRenderer_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSvgRenderer::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) { + QSvgRenderer::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSvgRenderer_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSvgRenderer::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) { + QSvgRenderer::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSvgRenderer_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSvgRenderer::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) { + QSvgRenderer::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSvgRenderer_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSvgRenderer::disconnectNotify(*signal); + + } + +}; + +void QSvgRenderer_new(QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { + MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(); + *outptr_QSvgRenderer = ret; + *outptr_QObject = static_cast(ret); +} + +void QSvgRenderer_new2(struct miqt_string filename, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { + QString filename_QString = QString::fromUtf8(filename.data, filename.len); + MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(filename_QString); + *outptr_QSvgRenderer = ret; + *outptr_QObject = static_cast(ret); +} + +void QSvgRenderer_new3(struct miqt_string contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { + QByteArray contents_QByteArray(contents.data, contents.len); + MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents_QByteArray); + *outptr_QSvgRenderer = ret; + *outptr_QObject = static_cast(ret); +} + +void QSvgRenderer_new4(QXmlStreamReader* contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { + MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents); + *outptr_QSvgRenderer = ret; + *outptr_QObject = static_cast(ret); +} + +void QSvgRenderer_new5(QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { + MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(parent); + *outptr_QSvgRenderer = ret; + *outptr_QObject = static_cast(ret); +} + +void QSvgRenderer_new6(struct miqt_string filename, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { + QString filename_QString = QString::fromUtf8(filename.data, filename.len); + MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(filename_QString, parent); + *outptr_QSvgRenderer = ret; + *outptr_QObject = static_cast(ret); +} + +void QSvgRenderer_new7(struct miqt_string contents, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { + QByteArray contents_QByteArray(contents.data, contents.len); + MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents_QByteArray, parent); + *outptr_QSvgRenderer = ret; + *outptr_QObject = static_cast(ret); +} + +void QSvgRenderer_new8(QXmlStreamReader* contents, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { + MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents, parent); + *outptr_QSvgRenderer = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QSvgRenderer_MetaObject(const QSvgRenderer* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QSvgRenderer_Metacast(QSvgRenderer* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QSvgRenderer_Tr(const char* s) { + QString _ret = QSvgRenderer::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSvgRenderer_TrUtf8(const char* s) { + QString _ret = QSvgRenderer::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QSvgRenderer_IsValid(const QSvgRenderer* self) { + return self->isValid(); +} + +QSize* QSvgRenderer_DefaultSize(const QSvgRenderer* self) { + return new QSize(self->defaultSize()); +} + +QRect* QSvgRenderer_ViewBox(const QSvgRenderer* self) { + return new QRect(self->viewBox()); +} + +QRectF* QSvgRenderer_ViewBoxF(const QSvgRenderer* self) { + return new QRectF(self->viewBoxF()); +} + +void QSvgRenderer_SetViewBox(QSvgRenderer* self, QRect* viewbox) { + self->setViewBox(*viewbox); +} + +void QSvgRenderer_SetViewBoxWithViewbox(QSvgRenderer* self, QRectF* viewbox) { + self->setViewBox(*viewbox); +} + +int QSvgRenderer_AspectRatioMode(const QSvgRenderer* self) { + Qt::AspectRatioMode _ret = self->aspectRatioMode(); + return static_cast(_ret); +} + +void QSvgRenderer_SetAspectRatioMode(QSvgRenderer* self, int mode) { + self->setAspectRatioMode(static_cast(mode)); +} + +bool QSvgRenderer_Animated(const QSvgRenderer* self) { + return self->animated(); +} + +int QSvgRenderer_FramesPerSecond(const QSvgRenderer* self) { + return self->framesPerSecond(); +} + +void QSvgRenderer_SetFramesPerSecond(QSvgRenderer* self, int num) { + self->setFramesPerSecond(static_cast(num)); +} + +int QSvgRenderer_CurrentFrame(const QSvgRenderer* self) { + return self->currentFrame(); +} + +void QSvgRenderer_SetCurrentFrame(QSvgRenderer* self, int currentFrame) { + self->setCurrentFrame(static_cast(currentFrame)); +} + +int QSvgRenderer_AnimationDuration(const QSvgRenderer* self) { + return self->animationDuration(); +} + +QRectF* QSvgRenderer_BoundsOnElement(const QSvgRenderer* self, struct miqt_string id) { + QString id_QString = QString::fromUtf8(id.data, id.len); + return new QRectF(self->boundsOnElement(id_QString)); +} + +bool QSvgRenderer_ElementExists(const QSvgRenderer* self, struct miqt_string id) { + QString id_QString = QString::fromUtf8(id.data, id.len); + return self->elementExists(id_QString); +} + +QMatrix* QSvgRenderer_MatrixForElement(const QSvgRenderer* self, struct miqt_string id) { + QString id_QString = QString::fromUtf8(id.data, id.len); + return new QMatrix(self->matrixForElement(id_QString)); +} + +QTransform* QSvgRenderer_TransformForElement(const QSvgRenderer* self, struct miqt_string id) { + QString id_QString = QString::fromUtf8(id.data, id.len); + return new QTransform(self->transformForElement(id_QString)); +} + +bool QSvgRenderer_Load(QSvgRenderer* self, struct miqt_string filename) { + QString filename_QString = QString::fromUtf8(filename.data, filename.len); + return self->load(filename_QString); +} + +bool QSvgRenderer_LoadWithContents(QSvgRenderer* self, struct miqt_string contents) { + QByteArray contents_QByteArray(contents.data, contents.len); + return self->load(contents_QByteArray); +} + +bool QSvgRenderer_Load2(QSvgRenderer* self, QXmlStreamReader* contents) { + return self->load(contents); +} + +void QSvgRenderer_Render(QSvgRenderer* self, QPainter* p) { + self->render(p); +} + +void QSvgRenderer_Render2(QSvgRenderer* self, QPainter* p, QRectF* bounds) { + self->render(p, *bounds); +} + +void QSvgRenderer_Render3(QSvgRenderer* self, QPainter* p, struct miqt_string elementId) { + QString elementId_QString = QString::fromUtf8(elementId.data, elementId.len); + self->render(p, elementId_QString); +} + +void QSvgRenderer_RepaintNeeded(QSvgRenderer* self) { + self->repaintNeeded(); +} + +void QSvgRenderer_connect_RepaintNeeded(QSvgRenderer* self, intptr_t slot) { + MiqtVirtualQSvgRenderer::connect(self, static_cast(&QSvgRenderer::repaintNeeded), self, [=]() { + miqt_exec_callback_QSvgRenderer_RepaintNeeded(slot); + }); +} + +struct miqt_string QSvgRenderer_Tr2(const char* s, const char* c) { + QString _ret = QSvgRenderer::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSvgRenderer_Tr3(const char* s, const char* c, int n) { + QString _ret = QSvgRenderer::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSvgRenderer_TrUtf82(const char* s, const char* c) { + QString _ret = QSvgRenderer::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSvgRenderer_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QSvgRenderer::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSvgRenderer_Render32(QSvgRenderer* self, QPainter* p, struct miqt_string elementId, QRectF* bounds) { + QString elementId_QString = QString::fromUtf8(elementId.data, elementId.len); + self->render(p, elementId_QString, *bounds); +} + +void QSvgRenderer_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSvgRenderer*)(self) )->handle__Event = slot; +} + +bool QSvgRenderer_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSvgRenderer*)(self) )->virtualbase_Event(event); +} + +void QSvgRenderer_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSvgRenderer*)(self) )->handle__EventFilter = slot; +} + +bool QSvgRenderer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSvgRenderer*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSvgRenderer_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgRenderer*)(self) )->handle__TimerEvent = slot; +} + +void QSvgRenderer_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSvgRenderer*)(self) )->virtualbase_TimerEvent(event); +} + +void QSvgRenderer_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgRenderer*)(self) )->handle__ChildEvent = slot; +} + +void QSvgRenderer_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSvgRenderer*)(self) )->virtualbase_ChildEvent(event); +} + +void QSvgRenderer_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgRenderer*)(self) )->handle__CustomEvent = slot; +} + +void QSvgRenderer_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSvgRenderer*)(self) )->virtualbase_CustomEvent(event); +} + +void QSvgRenderer_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSvgRenderer*)(self) )->handle__ConnectNotify = slot; +} + +void QSvgRenderer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSvgRenderer*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSvgRenderer_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSvgRenderer*)(self) )->handle__DisconnectNotify = slot; +} + +void QSvgRenderer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSvgRenderer*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QSvgRenderer_Delete(QSvgRenderer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/svg/gen_qsvgrenderer.go b/qt/svg/gen_qsvgrenderer.go new file mode 100644 index 00000000..c072b77e --- /dev/null +++ b/qt/svg/gen_qsvgrenderer.go @@ -0,0 +1,575 @@ +package svg + +/* + +#include "gen_qsvgrenderer.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QSvgRenderer struct { + h *C.QSvgRenderer + isSubclass bool + *qt.QObject +} + +func (this *QSvgRenderer) cPointer() *C.QSvgRenderer { + if this == nil { + return nil + } + return this.h +} + +func (this *QSvgRenderer) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQSvgRenderer constructs the type using only CGO pointers. +func newQSvgRenderer(h *C.QSvgRenderer, h_QObject *C.QObject) *QSvgRenderer { + if h == nil { + return nil + } + return &QSvgRenderer{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQSvgRenderer constructs the type using only unsafe pointers. +func UnsafeNewQSvgRenderer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSvgRenderer { + if h == nil { + return nil + } + + return &QSvgRenderer{h: (*C.QSvgRenderer)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +// NewQSvgRenderer constructs a new QSvgRenderer object. +func NewQSvgRenderer() *QSvgRenderer { + var outptr_QSvgRenderer *C.QSvgRenderer = nil + var outptr_QObject *C.QObject = nil + + C.QSvgRenderer_new(&outptr_QSvgRenderer, &outptr_QObject) + ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQSvgRenderer2 constructs a new QSvgRenderer object. +func NewQSvgRenderer2(filename string) *QSvgRenderer { + 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)) + var outptr_QSvgRenderer *C.QSvgRenderer = nil + var outptr_QObject *C.QObject = nil + + C.QSvgRenderer_new2(filename_ms, &outptr_QSvgRenderer, &outptr_QObject) + ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQSvgRenderer3 constructs a new QSvgRenderer object. +func NewQSvgRenderer3(contents []byte) *QSvgRenderer { + contents_alias := C.struct_miqt_string{} + contents_alias.data = (*C.char)(unsafe.Pointer(&contents[0])) + contents_alias.len = C.size_t(len(contents)) + var outptr_QSvgRenderer *C.QSvgRenderer = nil + var outptr_QObject *C.QObject = nil + + C.QSvgRenderer_new3(contents_alias, &outptr_QSvgRenderer, &outptr_QObject) + ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQSvgRenderer4 constructs a new QSvgRenderer object. +func NewQSvgRenderer4(contents *qt.QXmlStreamReader) *QSvgRenderer { + var outptr_QSvgRenderer *C.QSvgRenderer = nil + var outptr_QObject *C.QObject = nil + + C.QSvgRenderer_new4((*C.QXmlStreamReader)(contents.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) + ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQSvgRenderer5 constructs a new QSvgRenderer object. +func NewQSvgRenderer5(parent *qt.QObject) *QSvgRenderer { + var outptr_QSvgRenderer *C.QSvgRenderer = nil + var outptr_QObject *C.QObject = nil + + C.QSvgRenderer_new5((*C.QObject)(parent.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) + ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQSvgRenderer6 constructs a new QSvgRenderer object. +func NewQSvgRenderer6(filename string, parent *qt.QObject) *QSvgRenderer { + 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)) + var outptr_QSvgRenderer *C.QSvgRenderer = nil + var outptr_QObject *C.QObject = nil + + C.QSvgRenderer_new6(filename_ms, (*C.QObject)(parent.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) + ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQSvgRenderer7 constructs a new QSvgRenderer object. +func NewQSvgRenderer7(contents []byte, parent *qt.QObject) *QSvgRenderer { + contents_alias := C.struct_miqt_string{} + contents_alias.data = (*C.char)(unsafe.Pointer(&contents[0])) + contents_alias.len = C.size_t(len(contents)) + var outptr_QSvgRenderer *C.QSvgRenderer = nil + var outptr_QObject *C.QObject = nil + + C.QSvgRenderer_new7(contents_alias, (*C.QObject)(parent.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) + ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQSvgRenderer8 constructs a new QSvgRenderer object. +func NewQSvgRenderer8(contents *qt.QXmlStreamReader, parent *qt.QObject) *QSvgRenderer { + var outptr_QSvgRenderer *C.QSvgRenderer = nil + var outptr_QObject *C.QObject = nil + + C.QSvgRenderer_new8((*C.QXmlStreamReader)(contents.UnsafePointer()), (*C.QObject)(parent.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) + ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QSvgRenderer) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QSvgRenderer_MetaObject(this.h))) +} + +func (this *QSvgRenderer) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QSvgRenderer_Metacast(this.h, param1_Cstring)) +} + +func QSvgRenderer_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QSvgRenderer_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QSvgRenderer_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QSvgRenderer_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QSvgRenderer) IsValid() bool { + return (bool)(C.QSvgRenderer_IsValid(this.h)) +} + +func (this *QSvgRenderer) DefaultSize() *qt.QSize { + _ret := C.QSvgRenderer_DefaultSize(this.h) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgRenderer) ViewBox() *qt.QRect { + _ret := C.QSvgRenderer_ViewBox(this.h) + _goptr := qt.UnsafeNewQRect(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgRenderer) ViewBoxF() *qt.QRectF { + _ret := C.QSvgRenderer_ViewBoxF(this.h) + _goptr := qt.UnsafeNewQRectF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgRenderer) SetViewBox(viewbox *qt.QRect) { + C.QSvgRenderer_SetViewBox(this.h, (*C.QRect)(viewbox.UnsafePointer())) +} + +func (this *QSvgRenderer) SetViewBoxWithViewbox(viewbox *qt.QRectF) { + C.QSvgRenderer_SetViewBoxWithViewbox(this.h, (*C.QRectF)(viewbox.UnsafePointer())) +} + +func (this *QSvgRenderer) AspectRatioMode() qt.AspectRatioMode { + return (qt.AspectRatioMode)(C.QSvgRenderer_AspectRatioMode(this.h)) +} + +func (this *QSvgRenderer) SetAspectRatioMode(mode qt.AspectRatioMode) { + C.QSvgRenderer_SetAspectRatioMode(this.h, (C.int)(mode)) +} + +func (this *QSvgRenderer) Animated() bool { + return (bool)(C.QSvgRenderer_Animated(this.h)) +} + +func (this *QSvgRenderer) FramesPerSecond() int { + return (int)(C.QSvgRenderer_FramesPerSecond(this.h)) +} + +func (this *QSvgRenderer) SetFramesPerSecond(num int) { + C.QSvgRenderer_SetFramesPerSecond(this.h, (C.int)(num)) +} + +func (this *QSvgRenderer) CurrentFrame() int { + return (int)(C.QSvgRenderer_CurrentFrame(this.h)) +} + +func (this *QSvgRenderer) SetCurrentFrame(currentFrame int) { + C.QSvgRenderer_SetCurrentFrame(this.h, (C.int)(currentFrame)) +} + +func (this *QSvgRenderer) AnimationDuration() int { + return (int)(C.QSvgRenderer_AnimationDuration(this.h)) +} + +func (this *QSvgRenderer) BoundsOnElement(id string) *qt.QRectF { + id_ms := C.struct_miqt_string{} + id_ms.data = C.CString(id) + id_ms.len = C.size_t(len(id)) + defer C.free(unsafe.Pointer(id_ms.data)) + _ret := C.QSvgRenderer_BoundsOnElement(this.h, id_ms) + _goptr := qt.UnsafeNewQRectF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgRenderer) ElementExists(id string) bool { + id_ms := C.struct_miqt_string{} + id_ms.data = C.CString(id) + id_ms.len = C.size_t(len(id)) + defer C.free(unsafe.Pointer(id_ms.data)) + return (bool)(C.QSvgRenderer_ElementExists(this.h, id_ms)) +} + +func (this *QSvgRenderer) MatrixForElement(id string) *qt.QMatrix { + id_ms := C.struct_miqt_string{} + id_ms.data = C.CString(id) + id_ms.len = C.size_t(len(id)) + defer C.free(unsafe.Pointer(id_ms.data)) + _ret := C.QSvgRenderer_MatrixForElement(this.h, id_ms) + _goptr := qt.UnsafeNewQMatrix(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgRenderer) TransformForElement(id string) *qt.QTransform { + id_ms := C.struct_miqt_string{} + id_ms.data = C.CString(id) + id_ms.len = C.size_t(len(id)) + defer C.free(unsafe.Pointer(id_ms.data)) + _ret := C.QSvgRenderer_TransformForElement(this.h, id_ms) + _goptr := qt.UnsafeNewQTransform(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgRenderer) Load(filename string) bool { + 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.QSvgRenderer_Load(this.h, filename_ms)) +} + +func (this *QSvgRenderer) LoadWithContents(contents []byte) bool { + contents_alias := C.struct_miqt_string{} + contents_alias.data = (*C.char)(unsafe.Pointer(&contents[0])) + contents_alias.len = C.size_t(len(contents)) + return (bool)(C.QSvgRenderer_LoadWithContents(this.h, contents_alias)) +} + +func (this *QSvgRenderer) Load2(contents *qt.QXmlStreamReader) bool { + return (bool)(C.QSvgRenderer_Load2(this.h, (*C.QXmlStreamReader)(contents.UnsafePointer()))) +} + +func (this *QSvgRenderer) Render(p *qt.QPainter) { + C.QSvgRenderer_Render(this.h, (*C.QPainter)(p.UnsafePointer())) +} + +func (this *QSvgRenderer) Render2(p *qt.QPainter, bounds *qt.QRectF) { + C.QSvgRenderer_Render2(this.h, (*C.QPainter)(p.UnsafePointer()), (*C.QRectF)(bounds.UnsafePointer())) +} + +func (this *QSvgRenderer) Render3(p *qt.QPainter, elementId string) { + elementId_ms := C.struct_miqt_string{} + elementId_ms.data = C.CString(elementId) + elementId_ms.len = C.size_t(len(elementId)) + defer C.free(unsafe.Pointer(elementId_ms.data)) + C.QSvgRenderer_Render3(this.h, (*C.QPainter)(p.UnsafePointer()), elementId_ms) +} + +func (this *QSvgRenderer) RepaintNeeded() { + C.QSvgRenderer_RepaintNeeded(this.h) +} +func (this *QSvgRenderer) OnRepaintNeeded(slot func()) { + C.QSvgRenderer_connect_RepaintNeeded(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgRenderer_RepaintNeeded +func miqt_exec_callback_QSvgRenderer_RepaintNeeded(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func QSvgRenderer_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QSvgRenderer_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QSvgRenderer_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QSvgRenderer_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QSvgRenderer_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QSvgRenderer_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QSvgRenderer_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QSvgRenderer_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QSvgRenderer) Render32(p *qt.QPainter, elementId string, bounds *qt.QRectF) { + elementId_ms := C.struct_miqt_string{} + elementId_ms.data = C.CString(elementId) + elementId_ms.len = C.size_t(len(elementId)) + defer C.free(unsafe.Pointer(elementId_ms.data)) + C.QSvgRenderer_Render32(this.h, (*C.QPainter)(p.UnsafePointer()), elementId_ms, (*C.QRectF)(bounds.UnsafePointer())) +} + +func (this *QSvgRenderer) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QSvgRenderer_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QSvgRenderer) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QSvgRenderer_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgRenderer_Event +func miqt_exec_callback_QSvgRenderer_Event(self *C.QSvgRenderer, 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((&QSvgRenderer{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSvgRenderer) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QSvgRenderer_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QSvgRenderer) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QSvgRenderer_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgRenderer_EventFilter +func miqt_exec_callback_QSvgRenderer_EventFilter(self *C.QSvgRenderer, 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((&QSvgRenderer{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSvgRenderer) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QSvgRenderer_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QSvgRenderer) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QSvgRenderer_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgRenderer_TimerEvent +func miqt_exec_callback_QSvgRenderer_TimerEvent(self *C.QSvgRenderer, 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((&QSvgRenderer{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSvgRenderer) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QSvgRenderer_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QSvgRenderer) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QSvgRenderer_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgRenderer_ChildEvent +func miqt_exec_callback_QSvgRenderer_ChildEvent(self *C.QSvgRenderer, 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((&QSvgRenderer{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSvgRenderer) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QSvgRenderer_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QSvgRenderer) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QSvgRenderer_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgRenderer_CustomEvent +func miqt_exec_callback_QSvgRenderer_CustomEvent(self *C.QSvgRenderer, 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((&QSvgRenderer{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSvgRenderer) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QSvgRenderer_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QSvgRenderer) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QSvgRenderer_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgRenderer_ConnectNotify +func miqt_exec_callback_QSvgRenderer_ConnectNotify(self *C.QSvgRenderer, 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((&QSvgRenderer{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSvgRenderer) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QSvgRenderer_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QSvgRenderer) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QSvgRenderer_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgRenderer_DisconnectNotify +func miqt_exec_callback_QSvgRenderer_DisconnectNotify(self *C.QSvgRenderer, 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((&QSvgRenderer{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QSvgRenderer) Delete() { + C.QSvgRenderer_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 *QSvgRenderer) GoGC() { + runtime.SetFinalizer(this, func(this *QSvgRenderer) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/svg/gen_qsvgrenderer.h b/qt/svg/gen_qsvgrenderer.h new file mode 100644 index 00000000..e09bc375 --- /dev/null +++ b/qt/svg/gen_qsvgrenderer.h @@ -0,0 +1,114 @@ +#pragma once +#ifndef MIQT_QT_SVG_GEN_QSVGRENDERER_H +#define MIQT_QT_SVG_GEN_QSVGRENDERER_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QByteArray; +class QChildEvent; +class QEvent; +class QMatrix; +class QMetaMethod; +class QMetaObject; +class QObject; +class QPainter; +class QRect; +class QRectF; +class QSize; +class QSvgRenderer; +class QTimerEvent; +class QTransform; +class QXmlStreamReader; +#else +typedef struct QByteArray QByteArray; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMatrix QMatrix; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPainter QPainter; +typedef struct QRect QRect; +typedef struct QRectF QRectF; +typedef struct QSize QSize; +typedef struct QSvgRenderer QSvgRenderer; +typedef struct QTimerEvent QTimerEvent; +typedef struct QTransform QTransform; +typedef struct QXmlStreamReader QXmlStreamReader; +#endif + +void QSvgRenderer_new(QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +void QSvgRenderer_new2(struct miqt_string filename, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +void QSvgRenderer_new3(struct miqt_string contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +void QSvgRenderer_new4(QXmlStreamReader* contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +void QSvgRenderer_new5(QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +void QSvgRenderer_new6(struct miqt_string filename, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +void QSvgRenderer_new7(struct miqt_string contents, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +void QSvgRenderer_new8(QXmlStreamReader* contents, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +QMetaObject* QSvgRenderer_MetaObject(const QSvgRenderer* self); +void* QSvgRenderer_Metacast(QSvgRenderer* self, const char* param1); +struct miqt_string QSvgRenderer_Tr(const char* s); +struct miqt_string QSvgRenderer_TrUtf8(const char* s); +bool QSvgRenderer_IsValid(const QSvgRenderer* self); +QSize* QSvgRenderer_DefaultSize(const QSvgRenderer* self); +QRect* QSvgRenderer_ViewBox(const QSvgRenderer* self); +QRectF* QSvgRenderer_ViewBoxF(const QSvgRenderer* self); +void QSvgRenderer_SetViewBox(QSvgRenderer* self, QRect* viewbox); +void QSvgRenderer_SetViewBoxWithViewbox(QSvgRenderer* self, QRectF* viewbox); +int QSvgRenderer_AspectRatioMode(const QSvgRenderer* self); +void QSvgRenderer_SetAspectRatioMode(QSvgRenderer* self, int mode); +bool QSvgRenderer_Animated(const QSvgRenderer* self); +int QSvgRenderer_FramesPerSecond(const QSvgRenderer* self); +void QSvgRenderer_SetFramesPerSecond(QSvgRenderer* self, int num); +int QSvgRenderer_CurrentFrame(const QSvgRenderer* self); +void QSvgRenderer_SetCurrentFrame(QSvgRenderer* self, int currentFrame); +int QSvgRenderer_AnimationDuration(const QSvgRenderer* self); +QRectF* QSvgRenderer_BoundsOnElement(const QSvgRenderer* self, struct miqt_string id); +bool QSvgRenderer_ElementExists(const QSvgRenderer* self, struct miqt_string id); +QMatrix* QSvgRenderer_MatrixForElement(const QSvgRenderer* self, struct miqt_string id); +QTransform* QSvgRenderer_TransformForElement(const QSvgRenderer* self, struct miqt_string id); +bool QSvgRenderer_Load(QSvgRenderer* self, struct miqt_string filename); +bool QSvgRenderer_LoadWithContents(QSvgRenderer* self, struct miqt_string contents); +bool QSvgRenderer_Load2(QSvgRenderer* self, QXmlStreamReader* contents); +void QSvgRenderer_Render(QSvgRenderer* self, QPainter* p); +void QSvgRenderer_Render2(QSvgRenderer* self, QPainter* p, QRectF* bounds); +void QSvgRenderer_Render3(QSvgRenderer* self, QPainter* p, struct miqt_string elementId); +void QSvgRenderer_RepaintNeeded(QSvgRenderer* self); +void QSvgRenderer_connect_RepaintNeeded(QSvgRenderer* self, intptr_t slot); +struct miqt_string QSvgRenderer_Tr2(const char* s, const char* c); +struct miqt_string QSvgRenderer_Tr3(const char* s, const char* c, int n); +struct miqt_string QSvgRenderer_TrUtf82(const char* s, const char* c); +struct miqt_string QSvgRenderer_TrUtf83(const char* s, const char* c, int n); +void QSvgRenderer_Render32(QSvgRenderer* self, QPainter* p, struct miqt_string elementId, QRectF* bounds); +void QSvgRenderer_override_virtual_Event(void* self, intptr_t slot); +bool QSvgRenderer_virtualbase_Event(void* self, QEvent* event); +void QSvgRenderer_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSvgRenderer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSvgRenderer_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSvgRenderer_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSvgRenderer_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSvgRenderer_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSvgRenderer_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSvgRenderer_virtualbase_CustomEvent(void* self, QEvent* event); +void QSvgRenderer_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSvgRenderer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSvgRenderer_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSvgRenderer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QSvgRenderer_Delete(QSvgRenderer* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/svg/gen_qsvgwidget.cpp b/qt/svg/gen_qsvgwidget.cpp new file mode 100644 index 00000000..4804b7df --- /dev/null +++ b/qt/svg/gen_qsvgwidget.cpp @@ -0,0 +1,1487 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#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_qsvgwidget.h" +#include "_cgo_export.h" + +class MiqtVirtualQSvgWidget : public virtual QSvgWidget { +public: + + MiqtVirtualQSvgWidget(QWidget* parent): QSvgWidget(parent) {}; + MiqtVirtualQSvgWidget(): QSvgWidget() {}; + MiqtVirtualQSvgWidget(const QString& file): QSvgWidget(file) {}; + MiqtVirtualQSvgWidget(const QString& file, QWidget* parent): QSvgWidget(file, parent) {}; + + virtual ~MiqtVirtualQSvgWidget() = 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 QSvgWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSvgWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QSvgWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QSvgWidget::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QSvgWidget::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QSvgWidget::devType(); + } + + + int callback_return_value = miqt_exec_callback_QSvgWidget_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QSvgWidget::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) { + QSvgWidget::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QSvgWidget_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QSvgWidget::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QSvgWidget::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSvgWidget_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QSvgWidget::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 QSvgWidget::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QSvgWidget_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 QSvgWidget::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 QSvgWidget::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QSvgWidget_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QSvgWidget::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 QSvgWidget::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QSvgWidget_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QSvgWidget::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSvgWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSvgWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSvgWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QSvgWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QSvgWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QSvgWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QSvgWidget::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) { + QSvgWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QSvgWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QSvgWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QSvgWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QSvgWidget::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QSvgWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QSvgWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QSvgWidget::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) { + QSvgWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QSvgWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QSvgWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QSvgWidget::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) { + QSvgWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QSvgWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QSvgWidget::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QSvgWidget::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) { + QSvgWidget::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QSvgWidget::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) { + QSvgWidget::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QSvgWidget::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) { + QSvgWidget::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QSvgWidget::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) { + QSvgWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QSvgWidget::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) { + QSvgWidget::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QSvgWidget::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) { + QSvgWidget::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QSvgWidget::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) { + QSvgWidget::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QSvgWidget::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) { + QSvgWidget::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QSvgWidget::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) { + QSvgWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QSvgWidget::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) { + QSvgWidget::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QSvgWidget::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) { + QSvgWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QSvgWidget::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) { + QSvgWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QSvgWidget::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) { + QSvgWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QSvgWidget::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 QSvgWidget::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_QSvgWidget_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 QSvgWidget::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QSvgWidget::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QSvgWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QSvgWidget::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QSvgWidget::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QSvgWidget_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 QSvgWidget::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) { + QSvgWidget::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QSvgWidget_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QSvgWidget::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 QSvgWidget::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QSvgWidget_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QSvgWidget::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 QSvgWidget::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QSvgWidget_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QSvgWidget::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) { + QSvgWidget::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QSvgWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QSvgWidget::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 QSvgWidget::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QSvgWidget_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(QSvgWidget::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 QSvgWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QSvgWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QSvgWidget::focusNextPrevChild(next); + + } + +}; + +void QSvgWidget_new(QWidget* parent, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSvgWidget* ret = new MiqtVirtualQSvgWidget(parent); + *outptr_QSvgWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QSvgWidget_new2(QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSvgWidget* ret = new MiqtVirtualQSvgWidget(); + *outptr_QSvgWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QSvgWidget_new3(struct miqt_string file, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + QString file_QString = QString::fromUtf8(file.data, file.len); + MiqtVirtualQSvgWidget* ret = new MiqtVirtualQSvgWidget(file_QString); + *outptr_QSvgWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QSvgWidget_new4(struct miqt_string file, QWidget* parent, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + QString file_QString = QString::fromUtf8(file.data, file.len); + MiqtVirtualQSvgWidget* ret = new MiqtVirtualQSvgWidget(file_QString, parent); + *outptr_QSvgWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QSvgWidget_MetaObject(const QSvgWidget* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QSvgWidget_Metacast(QSvgWidget* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QSvgWidget_Tr(const char* s) { + QString _ret = QSvgWidget::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSvgWidget_TrUtf8(const char* s) { + QString _ret = QSvgWidget::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QSvgRenderer* QSvgWidget_Renderer(const QSvgWidget* self) { + return self->renderer(); +} + +QSize* QSvgWidget_SizeHint(const QSvgWidget* self) { + return new QSize(self->sizeHint()); +} + +void QSvgWidget_Load(QSvgWidget* self, struct miqt_string file) { + QString file_QString = QString::fromUtf8(file.data, file.len); + self->load(file_QString); +} + +void QSvgWidget_LoadWithContents(QSvgWidget* self, struct miqt_string contents) { + QByteArray contents_QByteArray(contents.data, contents.len); + self->load(contents_QByteArray); +} + +struct miqt_string QSvgWidget_Tr2(const char* s, const char* c) { + QString _ret = QSvgWidget::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSvgWidget_Tr3(const char* s, const char* c, int n) { + QString _ret = QSvgWidget::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSvgWidget_TrUtf82(const char* s, const char* c) { + QString _ret = QSvgWidget::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSvgWidget_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QSvgWidget::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSvgWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QSvgWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_SizeHint(); +} + +void QSvgWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__PaintEvent = slot; +} + +void QSvgWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_PaintEvent(event); +} + +void QSvgWidget_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__DevType = slot; +} + +int QSvgWidget_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_DevType(); +} + +void QSvgWidget_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__SetVisible = slot; +} + +void QSvgWidget_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_SetVisible(visible); +} + +void QSvgWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QSvgWidget_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QSvgWidget_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__HeightForWidth = slot; +} + +int QSvgWidget_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QSvgWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QSvgWidget_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QSvgWidget_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QSvgWidget_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_PaintEngine(); +} + +void QSvgWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__Event = slot; +} + +bool QSvgWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_Event(event); +} + +void QSvgWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QSvgWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QSvgWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QSvgWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QSvgWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QSvgWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QSvgWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QSvgWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QSvgWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__WheelEvent = slot; +} + +void QSvgWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QSvgWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QSvgWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QSvgWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QSvgWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QSvgWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QSvgWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QSvgWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QSvgWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QSvgWidget_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__EnterEvent = slot; +} + +void QSvgWidget_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_EnterEvent(event); +} + +void QSvgWidget_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__LeaveEvent = slot; +} + +void QSvgWidget_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_LeaveEvent(event); +} + +void QSvgWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__MoveEvent = slot; +} + +void QSvgWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QSvgWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QSvgWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_ResizeEvent(event); +} + +void QSvgWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__CloseEvent = slot; +} + +void QSvgWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QSvgWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QSvgWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QSvgWidget_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__TabletEvent = slot; +} + +void QSvgWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_TabletEvent(event); +} + +void QSvgWidget_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__ActionEvent = slot; +} + +void QSvgWidget_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_ActionEvent(event); +} + +void QSvgWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QSvgWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QSvgWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QSvgWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QSvgWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QSvgWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QSvgWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__DropEvent = slot; +} + +void QSvgWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QSvgWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__ShowEvent = slot; +} + +void QSvgWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QSvgWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__HideEvent = slot; +} + +void QSvgWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QSvgWidget_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__NativeEvent = slot; +} + +bool QSvgWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QSvgWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QSvgWidget_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QSvgWidget_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__Metric = slot; +} + +int QSvgWidget_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_Metric(param1); +} + +void QSvgWidget_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__InitPainter = slot; +} + +void QSvgWidget_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_InitPainter(painter); +} + +void QSvgWidget_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QSvgWidget_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_Redirected(offset); +} + +void QSvgWidget_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QSvgWidget_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_SharedPainter(); +} + +void QSvgWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QSvgWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QSvgWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QSvgWidget_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QSvgWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QSvgWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QSvgWidget_Delete(QSvgWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/svg/gen_qsvgwidget.go b/qt/svg/gen_qsvgwidget.go new file mode 100644 index 00000000..5b620f90 --- /dev/null +++ b/qt/svg/gen_qsvgwidget.go @@ -0,0 +1,1193 @@ +package svg + +/* + +#include "gen_qsvgwidget.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QSvgWidget struct { + h *C.QSvgWidget + isSubclass bool + *qt.QWidget +} + +func (this *QSvgWidget) cPointer() *C.QSvgWidget { + if this == nil { + return nil + } + return this.h +} + +func (this *QSvgWidget) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQSvgWidget constructs the type using only CGO pointers. +func newQSvgWidget(h *C.QSvgWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSvgWidget { + if h == nil { + return nil + } + return &QSvgWidget{h: h, + QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} +} + +// UnsafeNewQSvgWidget constructs the type using only unsafe pointers. +func UnsafeNewQSvgWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSvgWidget { + if h == nil { + return nil + } + + return &QSvgWidget{h: (*C.QSvgWidget)(h), + QWidget: qt.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +} + +// NewQSvgWidget constructs a new QSvgWidget object. +func NewQSvgWidget(parent *qt.QWidget) *QSvgWidget { + var outptr_QSvgWidget *C.QSvgWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSvgWidget_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QSvgWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSvgWidget(outptr_QSvgWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQSvgWidget2 constructs a new QSvgWidget object. +func NewQSvgWidget2() *QSvgWidget { + var outptr_QSvgWidget *C.QSvgWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSvgWidget_new2(&outptr_QSvgWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSvgWidget(outptr_QSvgWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQSvgWidget3 constructs a new QSvgWidget object. +func NewQSvgWidget3(file string) *QSvgWidget { + file_ms := C.struct_miqt_string{} + file_ms.data = C.CString(file) + file_ms.len = C.size_t(len(file)) + defer C.free(unsafe.Pointer(file_ms.data)) + var outptr_QSvgWidget *C.QSvgWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSvgWidget_new3(file_ms, &outptr_QSvgWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSvgWidget(outptr_QSvgWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQSvgWidget4 constructs a new QSvgWidget object. +func NewQSvgWidget4(file string, parent *qt.QWidget) *QSvgWidget { + file_ms := C.struct_miqt_string{} + file_ms.data = C.CString(file) + file_ms.len = C.size_t(len(file)) + defer C.free(unsafe.Pointer(file_ms.data)) + var outptr_QSvgWidget *C.QSvgWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSvgWidget_new4(file_ms, (*C.QWidget)(parent.UnsafePointer()), &outptr_QSvgWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSvgWidget(outptr_QSvgWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +func (this *QSvgWidget) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QSvgWidget_MetaObject(this.h))) +} + +func (this *QSvgWidget) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QSvgWidget_Metacast(this.h, param1_Cstring)) +} + +func QSvgWidget_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QSvgWidget_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QSvgWidget_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QSvgWidget_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QSvgWidget) Renderer() *QSvgRenderer { + return UnsafeNewQSvgRenderer(unsafe.Pointer(C.QSvgWidget_Renderer(this.h)), nil) +} + +func (this *QSvgWidget) SizeHint() *qt.QSize { + _ret := C.QSvgWidget_SizeHint(this.h) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgWidget) Load(file string) { + file_ms := C.struct_miqt_string{} + file_ms.data = C.CString(file) + file_ms.len = C.size_t(len(file)) + defer C.free(unsafe.Pointer(file_ms.data)) + C.QSvgWidget_Load(this.h, file_ms) +} + +func (this *QSvgWidget) LoadWithContents(contents []byte) { + contents_alias := C.struct_miqt_string{} + contents_alias.data = (*C.char)(unsafe.Pointer(&contents[0])) + contents_alias.len = C.size_t(len(contents)) + C.QSvgWidget_LoadWithContents(this.h, contents_alias) +} + +func QSvgWidget_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QSvgWidget_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QSvgWidget_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QSvgWidget_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QSvgWidget_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QSvgWidget_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QSvgWidget_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QSvgWidget_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QSvgWidget) callVirtualBase_SizeHint() *qt.QSize { + + _ret := C.QSvgWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSvgWidget) OnSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QSvgWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_SizeHint +func miqt_exec_callback_QSvgWidget_SizeHint(self *C.QSvgWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QSvgWidget) callVirtualBase_PaintEvent(event *qt.QPaintEvent) { + + C.QSvgWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnPaintEvent(slot func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) { + C.QSvgWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_PaintEvent +func miqt_exec_callback_QSvgWidget_PaintEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_DevType() int { + + return (int)(C.QSvgWidget_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QSvgWidget) OnDevType(slot func(super func() int) int) { + C.QSvgWidget_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_DevType +func miqt_exec_callback_QSvgWidget_DevType(self *C.QSvgWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QSvgWidget) callVirtualBase_SetVisible(visible bool) { + + C.QSvgWidget_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QSvgWidget) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QSvgWidget_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_SetVisible +func miqt_exec_callback_QSvgWidget_SetVisible(self *C.QSvgWidget, 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((&QSvgWidget{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_MinimumSizeHint() *qt.QSize { + + _ret := C.QSvgWidget_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSvgWidget) OnMinimumSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QSvgWidget_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_MinimumSizeHint +func miqt_exec_callback_QSvgWidget_MinimumSizeHint(self *C.QSvgWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QSvgWidget) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QSvgWidget_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSvgWidget) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QSvgWidget_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_HeightForWidth +func miqt_exec_callback_QSvgWidget_HeightForWidth(self *C.QSvgWidget, 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((&QSvgWidget{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSvgWidget) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QSvgWidget_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QSvgWidget) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QSvgWidget_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_HasHeightForWidth +func miqt_exec_callback_QSvgWidget_HasHeightForWidth(self *C.QSvgWidget, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QSvgWidget) callVirtualBase_PaintEngine() *qt.QPaintEngine { + + return qt.UnsafeNewQPaintEngine(unsafe.Pointer(C.QSvgWidget_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QSvgWidget) OnPaintEngine(slot func(super func() *qt.QPaintEngine) *qt.QPaintEngine) { + C.QSvgWidget_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_PaintEngine +func miqt_exec_callback_QSvgWidget_PaintEngine(self *C.QSvgWidget, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPaintEngine) *qt.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QSvgWidget) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QSvgWidget_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QSvgWidget) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QSvgWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_Event +func miqt_exec_callback_QSvgWidget_Event(self *C.QSvgWidget, 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((&QSvgWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSvgWidget) callVirtualBase_MousePressEvent(event *qt.QMouseEvent) { + + C.QSvgWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnMousePressEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QSvgWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_MousePressEvent +func miqt_exec_callback_QSvgWidget_MousePressEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_MouseReleaseEvent(event *qt.QMouseEvent) { + + C.QSvgWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnMouseReleaseEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QSvgWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_MouseReleaseEvent +func miqt_exec_callback_QSvgWidget_MouseReleaseEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_MouseDoubleClickEvent(event *qt.QMouseEvent) { + + C.QSvgWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnMouseDoubleClickEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QSvgWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_MouseDoubleClickEvent +func miqt_exec_callback_QSvgWidget_MouseDoubleClickEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_MouseMoveEvent(event *qt.QMouseEvent) { + + C.QSvgWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnMouseMoveEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QSvgWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_MouseMoveEvent +func miqt_exec_callback_QSvgWidget_MouseMoveEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_WheelEvent(event *qt.QWheelEvent) { + + C.QSvgWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnWheelEvent(slot func(super func(event *qt.QWheelEvent), event *qt.QWheelEvent)) { + C.QSvgWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_WheelEvent +func miqt_exec_callback_QSvgWidget_WheelEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QWheelEvent), event *qt.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_KeyPressEvent(event *qt.QKeyEvent) { + + C.QSvgWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnKeyPressEvent(slot func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) { + C.QSvgWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_KeyPressEvent +func miqt_exec_callback_QSvgWidget_KeyPressEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_KeyReleaseEvent(event *qt.QKeyEvent) { + + C.QSvgWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnKeyReleaseEvent(slot func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) { + C.QSvgWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_KeyReleaseEvent +func miqt_exec_callback_QSvgWidget_KeyReleaseEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_FocusInEvent(event *qt.QFocusEvent) { + + C.QSvgWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnFocusInEvent(slot func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) { + C.QSvgWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_FocusInEvent +func miqt_exec_callback_QSvgWidget_FocusInEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_FocusOutEvent(event *qt.QFocusEvent) { + + C.QSvgWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnFocusOutEvent(slot func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) { + C.QSvgWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_FocusOutEvent +func miqt_exec_callback_QSvgWidget_FocusOutEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_EnterEvent(event *qt.QEvent) { + + C.QSvgWidget_virtualbase_EnterEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnEnterEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QSvgWidget_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_EnterEvent +func miqt_exec_callback_QSvgWidget_EnterEvent(self *C.QSvgWidget, 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((&QSvgWidget{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_LeaveEvent(event *qt.QEvent) { + + C.QSvgWidget_virtualbase_LeaveEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnLeaveEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QSvgWidget_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_LeaveEvent +func miqt_exec_callback_QSvgWidget_LeaveEvent(self *C.QSvgWidget, 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((&QSvgWidget{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_MoveEvent(event *qt.QMoveEvent) { + + C.QSvgWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), (*C.QMoveEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnMoveEvent(slot func(super func(event *qt.QMoveEvent), event *qt.QMoveEvent)) { + C.QSvgWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_MoveEvent +func miqt_exec_callback_QSvgWidget_MoveEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMoveEvent), event *qt.QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_ResizeEvent(event *qt.QResizeEvent) { + + C.QSvgWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnResizeEvent(slot func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) { + C.QSvgWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_ResizeEvent +func miqt_exec_callback_QSvgWidget_ResizeEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_CloseEvent(event *qt.QCloseEvent) { + + C.QSvgWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnCloseEvent(slot func(super func(event *qt.QCloseEvent), event *qt.QCloseEvent)) { + C.QSvgWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_CloseEvent +func miqt_exec_callback_QSvgWidget_CloseEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QCloseEvent), event *qt.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_ContextMenuEvent(event *qt.QContextMenuEvent) { + + C.QSvgWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnContextMenuEvent(slot func(super func(event *qt.QContextMenuEvent), event *qt.QContextMenuEvent)) { + C.QSvgWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_ContextMenuEvent +func miqt_exec_callback_QSvgWidget_ContextMenuEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QContextMenuEvent), event *qt.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_TabletEvent(event *qt.QTabletEvent) { + + C.QSvgWidget_virtualbase_TabletEvent(unsafe.Pointer(this.h), (*C.QTabletEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnTabletEvent(slot func(super func(event *qt.QTabletEvent), event *qt.QTabletEvent)) { + C.QSvgWidget_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_TabletEvent +func miqt_exec_callback_QSvgWidget_TabletEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTabletEvent), event *qt.QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_ActionEvent(event *qt.QActionEvent) { + + C.QSvgWidget_virtualbase_ActionEvent(unsafe.Pointer(this.h), (*C.QActionEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnActionEvent(slot func(super func(event *qt.QActionEvent), event *qt.QActionEvent)) { + C.QSvgWidget_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_ActionEvent +func miqt_exec_callback_QSvgWidget_ActionEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QActionEvent), event *qt.QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_DragEnterEvent(event *qt.QDragEnterEvent) { + + C.QSvgWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnDragEnterEvent(slot func(super func(event *qt.QDragEnterEvent), event *qt.QDragEnterEvent)) { + C.QSvgWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_DragEnterEvent +func miqt_exec_callback_QSvgWidget_DragEnterEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragEnterEvent), event *qt.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_DragMoveEvent(event *qt.QDragMoveEvent) { + + C.QSvgWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnDragMoveEvent(slot func(super func(event *qt.QDragMoveEvent), event *qt.QDragMoveEvent)) { + C.QSvgWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_DragMoveEvent +func miqt_exec_callback_QSvgWidget_DragMoveEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragMoveEvent), event *qt.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_DragLeaveEvent(event *qt.QDragLeaveEvent) { + + C.QSvgWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnDragLeaveEvent(slot func(super func(event *qt.QDragLeaveEvent), event *qt.QDragLeaveEvent)) { + C.QSvgWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_DragLeaveEvent +func miqt_exec_callback_QSvgWidget_DragLeaveEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragLeaveEvent), event *qt.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_DropEvent(event *qt.QDropEvent) { + + C.QSvgWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnDropEvent(slot func(super func(event *qt.QDropEvent), event *qt.QDropEvent)) { + C.QSvgWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_DropEvent +func miqt_exec_callback_QSvgWidget_DropEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDropEvent), event *qt.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_ShowEvent(event *qt.QShowEvent) { + + C.QSvgWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnShowEvent(slot func(super func(event *qt.QShowEvent), event *qt.QShowEvent)) { + C.QSvgWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_ShowEvent +func miqt_exec_callback_QSvgWidget_ShowEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QShowEvent), event *qt.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_HideEvent(event *qt.QHideEvent) { + + C.QSvgWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), (*C.QHideEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnHideEvent(slot func(super func(event *qt.QHideEvent), event *qt.QHideEvent)) { + C.QSvgWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_HideEvent +func miqt_exec_callback_QSvgWidget_HideEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QHideEvent), event *qt.QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QSvgWidget) 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.QSvgWidget_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QSvgWidget) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QSvgWidget_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_NativeEvent +func miqt_exec_callback_QSvgWidget_NativeEvent(self *C.QSvgWidget, 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((&QSvgWidget{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSvgWidget) callVirtualBase_ChangeEvent(param1 *qt.QEvent) { + + C.QSvgWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer())) + +} +func (this *QSvgWidget) OnChangeEvent(slot func(super func(param1 *qt.QEvent), param1 *qt.QEvent)) { + C.QSvgWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_ChangeEvent +func miqt_exec_callback_QSvgWidget_ChangeEvent(self *C.QSvgWidget, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent), param1 *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_Metric(param1 qt.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QSvgWidget_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSvgWidget) OnMetric(slot func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) { + C.QSvgWidget_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_Metric +func miqt_exec_callback_QSvgWidget_Metric(self *C.QSvgWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSvgWidget) callVirtualBase_InitPainter(painter *qt.QPainter) { + + C.QSvgWidget_virtualbase_InitPainter(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer())) + +} +func (this *QSvgWidget) OnInitPainter(slot func(super func(painter *qt.QPainter), painter *qt.QPainter)) { + C.QSvgWidget_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_InitPainter +func miqt_exec_callback_QSvgWidget_InitPainter(self *C.QSvgWidget, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt.QPainter), painter *qt.QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_Redirected(offset *qt.QPoint) *qt.QPaintDevice { + + return qt.UnsafeNewQPaintDevice(unsafe.Pointer(C.QSvgWidget_virtualbase_Redirected(unsafe.Pointer(this.h), (*C.QPoint)(offset.UnsafePointer())))) +} +func (this *QSvgWidget) OnRedirected(slot func(super func(offset *qt.QPoint) *qt.QPaintDevice, offset *qt.QPoint) *qt.QPaintDevice) { + C.QSvgWidget_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_Redirected +func miqt_exec_callback_QSvgWidget_Redirected(self *C.QSvgWidget, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *qt.QPoint) *qt.QPaintDevice, offset *qt.QPoint) *qt.QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_Redirected, slotval1) + + return (*C.QPaintDevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QSvgWidget) callVirtualBase_SharedPainter() *qt.QPainter { + + return qt.UnsafeNewQPainter(unsafe.Pointer(C.QSvgWidget_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QSvgWidget) OnSharedPainter(slot func(super func() *qt.QPainter) *qt.QPainter) { + C.QSvgWidget_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_SharedPainter +func miqt_exec_callback_QSvgWidget_SharedPainter(self *C.QSvgWidget, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPainter) *qt.QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_SharedPainter) + + return (*C.QPainter)(virtualReturn.UnsafePointer()) + +} + +func (this *QSvgWidget) callVirtualBase_InputMethodEvent(param1 *qt.QInputMethodEvent) { + + C.QSvgWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(param1.UnsafePointer())) + +} +func (this *QSvgWidget) OnInputMethodEvent(slot func(super func(param1 *qt.QInputMethodEvent), param1 *qt.QInputMethodEvent)) { + C.QSvgWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_InputMethodEvent +func miqt_exec_callback_QSvgWidget_InputMethodEvent(self *C.QSvgWidget, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QInputMethodEvent), param1 *qt.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_InputMethodQuery(param1 qt.InputMethodQuery) *qt.QVariant { + + _ret := C.QSvgWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSvgWidget) OnInputMethodQuery(slot func(super func(param1 qt.InputMethodQuery) *qt.QVariant, param1 qt.InputMethodQuery) *qt.QVariant) { + C.QSvgWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_InputMethodQuery +func miqt_exec_callback_QSvgWidget_InputMethodQuery(self *C.QSvgWidget, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt.InputMethodQuery) *qt.QVariant, param1 qt.InputMethodQuery) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.InputMethodQuery)(param1) + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QSvgWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QSvgWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QSvgWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QSvgWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_FocusNextPrevChild +func miqt_exec_callback_QSvgWidget_FocusNextPrevChild(self *C.QSvgWidget, 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((&QSvgWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +// Delete this object from C++ memory. +func (this *QSvgWidget) Delete() { + C.QSvgWidget_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 *QSvgWidget) GoGC() { + runtime.SetFinalizer(this, func(this *QSvgWidget) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/svg/gen_qsvgwidget.h b/qt/svg/gen_qsvgwidget.h new file mode 100644 index 00000000..a5e9228b --- /dev/null +++ b/qt/svg/gen_qsvgwidget.h @@ -0,0 +1,188 @@ +#pragma once +#ifndef MIQT_QT_SVG_GEN_QSVGWIDGET_H +#define MIQT_QT_SVG_GEN_QSVGWIDGET_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; +class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; +class QSize; +class QSvgRenderer; +class QSvgWidget; +class QTabletEvent; +class QVariant; +class QWheelEvent; +class QWidget; +#else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; +typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QSvgRenderer QSvgRenderer; +typedef struct QSvgWidget QSvgWidget; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; +typedef struct QWidget QWidget; +#endif + +void QSvgWidget_new(QWidget* parent, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSvgWidget_new2(QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSvgWidget_new3(struct miqt_string file, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSvgWidget_new4(struct miqt_string file, QWidget* parent, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMetaObject* QSvgWidget_MetaObject(const QSvgWidget* self); +void* QSvgWidget_Metacast(QSvgWidget* self, const char* param1); +struct miqt_string QSvgWidget_Tr(const char* s); +struct miqt_string QSvgWidget_TrUtf8(const char* s); +QSvgRenderer* QSvgWidget_Renderer(const QSvgWidget* self); +QSize* QSvgWidget_SizeHint(const QSvgWidget* self); +void QSvgWidget_Load(QSvgWidget* self, struct miqt_string file); +void QSvgWidget_LoadWithContents(QSvgWidget* self, struct miqt_string contents); +void QSvgWidget_PaintEvent(QSvgWidget* self, QPaintEvent* event); +struct miqt_string QSvgWidget_Tr2(const char* s, const char* c); +struct miqt_string QSvgWidget_Tr3(const char* s, const char* c, int n); +struct miqt_string QSvgWidget_TrUtf82(const char* s, const char* c); +struct miqt_string QSvgWidget_TrUtf83(const char* s, const char* c, int n); +void QSvgWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QSvgWidget_virtualbase_SizeHint(const void* self); +void QSvgWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QSvgWidget_override_virtual_DevType(void* self, intptr_t slot); +int QSvgWidget_virtualbase_DevType(const void* self); +void QSvgWidget_override_virtual_SetVisible(void* self, intptr_t slot); +void QSvgWidget_virtualbase_SetVisible(void* self, bool visible); +void QSvgWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QSvgWidget_virtualbase_MinimumSizeHint(const void* self); +void QSvgWidget_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QSvgWidget_virtualbase_HeightForWidth(const void* self, int param1); +void QSvgWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QSvgWidget_virtualbase_HasHeightForWidth(const void* self); +void QSvgWidget_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QSvgWidget_virtualbase_PaintEngine(const void* self); +void QSvgWidget_override_virtual_Event(void* self, intptr_t slot); +bool QSvgWidget_virtualbase_Event(void* self, QEvent* event); +void QSvgWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QSvgWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QSvgWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QSvgWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QSvgWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QSvgWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QSvgWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QSvgWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QSvgWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QSvgWidget_override_virtual_EnterEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_EnterEvent(void* self, QEvent* event); +void QSvgWidget_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_LeaveEvent(void* self, QEvent* event); +void QSvgWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QSvgWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QSvgWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QSvgWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QSvgWidget_override_virtual_TabletEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QSvgWidget_override_virtual_ActionEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QSvgWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QSvgWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QSvgWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QSvgWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QSvgWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QSvgWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QSvgWidget_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QSvgWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QSvgWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QSvgWidget_override_virtual_Metric(void* self, intptr_t slot); +int QSvgWidget_virtualbase_Metric(const void* self, int param1); +void QSvgWidget_override_virtual_InitPainter(void* self, intptr_t slot); +void QSvgWidget_virtualbase_InitPainter(const void* self, QPainter* painter); +void QSvgWidget_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QSvgWidget_virtualbase_Redirected(const void* self, QPoint* offset); +void QSvgWidget_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QSvgWidget_virtualbase_SharedPainter(const void* self); +void QSvgWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QSvgWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QSvgWidget_virtualbase_InputMethodQuery(const void* self, int param1); +void QSvgWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QSvgWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QSvgWidget_Delete(QSvgWidget* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/svg/cflags.go b/qt6/svg/cflags.go new file mode 100644 index 00000000..3854d207 --- /dev/null +++ b/qt6/svg/cflags.go @@ -0,0 +1,6 @@ +package svg + +/* +#cgo pkg-config: Qt6SvgWidgets +*/ +import "C" diff --git a/qt6/svg/gen_qgraphicssvgitem.cpp b/qt6/svg/gen_qgraphicssvgitem.cpp new file mode 100644 index 00000000..a163cf9c --- /dev/null +++ b/qt6/svg/gen_qgraphicssvgitem.cpp @@ -0,0 +1,291 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qgraphicssvgitem.h" +#include "_cgo_export.h" + +class MiqtVirtualQGraphicsSvgItem : public virtual QGraphicsSvgItem { +public: + + MiqtVirtualQGraphicsSvgItem(): QGraphicsSvgItem() {}; + MiqtVirtualQGraphicsSvgItem(const QString& fileName): QGraphicsSvgItem(fileName) {}; + MiqtVirtualQGraphicsSvgItem(QGraphicsItem* parentItem): QGraphicsSvgItem(parentItem) {}; + MiqtVirtualQGraphicsSvgItem(const QString& fileName, QGraphicsItem* parentItem): QGraphicsSvgItem(fileName, parentItem) {}; + + virtual ~MiqtVirtualQGraphicsSvgItem() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsSvgItem::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsSvgItem_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsSvgItem::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsSvgItem::paint(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsSvgItem_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsSvgItem::paint(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsSvgItem::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsSvgItem_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsSvgItem::type(); + + } + + // 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 QGraphicsSvgItem::event(ev); + } + + QEvent* sigval1 = ev; + + bool callback_return_value = miqt_exec_callback_QGraphicsSvgItem_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* ev) { + + return QGraphicsSvgItem::event(ev); + + } + +}; + +void QGraphicsSvgItem_new(QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsSvgItem* ret = new MiqtVirtualQGraphicsSvgItem(); + *outptr_QGraphicsSvgItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsSvgItem_new2(struct miqt_string fileName, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + MiqtVirtualQGraphicsSvgItem* ret = new MiqtVirtualQGraphicsSvgItem(fileName_QString); + *outptr_QGraphicsSvgItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsSvgItem_new3(QGraphicsItem* parentItem, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + MiqtVirtualQGraphicsSvgItem* ret = new MiqtVirtualQGraphicsSvgItem(parentItem); + *outptr_QGraphicsSvgItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +void QGraphicsSvgItem_new4(struct miqt_string fileName, QGraphicsItem* parentItem, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + MiqtVirtualQGraphicsSvgItem* ret = new MiqtVirtualQGraphicsSvgItem(fileName_QString, parentItem); + *outptr_QGraphicsSvgItem = ret; + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); +} + +QMetaObject* QGraphicsSvgItem_MetaObject(const QGraphicsSvgItem* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QGraphicsSvgItem_Metacast(QGraphicsSvgItem* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QGraphicsSvgItem_Tr(const char* s) { + QString _ret = QGraphicsSvgItem::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QGraphicsSvgItem_SetSharedRenderer(QGraphicsSvgItem* self, QSvgRenderer* renderer) { + self->setSharedRenderer(renderer); +} + +QSvgRenderer* QGraphicsSvgItem_Renderer(const QGraphicsSvgItem* self) { + return self->renderer(); +} + +void QGraphicsSvgItem_SetElementId(QGraphicsSvgItem* self, struct miqt_string id) { + QString id_QString = QString::fromUtf8(id.data, id.len); + self->setElementId(id_QString); +} + +struct miqt_string QGraphicsSvgItem_ElementId(const QGraphicsSvgItem* self) { + QString _ret = self->elementId(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QGraphicsSvgItem_SetCachingEnabled(QGraphicsSvgItem* self, bool cachingEnabled) { + self->setCachingEnabled(cachingEnabled); +} + +bool QGraphicsSvgItem_IsCachingEnabled(const QGraphicsSvgItem* self) { + return self->isCachingEnabled(); +} + +void QGraphicsSvgItem_SetMaximumCacheSize(QGraphicsSvgItem* self, QSize* size) { + self->setMaximumCacheSize(*size); +} + +QSize* QGraphicsSvgItem_MaximumCacheSize(const QGraphicsSvgItem* self) { + return new QSize(self->maximumCacheSize()); +} + +QRectF* QGraphicsSvgItem_BoundingRect(const QGraphicsSvgItem* self) { + return new QRectF(self->boundingRect()); +} + +void QGraphicsSvgItem_Paint(QGraphicsSvgItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + self->paint(painter, option, widget); +} + +int QGraphicsSvgItem_Type(const QGraphicsSvgItem* self) { + return self->type(); +} + +struct miqt_string QGraphicsSvgItem_Tr2(const char* s, const char* c) { + QString _ret = QGraphicsSvgItem::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QGraphicsSvgItem_Tr3(const char* s, const char* c, int n) { + QString _ret = QGraphicsSvgItem::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QGraphicsSvgItem_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSvgItem*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsSvgItem_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsSvgItem*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsSvgItem_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSvgItem*)(self) )->handle__Paint = slot; +} + +void QGraphicsSvgItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsSvgItem*)(self) )->virtualbase_Paint(painter, option, widget); +} + +void QGraphicsSvgItem_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSvgItem*)(self) )->handle__Type = slot; +} + +int QGraphicsSvgItem_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsSvgItem*)(self) )->virtualbase_Type(); +} + +void QGraphicsSvgItem_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsSvgItem*)(self) )->handle__Event = slot; +} + +bool QGraphicsSvgItem_virtualbase_Event(void* self, QEvent* ev) { + return ( (MiqtVirtualQGraphicsSvgItem*)(self) )->virtualbase_Event(ev); +} + +void QGraphicsSvgItem_Delete(QGraphicsSvgItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/svg/gen_qgraphicssvgitem.go b/qt6/svg/gen_qgraphicssvgitem.go new file mode 100644 index 00000000..948840e4 --- /dev/null +++ b/qt6/svg/gen_qgraphicssvgitem.go @@ -0,0 +1,330 @@ +package svg + +/* + +#include "gen_qgraphicssvgitem.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QGraphicsSvgItem__ int + +const ( + QGraphicsSvgItem__Type QGraphicsSvgItem__ = 13 +) + +type QGraphicsSvgItem struct { + h *C.QGraphicsSvgItem + isSubclass bool + *qt6.QGraphicsObject +} + +func (this *QGraphicsSvgItem) cPointer() *C.QGraphicsSvgItem { + if this == nil { + return nil + } + return this.h +} + +func (this *QGraphicsSvgItem) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQGraphicsSvgItem constructs the type using only CGO pointers. +func newQGraphicsSvgItem(h *C.QGraphicsSvgItem, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsSvgItem { + if h == nil { + return nil + } + return &QGraphicsSvgItem{h: h, + QGraphicsObject: qt6.UnsafeNewQGraphicsObject(unsafe.Pointer(h_QGraphicsObject), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QGraphicsItem))} +} + +// UnsafeNewQGraphicsSvgItem constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsSvgItem(h unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsSvgItem { + if h == nil { + return nil + } + + return &QGraphicsSvgItem{h: (*C.QGraphicsSvgItem)(h), + QGraphicsObject: qt6.UnsafeNewQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem)} +} + +// NewQGraphicsSvgItem constructs a new QGraphicsSvgItem object. +func NewQGraphicsSvgItem() *QGraphicsSvgItem { + var outptr_QGraphicsSvgItem *C.QGraphicsSvgItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsSvgItem_new(&outptr_QGraphicsSvgItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsSvgItem(outptr_QGraphicsSvgItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsSvgItem2 constructs a new QGraphicsSvgItem object. +func NewQGraphicsSvgItem2(fileName string) *QGraphicsSvgItem { + 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)) + var outptr_QGraphicsSvgItem *C.QGraphicsSvgItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsSvgItem_new2(fileName_ms, &outptr_QGraphicsSvgItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsSvgItem(outptr_QGraphicsSvgItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsSvgItem3 constructs a new QGraphicsSvgItem object. +func NewQGraphicsSvgItem3(parentItem *qt6.QGraphicsItem) *QGraphicsSvgItem { + var outptr_QGraphicsSvgItem *C.QGraphicsSvgItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsSvgItem_new3((*C.QGraphicsItem)(parentItem.UnsafePointer()), &outptr_QGraphicsSvgItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsSvgItem(outptr_QGraphicsSvgItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsSvgItem4 constructs a new QGraphicsSvgItem object. +func NewQGraphicsSvgItem4(fileName string, parentItem *qt6.QGraphicsItem) *QGraphicsSvgItem { + 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)) + var outptr_QGraphicsSvgItem *C.QGraphicsSvgItem = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + + C.QGraphicsSvgItem_new4(fileName_ms, (*C.QGraphicsItem)(parentItem.UnsafePointer()), &outptr_QGraphicsSvgItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) + ret := newQGraphicsSvgItem(outptr_QGraphicsSvgItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret.isSubclass = true + return ret +} + +func (this *QGraphicsSvgItem) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QGraphicsSvgItem_MetaObject(this.h))) +} + +func (this *QGraphicsSvgItem) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QGraphicsSvgItem_Metacast(this.h, param1_Cstring)) +} + +func QGraphicsSvgItem_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsSvgItem_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsSvgItem) SetSharedRenderer(renderer *QSvgRenderer) { + C.QGraphicsSvgItem_SetSharedRenderer(this.h, renderer.cPointer()) +} + +func (this *QGraphicsSvgItem) Renderer() *QSvgRenderer { + return UnsafeNewQSvgRenderer(unsafe.Pointer(C.QGraphicsSvgItem_Renderer(this.h)), nil) +} + +func (this *QGraphicsSvgItem) SetElementId(id string) { + id_ms := C.struct_miqt_string{} + id_ms.data = C.CString(id) + id_ms.len = C.size_t(len(id)) + defer C.free(unsafe.Pointer(id_ms.data)) + C.QGraphicsSvgItem_SetElementId(this.h, id_ms) +} + +func (this *QGraphicsSvgItem) ElementId() string { + var _ms C.struct_miqt_string = C.QGraphicsSvgItem_ElementId(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsSvgItem) SetCachingEnabled(cachingEnabled bool) { + C.QGraphicsSvgItem_SetCachingEnabled(this.h, (C.bool)(cachingEnabled)) +} + +func (this *QGraphicsSvgItem) IsCachingEnabled() bool { + return (bool)(C.QGraphicsSvgItem_IsCachingEnabled(this.h)) +} + +func (this *QGraphicsSvgItem) SetMaximumCacheSize(size *qt6.QSize) { + C.QGraphicsSvgItem_SetMaximumCacheSize(this.h, (*C.QSize)(size.UnsafePointer())) +} + +func (this *QGraphicsSvgItem) MaximumCacheSize() *qt6.QSize { + _ret := C.QGraphicsSvgItem_MaximumCacheSize(this.h) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsSvgItem) BoundingRect() *qt6.QRectF { + _ret := C.QGraphicsSvgItem_BoundingRect(this.h) + _goptr := qt6.UnsafeNewQRectF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsSvgItem) Paint(painter *qt6.QPainter, option *qt6.QStyleOptionGraphicsItem, widget *qt6.QWidget) { + C.QGraphicsSvgItem_Paint(this.h, (*C.QPainter)(painter.UnsafePointer()), (*C.QStyleOptionGraphicsItem)(option.UnsafePointer()), (*C.QWidget)(widget.UnsafePointer())) +} + +func (this *QGraphicsSvgItem) Type() int { + return (int)(C.QGraphicsSvgItem_Type(this.h)) +} + +func QGraphicsSvgItem_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsSvgItem_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QGraphicsSvgItem_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsSvgItem_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsSvgItem) callVirtualBase_BoundingRect() *qt6.QRectF { + + _ret := C.QGraphicsSvgItem_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQRectF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsSvgItem) OnBoundingRect(slot func(super func() *qt6.QRectF) *qt6.QRectF) { + C.QGraphicsSvgItem_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSvgItem_BoundingRect +func miqt_exec_callback_QGraphicsSvgItem_BoundingRect(self *C.QGraphicsSvgItem, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QRectF) *qt6.QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsSvgItem{h: self}).callVirtualBase_BoundingRect) + + return (*C.QRectF)(virtualReturn.UnsafePointer()) + +} + +func (this *QGraphicsSvgItem) callVirtualBase_Paint(painter *qt6.QPainter, option *qt6.QStyleOptionGraphicsItem, widget *qt6.QWidget) { + + C.QGraphicsSvgItem_virtualbase_Paint(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer()), (*C.QStyleOptionGraphicsItem)(option.UnsafePointer()), (*C.QWidget)(widget.UnsafePointer())) + +} +func (this *QGraphicsSvgItem) OnPaint(slot func(super func(painter *qt6.QPainter, option *qt6.QStyleOptionGraphicsItem, widget *qt6.QWidget), painter *qt6.QPainter, option *qt6.QStyleOptionGraphicsItem, widget *qt6.QWidget)) { + C.QGraphicsSvgItem_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSvgItem_Paint +func miqt_exec_callback_QGraphicsSvgItem_Paint(self *C.QGraphicsSvgItem, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt6.QPainter, option *qt6.QStyleOptionGraphicsItem, widget *qt6.QWidget), painter *qt6.QPainter, option *qt6.QStyleOptionGraphicsItem, widget *qt6.QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := qt6.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := qt6.UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsSvgItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsSvgItem) callVirtualBase_Type() int { + + return (int)(C.QGraphicsSvgItem_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsSvgItem) OnType(slot func(super func() int) int) { + C.QGraphicsSvgItem_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSvgItem_Type +func miqt_exec_callback_QGraphicsSvgItem_Type(self *C.QGraphicsSvgItem, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsSvgItem{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsSvgItem) callVirtualBase_Event(ev *qt6.QEvent) bool { + + return (bool)(C.QGraphicsSvgItem_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(ev.UnsafePointer()))) + +} +func (this *QGraphicsSvgItem) OnEvent(slot func(super func(ev *qt6.QEvent) bool, ev *qt6.QEvent) bool) { + C.QGraphicsSvgItem_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsSvgItem_Event +func miqt_exec_callback_QGraphicsSvgItem_Event(self *C.QGraphicsSvgItem, cb C.intptr_t, ev *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(ev *qt6.QEvent) bool, ev *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(ev)) + + virtualReturn := gofunc((&QGraphicsSvgItem{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +// Delete this object from C++ memory. +func (this *QGraphicsSvgItem) Delete() { + C.QGraphicsSvgItem_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 *QGraphicsSvgItem) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsSvgItem) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/svg/gen_qgraphicssvgitem.h b/qt6/svg/gen_qgraphicssvgitem.h new file mode 100644 index 00000000..14aefa4f --- /dev/null +++ b/qt6/svg/gen_qgraphicssvgitem.h @@ -0,0 +1,79 @@ +#pragma once +#ifndef MIQT_QT6_SVG_GEN_QGRAPHICSSVGITEM_H +#define MIQT_QT6_SVG_GEN_QGRAPHICSSVGITEM_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QEvent; +class QGraphicsItem; +class QGraphicsObject; +class QGraphicsSvgItem; +class QMetaObject; +class QObject; +class QPainter; +class QRectF; +class QSize; +class QStyleOptionGraphicsItem; +class QSvgRenderer; +class QWidget; +#else +typedef struct QEvent QEvent; +typedef struct QGraphicsItem QGraphicsItem; +typedef struct QGraphicsObject QGraphicsObject; +typedef struct QGraphicsSvgItem QGraphicsSvgItem; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPainter QPainter; +typedef struct QRectF QRectF; +typedef struct QSize QSize; +typedef struct QStyleOptionGraphicsItem QStyleOptionGraphicsItem; +typedef struct QSvgRenderer QSvgRenderer; +typedef struct QWidget QWidget; +#endif + +void QGraphicsSvgItem_new(QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsSvgItem_new2(struct miqt_string fileName, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsSvgItem_new3(QGraphicsItem* parentItem, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +void QGraphicsSvgItem_new4(struct miqt_string fileName, QGraphicsItem* parentItem, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +QMetaObject* QGraphicsSvgItem_MetaObject(const QGraphicsSvgItem* self); +void* QGraphicsSvgItem_Metacast(QGraphicsSvgItem* self, const char* param1); +struct miqt_string QGraphicsSvgItem_Tr(const char* s); +void QGraphicsSvgItem_SetSharedRenderer(QGraphicsSvgItem* self, QSvgRenderer* renderer); +QSvgRenderer* QGraphicsSvgItem_Renderer(const QGraphicsSvgItem* self); +void QGraphicsSvgItem_SetElementId(QGraphicsSvgItem* self, struct miqt_string id); +struct miqt_string QGraphicsSvgItem_ElementId(const QGraphicsSvgItem* self); +void QGraphicsSvgItem_SetCachingEnabled(QGraphicsSvgItem* self, bool cachingEnabled); +bool QGraphicsSvgItem_IsCachingEnabled(const QGraphicsSvgItem* self); +void QGraphicsSvgItem_SetMaximumCacheSize(QGraphicsSvgItem* self, QSize* size); +QSize* QGraphicsSvgItem_MaximumCacheSize(const QGraphicsSvgItem* self); +QRectF* QGraphicsSvgItem_BoundingRect(const QGraphicsSvgItem* self); +void QGraphicsSvgItem_Paint(QGraphicsSvgItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +int QGraphicsSvgItem_Type(const QGraphicsSvgItem* self); +struct miqt_string QGraphicsSvgItem_Tr2(const char* s, const char* c); +struct miqt_string QGraphicsSvgItem_Tr3(const char* s, const char* c, int n); +void QGraphicsSvgItem_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsSvgItem_virtualbase_BoundingRect(const void* self); +void QGraphicsSvgItem_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsSvgItem_virtualbase_Paint(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsSvgItem_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsSvgItem_virtualbase_Type(const void* self); +void QGraphicsSvgItem_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsSvgItem_virtualbase_Event(void* self, QEvent* ev); +void QGraphicsSvgItem_Delete(QGraphicsSvgItem* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/svg/gen_qsvggenerator.cpp b/qt6/svg/gen_qsvggenerator.cpp new file mode 100644 index 00000000..24e0877c --- /dev/null +++ b/qt6/svg/gen_qsvggenerator.cpp @@ -0,0 +1,312 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qsvggenerator.h" +#include "_cgo_export.h" + +class MiqtVirtualQSvgGenerator : public virtual QSvgGenerator { +public: + + MiqtVirtualQSvgGenerator(): QSvgGenerator() {}; + + virtual ~MiqtVirtualQSvgGenerator() = default; + + // 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 QSvgGenerator::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QSvgGenerator_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QSvgGenerator::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric metric) const override { + if (handle__Metric == 0) { + return QSvgGenerator::metric(metric); + } + + QPaintDevice::PaintDeviceMetric metric_ret = metric; + int sigval1 = static_cast(metric_ret); + + int callback_return_value = miqt_exec_callback_QSvgGenerator_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 QSvgGenerator::metric(static_cast(metric)); + + } + + // 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 QSvgGenerator::devType(); + } + + + int callback_return_value = miqt_exec_callback_QSvgGenerator_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QSvgGenerator::devType(); + + } + + // 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) { + QSvgGenerator::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QSvgGenerator_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QSvgGenerator::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 QSvgGenerator::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QSvgGenerator_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QSvgGenerator::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 QSvgGenerator::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QSvgGenerator_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QSvgGenerator::sharedPainter(); + + } + +}; + +void QSvgGenerator_new(QSvgGenerator** outptr_QSvgGenerator, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSvgGenerator* ret = new MiqtVirtualQSvgGenerator(); + *outptr_QSvgGenerator = ret; + *outptr_QPaintDevice = static_cast(ret); +} + +struct miqt_string QSvgGenerator_Title(const QSvgGenerator* self) { + QString _ret = self->title(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSvgGenerator_SetTitle(QSvgGenerator* self, struct miqt_string title) { + QString title_QString = QString::fromUtf8(title.data, title.len); + self->setTitle(title_QString); +} + +struct miqt_string QSvgGenerator_Description(const QSvgGenerator* self) { + QString _ret = self->description(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSvgGenerator_SetDescription(QSvgGenerator* self, struct miqt_string description) { + QString description_QString = QString::fromUtf8(description.data, description.len); + self->setDescription(description_QString); +} + +QSize* QSvgGenerator_Size(const QSvgGenerator* self) { + return new QSize(self->size()); +} + +void QSvgGenerator_SetSize(QSvgGenerator* self, QSize* size) { + self->setSize(*size); +} + +QRect* QSvgGenerator_ViewBox(const QSvgGenerator* self) { + return new QRect(self->viewBox()); +} + +QRectF* QSvgGenerator_ViewBoxF(const QSvgGenerator* self) { + return new QRectF(self->viewBoxF()); +} + +void QSvgGenerator_SetViewBox(QSvgGenerator* self, QRect* viewBox) { + self->setViewBox(*viewBox); +} + +void QSvgGenerator_SetViewBoxWithViewBox(QSvgGenerator* self, QRectF* viewBox) { + self->setViewBox(*viewBox); +} + +struct miqt_string QSvgGenerator_FileName(const QSvgGenerator* self) { + QString _ret = self->fileName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSvgGenerator_SetFileName(QSvgGenerator* self, struct miqt_string fileName) { + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + self->setFileName(fileName_QString); +} + +QIODevice* QSvgGenerator_OutputDevice(const QSvgGenerator* self) { + return self->outputDevice(); +} + +void QSvgGenerator_SetOutputDevice(QSvgGenerator* self, QIODevice* outputDevice) { + self->setOutputDevice(outputDevice); +} + +void QSvgGenerator_SetResolution(QSvgGenerator* self, int dpi) { + self->setResolution(static_cast(dpi)); +} + +int QSvgGenerator_Resolution(const QSvgGenerator* self) { + return self->resolution(); +} + +void QSvgGenerator_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QSvgGenerator*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QSvgGenerator_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQSvgGenerator*)(self) )->virtualbase_PaintEngine(); +} + +void QSvgGenerator_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QSvgGenerator*)(self) )->handle__Metric = slot; +} + +int QSvgGenerator_virtualbase_Metric(const void* self, int metric) { + return ( (const MiqtVirtualQSvgGenerator*)(self) )->virtualbase_Metric(metric); +} + +void QSvgGenerator_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QSvgGenerator*)(self) )->handle__DevType = slot; +} + +int QSvgGenerator_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQSvgGenerator*)(self) )->virtualbase_DevType(); +} + +void QSvgGenerator_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QSvgGenerator*)(self) )->handle__InitPainter = slot; +} + +void QSvgGenerator_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQSvgGenerator*)(self) )->virtualbase_InitPainter(painter); +} + +void QSvgGenerator_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QSvgGenerator*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QSvgGenerator_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQSvgGenerator*)(self) )->virtualbase_Redirected(offset); +} + +void QSvgGenerator_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QSvgGenerator*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QSvgGenerator_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQSvgGenerator*)(self) )->virtualbase_SharedPainter(); +} + +void QSvgGenerator_Delete(QSvgGenerator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/svg/gen_qsvggenerator.go b/qt6/svg/gen_qsvggenerator.go new file mode 100644 index 00000000..35202686 --- /dev/null +++ b/qt6/svg/gen_qsvggenerator.go @@ -0,0 +1,310 @@ +package svg + +/* + +#include "gen_qsvggenerator.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QSvgGenerator struct { + h *C.QSvgGenerator + isSubclass bool + *qt6.QPaintDevice +} + +func (this *QSvgGenerator) cPointer() *C.QSvgGenerator { + if this == nil { + return nil + } + return this.h +} + +func (this *QSvgGenerator) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQSvgGenerator constructs the type using only CGO pointers. +func newQSvgGenerator(h *C.QSvgGenerator, h_QPaintDevice *C.QPaintDevice) *QSvgGenerator { + if h == nil { + return nil + } + return &QSvgGenerator{h: h, + QPaintDevice: qt6.UnsafeNewQPaintDevice(unsafe.Pointer(h_QPaintDevice))} +} + +// UnsafeNewQSvgGenerator constructs the type using only unsafe pointers. +func UnsafeNewQSvgGenerator(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSvgGenerator { + if h == nil { + return nil + } + + return &QSvgGenerator{h: (*C.QSvgGenerator)(h), + QPaintDevice: qt6.UnsafeNewQPaintDevice(h_QPaintDevice)} +} + +// NewQSvgGenerator constructs a new QSvgGenerator object. +func NewQSvgGenerator() *QSvgGenerator { + var outptr_QSvgGenerator *C.QSvgGenerator = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSvgGenerator_new(&outptr_QSvgGenerator, &outptr_QPaintDevice) + ret := newQSvgGenerator(outptr_QSvgGenerator, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +func (this *QSvgGenerator) Title() string { + var _ms C.struct_miqt_string = C.QSvgGenerator_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QSvgGenerator) SetTitle(title string) { + title_ms := C.struct_miqt_string{} + title_ms.data = C.CString(title) + title_ms.len = C.size_t(len(title)) + defer C.free(unsafe.Pointer(title_ms.data)) + C.QSvgGenerator_SetTitle(this.h, title_ms) +} + +func (this *QSvgGenerator) Description() string { + var _ms C.struct_miqt_string = C.QSvgGenerator_Description(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QSvgGenerator) SetDescription(description string) { + description_ms := C.struct_miqt_string{} + description_ms.data = C.CString(description) + description_ms.len = C.size_t(len(description)) + defer C.free(unsafe.Pointer(description_ms.data)) + C.QSvgGenerator_SetDescription(this.h, description_ms) +} + +func (this *QSvgGenerator) Size() *qt6.QSize { + _ret := C.QSvgGenerator_Size(this.h) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgGenerator) SetSize(size *qt6.QSize) { + C.QSvgGenerator_SetSize(this.h, (*C.QSize)(size.UnsafePointer())) +} + +func (this *QSvgGenerator) ViewBox() *qt6.QRect { + _ret := C.QSvgGenerator_ViewBox(this.h) + _goptr := qt6.UnsafeNewQRect(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgGenerator) ViewBoxF() *qt6.QRectF { + _ret := C.QSvgGenerator_ViewBoxF(this.h) + _goptr := qt6.UnsafeNewQRectF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgGenerator) SetViewBox(viewBox *qt6.QRect) { + C.QSvgGenerator_SetViewBox(this.h, (*C.QRect)(viewBox.UnsafePointer())) +} + +func (this *QSvgGenerator) SetViewBoxWithViewBox(viewBox *qt6.QRectF) { + C.QSvgGenerator_SetViewBoxWithViewBox(this.h, (*C.QRectF)(viewBox.UnsafePointer())) +} + +func (this *QSvgGenerator) FileName() string { + var _ms C.struct_miqt_string = C.QSvgGenerator_FileName(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QSvgGenerator) SetFileName(fileName string) { + 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.QSvgGenerator_SetFileName(this.h, fileName_ms) +} + +func (this *QSvgGenerator) OutputDevice() *qt6.QIODevice { + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QSvgGenerator_OutputDevice(this.h)), nil, nil) +} + +func (this *QSvgGenerator) SetOutputDevice(outputDevice *qt6.QIODevice) { + C.QSvgGenerator_SetOutputDevice(this.h, (*C.QIODevice)(outputDevice.UnsafePointer())) +} + +func (this *QSvgGenerator) SetResolution(dpi int) { + C.QSvgGenerator_SetResolution(this.h, (C.int)(dpi)) +} + +func (this *QSvgGenerator) Resolution() int { + return (int)(C.QSvgGenerator_Resolution(this.h)) +} + +func (this *QSvgGenerator) callVirtualBase_PaintEngine() *qt6.QPaintEngine { + + return qt6.UnsafeNewQPaintEngine(unsafe.Pointer(C.QSvgGenerator_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QSvgGenerator) OnPaintEngine(slot func(super func() *qt6.QPaintEngine) *qt6.QPaintEngine) { + C.QSvgGenerator_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgGenerator_PaintEngine +func miqt_exec_callback_QSvgGenerator_PaintEngine(self *C.QSvgGenerator, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QPaintEngine) *qt6.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgGenerator{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QSvgGenerator) callVirtualBase_Metric(metric qt6.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QSvgGenerator_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(metric))) + +} +func (this *QSvgGenerator) OnMetric(slot func(super func(metric qt6.QPaintDevice__PaintDeviceMetric) int, metric qt6.QPaintDevice__PaintDeviceMetric) int) { + C.QSvgGenerator_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgGenerator_Metric +func miqt_exec_callback_QSvgGenerator_Metric(self *C.QSvgGenerator, cb C.intptr_t, metric C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(metric qt6.QPaintDevice__PaintDeviceMetric) int, metric qt6.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.QPaintDevice__PaintDeviceMetric)(metric) + + virtualReturn := gofunc((&QSvgGenerator{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSvgGenerator) callVirtualBase_DevType() int { + + return (int)(C.QSvgGenerator_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QSvgGenerator) OnDevType(slot func(super func() int) int) { + C.QSvgGenerator_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgGenerator_DevType +func miqt_exec_callback_QSvgGenerator_DevType(self *C.QSvgGenerator, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgGenerator{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QSvgGenerator) callVirtualBase_InitPainter(painter *qt6.QPainter) { + + C.QSvgGenerator_virtualbase_InitPainter(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer())) + +} +func (this *QSvgGenerator) OnInitPainter(slot func(super func(painter *qt6.QPainter), painter *qt6.QPainter)) { + C.QSvgGenerator_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgGenerator_InitPainter +func miqt_exec_callback_QSvgGenerator_InitPainter(self *C.QSvgGenerator, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt6.QPainter), painter *qt6.QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QSvgGenerator{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QSvgGenerator) callVirtualBase_Redirected(offset *qt6.QPoint) *qt6.QPaintDevice { + + return qt6.UnsafeNewQPaintDevice(unsafe.Pointer(C.QSvgGenerator_virtualbase_Redirected(unsafe.Pointer(this.h), (*C.QPoint)(offset.UnsafePointer())))) +} +func (this *QSvgGenerator) OnRedirected(slot func(super func(offset *qt6.QPoint) *qt6.QPaintDevice, offset *qt6.QPoint) *qt6.QPaintDevice) { + C.QSvgGenerator_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgGenerator_Redirected +func miqt_exec_callback_QSvgGenerator_Redirected(self *C.QSvgGenerator, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *qt6.QPoint) *qt6.QPaintDevice, offset *qt6.QPoint) *qt6.QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QSvgGenerator{h: self}).callVirtualBase_Redirected, slotval1) + + return (*C.QPaintDevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QSvgGenerator) callVirtualBase_SharedPainter() *qt6.QPainter { + + return qt6.UnsafeNewQPainter(unsafe.Pointer(C.QSvgGenerator_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QSvgGenerator) OnSharedPainter(slot func(super func() *qt6.QPainter) *qt6.QPainter) { + C.QSvgGenerator_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgGenerator_SharedPainter +func miqt_exec_callback_QSvgGenerator_SharedPainter(self *C.QSvgGenerator, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QPainter) *qt6.QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgGenerator{h: self}).callVirtualBase_SharedPainter) + + return (*C.QPainter)(virtualReturn.UnsafePointer()) + +} + +// Delete this object from C++ memory. +func (this *QSvgGenerator) Delete() { + C.QSvgGenerator_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 *QSvgGenerator) GoGC() { + runtime.SetFinalizer(this, func(this *QSvgGenerator) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/svg/gen_qsvggenerator.h b/qt6/svg/gen_qsvggenerator.h new file mode 100644 index 00000000..96fd393d --- /dev/null +++ b/qt6/svg/gen_qsvggenerator.h @@ -0,0 +1,76 @@ +#pragma once +#ifndef MIQT_QT6_SVG_GEN_QSVGGENERATOR_H +#define MIQT_QT6_SVG_GEN_QSVGGENERATOR_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QIODevice; +class QPaintDevice; +class QPaintEngine; +class QPainter; +class QPoint; +class QRect; +class QRectF; +class QSize; +class QSvgGenerator; +#else +typedef struct QIODevice QIODevice; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QRect QRect; +typedef struct QRectF QRectF; +typedef struct QSize QSize; +typedef struct QSvgGenerator QSvgGenerator; +#endif + +void QSvgGenerator_new(QSvgGenerator** outptr_QSvgGenerator, QPaintDevice** outptr_QPaintDevice); +struct miqt_string QSvgGenerator_Title(const QSvgGenerator* self); +void QSvgGenerator_SetTitle(QSvgGenerator* self, struct miqt_string title); +struct miqt_string QSvgGenerator_Description(const QSvgGenerator* self); +void QSvgGenerator_SetDescription(QSvgGenerator* self, struct miqt_string description); +QSize* QSvgGenerator_Size(const QSvgGenerator* self); +void QSvgGenerator_SetSize(QSvgGenerator* self, QSize* size); +QRect* QSvgGenerator_ViewBox(const QSvgGenerator* self); +QRectF* QSvgGenerator_ViewBoxF(const QSvgGenerator* self); +void QSvgGenerator_SetViewBox(QSvgGenerator* self, QRect* viewBox); +void QSvgGenerator_SetViewBoxWithViewBox(QSvgGenerator* self, QRectF* viewBox); +struct miqt_string QSvgGenerator_FileName(const QSvgGenerator* self); +void QSvgGenerator_SetFileName(QSvgGenerator* self, struct miqt_string fileName); +QIODevice* QSvgGenerator_OutputDevice(const QSvgGenerator* self); +void QSvgGenerator_SetOutputDevice(QSvgGenerator* self, QIODevice* outputDevice); +void QSvgGenerator_SetResolution(QSvgGenerator* self, int dpi); +int QSvgGenerator_Resolution(const QSvgGenerator* self); +QPaintEngine* QSvgGenerator_PaintEngine(const QSvgGenerator* self); +int QSvgGenerator_Metric(const QSvgGenerator* self, int metric); +void QSvgGenerator_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QSvgGenerator_virtualbase_PaintEngine(const void* self); +void QSvgGenerator_override_virtual_Metric(void* self, intptr_t slot); +int QSvgGenerator_virtualbase_Metric(const void* self, int metric); +void QSvgGenerator_override_virtual_DevType(void* self, intptr_t slot); +int QSvgGenerator_virtualbase_DevType(const void* self); +void QSvgGenerator_override_virtual_InitPainter(void* self, intptr_t slot); +void QSvgGenerator_virtualbase_InitPainter(const void* self, QPainter* painter); +void QSvgGenerator_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QSvgGenerator_virtualbase_Redirected(const void* self, QPoint* offset); +void QSvgGenerator_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QSvgGenerator_virtualbase_SharedPainter(const void* self); +void QSvgGenerator_Delete(QSvgGenerator* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/svg/gen_qsvgrenderer.cpp b/qt6/svg/gen_qsvgrenderer.cpp new file mode 100644 index 00000000..956492ce --- /dev/null +++ b/qt6/svg/gen_qsvgrenderer.cpp @@ -0,0 +1,479 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qsvgrenderer.h" +#include "_cgo_export.h" + +class MiqtVirtualQSvgRenderer : public virtual QSvgRenderer { +public: + + MiqtVirtualQSvgRenderer(): QSvgRenderer() {}; + MiqtVirtualQSvgRenderer(const QString& filename): QSvgRenderer(filename) {}; + MiqtVirtualQSvgRenderer(const QByteArray& contents): QSvgRenderer(contents) {}; + MiqtVirtualQSvgRenderer(QXmlStreamReader* contents): QSvgRenderer(contents) {}; + MiqtVirtualQSvgRenderer(QObject* parent): QSvgRenderer(parent) {}; + MiqtVirtualQSvgRenderer(const QString& filename, QObject* parent): QSvgRenderer(filename, parent) {}; + MiqtVirtualQSvgRenderer(const QByteArray& contents, QObject* parent): QSvgRenderer(contents, parent) {}; + MiqtVirtualQSvgRenderer(QXmlStreamReader* contents, QObject* parent): QSvgRenderer(contents, parent) {}; + + virtual ~MiqtVirtualQSvgRenderer() = 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 QSvgRenderer::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSvgRenderer_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSvgRenderer::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 QSvgRenderer::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QSvgRenderer_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QSvgRenderer::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) { + QSvgRenderer::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QSvgRenderer_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QSvgRenderer::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) { + QSvgRenderer::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QSvgRenderer_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QSvgRenderer::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) { + QSvgRenderer::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSvgRenderer_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QSvgRenderer::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) { + QSvgRenderer::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSvgRenderer_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QSvgRenderer::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) { + QSvgRenderer::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QSvgRenderer_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QSvgRenderer::disconnectNotify(*signal); + + } + +}; + +void QSvgRenderer_new(QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { + MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(); + *outptr_QSvgRenderer = ret; + *outptr_QObject = static_cast(ret); +} + +void QSvgRenderer_new2(struct miqt_string filename, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { + QString filename_QString = QString::fromUtf8(filename.data, filename.len); + MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(filename_QString); + *outptr_QSvgRenderer = ret; + *outptr_QObject = static_cast(ret); +} + +void QSvgRenderer_new3(struct miqt_string contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { + QByteArray contents_QByteArray(contents.data, contents.len); + MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents_QByteArray); + *outptr_QSvgRenderer = ret; + *outptr_QObject = static_cast(ret); +} + +void QSvgRenderer_new4(QXmlStreamReader* contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { + MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents); + *outptr_QSvgRenderer = ret; + *outptr_QObject = static_cast(ret); +} + +void QSvgRenderer_new5(QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { + MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(parent); + *outptr_QSvgRenderer = ret; + *outptr_QObject = static_cast(ret); +} + +void QSvgRenderer_new6(struct miqt_string filename, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { + QString filename_QString = QString::fromUtf8(filename.data, filename.len); + MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(filename_QString, parent); + *outptr_QSvgRenderer = ret; + *outptr_QObject = static_cast(ret); +} + +void QSvgRenderer_new7(struct miqt_string contents, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { + QByteArray contents_QByteArray(contents.data, contents.len); + MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents_QByteArray, parent); + *outptr_QSvgRenderer = ret; + *outptr_QObject = static_cast(ret); +} + +void QSvgRenderer_new8(QXmlStreamReader* contents, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { + MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents, parent); + *outptr_QSvgRenderer = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QSvgRenderer_MetaObject(const QSvgRenderer* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QSvgRenderer_Metacast(QSvgRenderer* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QSvgRenderer_Tr(const char* s) { + QString _ret = QSvgRenderer::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QSvgRenderer_IsValid(const QSvgRenderer* self) { + return self->isValid(); +} + +QSize* QSvgRenderer_DefaultSize(const QSvgRenderer* self) { + return new QSize(self->defaultSize()); +} + +QRect* QSvgRenderer_ViewBox(const QSvgRenderer* self) { + return new QRect(self->viewBox()); +} + +QRectF* QSvgRenderer_ViewBoxF(const QSvgRenderer* self) { + return new QRectF(self->viewBoxF()); +} + +void QSvgRenderer_SetViewBox(QSvgRenderer* self, QRect* viewbox) { + self->setViewBox(*viewbox); +} + +void QSvgRenderer_SetViewBoxWithViewbox(QSvgRenderer* self, QRectF* viewbox) { + self->setViewBox(*viewbox); +} + +int QSvgRenderer_AspectRatioMode(const QSvgRenderer* self) { + Qt::AspectRatioMode _ret = self->aspectRatioMode(); + return static_cast(_ret); +} + +void QSvgRenderer_SetAspectRatioMode(QSvgRenderer* self, int mode) { + self->setAspectRatioMode(static_cast(mode)); +} + +bool QSvgRenderer_Animated(const QSvgRenderer* self) { + return self->animated(); +} + +int QSvgRenderer_FramesPerSecond(const QSvgRenderer* self) { + return self->framesPerSecond(); +} + +void QSvgRenderer_SetFramesPerSecond(QSvgRenderer* self, int num) { + self->setFramesPerSecond(static_cast(num)); +} + +int QSvgRenderer_CurrentFrame(const QSvgRenderer* self) { + return self->currentFrame(); +} + +void QSvgRenderer_SetCurrentFrame(QSvgRenderer* self, int currentFrame) { + self->setCurrentFrame(static_cast(currentFrame)); +} + +int QSvgRenderer_AnimationDuration(const QSvgRenderer* self) { + return self->animationDuration(); +} + +QRectF* QSvgRenderer_BoundsOnElement(const QSvgRenderer* self, struct miqt_string id) { + QString id_QString = QString::fromUtf8(id.data, id.len); + return new QRectF(self->boundsOnElement(id_QString)); +} + +bool QSvgRenderer_ElementExists(const QSvgRenderer* self, struct miqt_string id) { + QString id_QString = QString::fromUtf8(id.data, id.len); + return self->elementExists(id_QString); +} + +QTransform* QSvgRenderer_TransformForElement(const QSvgRenderer* self, struct miqt_string id) { + QString id_QString = QString::fromUtf8(id.data, id.len); + return new QTransform(self->transformForElement(id_QString)); +} + +bool QSvgRenderer_Load(QSvgRenderer* self, struct miqt_string filename) { + QString filename_QString = QString::fromUtf8(filename.data, filename.len); + return self->load(filename_QString); +} + +bool QSvgRenderer_LoadWithContents(QSvgRenderer* self, struct miqt_string contents) { + QByteArray contents_QByteArray(contents.data, contents.len); + return self->load(contents_QByteArray); +} + +bool QSvgRenderer_Load2(QSvgRenderer* self, QXmlStreamReader* contents) { + return self->load(contents); +} + +void QSvgRenderer_Render(QSvgRenderer* self, QPainter* p) { + self->render(p); +} + +void QSvgRenderer_Render2(QSvgRenderer* self, QPainter* p, QRectF* bounds) { + self->render(p, *bounds); +} + +void QSvgRenderer_Render3(QSvgRenderer* self, QPainter* p, struct miqt_string elementId) { + QString elementId_QString = QString::fromUtf8(elementId.data, elementId.len); + self->render(p, elementId_QString); +} + +void QSvgRenderer_RepaintNeeded(QSvgRenderer* self) { + self->repaintNeeded(); +} + +void QSvgRenderer_connect_RepaintNeeded(QSvgRenderer* self, intptr_t slot) { + MiqtVirtualQSvgRenderer::connect(self, static_cast(&QSvgRenderer::repaintNeeded), self, [=]() { + miqt_exec_callback_QSvgRenderer_RepaintNeeded(slot); + }); +} + +struct miqt_string QSvgRenderer_Tr2(const char* s, const char* c) { + QString _ret = QSvgRenderer::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSvgRenderer_Tr3(const char* s, const char* c, int n) { + QString _ret = QSvgRenderer::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSvgRenderer_Render32(QSvgRenderer* self, QPainter* p, struct miqt_string elementId, QRectF* bounds) { + QString elementId_QString = QString::fromUtf8(elementId.data, elementId.len); + self->render(p, elementId_QString, *bounds); +} + +void QSvgRenderer_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSvgRenderer*)(self) )->handle__Event = slot; +} + +bool QSvgRenderer_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSvgRenderer*)(self) )->virtualbase_Event(event); +} + +void QSvgRenderer_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QSvgRenderer*)(self) )->handle__EventFilter = slot; +} + +bool QSvgRenderer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQSvgRenderer*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QSvgRenderer_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgRenderer*)(self) )->handle__TimerEvent = slot; +} + +void QSvgRenderer_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQSvgRenderer*)(self) )->virtualbase_TimerEvent(event); +} + +void QSvgRenderer_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgRenderer*)(self) )->handle__ChildEvent = slot; +} + +void QSvgRenderer_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQSvgRenderer*)(self) )->virtualbase_ChildEvent(event); +} + +void QSvgRenderer_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgRenderer*)(self) )->handle__CustomEvent = slot; +} + +void QSvgRenderer_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSvgRenderer*)(self) )->virtualbase_CustomEvent(event); +} + +void QSvgRenderer_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSvgRenderer*)(self) )->handle__ConnectNotify = slot; +} + +void QSvgRenderer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSvgRenderer*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QSvgRenderer_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QSvgRenderer*)(self) )->handle__DisconnectNotify = slot; +} + +void QSvgRenderer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQSvgRenderer*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QSvgRenderer_Delete(QSvgRenderer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/svg/gen_qsvgrenderer.go b/qt6/svg/gen_qsvgrenderer.go new file mode 100644 index 00000000..16abe119 --- /dev/null +++ b/qt6/svg/gen_qsvgrenderer.go @@ -0,0 +1,533 @@ +package svg + +/* + +#include "gen_qsvgrenderer.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QSvgRenderer struct { + h *C.QSvgRenderer + isSubclass bool + *qt6.QObject +} + +func (this *QSvgRenderer) cPointer() *C.QSvgRenderer { + if this == nil { + return nil + } + return this.h +} + +func (this *QSvgRenderer) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQSvgRenderer constructs the type using only CGO pointers. +func newQSvgRenderer(h *C.QSvgRenderer, h_QObject *C.QObject) *QSvgRenderer { + if h == nil { + return nil + } + return &QSvgRenderer{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQSvgRenderer constructs the type using only unsafe pointers. +func UnsafeNewQSvgRenderer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSvgRenderer { + if h == nil { + return nil + } + + return &QSvgRenderer{h: (*C.QSvgRenderer)(h), + QObject: qt6.UnsafeNewQObject(h_QObject)} +} + +// NewQSvgRenderer constructs a new QSvgRenderer object. +func NewQSvgRenderer() *QSvgRenderer { + var outptr_QSvgRenderer *C.QSvgRenderer = nil + var outptr_QObject *C.QObject = nil + + C.QSvgRenderer_new(&outptr_QSvgRenderer, &outptr_QObject) + ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQSvgRenderer2 constructs a new QSvgRenderer object. +func NewQSvgRenderer2(filename string) *QSvgRenderer { + 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)) + var outptr_QSvgRenderer *C.QSvgRenderer = nil + var outptr_QObject *C.QObject = nil + + C.QSvgRenderer_new2(filename_ms, &outptr_QSvgRenderer, &outptr_QObject) + ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQSvgRenderer3 constructs a new QSvgRenderer object. +func NewQSvgRenderer3(contents []byte) *QSvgRenderer { + contents_alias := C.struct_miqt_string{} + contents_alias.data = (*C.char)(unsafe.Pointer(&contents[0])) + contents_alias.len = C.size_t(len(contents)) + var outptr_QSvgRenderer *C.QSvgRenderer = nil + var outptr_QObject *C.QObject = nil + + C.QSvgRenderer_new3(contents_alias, &outptr_QSvgRenderer, &outptr_QObject) + ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQSvgRenderer4 constructs a new QSvgRenderer object. +func NewQSvgRenderer4(contents *qt6.QXmlStreamReader) *QSvgRenderer { + var outptr_QSvgRenderer *C.QSvgRenderer = nil + var outptr_QObject *C.QObject = nil + + C.QSvgRenderer_new4((*C.QXmlStreamReader)(contents.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) + ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQSvgRenderer5 constructs a new QSvgRenderer object. +func NewQSvgRenderer5(parent *qt6.QObject) *QSvgRenderer { + var outptr_QSvgRenderer *C.QSvgRenderer = nil + var outptr_QObject *C.QObject = nil + + C.QSvgRenderer_new5((*C.QObject)(parent.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) + ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQSvgRenderer6 constructs a new QSvgRenderer object. +func NewQSvgRenderer6(filename string, parent *qt6.QObject) *QSvgRenderer { + 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)) + var outptr_QSvgRenderer *C.QSvgRenderer = nil + var outptr_QObject *C.QObject = nil + + C.QSvgRenderer_new6(filename_ms, (*C.QObject)(parent.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) + ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQSvgRenderer7 constructs a new QSvgRenderer object. +func NewQSvgRenderer7(contents []byte, parent *qt6.QObject) *QSvgRenderer { + contents_alias := C.struct_miqt_string{} + contents_alias.data = (*C.char)(unsafe.Pointer(&contents[0])) + contents_alias.len = C.size_t(len(contents)) + var outptr_QSvgRenderer *C.QSvgRenderer = nil + var outptr_QObject *C.QObject = nil + + C.QSvgRenderer_new7(contents_alias, (*C.QObject)(parent.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) + ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQSvgRenderer8 constructs a new QSvgRenderer object. +func NewQSvgRenderer8(contents *qt6.QXmlStreamReader, parent *qt6.QObject) *QSvgRenderer { + var outptr_QSvgRenderer *C.QSvgRenderer = nil + var outptr_QObject *C.QObject = nil + + C.QSvgRenderer_new8((*C.QXmlStreamReader)(contents.UnsafePointer()), (*C.QObject)(parent.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) + ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QSvgRenderer) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QSvgRenderer_MetaObject(this.h))) +} + +func (this *QSvgRenderer) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QSvgRenderer_Metacast(this.h, param1_Cstring)) +} + +func QSvgRenderer_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QSvgRenderer_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QSvgRenderer) IsValid() bool { + return (bool)(C.QSvgRenderer_IsValid(this.h)) +} + +func (this *QSvgRenderer) DefaultSize() *qt6.QSize { + _ret := C.QSvgRenderer_DefaultSize(this.h) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgRenderer) ViewBox() *qt6.QRect { + _ret := C.QSvgRenderer_ViewBox(this.h) + _goptr := qt6.UnsafeNewQRect(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgRenderer) ViewBoxF() *qt6.QRectF { + _ret := C.QSvgRenderer_ViewBoxF(this.h) + _goptr := qt6.UnsafeNewQRectF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgRenderer) SetViewBox(viewbox *qt6.QRect) { + C.QSvgRenderer_SetViewBox(this.h, (*C.QRect)(viewbox.UnsafePointer())) +} + +func (this *QSvgRenderer) SetViewBoxWithViewbox(viewbox *qt6.QRectF) { + C.QSvgRenderer_SetViewBoxWithViewbox(this.h, (*C.QRectF)(viewbox.UnsafePointer())) +} + +func (this *QSvgRenderer) AspectRatioMode() qt6.AspectRatioMode { + return (qt6.AspectRatioMode)(C.QSvgRenderer_AspectRatioMode(this.h)) +} + +func (this *QSvgRenderer) SetAspectRatioMode(mode qt6.AspectRatioMode) { + C.QSvgRenderer_SetAspectRatioMode(this.h, (C.int)(mode)) +} + +func (this *QSvgRenderer) Animated() bool { + return (bool)(C.QSvgRenderer_Animated(this.h)) +} + +func (this *QSvgRenderer) FramesPerSecond() int { + return (int)(C.QSvgRenderer_FramesPerSecond(this.h)) +} + +func (this *QSvgRenderer) SetFramesPerSecond(num int) { + C.QSvgRenderer_SetFramesPerSecond(this.h, (C.int)(num)) +} + +func (this *QSvgRenderer) CurrentFrame() int { + return (int)(C.QSvgRenderer_CurrentFrame(this.h)) +} + +func (this *QSvgRenderer) SetCurrentFrame(currentFrame int) { + C.QSvgRenderer_SetCurrentFrame(this.h, (C.int)(currentFrame)) +} + +func (this *QSvgRenderer) AnimationDuration() int { + return (int)(C.QSvgRenderer_AnimationDuration(this.h)) +} + +func (this *QSvgRenderer) BoundsOnElement(id string) *qt6.QRectF { + id_ms := C.struct_miqt_string{} + id_ms.data = C.CString(id) + id_ms.len = C.size_t(len(id)) + defer C.free(unsafe.Pointer(id_ms.data)) + _ret := C.QSvgRenderer_BoundsOnElement(this.h, id_ms) + _goptr := qt6.UnsafeNewQRectF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgRenderer) ElementExists(id string) bool { + id_ms := C.struct_miqt_string{} + id_ms.data = C.CString(id) + id_ms.len = C.size_t(len(id)) + defer C.free(unsafe.Pointer(id_ms.data)) + return (bool)(C.QSvgRenderer_ElementExists(this.h, id_ms)) +} + +func (this *QSvgRenderer) TransformForElement(id string) *qt6.QTransform { + id_ms := C.struct_miqt_string{} + id_ms.data = C.CString(id) + id_ms.len = C.size_t(len(id)) + defer C.free(unsafe.Pointer(id_ms.data)) + _ret := C.QSvgRenderer_TransformForElement(this.h, id_ms) + _goptr := qt6.UnsafeNewQTransform(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgRenderer) Load(filename string) bool { + 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.QSvgRenderer_Load(this.h, filename_ms)) +} + +func (this *QSvgRenderer) LoadWithContents(contents []byte) bool { + contents_alias := C.struct_miqt_string{} + contents_alias.data = (*C.char)(unsafe.Pointer(&contents[0])) + contents_alias.len = C.size_t(len(contents)) + return (bool)(C.QSvgRenderer_LoadWithContents(this.h, contents_alias)) +} + +func (this *QSvgRenderer) Load2(contents *qt6.QXmlStreamReader) bool { + return (bool)(C.QSvgRenderer_Load2(this.h, (*C.QXmlStreamReader)(contents.UnsafePointer()))) +} + +func (this *QSvgRenderer) Render(p *qt6.QPainter) { + C.QSvgRenderer_Render(this.h, (*C.QPainter)(p.UnsafePointer())) +} + +func (this *QSvgRenderer) Render2(p *qt6.QPainter, bounds *qt6.QRectF) { + C.QSvgRenderer_Render2(this.h, (*C.QPainter)(p.UnsafePointer()), (*C.QRectF)(bounds.UnsafePointer())) +} + +func (this *QSvgRenderer) Render3(p *qt6.QPainter, elementId string) { + elementId_ms := C.struct_miqt_string{} + elementId_ms.data = C.CString(elementId) + elementId_ms.len = C.size_t(len(elementId)) + defer C.free(unsafe.Pointer(elementId_ms.data)) + C.QSvgRenderer_Render3(this.h, (*C.QPainter)(p.UnsafePointer()), elementId_ms) +} + +func (this *QSvgRenderer) RepaintNeeded() { + C.QSvgRenderer_RepaintNeeded(this.h) +} +func (this *QSvgRenderer) OnRepaintNeeded(slot func()) { + C.QSvgRenderer_connect_RepaintNeeded(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgRenderer_RepaintNeeded +func miqt_exec_callback_QSvgRenderer_RepaintNeeded(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func QSvgRenderer_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QSvgRenderer_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QSvgRenderer_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QSvgRenderer_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QSvgRenderer) Render32(p *qt6.QPainter, elementId string, bounds *qt6.QRectF) { + elementId_ms := C.struct_miqt_string{} + elementId_ms.data = C.CString(elementId) + elementId_ms.len = C.size_t(len(elementId)) + defer C.free(unsafe.Pointer(elementId_ms.data)) + C.QSvgRenderer_Render32(this.h, (*C.QPainter)(p.UnsafePointer()), elementId_ms, (*C.QRectF)(bounds.UnsafePointer())) +} + +func (this *QSvgRenderer) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QSvgRenderer_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QSvgRenderer) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QSvgRenderer_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgRenderer_Event +func miqt_exec_callback_QSvgRenderer_Event(self *C.QSvgRenderer, 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((&QSvgRenderer{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSvgRenderer) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QSvgRenderer_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QSvgRenderer) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + C.QSvgRenderer_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgRenderer_EventFilter +func miqt_exec_callback_QSvgRenderer_EventFilter(self *C.QSvgRenderer, 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((&QSvgRenderer{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QSvgRenderer) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QSvgRenderer_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QSvgRenderer) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + C.QSvgRenderer_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgRenderer_TimerEvent +func miqt_exec_callback_QSvgRenderer_TimerEvent(self *C.QSvgRenderer, 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((&QSvgRenderer{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QSvgRenderer) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QSvgRenderer_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QSvgRenderer) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + C.QSvgRenderer_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgRenderer_ChildEvent +func miqt_exec_callback_QSvgRenderer_ChildEvent(self *C.QSvgRenderer, 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((&QSvgRenderer{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QSvgRenderer) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QSvgRenderer_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QSvgRenderer) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QSvgRenderer_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgRenderer_CustomEvent +func miqt_exec_callback_QSvgRenderer_CustomEvent(self *C.QSvgRenderer, 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((&QSvgRenderer{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QSvgRenderer) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QSvgRenderer_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QSvgRenderer) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QSvgRenderer_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgRenderer_ConnectNotify +func miqt_exec_callback_QSvgRenderer_ConnectNotify(self *C.QSvgRenderer, 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((&QSvgRenderer{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QSvgRenderer) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QSvgRenderer_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QSvgRenderer) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + C.QSvgRenderer_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgRenderer_DisconnectNotify +func miqt_exec_callback_QSvgRenderer_DisconnectNotify(self *C.QSvgRenderer, 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((&QSvgRenderer{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QSvgRenderer) Delete() { + C.QSvgRenderer_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 *QSvgRenderer) GoGC() { + runtime.SetFinalizer(this, func(this *QSvgRenderer) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/svg/gen_qsvgrenderer.h b/qt6/svg/gen_qsvgrenderer.h new file mode 100644 index 00000000..92d0eb86 --- /dev/null +++ b/qt6/svg/gen_qsvgrenderer.h @@ -0,0 +1,108 @@ +#pragma once +#ifndef MIQT_QT6_SVG_GEN_QSVGRENDERER_H +#define MIQT_QT6_SVG_GEN_QSVGRENDERER_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QByteArray; +class QChildEvent; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QObject; +class QPainter; +class QRect; +class QRectF; +class QSize; +class QSvgRenderer; +class QTimerEvent; +class QTransform; +class QXmlStreamReader; +#else +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 QPainter QPainter; +typedef struct QRect QRect; +typedef struct QRectF QRectF; +typedef struct QSize QSize; +typedef struct QSvgRenderer QSvgRenderer; +typedef struct QTimerEvent QTimerEvent; +typedef struct QTransform QTransform; +typedef struct QXmlStreamReader QXmlStreamReader; +#endif + +void QSvgRenderer_new(QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +void QSvgRenderer_new2(struct miqt_string filename, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +void QSvgRenderer_new3(struct miqt_string contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +void QSvgRenderer_new4(QXmlStreamReader* contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +void QSvgRenderer_new5(QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +void QSvgRenderer_new6(struct miqt_string filename, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +void QSvgRenderer_new7(struct miqt_string contents, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +void QSvgRenderer_new8(QXmlStreamReader* contents, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +QMetaObject* QSvgRenderer_MetaObject(const QSvgRenderer* self); +void* QSvgRenderer_Metacast(QSvgRenderer* self, const char* param1); +struct miqt_string QSvgRenderer_Tr(const char* s); +bool QSvgRenderer_IsValid(const QSvgRenderer* self); +QSize* QSvgRenderer_DefaultSize(const QSvgRenderer* self); +QRect* QSvgRenderer_ViewBox(const QSvgRenderer* self); +QRectF* QSvgRenderer_ViewBoxF(const QSvgRenderer* self); +void QSvgRenderer_SetViewBox(QSvgRenderer* self, QRect* viewbox); +void QSvgRenderer_SetViewBoxWithViewbox(QSvgRenderer* self, QRectF* viewbox); +int QSvgRenderer_AspectRatioMode(const QSvgRenderer* self); +void QSvgRenderer_SetAspectRatioMode(QSvgRenderer* self, int mode); +bool QSvgRenderer_Animated(const QSvgRenderer* self); +int QSvgRenderer_FramesPerSecond(const QSvgRenderer* self); +void QSvgRenderer_SetFramesPerSecond(QSvgRenderer* self, int num); +int QSvgRenderer_CurrentFrame(const QSvgRenderer* self); +void QSvgRenderer_SetCurrentFrame(QSvgRenderer* self, int currentFrame); +int QSvgRenderer_AnimationDuration(const QSvgRenderer* self); +QRectF* QSvgRenderer_BoundsOnElement(const QSvgRenderer* self, struct miqt_string id); +bool QSvgRenderer_ElementExists(const QSvgRenderer* self, struct miqt_string id); +QTransform* QSvgRenderer_TransformForElement(const QSvgRenderer* self, struct miqt_string id); +bool QSvgRenderer_Load(QSvgRenderer* self, struct miqt_string filename); +bool QSvgRenderer_LoadWithContents(QSvgRenderer* self, struct miqt_string contents); +bool QSvgRenderer_Load2(QSvgRenderer* self, QXmlStreamReader* contents); +void QSvgRenderer_Render(QSvgRenderer* self, QPainter* p); +void QSvgRenderer_Render2(QSvgRenderer* self, QPainter* p, QRectF* bounds); +void QSvgRenderer_Render3(QSvgRenderer* self, QPainter* p, struct miqt_string elementId); +void QSvgRenderer_RepaintNeeded(QSvgRenderer* self); +void QSvgRenderer_connect_RepaintNeeded(QSvgRenderer* self, intptr_t slot); +struct miqt_string QSvgRenderer_Tr2(const char* s, const char* c); +struct miqt_string QSvgRenderer_Tr3(const char* s, const char* c, int n); +void QSvgRenderer_Render32(QSvgRenderer* self, QPainter* p, struct miqt_string elementId, QRectF* bounds); +void QSvgRenderer_override_virtual_Event(void* self, intptr_t slot); +bool QSvgRenderer_virtualbase_Event(void* self, QEvent* event); +void QSvgRenderer_override_virtual_EventFilter(void* self, intptr_t slot); +bool QSvgRenderer_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QSvgRenderer_override_virtual_TimerEvent(void* self, intptr_t slot); +void QSvgRenderer_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QSvgRenderer_override_virtual_ChildEvent(void* self, intptr_t slot); +void QSvgRenderer_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QSvgRenderer_override_virtual_CustomEvent(void* self, intptr_t slot); +void QSvgRenderer_virtualbase_CustomEvent(void* self, QEvent* event); +void QSvgRenderer_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QSvgRenderer_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QSvgRenderer_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QSvgRenderer_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QSvgRenderer_Delete(QSvgRenderer* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/svg/gen_qsvgwidget.cpp b/qt6/svg/gen_qsvgwidget.cpp new file mode 100644 index 00000000..fc990cf6 --- /dev/null +++ b/qt6/svg/gen_qsvgwidget.cpp @@ -0,0 +1,1456 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#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_qsvgwidget.h" +#include "_cgo_export.h" + +class MiqtVirtualQSvgWidget : public virtual QSvgWidget { +public: + + MiqtVirtualQSvgWidget(QWidget* parent): QSvgWidget(parent) {}; + MiqtVirtualQSvgWidget(): QSvgWidget() {}; + MiqtVirtualQSvgWidget(const QString& file): QSvgWidget(file) {}; + MiqtVirtualQSvgWidget(const QString& file, QWidget* parent): QSvgWidget(file, parent) {}; + + virtual ~MiqtVirtualQSvgWidget() = 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 QSvgWidget::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSvgWidget_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QSvgWidget::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QSvgWidget::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QSvgWidget::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QSvgWidget::devType(); + } + + + int callback_return_value = miqt_exec_callback_QSvgWidget_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QSvgWidget::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) { + QSvgWidget::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QSvgWidget_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QSvgWidget::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QSvgWidget::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QSvgWidget_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QSvgWidget::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 QSvgWidget::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QSvgWidget_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 QSvgWidget::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 QSvgWidget::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QSvgWidget_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QSvgWidget::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 QSvgWidget::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QSvgWidget_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QSvgWidget::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__Event == 0) { + return QSvgWidget::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QSvgWidget_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QSvgWidget::event(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QSvgWidget::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QSvgWidget::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QSvgWidget::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QSvgWidget::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) { + QSvgWidget::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QSvgWidget::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QSvgWidget::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QSvgWidget::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QSvgWidget::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QSvgWidget::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QSvgWidget::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QSvgWidget::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) { + QSvgWidget::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QSvgWidget::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QSvgWidget::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QSvgWidget::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) { + QSvgWidget::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QSvgWidget::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__EnterEvent == 0) { + QSvgWidget::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEnterEvent* event) { + + QSvgWidget::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) { + QSvgWidget::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QSvgWidget::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) { + QSvgWidget::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QSvgWidget::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) { + QSvgWidget::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QSvgWidget::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) { + QSvgWidget::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QSvgWidget::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) { + QSvgWidget::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QSvgWidget::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) { + QSvgWidget::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QSvgWidget::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) { + QSvgWidget::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QSvgWidget::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) { + QSvgWidget::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QSvgWidget::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) { + QSvgWidget::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QSvgWidget::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) { + QSvgWidget::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QSvgWidget::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) { + QSvgWidget::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QSvgWidget::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) { + QSvgWidget::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QSvgWidget::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) { + QSvgWidget::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QSvgWidget_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QSvgWidget::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 QSvgWidget::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_QSvgWidget_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 QSvgWidget::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QSvgWidget::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QSvgWidget_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QSvgWidget::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QSvgWidget::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QSvgWidget_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 QSvgWidget::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) { + QSvgWidget::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QSvgWidget_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QSvgWidget::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 QSvgWidget::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QSvgWidget_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QSvgWidget::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 QSvgWidget::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QSvgWidget_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QSvgWidget::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) { + QSvgWidget::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QSvgWidget_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QSvgWidget::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 QSvgWidget::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QSvgWidget_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(QSvgWidget::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 QSvgWidget::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QSvgWidget_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QSvgWidget::focusNextPrevChild(next); + + } + +}; + +void QSvgWidget_new(QWidget* parent, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSvgWidget* ret = new MiqtVirtualQSvgWidget(parent); + *outptr_QSvgWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QSvgWidget_new2(QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQSvgWidget* ret = new MiqtVirtualQSvgWidget(); + *outptr_QSvgWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QSvgWidget_new3(struct miqt_string file, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + QString file_QString = QString::fromUtf8(file.data, file.len); + MiqtVirtualQSvgWidget* ret = new MiqtVirtualQSvgWidget(file_QString); + *outptr_QSvgWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QSvgWidget_new4(struct miqt_string file, QWidget* parent, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + QString file_QString = QString::fromUtf8(file.data, file.len); + MiqtVirtualQSvgWidget* ret = new MiqtVirtualQSvgWidget(file_QString, parent); + *outptr_QSvgWidget = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QSvgWidget_MetaObject(const QSvgWidget* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QSvgWidget_Metacast(QSvgWidget* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QSvgWidget_Tr(const char* s) { + QString _ret = QSvgWidget::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QSvgRenderer* QSvgWidget_Renderer(const QSvgWidget* self) { + return self->renderer(); +} + +QSize* QSvgWidget_SizeHint(const QSvgWidget* self) { + return new QSize(self->sizeHint()); +} + +void QSvgWidget_Load(QSvgWidget* self, struct miqt_string file) { + QString file_QString = QString::fromUtf8(file.data, file.len); + self->load(file_QString); +} + +void QSvgWidget_LoadWithContents(QSvgWidget* self, struct miqt_string contents) { + QByteArray contents_QByteArray(contents.data, contents.len); + self->load(contents_QByteArray); +} + +struct miqt_string QSvgWidget_Tr2(const char* s, const char* c) { + QString _ret = QSvgWidget::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QSvgWidget_Tr3(const char* s, const char* c, int n) { + QString _ret = QSvgWidget::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QSvgWidget_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__SizeHint = slot; +} + +QSize* QSvgWidget_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_SizeHint(); +} + +void QSvgWidget_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__PaintEvent = slot; +} + +void QSvgWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_PaintEvent(event); +} + +void QSvgWidget_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__DevType = slot; +} + +int QSvgWidget_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_DevType(); +} + +void QSvgWidget_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__SetVisible = slot; +} + +void QSvgWidget_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_SetVisible(visible); +} + +void QSvgWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QSvgWidget_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QSvgWidget_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__HeightForWidth = slot; +} + +int QSvgWidget_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QSvgWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QSvgWidget_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QSvgWidget_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QSvgWidget_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_PaintEngine(); +} + +void QSvgWidget_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__Event = slot; +} + +bool QSvgWidget_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_Event(event); +} + +void QSvgWidget_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__MousePressEvent = slot; +} + +void QSvgWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_MousePressEvent(event); +} + +void QSvgWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QSvgWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QSvgWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QSvgWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QSvgWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__MouseMoveEvent = slot; +} + +void QSvgWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QSvgWidget_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__WheelEvent = slot; +} + +void QSvgWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_WheelEvent(event); +} + +void QSvgWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__KeyPressEvent = slot; +} + +void QSvgWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QSvgWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QSvgWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QSvgWidget_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__FocusInEvent = slot; +} + +void QSvgWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_FocusInEvent(event); +} + +void QSvgWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__FocusOutEvent = slot; +} + +void QSvgWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QSvgWidget_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__EnterEvent = slot; +} + +void QSvgWidget_virtualbase_EnterEvent(void* self, QEnterEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_EnterEvent(event); +} + +void QSvgWidget_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__LeaveEvent = slot; +} + +void QSvgWidget_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_LeaveEvent(event); +} + +void QSvgWidget_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__MoveEvent = slot; +} + +void QSvgWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_MoveEvent(event); +} + +void QSvgWidget_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__ResizeEvent = slot; +} + +void QSvgWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_ResizeEvent(event); +} + +void QSvgWidget_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__CloseEvent = slot; +} + +void QSvgWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_CloseEvent(event); +} + +void QSvgWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__ContextMenuEvent = slot; +} + +void QSvgWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QSvgWidget_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__TabletEvent = slot; +} + +void QSvgWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_TabletEvent(event); +} + +void QSvgWidget_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__ActionEvent = slot; +} + +void QSvgWidget_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_ActionEvent(event); +} + +void QSvgWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__DragEnterEvent = slot; +} + +void QSvgWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QSvgWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__DragMoveEvent = slot; +} + +void QSvgWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QSvgWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__DragLeaveEvent = slot; +} + +void QSvgWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QSvgWidget_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__DropEvent = slot; +} + +void QSvgWidget_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_DropEvent(event); +} + +void QSvgWidget_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__ShowEvent = slot; +} + +void QSvgWidget_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_ShowEvent(event); +} + +void QSvgWidget_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__HideEvent = slot; +} + +void QSvgWidget_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_HideEvent(event); +} + +void QSvgWidget_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__NativeEvent = slot; +} + +bool QSvgWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + return ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QSvgWidget_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__ChangeEvent = slot; +} + +void QSvgWidget_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QSvgWidget_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__Metric = slot; +} + +int QSvgWidget_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_Metric(param1); +} + +void QSvgWidget_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__InitPainter = slot; +} + +void QSvgWidget_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_InitPainter(painter); +} + +void QSvgWidget_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QSvgWidget_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_Redirected(offset); +} + +void QSvgWidget_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QSvgWidget_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_SharedPainter(); +} + +void QSvgWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__InputMethodEvent = slot; +} + +void QSvgWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QSvgWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QSvgWidget_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQSvgWidget*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QSvgWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QSvgWidget*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QSvgWidget_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQSvgWidget*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QSvgWidget_Delete(QSvgWidget* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt6/svg/gen_qsvgwidget.go b/qt6/svg/gen_qsvgwidget.go new file mode 100644 index 00000000..69d1d40d --- /dev/null +++ b/qt6/svg/gen_qsvgwidget.go @@ -0,0 +1,1162 @@ +package svg + +/* + +#include "gen_qsvgwidget.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QSvgWidget struct { + h *C.QSvgWidget + isSubclass bool + *qt6.QWidget +} + +func (this *QSvgWidget) cPointer() *C.QSvgWidget { + if this == nil { + return nil + } + return this.h +} + +func (this *QSvgWidget) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQSvgWidget constructs the type using only CGO pointers. +func newQSvgWidget(h *C.QSvgWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSvgWidget { + if h == nil { + return nil + } + return &QSvgWidget{h: h, + QWidget: qt6.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} +} + +// UnsafeNewQSvgWidget constructs the type using only unsafe pointers. +func UnsafeNewQSvgWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSvgWidget { + if h == nil { + return nil + } + + return &QSvgWidget{h: (*C.QSvgWidget)(h), + QWidget: qt6.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +} + +// NewQSvgWidget constructs a new QSvgWidget object. +func NewQSvgWidget(parent *qt6.QWidget) *QSvgWidget { + var outptr_QSvgWidget *C.QSvgWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSvgWidget_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QSvgWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSvgWidget(outptr_QSvgWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQSvgWidget2 constructs a new QSvgWidget object. +func NewQSvgWidget2() *QSvgWidget { + var outptr_QSvgWidget *C.QSvgWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSvgWidget_new2(&outptr_QSvgWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSvgWidget(outptr_QSvgWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQSvgWidget3 constructs a new QSvgWidget object. +func NewQSvgWidget3(file string) *QSvgWidget { + file_ms := C.struct_miqt_string{} + file_ms.data = C.CString(file) + file_ms.len = C.size_t(len(file)) + defer C.free(unsafe.Pointer(file_ms.data)) + var outptr_QSvgWidget *C.QSvgWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSvgWidget_new3(file_ms, &outptr_QSvgWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSvgWidget(outptr_QSvgWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQSvgWidget4 constructs a new QSvgWidget object. +func NewQSvgWidget4(file string, parent *qt6.QWidget) *QSvgWidget { + file_ms := C.struct_miqt_string{} + file_ms.data = C.CString(file) + file_ms.len = C.size_t(len(file)) + defer C.free(unsafe.Pointer(file_ms.data)) + var outptr_QSvgWidget *C.QSvgWidget = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QSvgWidget_new4(file_ms, (*C.QWidget)(parent.UnsafePointer()), &outptr_QSvgWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQSvgWidget(outptr_QSvgWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +func (this *QSvgWidget) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QSvgWidget_MetaObject(this.h))) +} + +func (this *QSvgWidget) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QSvgWidget_Metacast(this.h, param1_Cstring)) +} + +func QSvgWidget_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QSvgWidget_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QSvgWidget) Renderer() *QSvgRenderer { + return UnsafeNewQSvgRenderer(unsafe.Pointer(C.QSvgWidget_Renderer(this.h)), nil) +} + +func (this *QSvgWidget) SizeHint() *qt6.QSize { + _ret := C.QSvgWidget_SizeHint(this.h) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSvgWidget) Load(file string) { + file_ms := C.struct_miqt_string{} + file_ms.data = C.CString(file) + file_ms.len = C.size_t(len(file)) + defer C.free(unsafe.Pointer(file_ms.data)) + C.QSvgWidget_Load(this.h, file_ms) +} + +func (this *QSvgWidget) LoadWithContents(contents []byte) { + contents_alias := C.struct_miqt_string{} + contents_alias.data = (*C.char)(unsafe.Pointer(&contents[0])) + contents_alias.len = C.size_t(len(contents)) + C.QSvgWidget_LoadWithContents(this.h, contents_alias) +} + +func QSvgWidget_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QSvgWidget_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QSvgWidget_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QSvgWidget_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QSvgWidget) callVirtualBase_SizeHint() *qt6.QSize { + + _ret := C.QSvgWidget_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSvgWidget) OnSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QSvgWidget_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_SizeHint +func miqt_exec_callback_QSvgWidget_SizeHint(self *C.QSvgWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QSvgWidget) callVirtualBase_PaintEvent(event *qt6.QPaintEvent) { + + C.QSvgWidget_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnPaintEvent(slot func(super func(event *qt6.QPaintEvent), event *qt6.QPaintEvent)) { + C.QSvgWidget_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_PaintEvent +func miqt_exec_callback_QSvgWidget_PaintEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QPaintEvent), event *qt6.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_DevType() int { + + return (int)(C.QSvgWidget_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QSvgWidget) OnDevType(slot func(super func() int) int) { + C.QSvgWidget_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_DevType +func miqt_exec_callback_QSvgWidget_DevType(self *C.QSvgWidget, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QSvgWidget) callVirtualBase_SetVisible(visible bool) { + + C.QSvgWidget_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QSvgWidget) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QSvgWidget_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_SetVisible +func miqt_exec_callback_QSvgWidget_SetVisible(self *C.QSvgWidget, 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((&QSvgWidget{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_MinimumSizeHint() *qt6.QSize { + + _ret := C.QSvgWidget_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSvgWidget) OnMinimumSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + C.QSvgWidget_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_MinimumSizeHint +func miqt_exec_callback_QSvgWidget_MinimumSizeHint(self *C.QSvgWidget, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QSvgWidget) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QSvgWidget_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSvgWidget) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QSvgWidget_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_HeightForWidth +func miqt_exec_callback_QSvgWidget_HeightForWidth(self *C.QSvgWidget, 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((&QSvgWidget{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSvgWidget) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QSvgWidget_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QSvgWidget) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QSvgWidget_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_HasHeightForWidth +func miqt_exec_callback_QSvgWidget_HasHeightForWidth(self *C.QSvgWidget, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QSvgWidget) callVirtualBase_PaintEngine() *qt6.QPaintEngine { + + return qt6.UnsafeNewQPaintEngine(unsafe.Pointer(C.QSvgWidget_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QSvgWidget) OnPaintEngine(slot func(super func() *qt6.QPaintEngine) *qt6.QPaintEngine) { + C.QSvgWidget_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_PaintEngine +func miqt_exec_callback_QSvgWidget_PaintEngine(self *C.QSvgWidget, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QPaintEngine) *qt6.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QSvgWidget) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QSvgWidget_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QSvgWidget) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + C.QSvgWidget_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_Event +func miqt_exec_callback_QSvgWidget_Event(self *C.QSvgWidget, 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((&QSvgWidget{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QSvgWidget) callVirtualBase_MousePressEvent(event *qt6.QMouseEvent) { + + C.QSvgWidget_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnMousePressEvent(slot func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) { + C.QSvgWidget_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_MousePressEvent +func miqt_exec_callback_QSvgWidget_MousePressEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_MouseReleaseEvent(event *qt6.QMouseEvent) { + + C.QSvgWidget_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnMouseReleaseEvent(slot func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) { + C.QSvgWidget_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_MouseReleaseEvent +func miqt_exec_callback_QSvgWidget_MouseReleaseEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_MouseDoubleClickEvent(event *qt6.QMouseEvent) { + + C.QSvgWidget_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnMouseDoubleClickEvent(slot func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) { + C.QSvgWidget_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_MouseDoubleClickEvent +func miqt_exec_callback_QSvgWidget_MouseDoubleClickEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_MouseMoveEvent(event *qt6.QMouseEvent) { + + C.QSvgWidget_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnMouseMoveEvent(slot func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) { + C.QSvgWidget_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_MouseMoveEvent +func miqt_exec_callback_QSvgWidget_MouseMoveEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMouseEvent), event *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_WheelEvent(event *qt6.QWheelEvent) { + + C.QSvgWidget_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnWheelEvent(slot func(super func(event *qt6.QWheelEvent), event *qt6.QWheelEvent)) { + C.QSvgWidget_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_WheelEvent +func miqt_exec_callback_QSvgWidget_WheelEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QWheelEvent), event *qt6.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_KeyPressEvent(event *qt6.QKeyEvent) { + + C.QSvgWidget_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnKeyPressEvent(slot func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) { + C.QSvgWidget_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_KeyPressEvent +func miqt_exec_callback_QSvgWidget_KeyPressEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_KeyReleaseEvent(event *qt6.QKeyEvent) { + + C.QSvgWidget_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnKeyReleaseEvent(slot func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) { + C.QSvgWidget_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_KeyReleaseEvent +func miqt_exec_callback_QSvgWidget_KeyReleaseEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_FocusInEvent(event *qt6.QFocusEvent) { + + C.QSvgWidget_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnFocusInEvent(slot func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) { + C.QSvgWidget_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_FocusInEvent +func miqt_exec_callback_QSvgWidget_FocusInEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_FocusOutEvent(event *qt6.QFocusEvent) { + + C.QSvgWidget_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnFocusOutEvent(slot func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) { + C.QSvgWidget_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_FocusOutEvent +func miqt_exec_callback_QSvgWidget_FocusOutEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_EnterEvent(event *qt6.QEnterEvent) { + + C.QSvgWidget_virtualbase_EnterEvent(unsafe.Pointer(this.h), (*C.QEnterEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnEnterEvent(slot func(super func(event *qt6.QEnterEvent), event *qt6.QEnterEvent)) { + C.QSvgWidget_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_EnterEvent +func miqt_exec_callback_QSvgWidget_EnterEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEnterEvent), event *qt6.QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_LeaveEvent(event *qt6.QEvent) { + + C.QSvgWidget_virtualbase_LeaveEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnLeaveEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + C.QSvgWidget_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_LeaveEvent +func miqt_exec_callback_QSvgWidget_LeaveEvent(self *C.QSvgWidget, 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((&QSvgWidget{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_MoveEvent(event *qt6.QMoveEvent) { + + C.QSvgWidget_virtualbase_MoveEvent(unsafe.Pointer(this.h), (*C.QMoveEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnMoveEvent(slot func(super func(event *qt6.QMoveEvent), event *qt6.QMoveEvent)) { + C.QSvgWidget_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_MoveEvent +func miqt_exec_callback_QSvgWidget_MoveEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMoveEvent), event *qt6.QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_ResizeEvent(event *qt6.QResizeEvent) { + + C.QSvgWidget_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnResizeEvent(slot func(super func(event *qt6.QResizeEvent), event *qt6.QResizeEvent)) { + C.QSvgWidget_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_ResizeEvent +func miqt_exec_callback_QSvgWidget_ResizeEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QResizeEvent), event *qt6.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_CloseEvent(event *qt6.QCloseEvent) { + + C.QSvgWidget_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnCloseEvent(slot func(super func(event *qt6.QCloseEvent), event *qt6.QCloseEvent)) { + C.QSvgWidget_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_CloseEvent +func miqt_exec_callback_QSvgWidget_CloseEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QCloseEvent), event *qt6.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_ContextMenuEvent(event *qt6.QContextMenuEvent) { + + C.QSvgWidget_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnContextMenuEvent(slot func(super func(event *qt6.QContextMenuEvent), event *qt6.QContextMenuEvent)) { + C.QSvgWidget_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_ContextMenuEvent +func miqt_exec_callback_QSvgWidget_ContextMenuEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QContextMenuEvent), event *qt6.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_TabletEvent(event *qt6.QTabletEvent) { + + C.QSvgWidget_virtualbase_TabletEvent(unsafe.Pointer(this.h), (*C.QTabletEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnTabletEvent(slot func(super func(event *qt6.QTabletEvent), event *qt6.QTabletEvent)) { + C.QSvgWidget_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_TabletEvent +func miqt_exec_callback_QSvgWidget_TabletEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTabletEvent), event *qt6.QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_ActionEvent(event *qt6.QActionEvent) { + + C.QSvgWidget_virtualbase_ActionEvent(unsafe.Pointer(this.h), (*C.QActionEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnActionEvent(slot func(super func(event *qt6.QActionEvent), event *qt6.QActionEvent)) { + C.QSvgWidget_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_ActionEvent +func miqt_exec_callback_QSvgWidget_ActionEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QActionEvent), event *qt6.QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_DragEnterEvent(event *qt6.QDragEnterEvent) { + + C.QSvgWidget_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnDragEnterEvent(slot func(super func(event *qt6.QDragEnterEvent), event *qt6.QDragEnterEvent)) { + C.QSvgWidget_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_DragEnterEvent +func miqt_exec_callback_QSvgWidget_DragEnterEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QDragEnterEvent), event *qt6.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_DragMoveEvent(event *qt6.QDragMoveEvent) { + + C.QSvgWidget_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnDragMoveEvent(slot func(super func(event *qt6.QDragMoveEvent), event *qt6.QDragMoveEvent)) { + C.QSvgWidget_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_DragMoveEvent +func miqt_exec_callback_QSvgWidget_DragMoveEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QDragMoveEvent), event *qt6.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_DragLeaveEvent(event *qt6.QDragLeaveEvent) { + + C.QSvgWidget_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnDragLeaveEvent(slot func(super func(event *qt6.QDragLeaveEvent), event *qt6.QDragLeaveEvent)) { + C.QSvgWidget_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_DragLeaveEvent +func miqt_exec_callback_QSvgWidget_DragLeaveEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QDragLeaveEvent), event *qt6.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_DropEvent(event *qt6.QDropEvent) { + + C.QSvgWidget_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnDropEvent(slot func(super func(event *qt6.QDropEvent), event *qt6.QDropEvent)) { + C.QSvgWidget_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_DropEvent +func miqt_exec_callback_QSvgWidget_DropEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QDropEvent), event *qt6.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_ShowEvent(event *qt6.QShowEvent) { + + C.QSvgWidget_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnShowEvent(slot func(super func(event *qt6.QShowEvent), event *qt6.QShowEvent)) { + C.QSvgWidget_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_ShowEvent +func miqt_exec_callback_QSvgWidget_ShowEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QShowEvent), event *qt6.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_HideEvent(event *qt6.QHideEvent) { + + C.QSvgWidget_virtualbase_HideEvent(unsafe.Pointer(this.h), (*C.QHideEvent)(event.UnsafePointer())) + +} +func (this *QSvgWidget) OnHideEvent(slot func(super func(event *qt6.QHideEvent), event *qt6.QHideEvent)) { + C.QSvgWidget_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_HideEvent +func miqt_exec_callback_QSvgWidget_HideEvent(self *C.QSvgWidget, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QHideEvent), event *qt6.QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QSvgWidget) 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.QSvgWidget_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QSvgWidget) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + C.QSvgWidget_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_NativeEvent +func miqt_exec_callback_QSvgWidget_NativeEvent(self *C.QSvgWidget, 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((&QSvgWidget{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QSvgWidget) callVirtualBase_ChangeEvent(param1 *qt6.QEvent) { + + C.QSvgWidget_virtualbase_ChangeEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer())) + +} +func (this *QSvgWidget) OnChangeEvent(slot func(super func(param1 *qt6.QEvent), param1 *qt6.QEvent)) { + C.QSvgWidget_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_ChangeEvent +func miqt_exec_callback_QSvgWidget_ChangeEvent(self *C.QSvgWidget, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QEvent), param1 *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_Metric(param1 qt6.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QSvgWidget_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QSvgWidget) OnMetric(slot func(super func(param1 qt6.QPaintDevice__PaintDeviceMetric) int, param1 qt6.QPaintDevice__PaintDeviceMetric) int) { + C.QSvgWidget_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_Metric +func miqt_exec_callback_QSvgWidget_Metric(self *C.QSvgWidget, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt6.QPaintDevice__PaintDeviceMetric) int, param1 qt6.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QSvgWidget) callVirtualBase_InitPainter(painter *qt6.QPainter) { + + C.QSvgWidget_virtualbase_InitPainter(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer())) + +} +func (this *QSvgWidget) OnInitPainter(slot func(super func(painter *qt6.QPainter), painter *qt6.QPainter)) { + C.QSvgWidget_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_InitPainter +func miqt_exec_callback_QSvgWidget_InitPainter(self *C.QSvgWidget, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt6.QPainter), painter *qt6.QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_Redirected(offset *qt6.QPoint) *qt6.QPaintDevice { + + return qt6.UnsafeNewQPaintDevice(unsafe.Pointer(C.QSvgWidget_virtualbase_Redirected(unsafe.Pointer(this.h), (*C.QPoint)(offset.UnsafePointer())))) +} +func (this *QSvgWidget) OnRedirected(slot func(super func(offset *qt6.QPoint) *qt6.QPaintDevice, offset *qt6.QPoint) *qt6.QPaintDevice) { + C.QSvgWidget_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_Redirected +func miqt_exec_callback_QSvgWidget_Redirected(self *C.QSvgWidget, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *qt6.QPoint) *qt6.QPaintDevice, offset *qt6.QPoint) *qt6.QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_Redirected, slotval1) + + return (*C.QPaintDevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QSvgWidget) callVirtualBase_SharedPainter() *qt6.QPainter { + + return qt6.UnsafeNewQPainter(unsafe.Pointer(C.QSvgWidget_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QSvgWidget) OnSharedPainter(slot func(super func() *qt6.QPainter) *qt6.QPainter) { + C.QSvgWidget_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_SharedPainter +func miqt_exec_callback_QSvgWidget_SharedPainter(self *C.QSvgWidget, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QPainter) *qt6.QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_SharedPainter) + + return (*C.QPainter)(virtualReturn.UnsafePointer()) + +} + +func (this *QSvgWidget) callVirtualBase_InputMethodEvent(param1 *qt6.QInputMethodEvent) { + + C.QSvgWidget_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(param1.UnsafePointer())) + +} +func (this *QSvgWidget) OnInputMethodEvent(slot func(super func(param1 *qt6.QInputMethodEvent), param1 *qt6.QInputMethodEvent)) { + C.QSvgWidget_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_InputMethodEvent +func miqt_exec_callback_QSvgWidget_InputMethodEvent(self *C.QSvgWidget, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QInputMethodEvent), param1 *qt6.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QSvgWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QSvgWidget) callVirtualBase_InputMethodQuery(param1 qt6.InputMethodQuery) *qt6.QVariant { + + _ret := C.QSvgWidget_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QSvgWidget) OnInputMethodQuery(slot func(super func(param1 qt6.InputMethodQuery) *qt6.QVariant, param1 qt6.InputMethodQuery) *qt6.QVariant) { + C.QSvgWidget_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_InputMethodQuery +func miqt_exec_callback_QSvgWidget_InputMethodQuery(self *C.QSvgWidget, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt6.InputMethodQuery) *qt6.QVariant, param1 qt6.InputMethodQuery) *qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.InputMethodQuery)(param1) + + virtualReturn := gofunc((&QSvgWidget{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QSvgWidget) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QSvgWidget_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QSvgWidget) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QSvgWidget_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QSvgWidget_FocusNextPrevChild +func miqt_exec_callback_QSvgWidget_FocusNextPrevChild(self *C.QSvgWidget, 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((&QSvgWidget{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +// Delete this object from C++ memory. +func (this *QSvgWidget) Delete() { + C.QSvgWidget_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 *QSvgWidget) GoGC() { + runtime.SetFinalizer(this, func(this *QSvgWidget) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/svg/gen_qsvgwidget.h b/qt6/svg/gen_qsvgwidget.h new file mode 100644 index 00000000..e18907a2 --- /dev/null +++ b/qt6/svg/gen_qsvgwidget.h @@ -0,0 +1,187 @@ +#pragma once +#ifndef MIQT_QT6_SVG_GEN_QSVGWIDGET_H +#define MIQT_QT6_SVG_GEN_QSVGWIDGET_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QActionEvent; +class QByteArray; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; +class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; +class QSize; +class QSvgRenderer; +class QSvgWidget; +class QTabletEvent; +class QVariant; +class QWheelEvent; +class QWidget; +#else +typedef struct QActionEvent QActionEvent; +typedef struct QByteArray QByteArray; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; +typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QSvgRenderer QSvgRenderer; +typedef struct QSvgWidget QSvgWidget; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; +typedef struct QWidget QWidget; +#endif + +void QSvgWidget_new(QWidget* parent, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSvgWidget_new2(QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSvgWidget_new3(struct miqt_string file, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QSvgWidget_new4(struct miqt_string file, QWidget* parent, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMetaObject* QSvgWidget_MetaObject(const QSvgWidget* self); +void* QSvgWidget_Metacast(QSvgWidget* self, const char* param1); +struct miqt_string QSvgWidget_Tr(const char* s); +QSvgRenderer* QSvgWidget_Renderer(const QSvgWidget* self); +QSize* QSvgWidget_SizeHint(const QSvgWidget* self); +void QSvgWidget_Load(QSvgWidget* self, struct miqt_string file); +void QSvgWidget_LoadWithContents(QSvgWidget* self, struct miqt_string contents); +void QSvgWidget_PaintEvent(QSvgWidget* self, QPaintEvent* event); +struct miqt_string QSvgWidget_Tr2(const char* s, const char* c); +struct miqt_string QSvgWidget_Tr3(const char* s, const char* c, int n); +void QSvgWidget_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QSvgWidget_virtualbase_SizeHint(const void* self); +void QSvgWidget_override_virtual_PaintEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QSvgWidget_override_virtual_DevType(void* self, intptr_t slot); +int QSvgWidget_virtualbase_DevType(const void* self); +void QSvgWidget_override_virtual_SetVisible(void* self, intptr_t slot); +void QSvgWidget_virtualbase_SetVisible(void* self, bool visible); +void QSvgWidget_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QSvgWidget_virtualbase_MinimumSizeHint(const void* self); +void QSvgWidget_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QSvgWidget_virtualbase_HeightForWidth(const void* self, int param1); +void QSvgWidget_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QSvgWidget_virtualbase_HasHeightForWidth(const void* self); +void QSvgWidget_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QSvgWidget_virtualbase_PaintEngine(const void* self); +void QSvgWidget_override_virtual_Event(void* self, intptr_t slot); +bool QSvgWidget_virtualbase_Event(void* self, QEvent* event); +void QSvgWidget_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QSvgWidget_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QSvgWidget_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QSvgWidget_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QSvgWidget_override_virtual_WheelEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QSvgWidget_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QSvgWidget_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QSvgWidget_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QSvgWidget_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QSvgWidget_override_virtual_EnterEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_EnterEvent(void* self, QEnterEvent* event); +void QSvgWidget_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_LeaveEvent(void* self, QEvent* event); +void QSvgWidget_override_virtual_MoveEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QSvgWidget_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QSvgWidget_override_virtual_CloseEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QSvgWidget_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QSvgWidget_override_virtual_TabletEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QSvgWidget_override_virtual_ActionEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QSvgWidget_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QSvgWidget_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QSvgWidget_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QSvgWidget_override_virtual_DropEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_DropEvent(void* self, QDropEvent* event); +void QSvgWidget_override_virtual_ShowEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QSvgWidget_override_virtual_HideEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_HideEvent(void* self, QHideEvent* event); +void QSvgWidget_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QSvgWidget_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +void QSvgWidget_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QSvgWidget_override_virtual_Metric(void* self, intptr_t slot); +int QSvgWidget_virtualbase_Metric(const void* self, int param1); +void QSvgWidget_override_virtual_InitPainter(void* self, intptr_t slot); +void QSvgWidget_virtualbase_InitPainter(const void* self, QPainter* painter); +void QSvgWidget_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QSvgWidget_virtualbase_Redirected(const void* self, QPoint* offset); +void QSvgWidget_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QSvgWidget_virtualbase_SharedPainter(const void* self); +void QSvgWidget_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QSvgWidget_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QSvgWidget_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QSvgWidget_virtualbase_InputMethodQuery(const void* self, int param1); +void QSvgWidget_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QSvgWidget_virtualbase_FocusNextPrevChild(void* self, bool next); +void QSvgWidget_Delete(QSvgWidget* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif From 23e4e307d939f0eb32887339c88858b148c06720 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 26 Nov 2024 19:54:57 +1300 Subject: [PATCH 04/12] svg: add example --- .gitignore | 1 + examples/libraries/qt-svg/main.go | 18 ++++++++++++++++++ examples/libraries/qt-svg/screenshot.png | Bin 0 -> 5440 bytes 3 files changed, 19 insertions(+) create mode 100644 examples/libraries/qt-svg/main.go create mode 100644 examples/libraries/qt-svg/screenshot.png diff --git a/.gitignore b/.gitignore index 9582fb36..c752ae03 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ examples/libraries/extras-scintillaedit/extras-scintillaedit examples/libraries/qt-multimedia/qt-multimedia examples/libraries/qt-network/qt-network examples/libraries/qt-printsupport/qt-printsupport +examples/libraries/qt-svg/qt-svg examples/libraries/qt6-multimedia/qt6-multimedia examples/libraries/restricted-extras-qscintilla/restricted-extras-qscintilla diff --git a/examples/libraries/qt-svg/main.go b/examples/libraries/qt-svg/main.go new file mode 100644 index 00000000..9579262d --- /dev/null +++ b/examples/libraries/qt-svg/main.go @@ -0,0 +1,18 @@ +package main + +import ( + "os" + + "github.com/mappu/miqt/qt" + "github.com/mappu/miqt/qt/svg" +) + +func main() { + + qt.NewQApplication(os.Args) + + w := svg.NewQSvgWidget3("../../../doc/logo.svg") + w.Show() + + qt.QApplication_Exec() +} diff --git a/examples/libraries/qt-svg/screenshot.png b/examples/libraries/qt-svg/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..40c43a31636f45919c326340b5154c98209131c4 GIT binary patch literal 5440 zcmV-G6~F3Qp>BVSCvYt4^H#Eeaz6JvkFr43C708eiIV!`5Sk7_~D2DmgQV|vYWE2JD|aW z0@z8O*DbUPQZtNV`}NSskt6?(6+KdRbq6|F@B*(hJS{$909HYYlZuIn`BqX=(zhY8 ztuHic)TqCAC$aB8u$(JTc2jnRU}xA|K@Aqb1lVwb=k@4m(NT0<0g4k&Oia8165DQs z;^N|Nf<}xO@sHjl_PLqWbMj>$Wk+RK2zFMGg8|9H^?7MD*jhmk1|$o8Ex_BS$2_g< zAU<_B<3w;$;_n^e#J(#Y-zhG}_rxdh`{Jbfi*5bIw!0v){Rgbbk+K_X2*IAPEo=;1 z!{z{AI;mTvH}2aLp4XD6m0m2|TCn+A^Beo9^+Xs#vJN7>D_=pa6M=r~RU zCn=r}5w8ssCpBC=j}ea_8Z%~0tk^z6Y#XUdyf(_4#C~zC(96^HH`@y~gkVqD6*iW( z{-JaGiNE8;(?`VPWbt@{0C^%Lwiy!J zAJZj{_c*KPWVVO0ld>CZDBky|wC8wf<3!k8+WsN&zM)_u0C@X^&C{ZT=^2@{DSHbw zHn&i7%RyEz78uCN$|f)oAiTkqBq~pfX*@mUB~x8D%Q)s9c-oAN4Qw=)i@*ff03%=p z%zzy*Bpu*4BwL zwn2fbhYSAJ@mc~G{|x_BPVu1=1Chf+I>Z;W1!Yx~Us@TEurI?Kv7rJ|Wy8TrkAdqh z4Ti}DI0EVAmS!1W`u5E^hX{bv+N93&s=WLf?H5nOx5#eQuCB2C_nuRdT!EW`ccdX8XccN%U7n-w3%3y_Pq)f`KX=$CpJpJrAy$HA6wMtj`>Y&RGGs zbk!1S{r3S>wr-i>O*6M_rHMcOXBsBp{n>y1mxya;(2k~^OY+hK0v8whfx$z= z0<9I#WEWs|dqnToZQ0r6oxr7a~-~W&v`=_7K z=!9|fs~2B(0k@=hJMG;$kG2<<1QaUZf)BWFP*~&IP=XbX4~F@J4|t;rTv_Sh`kQZ2?5HsmpE#c8&R<|;9`OFM;w@Ca>to8z zE25hE#(*!rf;U`)u~2-KM`|b{>v=~7S+CHu;FhH>q(lF457o?@N;%ti(l4HSftIdZ zZGigo|9O^T$$T@`ADC>{2A1R*>w|LJlC~ND^&PfQnrhHl9RfL1v*a;xA2C3^a zXyuwTT9vke)`f?_ey zDmJnNs8Im8$SkC1=Lm4O8_?o4^*#uXu`iCnATYRL1-EJc0jjBOpt7p!PL)ClRFArhL*v#1zgK3D+0+*p>aQ(QsvopYDXc^py0~gTF+sM!|xDfb(IS zW0DZ|{b)l2EfU9Bx$7V;-PS_$HZ{_F>+5Lpk_rYlP;kvZ6@{O64+Pw3^R$<)TqD)e ziVyp>FF-A9I6>`SUnXx2|6_0K8A{DNNH2e05%J)H9rcq@5dm&Ah6jOwJALIID&K#a z0%^zEFB+cMpFX~yR!1MC*BhF;yqdxF2i$0lY5fKFbph?kuP(WT^2;+9srl$R+H>#> z?Q8pr+D=`dtJnV2?R|d|n-=Hp52%kTh1c#0aOE$m4~{5sqj?}!P=A7U?>lMe57|v# z-}~y)N&`l{ox6C2))XExys*1{rYx(Z#as8&;gjcG_5;v!H#9J~p#qn)2VKf2IqU*o z^RaW5zq%3I?$~?WW&hR_=V{Vn2G@3Q8QL!WCZ&qbU%J`}Q2V*de#e`DwE9513%pCV z?q_iA1ec+8)rwsQT!2dr5TKb~)EF_YYITRsGPrhu%g}aLmF6kod0$ylY0I$?>;8IK z6@zOBxS@b{PDX=~27>fN|7(A&rls3kXnW0Zs@Q*8jL6%msNp1~ixEDO_ns2|Z?4*F zctOOC`hJ!&BALZmah;XBaS`Q+^sHMPAv9TtjDaNFsw(RfbPF#%o;?W+BfE?>RoHSdYU{p%|_M(hASyW*&kcJkGb zjso0vq{9G&-qsc#3hG+m-1U}S(dP2{+v{or$`R++orpeg{h9I&HMnQaUv`P}tR(GA zn@;()4;u2Vz6MZMz{NDK-aZyyI+$yLZ-a}MyZ$dGGa?CG$JQ!@8eB7!d39gX>Vj5U zCPD@bdh&!P)<^K}8d6C+M0l|(ztspezQ{jFh4m*~Kt#)}J{B~%86`(tjycmqND=7u zICAQO%WE@IYpAm2bf@$WEb_s~Ot{l3aSa*V5P}O>wuxBn-SwVhQG^HP87hPbfXf>= zc(t~h>h#^8#E*w)HE@VM?sIxPdI)aSFKbo_gC@cEr+tZ?AQY5fM%V1FjAk zrg-hR9>{>`&D#u`)4_Gjnlq<>3!T!!1ps7q@Pn`4t}MpUpup8K=< z3~rFi)13tFf#Y9y?uT5h<^QJ@!<2df-U_(-gaI-lp#axgv3Vqb>xla*I0@Xk!)H79 zt3Q0!@_s0QQ4Jn57;sCqPyvHIyF&%co<(wuYYVt`+=9tT;8th_+f7H$1vF~+Ru5nW zT$DblcIB!~gR^EWZjSJ*f@AI-<|J_S5&gk0zYYkD#ZnS}m*`TgT2kYSKU+=+!yROJJy@sqsu-D^Qd)M_ibn-ld%i!7%E>=e9ZK1_{ zvbU_q6|F|2>Ogz112-hM(r0je6~!D4>RQY;<(boctaa1-m>Rj@hWRpb5?1Ha-Pzh&c7LdVZaJvZ=W=FKyI8=$DPS>An z@Y?d~Zbk6Emc*MUVQ|j|2A9G0>xLj^uZtP4tnxORY+?Nwmew3ML5mqZD@%-u8&A4S zR`^<@#^5rz-O^ZF_Z;h1)c*Cwt40A323@%M$0u3)jFcJHmZ9$WsGB1CqwNxWRoye!F`7q`P!Sm9Ap-^SoVSb~jNA81ad_2uul zzn0qXGd~7HSaz=VLu~5pYgoPSopp77pVzb%9n0&nP7ce~n~rwe><*a#d|;49GvC?K zyg1UT;H9(5+Nj~kSp!nkIKayyOxap}%$CUsKwDII#JDL8gWJo6!CN5Ngm6oTmceBi znlHZU^#*Sl%-wK84Q<4LJ7&z7#~9qu${aFmt~}~kXc=6V%bm>ix&!2a?YwQ0ozOZS zT=D$DxVX5H;`u}dH}ukLdoNtNN+~;990{!sE}R;J+spNmfCcplC}j-C3|OGhIvQM| zy9Bg@0It~1;Pw((fmR0>PE9g`u<|Yjm*rS!9SN@J#7+3;2?+`Ph3kJnXoT1{fx%^H z-GK|I25{lzzzo;{LkupCN$u>3l~&MEG8!ATlkqDvHcbiWPexu9UwGJbS9C(WoSKk+(a-UyzRXTTrdQd z6u1^{zZ4v}`fr_y$9D+bBRVuhyf0n{capq=3zlVLe*I-B+<^GyC6zS!^A5ctov5H=kn!3EoSS&bIY8tenie8tRzM`6@udJpwq-LZ- zduZkt9ePt})~XKS7D=<9)iv~6@%Ojl?^{x{*VNG4n%-Fp?WK3ub?7~4Jyc8YLunoQ zKgdCCsFvnH8MQPwqmDkx?9#{32B_Z9CmTET`>cAJx3S*%(L-o{R)_uoZK|hF zH#N|w*$uQnXd$#2+Sj2i`{*;NMLAF-E#A^dpXYRFNp6>x<~C7rU7Kytnqu5|FalP< zjJw}B3kKY70GkJB2%zxg_qy(~3!g4nNL#k#P}BYv;;^B2hX-H)EG!UA_{t`Dh;4%dSHY_f z(#+Gprpbt5atatNK|D`F9uKo8nEFG(1qzF?oI{s*&yS^^aH7O{ghft0f7nL1mn;sS z2z$b=m}EfO3pR)0%iTuuqc$_k;8a*bM? zE(!W*@%k7iDn3ljspl_Y?6enbsO*V41lU;G8fmW~U;r$D3B5MK(@a?)S%iQFYo0tW za=R#9LrjB?<7)zeIX-zPYs2Ug!ZHrI&~mUYdD1M0N!dr)P1zAPm5|;qLju5hHyDsC z^pj<FmdrthTuwcIPj-V%0V(W@ ztO4u|+sm5UTYJLO`W&p8CnnHAIbgd9qenoD&Pz|+PcHYlUFLtkqf1U^upBD0y>wej zM|B${2Vgf#25#_Hx)^F;{i@f+h!LHY>9QN-Ck{E^n;;~gA)Fj5@&#MUP~b)-SrX6} zEZ9+R8y3&2^1P6OSQlnYAed1Z^eO=f%RD1;7;ZfWJR_-**P3DVj%_CD$uORlrMW<7eTELixr9B qGQg~e1eU>NF}N%Smm9aJX#WpxE3icI^%>3p0000 Date: Tue, 26 Nov 2024 19:55:10 +1300 Subject: [PATCH 05/12] qtscript: genbindings configuration --- cmd/genbindings/config-libraries.go | 12 ++++++++++++ docker/genbindings.Dockerfile | 1 + 2 files changed, 13 insertions(+) diff --git a/cmd/genbindings/config-libraries.go b/cmd/genbindings/config-libraries.go index b70a1078..1b579663 100644 --- a/cmd/genbindings/config-libraries.go +++ b/cmd/genbindings/config-libraries.go @@ -102,6 +102,18 @@ func ProcessLibraries(clangBin, outDir, extraLibsDir string) { ClangMatchSameHeaderDefinitionOnly, ) + generate( + "qt/script", + []string{ + "/usr/include/x86_64-linux-gnu/qt5/QtScript", + }, + AllowAllHeaders, + clangBin, + pkgConfigCflags("Qt5Script"), + outDir, + ClangMatchSameHeaderDefinitionOnly, + ) + // Depends on QtCore/Gui/Widgets, QPrintSupport generate( "qt-restricted-extras/qscintilla", diff --git a/docker/genbindings.Dockerfile b/docker/genbindings.Dockerfile index 2bcdd632..6ef89cfc 100644 --- a/docker/genbindings.Dockerfile +++ b/docker/genbindings.Dockerfile @@ -5,6 +5,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ golang-go \ qtbase5-dev \ qtmultimedia5-dev \ + qtscript5-dev \ libqt5svg5-dev \ qt6-base-dev \ qt6-multimedia-dev \ From 2526335d5d92b600f31062d28ca1b25e9907359f Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 26 Nov 2024 19:55:18 +1300 Subject: [PATCH 06/12] qtscript: initial generation --- qt/script/cflags.go | 6 + qt/script/gen_qscriptable.cpp | 41 + qt/script/gen_qscriptable.go | 100 ++ qt/script/gen_qscriptable.h | 41 + qt/script/gen_qscriptclass.cpp | 412 +++++++++ qt/script/gen_qscriptclass.go | 387 ++++++++ qt/script/gen_qscriptclass.h | 68 ++ .../gen_qscriptclasspropertyiterator.cpp | 57 ++ qt/script/gen_qscriptclasspropertyiterator.go | 110 +++ qt/script/gen_qscriptclasspropertyiterator.h | 43 + qt/script/gen_qscriptcontext.cpp | 142 +++ qt/script/gen_qscriptcontext.go | 229 +++++ qt/script/gen_qscriptcontext.h | 55 ++ qt/script/gen_qscriptcontextinfo.cpp | 121 +++ qt/script/gen_qscriptcontextinfo.go | 174 ++++ qt/script/gen_qscriptcontextinfo.h | 48 + qt/script/gen_qscriptengine.cpp | 697 ++++++++++++++ qt/script/gen_qscriptengine.go | 863 ++++++++++++++++++ qt/script/gen_qscriptengine.h | 152 +++ qt/script/gen_qscriptengineagent.cpp | 474 ++++++++++ qt/script/gen_qscriptengineagent.go | 426 +++++++++ qt/script/gen_qscriptengineagent.h | 70 ++ qt/script/gen_qscriptextensioninterface.cpp | 97 ++ qt/script/gen_qscriptextensioninterface.go | 139 +++ qt/script/gen_qscriptextensioninterface.h | 40 + qt/script/gen_qscriptextensionplugin.cpp | 438 +++++++++ qt/script/gen_qscriptextensionplugin.go | 415 +++++++++ qt/script/gen_qscriptextensionplugin.h | 80 ++ qt/script/gen_qscriptprogram.cpp | 88 ++ qt/script/gen_qscriptprogram.go | 168 ++++ qt/script/gen_qscriptprogram.h | 41 + qt/script/gen_qscriptstring.cpp | 63 ++ qt/script/gen_qscriptstring.go | 115 +++ qt/script/gen_qscriptstring.h | 38 + qt/script/gen_qscriptvalue.cpp | 414 +++++++++ qt/script/gen_qscriptvalue.go | 637 +++++++++++++ qt/script/gen_qscriptvalue.h | 129 +++ qt/script/gen_qscriptvalueiterator.cpp | 83 ++ qt/script/gen_qscriptvalueiterator.go | 135 +++ qt/script/gen_qscriptvalueiterator.h | 47 + 40 files changed, 7883 insertions(+) create mode 100644 qt/script/cflags.go create mode 100644 qt/script/gen_qscriptable.cpp create mode 100644 qt/script/gen_qscriptable.go create mode 100644 qt/script/gen_qscriptable.h create mode 100644 qt/script/gen_qscriptclass.cpp create mode 100644 qt/script/gen_qscriptclass.go create mode 100644 qt/script/gen_qscriptclass.h create mode 100644 qt/script/gen_qscriptclasspropertyiterator.cpp create mode 100644 qt/script/gen_qscriptclasspropertyiterator.go create mode 100644 qt/script/gen_qscriptclasspropertyiterator.h create mode 100644 qt/script/gen_qscriptcontext.cpp create mode 100644 qt/script/gen_qscriptcontext.go create mode 100644 qt/script/gen_qscriptcontext.h create mode 100644 qt/script/gen_qscriptcontextinfo.cpp create mode 100644 qt/script/gen_qscriptcontextinfo.go create mode 100644 qt/script/gen_qscriptcontextinfo.h create mode 100644 qt/script/gen_qscriptengine.cpp create mode 100644 qt/script/gen_qscriptengine.go create mode 100644 qt/script/gen_qscriptengine.h create mode 100644 qt/script/gen_qscriptengineagent.cpp create mode 100644 qt/script/gen_qscriptengineagent.go create mode 100644 qt/script/gen_qscriptengineagent.h create mode 100644 qt/script/gen_qscriptextensioninterface.cpp create mode 100644 qt/script/gen_qscriptextensioninterface.go create mode 100644 qt/script/gen_qscriptextensioninterface.h create mode 100644 qt/script/gen_qscriptextensionplugin.cpp create mode 100644 qt/script/gen_qscriptextensionplugin.go create mode 100644 qt/script/gen_qscriptextensionplugin.h create mode 100644 qt/script/gen_qscriptprogram.cpp create mode 100644 qt/script/gen_qscriptprogram.go create mode 100644 qt/script/gen_qscriptprogram.h create mode 100644 qt/script/gen_qscriptstring.cpp create mode 100644 qt/script/gen_qscriptstring.go create mode 100644 qt/script/gen_qscriptstring.h create mode 100644 qt/script/gen_qscriptvalue.cpp create mode 100644 qt/script/gen_qscriptvalue.go create mode 100644 qt/script/gen_qscriptvalue.h create mode 100644 qt/script/gen_qscriptvalueiterator.cpp create mode 100644 qt/script/gen_qscriptvalueiterator.go create mode 100644 qt/script/gen_qscriptvalueiterator.h diff --git a/qt/script/cflags.go b/qt/script/cflags.go new file mode 100644 index 00000000..88400872 --- /dev/null +++ b/qt/script/cflags.go @@ -0,0 +1,6 @@ +package script + +/* +#cgo pkg-config: Qt5Script +*/ +import "C" diff --git a/qt/script/gen_qscriptable.cpp b/qt/script/gen_qscriptable.cpp new file mode 100644 index 00000000..cf6234bc --- /dev/null +++ b/qt/script/gen_qscriptable.cpp @@ -0,0 +1,41 @@ +#include +#include +#include +#include +#include +#include "gen_qscriptable.h" +#include "_cgo_export.h" + +void QScriptable_new(QScriptable** outptr_QScriptable) { + QScriptable* ret = new QScriptable(); + *outptr_QScriptable = ret; +} + +QScriptEngine* QScriptable_Engine(const QScriptable* self) { + return self->engine(); +} + +QScriptContext* QScriptable_Context(const QScriptable* self) { + return self->context(); +} + +QScriptValue* QScriptable_ThisObject(const QScriptable* self) { + return new QScriptValue(self->thisObject()); +} + +int QScriptable_ArgumentCount(const QScriptable* self) { + return self->argumentCount(); +} + +QScriptValue* QScriptable_Argument(const QScriptable* self, int index) { + return new QScriptValue(self->argument(static_cast(index))); +} + +void QScriptable_Delete(QScriptable* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/script/gen_qscriptable.go b/qt/script/gen_qscriptable.go new file mode 100644 index 00000000..1f81a759 --- /dev/null +++ b/qt/script/gen_qscriptable.go @@ -0,0 +1,100 @@ +package script + +/* + +#include "gen_qscriptable.h" +#include + +*/ +import "C" + +import ( + "runtime" + "unsafe" +) + +type QScriptable struct { + h *C.QScriptable + isSubclass bool +} + +func (this *QScriptable) cPointer() *C.QScriptable { + if this == nil { + return nil + } + return this.h +} + +func (this *QScriptable) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQScriptable constructs the type using only CGO pointers. +func newQScriptable(h *C.QScriptable) *QScriptable { + if h == nil { + return nil + } + return &QScriptable{h: h} +} + +// UnsafeNewQScriptable constructs the type using only unsafe pointers. +func UnsafeNewQScriptable(h unsafe.Pointer) *QScriptable { + if h == nil { + return nil + } + + return &QScriptable{h: (*C.QScriptable)(h)} +} + +// NewQScriptable constructs a new QScriptable object. +func NewQScriptable() *QScriptable { + var outptr_QScriptable *C.QScriptable = nil + + C.QScriptable_new(&outptr_QScriptable) + ret := newQScriptable(outptr_QScriptable) + ret.isSubclass = true + return ret +} + +func (this *QScriptable) Engine() *QScriptEngine { + return UnsafeNewQScriptEngine(unsafe.Pointer(C.QScriptable_Engine(this.h)), nil) +} + +func (this *QScriptable) Context() *QScriptContext { + return UnsafeNewQScriptContext(unsafe.Pointer(C.QScriptable_Context(this.h))) +} + +func (this *QScriptable) ThisObject() *QScriptValue { + _ret := C.QScriptable_ThisObject(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptable) ArgumentCount() int { + return (int)(C.QScriptable_ArgumentCount(this.h)) +} + +func (this *QScriptable) Argument(index int) *QScriptValue { + _ret := C.QScriptable_Argument(this.h, (C.int)(index)) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +// Delete this object from C++ memory. +func (this *QScriptable) Delete() { + C.QScriptable_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 *QScriptable) GoGC() { + runtime.SetFinalizer(this, func(this *QScriptable) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/script/gen_qscriptable.h b/qt/script/gen_qscriptable.h new file mode 100644 index 00000000..929e17f7 --- /dev/null +++ b/qt/script/gen_qscriptable.h @@ -0,0 +1,41 @@ +#pragma once +#ifndef MIQT_QT_SCRIPT_GEN_QSCRIPTABLE_H +#define MIQT_QT_SCRIPT_GEN_QSCRIPTABLE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QScriptContext; +class QScriptEngine; +class QScriptValue; +class QScriptable; +#else +typedef struct QScriptContext QScriptContext; +typedef struct QScriptEngine QScriptEngine; +typedef struct QScriptValue QScriptValue; +typedef struct QScriptable QScriptable; +#endif + +void QScriptable_new(QScriptable** outptr_QScriptable); +QScriptEngine* QScriptable_Engine(const QScriptable* self); +QScriptContext* QScriptable_Context(const QScriptable* self); +QScriptValue* QScriptable_ThisObject(const QScriptable* self); +int QScriptable_ArgumentCount(const QScriptable* self); +QScriptValue* QScriptable_Argument(const QScriptable* self, int index); +void QScriptable_Delete(QScriptable* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/script/gen_qscriptclass.cpp b/qt/script/gen_qscriptclass.cpp new file mode 100644 index 00000000..73a42fff --- /dev/null +++ b/qt/script/gen_qscriptclass.cpp @@ -0,0 +1,412 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qscriptclass.h" +#include "_cgo_export.h" + +class MiqtVirtualQScriptClass : public virtual QScriptClass { +public: + + MiqtVirtualQScriptClass(QScriptEngine* engine): QScriptClass(engine) {}; + + virtual ~MiqtVirtualQScriptClass() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__QueryProperty = 0; + + // Subclass to allow providing a Go implementation + virtual QScriptClass::QueryFlags queryProperty(const QScriptValue& object, const QScriptString& name, QScriptClass::QueryFlags flags, uint* id) override { + if (handle__QueryProperty == 0) { + return QScriptClass::queryProperty(object, name, flags, id); + } + + const QScriptValue& object_ret = object; + // Cast returned reference into pointer + QScriptValue* sigval1 = const_cast(&object_ret); + const QScriptString& name_ret = name; + // Cast returned reference into pointer + QScriptString* sigval2 = const_cast(&name_ret); + QScriptClass::QueryFlags flags_ret = flags; + int sigval3 = static_cast(flags_ret); + uint* id_ret = id; + unsigned int* sigval4 = static_cast(id_ret); + + int callback_return_value = miqt_exec_callback_QScriptClass_QueryProperty(this, handle__QueryProperty, sigval1, sigval2, sigval3, sigval4); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_QueryProperty(QScriptValue* object, QScriptString* name, int flags, unsigned int* id) { + + QScriptClass::QueryFlags _ret = QScriptClass::queryProperty(*object, *name, static_cast(flags), static_cast(id)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Property = 0; + + // Subclass to allow providing a Go implementation + virtual QScriptValue property(const QScriptValue& object, const QScriptString& name, uint id) override { + if (handle__Property == 0) { + return QScriptClass::property(object, name, id); + } + + const QScriptValue& object_ret = object; + // Cast returned reference into pointer + QScriptValue* sigval1 = const_cast(&object_ret); + const QScriptString& name_ret = name; + // Cast returned reference into pointer + QScriptString* sigval2 = const_cast(&name_ret); + uint id_ret = id; + unsigned int sigval3 = static_cast(id_ret); + + QScriptValue* callback_return_value = miqt_exec_callback_QScriptClass_Property(this, handle__Property, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QScriptValue* virtualbase_Property(QScriptValue* object, QScriptString* name, unsigned int id) { + + return new QScriptValue(QScriptClass::property(*object, *name, static_cast(id))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SetProperty = 0; + + // Subclass to allow providing a Go implementation + virtual void setProperty(QScriptValue& object, const QScriptString& name, uint id, const QScriptValue& value) override { + if (handle__SetProperty == 0) { + QScriptClass::setProperty(object, name, id, value); + return; + } + + QScriptValue& object_ret = object; + // Cast returned reference into pointer + QScriptValue* sigval1 = &object_ret; + const QScriptString& name_ret = name; + // Cast returned reference into pointer + QScriptString* sigval2 = const_cast(&name_ret); + uint id_ret = id; + unsigned int sigval3 = static_cast(id_ret); + const QScriptValue& value_ret = value; + // Cast returned reference into pointer + QScriptValue* sigval4 = const_cast(&value_ret); + + miqt_exec_callback_QScriptClass_SetProperty(this, handle__SetProperty, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetProperty(QScriptValue* object, QScriptString* name, unsigned int id, QScriptValue* value) { + + QScriptClass::setProperty(*object, *name, static_cast(id), *value); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PropertyFlags = 0; + + // Subclass to allow providing a Go implementation + virtual QScriptValue::PropertyFlags propertyFlags(const QScriptValue& object, const QScriptString& name, uint id) override { + if (handle__PropertyFlags == 0) { + return QScriptClass::propertyFlags(object, name, id); + } + + const QScriptValue& object_ret = object; + // Cast returned reference into pointer + QScriptValue* sigval1 = const_cast(&object_ret); + const QScriptString& name_ret = name; + // Cast returned reference into pointer + QScriptString* sigval2 = const_cast(&name_ret); + uint id_ret = id; + unsigned int sigval3 = static_cast(id_ret); + + int callback_return_value = miqt_exec_callback_QScriptClass_PropertyFlags(this, handle__PropertyFlags, sigval1, sigval2, sigval3); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_PropertyFlags(QScriptValue* object, QScriptString* name, unsigned int id) { + + QScriptValue::PropertyFlags _ret = QScriptClass::propertyFlags(*object, *name, static_cast(id)); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NewIterator = 0; + + // Subclass to allow providing a Go implementation + virtual QScriptClassPropertyIterator* newIterator(const QScriptValue& object) override { + if (handle__NewIterator == 0) { + return QScriptClass::newIterator(object); + } + + const QScriptValue& object_ret = object; + // Cast returned reference into pointer + QScriptValue* sigval1 = const_cast(&object_ret); + + QScriptClassPropertyIterator* callback_return_value = miqt_exec_callback_QScriptClass_NewIterator(this, handle__NewIterator, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QScriptClassPropertyIterator* virtualbase_NewIterator(QScriptValue* object) { + + return QScriptClass::newIterator(*object); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Prototype = 0; + + // Subclass to allow providing a Go implementation + virtual QScriptValue prototype() const override { + if (handle__Prototype == 0) { + return QScriptClass::prototype(); + } + + + QScriptValue* callback_return_value = miqt_exec_callback_QScriptClass_Prototype(const_cast(this), handle__Prototype); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QScriptValue* virtualbase_Prototype() const { + + return new QScriptValue(QScriptClass::prototype()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Name = 0; + + // Subclass to allow providing a Go implementation + virtual QString name() const override { + if (handle__Name == 0) { + return QScriptClass::name(); + } + + + struct miqt_string callback_return_value = miqt_exec_callback_QScriptClass_Name(const_cast(this), handle__Name); + 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_Name() const { + + QString _ret = QScriptClass::name(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + 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__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QScriptClass::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QScriptClass::supportsExtension(extension); + } + + QScriptClass::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QScriptClass_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QScriptClass::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(QScriptClass::Extension extension, const QVariant& argument) override { + if (handle__Extension == 0) { + return QScriptClass::extension(extension, argument); + } + + QScriptClass::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& argument_ret = argument; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&argument_ret); + + QVariant* callback_return_value = miqt_exec_callback_QScriptClass_Extension(this, handle__Extension, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(int extension, QVariant* argument) { + + return new QVariant(QScriptClass::extension(static_cast(extension), *argument)); + + } + +}; + +void QScriptClass_new(QScriptEngine* engine, QScriptClass** outptr_QScriptClass) { + MiqtVirtualQScriptClass* ret = new MiqtVirtualQScriptClass(engine); + *outptr_QScriptClass = ret; +} + +QScriptEngine* QScriptClass_Engine(const QScriptClass* self) { + return self->engine(); +} + +int QScriptClass_QueryProperty(QScriptClass* self, QScriptValue* object, QScriptString* name, int flags, unsigned int* id) { + QScriptClass::QueryFlags _ret = self->queryProperty(*object, *name, static_cast(flags), static_cast(id)); + return static_cast(_ret); +} + +QScriptValue* QScriptClass_Property(QScriptClass* self, QScriptValue* object, QScriptString* name, unsigned int id) { + return new QScriptValue(self->property(*object, *name, static_cast(id))); +} + +void QScriptClass_SetProperty(QScriptClass* self, QScriptValue* object, QScriptString* name, unsigned int id, QScriptValue* value) { + self->setProperty(*object, *name, static_cast(id), *value); +} + +int QScriptClass_PropertyFlags(QScriptClass* self, QScriptValue* object, QScriptString* name, unsigned int id) { + QScriptValue::PropertyFlags _ret = self->propertyFlags(*object, *name, static_cast(id)); + return static_cast(_ret); +} + +QScriptClassPropertyIterator* QScriptClass_NewIterator(QScriptClass* self, QScriptValue* object) { + return self->newIterator(*object); +} + +QScriptValue* QScriptClass_Prototype(const QScriptClass* self) { + return new QScriptValue(self->prototype()); +} + +struct miqt_string QScriptClass_Name(const QScriptClass* self) { + QString _ret = self->name(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QScriptClass_SupportsExtension(const QScriptClass* self, int extension) { + return self->supportsExtension(static_cast(extension)); +} + +QVariant* QScriptClass_Extension(QScriptClass* self, int extension, QVariant* argument) { + return new QVariant(self->extension(static_cast(extension), *argument)); +} + +void QScriptClass_override_virtual_QueryProperty(void* self, intptr_t slot) { + dynamic_cast( (QScriptClass*)(self) )->handle__QueryProperty = slot; +} + +int QScriptClass_virtualbase_QueryProperty(void* self, QScriptValue* object, QScriptString* name, int flags, unsigned int* id) { + return ( (MiqtVirtualQScriptClass*)(self) )->virtualbase_QueryProperty(object, name, flags, id); +} + +void QScriptClass_override_virtual_Property(void* self, intptr_t slot) { + dynamic_cast( (QScriptClass*)(self) )->handle__Property = slot; +} + +QScriptValue* QScriptClass_virtualbase_Property(void* self, QScriptValue* object, QScriptString* name, unsigned int id) { + return ( (MiqtVirtualQScriptClass*)(self) )->virtualbase_Property(object, name, id); +} + +void QScriptClass_override_virtual_SetProperty(void* self, intptr_t slot) { + dynamic_cast( (QScriptClass*)(self) )->handle__SetProperty = slot; +} + +void QScriptClass_virtualbase_SetProperty(void* self, QScriptValue* object, QScriptString* name, unsigned int id, QScriptValue* value) { + ( (MiqtVirtualQScriptClass*)(self) )->virtualbase_SetProperty(object, name, id, value); +} + +void QScriptClass_override_virtual_PropertyFlags(void* self, intptr_t slot) { + dynamic_cast( (QScriptClass*)(self) )->handle__PropertyFlags = slot; +} + +int QScriptClass_virtualbase_PropertyFlags(void* self, QScriptValue* object, QScriptString* name, unsigned int id) { + return ( (MiqtVirtualQScriptClass*)(self) )->virtualbase_PropertyFlags(object, name, id); +} + +void QScriptClass_override_virtual_NewIterator(void* self, intptr_t slot) { + dynamic_cast( (QScriptClass*)(self) )->handle__NewIterator = slot; +} + +QScriptClassPropertyIterator* QScriptClass_virtualbase_NewIterator(void* self, QScriptValue* object) { + return ( (MiqtVirtualQScriptClass*)(self) )->virtualbase_NewIterator(object); +} + +void QScriptClass_override_virtual_Prototype(void* self, intptr_t slot) { + dynamic_cast( (QScriptClass*)(self) )->handle__Prototype = slot; +} + +QScriptValue* QScriptClass_virtualbase_Prototype(const void* self) { + return ( (const MiqtVirtualQScriptClass*)(self) )->virtualbase_Prototype(); +} + +void QScriptClass_override_virtual_Name(void* self, intptr_t slot) { + dynamic_cast( (QScriptClass*)(self) )->handle__Name = slot; +} + +struct miqt_string QScriptClass_virtualbase_Name(const void* self) { + return ( (const MiqtVirtualQScriptClass*)(self) )->virtualbase_Name(); +} + +void QScriptClass_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QScriptClass*)(self) )->handle__SupportsExtension = slot; +} + +bool QScriptClass_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQScriptClass*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QScriptClass_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QScriptClass*)(self) )->handle__Extension = slot; +} + +QVariant* QScriptClass_virtualbase_Extension(void* self, int extension, QVariant* argument) { + return ( (MiqtVirtualQScriptClass*)(self) )->virtualbase_Extension(extension, argument); +} + +void QScriptClass_Delete(QScriptClass* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/script/gen_qscriptclass.go b/qt/script/gen_qscriptclass.go new file mode 100644 index 00000000..fe8a5e8f --- /dev/null +++ b/qt/script/gen_qscriptclass.go @@ -0,0 +1,387 @@ +package script + +/* + +#include "gen_qscriptclass.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QScriptClass__QueryFlag int + +const ( + QScriptClass__HandlesReadAccess QScriptClass__QueryFlag = 1 + QScriptClass__HandlesWriteAccess QScriptClass__QueryFlag = 2 +) + +type QScriptClass__Extension int + +const ( + QScriptClass__Callable QScriptClass__Extension = 0 + QScriptClass__HasInstance QScriptClass__Extension = 1 +) + +type QScriptClass struct { + h *C.QScriptClass + isSubclass bool +} + +func (this *QScriptClass) cPointer() *C.QScriptClass { + if this == nil { + return nil + } + return this.h +} + +func (this *QScriptClass) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQScriptClass constructs the type using only CGO pointers. +func newQScriptClass(h *C.QScriptClass) *QScriptClass { + if h == nil { + return nil + } + return &QScriptClass{h: h} +} + +// UnsafeNewQScriptClass constructs the type using only unsafe pointers. +func UnsafeNewQScriptClass(h unsafe.Pointer) *QScriptClass { + if h == nil { + return nil + } + + return &QScriptClass{h: (*C.QScriptClass)(h)} +} + +// NewQScriptClass constructs a new QScriptClass object. +func NewQScriptClass(engine *QScriptEngine) *QScriptClass { + var outptr_QScriptClass *C.QScriptClass = nil + + C.QScriptClass_new(engine.cPointer(), &outptr_QScriptClass) + ret := newQScriptClass(outptr_QScriptClass) + ret.isSubclass = true + return ret +} + +func (this *QScriptClass) Engine() *QScriptEngine { + return UnsafeNewQScriptEngine(unsafe.Pointer(C.QScriptClass_Engine(this.h)), nil) +} + +func (this *QScriptClass) QueryProperty(object *QScriptValue, name *QScriptString, flags QScriptClass__QueryFlag, id *uint) QScriptClass__QueryFlag { + return (QScriptClass__QueryFlag)(C.QScriptClass_QueryProperty(this.h, object.cPointer(), name.cPointer(), (C.int)(flags), (*C.uint)(unsafe.Pointer(id)))) +} + +func (this *QScriptClass) Property(object *QScriptValue, name *QScriptString, id uint) *QScriptValue { + _ret := C.QScriptClass_Property(this.h, object.cPointer(), name.cPointer(), (C.uint)(id)) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptClass) SetProperty(object *QScriptValue, name *QScriptString, id uint, value *QScriptValue) { + C.QScriptClass_SetProperty(this.h, object.cPointer(), name.cPointer(), (C.uint)(id), value.cPointer()) +} + +func (this *QScriptClass) PropertyFlags(object *QScriptValue, name *QScriptString, id uint) QScriptValue__PropertyFlag { + return (QScriptValue__PropertyFlag)(C.QScriptClass_PropertyFlags(this.h, object.cPointer(), name.cPointer(), (C.uint)(id))) +} + +func (this *QScriptClass) NewIterator(object *QScriptValue) *QScriptClassPropertyIterator { + return UnsafeNewQScriptClassPropertyIterator(unsafe.Pointer(C.QScriptClass_NewIterator(this.h, object.cPointer()))) +} + +func (this *QScriptClass) Prototype() *QScriptValue { + _ret := C.QScriptClass_Prototype(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptClass) Name() string { + var _ms C.struct_miqt_string = C.QScriptClass_Name(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QScriptClass) SupportsExtension(extension QScriptClass__Extension) bool { + return (bool)(C.QScriptClass_SupportsExtension(this.h, (C.int)(extension))) +} + +func (this *QScriptClass) Extension(extension QScriptClass__Extension, argument *qt.QVariant) *qt.QVariant { + _ret := C.QScriptClass_Extension(this.h, (C.int)(extension), (*C.QVariant)(argument.UnsafePointer())) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptClass) callVirtualBase_QueryProperty(object *QScriptValue, name *QScriptString, flags QScriptClass__QueryFlag, id *uint) QScriptClass__QueryFlag { + + return (QScriptClass__QueryFlag)(C.QScriptClass_virtualbase_QueryProperty(unsafe.Pointer(this.h), object.cPointer(), name.cPointer(), (C.int)(flags), (*C.uint)(unsafe.Pointer(id)))) + +} +func (this *QScriptClass) OnQueryProperty(slot func(super func(object *QScriptValue, name *QScriptString, flags QScriptClass__QueryFlag, id *uint) QScriptClass__QueryFlag, object *QScriptValue, name *QScriptString, flags QScriptClass__QueryFlag, id *uint) QScriptClass__QueryFlag) { + C.QScriptClass_override_virtual_QueryProperty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptClass_QueryProperty +func miqt_exec_callback_QScriptClass_QueryProperty(self *C.QScriptClass, cb C.intptr_t, object *C.QScriptValue, name *C.QScriptString, flags C.int, id *C.uint) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QScriptValue, name *QScriptString, flags QScriptClass__QueryFlag, id *uint) QScriptClass__QueryFlag, object *QScriptValue, name *QScriptString, flags QScriptClass__QueryFlag, id *uint) QScriptClass__QueryFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQScriptValue(unsafe.Pointer(object)) + slotval2 := UnsafeNewQScriptString(unsafe.Pointer(name)) + slotval3 := (QScriptClass__QueryFlag)(flags) + + slotval4 := (*uint)(unsafe.Pointer(id)) + + virtualReturn := gofunc((&QScriptClass{h: self}).callVirtualBase_QueryProperty, slotval1, slotval2, slotval3, slotval4) + + return (C.int)(virtualReturn) + +} + +func (this *QScriptClass) callVirtualBase_Property(object *QScriptValue, name *QScriptString, id uint) *QScriptValue { + + _ret := C.QScriptClass_virtualbase_Property(unsafe.Pointer(this.h), object.cPointer(), name.cPointer(), (C.uint)(id)) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QScriptClass) OnProperty(slot func(super func(object *QScriptValue, name *QScriptString, id uint) *QScriptValue, object *QScriptValue, name *QScriptString, id uint) *QScriptValue) { + C.QScriptClass_override_virtual_Property(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptClass_Property +func miqt_exec_callback_QScriptClass_Property(self *C.QScriptClass, cb C.intptr_t, object *C.QScriptValue, name *C.QScriptString, id C.uint) *C.QScriptValue { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QScriptValue, name *QScriptString, id uint) *QScriptValue, object *QScriptValue, name *QScriptString, id uint) *QScriptValue) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQScriptValue(unsafe.Pointer(object)) + slotval2 := UnsafeNewQScriptString(unsafe.Pointer(name)) + slotval3 := (uint)(id) + + virtualReturn := gofunc((&QScriptClass{h: self}).callVirtualBase_Property, slotval1, slotval2, slotval3) + + return virtualReturn.cPointer() + +} + +func (this *QScriptClass) callVirtualBase_SetProperty(object *QScriptValue, name *QScriptString, id uint, value *QScriptValue) { + + C.QScriptClass_virtualbase_SetProperty(unsafe.Pointer(this.h), object.cPointer(), name.cPointer(), (C.uint)(id), value.cPointer()) + +} +func (this *QScriptClass) OnSetProperty(slot func(super func(object *QScriptValue, name *QScriptString, id uint, value *QScriptValue), object *QScriptValue, name *QScriptString, id uint, value *QScriptValue)) { + C.QScriptClass_override_virtual_SetProperty(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptClass_SetProperty +func miqt_exec_callback_QScriptClass_SetProperty(self *C.QScriptClass, cb C.intptr_t, object *C.QScriptValue, name *C.QScriptString, id C.uint, value *C.QScriptValue) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QScriptValue, name *QScriptString, id uint, value *QScriptValue), object *QScriptValue, name *QScriptString, id uint, value *QScriptValue)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQScriptValue(unsafe.Pointer(object)) + slotval2 := UnsafeNewQScriptString(unsafe.Pointer(name)) + slotval3 := (uint)(id) + + slotval4 := UnsafeNewQScriptValue(unsafe.Pointer(value)) + + gofunc((&QScriptClass{h: self}).callVirtualBase_SetProperty, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QScriptClass) callVirtualBase_PropertyFlags(object *QScriptValue, name *QScriptString, id uint) QScriptValue__PropertyFlag { + + return (QScriptValue__PropertyFlag)(C.QScriptClass_virtualbase_PropertyFlags(unsafe.Pointer(this.h), object.cPointer(), name.cPointer(), (C.uint)(id))) + +} +func (this *QScriptClass) OnPropertyFlags(slot func(super func(object *QScriptValue, name *QScriptString, id uint) QScriptValue__PropertyFlag, object *QScriptValue, name *QScriptString, id uint) QScriptValue__PropertyFlag) { + C.QScriptClass_override_virtual_PropertyFlags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptClass_PropertyFlags +func miqt_exec_callback_QScriptClass_PropertyFlags(self *C.QScriptClass, cb C.intptr_t, object *C.QScriptValue, name *C.QScriptString, id C.uint) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QScriptValue, name *QScriptString, id uint) QScriptValue__PropertyFlag, object *QScriptValue, name *QScriptString, id uint) QScriptValue__PropertyFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQScriptValue(unsafe.Pointer(object)) + slotval2 := UnsafeNewQScriptString(unsafe.Pointer(name)) + slotval3 := (uint)(id) + + virtualReturn := gofunc((&QScriptClass{h: self}).callVirtualBase_PropertyFlags, slotval1, slotval2, slotval3) + + return (C.int)(virtualReturn) + +} + +func (this *QScriptClass) callVirtualBase_NewIterator(object *QScriptValue) *QScriptClassPropertyIterator { + + return UnsafeNewQScriptClassPropertyIterator(unsafe.Pointer(C.QScriptClass_virtualbase_NewIterator(unsafe.Pointer(this.h), object.cPointer()))) +} +func (this *QScriptClass) OnNewIterator(slot func(super func(object *QScriptValue) *QScriptClassPropertyIterator, object *QScriptValue) *QScriptClassPropertyIterator) { + C.QScriptClass_override_virtual_NewIterator(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptClass_NewIterator +func miqt_exec_callback_QScriptClass_NewIterator(self *C.QScriptClass, cb C.intptr_t, object *C.QScriptValue) *C.QScriptClassPropertyIterator { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(object *QScriptValue) *QScriptClassPropertyIterator, object *QScriptValue) *QScriptClassPropertyIterator) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQScriptValue(unsafe.Pointer(object)) + + virtualReturn := gofunc((&QScriptClass{h: self}).callVirtualBase_NewIterator, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QScriptClass) callVirtualBase_Prototype() *QScriptValue { + + _ret := C.QScriptClass_virtualbase_Prototype(unsafe.Pointer(this.h)) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QScriptClass) OnPrototype(slot func(super func() *QScriptValue) *QScriptValue) { + C.QScriptClass_override_virtual_Prototype(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptClass_Prototype +func miqt_exec_callback_QScriptClass_Prototype(self *C.QScriptClass, cb C.intptr_t) *C.QScriptValue { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QScriptValue) *QScriptValue) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QScriptClass{h: self}).callVirtualBase_Prototype) + + return virtualReturn.cPointer() + +} + +func (this *QScriptClass) callVirtualBase_Name() string { + + var _ms C.struct_miqt_string = C.QScriptClass_virtualbase_Name(unsafe.Pointer(this.h)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QScriptClass) OnName(slot func(super func() string) string) { + C.QScriptClass_override_virtual_Name(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptClass_Name +func miqt_exec_callback_QScriptClass_Name(self *C.QScriptClass, 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((&QScriptClass{h: self}).callVirtualBase_Name) + 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 *QScriptClass) callVirtualBase_SupportsExtension(extension QScriptClass__Extension) bool { + + return (bool)(C.QScriptClass_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QScriptClass) OnSupportsExtension(slot func(super func(extension QScriptClass__Extension) bool, extension QScriptClass__Extension) bool) { + C.QScriptClass_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptClass_SupportsExtension +func miqt_exec_callback_QScriptClass_SupportsExtension(self *C.QScriptClass, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QScriptClass__Extension) bool, extension QScriptClass__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QScriptClass__Extension)(extension) + + virtualReturn := gofunc((&QScriptClass{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QScriptClass) callVirtualBase_Extension(extension QScriptClass__Extension, argument *qt.QVariant) *qt.QVariant { + + _ret := C.QScriptClass_virtualbase_Extension(unsafe.Pointer(this.h), (C.int)(extension), (*C.QVariant)(argument.UnsafePointer())) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QScriptClass) OnExtension(slot func(super func(extension QScriptClass__Extension, argument *qt.QVariant) *qt.QVariant, extension QScriptClass__Extension, argument *qt.QVariant) *qt.QVariant) { + C.QScriptClass_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptClass_Extension +func miqt_exec_callback_QScriptClass_Extension(self *C.QScriptClass, cb C.intptr_t, extension C.int, argument *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QScriptClass__Extension, argument *qt.QVariant) *qt.QVariant, extension QScriptClass__Extension, argument *qt.QVariant) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QScriptClass__Extension)(extension) + + slotval2 := qt.UnsafeNewQVariant(unsafe.Pointer(argument)) + + virtualReturn := gofunc((&QScriptClass{h: self}).callVirtualBase_Extension, slotval1, slotval2) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +// Delete this object from C++ memory. +func (this *QScriptClass) Delete() { + C.QScriptClass_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 *QScriptClass) GoGC() { + runtime.SetFinalizer(this, func(this *QScriptClass) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/script/gen_qscriptclass.h b/qt/script/gen_qscriptclass.h new file mode 100644 index 00000000..ca948115 --- /dev/null +++ b/qt/script/gen_qscriptclass.h @@ -0,0 +1,68 @@ +#pragma once +#ifndef MIQT_QT_SCRIPT_GEN_QSCRIPTCLASS_H +#define MIQT_QT_SCRIPT_GEN_QSCRIPTCLASS_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QScriptClass; +class QScriptClassPropertyIterator; +class QScriptEngine; +class QScriptString; +class QScriptValue; +class QVariant; +#else +typedef struct QScriptClass QScriptClass; +typedef struct QScriptClassPropertyIterator QScriptClassPropertyIterator; +typedef struct QScriptEngine QScriptEngine; +typedef struct QScriptString QScriptString; +typedef struct QScriptValue QScriptValue; +typedef struct QVariant QVariant; +#endif + +void QScriptClass_new(QScriptEngine* engine, QScriptClass** outptr_QScriptClass); +QScriptEngine* QScriptClass_Engine(const QScriptClass* self); +int QScriptClass_QueryProperty(QScriptClass* self, QScriptValue* object, QScriptString* name, int flags, unsigned int* id); +QScriptValue* QScriptClass_Property(QScriptClass* self, QScriptValue* object, QScriptString* name, unsigned int id); +void QScriptClass_SetProperty(QScriptClass* self, QScriptValue* object, QScriptString* name, unsigned int id, QScriptValue* value); +int QScriptClass_PropertyFlags(QScriptClass* self, QScriptValue* object, QScriptString* name, unsigned int id); +QScriptClassPropertyIterator* QScriptClass_NewIterator(QScriptClass* self, QScriptValue* object); +QScriptValue* QScriptClass_Prototype(const QScriptClass* self); +struct miqt_string QScriptClass_Name(const QScriptClass* self); +bool QScriptClass_SupportsExtension(const QScriptClass* self, int extension); +QVariant* QScriptClass_Extension(QScriptClass* self, int extension, QVariant* argument); +void QScriptClass_override_virtual_QueryProperty(void* self, intptr_t slot); +int QScriptClass_virtualbase_QueryProperty(void* self, QScriptValue* object, QScriptString* name, int flags, unsigned int* id); +void QScriptClass_override_virtual_Property(void* self, intptr_t slot); +QScriptValue* QScriptClass_virtualbase_Property(void* self, QScriptValue* object, QScriptString* name, unsigned int id); +void QScriptClass_override_virtual_SetProperty(void* self, intptr_t slot); +void QScriptClass_virtualbase_SetProperty(void* self, QScriptValue* object, QScriptString* name, unsigned int id, QScriptValue* value); +void QScriptClass_override_virtual_PropertyFlags(void* self, intptr_t slot); +int QScriptClass_virtualbase_PropertyFlags(void* self, QScriptValue* object, QScriptString* name, unsigned int id); +void QScriptClass_override_virtual_NewIterator(void* self, intptr_t slot); +QScriptClassPropertyIterator* QScriptClass_virtualbase_NewIterator(void* self, QScriptValue* object); +void QScriptClass_override_virtual_Prototype(void* self, intptr_t slot); +QScriptValue* QScriptClass_virtualbase_Prototype(const void* self); +void QScriptClass_override_virtual_Name(void* self, intptr_t slot); +struct miqt_string QScriptClass_virtualbase_Name(const void* self); +void QScriptClass_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QScriptClass_virtualbase_SupportsExtension(const void* self, int extension); +void QScriptClass_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QScriptClass_virtualbase_Extension(void* self, int extension, QVariant* argument); +void QScriptClass_Delete(QScriptClass* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/script/gen_qscriptclasspropertyiterator.cpp b/qt/script/gen_qscriptclasspropertyiterator.cpp new file mode 100644 index 00000000..00692205 --- /dev/null +++ b/qt/script/gen_qscriptclasspropertyiterator.cpp @@ -0,0 +1,57 @@ +#include +#include +#include +#include +#include "gen_qscriptclasspropertyiterator.h" +#include "_cgo_export.h" + +QScriptValue* QScriptClassPropertyIterator_Object(const QScriptClassPropertyIterator* self) { + return new QScriptValue(self->object()); +} + +bool QScriptClassPropertyIterator_HasNext(const QScriptClassPropertyIterator* self) { + return self->hasNext(); +} + +void QScriptClassPropertyIterator_Next(QScriptClassPropertyIterator* self) { + self->next(); +} + +bool QScriptClassPropertyIterator_HasPrevious(const QScriptClassPropertyIterator* self) { + return self->hasPrevious(); +} + +void QScriptClassPropertyIterator_Previous(QScriptClassPropertyIterator* self) { + self->previous(); +} + +void QScriptClassPropertyIterator_ToFront(QScriptClassPropertyIterator* self) { + self->toFront(); +} + +void QScriptClassPropertyIterator_ToBack(QScriptClassPropertyIterator* self) { + self->toBack(); +} + +QScriptString* QScriptClassPropertyIterator_Name(const QScriptClassPropertyIterator* self) { + return new QScriptString(self->name()); +} + +unsigned int QScriptClassPropertyIterator_Id(const QScriptClassPropertyIterator* self) { + uint _ret = self->id(); + return static_cast(_ret); +} + +int QScriptClassPropertyIterator_Flags(const QScriptClassPropertyIterator* self) { + QScriptValue::PropertyFlags _ret = self->flags(); + return static_cast(_ret); +} + +void QScriptClassPropertyIterator_Delete(QScriptClassPropertyIterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/script/gen_qscriptclasspropertyiterator.go b/qt/script/gen_qscriptclasspropertyiterator.go new file mode 100644 index 00000000..7c4caa8a --- /dev/null +++ b/qt/script/gen_qscriptclasspropertyiterator.go @@ -0,0 +1,110 @@ +package script + +/* + +#include "gen_qscriptclasspropertyiterator.h" +#include + +*/ +import "C" + +import ( + "runtime" + "unsafe" +) + +type QScriptClassPropertyIterator struct { + h *C.QScriptClassPropertyIterator + isSubclass bool +} + +func (this *QScriptClassPropertyIterator) cPointer() *C.QScriptClassPropertyIterator { + if this == nil { + return nil + } + return this.h +} + +func (this *QScriptClassPropertyIterator) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQScriptClassPropertyIterator constructs the type using only CGO pointers. +func newQScriptClassPropertyIterator(h *C.QScriptClassPropertyIterator) *QScriptClassPropertyIterator { + if h == nil { + return nil + } + return &QScriptClassPropertyIterator{h: h} +} + +// UnsafeNewQScriptClassPropertyIterator constructs the type using only unsafe pointers. +func UnsafeNewQScriptClassPropertyIterator(h unsafe.Pointer) *QScriptClassPropertyIterator { + if h == nil { + return nil + } + + return &QScriptClassPropertyIterator{h: (*C.QScriptClassPropertyIterator)(h)} +} + +func (this *QScriptClassPropertyIterator) Object() *QScriptValue { + _ret := C.QScriptClassPropertyIterator_Object(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptClassPropertyIterator) HasNext() bool { + return (bool)(C.QScriptClassPropertyIterator_HasNext(this.h)) +} + +func (this *QScriptClassPropertyIterator) Next() { + C.QScriptClassPropertyIterator_Next(this.h) +} + +func (this *QScriptClassPropertyIterator) HasPrevious() bool { + return (bool)(C.QScriptClassPropertyIterator_HasPrevious(this.h)) +} + +func (this *QScriptClassPropertyIterator) Previous() { + C.QScriptClassPropertyIterator_Previous(this.h) +} + +func (this *QScriptClassPropertyIterator) ToFront() { + C.QScriptClassPropertyIterator_ToFront(this.h) +} + +func (this *QScriptClassPropertyIterator) ToBack() { + C.QScriptClassPropertyIterator_ToBack(this.h) +} + +func (this *QScriptClassPropertyIterator) Name() *QScriptString { + _ret := C.QScriptClassPropertyIterator_Name(this.h) + _goptr := newQScriptString(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptClassPropertyIterator) Id() uint { + return (uint)(C.QScriptClassPropertyIterator_Id(this.h)) +} + +func (this *QScriptClassPropertyIterator) Flags() QScriptValue__PropertyFlag { + return (QScriptValue__PropertyFlag)(C.QScriptClassPropertyIterator_Flags(this.h)) +} + +// Delete this object from C++ memory. +func (this *QScriptClassPropertyIterator) Delete() { + C.QScriptClassPropertyIterator_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 *QScriptClassPropertyIterator) GoGC() { + runtime.SetFinalizer(this, func(this *QScriptClassPropertyIterator) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/script/gen_qscriptclasspropertyiterator.h b/qt/script/gen_qscriptclasspropertyiterator.h new file mode 100644 index 00000000..2db49d6c --- /dev/null +++ b/qt/script/gen_qscriptclasspropertyiterator.h @@ -0,0 +1,43 @@ +#pragma once +#ifndef MIQT_QT_SCRIPT_GEN_QSCRIPTCLASSPROPERTYITERATOR_H +#define MIQT_QT_SCRIPT_GEN_QSCRIPTCLASSPROPERTYITERATOR_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QScriptClassPropertyIterator; +class QScriptString; +class QScriptValue; +#else +typedef struct QScriptClassPropertyIterator QScriptClassPropertyIterator; +typedef struct QScriptString QScriptString; +typedef struct QScriptValue QScriptValue; +#endif + +QScriptValue* QScriptClassPropertyIterator_Object(const QScriptClassPropertyIterator* self); +bool QScriptClassPropertyIterator_HasNext(const QScriptClassPropertyIterator* self); +void QScriptClassPropertyIterator_Next(QScriptClassPropertyIterator* self); +bool QScriptClassPropertyIterator_HasPrevious(const QScriptClassPropertyIterator* self); +void QScriptClassPropertyIterator_Previous(QScriptClassPropertyIterator* self); +void QScriptClassPropertyIterator_ToFront(QScriptClassPropertyIterator* self); +void QScriptClassPropertyIterator_ToBack(QScriptClassPropertyIterator* self); +QScriptString* QScriptClassPropertyIterator_Name(const QScriptClassPropertyIterator* self); +unsigned int QScriptClassPropertyIterator_Id(const QScriptClassPropertyIterator* self); +int QScriptClassPropertyIterator_Flags(const QScriptClassPropertyIterator* self); +void QScriptClassPropertyIterator_Delete(QScriptClassPropertyIterator* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/script/gen_qscriptcontext.cpp b/qt/script/gen_qscriptcontext.cpp new file mode 100644 index 00000000..f0f23e8f --- /dev/null +++ b/qt/script/gen_qscriptcontext.cpp @@ -0,0 +1,142 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qscriptcontext.h" +#include "_cgo_export.h" + +QScriptContext* QScriptContext_ParentContext(const QScriptContext* self) { + return self->parentContext(); +} + +QScriptEngine* QScriptContext_Engine(const QScriptContext* self) { + return self->engine(); +} + +int QScriptContext_State(const QScriptContext* self) { + QScriptContext::ExecutionState _ret = self->state(); + return static_cast(_ret); +} + +QScriptValue* QScriptContext_Callee(const QScriptContext* self) { + return new QScriptValue(self->callee()); +} + +int QScriptContext_ArgumentCount(const QScriptContext* self) { + return self->argumentCount(); +} + +QScriptValue* QScriptContext_Argument(const QScriptContext* self, int index) { + return new QScriptValue(self->argument(static_cast(index))); +} + +QScriptValue* QScriptContext_ArgumentsObject(const QScriptContext* self) { + return new QScriptValue(self->argumentsObject()); +} + +struct miqt_array /* of QScriptValue* */ QScriptContext_ScopeChain(const QScriptContext* self) { + QScriptValueList _ret = self->scopeChain(); + // Convert QList<> from C++ memory to manually-managed C memory + QScriptValue** _arr = static_cast(malloc(sizeof(QScriptValue*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QScriptValue(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QScriptContext_PushScope(QScriptContext* self, QScriptValue* object) { + self->pushScope(*object); +} + +QScriptValue* QScriptContext_PopScope(QScriptContext* self) { + return new QScriptValue(self->popScope()); +} + +QScriptValue* QScriptContext_ReturnValue(const QScriptContext* self) { + return new QScriptValue(self->returnValue()); +} + +void QScriptContext_SetReturnValue(QScriptContext* self, QScriptValue* result) { + self->setReturnValue(*result); +} + +QScriptValue* QScriptContext_ActivationObject(const QScriptContext* self) { + return new QScriptValue(self->activationObject()); +} + +void QScriptContext_SetActivationObject(QScriptContext* self, QScriptValue* activation) { + self->setActivationObject(*activation); +} + +QScriptValue* QScriptContext_ThisObject(const QScriptContext* self) { + return new QScriptValue(self->thisObject()); +} + +void QScriptContext_SetThisObject(QScriptContext* self, QScriptValue* thisObject) { + self->setThisObject(*thisObject); +} + +bool QScriptContext_IsCalledAsConstructor(const QScriptContext* self) { + return self->isCalledAsConstructor(); +} + +QScriptValue* QScriptContext_ThrowValue(QScriptContext* self, QScriptValue* value) { + return new QScriptValue(self->throwValue(*value)); +} + +QScriptValue* QScriptContext_ThrowError(QScriptContext* self, int error, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + return new QScriptValue(self->throwError(static_cast(error), text_QString)); +} + +QScriptValue* QScriptContext_ThrowErrorWithText(QScriptContext* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + return new QScriptValue(self->throwError(text_QString)); +} + +struct miqt_array /* of struct miqt_string */ QScriptContext_Backtrace(const QScriptContext* self) { + QStringList _ret = self->backtrace(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +struct miqt_string QScriptContext_ToString(const QScriptContext* self) { + QString _ret = self->toString(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QScriptContext_Delete(QScriptContext* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/script/gen_qscriptcontext.go b/qt/script/gen_qscriptcontext.go new file mode 100644 index 00000000..e3176cc6 --- /dev/null +++ b/qt/script/gen_qscriptcontext.go @@ -0,0 +1,229 @@ +package script + +/* + +#include "gen_qscriptcontext.h" +#include + +*/ +import "C" + +import ( + "runtime" + "unsafe" +) + +type QScriptContext__ExecutionState int + +const ( + QScriptContext__NormalState QScriptContext__ExecutionState = 0 + QScriptContext__ExceptionState QScriptContext__ExecutionState = 1 +) + +type QScriptContext__Error int + +const ( + QScriptContext__UnknownError QScriptContext__Error = 0 + QScriptContext__ReferenceError QScriptContext__Error = 1 + QScriptContext__SyntaxError QScriptContext__Error = 2 + QScriptContext__TypeError QScriptContext__Error = 3 + QScriptContext__RangeError QScriptContext__Error = 4 + QScriptContext__URIError QScriptContext__Error = 5 +) + +type QScriptContext struct { + h *C.QScriptContext + isSubclass bool +} + +func (this *QScriptContext) cPointer() *C.QScriptContext { + if this == nil { + return nil + } + return this.h +} + +func (this *QScriptContext) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQScriptContext constructs the type using only CGO pointers. +func newQScriptContext(h *C.QScriptContext) *QScriptContext { + if h == nil { + return nil + } + return &QScriptContext{h: h} +} + +// UnsafeNewQScriptContext constructs the type using only unsafe pointers. +func UnsafeNewQScriptContext(h unsafe.Pointer) *QScriptContext { + if h == nil { + return nil + } + + return &QScriptContext{h: (*C.QScriptContext)(h)} +} + +func (this *QScriptContext) ParentContext() *QScriptContext { + return UnsafeNewQScriptContext(unsafe.Pointer(C.QScriptContext_ParentContext(this.h))) +} + +func (this *QScriptContext) Engine() *QScriptEngine { + return UnsafeNewQScriptEngine(unsafe.Pointer(C.QScriptContext_Engine(this.h)), nil) +} + +func (this *QScriptContext) State() QScriptContext__ExecutionState { + return (QScriptContext__ExecutionState)(C.QScriptContext_State(this.h)) +} + +func (this *QScriptContext) Callee() *QScriptValue { + _ret := C.QScriptContext_Callee(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptContext) ArgumentCount() int { + return (int)(C.QScriptContext_ArgumentCount(this.h)) +} + +func (this *QScriptContext) Argument(index int) *QScriptValue { + _ret := C.QScriptContext_Argument(this.h, (C.int)(index)) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptContext) ArgumentsObject() *QScriptValue { + _ret := C.QScriptContext_ArgumentsObject(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptContext) ScopeChain() []QScriptValue { + var _ma C.struct_miqt_array = C.QScriptContext_ScopeChain(this.h) + _ret := make([]QScriptValue, int(_ma.len)) + _outCast := (*[0xffff]*C.QScriptValue)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQScriptValue(_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 *QScriptContext) PushScope(object *QScriptValue) { + C.QScriptContext_PushScope(this.h, object.cPointer()) +} + +func (this *QScriptContext) PopScope() *QScriptValue { + _ret := C.QScriptContext_PopScope(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptContext) ReturnValue() *QScriptValue { + _ret := C.QScriptContext_ReturnValue(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptContext) SetReturnValue(result *QScriptValue) { + C.QScriptContext_SetReturnValue(this.h, result.cPointer()) +} + +func (this *QScriptContext) ActivationObject() *QScriptValue { + _ret := C.QScriptContext_ActivationObject(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptContext) SetActivationObject(activation *QScriptValue) { + C.QScriptContext_SetActivationObject(this.h, activation.cPointer()) +} + +func (this *QScriptContext) ThisObject() *QScriptValue { + _ret := C.QScriptContext_ThisObject(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptContext) SetThisObject(thisObject *QScriptValue) { + C.QScriptContext_SetThisObject(this.h, thisObject.cPointer()) +} + +func (this *QScriptContext) IsCalledAsConstructor() bool { + return (bool)(C.QScriptContext_IsCalledAsConstructor(this.h)) +} + +func (this *QScriptContext) ThrowValue(value *QScriptValue) *QScriptValue { + _ret := C.QScriptContext_ThrowValue(this.h, value.cPointer()) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptContext) ThrowError(error QScriptContext__Error, text string) *QScriptValue { + 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.QScriptContext_ThrowError(this.h, (C.int)(error), text_ms) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptContext) ThrowErrorWithText(text string) *QScriptValue { + 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.QScriptContext_ThrowErrorWithText(this.h, text_ms) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptContext) Backtrace() []string { + var _ma C.struct_miqt_array = C.QScriptContext_Backtrace(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 *QScriptContext) ToString() string { + var _ms C.struct_miqt_string = C.QScriptContext_ToString(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QScriptContext) Delete() { + C.QScriptContext_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 *QScriptContext) GoGC() { + runtime.SetFinalizer(this, func(this *QScriptContext) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/script/gen_qscriptcontext.h b/qt/script/gen_qscriptcontext.h new file mode 100644 index 00000000..85faa157 --- /dev/null +++ b/qt/script/gen_qscriptcontext.h @@ -0,0 +1,55 @@ +#pragma once +#ifndef MIQT_QT_SCRIPT_GEN_QSCRIPTCONTEXT_H +#define MIQT_QT_SCRIPT_GEN_QSCRIPTCONTEXT_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QScriptContext; +class QScriptEngine; +class QScriptValue; +#else +typedef struct QScriptContext QScriptContext; +typedef struct QScriptEngine QScriptEngine; +typedef struct QScriptValue QScriptValue; +#endif + +QScriptContext* QScriptContext_ParentContext(const QScriptContext* self); +QScriptEngine* QScriptContext_Engine(const QScriptContext* self); +int QScriptContext_State(const QScriptContext* self); +QScriptValue* QScriptContext_Callee(const QScriptContext* self); +int QScriptContext_ArgumentCount(const QScriptContext* self); +QScriptValue* QScriptContext_Argument(const QScriptContext* self, int index); +QScriptValue* QScriptContext_ArgumentsObject(const QScriptContext* self); +struct miqt_array /* of QScriptValue* */ QScriptContext_ScopeChain(const QScriptContext* self); +void QScriptContext_PushScope(QScriptContext* self, QScriptValue* object); +QScriptValue* QScriptContext_PopScope(QScriptContext* self); +QScriptValue* QScriptContext_ReturnValue(const QScriptContext* self); +void QScriptContext_SetReturnValue(QScriptContext* self, QScriptValue* result); +QScriptValue* QScriptContext_ActivationObject(const QScriptContext* self); +void QScriptContext_SetActivationObject(QScriptContext* self, QScriptValue* activation); +QScriptValue* QScriptContext_ThisObject(const QScriptContext* self); +void QScriptContext_SetThisObject(QScriptContext* self, QScriptValue* thisObject); +bool QScriptContext_IsCalledAsConstructor(const QScriptContext* self); +QScriptValue* QScriptContext_ThrowValue(QScriptContext* self, QScriptValue* value); +QScriptValue* QScriptContext_ThrowError(QScriptContext* self, int error, struct miqt_string text); +QScriptValue* QScriptContext_ThrowErrorWithText(QScriptContext* self, struct miqt_string text); +struct miqt_array /* of struct miqt_string */ QScriptContext_Backtrace(const QScriptContext* self); +struct miqt_string QScriptContext_ToString(const QScriptContext* self); +void QScriptContext_Delete(QScriptContext* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/script/gen_qscriptcontextinfo.cpp b/qt/script/gen_qscriptcontextinfo.cpp new file mode 100644 index 00000000..d53095e7 --- /dev/null +++ b/qt/script/gen_qscriptcontextinfo.cpp @@ -0,0 +1,121 @@ +#include +#include +#include +#include +#include +#include +#include +#include "gen_qscriptcontextinfo.h" +#include "_cgo_export.h" + +void QScriptContextInfo_new(QScriptContext* context, QScriptContextInfo** outptr_QScriptContextInfo) { + QScriptContextInfo* ret = new QScriptContextInfo(context); + *outptr_QScriptContextInfo = ret; +} + +void QScriptContextInfo_new2(QScriptContextInfo* other, QScriptContextInfo** outptr_QScriptContextInfo) { + QScriptContextInfo* ret = new QScriptContextInfo(*other); + *outptr_QScriptContextInfo = ret; +} + +void QScriptContextInfo_new3(QScriptContextInfo** outptr_QScriptContextInfo) { + QScriptContextInfo* ret = new QScriptContextInfo(); + *outptr_QScriptContextInfo = ret; +} + +void QScriptContextInfo_OperatorAssign(QScriptContextInfo* self, QScriptContextInfo* other) { + self->operator=(*other); +} + +bool QScriptContextInfo_IsNull(const QScriptContextInfo* self) { + return self->isNull(); +} + +long long QScriptContextInfo_ScriptId(const QScriptContextInfo* self) { + qint64 _ret = self->scriptId(); + return static_cast(_ret); +} + +struct miqt_string QScriptContextInfo_FileName(const QScriptContextInfo* self) { + QString _ret = self->fileName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QScriptContextInfo_LineNumber(const QScriptContextInfo* self) { + return self->lineNumber(); +} + +int QScriptContextInfo_ColumnNumber(const QScriptContextInfo* self) { + return self->columnNumber(); +} + +struct miqt_string QScriptContextInfo_FunctionName(const QScriptContextInfo* self) { + QString _ret = self->functionName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QScriptContextInfo_FunctionType(const QScriptContextInfo* self) { + QScriptContextInfo::FunctionType _ret = self->functionType(); + return static_cast(_ret); +} + +struct miqt_array /* of struct miqt_string */ QScriptContextInfo_FunctionParameterNames(const QScriptContextInfo* self) { + QStringList _ret = self->functionParameterNames(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +int QScriptContextInfo_FunctionStartLineNumber(const QScriptContextInfo* self) { + return self->functionStartLineNumber(); +} + +int QScriptContextInfo_FunctionEndLineNumber(const QScriptContextInfo* self) { + return self->functionEndLineNumber(); +} + +int QScriptContextInfo_FunctionMetaIndex(const QScriptContextInfo* self) { + return self->functionMetaIndex(); +} + +bool QScriptContextInfo_OperatorEqual(const QScriptContextInfo* self, QScriptContextInfo* other) { + return (*self == *other); +} + +bool QScriptContextInfo_OperatorNotEqual(const QScriptContextInfo* self, QScriptContextInfo* other) { + return (*self != *other); +} + +void QScriptContextInfo_Delete(QScriptContextInfo* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/script/gen_qscriptcontextinfo.go b/qt/script/gen_qscriptcontextinfo.go new file mode 100644 index 00000000..28884475 --- /dev/null +++ b/qt/script/gen_qscriptcontextinfo.go @@ -0,0 +1,174 @@ +package script + +/* + +#include "gen_qscriptcontextinfo.h" +#include + +*/ +import "C" + +import ( + "runtime" + "unsafe" +) + +type QScriptContextInfo__FunctionType int + +const ( + QScriptContextInfo__ScriptFunction QScriptContextInfo__FunctionType = 0 + QScriptContextInfo__QtFunction QScriptContextInfo__FunctionType = 1 + QScriptContextInfo__QtPropertyFunction QScriptContextInfo__FunctionType = 2 + QScriptContextInfo__NativeFunction QScriptContextInfo__FunctionType = 3 +) + +type QScriptContextInfo struct { + h *C.QScriptContextInfo + isSubclass bool +} + +func (this *QScriptContextInfo) cPointer() *C.QScriptContextInfo { + if this == nil { + return nil + } + return this.h +} + +func (this *QScriptContextInfo) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQScriptContextInfo constructs the type using only CGO pointers. +func newQScriptContextInfo(h *C.QScriptContextInfo) *QScriptContextInfo { + if h == nil { + return nil + } + return &QScriptContextInfo{h: h} +} + +// UnsafeNewQScriptContextInfo constructs the type using only unsafe pointers. +func UnsafeNewQScriptContextInfo(h unsafe.Pointer) *QScriptContextInfo { + if h == nil { + return nil + } + + return &QScriptContextInfo{h: (*C.QScriptContextInfo)(h)} +} + +// NewQScriptContextInfo constructs a new QScriptContextInfo object. +func NewQScriptContextInfo(context *QScriptContext) *QScriptContextInfo { + var outptr_QScriptContextInfo *C.QScriptContextInfo = nil + + C.QScriptContextInfo_new(context.cPointer(), &outptr_QScriptContextInfo) + ret := newQScriptContextInfo(outptr_QScriptContextInfo) + ret.isSubclass = true + return ret +} + +// NewQScriptContextInfo2 constructs a new QScriptContextInfo object. +func NewQScriptContextInfo2(other *QScriptContextInfo) *QScriptContextInfo { + var outptr_QScriptContextInfo *C.QScriptContextInfo = nil + + C.QScriptContextInfo_new2(other.cPointer(), &outptr_QScriptContextInfo) + ret := newQScriptContextInfo(outptr_QScriptContextInfo) + ret.isSubclass = true + return ret +} + +// NewQScriptContextInfo3 constructs a new QScriptContextInfo object. +func NewQScriptContextInfo3() *QScriptContextInfo { + var outptr_QScriptContextInfo *C.QScriptContextInfo = nil + + C.QScriptContextInfo_new3(&outptr_QScriptContextInfo) + ret := newQScriptContextInfo(outptr_QScriptContextInfo) + ret.isSubclass = true + return ret +} + +func (this *QScriptContextInfo) OperatorAssign(other *QScriptContextInfo) { + C.QScriptContextInfo_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QScriptContextInfo) IsNull() bool { + return (bool)(C.QScriptContextInfo_IsNull(this.h)) +} + +func (this *QScriptContextInfo) ScriptId() int64 { + return (int64)(C.QScriptContextInfo_ScriptId(this.h)) +} + +func (this *QScriptContextInfo) FileName() string { + var _ms C.struct_miqt_string = C.QScriptContextInfo_FileName(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QScriptContextInfo) LineNumber() int { + return (int)(C.QScriptContextInfo_LineNumber(this.h)) +} + +func (this *QScriptContextInfo) ColumnNumber() int { + return (int)(C.QScriptContextInfo_ColumnNumber(this.h)) +} + +func (this *QScriptContextInfo) FunctionName() string { + var _ms C.struct_miqt_string = C.QScriptContextInfo_FunctionName(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QScriptContextInfo) FunctionType() QScriptContextInfo__FunctionType { + return (QScriptContextInfo__FunctionType)(C.QScriptContextInfo_FunctionType(this.h)) +} + +func (this *QScriptContextInfo) FunctionParameterNames() []string { + var _ma C.struct_miqt_array = C.QScriptContextInfo_FunctionParameterNames(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 *QScriptContextInfo) FunctionStartLineNumber() int { + return (int)(C.QScriptContextInfo_FunctionStartLineNumber(this.h)) +} + +func (this *QScriptContextInfo) FunctionEndLineNumber() int { + return (int)(C.QScriptContextInfo_FunctionEndLineNumber(this.h)) +} + +func (this *QScriptContextInfo) FunctionMetaIndex() int { + return (int)(C.QScriptContextInfo_FunctionMetaIndex(this.h)) +} + +func (this *QScriptContextInfo) OperatorEqual(other *QScriptContextInfo) bool { + return (bool)(C.QScriptContextInfo_OperatorEqual(this.h, other.cPointer())) +} + +func (this *QScriptContextInfo) OperatorNotEqual(other *QScriptContextInfo) bool { + return (bool)(C.QScriptContextInfo_OperatorNotEqual(this.h, other.cPointer())) +} + +// Delete this object from C++ memory. +func (this *QScriptContextInfo) Delete() { + C.QScriptContextInfo_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 *QScriptContextInfo) GoGC() { + runtime.SetFinalizer(this, func(this *QScriptContextInfo) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/script/gen_qscriptcontextinfo.h b/qt/script/gen_qscriptcontextinfo.h new file mode 100644 index 00000000..6ff7d89e --- /dev/null +++ b/qt/script/gen_qscriptcontextinfo.h @@ -0,0 +1,48 @@ +#pragma once +#ifndef MIQT_QT_SCRIPT_GEN_QSCRIPTCONTEXTINFO_H +#define MIQT_QT_SCRIPT_GEN_QSCRIPTCONTEXTINFO_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QScriptContext; +class QScriptContextInfo; +#else +typedef struct QScriptContext QScriptContext; +typedef struct QScriptContextInfo QScriptContextInfo; +#endif + +void QScriptContextInfo_new(QScriptContext* context, QScriptContextInfo** outptr_QScriptContextInfo); +void QScriptContextInfo_new2(QScriptContextInfo* other, QScriptContextInfo** outptr_QScriptContextInfo); +void QScriptContextInfo_new3(QScriptContextInfo** outptr_QScriptContextInfo); +void QScriptContextInfo_OperatorAssign(QScriptContextInfo* self, QScriptContextInfo* other); +bool QScriptContextInfo_IsNull(const QScriptContextInfo* self); +long long QScriptContextInfo_ScriptId(const QScriptContextInfo* self); +struct miqt_string QScriptContextInfo_FileName(const QScriptContextInfo* self); +int QScriptContextInfo_LineNumber(const QScriptContextInfo* self); +int QScriptContextInfo_ColumnNumber(const QScriptContextInfo* self); +struct miqt_string QScriptContextInfo_FunctionName(const QScriptContextInfo* self); +int QScriptContextInfo_FunctionType(const QScriptContextInfo* self); +struct miqt_array /* of struct miqt_string */ QScriptContextInfo_FunctionParameterNames(const QScriptContextInfo* self); +int QScriptContextInfo_FunctionStartLineNumber(const QScriptContextInfo* self); +int QScriptContextInfo_FunctionEndLineNumber(const QScriptContextInfo* self); +int QScriptContextInfo_FunctionMetaIndex(const QScriptContextInfo* self); +bool QScriptContextInfo_OperatorEqual(const QScriptContextInfo* self, QScriptContextInfo* other); +bool QScriptContextInfo_OperatorNotEqual(const QScriptContextInfo* self, QScriptContextInfo* other); +void QScriptContextInfo_Delete(QScriptContextInfo* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/script/gen_qscriptengine.cpp b/qt/script/gen_qscriptengine.cpp new file mode 100644 index 00000000..1b7cf4c4 --- /dev/null +++ b/qt/script/gen_qscriptengine.cpp @@ -0,0 +1,697 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qscriptengine.h" +#include "_cgo_export.h" + +void QScriptSyntaxCheckResult_new(QScriptSyntaxCheckResult* other, QScriptSyntaxCheckResult** outptr_QScriptSyntaxCheckResult) { + QScriptSyntaxCheckResult* ret = new QScriptSyntaxCheckResult(*other); + *outptr_QScriptSyntaxCheckResult = ret; +} + +int QScriptSyntaxCheckResult_State(const QScriptSyntaxCheckResult* self) { + QScriptSyntaxCheckResult::State _ret = self->state(); + return static_cast(_ret); +} + +int QScriptSyntaxCheckResult_ErrorLineNumber(const QScriptSyntaxCheckResult* self) { + return self->errorLineNumber(); +} + +int QScriptSyntaxCheckResult_ErrorColumnNumber(const QScriptSyntaxCheckResult* self) { + return self->errorColumnNumber(); +} + +struct miqt_string QScriptSyntaxCheckResult_ErrorMessage(const QScriptSyntaxCheckResult* self) { + QString _ret = self->errorMessage(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QScriptSyntaxCheckResult_OperatorAssign(QScriptSyntaxCheckResult* self, QScriptSyntaxCheckResult* other) { + self->operator=(*other); +} + +void QScriptSyntaxCheckResult_Delete(QScriptSyntaxCheckResult* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +class MiqtVirtualQScriptEngine : public virtual QScriptEngine { +public: + + MiqtVirtualQScriptEngine(): QScriptEngine() {}; + MiqtVirtualQScriptEngine(QObject* parent): QScriptEngine(parent) {}; + + virtual ~MiqtVirtualQScriptEngine() = 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 QScriptEngine::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QScriptEngine_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QScriptEngine::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 QScriptEngine::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QScriptEngine_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QScriptEngine::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) { + QScriptEngine::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QScriptEngine_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QScriptEngine::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) { + QScriptEngine::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QScriptEngine_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QScriptEngine::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) { + QScriptEngine::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QScriptEngine_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QScriptEngine::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) { + QScriptEngine::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QScriptEngine_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QScriptEngine::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) { + QScriptEngine::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QScriptEngine_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QScriptEngine::disconnectNotify(*signal); + + } + +}; + +void QScriptEngine_new(QScriptEngine** outptr_QScriptEngine, QObject** outptr_QObject) { + MiqtVirtualQScriptEngine* ret = new MiqtVirtualQScriptEngine(); + *outptr_QScriptEngine = ret; + *outptr_QObject = static_cast(ret); +} + +void QScriptEngine_new2(QObject* parent, QScriptEngine** outptr_QScriptEngine, QObject** outptr_QObject) { + MiqtVirtualQScriptEngine* ret = new MiqtVirtualQScriptEngine(parent); + *outptr_QScriptEngine = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QScriptEngine_MetaObject(const QScriptEngine* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QScriptEngine_Metacast(QScriptEngine* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QScriptEngine_Tr(const char* s) { + QString _ret = QScriptEngine::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QScriptEngine_TrUtf8(const char* s) { + QString _ret = QScriptEngine::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QScriptValue* QScriptEngine_GlobalObject(const QScriptEngine* self) { + return new QScriptValue(self->globalObject()); +} + +void QScriptEngine_SetGlobalObject(QScriptEngine* self, QScriptValue* object) { + self->setGlobalObject(*object); +} + +QScriptContext* QScriptEngine_CurrentContext(const QScriptEngine* self) { + return self->currentContext(); +} + +QScriptContext* QScriptEngine_PushContext(QScriptEngine* self) { + return self->pushContext(); +} + +void QScriptEngine_PopContext(QScriptEngine* self) { + self->popContext(); +} + +bool QScriptEngine_CanEvaluate(const QScriptEngine* self, struct miqt_string program) { + QString program_QString = QString::fromUtf8(program.data, program.len); + return self->canEvaluate(program_QString); +} + +QScriptSyntaxCheckResult* QScriptEngine_CheckSyntax(struct miqt_string program) { + QString program_QString = QString::fromUtf8(program.data, program.len); + return new QScriptSyntaxCheckResult(QScriptEngine::checkSyntax(program_QString)); +} + +QScriptValue* QScriptEngine_Evaluate(QScriptEngine* self, struct miqt_string program) { + QString program_QString = QString::fromUtf8(program.data, program.len); + return new QScriptValue(self->evaluate(program_QString)); +} + +QScriptValue* QScriptEngine_EvaluateWithProgram(QScriptEngine* self, QScriptProgram* program) { + return new QScriptValue(self->evaluate(*program)); +} + +bool QScriptEngine_IsEvaluating(const QScriptEngine* self) { + return self->isEvaluating(); +} + +void QScriptEngine_AbortEvaluation(QScriptEngine* self) { + self->abortEvaluation(); +} + +bool QScriptEngine_HasUncaughtException(const QScriptEngine* self) { + return self->hasUncaughtException(); +} + +QScriptValue* QScriptEngine_UncaughtException(const QScriptEngine* self) { + return new QScriptValue(self->uncaughtException()); +} + +int QScriptEngine_UncaughtExceptionLineNumber(const QScriptEngine* self) { + return self->uncaughtExceptionLineNumber(); +} + +struct miqt_array /* of struct miqt_string */ QScriptEngine_UncaughtExceptionBacktrace(const QScriptEngine* self) { + QStringList _ret = self->uncaughtExceptionBacktrace(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QScriptEngine_ClearExceptions(QScriptEngine* self) { + self->clearExceptions(); +} + +QScriptValue* QScriptEngine_NullValue(QScriptEngine* self) { + return new QScriptValue(self->nullValue()); +} + +QScriptValue* QScriptEngine_UndefinedValue(QScriptEngine* self) { + return new QScriptValue(self->undefinedValue()); +} + +QScriptValue* QScriptEngine_NewVariant(QScriptEngine* self, QVariant* value) { + return new QScriptValue(self->newVariant(*value)); +} + +QScriptValue* QScriptEngine_NewVariant2(QScriptEngine* self, QScriptValue* object, QVariant* value) { + return new QScriptValue(self->newVariant(*object, *value)); +} + +QScriptValue* QScriptEngine_NewRegExp(QScriptEngine* self, QRegExp* regexp) { + return new QScriptValue(self->newRegExp(*regexp)); +} + +QScriptValue* QScriptEngine_NewObject(QScriptEngine* self) { + return new QScriptValue(self->newObject()); +} + +QScriptValue* QScriptEngine_NewObjectWithScriptClass(QScriptEngine* self, QScriptClass* scriptClass) { + return new QScriptValue(self->newObject(scriptClass)); +} + +QScriptValue* QScriptEngine_NewArray(QScriptEngine* self) { + return new QScriptValue(self->newArray()); +} + +QScriptValue* QScriptEngine_NewRegExp2(QScriptEngine* self, struct miqt_string pattern, struct miqt_string flags) { + QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); + QString flags_QString = QString::fromUtf8(flags.data, flags.len); + return new QScriptValue(self->newRegExp(pattern_QString, flags_QString)); +} + +QScriptValue* QScriptEngine_NewDate(QScriptEngine* self, double value) { + return new QScriptValue(self->newDate(static_cast(value))); +} + +QScriptValue* QScriptEngine_NewDateWithValue(QScriptEngine* self, QDateTime* value) { + return new QScriptValue(self->newDate(*value)); +} + +QScriptValue* QScriptEngine_NewActivationObject(QScriptEngine* self) { + return new QScriptValue(self->newActivationObject()); +} + +QScriptValue* QScriptEngine_NewQObject(QScriptEngine* self, QObject* object) { + return new QScriptValue(self->newQObject(object)); +} + +QScriptValue* QScriptEngine_NewQObject2(QScriptEngine* self, QScriptValue* scriptObject, QObject* qtObject) { + return new QScriptValue(self->newQObject(*scriptObject, qtObject)); +} + +QScriptValue* QScriptEngine_NewQMetaObject(QScriptEngine* self, QMetaObject* metaObject) { + return new QScriptValue(self->newQMetaObject(metaObject)); +} + +QScriptValue* QScriptEngine_DefaultPrototype(const QScriptEngine* self, int metaTypeId) { + return new QScriptValue(self->defaultPrototype(static_cast(metaTypeId))); +} + +void QScriptEngine_SetDefaultPrototype(QScriptEngine* self, int metaTypeId, QScriptValue* prototype) { + self->setDefaultPrototype(static_cast(metaTypeId), *prototype); +} + +void QScriptEngine_InstallTranslatorFunctions(QScriptEngine* self) { + self->installTranslatorFunctions(); +} + +QScriptValue* QScriptEngine_ImportExtension(QScriptEngine* self, struct miqt_string extension) { + QString extension_QString = QString::fromUtf8(extension.data, extension.len); + return new QScriptValue(self->importExtension(extension_QString)); +} + +struct miqt_array /* of struct miqt_string */ QScriptEngine_AvailableExtensions(const QScriptEngine* self) { + QStringList _ret = self->availableExtensions(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +struct miqt_array /* of struct miqt_string */ QScriptEngine_ImportedExtensions(const QScriptEngine* self) { + QStringList _ret = self->importedExtensions(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QScriptEngine_CollectGarbage(QScriptEngine* self) { + self->collectGarbage(); +} + +void QScriptEngine_ReportAdditionalMemoryCost(QScriptEngine* self, int size) { + self->reportAdditionalMemoryCost(static_cast(size)); +} + +void QScriptEngine_SetProcessEventsInterval(QScriptEngine* self, int interval) { + self->setProcessEventsInterval(static_cast(interval)); +} + +int QScriptEngine_ProcessEventsInterval(const QScriptEngine* self) { + return self->processEventsInterval(); +} + +void QScriptEngine_SetAgent(QScriptEngine* self, QScriptEngineAgent* agent) { + self->setAgent(agent); +} + +QScriptEngineAgent* QScriptEngine_Agent(const QScriptEngine* self) { + return self->agent(); +} + +QScriptString* QScriptEngine_ToStringHandle(QScriptEngine* self, struct miqt_string str) { + QString str_QString = QString::fromUtf8(str.data, str.len); + return new QScriptString(self->toStringHandle(str_QString)); +} + +QScriptValue* QScriptEngine_ToObject(QScriptEngine* self, QScriptValue* value) { + return new QScriptValue(self->toObject(*value)); +} + +QScriptValue* QScriptEngine_ObjectById(const QScriptEngine* self, long long id) { + return new QScriptValue(self->objectById(static_cast(id))); +} + +void QScriptEngine_SignalHandlerException(QScriptEngine* self, QScriptValue* exception) { + self->signalHandlerException(*exception); +} + +void QScriptEngine_connect_SignalHandlerException(QScriptEngine* self, intptr_t slot) { + MiqtVirtualQScriptEngine::connect(self, static_cast(&QScriptEngine::signalHandlerException), self, [=](const QScriptValue& exception) { + const QScriptValue& exception_ret = exception; + // Cast returned reference into pointer + QScriptValue* sigval1 = const_cast(&exception_ret); + miqt_exec_callback_QScriptEngine_SignalHandlerException(slot, sigval1); + }); +} + +struct miqt_string QScriptEngine_Tr2(const char* s, const char* c) { + QString _ret = QScriptEngine::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QScriptEngine_Tr3(const char* s, const char* c, int n) { + QString _ret = QScriptEngine::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QScriptEngine_TrUtf82(const char* s, const char* c) { + QString _ret = QScriptEngine::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QScriptEngine_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QScriptEngine::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QScriptValue* QScriptEngine_Evaluate2(QScriptEngine* self, struct miqt_string program, struct miqt_string fileName) { + QString program_QString = QString::fromUtf8(program.data, program.len); + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + return new QScriptValue(self->evaluate(program_QString, fileName_QString)); +} + +QScriptValue* QScriptEngine_Evaluate3(QScriptEngine* self, struct miqt_string program, struct miqt_string fileName, int lineNumber) { + QString program_QString = QString::fromUtf8(program.data, program.len); + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + return new QScriptValue(self->evaluate(program_QString, fileName_QString, static_cast(lineNumber))); +} + +void QScriptEngine_AbortEvaluation1(QScriptEngine* self, QScriptValue* result) { + self->abortEvaluation(*result); +} + +QScriptValue* QScriptEngine_NewObject2(QScriptEngine* self, QScriptClass* scriptClass, QScriptValue* data) { + return new QScriptValue(self->newObject(scriptClass, *data)); +} + +QScriptValue* QScriptEngine_NewArray1(QScriptEngine* self, unsigned int length) { + return new QScriptValue(self->newArray(static_cast(length))); +} + +QScriptValue* QScriptEngine_NewQObject22(QScriptEngine* self, QObject* object, int ownership) { + return new QScriptValue(self->newQObject(object, static_cast(ownership))); +} + +QScriptValue* QScriptEngine_NewQObject3(QScriptEngine* self, QObject* object, int ownership, int* options) { + return new QScriptValue(self->newQObject(object, static_cast(ownership), (const QScriptEngine::QObjectWrapOptions&)(*options))); +} + +QScriptValue* QScriptEngine_NewQObject32(QScriptEngine* self, QScriptValue* scriptObject, QObject* qtObject, int ownership) { + return new QScriptValue(self->newQObject(*scriptObject, qtObject, static_cast(ownership))); +} + +QScriptValue* QScriptEngine_NewQObject4(QScriptEngine* self, QScriptValue* scriptObject, QObject* qtObject, int ownership, int* options) { + return new QScriptValue(self->newQObject(*scriptObject, qtObject, static_cast(ownership), (const QScriptEngine::QObjectWrapOptions&)(*options))); +} + +QScriptValue* QScriptEngine_NewQMetaObject2(QScriptEngine* self, QMetaObject* metaObject, QScriptValue* ctor) { + return new QScriptValue(self->newQMetaObject(metaObject, *ctor)); +} + +void QScriptEngine_InstallTranslatorFunctions1(QScriptEngine* self, QScriptValue* object) { + self->installTranslatorFunctions(*object); +} + +void QScriptEngine_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngine*)(self) )->handle__Event = slot; +} + +bool QScriptEngine_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQScriptEngine*)(self) )->virtualbase_Event(event); +} + +void QScriptEngine_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngine*)(self) )->handle__EventFilter = slot; +} + +bool QScriptEngine_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQScriptEngine*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QScriptEngine_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngine*)(self) )->handle__TimerEvent = slot; +} + +void QScriptEngine_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQScriptEngine*)(self) )->virtualbase_TimerEvent(event); +} + +void QScriptEngine_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngine*)(self) )->handle__ChildEvent = slot; +} + +void QScriptEngine_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQScriptEngine*)(self) )->virtualbase_ChildEvent(event); +} + +void QScriptEngine_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngine*)(self) )->handle__CustomEvent = slot; +} + +void QScriptEngine_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQScriptEngine*)(self) )->virtualbase_CustomEvent(event); +} + +void QScriptEngine_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngine*)(self) )->handle__ConnectNotify = slot; +} + +void QScriptEngine_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQScriptEngine*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QScriptEngine_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngine*)(self) )->handle__DisconnectNotify = slot; +} + +void QScriptEngine_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQScriptEngine*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QScriptEngine_Delete(QScriptEngine* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/script/gen_qscriptengine.go b/qt/script/gen_qscriptengine.go new file mode 100644 index 00000000..b7c3e935 --- /dev/null +++ b/qt/script/gen_qscriptengine.go @@ -0,0 +1,863 @@ +package script + +/* + +#include "gen_qscriptengine.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QScriptSyntaxCheckResult__State int + +const ( + QScriptSyntaxCheckResult__Error QScriptSyntaxCheckResult__State = 0 + QScriptSyntaxCheckResult__Intermediate QScriptSyntaxCheckResult__State = 1 + QScriptSyntaxCheckResult__Valid QScriptSyntaxCheckResult__State = 2 +) + +type QScriptEngine__ValueOwnership int + +const ( + QScriptEngine__QtOwnership QScriptEngine__ValueOwnership = 0 + QScriptEngine__ScriptOwnership QScriptEngine__ValueOwnership = 1 + QScriptEngine__AutoOwnership QScriptEngine__ValueOwnership = 2 +) + +type QScriptEngine__QObjectWrapOption int + +const ( + QScriptEngine__ExcludeChildObjects QScriptEngine__QObjectWrapOption = 1 + QScriptEngine__ExcludeSuperClassMethods QScriptEngine__QObjectWrapOption = 2 + QScriptEngine__ExcludeSuperClassProperties QScriptEngine__QObjectWrapOption = 4 + QScriptEngine__ExcludeSuperClassContents QScriptEngine__QObjectWrapOption = 6 + QScriptEngine__SkipMethodsInEnumeration QScriptEngine__QObjectWrapOption = 8 + QScriptEngine__ExcludeDeleteLater QScriptEngine__QObjectWrapOption = 16 + QScriptEngine__ExcludeSlots QScriptEngine__QObjectWrapOption = 32 + QScriptEngine__AutoCreateDynamicProperties QScriptEngine__QObjectWrapOption = 256 + QScriptEngine__PreferExistingWrapperObject QScriptEngine__QObjectWrapOption = 512 +) + +type QScriptSyntaxCheckResult struct { + h *C.QScriptSyntaxCheckResult + isSubclass bool +} + +func (this *QScriptSyntaxCheckResult) cPointer() *C.QScriptSyntaxCheckResult { + if this == nil { + return nil + } + return this.h +} + +func (this *QScriptSyntaxCheckResult) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQScriptSyntaxCheckResult constructs the type using only CGO pointers. +func newQScriptSyntaxCheckResult(h *C.QScriptSyntaxCheckResult) *QScriptSyntaxCheckResult { + if h == nil { + return nil + } + return &QScriptSyntaxCheckResult{h: h} +} + +// UnsafeNewQScriptSyntaxCheckResult constructs the type using only unsafe pointers. +func UnsafeNewQScriptSyntaxCheckResult(h unsafe.Pointer) *QScriptSyntaxCheckResult { + if h == nil { + return nil + } + + return &QScriptSyntaxCheckResult{h: (*C.QScriptSyntaxCheckResult)(h)} +} + +// NewQScriptSyntaxCheckResult constructs a new QScriptSyntaxCheckResult object. +func NewQScriptSyntaxCheckResult(other *QScriptSyntaxCheckResult) *QScriptSyntaxCheckResult { + var outptr_QScriptSyntaxCheckResult *C.QScriptSyntaxCheckResult = nil + + C.QScriptSyntaxCheckResult_new(other.cPointer(), &outptr_QScriptSyntaxCheckResult) + ret := newQScriptSyntaxCheckResult(outptr_QScriptSyntaxCheckResult) + ret.isSubclass = true + return ret +} + +func (this *QScriptSyntaxCheckResult) State() QScriptSyntaxCheckResult__State { + return (QScriptSyntaxCheckResult__State)(C.QScriptSyntaxCheckResult_State(this.h)) +} + +func (this *QScriptSyntaxCheckResult) ErrorLineNumber() int { + return (int)(C.QScriptSyntaxCheckResult_ErrorLineNumber(this.h)) +} + +func (this *QScriptSyntaxCheckResult) ErrorColumnNumber() int { + return (int)(C.QScriptSyntaxCheckResult_ErrorColumnNumber(this.h)) +} + +func (this *QScriptSyntaxCheckResult) ErrorMessage() string { + var _ms C.struct_miqt_string = C.QScriptSyntaxCheckResult_ErrorMessage(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QScriptSyntaxCheckResult) OperatorAssign(other *QScriptSyntaxCheckResult) { + C.QScriptSyntaxCheckResult_OperatorAssign(this.h, other.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QScriptSyntaxCheckResult) Delete() { + C.QScriptSyntaxCheckResult_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 *QScriptSyntaxCheckResult) GoGC() { + runtime.SetFinalizer(this, func(this *QScriptSyntaxCheckResult) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QScriptEngine struct { + h *C.QScriptEngine + isSubclass bool + *qt.QObject +} + +func (this *QScriptEngine) cPointer() *C.QScriptEngine { + if this == nil { + return nil + } + return this.h +} + +func (this *QScriptEngine) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQScriptEngine constructs the type using only CGO pointers. +func newQScriptEngine(h *C.QScriptEngine, h_QObject *C.QObject) *QScriptEngine { + if h == nil { + return nil + } + return &QScriptEngine{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQScriptEngine constructs the type using only unsafe pointers. +func UnsafeNewQScriptEngine(h unsafe.Pointer, h_QObject unsafe.Pointer) *QScriptEngine { + if h == nil { + return nil + } + + return &QScriptEngine{h: (*C.QScriptEngine)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +// NewQScriptEngine constructs a new QScriptEngine object. +func NewQScriptEngine() *QScriptEngine { + var outptr_QScriptEngine *C.QScriptEngine = nil + var outptr_QObject *C.QObject = nil + + C.QScriptEngine_new(&outptr_QScriptEngine, &outptr_QObject) + ret := newQScriptEngine(outptr_QScriptEngine, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQScriptEngine2 constructs a new QScriptEngine object. +func NewQScriptEngine2(parent *qt.QObject) *QScriptEngine { + var outptr_QScriptEngine *C.QScriptEngine = nil + var outptr_QObject *C.QObject = nil + + C.QScriptEngine_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QScriptEngine, &outptr_QObject) + ret := newQScriptEngine(outptr_QScriptEngine, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QScriptEngine) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QScriptEngine_MetaObject(this.h))) +} + +func (this *QScriptEngine) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QScriptEngine_Metacast(this.h, param1_Cstring)) +} + +func QScriptEngine_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QScriptEngine_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QScriptEngine_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QScriptEngine_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QScriptEngine) GlobalObject() *QScriptValue { + _ret := C.QScriptEngine_GlobalObject(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) SetGlobalObject(object *QScriptValue) { + C.QScriptEngine_SetGlobalObject(this.h, object.cPointer()) +} + +func (this *QScriptEngine) CurrentContext() *QScriptContext { + return UnsafeNewQScriptContext(unsafe.Pointer(C.QScriptEngine_CurrentContext(this.h))) +} + +func (this *QScriptEngine) PushContext() *QScriptContext { + return UnsafeNewQScriptContext(unsafe.Pointer(C.QScriptEngine_PushContext(this.h))) +} + +func (this *QScriptEngine) PopContext() { + C.QScriptEngine_PopContext(this.h) +} + +func (this *QScriptEngine) CanEvaluate(program string) bool { + program_ms := C.struct_miqt_string{} + program_ms.data = C.CString(program) + program_ms.len = C.size_t(len(program)) + defer C.free(unsafe.Pointer(program_ms.data)) + return (bool)(C.QScriptEngine_CanEvaluate(this.h, program_ms)) +} + +func QScriptEngine_CheckSyntax(program string) *QScriptSyntaxCheckResult { + program_ms := C.struct_miqt_string{} + program_ms.data = C.CString(program) + program_ms.len = C.size_t(len(program)) + defer C.free(unsafe.Pointer(program_ms.data)) + _ret := C.QScriptEngine_CheckSyntax(program_ms) + _goptr := newQScriptSyntaxCheckResult(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) Evaluate(program string) *QScriptValue { + program_ms := C.struct_miqt_string{} + program_ms.data = C.CString(program) + program_ms.len = C.size_t(len(program)) + defer C.free(unsafe.Pointer(program_ms.data)) + _ret := C.QScriptEngine_Evaluate(this.h, program_ms) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) EvaluateWithProgram(program *QScriptProgram) *QScriptValue { + _ret := C.QScriptEngine_EvaluateWithProgram(this.h, program.cPointer()) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) IsEvaluating() bool { + return (bool)(C.QScriptEngine_IsEvaluating(this.h)) +} + +func (this *QScriptEngine) AbortEvaluation() { + C.QScriptEngine_AbortEvaluation(this.h) +} + +func (this *QScriptEngine) HasUncaughtException() bool { + return (bool)(C.QScriptEngine_HasUncaughtException(this.h)) +} + +func (this *QScriptEngine) UncaughtException() *QScriptValue { + _ret := C.QScriptEngine_UncaughtException(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) UncaughtExceptionLineNumber() int { + return (int)(C.QScriptEngine_UncaughtExceptionLineNumber(this.h)) +} + +func (this *QScriptEngine) UncaughtExceptionBacktrace() []string { + var _ma C.struct_miqt_array = C.QScriptEngine_UncaughtExceptionBacktrace(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 *QScriptEngine) ClearExceptions() { + C.QScriptEngine_ClearExceptions(this.h) +} + +func (this *QScriptEngine) NullValue() *QScriptValue { + _ret := C.QScriptEngine_NullValue(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) UndefinedValue() *QScriptValue { + _ret := C.QScriptEngine_UndefinedValue(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewVariant(value *qt.QVariant) *QScriptValue { + _ret := C.QScriptEngine_NewVariant(this.h, (*C.QVariant)(value.UnsafePointer())) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewVariant2(object *QScriptValue, value *qt.QVariant) *QScriptValue { + _ret := C.QScriptEngine_NewVariant2(this.h, object.cPointer(), (*C.QVariant)(value.UnsafePointer())) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewRegExp(regexp *qt.QRegExp) *QScriptValue { + _ret := C.QScriptEngine_NewRegExp(this.h, (*C.QRegExp)(regexp.UnsafePointer())) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewObject() *QScriptValue { + _ret := C.QScriptEngine_NewObject(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewObjectWithScriptClass(scriptClass *QScriptClass) *QScriptValue { + _ret := C.QScriptEngine_NewObjectWithScriptClass(this.h, scriptClass.cPointer()) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewArray() *QScriptValue { + _ret := C.QScriptEngine_NewArray(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewRegExp2(pattern string, flags string) *QScriptValue { + pattern_ms := C.struct_miqt_string{} + pattern_ms.data = C.CString(pattern) + pattern_ms.len = C.size_t(len(pattern)) + defer C.free(unsafe.Pointer(pattern_ms.data)) + flags_ms := C.struct_miqt_string{} + flags_ms.data = C.CString(flags) + flags_ms.len = C.size_t(len(flags)) + defer C.free(unsafe.Pointer(flags_ms.data)) + _ret := C.QScriptEngine_NewRegExp2(this.h, pattern_ms, flags_ms) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewDate(value float64) *QScriptValue { + _ret := C.QScriptEngine_NewDate(this.h, (C.double)(value)) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewDateWithValue(value *qt.QDateTime) *QScriptValue { + _ret := C.QScriptEngine_NewDateWithValue(this.h, (*C.QDateTime)(value.UnsafePointer())) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewActivationObject() *QScriptValue { + _ret := C.QScriptEngine_NewActivationObject(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewQObject(object *qt.QObject) *QScriptValue { + _ret := C.QScriptEngine_NewQObject(this.h, (*C.QObject)(object.UnsafePointer())) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewQObject2(scriptObject *QScriptValue, qtObject *qt.QObject) *QScriptValue { + _ret := C.QScriptEngine_NewQObject2(this.h, scriptObject.cPointer(), (*C.QObject)(qtObject.UnsafePointer())) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewQMetaObject(metaObject *qt.QMetaObject) *QScriptValue { + _ret := C.QScriptEngine_NewQMetaObject(this.h, (*C.QMetaObject)(metaObject.UnsafePointer())) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) DefaultPrototype(metaTypeId int) *QScriptValue { + _ret := C.QScriptEngine_DefaultPrototype(this.h, (C.int)(metaTypeId)) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) SetDefaultPrototype(metaTypeId int, prototype *QScriptValue) { + C.QScriptEngine_SetDefaultPrototype(this.h, (C.int)(metaTypeId), prototype.cPointer()) +} + +func (this *QScriptEngine) InstallTranslatorFunctions() { + C.QScriptEngine_InstallTranslatorFunctions(this.h) +} + +func (this *QScriptEngine) ImportExtension(extension string) *QScriptValue { + extension_ms := C.struct_miqt_string{} + extension_ms.data = C.CString(extension) + extension_ms.len = C.size_t(len(extension)) + defer C.free(unsafe.Pointer(extension_ms.data)) + _ret := C.QScriptEngine_ImportExtension(this.h, extension_ms) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) AvailableExtensions() []string { + var _ma C.struct_miqt_array = C.QScriptEngine_AvailableExtensions(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 *QScriptEngine) ImportedExtensions() []string { + var _ma C.struct_miqt_array = C.QScriptEngine_ImportedExtensions(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 *QScriptEngine) CollectGarbage() { + C.QScriptEngine_CollectGarbage(this.h) +} + +func (this *QScriptEngine) ReportAdditionalMemoryCost(size int) { + C.QScriptEngine_ReportAdditionalMemoryCost(this.h, (C.int)(size)) +} + +func (this *QScriptEngine) SetProcessEventsInterval(interval int) { + C.QScriptEngine_SetProcessEventsInterval(this.h, (C.int)(interval)) +} + +func (this *QScriptEngine) ProcessEventsInterval() int { + return (int)(C.QScriptEngine_ProcessEventsInterval(this.h)) +} + +func (this *QScriptEngine) SetAgent(agent *QScriptEngineAgent) { + C.QScriptEngine_SetAgent(this.h, agent.cPointer()) +} + +func (this *QScriptEngine) Agent() *QScriptEngineAgent { + return UnsafeNewQScriptEngineAgent(unsafe.Pointer(C.QScriptEngine_Agent(this.h))) +} + +func (this *QScriptEngine) ToStringHandle(str string) *QScriptString { + str_ms := C.struct_miqt_string{} + str_ms.data = C.CString(str) + str_ms.len = C.size_t(len(str)) + defer C.free(unsafe.Pointer(str_ms.data)) + _ret := C.QScriptEngine_ToStringHandle(this.h, str_ms) + _goptr := newQScriptString(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) ToObject(value *QScriptValue) *QScriptValue { + _ret := C.QScriptEngine_ToObject(this.h, value.cPointer()) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) ObjectById(id int64) *QScriptValue { + _ret := C.QScriptEngine_ObjectById(this.h, (C.longlong)(id)) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) SignalHandlerException(exception *QScriptValue) { + C.QScriptEngine_SignalHandlerException(this.h, exception.cPointer()) +} +func (this *QScriptEngine) OnSignalHandlerException(slot func(exception *QScriptValue)) { + C.QScriptEngine_connect_SignalHandlerException(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngine_SignalHandlerException +func miqt_exec_callback_QScriptEngine_SignalHandlerException(cb C.intptr_t, exception *C.QScriptValue) { + gofunc, ok := cgo.Handle(cb).Value().(func(exception *QScriptValue)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQScriptValue(unsafe.Pointer(exception)) + + gofunc(slotval1) +} + +func QScriptEngine_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QScriptEngine_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QScriptEngine_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QScriptEngine_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QScriptEngine_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QScriptEngine_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QScriptEngine_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QScriptEngine_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QScriptEngine) Evaluate2(program string, fileName string) *QScriptValue { + program_ms := C.struct_miqt_string{} + program_ms.data = C.CString(program) + program_ms.len = C.size_t(len(program)) + defer C.free(unsafe.Pointer(program_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)) + _ret := C.QScriptEngine_Evaluate2(this.h, program_ms, fileName_ms) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) Evaluate3(program string, fileName string, lineNumber int) *QScriptValue { + program_ms := C.struct_miqt_string{} + program_ms.data = C.CString(program) + program_ms.len = C.size_t(len(program)) + defer C.free(unsafe.Pointer(program_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)) + _ret := C.QScriptEngine_Evaluate3(this.h, program_ms, fileName_ms, (C.int)(lineNumber)) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) AbortEvaluation1(result *QScriptValue) { + C.QScriptEngine_AbortEvaluation1(this.h, result.cPointer()) +} + +func (this *QScriptEngine) NewObject2(scriptClass *QScriptClass, data *QScriptValue) *QScriptValue { + _ret := C.QScriptEngine_NewObject2(this.h, scriptClass.cPointer(), data.cPointer()) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewArray1(length uint) *QScriptValue { + _ret := C.QScriptEngine_NewArray1(this.h, (C.uint)(length)) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewQObject22(object *qt.QObject, ownership QScriptEngine__ValueOwnership) *QScriptValue { + _ret := C.QScriptEngine_NewQObject22(this.h, (*C.QObject)(object.UnsafePointer()), (C.int)(ownership)) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewQObject3(object *qt.QObject, ownership QScriptEngine__ValueOwnership, options *QScriptEngine__QObjectWrapOption) *QScriptValue { + _ret := C.QScriptEngine_NewQObject3(this.h, (*C.QObject)(object.UnsafePointer()), (C.int)(ownership), (*C.int)(unsafe.Pointer(options))) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewQObject32(scriptObject *QScriptValue, qtObject *qt.QObject, ownership QScriptEngine__ValueOwnership) *QScriptValue { + _ret := C.QScriptEngine_NewQObject32(this.h, scriptObject.cPointer(), (*C.QObject)(qtObject.UnsafePointer()), (C.int)(ownership)) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewQObject4(scriptObject *QScriptValue, qtObject *qt.QObject, ownership QScriptEngine__ValueOwnership, options *QScriptEngine__QObjectWrapOption) *QScriptValue { + _ret := C.QScriptEngine_NewQObject4(this.h, scriptObject.cPointer(), (*C.QObject)(qtObject.UnsafePointer()), (C.int)(ownership), (*C.int)(unsafe.Pointer(options))) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) NewQMetaObject2(metaObject *qt.QMetaObject, ctor *QScriptValue) *QScriptValue { + _ret := C.QScriptEngine_NewQMetaObject2(this.h, (*C.QMetaObject)(metaObject.UnsafePointer()), ctor.cPointer()) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngine) InstallTranslatorFunctions1(object *QScriptValue) { + C.QScriptEngine_InstallTranslatorFunctions1(this.h, object.cPointer()) +} + +func (this *QScriptEngine) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QScriptEngine_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QScriptEngine) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QScriptEngine_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngine_Event +func miqt_exec_callback_QScriptEngine_Event(self *C.QScriptEngine, 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((&QScriptEngine{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QScriptEngine) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QScriptEngine_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QScriptEngine) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QScriptEngine_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngine_EventFilter +func miqt_exec_callback_QScriptEngine_EventFilter(self *C.QScriptEngine, 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((&QScriptEngine{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QScriptEngine) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QScriptEngine_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QScriptEngine) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QScriptEngine_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngine_TimerEvent +func miqt_exec_callback_QScriptEngine_TimerEvent(self *C.QScriptEngine, 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((&QScriptEngine{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QScriptEngine) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QScriptEngine_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QScriptEngine) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QScriptEngine_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngine_ChildEvent +func miqt_exec_callback_QScriptEngine_ChildEvent(self *C.QScriptEngine, 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((&QScriptEngine{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QScriptEngine) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QScriptEngine_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QScriptEngine) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QScriptEngine_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngine_CustomEvent +func miqt_exec_callback_QScriptEngine_CustomEvent(self *C.QScriptEngine, 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((&QScriptEngine{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QScriptEngine) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QScriptEngine_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QScriptEngine) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QScriptEngine_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngine_ConnectNotify +func miqt_exec_callback_QScriptEngine_ConnectNotify(self *C.QScriptEngine, 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((&QScriptEngine{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QScriptEngine) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QScriptEngine_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QScriptEngine) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QScriptEngine_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngine_DisconnectNotify +func miqt_exec_callback_QScriptEngine_DisconnectNotify(self *C.QScriptEngine, 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((&QScriptEngine{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QScriptEngine) Delete() { + C.QScriptEngine_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 *QScriptEngine) GoGC() { + runtime.SetFinalizer(this, func(this *QScriptEngine) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/script/gen_qscriptengine.h b/qt/script/gen_qscriptengine.h new file mode 100644 index 00000000..a7aba9f7 --- /dev/null +++ b/qt/script/gen_qscriptengine.h @@ -0,0 +1,152 @@ +#pragma once +#ifndef MIQT_QT_SCRIPT_GEN_QSCRIPTENGINE_H +#define MIQT_QT_SCRIPT_GEN_QSCRIPTENGINE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QDateTime; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QObject; +class QRegExp; +class QScriptClass; +class QScriptContext; +class QScriptEngine; +class QScriptEngineAgent; +class QScriptProgram; +class QScriptString; +class QScriptSyntaxCheckResult; +class QScriptValue; +class QTimerEvent; +class QVariant; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QDateTime QDateTime; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QRegExp QRegExp; +typedef struct QScriptClass QScriptClass; +typedef struct QScriptContext QScriptContext; +typedef struct QScriptEngine QScriptEngine; +typedef struct QScriptEngineAgent QScriptEngineAgent; +typedef struct QScriptProgram QScriptProgram; +typedef struct QScriptString QScriptString; +typedef struct QScriptSyntaxCheckResult QScriptSyntaxCheckResult; +typedef struct QScriptValue QScriptValue; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +#endif + +void QScriptSyntaxCheckResult_new(QScriptSyntaxCheckResult* other, QScriptSyntaxCheckResult** outptr_QScriptSyntaxCheckResult); +int QScriptSyntaxCheckResult_State(const QScriptSyntaxCheckResult* self); +int QScriptSyntaxCheckResult_ErrorLineNumber(const QScriptSyntaxCheckResult* self); +int QScriptSyntaxCheckResult_ErrorColumnNumber(const QScriptSyntaxCheckResult* self); +struct miqt_string QScriptSyntaxCheckResult_ErrorMessage(const QScriptSyntaxCheckResult* self); +void QScriptSyntaxCheckResult_OperatorAssign(QScriptSyntaxCheckResult* self, QScriptSyntaxCheckResult* other); +void QScriptSyntaxCheckResult_Delete(QScriptSyntaxCheckResult* self, bool isSubclass); + +void QScriptEngine_new(QScriptEngine** outptr_QScriptEngine, QObject** outptr_QObject); +void QScriptEngine_new2(QObject* parent, QScriptEngine** outptr_QScriptEngine, QObject** outptr_QObject); +QMetaObject* QScriptEngine_MetaObject(const QScriptEngine* self); +void* QScriptEngine_Metacast(QScriptEngine* self, const char* param1); +struct miqt_string QScriptEngine_Tr(const char* s); +struct miqt_string QScriptEngine_TrUtf8(const char* s); +QScriptValue* QScriptEngine_GlobalObject(const QScriptEngine* self); +void QScriptEngine_SetGlobalObject(QScriptEngine* self, QScriptValue* object); +QScriptContext* QScriptEngine_CurrentContext(const QScriptEngine* self); +QScriptContext* QScriptEngine_PushContext(QScriptEngine* self); +void QScriptEngine_PopContext(QScriptEngine* self); +bool QScriptEngine_CanEvaluate(const QScriptEngine* self, struct miqt_string program); +QScriptSyntaxCheckResult* QScriptEngine_CheckSyntax(struct miqt_string program); +QScriptValue* QScriptEngine_Evaluate(QScriptEngine* self, struct miqt_string program); +QScriptValue* QScriptEngine_EvaluateWithProgram(QScriptEngine* self, QScriptProgram* program); +bool QScriptEngine_IsEvaluating(const QScriptEngine* self); +void QScriptEngine_AbortEvaluation(QScriptEngine* self); +bool QScriptEngine_HasUncaughtException(const QScriptEngine* self); +QScriptValue* QScriptEngine_UncaughtException(const QScriptEngine* self); +int QScriptEngine_UncaughtExceptionLineNumber(const QScriptEngine* self); +struct miqt_array /* of struct miqt_string */ QScriptEngine_UncaughtExceptionBacktrace(const QScriptEngine* self); +void QScriptEngine_ClearExceptions(QScriptEngine* self); +QScriptValue* QScriptEngine_NullValue(QScriptEngine* self); +QScriptValue* QScriptEngine_UndefinedValue(QScriptEngine* self); +QScriptValue* QScriptEngine_NewVariant(QScriptEngine* self, QVariant* value); +QScriptValue* QScriptEngine_NewVariant2(QScriptEngine* self, QScriptValue* object, QVariant* value); +QScriptValue* QScriptEngine_NewRegExp(QScriptEngine* self, QRegExp* regexp); +QScriptValue* QScriptEngine_NewObject(QScriptEngine* self); +QScriptValue* QScriptEngine_NewObjectWithScriptClass(QScriptEngine* self, QScriptClass* scriptClass); +QScriptValue* QScriptEngine_NewArray(QScriptEngine* self); +QScriptValue* QScriptEngine_NewRegExp2(QScriptEngine* self, struct miqt_string pattern, struct miqt_string flags); +QScriptValue* QScriptEngine_NewDate(QScriptEngine* self, double value); +QScriptValue* QScriptEngine_NewDateWithValue(QScriptEngine* self, QDateTime* value); +QScriptValue* QScriptEngine_NewActivationObject(QScriptEngine* self); +QScriptValue* QScriptEngine_NewQObject(QScriptEngine* self, QObject* object); +QScriptValue* QScriptEngine_NewQObject2(QScriptEngine* self, QScriptValue* scriptObject, QObject* qtObject); +QScriptValue* QScriptEngine_NewQMetaObject(QScriptEngine* self, QMetaObject* metaObject); +QScriptValue* QScriptEngine_DefaultPrototype(const QScriptEngine* self, int metaTypeId); +void QScriptEngine_SetDefaultPrototype(QScriptEngine* self, int metaTypeId, QScriptValue* prototype); +void QScriptEngine_InstallTranslatorFunctions(QScriptEngine* self); +QScriptValue* QScriptEngine_ImportExtension(QScriptEngine* self, struct miqt_string extension); +struct miqt_array /* of struct miqt_string */ QScriptEngine_AvailableExtensions(const QScriptEngine* self); +struct miqt_array /* of struct miqt_string */ QScriptEngine_ImportedExtensions(const QScriptEngine* self); +void QScriptEngine_CollectGarbage(QScriptEngine* self); +void QScriptEngine_ReportAdditionalMemoryCost(QScriptEngine* self, int size); +void QScriptEngine_SetProcessEventsInterval(QScriptEngine* self, int interval); +int QScriptEngine_ProcessEventsInterval(const QScriptEngine* self); +void QScriptEngine_SetAgent(QScriptEngine* self, QScriptEngineAgent* agent); +QScriptEngineAgent* QScriptEngine_Agent(const QScriptEngine* self); +QScriptString* QScriptEngine_ToStringHandle(QScriptEngine* self, struct miqt_string str); +QScriptValue* QScriptEngine_ToObject(QScriptEngine* self, QScriptValue* value); +QScriptValue* QScriptEngine_ObjectById(const QScriptEngine* self, long long id); +void QScriptEngine_SignalHandlerException(QScriptEngine* self, QScriptValue* exception); +void QScriptEngine_connect_SignalHandlerException(QScriptEngine* self, intptr_t slot); +struct miqt_string QScriptEngine_Tr2(const char* s, const char* c); +struct miqt_string QScriptEngine_Tr3(const char* s, const char* c, int n); +struct miqt_string QScriptEngine_TrUtf82(const char* s, const char* c); +struct miqt_string QScriptEngine_TrUtf83(const char* s, const char* c, int n); +QScriptValue* QScriptEngine_Evaluate2(QScriptEngine* self, struct miqt_string program, struct miqt_string fileName); +QScriptValue* QScriptEngine_Evaluate3(QScriptEngine* self, struct miqt_string program, struct miqt_string fileName, int lineNumber); +void QScriptEngine_AbortEvaluation1(QScriptEngine* self, QScriptValue* result); +QScriptValue* QScriptEngine_NewObject2(QScriptEngine* self, QScriptClass* scriptClass, QScriptValue* data); +QScriptValue* QScriptEngine_NewArray1(QScriptEngine* self, unsigned int length); +QScriptValue* QScriptEngine_NewQObject22(QScriptEngine* self, QObject* object, int ownership); +QScriptValue* QScriptEngine_NewQObject3(QScriptEngine* self, QObject* object, int ownership, int* options); +QScriptValue* QScriptEngine_NewQObject32(QScriptEngine* self, QScriptValue* scriptObject, QObject* qtObject, int ownership); +QScriptValue* QScriptEngine_NewQObject4(QScriptEngine* self, QScriptValue* scriptObject, QObject* qtObject, int ownership, int* options); +QScriptValue* QScriptEngine_NewQMetaObject2(QScriptEngine* self, QMetaObject* metaObject, QScriptValue* ctor); +void QScriptEngine_InstallTranslatorFunctions1(QScriptEngine* self, QScriptValue* object); +void QScriptEngine_override_virtual_Event(void* self, intptr_t slot); +bool QScriptEngine_virtualbase_Event(void* self, QEvent* event); +void QScriptEngine_override_virtual_EventFilter(void* self, intptr_t slot); +bool QScriptEngine_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QScriptEngine_override_virtual_TimerEvent(void* self, intptr_t slot); +void QScriptEngine_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QScriptEngine_override_virtual_ChildEvent(void* self, intptr_t slot); +void QScriptEngine_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QScriptEngine_override_virtual_CustomEvent(void* self, intptr_t slot); +void QScriptEngine_virtualbase_CustomEvent(void* self, QEvent* event); +void QScriptEngine_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QScriptEngine_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QScriptEngine_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QScriptEngine_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QScriptEngine_Delete(QScriptEngine* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/script/gen_qscriptengineagent.cpp b/qt/script/gen_qscriptengineagent.cpp new file mode 100644 index 00000000..d7c9ae64 --- /dev/null +++ b/qt/script/gen_qscriptengineagent.cpp @@ -0,0 +1,474 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qscriptengineagent.h" +#include "_cgo_export.h" + +class MiqtVirtualQScriptEngineAgent : public virtual QScriptEngineAgent { +public: + + MiqtVirtualQScriptEngineAgent(QScriptEngine* engine): QScriptEngineAgent(engine) {}; + + virtual ~MiqtVirtualQScriptEngineAgent() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScriptLoad = 0; + + // Subclass to allow providing a Go implementation + virtual void scriptLoad(qint64 id, const QString& program, const QString& fileName, int baseLineNumber) override { + if (handle__ScriptLoad == 0) { + QScriptEngineAgent::scriptLoad(id, program, fileName, baseLineNumber); + return; + } + + qint64 id_ret = id; + long long sigval1 = static_cast(id_ret); + const QString program_ret = program; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray program_b = program_ret.toUtf8(); + struct miqt_string program_ms; + program_ms.len = program_b.length(); + program_ms.data = static_cast(malloc(program_ms.len)); + memcpy(program_ms.data, program_b.data(), program_ms.len); + struct miqt_string sigval2 = program_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 sigval3 = fileName_ms; + int sigval4 = baseLineNumber; + + miqt_exec_callback_QScriptEngineAgent_ScriptLoad(this, handle__ScriptLoad, sigval1, sigval2, sigval3, sigval4); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScriptLoad(long long id, struct miqt_string program, struct miqt_string fileName, int baseLineNumber) { + QString program_QString = QString::fromUtf8(program.data, program.len); + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + + QScriptEngineAgent::scriptLoad(static_cast(id), program_QString, fileName_QString, static_cast(baseLineNumber)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ScriptUnload = 0; + + // Subclass to allow providing a Go implementation + virtual void scriptUnload(qint64 id) override { + if (handle__ScriptUnload == 0) { + QScriptEngineAgent::scriptUnload(id); + return; + } + + qint64 id_ret = id; + long long sigval1 = static_cast(id_ret); + + miqt_exec_callback_QScriptEngineAgent_ScriptUnload(this, handle__ScriptUnload, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ScriptUnload(long long id) { + + QScriptEngineAgent::scriptUnload(static_cast(id)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextPush = 0; + + // Subclass to allow providing a Go implementation + virtual void contextPush() override { + if (handle__ContextPush == 0) { + QScriptEngineAgent::contextPush(); + return; + } + + + miqt_exec_callback_QScriptEngineAgent_ContextPush(this, handle__ContextPush); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextPush() { + + QScriptEngineAgent::contextPush(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextPop = 0; + + // Subclass to allow providing a Go implementation + virtual void contextPop() override { + if (handle__ContextPop == 0) { + QScriptEngineAgent::contextPop(); + return; + } + + + miqt_exec_callback_QScriptEngineAgent_ContextPop(this, handle__ContextPop); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextPop() { + + QScriptEngineAgent::contextPop(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FunctionEntry = 0; + + // Subclass to allow providing a Go implementation + virtual void functionEntry(qint64 scriptId) override { + if (handle__FunctionEntry == 0) { + QScriptEngineAgent::functionEntry(scriptId); + return; + } + + qint64 scriptId_ret = scriptId; + long long sigval1 = static_cast(scriptId_ret); + + miqt_exec_callback_QScriptEngineAgent_FunctionEntry(this, handle__FunctionEntry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FunctionEntry(long long scriptId) { + + QScriptEngineAgent::functionEntry(static_cast(scriptId)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FunctionExit = 0; + + // Subclass to allow providing a Go implementation + virtual void functionExit(qint64 scriptId, const QScriptValue& returnValue) override { + if (handle__FunctionExit == 0) { + QScriptEngineAgent::functionExit(scriptId, returnValue); + return; + } + + qint64 scriptId_ret = scriptId; + long long sigval1 = static_cast(scriptId_ret); + const QScriptValue& returnValue_ret = returnValue; + // Cast returned reference into pointer + QScriptValue* sigval2 = const_cast(&returnValue_ret); + + miqt_exec_callback_QScriptEngineAgent_FunctionExit(this, handle__FunctionExit, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FunctionExit(long long scriptId, QScriptValue* returnValue) { + + QScriptEngineAgent::functionExit(static_cast(scriptId), *returnValue); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PositionChange = 0; + + // Subclass to allow providing a Go implementation + virtual void positionChange(qint64 scriptId, int lineNumber, int columnNumber) override { + if (handle__PositionChange == 0) { + QScriptEngineAgent::positionChange(scriptId, lineNumber, columnNumber); + return; + } + + qint64 scriptId_ret = scriptId; + long long sigval1 = static_cast(scriptId_ret); + int sigval2 = lineNumber; + int sigval3 = columnNumber; + + miqt_exec_callback_QScriptEngineAgent_PositionChange(this, handle__PositionChange, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PositionChange(long long scriptId, int lineNumber, int columnNumber) { + + QScriptEngineAgent::positionChange(static_cast(scriptId), static_cast(lineNumber), static_cast(columnNumber)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExceptionThrow = 0; + + // Subclass to allow providing a Go implementation + virtual void exceptionThrow(qint64 scriptId, const QScriptValue& exception, bool hasHandler) override { + if (handle__ExceptionThrow == 0) { + QScriptEngineAgent::exceptionThrow(scriptId, exception, hasHandler); + return; + } + + qint64 scriptId_ret = scriptId; + long long sigval1 = static_cast(scriptId_ret); + const QScriptValue& exception_ret = exception; + // Cast returned reference into pointer + QScriptValue* sigval2 = const_cast(&exception_ret); + bool sigval3 = hasHandler; + + miqt_exec_callback_QScriptEngineAgent_ExceptionThrow(this, handle__ExceptionThrow, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ExceptionThrow(long long scriptId, QScriptValue* exception, bool hasHandler) { + + QScriptEngineAgent::exceptionThrow(static_cast(scriptId), *exception, hasHandler); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ExceptionCatch = 0; + + // Subclass to allow providing a Go implementation + virtual void exceptionCatch(qint64 scriptId, const QScriptValue& exception) override { + if (handle__ExceptionCatch == 0) { + QScriptEngineAgent::exceptionCatch(scriptId, exception); + return; + } + + qint64 scriptId_ret = scriptId; + long long sigval1 = static_cast(scriptId_ret); + const QScriptValue& exception_ret = exception; + // Cast returned reference into pointer + QScriptValue* sigval2 = const_cast(&exception_ret); + + miqt_exec_callback_QScriptEngineAgent_ExceptionCatch(this, handle__ExceptionCatch, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ExceptionCatch(long long scriptId, QScriptValue* exception) { + + QScriptEngineAgent::exceptionCatch(static_cast(scriptId), *exception); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QScriptEngineAgent::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QScriptEngineAgent::supportsExtension(extension); + } + + QScriptEngineAgent::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QScriptEngineAgent_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QScriptEngineAgent::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant extension(QScriptEngineAgent::Extension extension, const QVariant& argument) override { + if (handle__Extension == 0) { + return QScriptEngineAgent::extension(extension, argument); + } + + QScriptEngineAgent::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + const QVariant& argument_ret = argument; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&argument_ret); + + QVariant* callback_return_value = miqt_exec_callback_QScriptEngineAgent_Extension(this, handle__Extension, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_Extension(int extension, QVariant* argument) { + + return new QVariant(QScriptEngineAgent::extension(static_cast(extension), *argument)); + + } + +}; + +void QScriptEngineAgent_new(QScriptEngine* engine, QScriptEngineAgent** outptr_QScriptEngineAgent) { + MiqtVirtualQScriptEngineAgent* ret = new MiqtVirtualQScriptEngineAgent(engine); + *outptr_QScriptEngineAgent = ret; +} + +void QScriptEngineAgent_ScriptLoad(QScriptEngineAgent* self, long long id, struct miqt_string program, struct miqt_string fileName, int baseLineNumber) { + QString program_QString = QString::fromUtf8(program.data, program.len); + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + self->scriptLoad(static_cast(id), program_QString, fileName_QString, static_cast(baseLineNumber)); +} + +void QScriptEngineAgent_ScriptUnload(QScriptEngineAgent* self, long long id) { + self->scriptUnload(static_cast(id)); +} + +void QScriptEngineAgent_ContextPush(QScriptEngineAgent* self) { + self->contextPush(); +} + +void QScriptEngineAgent_ContextPop(QScriptEngineAgent* self) { + self->contextPop(); +} + +void QScriptEngineAgent_FunctionEntry(QScriptEngineAgent* self, long long scriptId) { + self->functionEntry(static_cast(scriptId)); +} + +void QScriptEngineAgent_FunctionExit(QScriptEngineAgent* self, long long scriptId, QScriptValue* returnValue) { + self->functionExit(static_cast(scriptId), *returnValue); +} + +void QScriptEngineAgent_PositionChange(QScriptEngineAgent* self, long long scriptId, int lineNumber, int columnNumber) { + self->positionChange(static_cast(scriptId), static_cast(lineNumber), static_cast(columnNumber)); +} + +void QScriptEngineAgent_ExceptionThrow(QScriptEngineAgent* self, long long scriptId, QScriptValue* exception, bool hasHandler) { + self->exceptionThrow(static_cast(scriptId), *exception, hasHandler); +} + +void QScriptEngineAgent_ExceptionCatch(QScriptEngineAgent* self, long long scriptId, QScriptValue* exception) { + self->exceptionCatch(static_cast(scriptId), *exception); +} + +bool QScriptEngineAgent_SupportsExtension(const QScriptEngineAgent* self, int extension) { + return self->supportsExtension(static_cast(extension)); +} + +QVariant* QScriptEngineAgent_Extension(QScriptEngineAgent* self, int extension, QVariant* argument) { + return new QVariant(self->extension(static_cast(extension), *argument)); +} + +QScriptEngine* QScriptEngineAgent_Engine(const QScriptEngineAgent* self) { + return self->engine(); +} + +void QScriptEngineAgent_override_virtual_ScriptLoad(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngineAgent*)(self) )->handle__ScriptLoad = slot; +} + +void QScriptEngineAgent_virtualbase_ScriptLoad(void* self, long long id, struct miqt_string program, struct miqt_string fileName, int baseLineNumber) { + ( (MiqtVirtualQScriptEngineAgent*)(self) )->virtualbase_ScriptLoad(id, program, fileName, baseLineNumber); +} + +void QScriptEngineAgent_override_virtual_ScriptUnload(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngineAgent*)(self) )->handle__ScriptUnload = slot; +} + +void QScriptEngineAgent_virtualbase_ScriptUnload(void* self, long long id) { + ( (MiqtVirtualQScriptEngineAgent*)(self) )->virtualbase_ScriptUnload(id); +} + +void QScriptEngineAgent_override_virtual_ContextPush(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngineAgent*)(self) )->handle__ContextPush = slot; +} + +void QScriptEngineAgent_virtualbase_ContextPush(void* self) { + ( (MiqtVirtualQScriptEngineAgent*)(self) )->virtualbase_ContextPush(); +} + +void QScriptEngineAgent_override_virtual_ContextPop(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngineAgent*)(self) )->handle__ContextPop = slot; +} + +void QScriptEngineAgent_virtualbase_ContextPop(void* self) { + ( (MiqtVirtualQScriptEngineAgent*)(self) )->virtualbase_ContextPop(); +} + +void QScriptEngineAgent_override_virtual_FunctionEntry(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngineAgent*)(self) )->handle__FunctionEntry = slot; +} + +void QScriptEngineAgent_virtualbase_FunctionEntry(void* self, long long scriptId) { + ( (MiqtVirtualQScriptEngineAgent*)(self) )->virtualbase_FunctionEntry(scriptId); +} + +void QScriptEngineAgent_override_virtual_FunctionExit(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngineAgent*)(self) )->handle__FunctionExit = slot; +} + +void QScriptEngineAgent_virtualbase_FunctionExit(void* self, long long scriptId, QScriptValue* returnValue) { + ( (MiqtVirtualQScriptEngineAgent*)(self) )->virtualbase_FunctionExit(scriptId, returnValue); +} + +void QScriptEngineAgent_override_virtual_PositionChange(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngineAgent*)(self) )->handle__PositionChange = slot; +} + +void QScriptEngineAgent_virtualbase_PositionChange(void* self, long long scriptId, int lineNumber, int columnNumber) { + ( (MiqtVirtualQScriptEngineAgent*)(self) )->virtualbase_PositionChange(scriptId, lineNumber, columnNumber); +} + +void QScriptEngineAgent_override_virtual_ExceptionThrow(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngineAgent*)(self) )->handle__ExceptionThrow = slot; +} + +void QScriptEngineAgent_virtualbase_ExceptionThrow(void* self, long long scriptId, QScriptValue* exception, bool hasHandler) { + ( (MiqtVirtualQScriptEngineAgent*)(self) )->virtualbase_ExceptionThrow(scriptId, exception, hasHandler); +} + +void QScriptEngineAgent_override_virtual_ExceptionCatch(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngineAgent*)(self) )->handle__ExceptionCatch = slot; +} + +void QScriptEngineAgent_virtualbase_ExceptionCatch(void* self, long long scriptId, QScriptValue* exception) { + ( (MiqtVirtualQScriptEngineAgent*)(self) )->virtualbase_ExceptionCatch(scriptId, exception); +} + +void QScriptEngineAgent_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngineAgent*)(self) )->handle__SupportsExtension = slot; +} + +bool QScriptEngineAgent_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQScriptEngineAgent*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QScriptEngineAgent_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QScriptEngineAgent*)(self) )->handle__Extension = slot; +} + +QVariant* QScriptEngineAgent_virtualbase_Extension(void* self, int extension, QVariant* argument) { + return ( (MiqtVirtualQScriptEngineAgent*)(self) )->virtualbase_Extension(extension, argument); +} + +void QScriptEngineAgent_Delete(QScriptEngineAgent* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/script/gen_qscriptengineagent.go b/qt/script/gen_qscriptengineagent.go new file mode 100644 index 00000000..938955bf --- /dev/null +++ b/qt/script/gen_qscriptengineagent.go @@ -0,0 +1,426 @@ +package script + +/* + +#include "gen_qscriptengineagent.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QScriptEngineAgent__Extension int + +const ( + QScriptEngineAgent__DebuggerInvocationRequest QScriptEngineAgent__Extension = 0 +) + +type QScriptEngineAgent struct { + h *C.QScriptEngineAgent + isSubclass bool +} + +func (this *QScriptEngineAgent) cPointer() *C.QScriptEngineAgent { + if this == nil { + return nil + } + return this.h +} + +func (this *QScriptEngineAgent) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQScriptEngineAgent constructs the type using only CGO pointers. +func newQScriptEngineAgent(h *C.QScriptEngineAgent) *QScriptEngineAgent { + if h == nil { + return nil + } + return &QScriptEngineAgent{h: h} +} + +// UnsafeNewQScriptEngineAgent constructs the type using only unsafe pointers. +func UnsafeNewQScriptEngineAgent(h unsafe.Pointer) *QScriptEngineAgent { + if h == nil { + return nil + } + + return &QScriptEngineAgent{h: (*C.QScriptEngineAgent)(h)} +} + +// NewQScriptEngineAgent constructs a new QScriptEngineAgent object. +func NewQScriptEngineAgent(engine *QScriptEngine) *QScriptEngineAgent { + var outptr_QScriptEngineAgent *C.QScriptEngineAgent = nil + + C.QScriptEngineAgent_new(engine.cPointer(), &outptr_QScriptEngineAgent) + ret := newQScriptEngineAgent(outptr_QScriptEngineAgent) + ret.isSubclass = true + return ret +} + +func (this *QScriptEngineAgent) ScriptLoad(id int64, program string, fileName string, baseLineNumber int) { + program_ms := C.struct_miqt_string{} + program_ms.data = C.CString(program) + program_ms.len = C.size_t(len(program)) + defer C.free(unsafe.Pointer(program_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)) + C.QScriptEngineAgent_ScriptLoad(this.h, (C.longlong)(id), program_ms, fileName_ms, (C.int)(baseLineNumber)) +} + +func (this *QScriptEngineAgent) ScriptUnload(id int64) { + C.QScriptEngineAgent_ScriptUnload(this.h, (C.longlong)(id)) +} + +func (this *QScriptEngineAgent) ContextPush() { + C.QScriptEngineAgent_ContextPush(this.h) +} + +func (this *QScriptEngineAgent) ContextPop() { + C.QScriptEngineAgent_ContextPop(this.h) +} + +func (this *QScriptEngineAgent) FunctionEntry(scriptId int64) { + C.QScriptEngineAgent_FunctionEntry(this.h, (C.longlong)(scriptId)) +} + +func (this *QScriptEngineAgent) FunctionExit(scriptId int64, returnValue *QScriptValue) { + C.QScriptEngineAgent_FunctionExit(this.h, (C.longlong)(scriptId), returnValue.cPointer()) +} + +func (this *QScriptEngineAgent) PositionChange(scriptId int64, lineNumber int, columnNumber int) { + C.QScriptEngineAgent_PositionChange(this.h, (C.longlong)(scriptId), (C.int)(lineNumber), (C.int)(columnNumber)) +} + +func (this *QScriptEngineAgent) ExceptionThrow(scriptId int64, exception *QScriptValue, hasHandler bool) { + C.QScriptEngineAgent_ExceptionThrow(this.h, (C.longlong)(scriptId), exception.cPointer(), (C.bool)(hasHandler)) +} + +func (this *QScriptEngineAgent) ExceptionCatch(scriptId int64, exception *QScriptValue) { + C.QScriptEngineAgent_ExceptionCatch(this.h, (C.longlong)(scriptId), exception.cPointer()) +} + +func (this *QScriptEngineAgent) SupportsExtension(extension QScriptEngineAgent__Extension) bool { + return (bool)(C.QScriptEngineAgent_SupportsExtension(this.h, (C.int)(extension))) +} + +func (this *QScriptEngineAgent) Extension(extension QScriptEngineAgent__Extension, argument *qt.QVariant) *qt.QVariant { + _ret := C.QScriptEngineAgent_Extension(this.h, (C.int)(extension), (*C.QVariant)(argument.UnsafePointer())) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptEngineAgent) Engine() *QScriptEngine { + return UnsafeNewQScriptEngine(unsafe.Pointer(C.QScriptEngineAgent_Engine(this.h)), nil) +} + +func (this *QScriptEngineAgent) callVirtualBase_ScriptLoad(id int64, program string, fileName string, baseLineNumber int) { + program_ms := C.struct_miqt_string{} + program_ms.data = C.CString(program) + program_ms.len = C.size_t(len(program)) + defer C.free(unsafe.Pointer(program_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)) + + C.QScriptEngineAgent_virtualbase_ScriptLoad(unsafe.Pointer(this.h), (C.longlong)(id), program_ms, fileName_ms, (C.int)(baseLineNumber)) + +} +func (this *QScriptEngineAgent) OnScriptLoad(slot func(super func(id int64, program string, fileName string, baseLineNumber int), id int64, program string, fileName string, baseLineNumber int)) { + C.QScriptEngineAgent_override_virtual_ScriptLoad(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngineAgent_ScriptLoad +func miqt_exec_callback_QScriptEngineAgent_ScriptLoad(self *C.QScriptEngineAgent, cb C.intptr_t, id C.longlong, program C.struct_miqt_string, fileName C.struct_miqt_string, baseLineNumber C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(id int64, program string, fileName string, baseLineNumber int), id int64, program string, fileName string, baseLineNumber int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(id) + + var program_ms C.struct_miqt_string = program + program_ret := C.GoStringN(program_ms.data, C.int(int64(program_ms.len))) + C.free(unsafe.Pointer(program_ms.data)) + slotval2 := program_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)) + slotval3 := fileName_ret + slotval4 := (int)(baseLineNumber) + + gofunc((&QScriptEngineAgent{h: self}).callVirtualBase_ScriptLoad, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QScriptEngineAgent) callVirtualBase_ScriptUnload(id int64) { + + C.QScriptEngineAgent_virtualbase_ScriptUnload(unsafe.Pointer(this.h), (C.longlong)(id)) + +} +func (this *QScriptEngineAgent) OnScriptUnload(slot func(super func(id int64), id int64)) { + C.QScriptEngineAgent_override_virtual_ScriptUnload(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngineAgent_ScriptUnload +func miqt_exec_callback_QScriptEngineAgent_ScriptUnload(self *C.QScriptEngineAgent, cb C.intptr_t, id C.longlong) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(id int64), id int64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(id) + + gofunc((&QScriptEngineAgent{h: self}).callVirtualBase_ScriptUnload, slotval1) + +} + +func (this *QScriptEngineAgent) callVirtualBase_ContextPush() { + + C.QScriptEngineAgent_virtualbase_ContextPush(unsafe.Pointer(this.h)) + +} +func (this *QScriptEngineAgent) OnContextPush(slot func(super func())) { + C.QScriptEngineAgent_override_virtual_ContextPush(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngineAgent_ContextPush +func miqt_exec_callback_QScriptEngineAgent_ContextPush(self *C.QScriptEngineAgent, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QScriptEngineAgent{h: self}).callVirtualBase_ContextPush) + +} + +func (this *QScriptEngineAgent) callVirtualBase_ContextPop() { + + C.QScriptEngineAgent_virtualbase_ContextPop(unsafe.Pointer(this.h)) + +} +func (this *QScriptEngineAgent) OnContextPop(slot func(super func())) { + C.QScriptEngineAgent_override_virtual_ContextPop(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngineAgent_ContextPop +func miqt_exec_callback_QScriptEngineAgent_ContextPop(self *C.QScriptEngineAgent, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QScriptEngineAgent{h: self}).callVirtualBase_ContextPop) + +} + +func (this *QScriptEngineAgent) callVirtualBase_FunctionEntry(scriptId int64) { + + C.QScriptEngineAgent_virtualbase_FunctionEntry(unsafe.Pointer(this.h), (C.longlong)(scriptId)) + +} +func (this *QScriptEngineAgent) OnFunctionEntry(slot func(super func(scriptId int64), scriptId int64)) { + C.QScriptEngineAgent_override_virtual_FunctionEntry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngineAgent_FunctionEntry +func miqt_exec_callback_QScriptEngineAgent_FunctionEntry(self *C.QScriptEngineAgent, cb C.intptr_t, scriptId C.longlong) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(scriptId int64), scriptId int64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(scriptId) + + gofunc((&QScriptEngineAgent{h: self}).callVirtualBase_FunctionEntry, slotval1) + +} + +func (this *QScriptEngineAgent) callVirtualBase_FunctionExit(scriptId int64, returnValue *QScriptValue) { + + C.QScriptEngineAgent_virtualbase_FunctionExit(unsafe.Pointer(this.h), (C.longlong)(scriptId), returnValue.cPointer()) + +} +func (this *QScriptEngineAgent) OnFunctionExit(slot func(super func(scriptId int64, returnValue *QScriptValue), scriptId int64, returnValue *QScriptValue)) { + C.QScriptEngineAgent_override_virtual_FunctionExit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngineAgent_FunctionExit +func miqt_exec_callback_QScriptEngineAgent_FunctionExit(self *C.QScriptEngineAgent, cb C.intptr_t, scriptId C.longlong, returnValue *C.QScriptValue) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(scriptId int64, returnValue *QScriptValue), scriptId int64, returnValue *QScriptValue)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(scriptId) + + slotval2 := UnsafeNewQScriptValue(unsafe.Pointer(returnValue)) + + gofunc((&QScriptEngineAgent{h: self}).callVirtualBase_FunctionExit, slotval1, slotval2) + +} + +func (this *QScriptEngineAgent) callVirtualBase_PositionChange(scriptId int64, lineNumber int, columnNumber int) { + + C.QScriptEngineAgent_virtualbase_PositionChange(unsafe.Pointer(this.h), (C.longlong)(scriptId), (C.int)(lineNumber), (C.int)(columnNumber)) + +} +func (this *QScriptEngineAgent) OnPositionChange(slot func(super func(scriptId int64, lineNumber int, columnNumber int), scriptId int64, lineNumber int, columnNumber int)) { + C.QScriptEngineAgent_override_virtual_PositionChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngineAgent_PositionChange +func miqt_exec_callback_QScriptEngineAgent_PositionChange(self *C.QScriptEngineAgent, cb C.intptr_t, scriptId C.longlong, lineNumber C.int, columnNumber C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(scriptId int64, lineNumber int, columnNumber int), scriptId int64, lineNumber int, columnNumber int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(scriptId) + + slotval2 := (int)(lineNumber) + + slotval3 := (int)(columnNumber) + + gofunc((&QScriptEngineAgent{h: self}).callVirtualBase_PositionChange, slotval1, slotval2, slotval3) + +} + +func (this *QScriptEngineAgent) callVirtualBase_ExceptionThrow(scriptId int64, exception *QScriptValue, hasHandler bool) { + + C.QScriptEngineAgent_virtualbase_ExceptionThrow(unsafe.Pointer(this.h), (C.longlong)(scriptId), exception.cPointer(), (C.bool)(hasHandler)) + +} +func (this *QScriptEngineAgent) OnExceptionThrow(slot func(super func(scriptId int64, exception *QScriptValue, hasHandler bool), scriptId int64, exception *QScriptValue, hasHandler bool)) { + C.QScriptEngineAgent_override_virtual_ExceptionThrow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngineAgent_ExceptionThrow +func miqt_exec_callback_QScriptEngineAgent_ExceptionThrow(self *C.QScriptEngineAgent, cb C.intptr_t, scriptId C.longlong, exception *C.QScriptValue, hasHandler C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(scriptId int64, exception *QScriptValue, hasHandler bool), scriptId int64, exception *QScriptValue, hasHandler bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(scriptId) + + slotval2 := UnsafeNewQScriptValue(unsafe.Pointer(exception)) + slotval3 := (bool)(hasHandler) + + gofunc((&QScriptEngineAgent{h: self}).callVirtualBase_ExceptionThrow, slotval1, slotval2, slotval3) + +} + +func (this *QScriptEngineAgent) callVirtualBase_ExceptionCatch(scriptId int64, exception *QScriptValue) { + + C.QScriptEngineAgent_virtualbase_ExceptionCatch(unsafe.Pointer(this.h), (C.longlong)(scriptId), exception.cPointer()) + +} +func (this *QScriptEngineAgent) OnExceptionCatch(slot func(super func(scriptId int64, exception *QScriptValue), scriptId int64, exception *QScriptValue)) { + C.QScriptEngineAgent_override_virtual_ExceptionCatch(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngineAgent_ExceptionCatch +func miqt_exec_callback_QScriptEngineAgent_ExceptionCatch(self *C.QScriptEngineAgent, cb C.intptr_t, scriptId C.longlong, exception *C.QScriptValue) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(scriptId int64, exception *QScriptValue), scriptId int64, exception *QScriptValue)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int64)(scriptId) + + slotval2 := UnsafeNewQScriptValue(unsafe.Pointer(exception)) + + gofunc((&QScriptEngineAgent{h: self}).callVirtualBase_ExceptionCatch, slotval1, slotval2) + +} + +func (this *QScriptEngineAgent) callVirtualBase_SupportsExtension(extension QScriptEngineAgent__Extension) bool { + + return (bool)(C.QScriptEngineAgent_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QScriptEngineAgent) OnSupportsExtension(slot func(super func(extension QScriptEngineAgent__Extension) bool, extension QScriptEngineAgent__Extension) bool) { + C.QScriptEngineAgent_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngineAgent_SupportsExtension +func miqt_exec_callback_QScriptEngineAgent_SupportsExtension(self *C.QScriptEngineAgent, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QScriptEngineAgent__Extension) bool, extension QScriptEngineAgent__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QScriptEngineAgent__Extension)(extension) + + virtualReturn := gofunc((&QScriptEngineAgent{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QScriptEngineAgent) callVirtualBase_Extension(extension QScriptEngineAgent__Extension, argument *qt.QVariant) *qt.QVariant { + + _ret := C.QScriptEngineAgent_virtualbase_Extension(unsafe.Pointer(this.h), (C.int)(extension), (*C.QVariant)(argument.UnsafePointer())) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QScriptEngineAgent) OnExtension(slot func(super func(extension QScriptEngineAgent__Extension, argument *qt.QVariant) *qt.QVariant, extension QScriptEngineAgent__Extension, argument *qt.QVariant) *qt.QVariant) { + C.QScriptEngineAgent_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptEngineAgent_Extension +func miqt_exec_callback_QScriptEngineAgent_Extension(self *C.QScriptEngineAgent, cb C.intptr_t, extension C.int, argument *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QScriptEngineAgent__Extension, argument *qt.QVariant) *qt.QVariant, extension QScriptEngineAgent__Extension, argument *qt.QVariant) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QScriptEngineAgent__Extension)(extension) + + slotval2 := qt.UnsafeNewQVariant(unsafe.Pointer(argument)) + + virtualReturn := gofunc((&QScriptEngineAgent{h: self}).callVirtualBase_Extension, slotval1, slotval2) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +// Delete this object from C++ memory. +func (this *QScriptEngineAgent) Delete() { + C.QScriptEngineAgent_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 *QScriptEngineAgent) GoGC() { + runtime.SetFinalizer(this, func(this *QScriptEngineAgent) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/script/gen_qscriptengineagent.h b/qt/script/gen_qscriptengineagent.h new file mode 100644 index 00000000..610ddc7a --- /dev/null +++ b/qt/script/gen_qscriptengineagent.h @@ -0,0 +1,70 @@ +#pragma once +#ifndef MIQT_QT_SCRIPT_GEN_QSCRIPTENGINEAGENT_H +#define MIQT_QT_SCRIPT_GEN_QSCRIPTENGINEAGENT_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QScriptEngine; +class QScriptEngineAgent; +class QScriptValue; +class QVariant; +#else +typedef struct QScriptEngine QScriptEngine; +typedef struct QScriptEngineAgent QScriptEngineAgent; +typedef struct QScriptValue QScriptValue; +typedef struct QVariant QVariant; +#endif + +void QScriptEngineAgent_new(QScriptEngine* engine, QScriptEngineAgent** outptr_QScriptEngineAgent); +void QScriptEngineAgent_ScriptLoad(QScriptEngineAgent* self, long long id, struct miqt_string program, struct miqt_string fileName, int baseLineNumber); +void QScriptEngineAgent_ScriptUnload(QScriptEngineAgent* self, long long id); +void QScriptEngineAgent_ContextPush(QScriptEngineAgent* self); +void QScriptEngineAgent_ContextPop(QScriptEngineAgent* self); +void QScriptEngineAgent_FunctionEntry(QScriptEngineAgent* self, long long scriptId); +void QScriptEngineAgent_FunctionExit(QScriptEngineAgent* self, long long scriptId, QScriptValue* returnValue); +void QScriptEngineAgent_PositionChange(QScriptEngineAgent* self, long long scriptId, int lineNumber, int columnNumber); +void QScriptEngineAgent_ExceptionThrow(QScriptEngineAgent* self, long long scriptId, QScriptValue* exception, bool hasHandler); +void QScriptEngineAgent_ExceptionCatch(QScriptEngineAgent* self, long long scriptId, QScriptValue* exception); +bool QScriptEngineAgent_SupportsExtension(const QScriptEngineAgent* self, int extension); +QVariant* QScriptEngineAgent_Extension(QScriptEngineAgent* self, int extension, QVariant* argument); +QScriptEngine* QScriptEngineAgent_Engine(const QScriptEngineAgent* self); +void QScriptEngineAgent_override_virtual_ScriptLoad(void* self, intptr_t slot); +void QScriptEngineAgent_virtualbase_ScriptLoad(void* self, long long id, struct miqt_string program, struct miqt_string fileName, int baseLineNumber); +void QScriptEngineAgent_override_virtual_ScriptUnload(void* self, intptr_t slot); +void QScriptEngineAgent_virtualbase_ScriptUnload(void* self, long long id); +void QScriptEngineAgent_override_virtual_ContextPush(void* self, intptr_t slot); +void QScriptEngineAgent_virtualbase_ContextPush(void* self); +void QScriptEngineAgent_override_virtual_ContextPop(void* self, intptr_t slot); +void QScriptEngineAgent_virtualbase_ContextPop(void* self); +void QScriptEngineAgent_override_virtual_FunctionEntry(void* self, intptr_t slot); +void QScriptEngineAgent_virtualbase_FunctionEntry(void* self, long long scriptId); +void QScriptEngineAgent_override_virtual_FunctionExit(void* self, intptr_t slot); +void QScriptEngineAgent_virtualbase_FunctionExit(void* self, long long scriptId, QScriptValue* returnValue); +void QScriptEngineAgent_override_virtual_PositionChange(void* self, intptr_t slot); +void QScriptEngineAgent_virtualbase_PositionChange(void* self, long long scriptId, int lineNumber, int columnNumber); +void QScriptEngineAgent_override_virtual_ExceptionThrow(void* self, intptr_t slot); +void QScriptEngineAgent_virtualbase_ExceptionThrow(void* self, long long scriptId, QScriptValue* exception, bool hasHandler); +void QScriptEngineAgent_override_virtual_ExceptionCatch(void* self, intptr_t slot); +void QScriptEngineAgent_virtualbase_ExceptionCatch(void* self, long long scriptId, QScriptValue* exception); +void QScriptEngineAgent_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QScriptEngineAgent_virtualbase_SupportsExtension(const void* self, int extension); +void QScriptEngineAgent_override_virtual_Extension(void* self, intptr_t slot); +QVariant* QScriptEngineAgent_virtualbase_Extension(void* self, int extension, QVariant* argument); +void QScriptEngineAgent_Delete(QScriptEngineAgent* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/script/gen_qscriptextensioninterface.cpp b/qt/script/gen_qscriptextensioninterface.cpp new file mode 100644 index 00000000..3d32d485 --- /dev/null +++ b/qt/script/gen_qscriptextensioninterface.cpp @@ -0,0 +1,97 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qscriptextensioninterface.h" +#include "_cgo_export.h" + +class MiqtVirtualQScriptExtensionInterface : public virtual QScriptExtensionInterface { +public: + + MiqtVirtualQScriptExtensionInterface(const QScriptExtensionInterface& param1): QScriptExtensionInterface(param1) {}; + + virtual ~MiqtVirtualQScriptExtensionInterface() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Initialize = 0; + + // Subclass to allow providing a Go implementation + virtual void initialize(const QString& key, QScriptEngine* engine) override { + if (handle__Initialize == 0) { + return; // 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; + QScriptEngine* sigval2 = engine; + + miqt_exec_callback_QScriptExtensionInterface_Initialize(this, handle__Initialize, sigval1, sigval2); + + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keys = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList keys() const override { + if (handle__Keys == 0) { + return QStringList(); // Pure virtual, there is no base we can call + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QScriptExtensionInterface_Keys(const_cast(this), handle__Keys); + 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; + } + +}; + +void QScriptExtensionInterface_new(QScriptExtensionInterface* param1, QScriptExtensionInterface** outptr_QScriptExtensionInterface, QFactoryInterface** outptr_QFactoryInterface) { + MiqtVirtualQScriptExtensionInterface* ret = new MiqtVirtualQScriptExtensionInterface(*param1); + *outptr_QScriptExtensionInterface = ret; + *outptr_QFactoryInterface = static_cast(ret); +} + +void QScriptExtensionInterface_Initialize(QScriptExtensionInterface* self, struct miqt_string key, QScriptEngine* engine) { + QString key_QString = QString::fromUtf8(key.data, key.len); + self->initialize(key_QString, engine); +} + +void QScriptExtensionInterface_OperatorAssign(QScriptExtensionInterface* self, QScriptExtensionInterface* param1) { + self->operator=(*param1); +} + +void QScriptExtensionInterface_override_virtual_Initialize(void* self, intptr_t slot) { + dynamic_cast( (QScriptExtensionInterface*)(self) )->handle__Initialize = slot; +} + +void QScriptExtensionInterface_override_virtual_Keys(void* self, intptr_t slot) { + dynamic_cast( (QScriptExtensionInterface*)(self) )->handle__Keys = slot; +} + +void QScriptExtensionInterface_Delete(QScriptExtensionInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/script/gen_qscriptextensioninterface.go b/qt/script/gen_qscriptextensioninterface.go new file mode 100644 index 00000000..d8a36de9 --- /dev/null +++ b/qt/script/gen_qscriptextensioninterface.go @@ -0,0 +1,139 @@ +package script + +/* + +#include "gen_qscriptextensioninterface.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QScriptExtensionInterface struct { + h *C.QScriptExtensionInterface + isSubclass bool + *qt.QFactoryInterface +} + +func (this *QScriptExtensionInterface) cPointer() *C.QScriptExtensionInterface { + if this == nil { + return nil + } + return this.h +} + +func (this *QScriptExtensionInterface) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQScriptExtensionInterface constructs the type using only CGO pointers. +func newQScriptExtensionInterface(h *C.QScriptExtensionInterface, h_QFactoryInterface *C.QFactoryInterface) *QScriptExtensionInterface { + if h == nil { + return nil + } + return &QScriptExtensionInterface{h: h, + QFactoryInterface: qt.UnsafeNewQFactoryInterface(unsafe.Pointer(h_QFactoryInterface))} +} + +// UnsafeNewQScriptExtensionInterface constructs the type using only unsafe pointers. +func UnsafeNewQScriptExtensionInterface(h unsafe.Pointer, h_QFactoryInterface unsafe.Pointer) *QScriptExtensionInterface { + if h == nil { + return nil + } + + return &QScriptExtensionInterface{h: (*C.QScriptExtensionInterface)(h), + QFactoryInterface: qt.UnsafeNewQFactoryInterface(h_QFactoryInterface)} +} + +// NewQScriptExtensionInterface constructs a new QScriptExtensionInterface object. +func NewQScriptExtensionInterface(param1 *QScriptExtensionInterface) *QScriptExtensionInterface { + var outptr_QScriptExtensionInterface *C.QScriptExtensionInterface = nil + var outptr_QFactoryInterface *C.QFactoryInterface = nil + + C.QScriptExtensionInterface_new(param1.cPointer(), &outptr_QScriptExtensionInterface, &outptr_QFactoryInterface) + ret := newQScriptExtensionInterface(outptr_QScriptExtensionInterface, outptr_QFactoryInterface) + ret.isSubclass = true + return ret +} + +func (this *QScriptExtensionInterface) Initialize(key string, engine *QScriptEngine) { + key_ms := C.struct_miqt_string{} + key_ms.data = C.CString(key) + key_ms.len = C.size_t(len(key)) + defer C.free(unsafe.Pointer(key_ms.data)) + C.QScriptExtensionInterface_Initialize(this.h, key_ms, engine.cPointer()) +} + +func (this *QScriptExtensionInterface) OperatorAssign(param1 *QScriptExtensionInterface) { + C.QScriptExtensionInterface_OperatorAssign(this.h, param1.cPointer()) +} +func (this *QScriptExtensionInterface) OnInitialize(slot func(key string, engine *QScriptEngine)) { + C.QScriptExtensionInterface_override_virtual_Initialize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptExtensionInterface_Initialize +func miqt_exec_callback_QScriptExtensionInterface_Initialize(self *C.QScriptExtensionInterface, cb C.intptr_t, key C.struct_miqt_string, engine *C.QScriptEngine) { + gofunc, ok := cgo.Handle(cb).Value().(func(key string, engine *QScriptEngine)) + 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 := UnsafeNewQScriptEngine(unsafe.Pointer(engine), nil) + + gofunc(slotval1, slotval2) + +} +func (this *QScriptExtensionInterface) OnKeys(slot func() []string) { + C.QScriptExtensionInterface_override_virtual_Keys(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptExtensionInterface_Keys +func miqt_exec_callback_QScriptExtensionInterface_Keys(self *C.QScriptExtensionInterface, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func() []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + 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 + +} + +// Delete this object from C++ memory. +func (this *QScriptExtensionInterface) Delete() { + C.QScriptExtensionInterface_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 *QScriptExtensionInterface) GoGC() { + runtime.SetFinalizer(this, func(this *QScriptExtensionInterface) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/script/gen_qscriptextensioninterface.h b/qt/script/gen_qscriptextensioninterface.h new file mode 100644 index 00000000..f3551076 --- /dev/null +++ b/qt/script/gen_qscriptextensioninterface.h @@ -0,0 +1,40 @@ +#pragma once +#ifndef MIQT_QT_SCRIPT_GEN_QSCRIPTEXTENSIONINTERFACE_H +#define MIQT_QT_SCRIPT_GEN_QSCRIPTEXTENSIONINTERFACE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QFactoryInterface; +class QScriptEngine; +class QScriptExtensionInterface; +#else +typedef struct QFactoryInterface QFactoryInterface; +typedef struct QScriptEngine QScriptEngine; +typedef struct QScriptExtensionInterface QScriptExtensionInterface; +#endif + +void QScriptExtensionInterface_new(QScriptExtensionInterface* param1, QScriptExtensionInterface** outptr_QScriptExtensionInterface, QFactoryInterface** outptr_QFactoryInterface); +void QScriptExtensionInterface_Initialize(QScriptExtensionInterface* self, struct miqt_string key, QScriptEngine* engine); +void QScriptExtensionInterface_OperatorAssign(QScriptExtensionInterface* self, QScriptExtensionInterface* param1); +void QScriptExtensionInterface_override_virtual_Initialize(void* self, intptr_t slot); +void QScriptExtensionInterface_virtualbase_Initialize(void* self, struct miqt_string key, QScriptEngine* engine); +void QScriptExtensionInterface_override_virtual_Keys(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QScriptExtensionInterface_virtualbase_Keys(const void* self); +void QScriptExtensionInterface_Delete(QScriptExtensionInterface* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/script/gen_qscriptextensionplugin.cpp b/qt/script/gen_qscriptextensionplugin.cpp new file mode 100644 index 00000000..cd431fa6 --- /dev/null +++ b/qt/script/gen_qscriptextensionplugin.cpp @@ -0,0 +1,438 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qscriptextensionplugin.h" +#include "_cgo_export.h" + +class MiqtVirtualQScriptExtensionPlugin : public virtual QScriptExtensionPlugin { +public: + + MiqtVirtualQScriptExtensionPlugin(): QScriptExtensionPlugin() {}; + MiqtVirtualQScriptExtensionPlugin(QObject* parent): QScriptExtensionPlugin(parent) {}; + + virtual ~MiqtVirtualQScriptExtensionPlugin() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Keys = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList keys() const override { + if (handle__Keys == 0) { + return QStringList(); // Pure virtual, there is no base we can call + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QScriptExtensionPlugin_Keys(const_cast(this), handle__Keys); + 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__Initialize = 0; + + // Subclass to allow providing a Go implementation + virtual void initialize(const QString& key, QScriptEngine* engine) override { + if (handle__Initialize == 0) { + return; // 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; + QScriptEngine* sigval2 = engine; + + miqt_exec_callback_QScriptExtensionPlugin_Initialize(this, handle__Initialize, sigval1, sigval2); + + + } + + // 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 QScriptExtensionPlugin::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QScriptExtensionPlugin_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QScriptExtensionPlugin::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 QScriptExtensionPlugin::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QScriptExtensionPlugin_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QScriptExtensionPlugin::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) { + QScriptExtensionPlugin::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QScriptExtensionPlugin_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QScriptExtensionPlugin::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) { + QScriptExtensionPlugin::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QScriptExtensionPlugin_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QScriptExtensionPlugin::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) { + QScriptExtensionPlugin::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QScriptExtensionPlugin_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QScriptExtensionPlugin::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) { + QScriptExtensionPlugin::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QScriptExtensionPlugin_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QScriptExtensionPlugin::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) { + QScriptExtensionPlugin::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QScriptExtensionPlugin_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QScriptExtensionPlugin::disconnectNotify(*signal); + + } + +}; + +void QScriptExtensionPlugin_new(QScriptExtensionPlugin** outptr_QScriptExtensionPlugin, QObject** outptr_QObject, QScriptExtensionInterface** outptr_QScriptExtensionInterface, QFactoryInterface** outptr_QFactoryInterface) { + MiqtVirtualQScriptExtensionPlugin* ret = new MiqtVirtualQScriptExtensionPlugin(); + *outptr_QScriptExtensionPlugin = ret; + *outptr_QObject = static_cast(ret); + *outptr_QScriptExtensionInterface = static_cast(ret); + *outptr_QFactoryInterface = static_cast(ret); +} + +void QScriptExtensionPlugin_new2(QObject* parent, QScriptExtensionPlugin** outptr_QScriptExtensionPlugin, QObject** outptr_QObject, QScriptExtensionInterface** outptr_QScriptExtensionInterface, QFactoryInterface** outptr_QFactoryInterface) { + MiqtVirtualQScriptExtensionPlugin* ret = new MiqtVirtualQScriptExtensionPlugin(parent); + *outptr_QScriptExtensionPlugin = ret; + *outptr_QObject = static_cast(ret); + *outptr_QScriptExtensionInterface = static_cast(ret); + *outptr_QFactoryInterface = static_cast(ret); +} + +QMetaObject* QScriptExtensionPlugin_MetaObject(const QScriptExtensionPlugin* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QScriptExtensionPlugin_Metacast(QScriptExtensionPlugin* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QScriptExtensionPlugin_Tr(const char* s) { + QString _ret = QScriptExtensionPlugin::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QScriptExtensionPlugin_TrUtf8(const char* s) { + QString _ret = QScriptExtensionPlugin::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_array /* of struct miqt_string */ QScriptExtensionPlugin_Keys(const QScriptExtensionPlugin* self) { + QStringList _ret = self->keys(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QScriptExtensionPlugin_Initialize(QScriptExtensionPlugin* self, struct miqt_string key, QScriptEngine* engine) { + QString key_QString = QString::fromUtf8(key.data, key.len); + self->initialize(key_QString, engine); +} + +QScriptValue* QScriptExtensionPlugin_SetupPackage(const QScriptExtensionPlugin* self, struct miqt_string key, QScriptEngine* engine) { + QString key_QString = QString::fromUtf8(key.data, key.len); + return new QScriptValue(self->setupPackage(key_QString, engine)); +} + +struct miqt_string QScriptExtensionPlugin_Tr2(const char* s, const char* c) { + QString _ret = QScriptExtensionPlugin::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QScriptExtensionPlugin_Tr3(const char* s, const char* c, int n) { + QString _ret = QScriptExtensionPlugin::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QScriptExtensionPlugin_TrUtf82(const char* s, const char* c) { + QString _ret = QScriptExtensionPlugin::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QScriptExtensionPlugin_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QScriptExtensionPlugin::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QScriptExtensionPlugin_override_virtual_Keys(void* self, intptr_t slot) { + dynamic_cast( (QScriptExtensionPlugin*)(self) )->handle__Keys = slot; +} + +void QScriptExtensionPlugin_override_virtual_Initialize(void* self, intptr_t slot) { + dynamic_cast( (QScriptExtensionPlugin*)(self) )->handle__Initialize = slot; +} + +void QScriptExtensionPlugin_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QScriptExtensionPlugin*)(self) )->handle__Event = slot; +} + +bool QScriptExtensionPlugin_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQScriptExtensionPlugin*)(self) )->virtualbase_Event(event); +} + +void QScriptExtensionPlugin_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QScriptExtensionPlugin*)(self) )->handle__EventFilter = slot; +} + +bool QScriptExtensionPlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQScriptExtensionPlugin*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QScriptExtensionPlugin_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QScriptExtensionPlugin*)(self) )->handle__TimerEvent = slot; +} + +void QScriptExtensionPlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQScriptExtensionPlugin*)(self) )->virtualbase_TimerEvent(event); +} + +void QScriptExtensionPlugin_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QScriptExtensionPlugin*)(self) )->handle__ChildEvent = slot; +} + +void QScriptExtensionPlugin_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQScriptExtensionPlugin*)(self) )->virtualbase_ChildEvent(event); +} + +void QScriptExtensionPlugin_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QScriptExtensionPlugin*)(self) )->handle__CustomEvent = slot; +} + +void QScriptExtensionPlugin_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQScriptExtensionPlugin*)(self) )->virtualbase_CustomEvent(event); +} + +void QScriptExtensionPlugin_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QScriptExtensionPlugin*)(self) )->handle__ConnectNotify = slot; +} + +void QScriptExtensionPlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQScriptExtensionPlugin*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QScriptExtensionPlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QScriptExtensionPlugin*)(self) )->handle__DisconnectNotify = slot; +} + +void QScriptExtensionPlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQScriptExtensionPlugin*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QScriptExtensionPlugin_Delete(QScriptExtensionPlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/script/gen_qscriptextensionplugin.go b/qt/script/gen_qscriptextensionplugin.go new file mode 100644 index 00000000..380fd883 --- /dev/null +++ b/qt/script/gen_qscriptextensionplugin.go @@ -0,0 +1,415 @@ +package script + +/* + +#include "gen_qscriptextensionplugin.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QScriptExtensionPlugin struct { + h *C.QScriptExtensionPlugin + isSubclass bool + *qt.QObject + *QScriptExtensionInterface +} + +func (this *QScriptExtensionPlugin) cPointer() *C.QScriptExtensionPlugin { + if this == nil { + return nil + } + return this.h +} + +func (this *QScriptExtensionPlugin) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQScriptExtensionPlugin constructs the type using only CGO pointers. +func newQScriptExtensionPlugin(h *C.QScriptExtensionPlugin, h_QObject *C.QObject, h_QScriptExtensionInterface *C.QScriptExtensionInterface, h_QFactoryInterface *C.QFactoryInterface) *QScriptExtensionPlugin { + if h == nil { + return nil + } + return &QScriptExtensionPlugin{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject)), + QScriptExtensionInterface: newQScriptExtensionInterface(h_QScriptExtensionInterface, h_QFactoryInterface)} +} + +// UnsafeNewQScriptExtensionPlugin constructs the type using only unsafe pointers. +func UnsafeNewQScriptExtensionPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QScriptExtensionInterface unsafe.Pointer, h_QFactoryInterface unsafe.Pointer) *QScriptExtensionPlugin { + if h == nil { + return nil + } + + return &QScriptExtensionPlugin{h: (*C.QScriptExtensionPlugin)(h), + QObject: qt.UnsafeNewQObject(h_QObject), + QScriptExtensionInterface: UnsafeNewQScriptExtensionInterface(h_QScriptExtensionInterface, h_QFactoryInterface)} +} + +// NewQScriptExtensionPlugin constructs a new QScriptExtensionPlugin object. +func NewQScriptExtensionPlugin() *QScriptExtensionPlugin { + var outptr_QScriptExtensionPlugin *C.QScriptExtensionPlugin = nil + var outptr_QObject *C.QObject = nil + var outptr_QScriptExtensionInterface *C.QScriptExtensionInterface = nil + var outptr_QFactoryInterface *C.QFactoryInterface = nil + + C.QScriptExtensionPlugin_new(&outptr_QScriptExtensionPlugin, &outptr_QObject, &outptr_QScriptExtensionInterface, &outptr_QFactoryInterface) + ret := newQScriptExtensionPlugin(outptr_QScriptExtensionPlugin, outptr_QObject, outptr_QScriptExtensionInterface, outptr_QFactoryInterface) + ret.isSubclass = true + return ret +} + +// NewQScriptExtensionPlugin2 constructs a new QScriptExtensionPlugin object. +func NewQScriptExtensionPlugin2(parent *qt.QObject) *QScriptExtensionPlugin { + var outptr_QScriptExtensionPlugin *C.QScriptExtensionPlugin = nil + var outptr_QObject *C.QObject = nil + var outptr_QScriptExtensionInterface *C.QScriptExtensionInterface = nil + var outptr_QFactoryInterface *C.QFactoryInterface = nil + + C.QScriptExtensionPlugin_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QScriptExtensionPlugin, &outptr_QObject, &outptr_QScriptExtensionInterface, &outptr_QFactoryInterface) + ret := newQScriptExtensionPlugin(outptr_QScriptExtensionPlugin, outptr_QObject, outptr_QScriptExtensionInterface, outptr_QFactoryInterface) + ret.isSubclass = true + return ret +} + +func (this *QScriptExtensionPlugin) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QScriptExtensionPlugin_MetaObject(this.h))) +} + +func (this *QScriptExtensionPlugin) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QScriptExtensionPlugin_Metacast(this.h, param1_Cstring)) +} + +func QScriptExtensionPlugin_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QScriptExtensionPlugin_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QScriptExtensionPlugin_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QScriptExtensionPlugin_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QScriptExtensionPlugin) Keys() []string { + var _ma C.struct_miqt_array = C.QScriptExtensionPlugin_Keys(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 *QScriptExtensionPlugin) Initialize(key string, engine *QScriptEngine) { + key_ms := C.struct_miqt_string{} + key_ms.data = C.CString(key) + key_ms.len = C.size_t(len(key)) + defer C.free(unsafe.Pointer(key_ms.data)) + C.QScriptExtensionPlugin_Initialize(this.h, key_ms, engine.cPointer()) +} + +func (this *QScriptExtensionPlugin) SetupPackage(key string, engine *QScriptEngine) *QScriptValue { + key_ms := C.struct_miqt_string{} + key_ms.data = C.CString(key) + key_ms.len = C.size_t(len(key)) + defer C.free(unsafe.Pointer(key_ms.data)) + _ret := C.QScriptExtensionPlugin_SetupPackage(this.h, key_ms, engine.cPointer()) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func QScriptExtensionPlugin_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QScriptExtensionPlugin_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QScriptExtensionPlugin_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QScriptExtensionPlugin_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QScriptExtensionPlugin_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QScriptExtensionPlugin_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QScriptExtensionPlugin_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QScriptExtensionPlugin_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QScriptExtensionPlugin) OnKeys(slot func() []string) { + C.QScriptExtensionPlugin_override_virtual_Keys(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptExtensionPlugin_Keys +func miqt_exec_callback_QScriptExtensionPlugin_Keys(self *C.QScriptExtensionPlugin, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func() []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + 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 *QScriptExtensionPlugin) OnInitialize(slot func(key string, engine *QScriptEngine)) { + C.QScriptExtensionPlugin_override_virtual_Initialize(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptExtensionPlugin_Initialize +func miqt_exec_callback_QScriptExtensionPlugin_Initialize(self *C.QScriptExtensionPlugin, cb C.intptr_t, key C.struct_miqt_string, engine *C.QScriptEngine) { + gofunc, ok := cgo.Handle(cb).Value().(func(key string, engine *QScriptEngine)) + 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 := UnsafeNewQScriptEngine(unsafe.Pointer(engine), nil) + + gofunc(slotval1, slotval2) + +} + +func (this *QScriptExtensionPlugin) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QScriptExtensionPlugin_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QScriptExtensionPlugin) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QScriptExtensionPlugin_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptExtensionPlugin_Event +func miqt_exec_callback_QScriptExtensionPlugin_Event(self *C.QScriptExtensionPlugin, 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((&QScriptExtensionPlugin{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QScriptExtensionPlugin) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QScriptExtensionPlugin_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QScriptExtensionPlugin) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QScriptExtensionPlugin_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptExtensionPlugin_EventFilter +func miqt_exec_callback_QScriptExtensionPlugin_EventFilter(self *C.QScriptExtensionPlugin, 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((&QScriptExtensionPlugin{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QScriptExtensionPlugin) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QScriptExtensionPlugin_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QScriptExtensionPlugin) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QScriptExtensionPlugin_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptExtensionPlugin_TimerEvent +func miqt_exec_callback_QScriptExtensionPlugin_TimerEvent(self *C.QScriptExtensionPlugin, 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((&QScriptExtensionPlugin{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QScriptExtensionPlugin) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QScriptExtensionPlugin_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QScriptExtensionPlugin) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QScriptExtensionPlugin_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptExtensionPlugin_ChildEvent +func miqt_exec_callback_QScriptExtensionPlugin_ChildEvent(self *C.QScriptExtensionPlugin, 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((&QScriptExtensionPlugin{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QScriptExtensionPlugin) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QScriptExtensionPlugin_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QScriptExtensionPlugin) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QScriptExtensionPlugin_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptExtensionPlugin_CustomEvent +func miqt_exec_callback_QScriptExtensionPlugin_CustomEvent(self *C.QScriptExtensionPlugin, 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((&QScriptExtensionPlugin{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QScriptExtensionPlugin) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QScriptExtensionPlugin_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QScriptExtensionPlugin) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QScriptExtensionPlugin_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptExtensionPlugin_ConnectNotify +func miqt_exec_callback_QScriptExtensionPlugin_ConnectNotify(self *C.QScriptExtensionPlugin, 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((&QScriptExtensionPlugin{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QScriptExtensionPlugin) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QScriptExtensionPlugin_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QScriptExtensionPlugin) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QScriptExtensionPlugin_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QScriptExtensionPlugin_DisconnectNotify +func miqt_exec_callback_QScriptExtensionPlugin_DisconnectNotify(self *C.QScriptExtensionPlugin, 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((&QScriptExtensionPlugin{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QScriptExtensionPlugin) Delete() { + C.QScriptExtensionPlugin_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 *QScriptExtensionPlugin) GoGC() { + runtime.SetFinalizer(this, func(this *QScriptExtensionPlugin) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/script/gen_qscriptextensionplugin.h b/qt/script/gen_qscriptextensionplugin.h new file mode 100644 index 00000000..500f77b5 --- /dev/null +++ b/qt/script/gen_qscriptextensionplugin.h @@ -0,0 +1,80 @@ +#pragma once +#ifndef MIQT_QT_SCRIPT_GEN_QSCRIPTEXTENSIONPLUGIN_H +#define MIQT_QT_SCRIPT_GEN_QSCRIPTEXTENSIONPLUGIN_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QFactoryInterface; +class QMetaMethod; +class QMetaObject; +class QObject; +class QScriptEngine; +class QScriptExtensionInterface; +class QScriptExtensionPlugin; +class QScriptValue; +class QTimerEvent; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QFactoryInterface QFactoryInterface; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QScriptEngine QScriptEngine; +typedef struct QScriptExtensionInterface QScriptExtensionInterface; +typedef struct QScriptExtensionPlugin QScriptExtensionPlugin; +typedef struct QScriptValue QScriptValue; +typedef struct QTimerEvent QTimerEvent; +#endif + +void QScriptExtensionPlugin_new(QScriptExtensionPlugin** outptr_QScriptExtensionPlugin, QObject** outptr_QObject, QScriptExtensionInterface** outptr_QScriptExtensionInterface, QFactoryInterface** outptr_QFactoryInterface); +void QScriptExtensionPlugin_new2(QObject* parent, QScriptExtensionPlugin** outptr_QScriptExtensionPlugin, QObject** outptr_QObject, QScriptExtensionInterface** outptr_QScriptExtensionInterface, QFactoryInterface** outptr_QFactoryInterface); +QMetaObject* QScriptExtensionPlugin_MetaObject(const QScriptExtensionPlugin* self); +void* QScriptExtensionPlugin_Metacast(QScriptExtensionPlugin* self, const char* param1); +struct miqt_string QScriptExtensionPlugin_Tr(const char* s); +struct miqt_string QScriptExtensionPlugin_TrUtf8(const char* s); +struct miqt_array /* of struct miqt_string */ QScriptExtensionPlugin_Keys(const QScriptExtensionPlugin* self); +void QScriptExtensionPlugin_Initialize(QScriptExtensionPlugin* self, struct miqt_string key, QScriptEngine* engine); +QScriptValue* QScriptExtensionPlugin_SetupPackage(const QScriptExtensionPlugin* self, struct miqt_string key, QScriptEngine* engine); +struct miqt_string QScriptExtensionPlugin_Tr2(const char* s, const char* c); +struct miqt_string QScriptExtensionPlugin_Tr3(const char* s, const char* c, int n); +struct miqt_string QScriptExtensionPlugin_TrUtf82(const char* s, const char* c); +struct miqt_string QScriptExtensionPlugin_TrUtf83(const char* s, const char* c, int n); +void QScriptExtensionPlugin_override_virtual_Keys(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QScriptExtensionPlugin_virtualbase_Keys(const void* self); +void QScriptExtensionPlugin_override_virtual_Initialize(void* self, intptr_t slot); +void QScriptExtensionPlugin_virtualbase_Initialize(void* self, struct miqt_string key, QScriptEngine* engine); +void QScriptExtensionPlugin_override_virtual_Event(void* self, intptr_t slot); +bool QScriptExtensionPlugin_virtualbase_Event(void* self, QEvent* event); +void QScriptExtensionPlugin_override_virtual_EventFilter(void* self, intptr_t slot); +bool QScriptExtensionPlugin_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QScriptExtensionPlugin_override_virtual_TimerEvent(void* self, intptr_t slot); +void QScriptExtensionPlugin_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QScriptExtensionPlugin_override_virtual_ChildEvent(void* self, intptr_t slot); +void QScriptExtensionPlugin_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QScriptExtensionPlugin_override_virtual_CustomEvent(void* self, intptr_t slot); +void QScriptExtensionPlugin_virtualbase_CustomEvent(void* self, QEvent* event); +void QScriptExtensionPlugin_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QScriptExtensionPlugin_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QScriptExtensionPlugin_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QScriptExtensionPlugin_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QScriptExtensionPlugin_Delete(QScriptExtensionPlugin* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/script/gen_qscriptprogram.cpp b/qt/script/gen_qscriptprogram.cpp new file mode 100644 index 00000000..1d536031 --- /dev/null +++ b/qt/script/gen_qscriptprogram.cpp @@ -0,0 +1,88 @@ +#include +#include +#include +#include +#include +#include "gen_qscriptprogram.h" +#include "_cgo_export.h" + +void QScriptProgram_new(QScriptProgram** outptr_QScriptProgram) { + QScriptProgram* ret = new QScriptProgram(); + *outptr_QScriptProgram = ret; +} + +void QScriptProgram_new2(struct miqt_string sourceCode, QScriptProgram** outptr_QScriptProgram) { + QString sourceCode_QString = QString::fromUtf8(sourceCode.data, sourceCode.len); + QScriptProgram* ret = new QScriptProgram(sourceCode_QString); + *outptr_QScriptProgram = ret; +} + +void QScriptProgram_new3(QScriptProgram* other, QScriptProgram** outptr_QScriptProgram) { + QScriptProgram* ret = new QScriptProgram(*other); + *outptr_QScriptProgram = ret; +} + +void QScriptProgram_new4(struct miqt_string sourceCode, struct miqt_string fileName, QScriptProgram** outptr_QScriptProgram) { + QString sourceCode_QString = QString::fromUtf8(sourceCode.data, sourceCode.len); + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + QScriptProgram* ret = new QScriptProgram(sourceCode_QString, fileName_QString); + *outptr_QScriptProgram = ret; +} + +void QScriptProgram_new5(struct miqt_string sourceCode, struct miqt_string fileName, int firstLineNumber, QScriptProgram** outptr_QScriptProgram) { + QString sourceCode_QString = QString::fromUtf8(sourceCode.data, sourceCode.len); + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + QScriptProgram* ret = new QScriptProgram(sourceCode_QString, fileName_QString, static_cast(firstLineNumber)); + *outptr_QScriptProgram = ret; +} + +void QScriptProgram_OperatorAssign(QScriptProgram* self, QScriptProgram* other) { + self->operator=(*other); +} + +bool QScriptProgram_IsNull(const QScriptProgram* self) { + return self->isNull(); +} + +struct miqt_string QScriptProgram_SourceCode(const QScriptProgram* self) { + QString _ret = self->sourceCode(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QScriptProgram_FileName(const QScriptProgram* self) { + QString _ret = self->fileName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QScriptProgram_FirstLineNumber(const QScriptProgram* self) { + return self->firstLineNumber(); +} + +bool QScriptProgram_OperatorEqual(const QScriptProgram* self, QScriptProgram* other) { + return (*self == *other); +} + +bool QScriptProgram_OperatorNotEqual(const QScriptProgram* self, QScriptProgram* other) { + return (*self != *other); +} + +void QScriptProgram_Delete(QScriptProgram* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/script/gen_qscriptprogram.go b/qt/script/gen_qscriptprogram.go new file mode 100644 index 00000000..f6ea3e57 --- /dev/null +++ b/qt/script/gen_qscriptprogram.go @@ -0,0 +1,168 @@ +package script + +/* + +#include "gen_qscriptprogram.h" +#include + +*/ +import "C" + +import ( + "runtime" + "unsafe" +) + +type QScriptProgram struct { + h *C.QScriptProgram + isSubclass bool +} + +func (this *QScriptProgram) cPointer() *C.QScriptProgram { + if this == nil { + return nil + } + return this.h +} + +func (this *QScriptProgram) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQScriptProgram constructs the type using only CGO pointers. +func newQScriptProgram(h *C.QScriptProgram) *QScriptProgram { + if h == nil { + return nil + } + return &QScriptProgram{h: h} +} + +// UnsafeNewQScriptProgram constructs the type using only unsafe pointers. +func UnsafeNewQScriptProgram(h unsafe.Pointer) *QScriptProgram { + if h == nil { + return nil + } + + return &QScriptProgram{h: (*C.QScriptProgram)(h)} +} + +// NewQScriptProgram constructs a new QScriptProgram object. +func NewQScriptProgram() *QScriptProgram { + var outptr_QScriptProgram *C.QScriptProgram = nil + + C.QScriptProgram_new(&outptr_QScriptProgram) + ret := newQScriptProgram(outptr_QScriptProgram) + ret.isSubclass = true + return ret +} + +// NewQScriptProgram2 constructs a new QScriptProgram object. +func NewQScriptProgram2(sourceCode string) *QScriptProgram { + sourceCode_ms := C.struct_miqt_string{} + sourceCode_ms.data = C.CString(sourceCode) + sourceCode_ms.len = C.size_t(len(sourceCode)) + defer C.free(unsafe.Pointer(sourceCode_ms.data)) + var outptr_QScriptProgram *C.QScriptProgram = nil + + C.QScriptProgram_new2(sourceCode_ms, &outptr_QScriptProgram) + ret := newQScriptProgram(outptr_QScriptProgram) + ret.isSubclass = true + return ret +} + +// NewQScriptProgram3 constructs a new QScriptProgram object. +func NewQScriptProgram3(other *QScriptProgram) *QScriptProgram { + var outptr_QScriptProgram *C.QScriptProgram = nil + + C.QScriptProgram_new3(other.cPointer(), &outptr_QScriptProgram) + ret := newQScriptProgram(outptr_QScriptProgram) + ret.isSubclass = true + return ret +} + +// NewQScriptProgram4 constructs a new QScriptProgram object. +func NewQScriptProgram4(sourceCode string, fileName string) *QScriptProgram { + sourceCode_ms := C.struct_miqt_string{} + sourceCode_ms.data = C.CString(sourceCode) + sourceCode_ms.len = C.size_t(len(sourceCode)) + defer C.free(unsafe.Pointer(sourceCode_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)) + var outptr_QScriptProgram *C.QScriptProgram = nil + + C.QScriptProgram_new4(sourceCode_ms, fileName_ms, &outptr_QScriptProgram) + ret := newQScriptProgram(outptr_QScriptProgram) + ret.isSubclass = true + return ret +} + +// NewQScriptProgram5 constructs a new QScriptProgram object. +func NewQScriptProgram5(sourceCode string, fileName string, firstLineNumber int) *QScriptProgram { + sourceCode_ms := C.struct_miqt_string{} + sourceCode_ms.data = C.CString(sourceCode) + sourceCode_ms.len = C.size_t(len(sourceCode)) + defer C.free(unsafe.Pointer(sourceCode_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)) + var outptr_QScriptProgram *C.QScriptProgram = nil + + C.QScriptProgram_new5(sourceCode_ms, fileName_ms, (C.int)(firstLineNumber), &outptr_QScriptProgram) + ret := newQScriptProgram(outptr_QScriptProgram) + ret.isSubclass = true + return ret +} + +func (this *QScriptProgram) OperatorAssign(other *QScriptProgram) { + C.QScriptProgram_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QScriptProgram) IsNull() bool { + return (bool)(C.QScriptProgram_IsNull(this.h)) +} + +func (this *QScriptProgram) SourceCode() string { + var _ms C.struct_miqt_string = C.QScriptProgram_SourceCode(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QScriptProgram) FileName() string { + var _ms C.struct_miqt_string = C.QScriptProgram_FileName(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QScriptProgram) FirstLineNumber() int { + return (int)(C.QScriptProgram_FirstLineNumber(this.h)) +} + +func (this *QScriptProgram) OperatorEqual(other *QScriptProgram) bool { + return (bool)(C.QScriptProgram_OperatorEqual(this.h, other.cPointer())) +} + +func (this *QScriptProgram) OperatorNotEqual(other *QScriptProgram) bool { + return (bool)(C.QScriptProgram_OperatorNotEqual(this.h, other.cPointer())) +} + +// Delete this object from C++ memory. +func (this *QScriptProgram) Delete() { + C.QScriptProgram_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 *QScriptProgram) GoGC() { + runtime.SetFinalizer(this, func(this *QScriptProgram) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/script/gen_qscriptprogram.h b/qt/script/gen_qscriptprogram.h new file mode 100644 index 00000000..4055023e --- /dev/null +++ b/qt/script/gen_qscriptprogram.h @@ -0,0 +1,41 @@ +#pragma once +#ifndef MIQT_QT_SCRIPT_GEN_QSCRIPTPROGRAM_H +#define MIQT_QT_SCRIPT_GEN_QSCRIPTPROGRAM_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QScriptProgram; +#else +typedef struct QScriptProgram QScriptProgram; +#endif + +void QScriptProgram_new(QScriptProgram** outptr_QScriptProgram); +void QScriptProgram_new2(struct miqt_string sourceCode, QScriptProgram** outptr_QScriptProgram); +void QScriptProgram_new3(QScriptProgram* other, QScriptProgram** outptr_QScriptProgram); +void QScriptProgram_new4(struct miqt_string sourceCode, struct miqt_string fileName, QScriptProgram** outptr_QScriptProgram); +void QScriptProgram_new5(struct miqt_string sourceCode, struct miqt_string fileName, int firstLineNumber, QScriptProgram** outptr_QScriptProgram); +void QScriptProgram_OperatorAssign(QScriptProgram* self, QScriptProgram* other); +bool QScriptProgram_IsNull(const QScriptProgram* self); +struct miqt_string QScriptProgram_SourceCode(const QScriptProgram* self); +struct miqt_string QScriptProgram_FileName(const QScriptProgram* self); +int QScriptProgram_FirstLineNumber(const QScriptProgram* self); +bool QScriptProgram_OperatorEqual(const QScriptProgram* self, QScriptProgram* other); +bool QScriptProgram_OperatorNotEqual(const QScriptProgram* self, QScriptProgram* other); +void QScriptProgram_Delete(QScriptProgram* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/script/gen_qscriptstring.cpp b/qt/script/gen_qscriptstring.cpp new file mode 100644 index 00000000..2fa7d0dc --- /dev/null +++ b/qt/script/gen_qscriptstring.cpp @@ -0,0 +1,63 @@ +#include +#include +#include +#include +#include +#include "gen_qscriptstring.h" +#include "_cgo_export.h" + +void QScriptString_new(QScriptString** outptr_QScriptString) { + QScriptString* ret = new QScriptString(); + *outptr_QScriptString = ret; +} + +void QScriptString_new2(QScriptString* other, QScriptString** outptr_QScriptString) { + QScriptString* ret = new QScriptString(*other); + *outptr_QScriptString = ret; +} + +void QScriptString_OperatorAssign(QScriptString* self, QScriptString* other) { + self->operator=(*other); +} + +bool QScriptString_IsValid(const QScriptString* self) { + return self->isValid(); +} + +bool QScriptString_OperatorEqual(const QScriptString* self, QScriptString* other) { + return (*self == *other); +} + +bool QScriptString_OperatorNotEqual(const QScriptString* self, QScriptString* other) { + return (*self != *other); +} + +unsigned int QScriptString_ToArrayIndex(const QScriptString* self) { + quint32 _ret = self->toArrayIndex(); + return static_cast(_ret); +} + +struct miqt_string QScriptString_ToString(const QScriptString* self) { + QString _ret = self->toString(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +unsigned int QScriptString_ToArrayIndex1(const QScriptString* self, bool* ok) { + quint32 _ret = self->toArrayIndex(ok); + return static_cast(_ret); +} + +void QScriptString_Delete(QScriptString* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/script/gen_qscriptstring.go b/qt/script/gen_qscriptstring.go new file mode 100644 index 00000000..1c6c02c3 --- /dev/null +++ b/qt/script/gen_qscriptstring.go @@ -0,0 +1,115 @@ +package script + +/* + +#include "gen_qscriptstring.h" +#include + +*/ +import "C" + +import ( + "runtime" + "unsafe" +) + +type QScriptString struct { + h *C.QScriptString + isSubclass bool +} + +func (this *QScriptString) cPointer() *C.QScriptString { + if this == nil { + return nil + } + return this.h +} + +func (this *QScriptString) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQScriptString constructs the type using only CGO pointers. +func newQScriptString(h *C.QScriptString) *QScriptString { + if h == nil { + return nil + } + return &QScriptString{h: h} +} + +// UnsafeNewQScriptString constructs the type using only unsafe pointers. +func UnsafeNewQScriptString(h unsafe.Pointer) *QScriptString { + if h == nil { + return nil + } + + return &QScriptString{h: (*C.QScriptString)(h)} +} + +// NewQScriptString constructs a new QScriptString object. +func NewQScriptString() *QScriptString { + var outptr_QScriptString *C.QScriptString = nil + + C.QScriptString_new(&outptr_QScriptString) + ret := newQScriptString(outptr_QScriptString) + ret.isSubclass = true + return ret +} + +// NewQScriptString2 constructs a new QScriptString object. +func NewQScriptString2(other *QScriptString) *QScriptString { + var outptr_QScriptString *C.QScriptString = nil + + C.QScriptString_new2(other.cPointer(), &outptr_QScriptString) + ret := newQScriptString(outptr_QScriptString) + ret.isSubclass = true + return ret +} + +func (this *QScriptString) OperatorAssign(other *QScriptString) { + C.QScriptString_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QScriptString) IsValid() bool { + return (bool)(C.QScriptString_IsValid(this.h)) +} + +func (this *QScriptString) OperatorEqual(other *QScriptString) bool { + return (bool)(C.QScriptString_OperatorEqual(this.h, other.cPointer())) +} + +func (this *QScriptString) OperatorNotEqual(other *QScriptString) bool { + return (bool)(C.QScriptString_OperatorNotEqual(this.h, other.cPointer())) +} + +func (this *QScriptString) ToArrayIndex() uint { + return (uint)(C.QScriptString_ToArrayIndex(this.h)) +} + +func (this *QScriptString) ToString() string { + var _ms C.struct_miqt_string = C.QScriptString_ToString(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QScriptString) ToArrayIndex1(ok *bool) uint { + return (uint)(C.QScriptString_ToArrayIndex1(this.h, (*C.bool)(unsafe.Pointer(ok)))) +} + +// Delete this object from C++ memory. +func (this *QScriptString) Delete() { + C.QScriptString_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 *QScriptString) GoGC() { + runtime.SetFinalizer(this, func(this *QScriptString) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/script/gen_qscriptstring.h b/qt/script/gen_qscriptstring.h new file mode 100644 index 00000000..e8ed8a77 --- /dev/null +++ b/qt/script/gen_qscriptstring.h @@ -0,0 +1,38 @@ +#pragma once +#ifndef MIQT_QT_SCRIPT_GEN_QSCRIPTSTRING_H +#define MIQT_QT_SCRIPT_GEN_QSCRIPTSTRING_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QScriptString; +#else +typedef struct QScriptString QScriptString; +#endif + +void QScriptString_new(QScriptString** outptr_QScriptString); +void QScriptString_new2(QScriptString* other, QScriptString** outptr_QScriptString); +void QScriptString_OperatorAssign(QScriptString* self, QScriptString* other); +bool QScriptString_IsValid(const QScriptString* self); +bool QScriptString_OperatorEqual(const QScriptString* self, QScriptString* other); +bool QScriptString_OperatorNotEqual(const QScriptString* self, QScriptString* other); +unsigned int QScriptString_ToArrayIndex(const QScriptString* self); +struct miqt_string QScriptString_ToString(const QScriptString* self); +unsigned int QScriptString_ToArrayIndex1(const QScriptString* self, bool* ok); +void QScriptString_Delete(QScriptString* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/script/gen_qscriptvalue.cpp b/qt/script/gen_qscriptvalue.cpp new file mode 100644 index 00000000..935cc06c --- /dev/null +++ b/qt/script/gen_qscriptvalue.cpp @@ -0,0 +1,414 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qscriptvalue.h" +#include "_cgo_export.h" + +void QScriptValue_new(QScriptValue** outptr_QScriptValue) { + QScriptValue* ret = new QScriptValue(); + *outptr_QScriptValue = ret; +} + +void QScriptValue_new2(QScriptValue* other, QScriptValue** outptr_QScriptValue) { + QScriptValue* ret = new QScriptValue(*other); + *outptr_QScriptValue = ret; +} + +void QScriptValue_new3(QScriptEngine* engine, int val, QScriptValue** outptr_QScriptValue) { + QScriptValue* ret = new QScriptValue(engine, static_cast(val)); + *outptr_QScriptValue = ret; +} + +void QScriptValue_new4(QScriptEngine* engine, bool val, QScriptValue** outptr_QScriptValue) { + QScriptValue* ret = new QScriptValue(engine, val); + *outptr_QScriptValue = ret; +} + +void QScriptValue_new5(QScriptEngine* engine, int val, QScriptValue** outptr_QScriptValue) { + QScriptValue* ret = new QScriptValue(engine, static_cast(val)); + *outptr_QScriptValue = ret; +} + +void QScriptValue_new6(QScriptEngine* engine, unsigned int val, QScriptValue** outptr_QScriptValue) { + QScriptValue* ret = new QScriptValue(engine, static_cast(val)); + *outptr_QScriptValue = ret; +} + +void QScriptValue_new7(QScriptEngine* engine, double val, QScriptValue** outptr_QScriptValue) { + QScriptValue* ret = new QScriptValue(engine, static_cast(val)); + *outptr_QScriptValue = ret; +} + +void QScriptValue_new8(QScriptEngine* engine, struct miqt_string val, QScriptValue** outptr_QScriptValue) { + QString val_QString = QString::fromUtf8(val.data, val.len); + QScriptValue* ret = new QScriptValue(engine, val_QString); + *outptr_QScriptValue = ret; +} + +void QScriptValue_new9(QScriptEngine* engine, const char* val, QScriptValue** outptr_QScriptValue) { + QScriptValue* ret = new QScriptValue(engine, val); + *outptr_QScriptValue = ret; +} + +void QScriptValue_new10(int value, QScriptValue** outptr_QScriptValue) { + QScriptValue* ret = new QScriptValue(static_cast(value)); + *outptr_QScriptValue = ret; +} + +void QScriptValue_new11(bool value, QScriptValue** outptr_QScriptValue) { + QScriptValue* ret = new QScriptValue(value); + *outptr_QScriptValue = ret; +} + +void QScriptValue_new12(int value, QScriptValue** outptr_QScriptValue) { + QScriptValue* ret = new QScriptValue(static_cast(value)); + *outptr_QScriptValue = ret; +} + +void QScriptValue_new13(unsigned int value, QScriptValue** outptr_QScriptValue) { + QScriptValue* ret = new QScriptValue(static_cast(value)); + *outptr_QScriptValue = ret; +} + +void QScriptValue_new14(double value, QScriptValue** outptr_QScriptValue) { + QScriptValue* ret = new QScriptValue(static_cast(value)); + *outptr_QScriptValue = ret; +} + +void QScriptValue_new15(struct miqt_string value, QScriptValue** outptr_QScriptValue) { + QString value_QString = QString::fromUtf8(value.data, value.len); + QScriptValue* ret = new QScriptValue(value_QString); + *outptr_QScriptValue = ret; +} + +void QScriptValue_new16(const char* value, QScriptValue** outptr_QScriptValue) { + QScriptValue* ret = new QScriptValue(value); + *outptr_QScriptValue = ret; +} + +void QScriptValue_OperatorAssign(QScriptValue* self, QScriptValue* other) { + self->operator=(*other); +} + +QScriptEngine* QScriptValue_Engine(const QScriptValue* self) { + return self->engine(); +} + +bool QScriptValue_IsValid(const QScriptValue* self) { + return self->isValid(); +} + +bool QScriptValue_IsBool(const QScriptValue* self) { + return self->isBool(); +} + +bool QScriptValue_IsBoolean(const QScriptValue* self) { + return self->isBoolean(); +} + +bool QScriptValue_IsNumber(const QScriptValue* self) { + return self->isNumber(); +} + +bool QScriptValue_IsFunction(const QScriptValue* self) { + return self->isFunction(); +} + +bool QScriptValue_IsNull(const QScriptValue* self) { + return self->isNull(); +} + +bool QScriptValue_IsString(const QScriptValue* self) { + return self->isString(); +} + +bool QScriptValue_IsUndefined(const QScriptValue* self) { + return self->isUndefined(); +} + +bool QScriptValue_IsVariant(const QScriptValue* self) { + return self->isVariant(); +} + +bool QScriptValue_IsQObject(const QScriptValue* self) { + return self->isQObject(); +} + +bool QScriptValue_IsQMetaObject(const QScriptValue* self) { + return self->isQMetaObject(); +} + +bool QScriptValue_IsObject(const QScriptValue* self) { + return self->isObject(); +} + +bool QScriptValue_IsDate(const QScriptValue* self) { + return self->isDate(); +} + +bool QScriptValue_IsRegExp(const QScriptValue* self) { + return self->isRegExp(); +} + +bool QScriptValue_IsArray(const QScriptValue* self) { + return self->isArray(); +} + +bool QScriptValue_IsError(const QScriptValue* self) { + return self->isError(); +} + +struct miqt_string QScriptValue_ToString(const QScriptValue* self) { + QString _ret = self->toString(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +double QScriptValue_ToNumber(const QScriptValue* self) { + qsreal _ret = self->toNumber(); + return static_cast(_ret); +} + +bool QScriptValue_ToBool(const QScriptValue* self) { + return self->toBool(); +} + +bool QScriptValue_ToBoolean(const QScriptValue* self) { + return self->toBoolean(); +} + +double QScriptValue_ToInteger(const QScriptValue* self) { + qsreal _ret = self->toInteger(); + return static_cast(_ret); +} + +int QScriptValue_ToInt32(const QScriptValue* self) { + qint32 _ret = self->toInt32(); + return static_cast(_ret); +} + +unsigned int QScriptValue_ToUInt32(const QScriptValue* self) { + quint32 _ret = self->toUInt32(); + return static_cast(_ret); +} + +uint16_t QScriptValue_ToUInt16(const QScriptValue* self) { + quint16 _ret = self->toUInt16(); + return static_cast(_ret); +} + +QVariant* QScriptValue_ToVariant(const QScriptValue* self) { + return new QVariant(self->toVariant()); +} + +QObject* QScriptValue_ToQObject(const QScriptValue* self) { + return self->toQObject(); +} + +QMetaObject* QScriptValue_ToQMetaObject(const QScriptValue* self) { + return (QMetaObject*) self->toQMetaObject(); +} + +QScriptValue* QScriptValue_ToObject(const QScriptValue* self) { + return new QScriptValue(self->toObject()); +} + +QDateTime* QScriptValue_ToDateTime(const QScriptValue* self) { + return new QDateTime(self->toDateTime()); +} + +QRegExp* QScriptValue_ToRegExp(const QScriptValue* self) { + return new QRegExp(self->toRegExp()); +} + +bool QScriptValue_InstanceOf(const QScriptValue* self, QScriptValue* other) { + return self->instanceOf(*other); +} + +bool QScriptValue_LessThan(const QScriptValue* self, QScriptValue* other) { + return self->lessThan(*other); +} + +bool QScriptValue_Equals(const QScriptValue* self, QScriptValue* other) { + return self->equals(*other); +} + +bool QScriptValue_StrictlyEquals(const QScriptValue* self, QScriptValue* other) { + return self->strictlyEquals(*other); +} + +QScriptValue* QScriptValue_Prototype(const QScriptValue* self) { + return new QScriptValue(self->prototype()); +} + +void QScriptValue_SetPrototype(QScriptValue* self, QScriptValue* prototype) { + self->setPrototype(*prototype); +} + +QScriptValue* QScriptValue_Scope(const QScriptValue* self) { + return new QScriptValue(self->scope()); +} + +void QScriptValue_SetScope(QScriptValue* self, QScriptValue* scope) { + self->setScope(*scope); +} + +QScriptValue* QScriptValue_Property(const QScriptValue* self, struct miqt_string name) { + QString name_QString = QString::fromUtf8(name.data, name.len); + return new QScriptValue(self->property(name_QString)); +} + +void QScriptValue_SetProperty(QScriptValue* self, struct miqt_string name, QScriptValue* value) { + QString name_QString = QString::fromUtf8(name.data, name.len); + self->setProperty(name_QString, *value); +} + +QScriptValue* QScriptValue_PropertyWithArrayIndex(const QScriptValue* self, unsigned int arrayIndex) { + return new QScriptValue(self->property(static_cast(arrayIndex))); +} + +void QScriptValue_SetProperty2(QScriptValue* self, unsigned int arrayIndex, QScriptValue* value) { + self->setProperty(static_cast(arrayIndex), *value); +} + +QScriptValue* QScriptValue_PropertyWithName(const QScriptValue* self, QScriptString* name) { + return new QScriptValue(self->property(*name)); +} + +void QScriptValue_SetProperty3(QScriptValue* self, QScriptString* name, QScriptValue* value) { + self->setProperty(*name, *value); +} + +int QScriptValue_PropertyFlags(const QScriptValue* self, struct miqt_string name) { + QString name_QString = QString::fromUtf8(name.data, name.len); + QScriptValue::PropertyFlags _ret = self->propertyFlags(name_QString); + return static_cast(_ret); +} + +int QScriptValue_PropertyFlagsWithName(const QScriptValue* self, QScriptString* name) { + QScriptValue::PropertyFlags _ret = self->propertyFlags(*name); + return static_cast(_ret); +} + +QScriptValue* QScriptValue_Call(QScriptValue* self) { + return new QScriptValue(self->call()); +} + +QScriptValue* QScriptValue_Call2(QScriptValue* self, QScriptValue* thisObject, QScriptValue* arguments) { + return new QScriptValue(self->call(*thisObject, *arguments)); +} + +QScriptValue* QScriptValue_Construct(QScriptValue* self) { + return new QScriptValue(self->construct()); +} + +QScriptValue* QScriptValue_ConstructWithArguments(QScriptValue* self, QScriptValue* arguments) { + return new QScriptValue(self->construct(*arguments)); +} + +QScriptValue* QScriptValue_Data(const QScriptValue* self) { + return new QScriptValue(self->data()); +} + +void QScriptValue_SetData(QScriptValue* self, QScriptValue* data) { + self->setData(*data); +} + +QScriptClass* QScriptValue_ScriptClass(const QScriptValue* self) { + return self->scriptClass(); +} + +void QScriptValue_SetScriptClass(QScriptValue* self, QScriptClass* scriptClass) { + self->setScriptClass(scriptClass); +} + +long long QScriptValue_ObjectId(const QScriptValue* self) { + qint64 _ret = self->objectId(); + return static_cast(_ret); +} + +QScriptValue* QScriptValue_Property2(const QScriptValue* self, struct miqt_string name, int* mode) { + QString name_QString = QString::fromUtf8(name.data, name.len); + return new QScriptValue(self->property(name_QString, (const QScriptValue::ResolveFlags&)(*mode))); +} + +void QScriptValue_SetProperty32(QScriptValue* self, struct miqt_string name, QScriptValue* value, int* flags) { + QString name_QString = QString::fromUtf8(name.data, name.len); + self->setProperty(name_QString, *value, (const QScriptValue::PropertyFlags&)(*flags)); +} + +QScriptValue* QScriptValue_Property22(const QScriptValue* self, unsigned int arrayIndex, int* mode) { + return new QScriptValue(self->property(static_cast(arrayIndex), (const QScriptValue::ResolveFlags&)(*mode))); +} + +void QScriptValue_SetProperty33(QScriptValue* self, unsigned int arrayIndex, QScriptValue* value, int* flags) { + self->setProperty(static_cast(arrayIndex), *value, (const QScriptValue::PropertyFlags&)(*flags)); +} + +QScriptValue* QScriptValue_Property23(const QScriptValue* self, QScriptString* name, int* mode) { + return new QScriptValue(self->property(*name, (const QScriptValue::ResolveFlags&)(*mode))); +} + +void QScriptValue_SetProperty34(QScriptValue* self, QScriptString* name, QScriptValue* value, int* flags) { + self->setProperty(*name, *value, (const QScriptValue::PropertyFlags&)(*flags)); +} + +int QScriptValue_PropertyFlags2(const QScriptValue* self, struct miqt_string name, int* mode) { + QString name_QString = QString::fromUtf8(name.data, name.len); + QScriptValue::PropertyFlags _ret = self->propertyFlags(name_QString, (const QScriptValue::ResolveFlags&)(*mode)); + return static_cast(_ret); +} + +int QScriptValue_PropertyFlags22(const QScriptValue* self, QScriptString* name, int* mode) { + QScriptValue::PropertyFlags _ret = self->propertyFlags(*name, (const QScriptValue::ResolveFlags&)(*mode)); + return static_cast(_ret); +} + +QScriptValue* QScriptValue_Call1(QScriptValue* self, QScriptValue* thisObject) { + return new QScriptValue(self->call(*thisObject)); +} + +QScriptValue* QScriptValue_Call22(QScriptValue* self, QScriptValue* thisObject, struct miqt_array /* of QScriptValue* */ args) { + QScriptValueList args_QList; + args_QList.reserve(args.len); + QScriptValue** args_arr = static_cast(args.data); + for(size_t i = 0; i < args.len; ++i) { + args_QList.push_back(*(args_arr[i])); + } + return new QScriptValue(self->call(*thisObject, args_QList)); +} + +QScriptValue* QScriptValue_Construct1(QScriptValue* self, struct miqt_array /* of QScriptValue* */ args) { + QScriptValueList args_QList; + args_QList.reserve(args.len); + QScriptValue** args_arr = static_cast(args.data); + for(size_t i = 0; i < args.len; ++i) { + args_QList.push_back(*(args_arr[i])); + } + return new QScriptValue(self->construct(args_QList)); +} + +void QScriptValue_Delete(QScriptValue* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/script/gen_qscriptvalue.go b/qt/script/gen_qscriptvalue.go new file mode 100644 index 00000000..a300d765 --- /dev/null +++ b/qt/script/gen_qscriptvalue.go @@ -0,0 +1,637 @@ +package script + +/* + +#include "gen_qscriptvalue.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QScriptValue__ResolveFlag int + +const ( + QScriptValue__ResolveLocal QScriptValue__ResolveFlag = 0 + QScriptValue__ResolvePrototype QScriptValue__ResolveFlag = 1 + QScriptValue__ResolveScope QScriptValue__ResolveFlag = 2 + QScriptValue__ResolveFull QScriptValue__ResolveFlag = 3 +) + +type QScriptValue__PropertyFlag int + +const ( + QScriptValue__ReadOnly QScriptValue__PropertyFlag = 1 + QScriptValue__Undeletable QScriptValue__PropertyFlag = 2 + QScriptValue__SkipInEnumeration QScriptValue__PropertyFlag = 4 + QScriptValue__PropertyGetter QScriptValue__PropertyFlag = 8 + QScriptValue__PropertySetter QScriptValue__PropertyFlag = 16 + QScriptValue__QObjectMember QScriptValue__PropertyFlag = 32 + QScriptValue__KeepExistingFlags QScriptValue__PropertyFlag = 2048 + QScriptValue__UserRange QScriptValue__PropertyFlag = 4278190080 +) + +type QScriptValue__SpecialValue int + +const ( + QScriptValue__NullValue QScriptValue__SpecialValue = 0 + QScriptValue__UndefinedValue QScriptValue__SpecialValue = 1 +) + +type QScriptValue struct { + h *C.QScriptValue + isSubclass bool +} + +func (this *QScriptValue) cPointer() *C.QScriptValue { + if this == nil { + return nil + } + return this.h +} + +func (this *QScriptValue) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQScriptValue constructs the type using only CGO pointers. +func newQScriptValue(h *C.QScriptValue) *QScriptValue { + if h == nil { + return nil + } + return &QScriptValue{h: h} +} + +// UnsafeNewQScriptValue constructs the type using only unsafe pointers. +func UnsafeNewQScriptValue(h unsafe.Pointer) *QScriptValue { + if h == nil { + return nil + } + + return &QScriptValue{h: (*C.QScriptValue)(h)} +} + +// NewQScriptValue constructs a new QScriptValue object. +func NewQScriptValue() *QScriptValue { + var outptr_QScriptValue *C.QScriptValue = nil + + C.QScriptValue_new(&outptr_QScriptValue) + ret := newQScriptValue(outptr_QScriptValue) + ret.isSubclass = true + return ret +} + +// NewQScriptValue2 constructs a new QScriptValue object. +func NewQScriptValue2(other *QScriptValue) *QScriptValue { + var outptr_QScriptValue *C.QScriptValue = nil + + C.QScriptValue_new2(other.cPointer(), &outptr_QScriptValue) + ret := newQScriptValue(outptr_QScriptValue) + ret.isSubclass = true + return ret +} + +// NewQScriptValue3 constructs a new QScriptValue object. +func NewQScriptValue3(engine *QScriptEngine, val QScriptValue__SpecialValue) *QScriptValue { + var outptr_QScriptValue *C.QScriptValue = nil + + C.QScriptValue_new3(engine.cPointer(), (C.int)(val), &outptr_QScriptValue) + ret := newQScriptValue(outptr_QScriptValue) + ret.isSubclass = true + return ret +} + +// NewQScriptValue4 constructs a new QScriptValue object. +func NewQScriptValue4(engine *QScriptEngine, val bool) *QScriptValue { + var outptr_QScriptValue *C.QScriptValue = nil + + C.QScriptValue_new4(engine.cPointer(), (C.bool)(val), &outptr_QScriptValue) + ret := newQScriptValue(outptr_QScriptValue) + ret.isSubclass = true + return ret +} + +// NewQScriptValue5 constructs a new QScriptValue object. +func NewQScriptValue5(engine *QScriptEngine, val int) *QScriptValue { + var outptr_QScriptValue *C.QScriptValue = nil + + C.QScriptValue_new5(engine.cPointer(), (C.int)(val), &outptr_QScriptValue) + ret := newQScriptValue(outptr_QScriptValue) + ret.isSubclass = true + return ret +} + +// NewQScriptValue6 constructs a new QScriptValue object. +func NewQScriptValue6(engine *QScriptEngine, val uint) *QScriptValue { + var outptr_QScriptValue *C.QScriptValue = nil + + C.QScriptValue_new6(engine.cPointer(), (C.uint)(val), &outptr_QScriptValue) + ret := newQScriptValue(outptr_QScriptValue) + ret.isSubclass = true + return ret +} + +// NewQScriptValue7 constructs a new QScriptValue object. +func NewQScriptValue7(engine *QScriptEngine, val float64) *QScriptValue { + var outptr_QScriptValue *C.QScriptValue = nil + + C.QScriptValue_new7(engine.cPointer(), (C.double)(val), &outptr_QScriptValue) + ret := newQScriptValue(outptr_QScriptValue) + ret.isSubclass = true + return ret +} + +// NewQScriptValue8 constructs a new QScriptValue object. +func NewQScriptValue8(engine *QScriptEngine, val string) *QScriptValue { + val_ms := C.struct_miqt_string{} + val_ms.data = C.CString(val) + val_ms.len = C.size_t(len(val)) + defer C.free(unsafe.Pointer(val_ms.data)) + var outptr_QScriptValue *C.QScriptValue = nil + + C.QScriptValue_new8(engine.cPointer(), val_ms, &outptr_QScriptValue) + ret := newQScriptValue(outptr_QScriptValue) + ret.isSubclass = true + return ret +} + +// NewQScriptValue9 constructs a new QScriptValue object. +func NewQScriptValue9(engine *QScriptEngine, val string) *QScriptValue { + val_Cstring := C.CString(val) + defer C.free(unsafe.Pointer(val_Cstring)) + var outptr_QScriptValue *C.QScriptValue = nil + + C.QScriptValue_new9(engine.cPointer(), val_Cstring, &outptr_QScriptValue) + ret := newQScriptValue(outptr_QScriptValue) + ret.isSubclass = true + return ret +} + +// NewQScriptValue10 constructs a new QScriptValue object. +func NewQScriptValue10(value QScriptValue__SpecialValue) *QScriptValue { + var outptr_QScriptValue *C.QScriptValue = nil + + C.QScriptValue_new10((C.int)(value), &outptr_QScriptValue) + ret := newQScriptValue(outptr_QScriptValue) + ret.isSubclass = true + return ret +} + +// NewQScriptValue11 constructs a new QScriptValue object. +func NewQScriptValue11(value bool) *QScriptValue { + var outptr_QScriptValue *C.QScriptValue = nil + + C.QScriptValue_new11((C.bool)(value), &outptr_QScriptValue) + ret := newQScriptValue(outptr_QScriptValue) + ret.isSubclass = true + return ret +} + +// NewQScriptValue12 constructs a new QScriptValue object. +func NewQScriptValue12(value int) *QScriptValue { + var outptr_QScriptValue *C.QScriptValue = nil + + C.QScriptValue_new12((C.int)(value), &outptr_QScriptValue) + ret := newQScriptValue(outptr_QScriptValue) + ret.isSubclass = true + return ret +} + +// NewQScriptValue13 constructs a new QScriptValue object. +func NewQScriptValue13(value uint) *QScriptValue { + var outptr_QScriptValue *C.QScriptValue = nil + + C.QScriptValue_new13((C.uint)(value), &outptr_QScriptValue) + ret := newQScriptValue(outptr_QScriptValue) + ret.isSubclass = true + return ret +} + +// NewQScriptValue14 constructs a new QScriptValue object. +func NewQScriptValue14(value float64) *QScriptValue { + var outptr_QScriptValue *C.QScriptValue = nil + + C.QScriptValue_new14((C.double)(value), &outptr_QScriptValue) + ret := newQScriptValue(outptr_QScriptValue) + ret.isSubclass = true + return ret +} + +// NewQScriptValue15 constructs a new QScriptValue object. +func NewQScriptValue15(value string) *QScriptValue { + value_ms := C.struct_miqt_string{} + value_ms.data = C.CString(value) + value_ms.len = C.size_t(len(value)) + defer C.free(unsafe.Pointer(value_ms.data)) + var outptr_QScriptValue *C.QScriptValue = nil + + C.QScriptValue_new15(value_ms, &outptr_QScriptValue) + ret := newQScriptValue(outptr_QScriptValue) + ret.isSubclass = true + return ret +} + +// NewQScriptValue16 constructs a new QScriptValue object. +func NewQScriptValue16(value string) *QScriptValue { + value_Cstring := C.CString(value) + defer C.free(unsafe.Pointer(value_Cstring)) + var outptr_QScriptValue *C.QScriptValue = nil + + C.QScriptValue_new16(value_Cstring, &outptr_QScriptValue) + ret := newQScriptValue(outptr_QScriptValue) + ret.isSubclass = true + return ret +} + +func (this *QScriptValue) OperatorAssign(other *QScriptValue) { + C.QScriptValue_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QScriptValue) Engine() *QScriptEngine { + return UnsafeNewQScriptEngine(unsafe.Pointer(C.QScriptValue_Engine(this.h)), nil) +} + +func (this *QScriptValue) IsValid() bool { + return (bool)(C.QScriptValue_IsValid(this.h)) +} + +func (this *QScriptValue) IsBool() bool { + return (bool)(C.QScriptValue_IsBool(this.h)) +} + +func (this *QScriptValue) IsBoolean() bool { + return (bool)(C.QScriptValue_IsBoolean(this.h)) +} + +func (this *QScriptValue) IsNumber() bool { + return (bool)(C.QScriptValue_IsNumber(this.h)) +} + +func (this *QScriptValue) IsFunction() bool { + return (bool)(C.QScriptValue_IsFunction(this.h)) +} + +func (this *QScriptValue) IsNull() bool { + return (bool)(C.QScriptValue_IsNull(this.h)) +} + +func (this *QScriptValue) IsString() bool { + return (bool)(C.QScriptValue_IsString(this.h)) +} + +func (this *QScriptValue) IsUndefined() bool { + return (bool)(C.QScriptValue_IsUndefined(this.h)) +} + +func (this *QScriptValue) IsVariant() bool { + return (bool)(C.QScriptValue_IsVariant(this.h)) +} + +func (this *QScriptValue) IsQObject() bool { + return (bool)(C.QScriptValue_IsQObject(this.h)) +} + +func (this *QScriptValue) IsQMetaObject() bool { + return (bool)(C.QScriptValue_IsQMetaObject(this.h)) +} + +func (this *QScriptValue) IsObject() bool { + return (bool)(C.QScriptValue_IsObject(this.h)) +} + +func (this *QScriptValue) IsDate() bool { + return (bool)(C.QScriptValue_IsDate(this.h)) +} + +func (this *QScriptValue) IsRegExp() bool { + return (bool)(C.QScriptValue_IsRegExp(this.h)) +} + +func (this *QScriptValue) IsArray() bool { + return (bool)(C.QScriptValue_IsArray(this.h)) +} + +func (this *QScriptValue) IsError() bool { + return (bool)(C.QScriptValue_IsError(this.h)) +} + +func (this *QScriptValue) ToString() string { + var _ms C.struct_miqt_string = C.QScriptValue_ToString(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QScriptValue) ToNumber() float64 { + return (float64)(C.QScriptValue_ToNumber(this.h)) +} + +func (this *QScriptValue) ToBool() bool { + return (bool)(C.QScriptValue_ToBool(this.h)) +} + +func (this *QScriptValue) ToBoolean() bool { + return (bool)(C.QScriptValue_ToBoolean(this.h)) +} + +func (this *QScriptValue) ToInteger() float64 { + return (float64)(C.QScriptValue_ToInteger(this.h)) +} + +func (this *QScriptValue) ToInt32() int { + return (int)(C.QScriptValue_ToInt32(this.h)) +} + +func (this *QScriptValue) ToUInt32() uint { + return (uint)(C.QScriptValue_ToUInt32(this.h)) +} + +func (this *QScriptValue) ToUInt16() uint16 { + return (uint16)(C.QScriptValue_ToUInt16(this.h)) +} + +func (this *QScriptValue) ToVariant() *qt.QVariant { + _ret := C.QScriptValue_ToVariant(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 *QScriptValue) ToQObject() *qt.QObject { + return qt.UnsafeNewQObject(unsafe.Pointer(C.QScriptValue_ToQObject(this.h))) +} + +func (this *QScriptValue) ToQMetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QScriptValue_ToQMetaObject(this.h))) +} + +func (this *QScriptValue) ToObject() *QScriptValue { + _ret := C.QScriptValue_ToObject(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) ToDateTime() *qt.QDateTime { + _ret := C.QScriptValue_ToDateTime(this.h) + _goptr := qt.UnsafeNewQDateTime(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) ToRegExp() *qt.QRegExp { + _ret := C.QScriptValue_ToRegExp(this.h) + _goptr := qt.UnsafeNewQRegExp(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) InstanceOf(other *QScriptValue) bool { + return (bool)(C.QScriptValue_InstanceOf(this.h, other.cPointer())) +} + +func (this *QScriptValue) LessThan(other *QScriptValue) bool { + return (bool)(C.QScriptValue_LessThan(this.h, other.cPointer())) +} + +func (this *QScriptValue) Equals(other *QScriptValue) bool { + return (bool)(C.QScriptValue_Equals(this.h, other.cPointer())) +} + +func (this *QScriptValue) StrictlyEquals(other *QScriptValue) bool { + return (bool)(C.QScriptValue_StrictlyEquals(this.h, other.cPointer())) +} + +func (this *QScriptValue) Prototype() *QScriptValue { + _ret := C.QScriptValue_Prototype(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) SetPrototype(prototype *QScriptValue) { + C.QScriptValue_SetPrototype(this.h, prototype.cPointer()) +} + +func (this *QScriptValue) Scope() *QScriptValue { + _ret := C.QScriptValue_Scope(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) SetScope(scope *QScriptValue) { + C.QScriptValue_SetScope(this.h, scope.cPointer()) +} + +func (this *QScriptValue) Property(name string) *QScriptValue { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + _ret := C.QScriptValue_Property(this.h, name_ms) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) SetProperty(name string, value *QScriptValue) { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + C.QScriptValue_SetProperty(this.h, name_ms, value.cPointer()) +} + +func (this *QScriptValue) PropertyWithArrayIndex(arrayIndex uint) *QScriptValue { + _ret := C.QScriptValue_PropertyWithArrayIndex(this.h, (C.uint)(arrayIndex)) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) SetProperty2(arrayIndex uint, value *QScriptValue) { + C.QScriptValue_SetProperty2(this.h, (C.uint)(arrayIndex), value.cPointer()) +} + +func (this *QScriptValue) PropertyWithName(name *QScriptString) *QScriptValue { + _ret := C.QScriptValue_PropertyWithName(this.h, name.cPointer()) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) SetProperty3(name *QScriptString, value *QScriptValue) { + C.QScriptValue_SetProperty3(this.h, name.cPointer(), value.cPointer()) +} + +func (this *QScriptValue) PropertyFlags(name string) QScriptValue__PropertyFlag { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + return (QScriptValue__PropertyFlag)(C.QScriptValue_PropertyFlags(this.h, name_ms)) +} + +func (this *QScriptValue) PropertyFlagsWithName(name *QScriptString) QScriptValue__PropertyFlag { + return (QScriptValue__PropertyFlag)(C.QScriptValue_PropertyFlagsWithName(this.h, name.cPointer())) +} + +func (this *QScriptValue) Call() *QScriptValue { + _ret := C.QScriptValue_Call(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) Call2(thisObject *QScriptValue, arguments *QScriptValue) *QScriptValue { + _ret := C.QScriptValue_Call2(this.h, thisObject.cPointer(), arguments.cPointer()) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) Construct() *QScriptValue { + _ret := C.QScriptValue_Construct(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) ConstructWithArguments(arguments *QScriptValue) *QScriptValue { + _ret := C.QScriptValue_ConstructWithArguments(this.h, arguments.cPointer()) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) Data() *QScriptValue { + _ret := C.QScriptValue_Data(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) SetData(data *QScriptValue) { + C.QScriptValue_SetData(this.h, data.cPointer()) +} + +func (this *QScriptValue) ScriptClass() *QScriptClass { + return UnsafeNewQScriptClass(unsafe.Pointer(C.QScriptValue_ScriptClass(this.h))) +} + +func (this *QScriptValue) SetScriptClass(scriptClass *QScriptClass) { + C.QScriptValue_SetScriptClass(this.h, scriptClass.cPointer()) +} + +func (this *QScriptValue) ObjectId() int64 { + return (int64)(C.QScriptValue_ObjectId(this.h)) +} + +func (this *QScriptValue) Property2(name string, mode *QScriptValue__ResolveFlag) *QScriptValue { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + _ret := C.QScriptValue_Property2(this.h, name_ms, (*C.int)(unsafe.Pointer(mode))) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) SetProperty32(name string, value *QScriptValue, flags *QScriptValue__PropertyFlag) { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + C.QScriptValue_SetProperty32(this.h, name_ms, value.cPointer(), (*C.int)(unsafe.Pointer(flags))) +} + +func (this *QScriptValue) Property22(arrayIndex uint, mode *QScriptValue__ResolveFlag) *QScriptValue { + _ret := C.QScriptValue_Property22(this.h, (C.uint)(arrayIndex), (*C.int)(unsafe.Pointer(mode))) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) SetProperty33(arrayIndex uint, value *QScriptValue, flags *QScriptValue__PropertyFlag) { + C.QScriptValue_SetProperty33(this.h, (C.uint)(arrayIndex), value.cPointer(), (*C.int)(unsafe.Pointer(flags))) +} + +func (this *QScriptValue) Property23(name *QScriptString, mode *QScriptValue__ResolveFlag) *QScriptValue { + _ret := C.QScriptValue_Property23(this.h, name.cPointer(), (*C.int)(unsafe.Pointer(mode))) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) SetProperty34(name *QScriptString, value *QScriptValue, flags *QScriptValue__PropertyFlag) { + C.QScriptValue_SetProperty34(this.h, name.cPointer(), value.cPointer(), (*C.int)(unsafe.Pointer(flags))) +} + +func (this *QScriptValue) PropertyFlags2(name string, mode *QScriptValue__ResolveFlag) QScriptValue__PropertyFlag { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + return (QScriptValue__PropertyFlag)(C.QScriptValue_PropertyFlags2(this.h, name_ms, (*C.int)(unsafe.Pointer(mode)))) +} + +func (this *QScriptValue) PropertyFlags22(name *QScriptString, mode *QScriptValue__ResolveFlag) QScriptValue__PropertyFlag { + return (QScriptValue__PropertyFlag)(C.QScriptValue_PropertyFlags22(this.h, name.cPointer(), (*C.int)(unsafe.Pointer(mode)))) +} + +func (this *QScriptValue) Call1(thisObject *QScriptValue) *QScriptValue { + _ret := C.QScriptValue_Call1(this.h, thisObject.cPointer()) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) Call22(thisObject *QScriptValue, args []QScriptValue) *QScriptValue { + args_CArray := (*[0xffff]*C.QScriptValue)(C.malloc(C.size_t(8 * len(args)))) + defer C.free(unsafe.Pointer(args_CArray)) + for i := range args { + args_CArray[i] = args[i].cPointer() + } + args_ma := C.struct_miqt_array{len: C.size_t(len(args)), data: unsafe.Pointer(args_CArray)} + _ret := C.QScriptValue_Call22(this.h, thisObject.cPointer(), args_ma) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValue) Construct1(args []QScriptValue) *QScriptValue { + args_CArray := (*[0xffff]*C.QScriptValue)(C.malloc(C.size_t(8 * len(args)))) + defer C.free(unsafe.Pointer(args_CArray)) + for i := range args { + args_CArray[i] = args[i].cPointer() + } + args_ma := C.struct_miqt_array{len: C.size_t(len(args)), data: unsafe.Pointer(args_CArray)} + _ret := C.QScriptValue_Construct1(this.h, args_ma) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +// Delete this object from C++ memory. +func (this *QScriptValue) Delete() { + C.QScriptValue_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 *QScriptValue) GoGC() { + runtime.SetFinalizer(this, func(this *QScriptValue) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/script/gen_qscriptvalue.h b/qt/script/gen_qscriptvalue.h new file mode 100644 index 00000000..2cb5a905 --- /dev/null +++ b/qt/script/gen_qscriptvalue.h @@ -0,0 +1,129 @@ +#pragma once +#ifndef MIQT_QT_SCRIPT_GEN_QSCRIPTVALUE_H +#define MIQT_QT_SCRIPT_GEN_QSCRIPTVALUE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QDateTime; +class QMetaObject; +class QObject; +class QRegExp; +class QScriptClass; +class QScriptEngine; +class QScriptString; +class QScriptValue; +class QVariant; +#else +typedef struct QDateTime QDateTime; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QRegExp QRegExp; +typedef struct QScriptClass QScriptClass; +typedef struct QScriptEngine QScriptEngine; +typedef struct QScriptString QScriptString; +typedef struct QScriptValue QScriptValue; +typedef struct QVariant QVariant; +#endif + +void QScriptValue_new(QScriptValue** outptr_QScriptValue); +void QScriptValue_new2(QScriptValue* other, QScriptValue** outptr_QScriptValue); +void QScriptValue_new3(QScriptEngine* engine, int val, QScriptValue** outptr_QScriptValue); +void QScriptValue_new4(QScriptEngine* engine, bool val, QScriptValue** outptr_QScriptValue); +void QScriptValue_new5(QScriptEngine* engine, int val, QScriptValue** outptr_QScriptValue); +void QScriptValue_new6(QScriptEngine* engine, unsigned int val, QScriptValue** outptr_QScriptValue); +void QScriptValue_new7(QScriptEngine* engine, double val, QScriptValue** outptr_QScriptValue); +void QScriptValue_new8(QScriptEngine* engine, struct miqt_string val, QScriptValue** outptr_QScriptValue); +void QScriptValue_new9(QScriptEngine* engine, const char* val, QScriptValue** outptr_QScriptValue); +void QScriptValue_new10(int value, QScriptValue** outptr_QScriptValue); +void QScriptValue_new11(bool value, QScriptValue** outptr_QScriptValue); +void QScriptValue_new12(int value, QScriptValue** outptr_QScriptValue); +void QScriptValue_new13(unsigned int value, QScriptValue** outptr_QScriptValue); +void QScriptValue_new14(double value, QScriptValue** outptr_QScriptValue); +void QScriptValue_new15(struct miqt_string value, QScriptValue** outptr_QScriptValue); +void QScriptValue_new16(const char* value, QScriptValue** outptr_QScriptValue); +void QScriptValue_OperatorAssign(QScriptValue* self, QScriptValue* other); +QScriptEngine* QScriptValue_Engine(const QScriptValue* self); +bool QScriptValue_IsValid(const QScriptValue* self); +bool QScriptValue_IsBool(const QScriptValue* self); +bool QScriptValue_IsBoolean(const QScriptValue* self); +bool QScriptValue_IsNumber(const QScriptValue* self); +bool QScriptValue_IsFunction(const QScriptValue* self); +bool QScriptValue_IsNull(const QScriptValue* self); +bool QScriptValue_IsString(const QScriptValue* self); +bool QScriptValue_IsUndefined(const QScriptValue* self); +bool QScriptValue_IsVariant(const QScriptValue* self); +bool QScriptValue_IsQObject(const QScriptValue* self); +bool QScriptValue_IsQMetaObject(const QScriptValue* self); +bool QScriptValue_IsObject(const QScriptValue* self); +bool QScriptValue_IsDate(const QScriptValue* self); +bool QScriptValue_IsRegExp(const QScriptValue* self); +bool QScriptValue_IsArray(const QScriptValue* self); +bool QScriptValue_IsError(const QScriptValue* self); +struct miqt_string QScriptValue_ToString(const QScriptValue* self); +double QScriptValue_ToNumber(const QScriptValue* self); +bool QScriptValue_ToBool(const QScriptValue* self); +bool QScriptValue_ToBoolean(const QScriptValue* self); +double QScriptValue_ToInteger(const QScriptValue* self); +int QScriptValue_ToInt32(const QScriptValue* self); +unsigned int QScriptValue_ToUInt32(const QScriptValue* self); +uint16_t QScriptValue_ToUInt16(const QScriptValue* self); +QVariant* QScriptValue_ToVariant(const QScriptValue* self); +QObject* QScriptValue_ToQObject(const QScriptValue* self); +QMetaObject* QScriptValue_ToQMetaObject(const QScriptValue* self); +QScriptValue* QScriptValue_ToObject(const QScriptValue* self); +QDateTime* QScriptValue_ToDateTime(const QScriptValue* self); +QRegExp* QScriptValue_ToRegExp(const QScriptValue* self); +bool QScriptValue_InstanceOf(const QScriptValue* self, QScriptValue* other); +bool QScriptValue_LessThan(const QScriptValue* self, QScriptValue* other); +bool QScriptValue_Equals(const QScriptValue* self, QScriptValue* other); +bool QScriptValue_StrictlyEquals(const QScriptValue* self, QScriptValue* other); +QScriptValue* QScriptValue_Prototype(const QScriptValue* self); +void QScriptValue_SetPrototype(QScriptValue* self, QScriptValue* prototype); +QScriptValue* QScriptValue_Scope(const QScriptValue* self); +void QScriptValue_SetScope(QScriptValue* self, QScriptValue* scope); +QScriptValue* QScriptValue_Property(const QScriptValue* self, struct miqt_string name); +void QScriptValue_SetProperty(QScriptValue* self, struct miqt_string name, QScriptValue* value); +QScriptValue* QScriptValue_PropertyWithArrayIndex(const QScriptValue* self, unsigned int arrayIndex); +void QScriptValue_SetProperty2(QScriptValue* self, unsigned int arrayIndex, QScriptValue* value); +QScriptValue* QScriptValue_PropertyWithName(const QScriptValue* self, QScriptString* name); +void QScriptValue_SetProperty3(QScriptValue* self, QScriptString* name, QScriptValue* value); +int QScriptValue_PropertyFlags(const QScriptValue* self, struct miqt_string name); +int QScriptValue_PropertyFlagsWithName(const QScriptValue* self, QScriptString* name); +QScriptValue* QScriptValue_Call(QScriptValue* self); +QScriptValue* QScriptValue_Call2(QScriptValue* self, QScriptValue* thisObject, QScriptValue* arguments); +QScriptValue* QScriptValue_Construct(QScriptValue* self); +QScriptValue* QScriptValue_ConstructWithArguments(QScriptValue* self, QScriptValue* arguments); +QScriptValue* QScriptValue_Data(const QScriptValue* self); +void QScriptValue_SetData(QScriptValue* self, QScriptValue* data); +QScriptClass* QScriptValue_ScriptClass(const QScriptValue* self); +void QScriptValue_SetScriptClass(QScriptValue* self, QScriptClass* scriptClass); +long long QScriptValue_ObjectId(const QScriptValue* self); +QScriptValue* QScriptValue_Property2(const QScriptValue* self, struct miqt_string name, int* mode); +void QScriptValue_SetProperty32(QScriptValue* self, struct miqt_string name, QScriptValue* value, int* flags); +QScriptValue* QScriptValue_Property22(const QScriptValue* self, unsigned int arrayIndex, int* mode); +void QScriptValue_SetProperty33(QScriptValue* self, unsigned int arrayIndex, QScriptValue* value, int* flags); +QScriptValue* QScriptValue_Property23(const QScriptValue* self, QScriptString* name, int* mode); +void QScriptValue_SetProperty34(QScriptValue* self, QScriptString* name, QScriptValue* value, int* flags); +int QScriptValue_PropertyFlags2(const QScriptValue* self, struct miqt_string name, int* mode); +int QScriptValue_PropertyFlags22(const QScriptValue* self, QScriptString* name, int* mode); +QScriptValue* QScriptValue_Call1(QScriptValue* self, QScriptValue* thisObject); +QScriptValue* QScriptValue_Call22(QScriptValue* self, QScriptValue* thisObject, struct miqt_array /* of QScriptValue* */ args); +QScriptValue* QScriptValue_Construct1(QScriptValue* self, struct miqt_array /* of QScriptValue* */ args); +void QScriptValue_Delete(QScriptValue* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/script/gen_qscriptvalueiterator.cpp b/qt/script/gen_qscriptvalueiterator.cpp new file mode 100644 index 00000000..123f398c --- /dev/null +++ b/qt/script/gen_qscriptvalueiterator.cpp @@ -0,0 +1,83 @@ +#include +#include +#include +#include +#include +#include +#include +#include "gen_qscriptvalueiterator.h" +#include "_cgo_export.h" + +void QScriptValueIterator_new(QScriptValue* value, QScriptValueIterator** outptr_QScriptValueIterator) { + QScriptValueIterator* ret = new QScriptValueIterator(*value); + *outptr_QScriptValueIterator = ret; +} + +bool QScriptValueIterator_HasNext(const QScriptValueIterator* self) { + return self->hasNext(); +} + +void QScriptValueIterator_Next(QScriptValueIterator* self) { + self->next(); +} + +bool QScriptValueIterator_HasPrevious(const QScriptValueIterator* self) { + return self->hasPrevious(); +} + +void QScriptValueIterator_Previous(QScriptValueIterator* self) { + self->previous(); +} + +struct miqt_string QScriptValueIterator_Name(const QScriptValueIterator* self) { + QString _ret = self->name(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QScriptString* QScriptValueIterator_ScriptName(const QScriptValueIterator* self) { + return new QScriptString(self->scriptName()); +} + +QScriptValue* QScriptValueIterator_Value(const QScriptValueIterator* self) { + return new QScriptValue(self->value()); +} + +void QScriptValueIterator_SetValue(QScriptValueIterator* self, QScriptValue* value) { + self->setValue(*value); +} + +int QScriptValueIterator_Flags(const QScriptValueIterator* self) { + QScriptValue::PropertyFlags _ret = self->flags(); + return static_cast(_ret); +} + +void QScriptValueIterator_Remove(QScriptValueIterator* self) { + self->remove(); +} + +void QScriptValueIterator_ToFront(QScriptValueIterator* self) { + self->toFront(); +} + +void QScriptValueIterator_ToBack(QScriptValueIterator* self) { + self->toBack(); +} + +void QScriptValueIterator_OperatorAssign(QScriptValueIterator* self, QScriptValue* value) { + self->operator=(*value); +} + +void QScriptValueIterator_Delete(QScriptValueIterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/script/gen_qscriptvalueiterator.go b/qt/script/gen_qscriptvalueiterator.go new file mode 100644 index 00000000..a3d09960 --- /dev/null +++ b/qt/script/gen_qscriptvalueiterator.go @@ -0,0 +1,135 @@ +package script + +/* + +#include "gen_qscriptvalueiterator.h" +#include + +*/ +import "C" + +import ( + "runtime" + "unsafe" +) + +type QScriptValueIterator struct { + h *C.QScriptValueIterator + isSubclass bool +} + +func (this *QScriptValueIterator) cPointer() *C.QScriptValueIterator { + if this == nil { + return nil + } + return this.h +} + +func (this *QScriptValueIterator) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQScriptValueIterator constructs the type using only CGO pointers. +func newQScriptValueIterator(h *C.QScriptValueIterator) *QScriptValueIterator { + if h == nil { + return nil + } + return &QScriptValueIterator{h: h} +} + +// UnsafeNewQScriptValueIterator constructs the type using only unsafe pointers. +func UnsafeNewQScriptValueIterator(h unsafe.Pointer) *QScriptValueIterator { + if h == nil { + return nil + } + + return &QScriptValueIterator{h: (*C.QScriptValueIterator)(h)} +} + +// NewQScriptValueIterator constructs a new QScriptValueIterator object. +func NewQScriptValueIterator(value *QScriptValue) *QScriptValueIterator { + var outptr_QScriptValueIterator *C.QScriptValueIterator = nil + + C.QScriptValueIterator_new(value.cPointer(), &outptr_QScriptValueIterator) + ret := newQScriptValueIterator(outptr_QScriptValueIterator) + ret.isSubclass = true + return ret +} + +func (this *QScriptValueIterator) HasNext() bool { + return (bool)(C.QScriptValueIterator_HasNext(this.h)) +} + +func (this *QScriptValueIterator) Next() { + C.QScriptValueIterator_Next(this.h) +} + +func (this *QScriptValueIterator) HasPrevious() bool { + return (bool)(C.QScriptValueIterator_HasPrevious(this.h)) +} + +func (this *QScriptValueIterator) Previous() { + C.QScriptValueIterator_Previous(this.h) +} + +func (this *QScriptValueIterator) Name() string { + var _ms C.struct_miqt_string = C.QScriptValueIterator_Name(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QScriptValueIterator) ScriptName() *QScriptString { + _ret := C.QScriptValueIterator_ScriptName(this.h) + _goptr := newQScriptString(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValueIterator) Value() *QScriptValue { + _ret := C.QScriptValueIterator_Value(this.h) + _goptr := newQScriptValue(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QScriptValueIterator) SetValue(value *QScriptValue) { + C.QScriptValueIterator_SetValue(this.h, value.cPointer()) +} + +func (this *QScriptValueIterator) Flags() QScriptValue__PropertyFlag { + return (QScriptValue__PropertyFlag)(C.QScriptValueIterator_Flags(this.h)) +} + +func (this *QScriptValueIterator) Remove() { + C.QScriptValueIterator_Remove(this.h) +} + +func (this *QScriptValueIterator) ToFront() { + C.QScriptValueIterator_ToFront(this.h) +} + +func (this *QScriptValueIterator) ToBack() { + C.QScriptValueIterator_ToBack(this.h) +} + +func (this *QScriptValueIterator) OperatorAssign(value *QScriptValue) { + C.QScriptValueIterator_OperatorAssign(this.h, value.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QScriptValueIterator) Delete() { + C.QScriptValueIterator_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 *QScriptValueIterator) GoGC() { + runtime.SetFinalizer(this, func(this *QScriptValueIterator) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/script/gen_qscriptvalueiterator.h b/qt/script/gen_qscriptvalueiterator.h new file mode 100644 index 00000000..5dfff1eb --- /dev/null +++ b/qt/script/gen_qscriptvalueiterator.h @@ -0,0 +1,47 @@ +#pragma once +#ifndef MIQT_QT_SCRIPT_GEN_QSCRIPTVALUEITERATOR_H +#define MIQT_QT_SCRIPT_GEN_QSCRIPTVALUEITERATOR_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QScriptString; +class QScriptValue; +class QScriptValueIterator; +#else +typedef struct QScriptString QScriptString; +typedef struct QScriptValue QScriptValue; +typedef struct QScriptValueIterator QScriptValueIterator; +#endif + +void QScriptValueIterator_new(QScriptValue* value, QScriptValueIterator** outptr_QScriptValueIterator); +bool QScriptValueIterator_HasNext(const QScriptValueIterator* self); +void QScriptValueIterator_Next(QScriptValueIterator* self); +bool QScriptValueIterator_HasPrevious(const QScriptValueIterator* self); +void QScriptValueIterator_Previous(QScriptValueIterator* self); +struct miqt_string QScriptValueIterator_Name(const QScriptValueIterator* self); +QScriptString* QScriptValueIterator_ScriptName(const QScriptValueIterator* self); +QScriptValue* QScriptValueIterator_Value(const QScriptValueIterator* self); +void QScriptValueIterator_SetValue(QScriptValueIterator* self, QScriptValue* value); +int QScriptValueIterator_Flags(const QScriptValueIterator* self); +void QScriptValueIterator_Remove(QScriptValueIterator* self); +void QScriptValueIterator_ToFront(QScriptValueIterator* self); +void QScriptValueIterator_ToBack(QScriptValueIterator* self); +void QScriptValueIterator_OperatorAssign(QScriptValueIterator* self, QScriptValue* value); +void QScriptValueIterator_Delete(QScriptValueIterator* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif From 10d01df3726558b37b6faeb5e9b442122a454463 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 26 Nov 2024 19:55:26 +1300 Subject: [PATCH 07/12] qtscript: add example --- .gitignore | 1 + examples/libraries/qt-script/main.go | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 examples/libraries/qt-script/main.go diff --git a/.gitignore b/.gitignore index c752ae03..a1dabbbf 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ examples/libraries/extras-scintillaedit/extras-scintillaedit examples/libraries/qt-multimedia/qt-multimedia examples/libraries/qt-network/qt-network examples/libraries/qt-printsupport/qt-printsupport +examples/libraries/qt-script/qt-script examples/libraries/qt-svg/qt-svg examples/libraries/qt6-multimedia/qt6-multimedia examples/libraries/restricted-extras-qscintilla/restricted-extras-qscintilla diff --git a/examples/libraries/qt-script/main.go b/examples/libraries/qt-script/main.go new file mode 100644 index 00000000..1df6b5ce --- /dev/null +++ b/examples/libraries/qt-script/main.go @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + "os" + + "github.com/mappu/miqt/qt" + "github.com/mappu/miqt/qt/script" +) + +func main() { + + qt.NewQApplication(os.Args) + + inputProgram := "1 + 2" + + eng := script.NewQScriptEngine() + result := eng.Evaluate(inputProgram) + + fmt.Printf("%s = %1.f\n", inputProgram, result.ToNumber()) + + // qt.QApplication_Exec() +} From bfbaeaf514a3a8508462ef37cbf5fd0a0c2615aa Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 26 Nov 2024 20:09:30 +1300 Subject: [PATCH 08/12] genbindings: add missing header includes for some container types --- cmd/genbindings/emitcabi.go | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index 7b051134..14ba3532 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -557,24 +557,28 @@ func getReferencedTypes(src *CppParsedHeader) []string { foundTypes := map[string]struct{}{} - maybeAddType := func(p CppParameter) { + var maybeAddType func(p CppParameter) + maybeAddType = func(p CppParameter) { if p.QtClassType() { foundTypes[p.ParameterType] = struct{}{} } if t, ok := p.QListOf(); ok { foundTypes["QList"] = struct{}{} // FIXME or QVector? - if t.QtClassType() { - foundTypes[t.ParameterType] = struct{}{} - } + maybeAddType(t) } if kType, vType, ok := p.QMapOf(); ok { foundTypes["QMap"] = struct{}{} // FIXME or QHash? - if kType.QtClassType() { - foundTypes[kType.ParameterType] = struct{}{} - } - if vType.QtClassType() { - foundTypes[vType.ParameterType] = struct{}{} - } + maybeAddType(kType) + maybeAddType(vType) + } + if kType, vType, ok := p.QPairOf(); ok { + foundTypes["QPair"] = struct{}{} + maybeAddType(kType) + maybeAddType(vType) + } + if t, ok := p.QSetOf(); ok { + foundTypes["QSet"] = struct{}{} + maybeAddType(t) } } @@ -640,7 +644,7 @@ func cabiClassName(className string) string { func cabiPreventStructDeclaration(className string) bool { switch className { - case "QList", "QString", "QSet", "QMap", "QHash": + case "QList", "QString", "QSet", "QMap", "QHash", "QPair", "QVector", "QByteArray": return true // These types are reprojected default: return false From 96bdaffef0a442a878145343522674fe58588457 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 26 Nov 2024 20:10:11 +1300 Subject: [PATCH 09/12] qt: rebuild (add missing header includes for container types) --- qt-extras/scintillaedit/gen_ScintillaEdit.cpp | 1 + qt-extras/scintillaedit/gen_ScintillaEdit.h | 2 -- qt-restricted-extras/qscintilla/gen_qsciscintilla.h | 2 -- qt-restricted-extras/qscintilla/gen_qsciscintillabase.h | 2 -- qt-restricted-extras/qscintilla6/gen_qsciscintilla.h | 2 -- qt-restricted-extras/qscintilla6/gen_qsciscintillabase.h | 2 -- qt/cbor/gen_qcbormap.cpp | 1 + qt/cbor/gen_qcborstreamreader.h | 2 -- qt/cbor/gen_qcborstreamwriter.h | 2 -- qt/cbor/gen_qcborvalue.h | 2 -- qt/gen_qabstractbutton.h | 2 -- qt/gen_qabstracteventdispatcher.h | 2 -- qt/gen_qabstractitemmodel.h | 2 -- qt/gen_qabstractnativeeventfilter.h | 2 -- qt/gen_qabstractproxymodel.h | 2 -- qt/gen_qabstractslider.h | 2 -- qt/gen_qabstractspinbox.h | 2 -- qt/gen_qaccessible.cpp | 1 + qt/gen_qaccessiblewidget.cpp | 1 + qt/gen_qbrush.cpp | 1 + qt/gen_qbuffer.h | 2 -- qt/gen_qbytearraymatcher.h | 2 -- qt/gen_qcalendarwidget.h | 2 -- qt/gen_qcolorspace.h | 2 -- qt/gen_qcombobox.h | 2 -- qt/gen_qconcatenatetablesproxymodel.h | 2 -- qt/gen_qcoreevent.h | 2 -- qt/gen_qcryptographichash.h | 2 -- qt/gen_qdatastream.h | 2 -- qt/gen_qdatawidgetmapper.h | 2 -- qt/gen_qdebug.h | 2 -- qt/gen_qdesktopwidget.h | 2 -- qt/gen_qdialog.h | 2 -- qt/gen_qdialogbuttonbox.h | 2 -- qt/gen_qdirmodel.h | 2 -- qt/gen_qdockwidget.h | 2 -- qt/gen_qfile.h | 2 -- qt/gen_qfiledialog.h | 2 -- qt/gen_qfilesystemmodel.h | 2 -- qt/gen_qfocusframe.h | 2 -- qt/gen_qfontdatabase.h | 2 -- qt/gen_qframe.h | 2 -- qt/gen_qgraphicsitemanimation.cpp | 1 + qt/gen_qgroupbox.h | 2 -- qt/gen_qheaderview.h | 2 -- qt/gen_qimage.h | 2 -- qt/gen_qimageiohandler.h | 2 -- qt/gen_qimagereader.h | 2 -- qt/gen_qimagewriter.h | 2 -- qt/gen_qiodevice.h | 2 -- qt/gen_qitemeditorfactory.h | 2 -- qt/gen_qjsondocument.h | 2 -- qt/gen_qkeysequenceedit.h | 2 -- qt/gen_qlineedit.h | 2 -- qt/gen_qmainwindow.h | 2 -- qt/gen_qmdisubwindow.h | 2 -- qt/gen_qmenu.h | 2 -- qt/gen_qmenubar.h | 2 -- qt/gen_qmessageauthenticationcode.h | 2 -- qt/gen_qmetaobject.h | 2 -- qt/gen_qmetatype.h | 2 -- qt/gen_qmimedata.h | 2 -- qt/gen_qmimedatabase.h | 2 -- qt/gen_qmovie.h | 2 -- qt/gen_qobject.h | 2 -- qt/gen_qobjectdefs.h | 2 -- qt/gen_qpdfwriter.h | 2 -- qt/gen_qpicture.h | 2 -- qt/gen_qpixmap.h | 2 -- qt/gen_qprocess.h | 2 -- qt/gen_qprogressbar.h | 2 -- qt/gen_qpropertyanimation.h | 2 -- qt/gen_qrawfont.h | 2 -- qt/gen_qresource.h | 2 -- qt/gen_qrubberband.h | 2 -- qt/gen_qsignaltransition.h | 2 -- qt/gen_qsizegrip.h | 2 -- qt/gen_qsplashscreen.h | 2 -- qt/gen_qsplitter.h | 2 -- qt/gen_qstandarditemmodel.h | 2 -- qt/gen_qstatemachine.cpp | 1 + qt/gen_qstatusbar.h | 2 -- qt/gen_qstorageinfo.h | 2 -- qt/gen_qstringview.h | 2 -- qt/gen_qsurfaceformat.cpp | 1 + qt/gen_qtabbar.h | 2 -- qt/gen_qtabwidget.h | 2 -- qt/gen_qtextcodec.h | 2 -- qt/gen_qtextdocument.h | 2 -- qt/gen_qtextdocumentfragment.h | 2 -- qt/gen_qtextdocumentwriter.h | 2 -- qt/gen_qtextstream.h | 2 -- qt/gen_qtimezone.h | 2 -- qt/gen_qtoolbar.h | 2 -- qt/gen_qurl.h | 2 -- qt/gen_qurlquery.cpp | 1 + qt/gen_quuid.h | 2 -- qt/gen_qvariant.h | 2 -- qt/gen_qvariantanimation.cpp | 1 + qt/gen_qwidget.h | 2 -- qt/gen_qwindow.h | 2 -- qt/gen_qwizard.h | 2 -- qt/gen_qxmlstream.h | 2 -- qt/multimedia/gen_qaudiobuffer.h | 2 -- qt/multimedia/gen_qaudiosystemplugin.h | 2 -- qt/multimedia/gen_qcamera.h | 2 -- qt/multimedia/gen_qcamerainfo.h | 2 -- qt/multimedia/gen_qmediaserviceproviderplugin.h | 2 -- qt/multimedia/gen_qradiotuner.cpp | 1 + qt/multimedia/gen_qradiotunercontrol.cpp | 1 + qt/multimedia/gen_qvideosurfaceformat.h | 2 -- qt/multimedia/gen_qvideowidget.h | 2 -- qt/network/gen_qabstractnetworkcache.cpp | 2 ++ qt/network/gen_qdnslookup.h | 2 -- qt/network/gen_qdtls.h | 2 -- qt/network/gen_qhostaddress.cpp | 1 + qt/network/gen_qhttpmultipart.h | 2 -- qt/network/gen_qnetworkaccessmanager.h | 2 -- qt/network/gen_qnetworkcookie.h | 2 -- qt/network/gen_qnetworkdatagram.h | 2 -- qt/network/gen_qnetworkproxy.h | 2 -- qt/network/gen_qnetworkreply.cpp | 1 + qt/network/gen_qnetworkreply.h | 2 -- qt/network/gen_qnetworkrequest.h | 2 -- qt/network/gen_qsslcertificate.h | 2 -- qt/network/gen_qsslconfiguration.h | 2 -- qt/network/gen_qssldiffiehellmanparameters.h | 2 -- qt/network/gen_qsslkey.h | 2 -- qt/network/gen_qsslpresharedkeyauthenticator.h | 2 -- qt/network/gen_qsslsocket.h | 2 -- qt/network/gen_qudpsocket.h | 2 -- qt/printsupport/gen_qprinterinfo.cpp | 2 ++ qt/printsupport/gen_qprinterinfo.h | 2 ++ qt/printsupport/gen_qprintpreviewwidget.h | 2 -- qt/svg/gen_qsvgrenderer.h | 2 -- qt/svg/gen_qsvgwidget.h | 2 -- qt6/cbor/gen_qcbormap.cpp | 1 + qt6/cbor/gen_qcborstreamreader.h | 2 -- qt6/cbor/gen_qcborstreamwriter.h | 2 -- qt6/cbor/gen_qcborvalue.h | 2 -- qt6/gen_qabstractbutton.h | 2 -- qt6/gen_qabstracteventdispatcher.h | 2 -- qt6/gen_qabstractitemmodel.h | 2 -- qt6/gen_qabstractnativeeventfilter.h | 2 -- qt6/gen_qabstractproxymodel.h | 2 -- qt6/gen_qabstractslider.h | 2 -- qt6/gen_qabstractspinbox.h | 2 -- qt6/gen_qaccessible.cpp | 1 + qt6/gen_qaccessible_base.cpp | 1 + qt6/gen_qaccessiblewidget.cpp | 1 + qt6/gen_qanystringview.h | 2 -- qt6/gen_qarraydata.cpp | 1 + qt6/gen_qbrush.cpp | 1 + qt6/gen_qbuffer.h | 2 -- qt6/gen_qbytearraymatcher.h | 2 -- qt6/gen_qbytearrayview.h | 2 -- qt6/gen_qcalendarwidget.h | 2 -- qt6/gen_qcolorspace.h | 2 -- qt6/gen_qcombobox.h | 2 -- qt6/gen_qconcatenatetablesproxymodel.h | 2 -- qt6/gen_qcoreevent.h | 2 -- qt6/gen_qcryptographichash.h | 2 -- qt6/gen_qdatastream.h | 2 -- qt6/gen_qdatawidgetmapper.h | 2 -- qt6/gen_qdebug.h | 2 -- qt6/gen_qdialog.h | 2 -- qt6/gen_qdialogbuttonbox.h | 2 -- qt6/gen_qdockwidget.h | 2 -- qt6/gen_qfile.h | 2 -- qt6/gen_qfiledialog.h | 2 -- qt6/gen_qfilesystemmodel.h | 2 -- qt6/gen_qfocusframe.h | 2 -- qt6/gen_qfontdatabase.h | 2 -- qt6/gen_qframe.h | 2 -- qt6/gen_qgraphicsitemanimation.cpp | 1 + qt6/gen_qgroupbox.h | 2 -- qt6/gen_qheaderview.h | 2 -- qt6/gen_qidentityproxymodel.h | 2 -- qt6/gen_qimage.h | 2 -- qt6/gen_qimageiohandler.h | 2 -- qt6/gen_qimagereader.h | 2 -- qt6/gen_qimagewriter.h | 2 -- qt6/gen_qiodevice.h | 2 -- qt6/gen_qitemeditorfactory.h | 2 -- qt6/gen_qjsondocument.h | 2 -- qt6/gen_qkeysequenceedit.h | 2 -- qt6/gen_qlineedit.h | 2 -- qt6/gen_qmainwindow.h | 2 -- qt6/gen_qmdisubwindow.h | 2 -- qt6/gen_qmenu.h | 2 -- qt6/gen_qmenubar.h | 2 -- qt6/gen_qmessageauthenticationcode.h | 2 -- qt6/gen_qmetaobject.h | 2 -- qt6/gen_qmetatype.h | 2 -- qt6/gen_qmimedata.h | 2 -- qt6/gen_qmimedatabase.h | 2 -- qt6/gen_qmovie.h | 2 -- qt6/gen_qobject.h | 2 -- qt6/gen_qobjectdefs.h | 2 -- qt6/gen_qpdfwriter.h | 2 -- qt6/gen_qpixmap.h | 2 -- qt6/gen_qprocess.h | 2 -- qt6/gen_qprogressbar.h | 2 -- qt6/gen_qpropertyanimation.h | 2 -- qt6/gen_qrawfont.h | 2 -- qt6/gen_qresource.h | 2 -- qt6/gen_qrubberband.h | 2 -- qt6/gen_qsizegrip.h | 2 -- qt6/gen_qsortfilterproxymodel.h | 2 -- qt6/gen_qsplashscreen.h | 2 -- qt6/gen_qsplitter.h | 2 -- qt6/gen_qstandarditemmodel.h | 2 -- qt6/gen_qstatusbar.h | 2 -- qt6/gen_qstorageinfo.h | 2 -- qt6/gen_qstringview.h | 2 -- qt6/gen_qsurfaceformat.cpp | 1 + qt6/gen_qtabbar.h | 2 -- qt6/gen_qtabwidget.h | 2 -- qt6/gen_qtextdocumentwriter.h | 2 -- qt6/gen_qtextstream.h | 2 -- qt6/gen_qtimezone.h | 2 -- qt6/gen_qtoolbar.h | 2 -- qt6/gen_qtransposeproxymodel.h | 2 -- qt6/gen_qurl.h | 2 -- qt6/gen_qurlquery.cpp | 1 + qt6/gen_quuid.h | 2 -- qt6/gen_qvariant.h | 2 -- qt6/gen_qvariantanimation.cpp | 1 + qt6/gen_qwidget.h | 2 -- qt6/gen_qwindow.h | 2 -- qt6/gen_qwizard.h | 2 -- qt6/gen_qxmlstream.h | 2 -- qt6/multimedia/gen_qaudiobuffer.h | 2 -- qt6/multimedia/gen_qaudiodevice.h | 2 -- qt6/multimedia/gen_qcameradevice.h | 2 -- qt6/multimedia/gen_qvideowidget.h | 2 -- qt6/network/gen_qabstractnetworkcache.cpp | 2 ++ qt6/network/gen_qdnslookup.h | 2 -- qt6/network/gen_qdtls.h | 2 -- qt6/network/gen_qhostaddress.cpp | 1 + qt6/network/gen_qhttpmultipart.h | 2 -- qt6/network/gen_qnetworkaccessmanager.h | 2 -- qt6/network/gen_qnetworkcookie.h | 2 -- qt6/network/gen_qnetworkdatagram.h | 2 -- qt6/network/gen_qnetworkproxy.h | 2 -- qt6/network/gen_qnetworkreply.cpp | 1 + qt6/network/gen_qnetworkreply.h | 2 -- qt6/network/gen_qnetworkrequest.h | 2 -- qt6/network/gen_qsslcertificate.h | 2 -- qt6/network/gen_qsslconfiguration.h | 2 -- qt6/network/gen_qssldiffiehellmanparameters.h | 2 -- qt6/network/gen_qsslkey.h | 2 -- qt6/network/gen_qsslpresharedkeyauthenticator.h | 2 -- qt6/network/gen_qsslsocket.h | 2 -- qt6/network/gen_qudpsocket.h | 2 -- qt6/printsupport/gen_qprintpreviewwidget.h | 2 -- qt6/svg/gen_qsvgrenderer.h | 2 -- qt6/svg/gen_qsvgwidget.h | 2 -- 258 files changed, 34 insertions(+), 456 deletions(-) diff --git a/qt-extras/scintillaedit/gen_ScintillaEdit.cpp b/qt-extras/scintillaedit/gen_ScintillaEdit.cpp index 3eefa1bd..cb1fbf71 100644 --- a/qt-extras/scintillaedit/gen_ScintillaEdit.cpp +++ b/qt-extras/scintillaedit/gen_ScintillaEdit.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/qt-extras/scintillaedit/gen_ScintillaEdit.h b/qt-extras/scintillaedit/gen_ScintillaEdit.h index 24647744..88325ef7 100644 --- a/qt-extras/scintillaedit/gen_ScintillaEdit.h +++ b/qt-extras/scintillaedit/gen_ScintillaEdit.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractScrollArea; -class QByteArray; class QChildEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -213,7 +212,6 @@ class ScintillaEdit; class ScintillaEditBase; #else typedef struct QAbstractScrollArea QAbstractScrollArea; -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt-restricted-extras/qscintilla/gen_qsciscintilla.h b/qt-restricted-extras/qscintilla/gen_qsciscintilla.h index b804e025..f390e0d3 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciscintilla.h +++ b/qt-restricted-extras/qscintilla/gen_qsciscintilla.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractScrollArea; -class QByteArray; class QColor; class QContextMenuEvent; class QDragEnterEvent; @@ -53,7 +52,6 @@ class QsciStyle; class QsciStyledText; #else typedef struct QAbstractScrollArea QAbstractScrollArea; -typedef struct QByteArray QByteArray; typedef struct QColor QColor; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt-restricted-extras/qscintilla/gen_qsciscintillabase.h b/qt-restricted-extras/qscintilla/gen_qsciscintillabase.h index 8037b01a..6cded339 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciscintillabase.h +++ b/qt-restricted-extras/qscintilla/gen_qsciscintillabase.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractScrollArea; -class QByteArray; class QColor; class QContextMenuEvent; class QDragEnterEvent; @@ -48,7 +47,6 @@ class QWidget; class QsciScintillaBase; #else typedef struct QAbstractScrollArea QAbstractScrollArea; -typedef struct QByteArray QByteArray; typedef struct QColor QColor; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt-restricted-extras/qscintilla6/gen_qsciscintilla.h b/qt-restricted-extras/qscintilla6/gen_qsciscintilla.h index ce505bea..97b3da35 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciscintilla.h +++ b/qt-restricted-extras/qscintilla6/gen_qsciscintilla.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractScrollArea; -class QByteArray; class QColor; class QContextMenuEvent; class QDragEnterEvent; @@ -53,7 +52,6 @@ class QsciStyle; class QsciStyledText; #else typedef struct QAbstractScrollArea QAbstractScrollArea; -typedef struct QByteArray QByteArray; typedef struct QColor QColor; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.h b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.h index 8fb805b9..ebff7e8f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.h +++ b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractScrollArea; -class QByteArray; class QColor; class QContextMenuEvent; class QDragEnterEvent; @@ -48,7 +47,6 @@ class QWidget; class QsciScintillaBase; #else typedef struct QAbstractScrollArea QAbstractScrollArea; -typedef struct QByteArray QByteArray; typedef struct QColor QColor; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt/cbor/gen_qcbormap.cpp b/qt/cbor/gen_qcbormap.cpp index 679a294a..a256fe07 100644 --- a/qt/cbor/gen_qcbormap.cpp +++ b/qt/cbor/gen_qcbormap.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/qt/cbor/gen_qcborstreamreader.h b/qt/cbor/gen_qcborstreamreader.h index 6cc19cc2..e5a3728a 100644 --- a/qt/cbor/gen_qcborstreamreader.h +++ b/qt/cbor/gen_qcborstreamreader.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QCborError; class QCborStreamReader; class QIODevice; #else -typedef struct QByteArray QByteArray; typedef struct QCborError QCborError; typedef struct QCborStreamReader QCborStreamReader; typedef struct QIODevice QIODevice; diff --git a/qt/cbor/gen_qcborstreamwriter.h b/qt/cbor/gen_qcborstreamwriter.h index df9ac2e0..63c8c82c 100644 --- a/qt/cbor/gen_qcborstreamwriter.h +++ b/qt/cbor/gen_qcborstreamwriter.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QCborStreamWriter; class QIODevice; #else -typedef struct QByteArray QByteArray; typedef struct QCborStreamWriter QCborStreamWriter; typedef struct QIODevice QIODevice; #endif diff --git a/qt/cbor/gen_qcborvalue.h b/qt/cbor/gen_qcborvalue.h index 99cf36f7..7c6fddde 100644 --- a/qt/cbor/gen_qcborvalue.h +++ b/qt/cbor/gen_qcborvalue.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QCborArray; class QCborMap; class QCborParserError; @@ -30,7 +29,6 @@ class QUrl; class QUuid; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QCborArray QCborArray; typedef struct QCborMap QCborMap; typedef struct QCborParserError QCborParserError; diff --git a/qt/gen_qabstractbutton.h b/qt/gen_qabstractbutton.h index 01952961..37b9fae2 100644 --- a/qt/gen_qabstractbutton.h +++ b/qt/gen_qabstractbutton.h @@ -18,7 +18,6 @@ extern "C" { class QAbstractButton; class QActionEvent; class QButtonGroup; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -53,7 +52,6 @@ class QWidget; 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; diff --git a/qt/gen_qabstracteventdispatcher.h b/qt/gen_qabstracteventdispatcher.h index 04339830..a5729725 100644 --- a/qt/gen_qabstracteventdispatcher.h +++ b/qt/gen_qabstracteventdispatcher.h @@ -22,7 +22,6 @@ typedef QAbstractEventDispatcher::TimerInfo QAbstractEventDispatcher__TimerInfo; class QAbstractEventDispatcher__TimerInfo; #endif class QAbstractNativeEventFilter; -class QByteArray; class QMetaObject; class QObject; class QSocketNotifier; @@ -31,7 +30,6 @@ class QThread; typedef struct QAbstractEventDispatcher QAbstractEventDispatcher; typedef struct QAbstractEventDispatcher__TimerInfo QAbstractEventDispatcher__TimerInfo; typedef struct QAbstractNativeEventFilter QAbstractNativeEventFilter; -typedef struct QByteArray QByteArray; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSocketNotifier QSocketNotifier; diff --git a/qt/gen_qabstractitemmodel.h b/qt/gen_qabstractitemmodel.h index 6bb0e8ce..dba66352 100644 --- a/qt/gen_qabstractitemmodel.h +++ b/qt/gen_qabstractitemmodel.h @@ -18,7 +18,6 @@ extern "C" { class QAbstractItemModel; class QAbstractListModel; class QAbstractTableModel; -class QByteArray; class QChildEvent; class QEvent; class QMetaMethod; @@ -34,7 +33,6 @@ class QVariant; 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; diff --git a/qt/gen_qabstractnativeeventfilter.h b/qt/gen_qabstractnativeeventfilter.h index 015b79ec..dfb77400 100644 --- a/qt/gen_qabstractnativeeventfilter.h +++ b/qt/gen_qabstractnativeeventfilter.h @@ -16,10 +16,8 @@ extern "C" { #ifdef __cplusplus class QAbstractNativeEventFilter; -class QByteArray; #else typedef struct QAbstractNativeEventFilter QAbstractNativeEventFilter; -typedef struct QByteArray QByteArray; #endif void QAbstractNativeEventFilter_new(QAbstractNativeEventFilter** outptr_QAbstractNativeEventFilter); diff --git a/qt/gen_qabstractproxymodel.h b/qt/gen_qabstractproxymodel.h index b2983140..a5a16d83 100644 --- a/qt/gen_qabstractproxymodel.h +++ b/qt/gen_qabstractproxymodel.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; class QAbstractProxyModel; -class QByteArray; class QItemSelection; class QMetaObject; class QMimeData; @@ -28,7 +27,6 @@ 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; diff --git a/qt/gen_qabstractslider.h b/qt/gen_qabstractslider.h index 6b272cec..e19f05f7 100644 --- a/qt/gen_qabstractslider.h +++ b/qt/gen_qabstractslider.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractSlider; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -49,7 +48,6 @@ class QWidget; #else typedef struct QAbstractSlider QAbstractSlider; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt/gen_qabstractspinbox.h b/qt/gen_qabstractspinbox.h index 7e8af850..35418221 100644 --- a/qt/gen_qabstractspinbox.h +++ b/qt/gen_qabstractspinbox.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractSpinBox; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -49,7 +48,6 @@ class QWidget; #else typedef struct QAbstractSpinBox QAbstractSpinBox; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt/gen_qaccessible.cpp b/qt/gen_qaccessible.cpp index ea6c4716..ad33294f 100644 --- a/qt/gen_qaccessible.cpp +++ b/qt/gen_qaccessible.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/qt/gen_qaccessiblewidget.cpp b/qt/gen_qaccessiblewidget.cpp index 6b3d9061..2a2a147b 100644 --- a/qt/gen_qaccessiblewidget.cpp +++ b/qt/gen_qaccessiblewidget.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/qt/gen_qbrush.cpp b/qt/gen_qbrush.cpp index f5613144..cdfa0753 100644 --- a/qt/gen_qbrush.cpp +++ b/qt/gen_qbrush.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/qt/gen_qbuffer.h b/qt/gen_qbuffer.h index 6416e492..6a388d41 100644 --- a/qt/gen_qbuffer.h +++ b/qt/gen_qbuffer.h @@ -16,14 +16,12 @@ extern "C" { #ifdef __cplusplus class QBuffer; -class QByteArray; class QIODevice; class QMetaMethod; class QMetaObject; class QObject; #else typedef struct QBuffer QBuffer; -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QMetaMethod QMetaMethod; typedef struct QMetaObject QMetaObject; diff --git a/qt/gen_qbytearraymatcher.h b/qt/gen_qbytearraymatcher.h index 1eb6bedb..74ad2e5a 100644 --- a/qt/gen_qbytearraymatcher.h +++ b/qt/gen_qbytearraymatcher.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QByteArrayMatcher; class QStaticByteArrayMatcherBase; #else -typedef struct QByteArray QByteArray; typedef struct QByteArrayMatcher QByteArrayMatcher; typedef struct QStaticByteArrayMatcherBase QStaticByteArrayMatcherBase; #endif diff --git a/qt/gen_qcalendarwidget.h b/qt/gen_qcalendarwidget.h index 0e74040e..1c33d0df 100644 --- a/qt/gen_qcalendarwidget.h +++ b/qt/gen_qcalendarwidget.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCalendar; class QCalendarWidget; class QCloseEvent; @@ -51,7 +50,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCalendar QCalendar; typedef struct QCalendarWidget QCalendarWidget; typedef struct QCloseEvent QCloseEvent; diff --git a/qt/gen_qcolorspace.h b/qt/gen_qcolorspace.h index 84e0d333..bd2bca0f 100644 --- a/qt/gen_qcolorspace.h +++ b/qt/gen_qcolorspace.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QColorSpace; class QColorTransform; class QPointF; #else -typedef struct QByteArray QByteArray; typedef struct QColorSpace QColorSpace; typedef struct QColorTransform QColorTransform; typedef struct QPointF QPointF; diff --git a/qt/gen_qcombobox.h b/qt/gen_qcombobox.h index 4d2c4929..985457dc 100644 --- a/qt/gen_qcombobox.h +++ b/qt/gen_qcombobox.h @@ -19,7 +19,6 @@ class QAbstractItemDelegate; class QAbstractItemModel; class QAbstractItemView; class QActionEvent; -class QByteArray; class QCloseEvent; class QComboBox; class QCompleter; @@ -58,7 +57,6 @@ typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractItemView QAbstractItemView; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QComboBox QComboBox; typedef struct QCompleter QCompleter; diff --git a/qt/gen_qconcatenatetablesproxymodel.h b/qt/gen_qconcatenatetablesproxymodel.h index ee333f9a..90df41e3 100644 --- a/qt/gen_qconcatenatetablesproxymodel.h +++ b/qt/gen_qconcatenatetablesproxymodel.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; -class QByteArray; class QConcatenateTablesProxyModel; class QMetaObject; class QMimeData; @@ -26,7 +25,6 @@ class QSize; class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; -typedef struct QByteArray QByteArray; typedef struct QConcatenateTablesProxyModel QConcatenateTablesProxyModel; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; diff --git a/qt/gen_qcoreevent.h b/qt/gen_qcoreevent.h index 6793d115..37255b02 100644 --- a/qt/gen_qcoreevent.h +++ b/qt/gen_qcoreevent.h @@ -15,14 +15,12 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QDynamicPropertyChangeEvent; class QEvent; class QObject; class QTimerEvent; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QDynamicPropertyChangeEvent QDynamicPropertyChangeEvent; typedef struct QEvent QEvent; diff --git a/qt/gen_qcryptographichash.h b/qt/gen_qcryptographichash.h index 44fa4f23..bd0d7c1a 100644 --- a/qt/gen_qcryptographichash.h +++ b/qt/gen_qcryptographichash.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QCryptographicHash; class QIODevice; #else -typedef struct QByteArray QByteArray; typedef struct QCryptographicHash QCryptographicHash; typedef struct QIODevice QIODevice; #endif diff --git a/qt/gen_qdatastream.h b/qt/gen_qdatastream.h index 4c46f121..bcbed710 100644 --- a/qt/gen_qdatastream.h +++ b/qt/gen_qdatastream.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QDataStream; class QIODevice; #else -typedef struct QByteArray QByteArray; typedef struct QDataStream QDataStream; typedef struct QIODevice QIODevice; #endif diff --git a/qt/gen_qdatawidgetmapper.h b/qt/gen_qdatawidgetmapper.h index 40175971..ae6712ee 100644 --- a/qt/gen_qdatawidgetmapper.h +++ b/qt/gen_qdatawidgetmapper.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractItemDelegate; class QAbstractItemModel; -class QByteArray; class QChildEvent; class QDataWidgetMapper; class QEvent; @@ -30,7 +29,6 @@ class QWidget; #else typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QDataWidgetMapper QDataWidgetMapper; typedef struct QEvent QEvent; diff --git a/qt/gen_qdebug.h b/qt/gen_qdebug.h index dbc25299..cd36a919 100644 --- a/qt/gen_qdebug.h +++ b/qt/gen_qdebug.h @@ -15,14 +15,12 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChar; class QDebug; class QDebugStateSaver; class QIODevice; class QNoDebug; #else -typedef struct QByteArray QByteArray; typedef struct QChar QChar; typedef struct QDebug QDebug; typedef struct QDebugStateSaver QDebugStateSaver; diff --git a/qt/gen_qdesktopwidget.h b/qt/gen_qdesktopwidget.h index 4e26f111..78963d75 100644 --- a/qt/gen_qdesktopwidget.h +++ b/qt/gen_qdesktopwidget.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDesktopWidget; @@ -48,7 +47,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDesktopWidget QDesktopWidget; diff --git a/qt/gen_qdialog.h b/qt/gen_qdialog.h index 2c2a6eb8..176da166 100644 --- a/qt/gen_qdialog.h +++ b/qt/gen_qdialog.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDialog; @@ -47,7 +46,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDialog QDialog; diff --git a/qt/gen_qdialogbuttonbox.h b/qt/gen_qdialogbuttonbox.h index 17927c82..f352bd97 100644 --- a/qt/gen_qdialogbuttonbox.h +++ b/qt/gen_qdialogbuttonbox.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractButton; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDialogButtonBox; @@ -50,7 +49,6 @@ class QWidget; #else typedef struct QAbstractButton QAbstractButton; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDialogButtonBox QDialogButtonBox; diff --git a/qt/gen_qdirmodel.h b/qt/gen_qdirmodel.h index 1abda51b..13914b52 100644 --- a/qt/gen_qdirmodel.h +++ b/qt/gen_qdirmodel.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; -class QByteArray; class QDirModel; class QFileIconProvider; class QFileInfo; @@ -29,7 +28,6 @@ class QSize; class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; -typedef struct QByteArray QByteArray; typedef struct QDirModel QDirModel; typedef struct QFileIconProvider QFileIconProvider; typedef struct QFileInfo QFileInfo; diff --git a/qt/gen_qdockwidget.h b/qt/gen_qdockwidget.h index 4468e634..ab216385 100644 --- a/qt/gen_qdockwidget.h +++ b/qt/gen_qdockwidget.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAction; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDockWidget; @@ -49,7 +48,6 @@ class QWidget; #else typedef struct QAction QAction; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDockWidget QDockWidget; diff --git a/qt/gen_qfile.h b/qt/gen_qfile.h index 6c68eb0e..5d6abc18 100644 --- a/qt/gen_qfile.h +++ b/qt/gen_qfile.h @@ -15,14 +15,12 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QFile; class QFileDevice; class QIODevice; class QMetaObject; class QObject; #else -typedef struct QByteArray QByteArray; typedef struct QFile QFile; typedef struct QFileDevice QFileDevice; typedef struct QIODevice QIODevice; diff --git a/qt/gen_qfiledialog.h b/qt/gen_qfiledialog.h index 3fbe5496..d6aaf1ac 100644 --- a/qt/gen_qfiledialog.h +++ b/qt/gen_qfiledialog.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractItemDelegate; class QAbstractProxyModel; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDialog; @@ -37,7 +36,6 @@ class QWidget; #else typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractProxyModel QAbstractProxyModel; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDialog QDialog; diff --git a/qt/gen_qfilesystemmodel.h b/qt/gen_qfilesystemmodel.h index f3b79f0a..bbe5f1a3 100644 --- a/qt/gen_qfilesystemmodel.h +++ b/qt/gen_qfilesystemmodel.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; -class QByteArray; class QDateTime; class QDir; class QEvent; @@ -33,7 +32,6 @@ class QTimerEvent; class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; -typedef struct QByteArray QByteArray; typedef struct QDateTime QDateTime; typedef struct QDir QDir; typedef struct QEvent QEvent; diff --git a/qt/gen_qfocusframe.h b/qt/gen_qfocusframe.h index cef264df..c97d27e1 100644 --- a/qt/gen_qfocusframe.h +++ b/qt/gen_qfocusframe.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -47,7 +46,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt/gen_qfontdatabase.h b/qt/gen_qfontdatabase.h index 4b7fe55f..53fe470d 100644 --- a/qt/gen_qfontdatabase.h +++ b/qt/gen_qfontdatabase.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QFont; class QFontDatabase; class QFontInfo; #else -typedef struct QByteArray QByteArray; typedef struct QFont QFont; typedef struct QFontDatabase QFontDatabase; typedef struct QFontInfo QFontInfo; diff --git a/qt/gen_qframe.h b/qt/gen_qframe.h index adfb3d6f..120e31ed 100644 --- a/qt/gen_qframe.h +++ b/qt/gen_qframe.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -48,7 +47,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt/gen_qgraphicsitemanimation.cpp b/qt/gen_qgraphicsitemanimation.cpp index 5873ad53..ec3c082b 100644 --- a/qt/gen_qgraphicsitemanimation.cpp +++ b/qt/gen_qgraphicsitemanimation.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/qt/gen_qgroupbox.h b/qt/gen_qgroupbox.h index 7577af9f..6d1cc3f9 100644 --- a/qt/gen_qgroupbox.h +++ b/qt/gen_qgroupbox.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QChildEvent; class QCloseEvent; class QContextMenuEvent; @@ -48,7 +47,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; diff --git a/qt/gen_qheaderview.h b/qt/gen_qheaderview.h index 3fb1f54d..5c3d6078 100644 --- a/qt/gen_qheaderview.h +++ b/qt/gen_qheaderview.h @@ -18,7 +18,6 @@ extern "C" { class QAbstractItemModel; class QAbstractItemView; class QAbstractScrollArea; -class QByteArray; class QDragEnterEvent; class QDragLeaveEvent; class QDragMoveEvent; @@ -51,7 +50,6 @@ class QWidget; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractItemView QAbstractItemView; typedef struct QAbstractScrollArea QAbstractScrollArea; -typedef struct QByteArray QByteArray; typedef struct QDragEnterEvent QDragEnterEvent; typedef struct QDragLeaveEvent QDragLeaveEvent; typedef struct QDragMoveEvent QDragMoveEvent; diff --git a/qt/gen_qimage.h b/qt/gen_qimage.h index 33cd5f91..eea19916 100644 --- a/qt/gen_qimage.h +++ b/qt/gen_qimage.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QColor; class QColorSpace; class QColorTransform; @@ -31,7 +30,6 @@ class QRect; class QSize; class QTransform; #else -typedef struct QByteArray QByteArray; typedef struct QColor QColor; typedef struct QColorSpace QColorSpace; typedef struct QColorTransform QColorTransform; diff --git a/qt/gen_qimageiohandler.h b/qt/gen_qimageiohandler.h index d4012b5a..f90bc80f 100644 --- a/qt/gen_qimageiohandler.h +++ b/qt/gen_qimageiohandler.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QEvent; class QIODevice; @@ -29,7 +28,6 @@ class QRect; class QTimerEvent; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; diff --git a/qt/gen_qimagereader.h b/qt/gen_qimagereader.h index 333cbfad..2cab031e 100644 --- a/qt/gen_qimagereader.h +++ b/qt/gen_qimagereader.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QColor; class QIODevice; class QImage; @@ -23,7 +22,6 @@ class QImageReader; class QRect; class QSize; #else -typedef struct QByteArray QByteArray; typedef struct QColor QColor; typedef struct QIODevice QIODevice; typedef struct QImage QImage; diff --git a/qt/gen_qimagewriter.h b/qt/gen_qimagewriter.h index 698ce2e6..5e1e8b1c 100644 --- a/qt/gen_qimagewriter.h +++ b/qt/gen_qimagewriter.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QImage; class QImageWriter; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QImage QImage; typedef struct QImageWriter QImageWriter; diff --git a/qt/gen_qiodevice.h b/qt/gen_qiodevice.h index 9c2b5eae..6439e333 100644 --- a/qt/gen_qiodevice.h +++ b/qt/gen_qiodevice.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QEvent; class QIODevice; @@ -24,7 +23,6 @@ class QMetaObject; class QObject; class QTimerEvent; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; diff --git a/qt/gen_qitemeditorfactory.h b/qt/gen_qitemeditorfactory.h index 023c1375..16f5d45d 100644 --- a/qt/gen_qitemeditorfactory.h +++ b/qt/gen_qitemeditorfactory.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QItemEditorCreatorBase; class QItemEditorFactory; class QWidget; #else -typedef struct QByteArray QByteArray; typedef struct QItemEditorCreatorBase QItemEditorCreatorBase; typedef struct QItemEditorFactory QItemEditorFactory; typedef struct QWidget QWidget; diff --git a/qt/gen_qjsondocument.h b/qt/gen_qjsondocument.h index 60dbb1fc..2410d41a 100644 --- a/qt/gen_qjsondocument.h +++ b/qt/gen_qjsondocument.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QJsonArray; class QJsonDocument; class QJsonObject; @@ -23,7 +22,6 @@ class QJsonParseError; class QJsonValue; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QJsonArray QJsonArray; typedef struct QJsonDocument QJsonDocument; typedef struct QJsonObject QJsonObject; diff --git a/qt/gen_qkeysequenceedit.h b/qt/gen_qkeysequenceedit.h index c6b887c5..ef0257ea 100644 --- a/qt/gen_qkeysequenceedit.h +++ b/qt/gen_qkeysequenceedit.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -49,7 +48,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt/gen_qlineedit.h b/qt/gen_qlineedit.h index f232da37..a52ad196 100644 --- a/qt/gen_qlineedit.h +++ b/qt/gen_qlineedit.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAction; class QActionEvent; -class QByteArray; class QCloseEvent; class QCompleter; class QContextMenuEvent; @@ -54,7 +53,6 @@ class QWidget; #else typedef struct QAction QAction; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QCompleter QCompleter; typedef struct QContextMenuEvent QContextMenuEvent; diff --git a/qt/gen_qmainwindow.h b/qt/gen_qmainwindow.h index d19e2156..855f65c3 100644 --- a/qt/gen_qmainwindow.h +++ b/qt/gen_qmainwindow.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDockWidget; @@ -52,7 +51,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDockWidget QDockWidget; diff --git a/qt/gen_qmdisubwindow.h b/qt/gen_qmdisubwindow.h index cc1257cb..dcace4f8 100644 --- a/qt/gen_qmdisubwindow.h +++ b/qt/gen_qmdisubwindow.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QChildEvent; class QCloseEvent; class QContextMenuEvent; @@ -51,7 +50,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; diff --git a/qt/gen_qmenu.h b/qt/gen_qmenu.h index 01662f62..32cc2c6a 100644 --- a/qt/gen_qmenu.h +++ b/qt/gen_qmenu.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAction; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -52,7 +51,6 @@ class QWidget; #else typedef struct QAction QAction; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt/gen_qmenubar.h b/qt/gen_qmenubar.h index f2d1c54e..0f3efede 100644 --- a/qt/gen_qmenubar.h +++ b/qt/gen_qmenubar.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAction; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -53,7 +52,6 @@ class QWidget; #else typedef struct QAction QAction; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt/gen_qmessageauthenticationcode.h b/qt/gen_qmessageauthenticationcode.h index 12bda40e..42c7ddfb 100644 --- a/qt/gen_qmessageauthenticationcode.h +++ b/qt/gen_qmessageauthenticationcode.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QMessageAuthenticationCode; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QMessageAuthenticationCode QMessageAuthenticationCode; #endif diff --git a/qt/gen_qmetaobject.h b/qt/gen_qmetaobject.h index 10cc44fa..8f4f9a2f 100644 --- a/qt/gen_qmetaobject.h +++ b/qt/gen_qmetaobject.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QGenericArgument; class QGenericReturnArgument; class QMetaClassInfo; @@ -26,7 +25,6 @@ class QMetaProperty; class QObject; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QGenericArgument QGenericArgument; typedef struct QGenericReturnArgument QGenericReturnArgument; typedef struct QMetaClassInfo QMetaClassInfo; diff --git a/qt/gen_qmetatype.h b/qt/gen_qmetatype.h index 9befb0f5..df5b79bd 100644 --- a/qt/gen_qmetatype.h +++ b/qt/gen_qmetatype.h @@ -15,13 +15,11 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QDataStream; class QDebug; class QMetaObject; class QMetaType; #else -typedef struct QByteArray QByteArray; typedef struct QDataStream QDataStream; typedef struct QDebug QDebug; typedef struct QMetaObject QMetaObject; diff --git a/qt/gen_qmimedata.h b/qt/gen_qmimedata.h index f01ef469..71c4b8cf 100644 --- a/qt/gen_qmimedata.h +++ b/qt/gen_qmimedata.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QEvent; class QMetaMethod; @@ -26,7 +25,6 @@ class QTimerEvent; class QUrl; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QMetaMethod QMetaMethod; diff --git a/qt/gen_qmimedatabase.h b/qt/gen_qmimedatabase.h index 3df1f10d..0d4aa762 100644 --- a/qt/gen_qmimedatabase.h +++ b/qt/gen_qmimedatabase.h @@ -15,14 +15,12 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QFileInfo; class QIODevice; class QMimeDatabase; class QMimeType; class QUrl; #else -typedef struct QByteArray QByteArray; typedef struct QFileInfo QFileInfo; typedef struct QIODevice QIODevice; typedef struct QMimeDatabase QMimeDatabase; diff --git a/qt/gen_qmovie.h b/qt/gen_qmovie.h index 69bf6dd3..3ed97f7f 100644 --- a/qt/gen_qmovie.h +++ b/qt/gen_qmovie.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QColor; class QEvent; @@ -30,7 +29,6 @@ class QRect; class QSize; class QTimerEvent; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QColor QColor; typedef struct QEvent QEvent; diff --git a/qt/gen_qobject.h b/qt/gen_qobject.h index 838063c6..be767f17 100644 --- a/qt/gen_qobject.h +++ b/qt/gen_qobject.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QEvent; class QMetaMethod; @@ -33,7 +32,6 @@ class QThread; class QTimerEvent; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QMetaMethod QMetaMethod; diff --git a/qt/gen_qobjectdefs.h b/qt/gen_qobjectdefs.h index 8ad6b9e1..373d9e77 100644 --- a/qt/gen_qobjectdefs.h +++ b/qt/gen_qobjectdefs.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QGenericArgument; class QGenericReturnArgument; class QMetaClassInfo; @@ -35,7 +34,6 @@ class QMetaObject__SuperData; class QMetaProperty; class QObject; #else -typedef struct QByteArray QByteArray; typedef struct QGenericArgument QGenericArgument; typedef struct QGenericReturnArgument QGenericReturnArgument; typedef struct QMetaClassInfo QMetaClassInfo; diff --git a/qt/gen_qpdfwriter.h b/qt/gen_qpdfwriter.h index d97d5e2f..7bda2f6a 100644 --- a/qt/gen_qpdfwriter.h +++ b/qt/gen_qpdfwriter.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QEvent; class QIODevice; @@ -34,7 +33,6 @@ class QPdfWriter; class QSizeF; class QTimerEvent; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; diff --git a/qt/gen_qpicture.h b/qt/gen_qpicture.h index 4135f4c0..59d4e5bd 100644 --- a/qt/gen_qpicture.h +++ b/qt/gen_qpicture.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QPaintDevice; class QPaintEngine; @@ -25,7 +24,6 @@ class QPictureIO; class QPoint; class QRect; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QPaintDevice QPaintDevice; typedef struct QPaintEngine QPaintEngine; diff --git a/qt/gen_qpixmap.h b/qt/gen_qpixmap.h index d8dafb31..e4363c13 100644 --- a/qt/gen_qpixmap.h +++ b/qt/gen_qpixmap.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QBitmap; -class QByteArray; class QColor; class QIODevice; class QImage; @@ -34,7 +33,6 @@ class QSize; class QTransform; #else typedef struct QBitmap QBitmap; -typedef struct QByteArray QByteArray; typedef struct QColor QColor; typedef struct QIODevice QIODevice; typedef struct QImage QImage; diff --git a/qt/gen_qprocess.h b/qt/gen_qprocess.h index 74276026..b382e61e 100644 --- a/qt/gen_qprocess.h +++ b/qt/gen_qprocess.h @@ -15,14 +15,12 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QMetaObject; class QObject; class QProcess; class QProcessEnvironment; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; diff --git a/qt/gen_qprogressbar.h b/qt/gen_qprogressbar.h index 0fd31489..7ff7ccf6 100644 --- a/qt/gen_qprogressbar.h +++ b/qt/gen_qprogressbar.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -47,7 +46,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt/gen_qpropertyanimation.h b/qt/gen_qpropertyanimation.h index 89accb30..f1f853c9 100644 --- a/qt/gen_qpropertyanimation.h +++ b/qt/gen_qpropertyanimation.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractAnimation; -class QByteArray; class QEvent; class QMetaObject; class QObject; @@ -25,7 +24,6 @@ class QVariant; class QVariantAnimation; #else typedef struct QAbstractAnimation QAbstractAnimation; -typedef struct QByteArray QByteArray; typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; diff --git a/qt/gen_qrawfont.h b/qt/gen_qrawfont.h index e211c98d..01a8b102 100644 --- a/qt/gen_qrawfont.h +++ b/qt/gen_qrawfont.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChar; class QFont; class QImage; @@ -25,7 +24,6 @@ class QRawFont; class QRectF; class QTransform; #else -typedef struct QByteArray QByteArray; typedef struct QChar QChar; typedef struct QFont QFont; typedef struct QImage QImage; diff --git a/qt/gen_qresource.h b/qt/gen_qresource.h index a4052974..6d324158 100644 --- a/qt/gen_qresource.h +++ b/qt/gen_qresource.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QDateTime; class QLocale; class QResource; #else -typedef struct QByteArray QByteArray; typedef struct QDateTime QDateTime; typedef struct QLocale QLocale; typedef struct QResource QResource; diff --git a/qt/gen_qrubberband.h b/qt/gen_qrubberband.h index 6f031924..3edefa67 100644 --- a/qt/gen_qrubberband.h +++ b/qt/gen_qrubberband.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -48,7 +47,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt/gen_qsignaltransition.h b/qt/gen_qsignaltransition.h index f99c11aa..bdfea215 100644 --- a/qt/gen_qsignaltransition.h +++ b/qt/gen_qsignaltransition.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractTransition; -class QByteArray; class QEvent; class QMetaObject; class QObject; @@ -24,7 +23,6 @@ class QSignalTransition; class QState; #else typedef struct QAbstractTransition QAbstractTransition; -typedef struct QByteArray QByteArray; typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; diff --git a/qt/gen_qsizegrip.h b/qt/gen_qsizegrip.h index fc913605..87694038 100644 --- a/qt/gen_qsizegrip.h +++ b/qt/gen_qsizegrip.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -47,7 +46,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt/gen_qsplashscreen.h b/qt/gen_qsplashscreen.h index 339703ae..60679e38 100644 --- a/qt/gen_qsplashscreen.h +++ b/qt/gen_qsplashscreen.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QColor; class QContextMenuEvent; @@ -50,7 +49,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QColor QColor; typedef struct QContextMenuEvent QContextMenuEvent; diff --git a/qt/gen_qsplitter.h b/qt/gen_qsplitter.h index 6d1a19f3..601c33e3 100644 --- a/qt/gen_qsplitter.h +++ b/qt/gen_qsplitter.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QChildEvent; class QCloseEvent; class QContextMenuEvent; @@ -50,7 +49,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; diff --git a/qt/gen_qstandarditemmodel.h b/qt/gen_qstandarditemmodel.h index 168a4212..eedbe1af 100644 --- a/qt/gen_qstandarditemmodel.h +++ b/qt/gen_qstandarditemmodel.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; class QBrush; -class QByteArray; class QDataStream; class QFont; class QIcon; @@ -32,7 +31,6 @@ class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QBrush QBrush; -typedef struct QByteArray QByteArray; typedef struct QDataStream QDataStream; typedef struct QFont QFont; typedef struct QIcon QIcon; diff --git a/qt/gen_qstatemachine.cpp b/qt/gen_qstatemachine.cpp index fed379e5..63276c6f 100644 --- a/qt/gen_qstatemachine.cpp +++ b/qt/gen_qstatemachine.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #define WORKAROUND_INNER_CLASS_DEFINITION_QStateMachine__SignalEvent diff --git a/qt/gen_qstatusbar.h b/qt/gen_qstatusbar.h index 1ecead00..63475dd6 100644 --- a/qt/gen_qstatusbar.h +++ b/qt/gen_qstatusbar.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -47,7 +46,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt/gen_qstorageinfo.h b/qt/gen_qstorageinfo.h index ff708dc9..bbbb8a0f 100644 --- a/qt/gen_qstorageinfo.h +++ b/qt/gen_qstorageinfo.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QDir; class QStorageInfo; #else -typedef struct QByteArray QByteArray; typedef struct QDir QDir; typedef struct QStorageInfo QStorageInfo; #endif diff --git a/qt/gen_qstringview.h b/qt/gen_qstringview.h index 8cbff8e3..b3e07693 100644 --- a/qt/gen_qstringview.h +++ b/qt/gen_qstringview.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChar; class QStringView; #else -typedef struct QByteArray QByteArray; typedef struct QChar QChar; typedef struct QStringView QStringView; #endif diff --git a/qt/gen_qsurfaceformat.cpp b/qt/gen_qsurfaceformat.cpp index e08c6315..40ab9dbf 100644 --- a/qt/gen_qsurfaceformat.cpp +++ b/qt/gen_qsurfaceformat.cpp @@ -1,3 +1,4 @@ +#include #include #include #include "gen_qsurfaceformat.h" diff --git a/qt/gen_qtabbar.h b/qt/gen_qtabbar.h index 92209511..bf48f912 100644 --- a/qt/gen_qtabbar.h +++ b/qt/gen_qtabbar.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QColor; class QContextMenuEvent; @@ -51,7 +50,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QColor QColor; typedef struct QContextMenuEvent QContextMenuEvent; diff --git a/qt/gen_qtabwidget.h b/qt/gen_qtabwidget.h index 4b901afa..460cd127 100644 --- a/qt/gen_qtabwidget.h +++ b/qt/gen_qtabwidget.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -49,7 +48,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt/gen_qtextcodec.h b/qt/gen_qtextcodec.h index 9318770b..ed18cac4 100644 --- a/qt/gen_qtextcodec.h +++ b/qt/gen_qtextcodec.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChar; class QTextCodec; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QTextCodec__ConverterState) @@ -26,7 +25,6 @@ class QTextCodec__ConverterState; class QTextDecoder; class QTextEncoder; #else -typedef struct QByteArray QByteArray; typedef struct QChar QChar; typedef struct QTextCodec QTextCodec; typedef struct QTextCodec__ConverterState QTextCodec__ConverterState; diff --git a/qt/gen_qtextdocument.h b/qt/gen_qtextdocument.h index a4c3d6ab..5db0600b 100644 --- a/qt/gen_qtextdocument.h +++ b/qt/gen_qtextdocument.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractTextDocumentLayout; class QAbstractUndoItem; -class QByteArray; class QChar; class QChildEvent; class QEvent; @@ -44,7 +43,6 @@ class QVariant; #else typedef struct QAbstractTextDocumentLayout QAbstractTextDocumentLayout; typedef struct QAbstractUndoItem QAbstractUndoItem; -typedef struct QByteArray QByteArray; typedef struct QChar QChar; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; diff --git a/qt/gen_qtextdocumentfragment.h b/qt/gen_qtextdocumentfragment.h index 7f4e6495..fc7d24d4 100644 --- a/qt/gen_qtextdocumentfragment.h +++ b/qt/gen_qtextdocumentfragment.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QTextCursor; class QTextDocument; class QTextDocumentFragment; #else -typedef struct QByteArray QByteArray; typedef struct QTextCursor QTextCursor; typedef struct QTextDocument QTextDocument; typedef struct QTextDocumentFragment QTextDocumentFragment; diff --git a/qt/gen_qtextdocumentwriter.h b/qt/gen_qtextdocumentwriter.h index 58d7190f..f0406ced 100644 --- a/qt/gen_qtextdocumentwriter.h +++ b/qt/gen_qtextdocumentwriter.h @@ -15,14 +15,12 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QTextCodec; class QTextDocument; class QTextDocumentFragment; class QTextDocumentWriter; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QTextCodec QTextCodec; typedef struct QTextDocument QTextDocument; diff --git a/qt/gen_qtextstream.h b/qt/gen_qtextstream.h index af13ca79..976ae10d 100644 --- a/qt/gen_qtextstream.h +++ b/qt/gen_qtextstream.h @@ -15,14 +15,12 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChar; class QIODevice; class QLocale; class QTextCodec; class QTextStream; #else -typedef struct QByteArray QByteArray; typedef struct QChar QChar; typedef struct QIODevice QIODevice; typedef struct QLocale QLocale; diff --git a/qt/gen_qtimezone.h b/qt/gen_qtimezone.h index 4c4ece2b..202d7ff1 100644 --- a/qt/gen_qtimezone.h +++ b/qt/gen_qtimezone.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QDateTime; class QLocale; class QTimeZone; @@ -25,7 +24,6 @@ typedef QTimeZone::OffsetData QTimeZone__OffsetData; class QTimeZone__OffsetData; #endif #else -typedef struct QByteArray QByteArray; typedef struct QDateTime QDateTime; typedef struct QLocale QLocale; typedef struct QTimeZone QTimeZone; diff --git a/qt/gen_qtoolbar.h b/qt/gen_qtoolbar.h index a91e50ea..fba36d2f 100644 --- a/qt/gen_qtoolbar.h +++ b/qt/gen_qtoolbar.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAction; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -51,7 +50,6 @@ class QWidget; #else typedef struct QAction QAction; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt/gen_qurl.h b/qt/gen_qurl.h index 1f22c509..36edd29d 100644 --- a/qt/gen_qurl.h +++ b/qt/gen_qurl.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QUrl; class QUrlQuery; #else -typedef struct QByteArray QByteArray; typedef struct QUrl QUrl; typedef struct QUrlQuery QUrlQuery; #endif diff --git a/qt/gen_qurlquery.cpp b/qt/gen_qurlquery.cpp index 3efbc8dd..00e11b57 100644 --- a/qt/gen_qurlquery.cpp +++ b/qt/gen_qurlquery.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/qt/gen_quuid.h b/qt/gen_quuid.h index e5a1216c..b5fd206e 100644 --- a/qt/gen_quuid.h +++ b/qt/gen_quuid.h @@ -15,10 +15,8 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QUuid; #else -typedef struct QByteArray QByteArray; typedef struct QUuid QUuid; #endif diff --git a/qt/gen_qvariant.h b/qt/gen_qvariant.h index 9cfa4b87..e1248598 100644 --- a/qt/gen_qvariant.h +++ b/qt/gen_qvariant.h @@ -21,7 +21,6 @@ typedef QAssociativeIterable::const_iterator QAssociativeIterable__const_iterato class QAssociativeIterable__const_iterator; #endif class QBitArray; -class QByteArray; class QChar; class QDataStream; class QDate; @@ -62,7 +61,6 @@ class QVariantComparisonHelper; #else typedef struct QAssociativeIterable__const_iterator QAssociativeIterable__const_iterator; typedef struct QBitArray QBitArray; -typedef struct QByteArray QByteArray; typedef struct QChar QChar; typedef struct QDataStream QDataStream; typedef struct QDate QDate; diff --git a/qt/gen_qvariantanimation.cpp b/qt/gen_qvariantanimation.cpp index 721b1c36..51b13502 100644 --- a/qt/gen_qvariantanimation.cpp +++ b/qt/gen_qvariantanimation.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/qt/gen_qwidget.h b/qt/gen_qwidget.h index de4c4fdd..709dfa3b 100644 --- a/qt/gen_qwidget.h +++ b/qt/gen_qwidget.h @@ -19,7 +19,6 @@ class QAction; class QActionEvent; class QBackingStore; class QBitmap; -class QByteArray; class QChildEvent; class QCloseEvent; class QContextMenuEvent; @@ -75,7 +74,6 @@ typedef struct QAction QAction; typedef struct QActionEvent QActionEvent; typedef struct QBackingStore QBackingStore; typedef struct QBitmap QBitmap; -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; diff --git a/qt/gen_qwindow.h b/qt/gen_qwindow.h index e5e8d55c..0e7d6044 100644 --- a/qt/gen_qwindow.h +++ b/qt/gen_qwindow.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAccessibleInterface; -class QByteArray; class QChildEvent; class QCursor; class QEvent; @@ -47,7 +46,6 @@ class QWheelEvent; class QWindow; #else typedef struct QAccessibleInterface QAccessibleInterface; -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QCursor QCursor; typedef struct QEvent QEvent; diff --git a/qt/gen_qwizard.h b/qt/gen_qwizard.h index d65f15fe..45a944ec 100644 --- a/qt/gen_qwizard.h +++ b/qt/gen_qwizard.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractButton; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDialog; @@ -52,7 +51,6 @@ class QWizardPage; #else typedef struct QAbstractButton QAbstractButton; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDialog QDialog; diff --git a/qt/gen_qxmlstream.h b/qt/gen_qxmlstream.h index 9870b330..a034dd4f 100644 --- a/qt/gen_qxmlstream.h +++ b/qt/gen_qxmlstream.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QTextCodec; class QXmlStreamAttribute; @@ -27,7 +26,6 @@ class QXmlStreamReader; class QXmlStreamStringRef; class QXmlStreamWriter; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QTextCodec QTextCodec; typedef struct QXmlStreamAttribute QXmlStreamAttribute; diff --git a/qt/multimedia/gen_qaudiobuffer.h b/qt/multimedia/gen_qaudiobuffer.h index a88daa5f..d84a4d77 100644 --- a/qt/multimedia/gen_qaudiobuffer.h +++ b/qt/multimedia/gen_qaudiobuffer.h @@ -17,11 +17,9 @@ extern "C" { #ifdef __cplusplus class QAudioBuffer; class QAudioFormat; -class QByteArray; #else typedef struct QAudioBuffer QAudioBuffer; typedef struct QAudioFormat QAudioFormat; -typedef struct QByteArray QByteArray; #endif void QAudioBuffer_new(QAudioBuffer** outptr_QAudioBuffer); diff --git a/qt/multimedia/gen_qaudiosystemplugin.h b/qt/multimedia/gen_qaudiosystemplugin.h index 1b6e852a..a0319686 100644 --- a/qt/multimedia/gen_qaudiosystemplugin.h +++ b/qt/multimedia/gen_qaudiosystemplugin.h @@ -20,7 +20,6 @@ class QAbstractAudioInput; class QAbstractAudioOutput; class QAudioSystemFactoryInterface; class QAudioSystemPlugin; -class QByteArray; class QChildEvent; class QEvent; class QMetaMethod; @@ -33,7 +32,6 @@ typedef struct QAbstractAudioInput QAbstractAudioInput; 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; diff --git a/qt/multimedia/gen_qcamera.h b/qt/multimedia/gen_qcamera.h index 37126e09..2ff55678 100644 --- a/qt/multimedia/gen_qcamera.h +++ b/qt/multimedia/gen_qcamera.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractVideoSurface; -class QByteArray; class QCamera; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QCamera__FrameRateRange) typedef QCamera::FrameRateRange QCamera__FrameRateRange; @@ -37,7 +36,6 @@ class QSize; class QVideoWidget; #else typedef struct QAbstractVideoSurface QAbstractVideoSurface; -typedef struct QByteArray QByteArray; typedef struct QCamera QCamera; typedef struct QCamera__FrameRateRange QCamera__FrameRateRange; typedef struct QCameraExposure QCameraExposure; diff --git a/qt/multimedia/gen_qcamerainfo.h b/qt/multimedia/gen_qcamerainfo.h index 668db4d3..665e62a2 100644 --- a/qt/multimedia/gen_qcamerainfo.h +++ b/qt/multimedia/gen_qcamerainfo.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QCamera; class QCameraInfo; #else -typedef struct QByteArray QByteArray; typedef struct QCamera QCamera; typedef struct QCameraInfo QCameraInfo; #endif diff --git a/qt/multimedia/gen_qmediaserviceproviderplugin.h b/qt/multimedia/gen_qmediaserviceproviderplugin.h index a1ef878c..b75f8a55 100644 --- a/qt/multimedia/gen_qmediaserviceproviderplugin.h +++ b/qt/multimedia/gen_qmediaserviceproviderplugin.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QMediaService; class QMediaServiceCameraInfoInterface; class QMediaServiceDefaultDeviceInterface; @@ -28,7 +27,6 @@ class QMediaServiceSupportedFormatsInterface; class QMetaObject; class QObject; #else -typedef struct QByteArray QByteArray; typedef struct QMediaService QMediaService; typedef struct QMediaServiceCameraInfoInterface QMediaServiceCameraInfoInterface; typedef struct QMediaServiceDefaultDeviceInterface QMediaServiceDefaultDeviceInterface; diff --git a/qt/multimedia/gen_qradiotuner.cpp b/qt/multimedia/gen_qradiotuner.cpp index bc728801..9905dea7 100644 --- a/qt/multimedia/gen_qradiotuner.cpp +++ b/qt/multimedia/gen_qradiotuner.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include diff --git a/qt/multimedia/gen_qradiotunercontrol.cpp b/qt/multimedia/gen_qradiotunercontrol.cpp index f1e91eda..4e453658 100644 --- a/qt/multimedia/gen_qradiotunercontrol.cpp +++ b/qt/multimedia/gen_qradiotunercontrol.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include diff --git a/qt/multimedia/gen_qvideosurfaceformat.h b/qt/multimedia/gen_qvideosurfaceformat.h index 3fed0658..e74424eb 100644 --- a/qt/multimedia/gen_qvideosurfaceformat.h +++ b/qt/multimedia/gen_qvideosurfaceformat.h @@ -15,13 +15,11 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QRect; class QSize; class QVariant; class QVideoSurfaceFormat; #else -typedef struct QByteArray QByteArray; typedef struct QRect QRect; typedef struct QSize QSize; typedef struct QVariant QVariant; diff --git a/qt/multimedia/gen_qvideowidget.h b/qt/multimedia/gen_qvideowidget.h index 66e56c2b..1c8d9626 100644 --- a/qt/multimedia/gen_qvideowidget.h +++ b/qt/multimedia/gen_qvideowidget.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractVideoSurface; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -51,7 +50,6 @@ class QWidget; #else typedef struct QAbstractVideoSurface QAbstractVideoSurface; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt/network/gen_qabstractnetworkcache.cpp b/qt/network/gen_qabstractnetworkcache.cpp index 7b7c0ea8..bc399e51 100644 --- a/qt/network/gen_qabstractnetworkcache.cpp +++ b/qt/network/gen_qabstractnetworkcache.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -6,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/qt/network/gen_qdnslookup.h b/qt/network/gen_qdnslookup.h index 4de12867..92d499f9 100644 --- a/qt/network/gen_qdnslookup.h +++ b/qt/network/gen_qdnslookup.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QDnsDomainNameRecord; class QDnsHostAddressRecord; @@ -30,7 +29,6 @@ class QMetaObject; class QObject; class QTimerEvent; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QDnsDomainNameRecord QDnsDomainNameRecord; typedef struct QDnsHostAddressRecord QDnsHostAddressRecord; diff --git a/qt/network/gen_qdtls.h b/qt/network/gen_qdtls.h index 06bad90c..82b7204d 100644 --- a/qt/network/gen_qdtls.h +++ b/qt/network/gen_qdtls.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QDtls; class QDtlsClientVerifier; @@ -36,7 +35,6 @@ class QSslPreSharedKeyAuthenticator; class QTimerEvent; class QUdpSocket; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QDtls QDtls; typedef struct QDtlsClientVerifier QDtlsClientVerifier; diff --git a/qt/network/gen_qhostaddress.cpp b/qt/network/gen_qhostaddress.cpp index 1df29708..eca54008 100644 --- a/qt/network/gen_qhostaddress.cpp +++ b/qt/network/gen_qhostaddress.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/qt/network/gen_qhttpmultipart.h b/qt/network/gen_qhttpmultipart.h index 34fae476..d7e8c173 100644 --- a/qt/network/gen_qhttpmultipart.h +++ b/qt/network/gen_qhttpmultipart.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QEvent; class QHttpMultiPart; @@ -27,7 +26,6 @@ class QObject; class QTimerEvent; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QHttpMultiPart QHttpMultiPart; diff --git a/qt/network/gen_qnetworkaccessmanager.h b/qt/network/gen_qnetworkaccessmanager.h index d7984a8d..7f3dca13 100644 --- a/qt/network/gen_qnetworkaccessmanager.h +++ b/qt/network/gen_qnetworkaccessmanager.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractNetworkCache; class QAuthenticator; -class QByteArray; class QChildEvent; class QEvent; class QHstsPolicy; @@ -40,7 +39,6 @@ class QTimerEvent; #else typedef struct QAbstractNetworkCache QAbstractNetworkCache; typedef struct QAuthenticator QAuthenticator; -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QHstsPolicy QHstsPolicy; diff --git a/qt/network/gen_qnetworkcookie.h b/qt/network/gen_qnetworkcookie.h index a9b9260b..02144696 100644 --- a/qt/network/gen_qnetworkcookie.h +++ b/qt/network/gen_qnetworkcookie.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QDateTime; class QNetworkCookie; class QUrl; #else -typedef struct QByteArray QByteArray; typedef struct QDateTime QDateTime; typedef struct QNetworkCookie QNetworkCookie; typedef struct QUrl QUrl; diff --git a/qt/network/gen_qnetworkdatagram.h b/qt/network/gen_qnetworkdatagram.h index 9dfd7dcd..50f50977 100644 --- a/qt/network/gen_qnetworkdatagram.h +++ b/qt/network/gen_qnetworkdatagram.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QHostAddress; class QNetworkDatagram; #else -typedef struct QByteArray QByteArray; typedef struct QHostAddress QHostAddress; typedef struct QNetworkDatagram QNetworkDatagram; #endif diff --git a/qt/network/gen_qnetworkproxy.h b/qt/network/gen_qnetworkproxy.h index 66165cfd..743aaadb 100644 --- a/qt/network/gen_qnetworkproxy.h +++ b/qt/network/gen_qnetworkproxy.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QNetworkConfiguration; class QNetworkProxy; class QNetworkProxyFactory; @@ -23,7 +22,6 @@ class QNetworkProxyQuery; class QUrl; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QNetworkConfiguration QNetworkConfiguration; typedef struct QNetworkProxy QNetworkProxy; typedef struct QNetworkProxyFactory QNetworkProxyFactory; diff --git a/qt/network/gen_qnetworkreply.cpp b/qt/network/gen_qnetworkreply.cpp index 71070493..1c94133f 100644 --- a/qt/network/gen_qnetworkreply.cpp +++ b/qt/network/gen_qnetworkreply.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/qt/network/gen_qnetworkreply.h b/qt/network/gen_qnetworkreply.h index 22d7404f..8f26bd9b 100644 --- a/qt/network/gen_qnetworkreply.h +++ b/qt/network/gen_qnetworkreply.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QMetaObject; class QNetworkAccessManager; @@ -28,7 +27,6 @@ class QSslPreSharedKeyAuthenticator; class QUrl; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; typedef struct QNetworkAccessManager QNetworkAccessManager; diff --git a/qt/network/gen_qnetworkrequest.h b/qt/network/gen_qnetworkrequest.h index bcae9f07..623ba4ad 100644 --- a/qt/network/gen_qnetworkrequest.h +++ b/qt/network/gen_qnetworkrequest.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QHttp2Configuration; class QNetworkRequest; class QObject; @@ -23,7 +22,6 @@ class QSslConfiguration; class QUrl; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QHttp2Configuration QHttp2Configuration; typedef struct QNetworkRequest QNetworkRequest; typedef struct QObject QObject; diff --git a/qt/network/gen_qsslcertificate.h b/qt/network/gen_qsslcertificate.h index c3a48903..13909c7f 100644 --- a/qt/network/gen_qsslcertificate.h +++ b/qt/network/gen_qsslcertificate.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QDateTime; class QIODevice; class QSslCertificate; @@ -23,7 +22,6 @@ class QSslCertificateExtension; class QSslError; class QSslKey; #else -typedef struct QByteArray QByteArray; typedef struct QDateTime QDateTime; typedef struct QIODevice QIODevice; typedef struct QSslCertificate QSslCertificate; diff --git a/qt/network/gen_qsslconfiguration.h b/qt/network/gen_qsslconfiguration.h index 707a73b9..851fd813 100644 --- a/qt/network/gen_qsslconfiguration.h +++ b/qt/network/gen_qsslconfiguration.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QSslCertificate; class QSslCipher; class QSslConfiguration; @@ -24,7 +23,6 @@ class QSslEllipticCurve; class QSslKey; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QSslCertificate QSslCertificate; typedef struct QSslCipher QSslCipher; typedef struct QSslConfiguration QSslConfiguration; diff --git a/qt/network/gen_qssldiffiehellmanparameters.h b/qt/network/gen_qssldiffiehellmanparameters.h index 42cc2d31..aa19093e 100644 --- a/qt/network/gen_qssldiffiehellmanparameters.h +++ b/qt/network/gen_qssldiffiehellmanparameters.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QSslDiffieHellmanParameters; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QSslDiffieHellmanParameters QSslDiffieHellmanParameters; #endif diff --git a/qt/network/gen_qsslkey.h b/qt/network/gen_qsslkey.h index a5060efd..5050cdb7 100644 --- a/qt/network/gen_qsslkey.h +++ b/qt/network/gen_qsslkey.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QSslKey; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QSslKey QSslKey; #endif diff --git a/qt/network/gen_qsslpresharedkeyauthenticator.h b/qt/network/gen_qsslpresharedkeyauthenticator.h index 789e09b9..579e36d2 100644 --- a/qt/network/gen_qsslpresharedkeyauthenticator.h +++ b/qt/network/gen_qsslpresharedkeyauthenticator.h @@ -15,10 +15,8 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QSslPreSharedKeyAuthenticator; #else -typedef struct QByteArray QByteArray; typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; #endif diff --git a/qt/network/gen_qsslsocket.h b/qt/network/gen_qsslsocket.h index f3f92545..3124a6ac 100644 --- a/qt/network/gen_qsslsocket.h +++ b/qt/network/gen_qsslsocket.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractSocket; -class QByteArray; class QIODevice; class QMetaObject; class QObject; @@ -32,7 +31,6 @@ class QTcpSocket; class QVariant; #else typedef struct QAbstractSocket QAbstractSocket; -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; diff --git a/qt/network/gen_qudpsocket.h b/qt/network/gen_qudpsocket.h index ba407722..12315d52 100644 --- a/qt/network/gen_qudpsocket.h +++ b/qt/network/gen_qudpsocket.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractSocket; -class QByteArray; class QHostAddress; class QIODevice; class QMetaObject; @@ -27,7 +26,6 @@ class QUdpSocket; class QVariant; #else typedef struct QAbstractSocket QAbstractSocket; -typedef struct QByteArray QByteArray; typedef struct QHostAddress QHostAddress; typedef struct QIODevice QIODevice; typedef struct QMetaObject QMetaObject; diff --git a/qt/printsupport/gen_qprinterinfo.cpp b/qt/printsupport/gen_qprinterinfo.cpp index b3875583..aabaf086 100644 --- a/qt/printsupport/gen_qprinterinfo.cpp +++ b/qt/printsupport/gen_qprinterinfo.cpp @@ -1,7 +1,9 @@ #include #include +#include #include #include +#include #include #include #include diff --git a/qt/printsupport/gen_qprinterinfo.h b/qt/printsupport/gen_qprinterinfo.h index 7f1e7cf8..1ca183d9 100644 --- a/qt/printsupport/gen_qprinterinfo.h +++ b/qt/printsupport/gen_qprinterinfo.h @@ -18,10 +18,12 @@ extern "C" { class QPageSize; class QPrinter; class QPrinterInfo; +class QSizeF; #else typedef struct QPageSize QPageSize; typedef struct QPrinter QPrinter; typedef struct QPrinterInfo QPrinterInfo; +typedef struct QSizeF QSizeF; #endif void QPrinterInfo_new(QPrinterInfo** outptr_QPrinterInfo); diff --git a/qt/printsupport/gen_qprintpreviewwidget.h b/qt/printsupport/gen_qprintpreviewwidget.h index c7f141b4..e6bc47ac 100644 --- a/qt/printsupport/gen_qprintpreviewwidget.h +++ b/qt/printsupport/gen_qprintpreviewwidget.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -48,7 +47,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt/svg/gen_qsvgrenderer.h b/qt/svg/gen_qsvgrenderer.h index e09bc375..67ae8ce6 100644 --- a/qt/svg/gen_qsvgrenderer.h +++ b/qt/svg/gen_qsvgrenderer.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QEvent; class QMatrix; @@ -31,7 +30,6 @@ class QTimerEvent; class QTransform; class QXmlStreamReader; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QMatrix QMatrix; diff --git a/qt/svg/gen_qsvgwidget.h b/qt/svg/gen_qsvgwidget.h index a5e9228b..56039b75 100644 --- a/qt/svg/gen_qsvgwidget.h +++ b/qt/svg/gen_qsvgwidget.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -48,7 +47,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt6/cbor/gen_qcbormap.cpp b/qt6/cbor/gen_qcbormap.cpp index 8dae072d..e29025b8 100644 --- a/qt6/cbor/gen_qcbormap.cpp +++ b/qt6/cbor/gen_qcbormap.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/qt6/cbor/gen_qcborstreamreader.h b/qt6/cbor/gen_qcborstreamreader.h index f2237ad1..277db532 100644 --- a/qt6/cbor/gen_qcborstreamreader.h +++ b/qt6/cbor/gen_qcborstreamreader.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QCborError; class QCborStreamReader; class QIODevice; #else -typedef struct QByteArray QByteArray; typedef struct QCborError QCborError; typedef struct QCborStreamReader QCborStreamReader; typedef struct QIODevice QIODevice; diff --git a/qt6/cbor/gen_qcborstreamwriter.h b/qt6/cbor/gen_qcborstreamwriter.h index 3dc62e47..ec90830e 100644 --- a/qt6/cbor/gen_qcborstreamwriter.h +++ b/qt6/cbor/gen_qcborstreamwriter.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QCborStreamWriter; class QIODevice; #else -typedef struct QByteArray QByteArray; typedef struct QCborStreamWriter QCborStreamWriter; typedef struct QIODevice QIODevice; #endif diff --git a/qt6/cbor/gen_qcborvalue.h b/qt6/cbor/gen_qcborvalue.h index 309fa147..3495f65d 100644 --- a/qt6/cbor/gen_qcborvalue.h +++ b/qt6/cbor/gen_qcborvalue.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QCborArray; class QCborMap; class QCborParserError; @@ -31,7 +30,6 @@ class QUrl; class QUuid; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QCborArray QCborArray; typedef struct QCborMap QCborMap; typedef struct QCborParserError QCborParserError; diff --git a/qt6/gen_qabstractbutton.h b/qt6/gen_qabstractbutton.h index 146e8d1d..f2b83cf4 100644 --- a/qt6/gen_qabstractbutton.h +++ b/qt6/gen_qabstractbutton.h @@ -18,7 +18,6 @@ extern "C" { class QAbstractButton; class QActionEvent; class QButtonGroup; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -54,7 +53,6 @@ class QWidget; 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; diff --git a/qt6/gen_qabstracteventdispatcher.h b/qt6/gen_qabstracteventdispatcher.h index 7e1f541e..df3e0697 100644 --- a/qt6/gen_qabstracteventdispatcher.h +++ b/qt6/gen_qabstracteventdispatcher.h @@ -22,7 +22,6 @@ typedef QAbstractEventDispatcher::TimerInfo QAbstractEventDispatcher__TimerInfo; class QAbstractEventDispatcher__TimerInfo; #endif class QAbstractNativeEventFilter; -class QByteArray; class QMetaObject; class QObject; class QSocketNotifier; @@ -31,7 +30,6 @@ class QThread; typedef struct QAbstractEventDispatcher QAbstractEventDispatcher; typedef struct QAbstractEventDispatcher__TimerInfo QAbstractEventDispatcher__TimerInfo; typedef struct QAbstractNativeEventFilter QAbstractNativeEventFilter; -typedef struct QByteArray QByteArray; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; typedef struct QSocketNotifier QSocketNotifier; diff --git a/qt6/gen_qabstractitemmodel.h b/qt6/gen_qabstractitemmodel.h index b6fbe0ed..eabec1c8 100644 --- a/qt6/gen_qabstractitemmodel.h +++ b/qt6/gen_qabstractitemmodel.h @@ -18,7 +18,6 @@ extern "C" { class QAbstractItemModel; class QAbstractListModel; class QAbstractTableModel; -class QByteArray; class QChildEvent; class QEvent; class QMetaMethod; @@ -36,7 +35,6 @@ class QVariant; 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; diff --git a/qt6/gen_qabstractnativeeventfilter.h b/qt6/gen_qabstractnativeeventfilter.h index 724faac3..f218d207 100644 --- a/qt6/gen_qabstractnativeeventfilter.h +++ b/qt6/gen_qabstractnativeeventfilter.h @@ -16,10 +16,8 @@ extern "C" { #ifdef __cplusplus class QAbstractNativeEventFilter; -class QByteArray; #else typedef struct QAbstractNativeEventFilter QAbstractNativeEventFilter; -typedef struct QByteArray QByteArray; #endif void QAbstractNativeEventFilter_new(QAbstractNativeEventFilter** outptr_QAbstractNativeEventFilter); diff --git a/qt6/gen_qabstractproxymodel.h b/qt6/gen_qabstractproxymodel.h index 77b51480..f03d58f0 100644 --- a/qt6/gen_qabstractproxymodel.h +++ b/qt6/gen_qabstractproxymodel.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; class QAbstractProxyModel; -class QByteArray; class QItemSelection; class QMetaObject; class QMimeData; @@ -29,7 +28,6 @@ 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; diff --git a/qt6/gen_qabstractslider.h b/qt6/gen_qabstractslider.h index d2010310..29ad7639 100644 --- a/qt6/gen_qabstractslider.h +++ b/qt6/gen_qabstractslider.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractSlider; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -50,7 +49,6 @@ class QWidget; #else typedef struct QAbstractSlider QAbstractSlider; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt6/gen_qabstractspinbox.h b/qt6/gen_qabstractspinbox.h index 8e297f88..3eb3dc8c 100644 --- a/qt6/gen_qabstractspinbox.h +++ b/qt6/gen_qabstractspinbox.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractSpinBox; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -51,7 +50,6 @@ class QWidget; #else typedef struct QAbstractSpinBox QAbstractSpinBox; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt6/gen_qaccessible.cpp b/qt6/gen_qaccessible.cpp index 84d2629b..c889e586 100644 --- a/qt6/gen_qaccessible.cpp +++ b/qt6/gen_qaccessible.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/qt6/gen_qaccessible_base.cpp b/qt6/gen_qaccessible_base.cpp index f39c2ca3..c0c54f5f 100644 --- a/qt6/gen_qaccessible_base.cpp +++ b/qt6/gen_qaccessible_base.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include "gen_qaccessible_base.h" diff --git a/qt6/gen_qaccessiblewidget.cpp b/qt6/gen_qaccessiblewidget.cpp index 487aface..843ccaed 100644 --- a/qt6/gen_qaccessiblewidget.cpp +++ b/qt6/gen_qaccessiblewidget.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/qt6/gen_qanystringview.h b/qt6/gen_qanystringview.h index d339db73..9c45948d 100644 --- a/qt6/gen_qanystringview.h +++ b/qt6/gen_qanystringview.h @@ -16,11 +16,9 @@ extern "C" { #ifdef __cplusplus class QAnyStringView; -class QByteArray; class QChar; #else typedef struct QAnyStringView QAnyStringView; -typedef struct QByteArray QByteArray; typedef struct QChar QChar; #endif diff --git a/qt6/gen_qarraydata.cpp b/qt6/gen_qarraydata.cpp index 5948cf3c..46b9e293 100644 --- a/qt6/gen_qarraydata.cpp +++ b/qt6/gen_qarraydata.cpp @@ -1,4 +1,5 @@ #include +#include #include #include "gen_qarraydata.h" #include "_cgo_export.h" diff --git a/qt6/gen_qbrush.cpp b/qt6/gen_qbrush.cpp index e077c211..1d33406f 100644 --- a/qt6/gen_qbrush.cpp +++ b/qt6/gen_qbrush.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/qt6/gen_qbuffer.h b/qt6/gen_qbuffer.h index a42e0b4e..9481f09e 100644 --- a/qt6/gen_qbuffer.h +++ b/qt6/gen_qbuffer.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QBuffer; -class QByteArray; class QIODevice; class QIODeviceBase; class QMetaMethod; @@ -24,7 +23,6 @@ class QMetaObject; class QObject; #else typedef struct QBuffer QBuffer; -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaMethod QMetaMethod; diff --git a/qt6/gen_qbytearraymatcher.h b/qt6/gen_qbytearraymatcher.h index 55d5e376..ebe6273f 100644 --- a/qt6/gen_qbytearraymatcher.h +++ b/qt6/gen_qbytearraymatcher.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QByteArrayMatcher; class QByteArrayView; class QStaticByteArrayMatcherBase; #else -typedef struct QByteArray QByteArray; typedef struct QByteArrayMatcher QByteArrayMatcher; typedef struct QByteArrayView QByteArrayView; typedef struct QStaticByteArrayMatcherBase QStaticByteArrayMatcherBase; diff --git a/qt6/gen_qbytearrayview.h b/qt6/gen_qbytearrayview.h index b5adc3ec..5f71906f 100644 --- a/qt6/gen_qbytearrayview.h +++ b/qt6/gen_qbytearrayview.h @@ -15,10 +15,8 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QByteArrayView; #else -typedef struct QByteArray QByteArray; typedef struct QByteArrayView QByteArrayView; #endif diff --git a/qt6/gen_qcalendarwidget.h b/qt6/gen_qcalendarwidget.h index d35beebc..f3328f22 100644 --- a/qt6/gen_qcalendarwidget.h +++ b/qt6/gen_qcalendarwidget.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCalendar; class QCalendarWidget; class QCloseEvent; @@ -52,7 +51,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCalendar QCalendar; typedef struct QCalendarWidget QCalendarWidget; typedef struct QCloseEvent QCloseEvent; diff --git a/qt6/gen_qcolorspace.h b/qt6/gen_qcolorspace.h index 586e702a..f20f1b0f 100644 --- a/qt6/gen_qcolorspace.h +++ b/qt6/gen_qcolorspace.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QColorSpace; class QColorTransform; class QPointF; #else -typedef struct QByteArray QByteArray; typedef struct QColorSpace QColorSpace; typedef struct QColorTransform QColorTransform; typedef struct QPointF QPointF; diff --git a/qt6/gen_qcombobox.h b/qt6/gen_qcombobox.h index ce2a57fb..86b52c36 100644 --- a/qt6/gen_qcombobox.h +++ b/qt6/gen_qcombobox.h @@ -19,7 +19,6 @@ class QAbstractItemDelegate; class QAbstractItemModel; class QAbstractItemView; class QActionEvent; -class QByteArray; class QCloseEvent; class QComboBox; class QCompleter; @@ -60,7 +59,6 @@ typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractItemView QAbstractItemView; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QComboBox QComboBox; typedef struct QCompleter QCompleter; diff --git a/qt6/gen_qconcatenatetablesproxymodel.h b/qt6/gen_qconcatenatetablesproxymodel.h index d9578f33..d676a0a2 100644 --- a/qt6/gen_qconcatenatetablesproxymodel.h +++ b/qt6/gen_qconcatenatetablesproxymodel.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; -class QByteArray; class QConcatenateTablesProxyModel; class QMetaObject; class QMimeData; @@ -27,7 +26,6 @@ class QSize; class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; -typedef struct QByteArray QByteArray; typedef struct QConcatenateTablesProxyModel QConcatenateTablesProxyModel; typedef struct QMetaObject QMetaObject; typedef struct QMimeData QMimeData; diff --git a/qt6/gen_qcoreevent.h b/qt6/gen_qcoreevent.h index c8001bb4..3d912040 100644 --- a/qt6/gen_qcoreevent.h +++ b/qt6/gen_qcoreevent.h @@ -15,14 +15,12 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QDynamicPropertyChangeEvent; class QEvent; class QObject; class QTimerEvent; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QDynamicPropertyChangeEvent QDynamicPropertyChangeEvent; typedef struct QEvent QEvent; diff --git a/qt6/gen_qcryptographichash.h b/qt6/gen_qcryptographichash.h index 84083f67..7466df55 100644 --- a/qt6/gen_qcryptographichash.h +++ b/qt6/gen_qcryptographichash.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QByteArrayView; class QCryptographicHash; class QIODevice; #else -typedef struct QByteArray QByteArray; typedef struct QByteArrayView QByteArrayView; typedef struct QCryptographicHash QCryptographicHash; typedef struct QIODevice QIODevice; diff --git a/qt6/gen_qdatastream.h b/qt6/gen_qdatastream.h index 1bb781bb..a962b732 100644 --- a/qt6/gen_qdatastream.h +++ b/qt6/gen_qdatastream.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QDataStream; class QIODevice; class QIODeviceBase; #else -typedef struct QByteArray QByteArray; typedef struct QDataStream QDataStream; typedef struct QIODevice QIODevice; typedef struct QIODeviceBase QIODeviceBase; diff --git a/qt6/gen_qdatawidgetmapper.h b/qt6/gen_qdatawidgetmapper.h index eb8e58d1..cd560cc9 100644 --- a/qt6/gen_qdatawidgetmapper.h +++ b/qt6/gen_qdatawidgetmapper.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractItemDelegate; class QAbstractItemModel; -class QByteArray; class QChildEvent; class QDataWidgetMapper; class QEvent; @@ -30,7 +29,6 @@ class QWidget; #else typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QDataWidgetMapper QDataWidgetMapper; typedef struct QEvent QEvent; diff --git a/qt6/gen_qdebug.h b/qt6/gen_qdebug.h index 0bfbd415..b27b21de 100644 --- a/qt6/gen_qdebug.h +++ b/qt6/gen_qdebug.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QByteArrayView; class QChar; class QDebug; @@ -24,7 +23,6 @@ class QIODevice; class QIODeviceBase; class QNoDebug; #else -typedef struct QByteArray QByteArray; typedef struct QByteArrayView QByteArrayView; typedef struct QChar QChar; typedef struct QDebug QDebug; diff --git a/qt6/gen_qdialog.h b/qt6/gen_qdialog.h index c83da026..dadd9909 100644 --- a/qt6/gen_qdialog.h +++ b/qt6/gen_qdialog.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDialog; @@ -48,7 +47,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDialog QDialog; diff --git a/qt6/gen_qdialogbuttonbox.h b/qt6/gen_qdialogbuttonbox.h index f6ad1481..d4fc2a8f 100644 --- a/qt6/gen_qdialogbuttonbox.h +++ b/qt6/gen_qdialogbuttonbox.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractButton; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDialogButtonBox; @@ -51,7 +50,6 @@ class QWidget; #else typedef struct QAbstractButton QAbstractButton; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDialogButtonBox QDialogButtonBox; diff --git a/qt6/gen_qdockwidget.h b/qt6/gen_qdockwidget.h index ec77a24f..25badcb1 100644 --- a/qt6/gen_qdockwidget.h +++ b/qt6/gen_qdockwidget.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAction; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDockWidget; @@ -51,7 +50,6 @@ class QWidget; #else typedef struct QAction QAction; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDockWidget QDockWidget; diff --git a/qt6/gen_qfile.h b/qt6/gen_qfile.h index a9e89e3d..186ebedf 100644 --- a/qt6/gen_qfile.h +++ b/qt6/gen_qfile.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QFile; class QFileDevice; class QIODevice; @@ -23,7 +22,6 @@ class QIODeviceBase; class QMetaObject; class QObject; #else -typedef struct QByteArray QByteArray; typedef struct QFile QFile; typedef struct QFileDevice QFileDevice; typedef struct QIODevice QIODevice; diff --git a/qt6/gen_qfiledialog.h b/qt6/gen_qfiledialog.h index 9f732cd5..71cc4141 100644 --- a/qt6/gen_qfiledialog.h +++ b/qt6/gen_qfiledialog.h @@ -18,7 +18,6 @@ extern "C" { class QAbstractFileIconProvider; class QAbstractItemDelegate; class QAbstractProxyModel; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDialog; @@ -38,7 +37,6 @@ class QWidget; typedef struct QAbstractFileIconProvider QAbstractFileIconProvider; typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractProxyModel QAbstractProxyModel; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDialog QDialog; diff --git a/qt6/gen_qfilesystemmodel.h b/qt6/gen_qfilesystemmodel.h index 13ea8465..98a62c71 100644 --- a/qt6/gen_qfilesystemmodel.h +++ b/qt6/gen_qfilesystemmodel.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractFileIconProvider; class QAbstractItemModel; -class QByteArray; class QDateTime; class QDir; class QEvent; @@ -35,7 +34,6 @@ class QVariant; #else typedef struct QAbstractFileIconProvider QAbstractFileIconProvider; typedef struct QAbstractItemModel QAbstractItemModel; -typedef struct QByteArray QByteArray; typedef struct QDateTime QDateTime; typedef struct QDir QDir; typedef struct QEvent QEvent; diff --git a/qt6/gen_qfocusframe.h b/qt6/gen_qfocusframe.h index 941e61ae..6b56b7a9 100644 --- a/qt6/gen_qfocusframe.h +++ b/qt6/gen_qfocusframe.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -49,7 +48,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt6/gen_qfontdatabase.h b/qt6/gen_qfontdatabase.h index 23167878..2f25de77 100644 --- a/qt6/gen_qfontdatabase.h +++ b/qt6/gen_qfontdatabase.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QFont; class QFontDatabase; class QFontInfo; #else -typedef struct QByteArray QByteArray; typedef struct QFont QFont; typedef struct QFontDatabase QFontDatabase; typedef struct QFontInfo QFontInfo; diff --git a/qt6/gen_qframe.h b/qt6/gen_qframe.h index 6e33017a..298571e8 100644 --- a/qt6/gen_qframe.h +++ b/qt6/gen_qframe.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -50,7 +49,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt6/gen_qgraphicsitemanimation.cpp b/qt6/gen_qgraphicsitemanimation.cpp index 7a1a96db..a20d815a 100644 --- a/qt6/gen_qgraphicsitemanimation.cpp +++ b/qt6/gen_qgraphicsitemanimation.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/qt6/gen_qgroupbox.h b/qt6/gen_qgroupbox.h index 51d0992e..f8ee9e7d 100644 --- a/qt6/gen_qgroupbox.h +++ b/qt6/gen_qgroupbox.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QChildEvent; class QCloseEvent; class QContextMenuEvent; @@ -50,7 +49,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; diff --git a/qt6/gen_qheaderview.h b/qt6/gen_qheaderview.h index bdaaeace..2ce4140f 100644 --- a/qt6/gen_qheaderview.h +++ b/qt6/gen_qheaderview.h @@ -19,7 +19,6 @@ class QAbstractItemDelegate; class QAbstractItemModel; class QAbstractItemView; class QAbstractScrollArea; -class QByteArray; class QDragEnterEvent; class QDragLeaveEvent; class QDragMoveEvent; @@ -54,7 +53,6 @@ typedef struct QAbstractItemDelegate QAbstractItemDelegate; typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractItemView QAbstractItemView; typedef struct QAbstractScrollArea QAbstractScrollArea; -typedef struct QByteArray QByteArray; typedef struct QDragEnterEvent QDragEnterEvent; typedef struct QDragLeaveEvent QDragLeaveEvent; typedef struct QDragMoveEvent QDragMoveEvent; diff --git a/qt6/gen_qidentityproxymodel.h b/qt6/gen_qidentityproxymodel.h index 7412676a..e6ad0eb1 100644 --- a/qt6/gen_qidentityproxymodel.h +++ b/qt6/gen_qidentityproxymodel.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; class QAbstractProxyModel; -class QByteArray; class QIdentityProxyModel; class QItemSelection; class QMetaObject; @@ -29,7 +28,6 @@ class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QAbstractProxyModel QAbstractProxyModel; -typedef struct QByteArray QByteArray; typedef struct QIdentityProxyModel QIdentityProxyModel; typedef struct QItemSelection QItemSelection; typedef struct QMetaObject QMetaObject; diff --git a/qt6/gen_qimage.h b/qt6/gen_qimage.h index 7b681732..17b4343c 100644 --- a/qt6/gen_qimage.h +++ b/qt6/gen_qimage.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QByteArrayView; class QColor; class QColorSpace; @@ -32,7 +31,6 @@ class QSize; class QSizeF; class QTransform; #else -typedef struct QByteArray QByteArray; typedef struct QByteArrayView QByteArrayView; typedef struct QColor QColor; typedef struct QColorSpace QColorSpace; diff --git a/qt6/gen_qimageiohandler.h b/qt6/gen_qimageiohandler.h index 15c27460..36e7563e 100644 --- a/qt6/gen_qimageiohandler.h +++ b/qt6/gen_qimageiohandler.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QEvent; class QIODevice; @@ -30,7 +29,6 @@ class QSize; class QTimerEvent; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; diff --git a/qt6/gen_qimagereader.h b/qt6/gen_qimagereader.h index 63119e11..ebf59b32 100644 --- a/qt6/gen_qimagereader.h +++ b/qt6/gen_qimagereader.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QColor; class QIODevice; class QImage; @@ -23,7 +22,6 @@ class QImageReader; class QRect; class QSize; #else -typedef struct QByteArray QByteArray; typedef struct QColor QColor; typedef struct QIODevice QIODevice; typedef struct QImage QImage; diff --git a/qt6/gen_qimagewriter.h b/qt6/gen_qimagewriter.h index 2991c65a..41cf67e2 100644 --- a/qt6/gen_qimagewriter.h +++ b/qt6/gen_qimagewriter.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QImage; class QImageWriter; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QImage QImage; typedef struct QImageWriter QImageWriter; diff --git a/qt6/gen_qiodevice.h b/qt6/gen_qiodevice.h index c73df608..500f9629 100644 --- a/qt6/gen_qiodevice.h +++ b/qt6/gen_qiodevice.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QEvent; class QIODevice; @@ -25,7 +24,6 @@ class QMetaObject; class QObject; class QTimerEvent; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; diff --git a/qt6/gen_qitemeditorfactory.h b/qt6/gen_qitemeditorfactory.h index 6cf230fa..411cab3f 100644 --- a/qt6/gen_qitemeditorfactory.h +++ b/qt6/gen_qitemeditorfactory.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QItemEditorCreatorBase; class QItemEditorFactory; class QWidget; #else -typedef struct QByteArray QByteArray; typedef struct QItemEditorCreatorBase QItemEditorCreatorBase; typedef struct QItemEditorFactory QItemEditorFactory; typedef struct QWidget QWidget; diff --git a/qt6/gen_qjsondocument.h b/qt6/gen_qjsondocument.h index ff5cdf7e..20c30328 100644 --- a/qt6/gen_qjsondocument.h +++ b/qt6/gen_qjsondocument.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QJsonArray; class QJsonDocument; class QJsonObject; @@ -23,7 +22,6 @@ class QJsonParseError; class QJsonValue; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QJsonArray QJsonArray; typedef struct QJsonDocument QJsonDocument; typedef struct QJsonObject QJsonObject; diff --git a/qt6/gen_qkeysequenceedit.h b/qt6/gen_qkeysequenceedit.h index 244005ad..ca69385b 100644 --- a/qt6/gen_qkeysequenceedit.h +++ b/qt6/gen_qkeysequenceedit.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -50,7 +49,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt6/gen_qlineedit.h b/qt6/gen_qlineedit.h index 9de2c5ff..1bbfbc94 100644 --- a/qt6/gen_qlineedit.h +++ b/qt6/gen_qlineedit.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAction; class QActionEvent; -class QByteArray; class QCloseEvent; class QCompleter; class QContextMenuEvent; @@ -57,7 +56,6 @@ class QWidget; #else typedef struct QAction QAction; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QCompleter QCompleter; typedef struct QContextMenuEvent QContextMenuEvent; diff --git a/qt6/gen_qmainwindow.h b/qt6/gen_qmainwindow.h index ee958c5a..0ae8ddfd 100644 --- a/qt6/gen_qmainwindow.h +++ b/qt6/gen_qmainwindow.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDockWidget; @@ -53,7 +52,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDockWidget QDockWidget; diff --git a/qt6/gen_qmdisubwindow.h b/qt6/gen_qmdisubwindow.h index e5b27295..bc1c7f0f 100644 --- a/qt6/gen_qmdisubwindow.h +++ b/qt6/gen_qmdisubwindow.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QChildEvent; class QCloseEvent; class QContextMenuEvent; @@ -52,7 +51,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; diff --git a/qt6/gen_qmenu.h b/qt6/gen_qmenu.h index 71815384..a023d5b8 100644 --- a/qt6/gen_qmenu.h +++ b/qt6/gen_qmenu.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAction; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -54,7 +53,6 @@ class QWidget; #else typedef struct QAction QAction; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt6/gen_qmenubar.h b/qt6/gen_qmenubar.h index 99c8fc36..8eead24d 100644 --- a/qt6/gen_qmenubar.h +++ b/qt6/gen_qmenubar.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAction; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -55,7 +54,6 @@ class QWidget; #else typedef struct QAction QAction; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt6/gen_qmessageauthenticationcode.h b/qt6/gen_qmessageauthenticationcode.h index 7ae39218..08c330e4 100644 --- a/qt6/gen_qmessageauthenticationcode.h +++ b/qt6/gen_qmessageauthenticationcode.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QMessageAuthenticationCode; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QMessageAuthenticationCode QMessageAuthenticationCode; #endif diff --git a/qt6/gen_qmetaobject.h b/qt6/gen_qmetaobject.h index 24320151..859014e3 100644 --- a/qt6/gen_qmetaobject.h +++ b/qt6/gen_qmetaobject.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QGenericArgument; class QGenericReturnArgument; class QMetaClassInfo; @@ -28,7 +27,6 @@ class QObject; class QUntypedBindable; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QGenericArgument QGenericArgument; typedef struct QGenericReturnArgument QGenericReturnArgument; typedef struct QMetaClassInfo QMetaClassInfo; diff --git a/qt6/gen_qmetatype.h b/qt6/gen_qmetatype.h index 8baabcec..debc02e9 100644 --- a/qt6/gen_qmetatype.h +++ b/qt6/gen_qmetatype.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QByteArrayView; class QDataStream; class QDebug; @@ -23,7 +22,6 @@ class QMetaObject; class QMetaType; class QPartialOrdering; #else -typedef struct QByteArray QByteArray; typedef struct QByteArrayView QByteArrayView; typedef struct QDataStream QDataStream; typedef struct QDebug QDebug; diff --git a/qt6/gen_qmimedata.h b/qt6/gen_qmimedata.h index 6019ec0d..f7cbaa7c 100644 --- a/qt6/gen_qmimedata.h +++ b/qt6/gen_qmimedata.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QEvent; class QMetaMethod; @@ -27,7 +26,6 @@ class QTimerEvent; class QUrl; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QMetaMethod QMetaMethod; diff --git a/qt6/gen_qmimedatabase.h b/qt6/gen_qmimedatabase.h index 504e55e0..185f5936 100644 --- a/qt6/gen_qmimedatabase.h +++ b/qt6/gen_qmimedatabase.h @@ -15,14 +15,12 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QFileInfo; class QIODevice; class QMimeDatabase; class QMimeType; class QUrl; #else -typedef struct QByteArray QByteArray; typedef struct QFileInfo QFileInfo; typedef struct QIODevice QIODevice; typedef struct QMimeDatabase QMimeDatabase; diff --git a/qt6/gen_qmovie.h b/qt6/gen_qmovie.h index 7c3eb1c6..6e9e8ed7 100644 --- a/qt6/gen_qmovie.h +++ b/qt6/gen_qmovie.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QColor; class QEvent; @@ -30,7 +29,6 @@ class QRect; class QSize; class QTimerEvent; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QColor QColor; typedef struct QEvent QEvent; diff --git a/qt6/gen_qobject.h b/qt6/gen_qobject.h index c9df1a59..043ffd0d 100644 --- a/qt6/gen_qobject.h +++ b/qt6/gen_qobject.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAnyStringView; class QBindingStorage; -class QByteArray; class QChildEvent; class QEvent; class QMetaMethod; @@ -36,7 +35,6 @@ class QVariant; #else typedef struct QAnyStringView QAnyStringView; typedef struct QBindingStorage QBindingStorage; -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QMetaMethod QMetaMethod; diff --git a/qt6/gen_qobjectdefs.h b/qt6/gen_qobjectdefs.h index 5dc1ba9a..a5f9be60 100644 --- a/qt6/gen_qobjectdefs.h +++ b/qt6/gen_qobjectdefs.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QGenericArgument; class QGenericReturnArgument; class QMetaClassInfo; @@ -42,7 +41,6 @@ class QMetaType; class QMethodRawArguments; class QObject; #else -typedef struct QByteArray QByteArray; typedef struct QGenericArgument QGenericArgument; typedef struct QGenericReturnArgument QGenericReturnArgument; typedef struct QMetaClassInfo QMetaClassInfo; diff --git a/qt6/gen_qpdfwriter.h b/qt6/gen_qpdfwriter.h index fd06f85c..c850a738 100644 --- a/qt6/gen_qpdfwriter.h +++ b/qt6/gen_qpdfwriter.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QEvent; class QIODevice; @@ -32,7 +31,6 @@ class QPaintEngine; class QPdfWriter; class QTimerEvent; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QIODevice QIODevice; diff --git a/qt6/gen_qpixmap.h b/qt6/gen_qpixmap.h index bf614f93..f1ec3f43 100644 --- a/qt6/gen_qpixmap.h +++ b/qt6/gen_qpixmap.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QBitmap; -class QByteArray; class QColor; class QIODevice; class QImage; @@ -33,7 +32,6 @@ class QSizeF; class QTransform; #else typedef struct QBitmap QBitmap; -typedef struct QByteArray QByteArray; typedef struct QColor QColor; typedef struct QIODevice QIODevice; typedef struct QImage QImage; diff --git a/qt6/gen_qprocess.h b/qt6/gen_qprocess.h index f3695ab6..c2c39b56 100644 --- a/qt6/gen_qprocess.h +++ b/qt6/gen_qprocess.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QIODeviceBase; class QMetaObject; @@ -23,7 +22,6 @@ class QObject; class QProcess; class QProcessEnvironment; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaObject QMetaObject; diff --git a/qt6/gen_qprogressbar.h b/qt6/gen_qprogressbar.h index 362619bc..4976692f 100644 --- a/qt6/gen_qprogressbar.h +++ b/qt6/gen_qprogressbar.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -49,7 +48,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt6/gen_qpropertyanimation.h b/qt6/gen_qpropertyanimation.h index da2535bb..ca86b869 100644 --- a/qt6/gen_qpropertyanimation.h +++ b/qt6/gen_qpropertyanimation.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractAnimation; -class QByteArray; class QEvent; class QMetaObject; class QObject; @@ -25,7 +24,6 @@ class QVariant; class QVariantAnimation; #else typedef struct QAbstractAnimation QAbstractAnimation; -typedef struct QByteArray QByteArray; typedef struct QEvent QEvent; typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; diff --git a/qt6/gen_qrawfont.h b/qt6/gen_qrawfont.h index 98a19b0e..205642eb 100644 --- a/qt6/gen_qrawfont.h +++ b/qt6/gen_qrawfont.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChar; class QFont; class QImage; @@ -25,7 +24,6 @@ class QRawFont; class QRectF; class QTransform; #else -typedef struct QByteArray QByteArray; typedef struct QChar QChar; typedef struct QFont QFont; typedef struct QImage QImage; diff --git a/qt6/gen_qresource.h b/qt6/gen_qresource.h index a0a8eb14..f69ffc9c 100644 --- a/qt6/gen_qresource.h +++ b/qt6/gen_qresource.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QDateTime; class QLocale; class QResource; #else -typedef struct QByteArray QByteArray; typedef struct QDateTime QDateTime; typedef struct QLocale QLocale; typedef struct QResource QResource; diff --git a/qt6/gen_qrubberband.h b/qt6/gen_qrubberband.h index 683f7461..b740c587 100644 --- a/qt6/gen_qrubberband.h +++ b/qt6/gen_qrubberband.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -50,7 +49,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt6/gen_qsizegrip.h b/qt6/gen_qsizegrip.h index 9f9321d0..8ce60dbf 100644 --- a/qt6/gen_qsizegrip.h +++ b/qt6/gen_qsizegrip.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -48,7 +47,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt6/gen_qsortfilterproxymodel.h b/qt6/gen_qsortfilterproxymodel.h index 0f903ec2..226e2b47 100644 --- a/qt6/gen_qsortfilterproxymodel.h +++ b/qt6/gen_qsortfilterproxymodel.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; class QAbstractProxyModel; -class QByteArray; class QItemSelection; class QMetaObject; class QMimeData; @@ -30,7 +29,6 @@ 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; diff --git a/qt6/gen_qsplashscreen.h b/qt6/gen_qsplashscreen.h index b1755a1d..019fd281 100644 --- a/qt6/gen_qsplashscreen.h +++ b/qt6/gen_qsplashscreen.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QColor; class QContextMenuEvent; @@ -51,7 +50,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QColor QColor; typedef struct QContextMenuEvent QContextMenuEvent; diff --git a/qt6/gen_qsplitter.h b/qt6/gen_qsplitter.h index bf208e28..2caf2993 100644 --- a/qt6/gen_qsplitter.h +++ b/qt6/gen_qsplitter.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QChildEvent; class QCloseEvent; class QContextMenuEvent; @@ -52,7 +51,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; diff --git a/qt6/gen_qstandarditemmodel.h b/qt6/gen_qstandarditemmodel.h index da38e6a9..c1301969 100644 --- a/qt6/gen_qstandarditemmodel.h +++ b/qt6/gen_qstandarditemmodel.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; class QBrush; -class QByteArray; class QDataStream; class QFont; class QIcon; @@ -33,7 +32,6 @@ class QVariant; #else typedef struct QAbstractItemModel QAbstractItemModel; typedef struct QBrush QBrush; -typedef struct QByteArray QByteArray; typedef struct QDataStream QDataStream; typedef struct QFont QFont; typedef struct QIcon QIcon; diff --git a/qt6/gen_qstatusbar.h b/qt6/gen_qstatusbar.h index 71849396..add31da5 100644 --- a/qt6/gen_qstatusbar.h +++ b/qt6/gen_qstatusbar.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -48,7 +47,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt6/gen_qstorageinfo.h b/qt6/gen_qstorageinfo.h index e065d05d..310d0878 100644 --- a/qt6/gen_qstorageinfo.h +++ b/qt6/gen_qstorageinfo.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QDir; class QStorageInfo; #else -typedef struct QByteArray QByteArray; typedef struct QDir QDir; typedef struct QStorageInfo QStorageInfo; #endif diff --git a/qt6/gen_qstringview.h b/qt6/gen_qstringview.h index 112a2f9e..0ad40401 100644 --- a/qt6/gen_qstringview.h +++ b/qt6/gen_qstringview.h @@ -15,13 +15,11 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChar; class QRegularExpression; class QRegularExpressionMatch; class QStringView; #else -typedef struct QByteArray QByteArray; typedef struct QChar QChar; typedef struct QRegularExpression QRegularExpression; typedef struct QRegularExpressionMatch QRegularExpressionMatch; diff --git a/qt6/gen_qsurfaceformat.cpp b/qt6/gen_qsurfaceformat.cpp index 771b519b..1939a48e 100644 --- a/qt6/gen_qsurfaceformat.cpp +++ b/qt6/gen_qsurfaceformat.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include "gen_qsurfaceformat.h" diff --git a/qt6/gen_qtabbar.h b/qt6/gen_qtabbar.h index 78e42a26..6e33a8d2 100644 --- a/qt6/gen_qtabbar.h +++ b/qt6/gen_qtabbar.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QColor; class QContextMenuEvent; @@ -53,7 +52,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QColor QColor; typedef struct QContextMenuEvent QContextMenuEvent; diff --git a/qt6/gen_qtabwidget.h b/qt6/gen_qtabwidget.h index 9a62c3f8..7197cf09 100644 --- a/qt6/gen_qtabwidget.h +++ b/qt6/gen_qtabwidget.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -51,7 +50,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt6/gen_qtextdocumentwriter.h b/qt6/gen_qtextdocumentwriter.h index 40e8ad69..193a4af9 100644 --- a/qt6/gen_qtextdocumentwriter.h +++ b/qt6/gen_qtextdocumentwriter.h @@ -15,13 +15,11 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QTextDocument; class QTextDocumentFragment; class QTextDocumentWriter; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QTextDocument QTextDocument; typedef struct QTextDocumentFragment QTextDocumentFragment; diff --git a/qt6/gen_qtextstream.h b/qt6/gen_qtextstream.h index c9ee8840..4f1063ab 100644 --- a/qt6/gen_qtextstream.h +++ b/qt6/gen_qtextstream.h @@ -15,14 +15,12 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChar; class QIODevice; class QIODeviceBase; class QLocale; class QTextStream; #else -typedef struct QByteArray QByteArray; typedef struct QChar QChar; typedef struct QIODevice QIODevice; typedef struct QIODeviceBase QIODeviceBase; diff --git a/qt6/gen_qtimezone.h b/qt6/gen_qtimezone.h index 585de412..0373c977 100644 --- a/qt6/gen_qtimezone.h +++ b/qt6/gen_qtimezone.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QDateTime; class QLocale; class QTimeZone; @@ -25,7 +24,6 @@ typedef QTimeZone::OffsetData QTimeZone__OffsetData; class QTimeZone__OffsetData; #endif #else -typedef struct QByteArray QByteArray; typedef struct QDateTime QDateTime; typedef struct QLocale QLocale; typedef struct QTimeZone QTimeZone; diff --git a/qt6/gen_qtoolbar.h b/qt6/gen_qtoolbar.h index ab96f655..17f967f3 100644 --- a/qt6/gen_qtoolbar.h +++ b/qt6/gen_qtoolbar.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAction; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -52,7 +51,6 @@ class QWidget; #else typedef struct QAction QAction; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt6/gen_qtransposeproxymodel.h b/qt6/gen_qtransposeproxymodel.h index d7f3473d..83b84ce6 100644 --- a/qt6/gen_qtransposeproxymodel.h +++ b/qt6/gen_qtransposeproxymodel.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractItemModel; class QAbstractProxyModel; -class QByteArray; class QItemSelection; class QMetaObject; class QMimeData; @@ -29,7 +28,6 @@ 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; diff --git a/qt6/gen_qurl.h b/qt6/gen_qurl.h index 2f86f66d..cda14117 100644 --- a/qt6/gen_qurl.h +++ b/qt6/gen_qurl.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QUrl; class QUrlQuery; #else -typedef struct QByteArray QByteArray; typedef struct QUrl QUrl; typedef struct QUrlQuery QUrlQuery; #endif diff --git a/qt6/gen_qurlquery.cpp b/qt6/gen_qurlquery.cpp index e7886cbe..9c55d81e 100644 --- a/qt6/gen_qurlquery.cpp +++ b/qt6/gen_qurlquery.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/qt6/gen_quuid.h b/qt6/gen_quuid.h index cc38b213..875656e8 100644 --- a/qt6/gen_quuid.h +++ b/qt6/gen_quuid.h @@ -16,12 +16,10 @@ extern "C" { #ifdef __cplusplus class QAnyStringView; -class QByteArray; class QByteArrayView; class QUuid; #else typedef struct QAnyStringView QAnyStringView; -typedef struct QByteArray QByteArray; typedef struct QByteArrayView QByteArrayView; typedef struct QUuid QUuid; #endif diff --git a/qt6/gen_qvariant.h b/qt6/gen_qvariant.h index dd708b6a..2c7aa58e 100644 --- a/qt6/gen_qvariant.h +++ b/qt6/gen_qvariant.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QBitArray; -class QByteArray; class QChar; class QDataStream; class QDate; @@ -47,7 +46,6 @@ class QVariant; class QVariantConstPointer; #else typedef struct QBitArray QBitArray; -typedef struct QByteArray QByteArray; typedef struct QChar QChar; typedef struct QDataStream QDataStream; typedef struct QDate QDate; diff --git a/qt6/gen_qvariantanimation.cpp b/qt6/gen_qvariantanimation.cpp index 89216162..13820daf 100644 --- a/qt6/gen_qvariantanimation.cpp +++ b/qt6/gen_qvariantanimation.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/qt6/gen_qwidget.h b/qt6/gen_qwidget.h index 6b69f885..c9fd4dae 100644 --- a/qt6/gen_qwidget.h +++ b/qt6/gen_qwidget.h @@ -19,7 +19,6 @@ class QAction; class QActionEvent; class QBackingStore; class QBitmap; -class QByteArray; class QChildEvent; class QCloseEvent; class QContextMenuEvent; @@ -77,7 +76,6 @@ typedef struct QAction QAction; typedef struct QActionEvent QActionEvent; typedef struct QBackingStore QBackingStore; typedef struct QBitmap QBitmap; -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; diff --git a/qt6/gen_qwindow.h b/qt6/gen_qwindow.h index 3fc7da5c..d1915c7c 100644 --- a/qt6/gen_qwindow.h +++ b/qt6/gen_qwindow.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAccessibleInterface; -class QByteArray; class QChildEvent; class QCloseEvent; class QCursor; @@ -50,7 +49,6 @@ class QWheelEvent; class QWindow; #else typedef struct QAccessibleInterface QAccessibleInterface; -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QCloseEvent QCloseEvent; typedef struct QCursor QCursor; diff --git a/qt6/gen_qwizard.h b/qt6/gen_qwizard.h index e8c95a8f..0e0c9850 100644 --- a/qt6/gen_qwizard.h +++ b/qt6/gen_qwizard.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractButton; class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDialog; @@ -53,7 +52,6 @@ class QWizardPage; #else typedef struct QAbstractButton QAbstractButton; typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDialog QDialog; diff --git a/qt6/gen_qxmlstream.h b/qt6/gen_qxmlstream.h index 3300e869..efbedca9 100644 --- a/qt6/gen_qxmlstream.h +++ b/qt6/gen_qxmlstream.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QXmlStreamAttribute; class QXmlStreamEntityDeclaration; @@ -25,7 +24,6 @@ class QXmlStreamNotationDeclaration; class QXmlStreamReader; class QXmlStreamWriter; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QXmlStreamAttribute QXmlStreamAttribute; typedef struct QXmlStreamEntityDeclaration QXmlStreamEntityDeclaration; diff --git a/qt6/multimedia/gen_qaudiobuffer.h b/qt6/multimedia/gen_qaudiobuffer.h index 34101b77..4c03782e 100644 --- a/qt6/multimedia/gen_qaudiobuffer.h +++ b/qt6/multimedia/gen_qaudiobuffer.h @@ -17,11 +17,9 @@ extern "C" { #ifdef __cplusplus class QAudioBuffer; class QAudioFormat; -class QByteArray; #else typedef struct QAudioBuffer QAudioBuffer; typedef struct QAudioFormat QAudioFormat; -typedef struct QByteArray QByteArray; #endif void QAudioBuffer_new(QAudioBuffer** outptr_QAudioBuffer); diff --git a/qt6/multimedia/gen_qaudiodevice.h b/qt6/multimedia/gen_qaudiodevice.h index a37f7cef..9a189a38 100644 --- a/qt6/multimedia/gen_qaudiodevice.h +++ b/qt6/multimedia/gen_qaudiodevice.h @@ -17,11 +17,9 @@ extern "C" { #ifdef __cplusplus class QAudioDevice; class QAudioFormat; -class QByteArray; #else typedef struct QAudioDevice QAudioDevice; typedef struct QAudioFormat QAudioFormat; -typedef struct QByteArray QByteArray; #endif void QAudioDevice_new(QAudioDevice** outptr_QAudioDevice); diff --git a/qt6/multimedia/gen_qcameradevice.h b/qt6/multimedia/gen_qcameradevice.h index c3bff71a..ef87ef5d 100644 --- a/qt6/multimedia/gen_qcameradevice.h +++ b/qt6/multimedia/gen_qcameradevice.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QCameraDevice; class QCameraFormat; class QSize; #else -typedef struct QByteArray QByteArray; typedef struct QCameraDevice QCameraDevice; typedef struct QCameraFormat QCameraFormat; typedef struct QSize QSize; diff --git a/qt6/multimedia/gen_qvideowidget.h b/qt6/multimedia/gen_qvideowidget.h index 850b70aa..488633e0 100644 --- a/qt6/multimedia/gen_qvideowidget.h +++ b/qt6/multimedia/gen_qvideowidget.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -49,7 +48,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt6/network/gen_qabstractnetworkcache.cpp b/qt6/network/gen_qabstractnetworkcache.cpp index e1c54c05..0720ee8d 100644 --- a/qt6/network/gen_qabstractnetworkcache.cpp +++ b/qt6/network/gen_qabstractnetworkcache.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -6,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/qt6/network/gen_qdnslookup.h b/qt6/network/gen_qdnslookup.h index f8221974..3236e076 100644 --- a/qt6/network/gen_qdnslookup.h +++ b/qt6/network/gen_qdnslookup.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QDnsDomainNameRecord; class QDnsHostAddressRecord; @@ -30,7 +29,6 @@ class QMetaObject; class QObject; class QTimerEvent; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QDnsDomainNameRecord QDnsDomainNameRecord; typedef struct QDnsHostAddressRecord QDnsHostAddressRecord; diff --git a/qt6/network/gen_qdtls.h b/qt6/network/gen_qdtls.h index 514be1ec..e6449df7 100644 --- a/qt6/network/gen_qdtls.h +++ b/qt6/network/gen_qdtls.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QDtls; class QDtlsClientVerifier; @@ -36,7 +35,6 @@ class QSslPreSharedKeyAuthenticator; class QTimerEvent; class QUdpSocket; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QDtls QDtls; typedef struct QDtlsClientVerifier QDtlsClientVerifier; diff --git a/qt6/network/gen_qhostaddress.cpp b/qt6/network/gen_qhostaddress.cpp index dabb8e31..35f4c79c 100644 --- a/qt6/network/gen_qhostaddress.cpp +++ b/qt6/network/gen_qhostaddress.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/qt6/network/gen_qhttpmultipart.h b/qt6/network/gen_qhttpmultipart.h index d5ed636b..64166847 100644 --- a/qt6/network/gen_qhttpmultipart.h +++ b/qt6/network/gen_qhttpmultipart.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QEvent; class QHttpMultiPart; @@ -27,7 +26,6 @@ class QObject; class QTimerEvent; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QHttpMultiPart QHttpMultiPart; diff --git a/qt6/network/gen_qnetworkaccessmanager.h b/qt6/network/gen_qnetworkaccessmanager.h index 3513a3a8..f8e014de 100644 --- a/qt6/network/gen_qnetworkaccessmanager.h +++ b/qt6/network/gen_qnetworkaccessmanager.h @@ -17,7 +17,6 @@ extern "C" { #ifdef __cplusplus class QAbstractNetworkCache; class QAuthenticator; -class QByteArray; class QChildEvent; class QEvent; class QHstsPolicy; @@ -39,7 +38,6 @@ class QTimerEvent; #else typedef struct QAbstractNetworkCache QAbstractNetworkCache; typedef struct QAuthenticator QAuthenticator; -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QHstsPolicy QHstsPolicy; diff --git a/qt6/network/gen_qnetworkcookie.h b/qt6/network/gen_qnetworkcookie.h index f04a1b11..43acbfe6 100644 --- a/qt6/network/gen_qnetworkcookie.h +++ b/qt6/network/gen_qnetworkcookie.h @@ -15,12 +15,10 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QDateTime; class QNetworkCookie; class QUrl; #else -typedef struct QByteArray QByteArray; typedef struct QDateTime QDateTime; typedef struct QNetworkCookie QNetworkCookie; typedef struct QUrl QUrl; diff --git a/qt6/network/gen_qnetworkdatagram.h b/qt6/network/gen_qnetworkdatagram.h index 6c8b3149..df07eaad 100644 --- a/qt6/network/gen_qnetworkdatagram.h +++ b/qt6/network/gen_qnetworkdatagram.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QHostAddress; class QNetworkDatagram; #else -typedef struct QByteArray QByteArray; typedef struct QHostAddress QHostAddress; typedef struct QNetworkDatagram QNetworkDatagram; #endif diff --git a/qt6/network/gen_qnetworkproxy.h b/qt6/network/gen_qnetworkproxy.h index 5665ebe7..86ad1900 100644 --- a/qt6/network/gen_qnetworkproxy.h +++ b/qt6/network/gen_qnetworkproxy.h @@ -15,14 +15,12 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QNetworkProxy; class QNetworkProxyFactory; class QNetworkProxyQuery; class QUrl; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QNetworkProxy QNetworkProxy; typedef struct QNetworkProxyFactory QNetworkProxyFactory; typedef struct QNetworkProxyQuery QNetworkProxyQuery; diff --git a/qt6/network/gen_qnetworkreply.cpp b/qt6/network/gen_qnetworkreply.cpp index 4345eede..d7e81024 100644 --- a/qt6/network/gen_qnetworkreply.cpp +++ b/qt6/network/gen_qnetworkreply.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/qt6/network/gen_qnetworkreply.h b/qt6/network/gen_qnetworkreply.h index ed79abd7..fdf8a543 100644 --- a/qt6/network/gen_qnetworkreply.h +++ b/qt6/network/gen_qnetworkreply.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QIODeviceBase; class QMetaObject; @@ -29,7 +28,6 @@ class QSslPreSharedKeyAuthenticator; class QUrl; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaObject QMetaObject; diff --git a/qt6/network/gen_qnetworkrequest.h b/qt6/network/gen_qnetworkrequest.h index 77a33062..f1f4733a 100644 --- a/qt6/network/gen_qnetworkrequest.h +++ b/qt6/network/gen_qnetworkrequest.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QHttp2Configuration; class QNetworkRequest; class QObject; @@ -23,7 +22,6 @@ class QSslConfiguration; class QUrl; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QHttp2Configuration QHttp2Configuration; typedef struct QNetworkRequest QNetworkRequest; typedef struct QObject QObject; diff --git a/qt6/network/gen_qsslcertificate.h b/qt6/network/gen_qsslcertificate.h index 8bada537..516e65fe 100644 --- a/qt6/network/gen_qsslcertificate.h +++ b/qt6/network/gen_qsslcertificate.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QDateTime; class QIODevice; class QSslCertificate; @@ -23,7 +22,6 @@ class QSslCertificateExtension; class QSslError; class QSslKey; #else -typedef struct QByteArray QByteArray; typedef struct QDateTime QDateTime; typedef struct QIODevice QIODevice; typedef struct QSslCertificate QSslCertificate; diff --git a/qt6/network/gen_qsslconfiguration.h b/qt6/network/gen_qsslconfiguration.h index f38fa9e7..275cad21 100644 --- a/qt6/network/gen_qsslconfiguration.h +++ b/qt6/network/gen_qsslconfiguration.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QSslCertificate; class QSslCipher; class QSslConfiguration; @@ -24,7 +23,6 @@ class QSslEllipticCurve; class QSslKey; class QVariant; #else -typedef struct QByteArray QByteArray; typedef struct QSslCertificate QSslCertificate; typedef struct QSslCipher QSslCipher; typedef struct QSslConfiguration QSslConfiguration; diff --git a/qt6/network/gen_qssldiffiehellmanparameters.h b/qt6/network/gen_qssldiffiehellmanparameters.h index 9491a770..a991cc9f 100644 --- a/qt6/network/gen_qssldiffiehellmanparameters.h +++ b/qt6/network/gen_qssldiffiehellmanparameters.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QSslDiffieHellmanParameters; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QSslDiffieHellmanParameters QSslDiffieHellmanParameters; #endif diff --git a/qt6/network/gen_qsslkey.h b/qt6/network/gen_qsslkey.h index 1302d2b0..827f7f35 100644 --- a/qt6/network/gen_qsslkey.h +++ b/qt6/network/gen_qsslkey.h @@ -15,11 +15,9 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QIODevice; class QSslKey; #else -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QSslKey QSslKey; #endif diff --git a/qt6/network/gen_qsslpresharedkeyauthenticator.h b/qt6/network/gen_qsslpresharedkeyauthenticator.h index 3d1d495c..4df336f1 100644 --- a/qt6/network/gen_qsslpresharedkeyauthenticator.h +++ b/qt6/network/gen_qsslpresharedkeyauthenticator.h @@ -15,10 +15,8 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QSslPreSharedKeyAuthenticator; #else -typedef struct QByteArray QByteArray; typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; #endif diff --git a/qt6/network/gen_qsslsocket.h b/qt6/network/gen_qsslsocket.h index e988119b..65e68824 100644 --- a/qt6/network/gen_qsslsocket.h +++ b/qt6/network/gen_qsslsocket.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractSocket; -class QByteArray; class QIODevice; class QIODeviceBase; class QMetaObject; @@ -33,7 +32,6 @@ class QTcpSocket; class QVariant; #else typedef struct QAbstractSocket QAbstractSocket; -typedef struct QByteArray QByteArray; typedef struct QIODevice QIODevice; typedef struct QIODeviceBase QIODeviceBase; typedef struct QMetaObject QMetaObject; diff --git a/qt6/network/gen_qudpsocket.h b/qt6/network/gen_qudpsocket.h index fbc0090d..d155dcc2 100644 --- a/qt6/network/gen_qudpsocket.h +++ b/qt6/network/gen_qudpsocket.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QAbstractSocket; -class QByteArray; class QHostAddress; class QIODevice; class QIODeviceBase; @@ -28,7 +27,6 @@ class QUdpSocket; class QVariant; #else typedef struct QAbstractSocket QAbstractSocket; -typedef struct QByteArray QByteArray; typedef struct QHostAddress QHostAddress; typedef struct QIODevice QIODevice; typedef struct QIODeviceBase QIODeviceBase; diff --git a/qt6/printsupport/gen_qprintpreviewwidget.h b/qt6/printsupport/gen_qprintpreviewwidget.h index 45465dd4..e4ee1e6d 100644 --- a/qt6/printsupport/gen_qprintpreviewwidget.h +++ b/qt6/printsupport/gen_qprintpreviewwidget.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -49,7 +48,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; diff --git a/qt6/svg/gen_qsvgrenderer.h b/qt6/svg/gen_qsvgrenderer.h index 92d0eb86..dd4e3680 100644 --- a/qt6/svg/gen_qsvgrenderer.h +++ b/qt6/svg/gen_qsvgrenderer.h @@ -15,7 +15,6 @@ extern "C" { #endif #ifdef __cplusplus -class QByteArray; class QChildEvent; class QEvent; class QMetaMethod; @@ -30,7 +29,6 @@ class QTimerEvent; class QTransform; class QXmlStreamReader; #else -typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; typedef struct QEvent QEvent; typedef struct QMetaMethod QMetaMethod; diff --git a/qt6/svg/gen_qsvgwidget.h b/qt6/svg/gen_qsvgwidget.h index e18907a2..28c6f069 100644 --- a/qt6/svg/gen_qsvgwidget.h +++ b/qt6/svg/gen_qsvgwidget.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QActionEvent; -class QByteArray; class QCloseEvent; class QContextMenuEvent; class QDragEnterEvent; @@ -49,7 +48,6 @@ class QWheelEvent; class QWidget; #else typedef struct QActionEvent QActionEvent; -typedef struct QByteArray QByteArray; typedef struct QCloseEvent QCloseEvent; typedef struct QContextMenuEvent QContextMenuEvent; typedef struct QDragEnterEvent QDragEnterEvent; From db5fadaeb74646be3d9e81fd0e19a7b3e85b402b Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 26 Nov 2024 22:31:23 +1300 Subject: [PATCH 10/12] webkit: add genbindings support --- cmd/genbindings/config-allowlist.go | 18 ++++++++++++++++++ cmd/genbindings/config-libraries.go | 15 +++++++++++++++ docker/genbindings.Dockerfile | 1 + 3 files changed, 34 insertions(+) diff --git a/cmd/genbindings/config-allowlist.go b/cmd/genbindings/config-allowlist.go index 8104cfaf..c11069f4 100644 --- a/cmd/genbindings/config-allowlist.go +++ b/cmd/genbindings/config-allowlist.go @@ -34,6 +34,14 @@ func InsertTypedefs(qt6 bool) { KnownTypedefs["QFileDevice::Permissions"] = lookupResultTypedef{pp, CppTypedef{"QFile::Permissions", parseSingleTypeString("QFlags")}} KnownTypedefs["QIODevice::OpenMode"] = lookupResultTypedef{pp, CppTypedef{"QIODevice::OpenMode", parseSingleTypeString("QIODeviceBase::OpenMode")}} + // Qt 5 WebKit - use of an empty enum (should be possible to support?) + KnownEnums["QWebPluginFactory::Extension"] = lookupResultEnum{"qt/webkit", CppEnum{ + EnumName: "QWebPluginFactory::Extension", + UnderlyingType: CppParameter{ + ParameterType: "int", + }, + }} + if qt6 { // Qt 6 QVariant helper types - needs investigation KnownTypedefs["QVariantHash"] = lookupResultTypedef{"qt6", CppTypedef{"QVariantHash", parseSingleTypeString("QHash")}} @@ -231,6 +239,14 @@ func AllowVirtualForClass(className string) bool { return false } + // Qt 5 QWebkit: undefined reference to typeinfo + if className == "QWebNotificationPresenter" { + return false + } + if className == "QWebHapticFeedbackPlayer" { + return false + } + return true } @@ -492,6 +508,8 @@ func AllowType(p CppParameter, isReturnType bool) error { "QPostEventList", // Qt QCoreApplication: private headers required "QMetaCallEvent", // .. "QPostEvent", // .. + "QWebFrameAdapter", // Qt 5 Webkit: Used by e.g. qwebframe.h but never defined anywhere + "QWebPageAdapter", // ... "____last____": return ErrTooComplex } diff --git a/cmd/genbindings/config-libraries.go b/cmd/genbindings/config-libraries.go index 1b579663..4ea894b5 100644 --- a/cmd/genbindings/config-libraries.go +++ b/cmd/genbindings/config-libraries.go @@ -114,6 +114,21 @@ func ProcessLibraries(clangBin, outDir, extraLibsDir string) { ClangMatchSameHeaderDefinitionOnly, ) + // Qt 5 QWebkit: depends on Qt5PrintSupport but only at runtime, not at + // codegen time + generate( + "qt/webkit", + []string{ + "/usr/include/x86_64-linux-gnu/qt5/QtWebKit", + "/usr/include/x86_64-linux-gnu/qt5/QtWebKitWidgets", + }, + AllowAllHeaders, + clangBin, + pkgConfigCflags("Qt5WebKitWidgets"), + outDir, + ClangMatchSameHeaderDefinitionOnly, + ) + // Depends on QtCore/Gui/Widgets, QPrintSupport generate( "qt-restricted-extras/qscintilla", diff --git a/docker/genbindings.Dockerfile b/docker/genbindings.Dockerfile index 6ef89cfc..116caa4f 100644 --- a/docker/genbindings.Dockerfile +++ b/docker/genbindings.Dockerfile @@ -7,6 +7,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ qtmultimedia5-dev \ qtscript5-dev \ libqt5svg5-dev \ + libqt5webkit5-dev \ qt6-base-dev \ qt6-multimedia-dev \ qt6-svg-dev \ From 2c067edda55e262e5a4fcaaf120d7f4be402996c Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 26 Nov 2024 22:31:32 +1300 Subject: [PATCH 11/12] webkit: initial generation --- qt/webkit/binding.go | 3 + qt/webkit/cflags.go | 6 + qt/webkit/gen_qgraphicswebview.cpp | 1949 +++++++++++++++++++ qt/webkit/gen_qgraphicswebview.go | 1677 ++++++++++++++++ qt/webkit/gen_qgraphicswebview.h | 282 +++ qt/webkit/gen_qwebdatabase.cpp | 81 + qt/webkit/gen_qwebdatabase.go | 122 ++ qt/webkit/gen_qwebdatabase.h | 41 + qt/webkit/gen_qwebelement.cpp | 755 ++++++++ qt/webkit/gen_qwebelement.go | 1105 +++++++++++ qt/webkit/gen_qwebelement.h | 181 ++ qt/webkit/gen_qwebframe.cpp | 623 ++++++ qt/webkit/gen_qwebframe.go | 869 +++++++++ qt/webkit/gen_qwebframe.h | 174 ++ qt/webkit/gen_qwebfullscreenrequest.cpp | 47 + qt/webkit/gen_qwebfullscreenrequest.go | 108 ++ qt/webkit/gen_qwebfullscreenrequest.h | 40 + qt/webkit/gen_qwebhistory.cpp | 238 +++ qt/webkit/gen_qwebhistory.go | 358 ++++ qt/webkit/gen_qwebhistory.h | 71 + qt/webkit/gen_qwebhistoryinterface.cpp | 417 ++++ qt/webkit/gen_qwebhistoryinterface.go | 395 ++++ qt/webkit/gen_qwebhistoryinterface.h | 73 + qt/webkit/gen_qwebinspector.cpp | 1465 ++++++++++++++ qt/webkit/gen_qwebinspector.go | 1152 +++++++++++ qt/webkit/gen_qwebinspector.h | 187 ++ qt/webkit/gen_qwebkitplatformplugin.cpp | 722 +++++++ qt/webkit/gen_qwebkitplatformplugin.go | 1203 ++++++++++++ qt/webkit/gen_qwebkitplatformplugin.h | 164 ++ qt/webkit/gen_qwebpage.cpp | 1708 +++++++++++++++++ qt/webkit/gen_qwebpage.go | 2343 +++++++++++++++++++++++ qt/webkit/gen_qwebpage.h | 334 ++++ qt/webkit/gen_qwebpluginfactory.cpp | 639 +++++++ qt/webkit/gen_qwebpluginfactory.go | 757 ++++++++ qt/webkit/gen_qwebpluginfactory.h | 120 ++ qt/webkit/gen_qwebsecurityorigin.cpp | 145 ++ qt/webkit/gen_qwebsecurityorigin.go | 209 ++ qt/webkit/gen_qwebsecurityorigin.h | 50 + qt/webkit/gen_qwebsettings.cpp | 263 +++ qt/webkit/gen_qwebsettings.go | 386 ++++ qt/webkit/gen_qwebsettings.h | 76 + qt/webkit/gen_qwebview.cpp | 1806 +++++++++++++++++ qt/webkit/gen_qwebview.go | 1569 +++++++++++++++ qt/webkit/gen_qwebview.h | 275 +++ 44 files changed, 25188 insertions(+) create mode 100644 qt/webkit/binding.go create mode 100644 qt/webkit/cflags.go create mode 100644 qt/webkit/gen_qgraphicswebview.cpp create mode 100644 qt/webkit/gen_qgraphicswebview.go create mode 100644 qt/webkit/gen_qgraphicswebview.h create mode 100644 qt/webkit/gen_qwebdatabase.cpp create mode 100644 qt/webkit/gen_qwebdatabase.go create mode 100644 qt/webkit/gen_qwebdatabase.h create mode 100644 qt/webkit/gen_qwebelement.cpp create mode 100644 qt/webkit/gen_qwebelement.go create mode 100644 qt/webkit/gen_qwebelement.h create mode 100644 qt/webkit/gen_qwebframe.cpp create mode 100644 qt/webkit/gen_qwebframe.go create mode 100644 qt/webkit/gen_qwebframe.h create mode 100644 qt/webkit/gen_qwebfullscreenrequest.cpp create mode 100644 qt/webkit/gen_qwebfullscreenrequest.go create mode 100644 qt/webkit/gen_qwebfullscreenrequest.h create mode 100644 qt/webkit/gen_qwebhistory.cpp create mode 100644 qt/webkit/gen_qwebhistory.go create mode 100644 qt/webkit/gen_qwebhistory.h create mode 100644 qt/webkit/gen_qwebhistoryinterface.cpp create mode 100644 qt/webkit/gen_qwebhistoryinterface.go create mode 100644 qt/webkit/gen_qwebhistoryinterface.h create mode 100644 qt/webkit/gen_qwebinspector.cpp create mode 100644 qt/webkit/gen_qwebinspector.go create mode 100644 qt/webkit/gen_qwebinspector.h create mode 100644 qt/webkit/gen_qwebkitplatformplugin.cpp create mode 100644 qt/webkit/gen_qwebkitplatformplugin.go create mode 100644 qt/webkit/gen_qwebkitplatformplugin.h create mode 100644 qt/webkit/gen_qwebpage.cpp create mode 100644 qt/webkit/gen_qwebpage.go create mode 100644 qt/webkit/gen_qwebpage.h create mode 100644 qt/webkit/gen_qwebpluginfactory.cpp create mode 100644 qt/webkit/gen_qwebpluginfactory.go create mode 100644 qt/webkit/gen_qwebpluginfactory.h create mode 100644 qt/webkit/gen_qwebsecurityorigin.cpp create mode 100644 qt/webkit/gen_qwebsecurityorigin.go create mode 100644 qt/webkit/gen_qwebsecurityorigin.h create mode 100644 qt/webkit/gen_qwebsettings.cpp create mode 100644 qt/webkit/gen_qwebsettings.go create mode 100644 qt/webkit/gen_qwebsettings.h create mode 100644 qt/webkit/gen_qwebview.cpp create mode 100644 qt/webkit/gen_qwebview.go create mode 100644 qt/webkit/gen_qwebview.h diff --git a/qt/webkit/binding.go b/qt/webkit/binding.go new file mode 100644 index 00000000..d5c7fc5c --- /dev/null +++ b/qt/webkit/binding.go @@ -0,0 +1,3 @@ +package webkit + +type QWebPluginFactory__Extension int diff --git a/qt/webkit/cflags.go b/qt/webkit/cflags.go new file mode 100644 index 00000000..5ba3b527 --- /dev/null +++ b/qt/webkit/cflags.go @@ -0,0 +1,6 @@ +package webkit + +/* +#cgo pkg-config: Qt5WebKitWidgets Qt5PrintSupport +*/ +import "C" diff --git a/qt/webkit/gen_qgraphicswebview.cpp b/qt/webkit/gen_qgraphicswebview.cpp new file mode 100644 index 00000000..963937ad --- /dev/null +++ b/qt/webkit/gen_qgraphicswebview.cpp @@ -0,0 +1,1949 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#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_qgraphicswebview.h" +#include "_cgo_export.h" + +class MiqtVirtualQGraphicsWebView : public virtual QGraphicsWebView { +public: + + MiqtVirtualQGraphicsWebView(): QGraphicsWebView() {}; + MiqtVirtualQGraphicsWebView(QGraphicsItem* parent): QGraphicsWebView(parent) {}; + + virtual ~MiqtVirtualQGraphicsWebView() = 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) { + QGraphicsWebView::setGeometry(rect); + return; + } + + const QRectF& rect_ret = rect; + // Cast returned reference into pointer + QRectF* sigval1 = const_cast(&rect_ret); + + miqt_exec_callback_QGraphicsWebView_SetGeometry(this, handle__SetGeometry, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetGeometry(QRectF* rect) { + + QGraphicsWebView::setGeometry(*rect); + + } + + // 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) { + QGraphicsWebView::updateGeometry(); + return; + } + + + miqt_exec_callback_QGraphicsWebView_UpdateGeometry(this, handle__UpdateGeometry); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UpdateGeometry() { + + QGraphicsWebView::updateGeometry(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Paint = 0; + + // Subclass to allow providing a Go implementation + virtual void paint(QPainter* param1, const QStyleOptionGraphicsItem* options, QWidget* widget) override { + if (handle__Paint == 0) { + QGraphicsWebView::paint(param1, options, widget); + return; + } + + QPainter* sigval1 = param1; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) options; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsWebView_Paint(this, handle__Paint, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_Paint(QPainter* param1, QStyleOptionGraphicsItem* options, QWidget* widget) { + + QGraphicsWebView::paint(param1, options, widget); + + } + + // 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 QGraphicsWebView::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_QGraphicsWebView_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(QGraphicsWebView::itemChange(static_cast(change), *value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QGraphicsWebView::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QGraphicsWebView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QGraphicsWebView::event(param1); + + } + + // 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 QGraphicsWebView::sizeHint(which, constraint); + } + + Qt::SizeHint which_ret = which; + int sigval1 = static_cast(which_ret); + const QSizeF& constraint_ret = constraint; + // Cast returned reference into pointer + QSizeF* sigval2 = const_cast(&constraint_ret); + + QSizeF* callback_return_value = miqt_exec_callback_QGraphicsWebView_SizeHint(const_cast(this), handle__SizeHint, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSizeF* virtualbase_SizeHint(int which, QSizeF* constraint) const { + + return new QSizeF(QGraphicsWebView::sizeHint(static_cast(which), *constraint)); + + } + + // 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 QGraphicsWebView::inputMethodQuery(query); + } + + Qt::InputMethodQuery query_ret = query; + int sigval1 = static_cast(query_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsWebView_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(QGraphicsWebView::inputMethodQuery(static_cast(query))); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QGraphicsSceneMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QGraphicsWebView::mousePressEvent(param1); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QGraphicsSceneMouseEvent* param1) { + + QGraphicsWebView::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* param1) override { + if (handle__MouseDoubleClickEvent == 0) { + QGraphicsWebView::mouseDoubleClickEvent(param1); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QGraphicsSceneMouseEvent* param1) { + + QGraphicsWebView::mouseDoubleClickEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QGraphicsWebView::mouseReleaseEvent(param1); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QGraphicsSceneMouseEvent* param1) { + + QGraphicsWebView::mouseReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QGraphicsWebView::mouseMoveEvent(param1); + return; + } + + QGraphicsSceneMouseEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QGraphicsSceneMouseEvent* param1) { + + QGraphicsWebView::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* param1) override { + if (handle__HoverMoveEvent == 0) { + QGraphicsWebView::hoverMoveEvent(param1); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_HoverMoveEvent(this, handle__HoverMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverMoveEvent(QGraphicsSceneHoverEvent* param1) { + + QGraphicsWebView::hoverMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HoverLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* param1) override { + if (handle__HoverLeaveEvent == 0) { + QGraphicsWebView::hoverLeaveEvent(param1); + return; + } + + QGraphicsSceneHoverEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_HoverLeaveEvent(this, handle__HoverLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HoverLeaveEvent(QGraphicsSceneHoverEvent* param1) { + + QGraphicsWebView::hoverLeaveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QGraphicsSceneWheelEvent* param1) override { + if (handle__WheelEvent == 0) { + QGraphicsWebView::wheelEvent(param1); + return; + } + + QGraphicsSceneWheelEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QGraphicsSceneWheelEvent* param1) { + + QGraphicsWebView::wheelEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QGraphicsWebView::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QGraphicsWebView::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* param1) override { + if (handle__KeyReleaseEvent == 0) { + QGraphicsWebView::keyReleaseEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* param1) { + + QGraphicsWebView::keyReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ContextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent* param1) override { + if (handle__ContextMenuEvent == 0) { + QGraphicsWebView::contextMenuEvent(param1); + return; + } + + QGraphicsSceneContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QGraphicsSceneContextMenuEvent* param1) { + + QGraphicsWebView::contextMenuEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QGraphicsSceneDragDropEvent* param1) override { + if (handle__DragEnterEvent == 0) { + QGraphicsWebView::dragEnterEvent(param1); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QGraphicsSceneDragDropEvent* param1) { + + QGraphicsWebView::dragEnterEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent* param1) override { + if (handle__DragLeaveEvent == 0) { + QGraphicsWebView::dragLeaveEvent(param1); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QGraphicsSceneDragDropEvent* param1) { + + QGraphicsWebView::dragLeaveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QGraphicsSceneDragDropEvent* param1) override { + if (handle__DragMoveEvent == 0) { + QGraphicsWebView::dragMoveEvent(param1); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QGraphicsSceneDragDropEvent* param1) { + + QGraphicsWebView::dragMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QGraphicsSceneDragDropEvent* param1) override { + if (handle__DropEvent == 0) { + QGraphicsWebView::dropEvent(param1); + return; + } + + QGraphicsSceneDragDropEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QGraphicsSceneDragDropEvent* param1) { + + QGraphicsWebView::dropEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* param1) override { + if (handle__FocusInEvent == 0) { + QGraphicsWebView::focusInEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* param1) { + + QGraphicsWebView::focusInEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* param1) override { + if (handle__FocusOutEvent == 0) { + QGraphicsWebView::focusOutEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* param1) { + + QGraphicsWebView::focusOutEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QGraphicsWebView::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QGraphicsWebView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QGraphicsWebView::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QGraphicsWebView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QGraphicsWebView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QGraphicsWebView::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SceneEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool sceneEvent(QEvent* param1) override { + if (handle__SceneEvent == 0) { + return QGraphicsWebView::sceneEvent(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QGraphicsWebView_SceneEvent(this, handle__SceneEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SceneEvent(QEvent* param1) { + + return QGraphicsWebView::sceneEvent(param1); + + } + + // 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) { + QGraphicsWebView::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_QGraphicsWebView_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 { + + QGraphicsWebView::getContentsMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Type = 0; + + // Subclass to allow providing a Go implementation + virtual int type() const override { + if (handle__Type == 0) { + return QGraphicsWebView::type(); + } + + + int callback_return_value = miqt_exec_callback_QGraphicsWebView_Type(const_cast(this), handle__Type); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_Type() const { + + return QGraphicsWebView::type(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintWindowFrame = 0; + + // Subclass to allow providing a Go implementation + virtual void paintWindowFrame(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override { + if (handle__PaintWindowFrame == 0) { + QGraphicsWebView::paintWindowFrame(painter, option, widget); + return; + } + + QPainter* sigval1 = painter; + QStyleOptionGraphicsItem* sigval2 = (QStyleOptionGraphicsItem*) option; + QWidget* sigval3 = widget; + + miqt_exec_callback_QGraphicsWebView_PaintWindowFrame(this, handle__PaintWindowFrame, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintWindowFrame(QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + + QGraphicsWebView::paintWindowFrame(painter, option, widget); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__BoundingRect = 0; + + // Subclass to allow providing a Go implementation + virtual QRectF boundingRect() const override { + if (handle__BoundingRect == 0) { + return QGraphicsWebView::boundingRect(); + } + + + QRectF* callback_return_value = miqt_exec_callback_QGraphicsWebView_BoundingRect(const_cast(this), handle__BoundingRect); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QRectF* virtualbase_BoundingRect() const { + + return new QRectF(QGraphicsWebView::boundingRect()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Shape = 0; + + // Subclass to allow providing a Go implementation + virtual QPainterPath shape() const override { + if (handle__Shape == 0) { + return QGraphicsWebView::shape(); + } + + + QPainterPath* callback_return_value = miqt_exec_callback_QGraphicsWebView_Shape(const_cast(this), handle__Shape); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QPainterPath* virtualbase_Shape() const { + + return new QPainterPath(QGraphicsWebView::shape()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InitStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOption* option) const override { + if (handle__InitStyleOption == 0) { + QGraphicsWebView::initStyleOption(option); + return; + } + + QStyleOption* sigval1 = option; + + miqt_exec_callback_QGraphicsWebView_InitStyleOption(const_cast(this), handle__InitStyleOption, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitStyleOption(QStyleOption* option) const { + + QGraphicsWebView::initStyleOption(option); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PropertyChange = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant propertyChange(const QString& propertyName, const QVariant& value) override { + if (handle__PropertyChange == 0) { + return QGraphicsWebView::propertyChange(propertyName, value); + } + + const QString propertyName_ret = propertyName; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray propertyName_b = propertyName_ret.toUtf8(); + struct miqt_string propertyName_ms; + propertyName_ms.len = propertyName_b.length(); + propertyName_ms.data = static_cast(malloc(propertyName_ms.len)); + memcpy(propertyName_ms.data, propertyName_b.data(), propertyName_ms.len); + struct miqt_string sigval1 = propertyName_ms; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + + QVariant* callback_return_value = miqt_exec_callback_QGraphicsWebView_PropertyChange(this, handle__PropertyChange, sigval1, sigval2); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_PropertyChange(struct miqt_string propertyName, QVariant* value) { + QString propertyName_QString = QString::fromUtf8(propertyName.data, propertyName.len); + + return new QVariant(QGraphicsWebView::propertyChange(propertyName_QString, *value)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WindowFrameEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool windowFrameEvent(QEvent* e) override { + if (handle__WindowFrameEvent == 0) { + return QGraphicsWebView::windowFrameEvent(e); + } + + QEvent* sigval1 = e; + + bool callback_return_value = miqt_exec_callback_QGraphicsWebView_WindowFrameEvent(this, handle__WindowFrameEvent, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_WindowFrameEvent(QEvent* e) { + + return QGraphicsWebView::windowFrameEvent(e); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WindowFrameSectionAt = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::WindowFrameSection windowFrameSectionAt(const QPointF& pos) const override { + if (handle__WindowFrameSectionAt == 0) { + return QGraphicsWebView::windowFrameSectionAt(pos); + } + + const QPointF& pos_ret = pos; + // Cast returned reference into pointer + QPointF* sigval1 = const_cast(&pos_ret); + + int callback_return_value = miqt_exec_callback_QGraphicsWebView_WindowFrameSectionAt(const_cast(this), handle__WindowFrameSectionAt, sigval1); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_WindowFrameSectionAt(QPointF* pos) const { + + Qt::WindowFrameSection _ret = QGraphicsWebView::windowFrameSectionAt(*pos); + return static_cast(_ret); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* event) override { + if (handle__ChangeEvent == 0) { + QGraphicsWebView::changeEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWebView_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* event) { + + QGraphicsWebView::changeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QGraphicsWebView::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWebView_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QGraphicsWebView::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__HideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__HideEvent == 0) { + QGraphicsWebView::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWebView_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QGraphicsWebView::hideEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QGraphicsSceneMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QGraphicsWebView::moveEvent(event); + return; + } + + QGraphicsSceneMoveEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWebView_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QGraphicsSceneMoveEvent* event) { + + QGraphicsWebView::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PolishEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void polishEvent() override { + if (handle__PolishEvent == 0) { + QGraphicsWebView::polishEvent(); + return; + } + + + miqt_exec_callback_QGraphicsWebView_PolishEvent(this, handle__PolishEvent); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PolishEvent() { + + QGraphicsWebView::polishEvent(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QGraphicsSceneResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QGraphicsWebView::resizeEvent(event); + return; + } + + QGraphicsSceneResizeEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWebView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QGraphicsSceneResizeEvent* event) { + + QGraphicsWebView::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QGraphicsWebView::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWebView_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QGraphicsWebView::showEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GrabMouseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void grabMouseEvent(QEvent* event) override { + if (handle__GrabMouseEvent == 0) { + QGraphicsWebView::grabMouseEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWebView_GrabMouseEvent(this, handle__GrabMouseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GrabMouseEvent(QEvent* event) { + + QGraphicsWebView::grabMouseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UngrabMouseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void ungrabMouseEvent(QEvent* event) override { + if (handle__UngrabMouseEvent == 0) { + QGraphicsWebView::ungrabMouseEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWebView_UngrabMouseEvent(this, handle__UngrabMouseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UngrabMouseEvent(QEvent* event) { + + QGraphicsWebView::ungrabMouseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__GrabKeyboardEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void grabKeyboardEvent(QEvent* event) override { + if (handle__GrabKeyboardEvent == 0) { + QGraphicsWebView::grabKeyboardEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWebView_GrabKeyboardEvent(this, handle__GrabKeyboardEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_GrabKeyboardEvent(QEvent* event) { + + QGraphicsWebView::grabKeyboardEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UngrabKeyboardEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void ungrabKeyboardEvent(QEvent* event) override { + if (handle__UngrabKeyboardEvent == 0) { + QGraphicsWebView::ungrabKeyboardEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QGraphicsWebView_UngrabKeyboardEvent(this, handle__UngrabKeyboardEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_UngrabKeyboardEvent(QEvent* event) { + + QGraphicsWebView::ungrabKeyboardEvent(event); + + } + +}; + +void QGraphicsWebView_new(QGraphicsWebView** outptr_QGraphicsWebView, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsWebView* ret = new MiqtVirtualQGraphicsWebView(); + *outptr_QGraphicsWebView = ret; + *outptr_QGraphicsWidget = static_cast(ret); + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); +} + +void QGraphicsWebView_new2(QGraphicsItem* parent, QGraphicsWebView** outptr_QGraphicsWebView, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + MiqtVirtualQGraphicsWebView* ret = new MiqtVirtualQGraphicsWebView(parent); + *outptr_QGraphicsWebView = ret; + *outptr_QGraphicsWidget = static_cast(ret); + *outptr_QGraphicsObject = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QGraphicsItem = static_cast(ret); + *outptr_QGraphicsLayoutItem = static_cast(ret); +} + +QMetaObject* QGraphicsWebView_MetaObject(const QGraphicsWebView* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QGraphicsWebView_Metacast(QGraphicsWebView* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QGraphicsWebView_Tr(const char* s) { + QString _ret = QGraphicsWebView::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QGraphicsWebView_TrUtf8(const char* s) { + QString _ret = QGraphicsWebView::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QWebPage* QGraphicsWebView_Page(const QGraphicsWebView* self) { + return self->page(); +} + +void QGraphicsWebView_SetPage(QGraphicsWebView* self, QWebPage* page) { + self->setPage(page); +} + +QUrl* QGraphicsWebView_Url(const QGraphicsWebView* self) { + return new QUrl(self->url()); +} + +void QGraphicsWebView_SetUrl(QGraphicsWebView* self, QUrl* url) { + self->setUrl(*url); +} + +struct miqt_string QGraphicsWebView_Title(const QGraphicsWebView* self) { + QString _ret = self->title(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QIcon* QGraphicsWebView_Icon(const QGraphicsWebView* self) { + return new QIcon(self->icon()); +} + +double QGraphicsWebView_ZoomFactor(const QGraphicsWebView* self) { + qreal _ret = self->zoomFactor(); + return static_cast(_ret); +} + +void QGraphicsWebView_SetZoomFactor(QGraphicsWebView* self, double zoomFactor) { + self->setZoomFactor(static_cast(zoomFactor)); +} + +bool QGraphicsWebView_IsModified(const QGraphicsWebView* self) { + return self->isModified(); +} + +void QGraphicsWebView_Load(QGraphicsWebView* self, QUrl* url) { + self->load(*url); +} + +void QGraphicsWebView_LoadWithRequest(QGraphicsWebView* self, QNetworkRequest* request) { + self->load(*request); +} + +void QGraphicsWebView_SetHtml(QGraphicsWebView* self, struct miqt_string html) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->setHtml(html_QString); +} + +void QGraphicsWebView_SetContent(QGraphicsWebView* self, struct miqt_string data) { + QByteArray data_QByteArray(data.data, data.len); + self->setContent(data_QByteArray); +} + +QWebHistory* QGraphicsWebView_History(const QGraphicsWebView* self) { + return self->history(); +} + +QWebSettings* QGraphicsWebView_Settings(const QGraphicsWebView* self) { + return self->settings(); +} + +QAction* QGraphicsWebView_PageAction(const QGraphicsWebView* self, int action) { + return self->pageAction(static_cast(action)); +} + +void QGraphicsWebView_TriggerPageAction(QGraphicsWebView* self, int action) { + self->triggerPageAction(static_cast(action)); +} + +bool QGraphicsWebView_FindText(QGraphicsWebView* self, struct miqt_string subString) { + QString subString_QString = QString::fromUtf8(subString.data, subString.len); + return self->findText(subString_QString); +} + +bool QGraphicsWebView_ResizesToContents(const QGraphicsWebView* self) { + return self->resizesToContents(); +} + +void QGraphicsWebView_SetResizesToContents(QGraphicsWebView* self, bool enabled) { + self->setResizesToContents(enabled); +} + +bool QGraphicsWebView_IsTiledBackingStoreFrozen(const QGraphicsWebView* self) { + return self->isTiledBackingStoreFrozen(); +} + +void QGraphicsWebView_SetTiledBackingStoreFrozen(QGraphicsWebView* self, bool frozen) { + self->setTiledBackingStoreFrozen(frozen); +} + +void QGraphicsWebView_SetGeometry(QGraphicsWebView* self, QRectF* rect) { + self->setGeometry(*rect); +} + +void QGraphicsWebView_UpdateGeometry(QGraphicsWebView* self) { + self->updateGeometry(); +} + +void QGraphicsWebView_Paint(QGraphicsWebView* self, QPainter* param1, QStyleOptionGraphicsItem* options, QWidget* widget) { + self->paint(param1, options, widget); +} + +QVariant* QGraphicsWebView_ItemChange(QGraphicsWebView* self, int change, QVariant* value) { + return new QVariant(self->itemChange(static_cast(change), *value)); +} + +bool QGraphicsWebView_Event(QGraphicsWebView* self, QEvent* param1) { + return self->event(param1); +} + +QSizeF* QGraphicsWebView_SizeHint(const QGraphicsWebView* self, int which, QSizeF* constraint) { + return new QSizeF(self->sizeHint(static_cast(which), *constraint)); +} + +QVariant* QGraphicsWebView_InputMethodQuery(const QGraphicsWebView* self, int query) { + return new QVariant(self->inputMethodQuery(static_cast(query))); +} + +int QGraphicsWebView_RenderHints(const QGraphicsWebView* self) { + QPainter::RenderHints _ret = self->renderHints(); + return static_cast(_ret); +} + +void QGraphicsWebView_SetRenderHints(QGraphicsWebView* self, int renderHints) { + self->setRenderHints(static_cast(renderHints)); +} + +void QGraphicsWebView_SetRenderHint(QGraphicsWebView* self, int param1) { + self->setRenderHint(static_cast(param1)); +} + +void QGraphicsWebView_Stop(QGraphicsWebView* self) { + self->stop(); +} + +void QGraphicsWebView_Back(QGraphicsWebView* self) { + self->back(); +} + +void QGraphicsWebView_Forward(QGraphicsWebView* self) { + self->forward(); +} + +void QGraphicsWebView_Reload(QGraphicsWebView* self) { + self->reload(); +} + +void QGraphicsWebView_LoadStarted(QGraphicsWebView* self) { + self->loadStarted(); +} + +void QGraphicsWebView_connect_LoadStarted(QGraphicsWebView* self, intptr_t slot) { + MiqtVirtualQGraphicsWebView::connect(self, static_cast(&QGraphicsWebView::loadStarted), self, [=]() { + miqt_exec_callback_QGraphicsWebView_LoadStarted(slot); + }); +} + +void QGraphicsWebView_LoadFinished(QGraphicsWebView* self, bool param1) { + self->loadFinished(param1); +} + +void QGraphicsWebView_connect_LoadFinished(QGraphicsWebView* self, intptr_t slot) { + MiqtVirtualQGraphicsWebView::connect(self, static_cast(&QGraphicsWebView::loadFinished), self, [=](bool param1) { + bool sigval1 = param1; + miqt_exec_callback_QGraphicsWebView_LoadFinished(slot, sigval1); + }); +} + +void QGraphicsWebView_LoadProgress(QGraphicsWebView* self, int progress) { + self->loadProgress(static_cast(progress)); +} + +void QGraphicsWebView_connect_LoadProgress(QGraphicsWebView* self, intptr_t slot) { + MiqtVirtualQGraphicsWebView::connect(self, static_cast(&QGraphicsWebView::loadProgress), self, [=](int progress) { + int sigval1 = progress; + miqt_exec_callback_QGraphicsWebView_LoadProgress(slot, sigval1); + }); +} + +void QGraphicsWebView_UrlChanged(QGraphicsWebView* self, QUrl* param1) { + self->urlChanged(*param1); +} + +void QGraphicsWebView_connect_UrlChanged(QGraphicsWebView* self, intptr_t slot) { + MiqtVirtualQGraphicsWebView::connect(self, static_cast(&QGraphicsWebView::urlChanged), self, [=](const QUrl& param1) { + const QUrl& param1_ret = param1; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(¶m1_ret); + miqt_exec_callback_QGraphicsWebView_UrlChanged(slot, sigval1); + }); +} + +void QGraphicsWebView_TitleChanged(QGraphicsWebView* self, struct miqt_string param1) { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + self->titleChanged(param1_QString); +} + +void QGraphicsWebView_connect_TitleChanged(QGraphicsWebView* self, intptr_t slot) { + MiqtVirtualQGraphicsWebView::connect(self, static_cast(&QGraphicsWebView::titleChanged), self, [=](const QString& param1) { + const QString param1_ret = param1; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray param1_b = param1_ret.toUtf8(); + struct miqt_string param1_ms; + param1_ms.len = param1_b.length(); + param1_ms.data = static_cast(malloc(param1_ms.len)); + memcpy(param1_ms.data, param1_b.data(), param1_ms.len); + struct miqt_string sigval1 = param1_ms; + miqt_exec_callback_QGraphicsWebView_TitleChanged(slot, sigval1); + }); +} + +void QGraphicsWebView_IconChanged(QGraphicsWebView* self) { + self->iconChanged(); +} + +void QGraphicsWebView_connect_IconChanged(QGraphicsWebView* self, intptr_t slot) { + MiqtVirtualQGraphicsWebView::connect(self, static_cast(&QGraphicsWebView::iconChanged), self, [=]() { + miqt_exec_callback_QGraphicsWebView_IconChanged(slot); + }); +} + +void QGraphicsWebView_StatusBarMessage(QGraphicsWebView* self, struct miqt_string message) { + QString message_QString = QString::fromUtf8(message.data, message.len); + self->statusBarMessage(message_QString); +} + +void QGraphicsWebView_connect_StatusBarMessage(QGraphicsWebView* self, intptr_t slot) { + MiqtVirtualQGraphicsWebView::connect(self, static_cast(&QGraphicsWebView::statusBarMessage), self, [=](const QString& message) { + const QString message_ret = message; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray message_b = message_ret.toUtf8(); + struct miqt_string message_ms; + message_ms.len = message_b.length(); + message_ms.data = static_cast(malloc(message_ms.len)); + memcpy(message_ms.data, message_b.data(), message_ms.len); + struct miqt_string sigval1 = message_ms; + miqt_exec_callback_QGraphicsWebView_StatusBarMessage(slot, sigval1); + }); +} + +void QGraphicsWebView_LinkClicked(QGraphicsWebView* self, QUrl* param1) { + self->linkClicked(*param1); +} + +void QGraphicsWebView_connect_LinkClicked(QGraphicsWebView* self, intptr_t slot) { + MiqtVirtualQGraphicsWebView::connect(self, static_cast(&QGraphicsWebView::linkClicked), self, [=](const QUrl& param1) { + const QUrl& param1_ret = param1; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(¶m1_ret); + miqt_exec_callback_QGraphicsWebView_LinkClicked(slot, sigval1); + }); +} + +struct miqt_string QGraphicsWebView_Tr2(const char* s, const char* c) { + QString _ret = QGraphicsWebView::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QGraphicsWebView_Tr3(const char* s, const char* c, int n) { + QString _ret = QGraphicsWebView::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QGraphicsWebView_TrUtf82(const char* s, const char* c) { + QString _ret = QGraphicsWebView::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QGraphicsWebView_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QGraphicsWebView::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QGraphicsWebView_Load2(QGraphicsWebView* self, QNetworkRequest* request, int operation) { + self->load(*request, static_cast(operation)); +} + +void QGraphicsWebView_Load3(QGraphicsWebView* self, QNetworkRequest* request, int operation, struct miqt_string body) { + QByteArray body_QByteArray(body.data, body.len); + self->load(*request, static_cast(operation), body_QByteArray); +} + +void QGraphicsWebView_SetHtml2(QGraphicsWebView* self, struct miqt_string html, QUrl* baseUrl) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->setHtml(html_QString, *baseUrl); +} + +void QGraphicsWebView_SetContent2(QGraphicsWebView* self, struct miqt_string data, struct miqt_string mimeType) { + QByteArray data_QByteArray(data.data, data.len); + QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); + self->setContent(data_QByteArray, mimeType_QString); +} + +void QGraphicsWebView_SetContent3(QGraphicsWebView* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl) { + QByteArray data_QByteArray(data.data, data.len); + QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); + self->setContent(data_QByteArray, mimeType_QString, *baseUrl); +} + +void QGraphicsWebView_TriggerPageAction2(QGraphicsWebView* self, int action, bool checked) { + self->triggerPageAction(static_cast(action), checked); +} + +bool QGraphicsWebView_FindText2(QGraphicsWebView* self, struct miqt_string subString, int options) { + QString subString_QString = QString::fromUtf8(subString.data, subString.len); + return self->findText(subString_QString, static_cast(options)); +} + +void QGraphicsWebView_SetRenderHint2(QGraphicsWebView* self, int param1, bool enabled) { + self->setRenderHint(static_cast(param1), enabled); +} + +void QGraphicsWebView_override_virtual_SetGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__SetGeometry = slot; +} + +void QGraphicsWebView_virtualbase_SetGeometry(void* self, QRectF* rect) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_SetGeometry(rect); +} + +void QGraphicsWebView_override_virtual_UpdateGeometry(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__UpdateGeometry = slot; +} + +void QGraphicsWebView_virtualbase_UpdateGeometry(void* self) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_UpdateGeometry(); +} + +void QGraphicsWebView_override_virtual_Paint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__Paint = slot; +} + +void QGraphicsWebView_virtualbase_Paint(void* self, QPainter* param1, QStyleOptionGraphicsItem* options, QWidget* widget) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_Paint(param1, options, widget); +} + +void QGraphicsWebView_override_virtual_ItemChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__ItemChange = slot; +} + +QVariant* QGraphicsWebView_virtualbase_ItemChange(void* self, int change, QVariant* value) { + return ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_ItemChange(change, value); +} + +void QGraphicsWebView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__Event = slot; +} + +bool QGraphicsWebView_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_Event(param1); +} + +void QGraphicsWebView_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__SizeHint = slot; +} + +QSizeF* QGraphicsWebView_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint) { + return ( (const MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_SizeHint(which, constraint); +} + +void QGraphicsWebView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QGraphicsWebView_virtualbase_InputMethodQuery(const void* self, int query) { + return ( (const MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_InputMethodQuery(query); +} + +void QGraphicsWebView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__MousePressEvent = slot; +} + +void QGraphicsWebView_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QGraphicsWebView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QGraphicsWebView_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_MouseDoubleClickEvent(param1); +} + +void QGraphicsWebView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QGraphicsWebView_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QGraphicsWebView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QGraphicsWebView_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QGraphicsWebView_override_virtual_HoverMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__HoverMoveEvent = slot; +} + +void QGraphicsWebView_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_HoverMoveEvent(param1); +} + +void QGraphicsWebView_override_virtual_HoverLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__HoverLeaveEvent = slot; +} + +void QGraphicsWebView_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_HoverLeaveEvent(param1); +} + +void QGraphicsWebView_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__WheelEvent = slot; +} + +void QGraphicsWebView_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_WheelEvent(param1); +} + +void QGraphicsWebView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__KeyPressEvent = slot; +} + +void QGraphicsWebView_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QGraphicsWebView_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QGraphicsWebView_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_KeyReleaseEvent(param1); +} + +void QGraphicsWebView_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__ContextMenuEvent = slot; +} + +void QGraphicsWebView_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QGraphicsWebView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__DragEnterEvent = slot; +} + +void QGraphicsWebView_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_DragEnterEvent(param1); +} + +void QGraphicsWebView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QGraphicsWebView_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_DragLeaveEvent(param1); +} + +void QGraphicsWebView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__DragMoveEvent = slot; +} + +void QGraphicsWebView_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_DragMoveEvent(param1); +} + +void QGraphicsWebView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__DropEvent = slot; +} + +void QGraphicsWebView_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_DropEvent(param1); +} + +void QGraphicsWebView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__FocusInEvent = slot; +} + +void QGraphicsWebView_virtualbase_FocusInEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_FocusInEvent(param1); +} + +void QGraphicsWebView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__FocusOutEvent = slot; +} + +void QGraphicsWebView_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_FocusOutEvent(param1); +} + +void QGraphicsWebView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__InputMethodEvent = slot; +} + +void QGraphicsWebView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QGraphicsWebView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QGraphicsWebView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QGraphicsWebView_override_virtual_SceneEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__SceneEvent = slot; +} + +bool QGraphicsWebView_virtualbase_SceneEvent(void* self, QEvent* param1) { + return ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_SceneEvent(param1); +} + +void QGraphicsWebView_override_virtual_GetContentsMargins(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__GetContentsMargins = slot; +} + +void QGraphicsWebView_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom) { + ( (const MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_GetContentsMargins(left, top, right, bottom); +} + +void QGraphicsWebView_override_virtual_Type(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__Type = slot; +} + +int QGraphicsWebView_virtualbase_Type(const void* self) { + return ( (const MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_Type(); +} + +void QGraphicsWebView_override_virtual_PaintWindowFrame(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__PaintWindowFrame = slot; +} + +void QGraphicsWebView_virtualbase_PaintWindowFrame(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_PaintWindowFrame(painter, option, widget); +} + +void QGraphicsWebView_override_virtual_BoundingRect(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__BoundingRect = slot; +} + +QRectF* QGraphicsWebView_virtualbase_BoundingRect(const void* self) { + return ( (const MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_BoundingRect(); +} + +void QGraphicsWebView_override_virtual_Shape(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__Shape = slot; +} + +QPainterPath* QGraphicsWebView_virtualbase_Shape(const void* self) { + return ( (const MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_Shape(); +} + +void QGraphicsWebView_override_virtual_InitStyleOption(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__InitStyleOption = slot; +} + +void QGraphicsWebView_virtualbase_InitStyleOption(const void* self, QStyleOption* option) { + ( (const MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_InitStyleOption(option); +} + +void QGraphicsWebView_override_virtual_PropertyChange(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__PropertyChange = slot; +} + +QVariant* QGraphicsWebView_virtualbase_PropertyChange(void* self, struct miqt_string propertyName, QVariant* value) { + return ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_PropertyChange(propertyName, value); +} + +void QGraphicsWebView_override_virtual_WindowFrameEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__WindowFrameEvent = slot; +} + +bool QGraphicsWebView_virtualbase_WindowFrameEvent(void* self, QEvent* e) { + return ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_WindowFrameEvent(e); +} + +void QGraphicsWebView_override_virtual_WindowFrameSectionAt(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__WindowFrameSectionAt = slot; +} + +int QGraphicsWebView_virtualbase_WindowFrameSectionAt(const void* self, QPointF* pos) { + return ( (const MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_WindowFrameSectionAt(pos); +} + +void QGraphicsWebView_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__ChangeEvent = slot; +} + +void QGraphicsWebView_virtualbase_ChangeEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_ChangeEvent(event); +} + +void QGraphicsWebView_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__CloseEvent = slot; +} + +void QGraphicsWebView_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_CloseEvent(event); +} + +void QGraphicsWebView_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__HideEvent = slot; +} + +void QGraphicsWebView_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_HideEvent(event); +} + +void QGraphicsWebView_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__MoveEvent = slot; +} + +void QGraphicsWebView_virtualbase_MoveEvent(void* self, QGraphicsSceneMoveEvent* event) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_MoveEvent(event); +} + +void QGraphicsWebView_override_virtual_PolishEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__PolishEvent = slot; +} + +void QGraphicsWebView_virtualbase_PolishEvent(void* self) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_PolishEvent(); +} + +void QGraphicsWebView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__ResizeEvent = slot; +} + +void QGraphicsWebView_virtualbase_ResizeEvent(void* self, QGraphicsSceneResizeEvent* event) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_ResizeEvent(event); +} + +void QGraphicsWebView_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__ShowEvent = slot; +} + +void QGraphicsWebView_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_ShowEvent(event); +} + +void QGraphicsWebView_override_virtual_GrabMouseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__GrabMouseEvent = slot; +} + +void QGraphicsWebView_virtualbase_GrabMouseEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_GrabMouseEvent(event); +} + +void QGraphicsWebView_override_virtual_UngrabMouseEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__UngrabMouseEvent = slot; +} + +void QGraphicsWebView_virtualbase_UngrabMouseEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_UngrabMouseEvent(event); +} + +void QGraphicsWebView_override_virtual_GrabKeyboardEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__GrabKeyboardEvent = slot; +} + +void QGraphicsWebView_virtualbase_GrabKeyboardEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_GrabKeyboardEvent(event); +} + +void QGraphicsWebView_override_virtual_UngrabKeyboardEvent(void* self, intptr_t slot) { + dynamic_cast( (QGraphicsWebView*)(self) )->handle__UngrabKeyboardEvent = slot; +} + +void QGraphicsWebView_virtualbase_UngrabKeyboardEvent(void* self, QEvent* event) { + ( (MiqtVirtualQGraphicsWebView*)(self) )->virtualbase_UngrabKeyboardEvent(event); +} + +void QGraphicsWebView_Delete(QGraphicsWebView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webkit/gen_qgraphicswebview.go b/qt/webkit/gen_qgraphicswebview.go new file mode 100644 index 00000000..4a5c6171 --- /dev/null +++ b/qt/webkit/gen_qgraphicswebview.go @@ -0,0 +1,1677 @@ +package webkit + +/* + +#include "gen_qgraphicswebview.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "github.com/mappu/miqt/qt/network" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QGraphicsWebView struct { + h *C.QGraphicsWebView + isSubclass bool + *qt.QGraphicsWidget +} + +func (this *QGraphicsWebView) cPointer() *C.QGraphicsWebView { + if this == nil { + return nil + } + return this.h +} + +func (this *QGraphicsWebView) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQGraphicsWebView constructs the type using only CGO pointers. +func newQGraphicsWebView(h *C.QGraphicsWebView, h_QGraphicsWidget *C.QGraphicsWidget, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsWebView { + if h == nil { + return nil + } + return &QGraphicsWebView{h: h, + QGraphicsWidget: qt.UnsafeNewQGraphicsWidget(unsafe.Pointer(h_QGraphicsWidget), unsafe.Pointer(h_QGraphicsObject), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QGraphicsItem), unsafe.Pointer(h_QGraphicsLayoutItem))} +} + +// UnsafeNewQGraphicsWebView constructs the type using only unsafe pointers. +func UnsafeNewQGraphicsWebView(h unsafe.Pointer, h_QGraphicsWidget unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsWebView { + if h == nil { + return nil + } + + return &QGraphicsWebView{h: (*C.QGraphicsWebView)(h), + QGraphicsWidget: qt.UnsafeNewQGraphicsWidget(h_QGraphicsWidget, h_QGraphicsObject, h_QObject, h_QGraphicsItem, h_QGraphicsLayoutItem)} +} + +// NewQGraphicsWebView constructs a new QGraphicsWebView object. +func NewQGraphicsWebView() *QGraphicsWebView { + var outptr_QGraphicsWebView *C.QGraphicsWebView = nil + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsWebView_new(&outptr_QGraphicsWebView, &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsWebView(outptr_QGraphicsWebView, outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret +} + +// NewQGraphicsWebView2 constructs a new QGraphicsWebView object. +func NewQGraphicsWebView2(parent *qt.QGraphicsItem) *QGraphicsWebView { + var outptr_QGraphicsWebView *C.QGraphicsWebView = nil + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + + C.QGraphicsWebView_new2((*C.QGraphicsItem)(parent.UnsafePointer()), &outptr_QGraphicsWebView, &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) + ret := newQGraphicsWebView(outptr_QGraphicsWebView, outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret.isSubclass = true + return ret +} + +func (this *QGraphicsWebView) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QGraphicsWebView_MetaObject(this.h))) +} + +func (this *QGraphicsWebView) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QGraphicsWebView_Metacast(this.h, param1_Cstring)) +} + +func QGraphicsWebView_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsWebView_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QGraphicsWebView_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsWebView_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsWebView) Page() *QWebPage { + return UnsafeNewQWebPage(unsafe.Pointer(C.QGraphicsWebView_Page(this.h)), nil) +} + +func (this *QGraphicsWebView) SetPage(page *QWebPage) { + C.QGraphicsWebView_SetPage(this.h, page.cPointer()) +} + +func (this *QGraphicsWebView) Url() *qt.QUrl { + _ret := C.QGraphicsWebView_Url(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsWebView) SetUrl(url *qt.QUrl) { + C.QGraphicsWebView_SetUrl(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QGraphicsWebView) Title() string { + var _ms C.struct_miqt_string = C.QGraphicsWebView_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsWebView) Icon() *qt.QIcon { + _ret := C.QGraphicsWebView_Icon(this.h) + _goptr := qt.UnsafeNewQIcon(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsWebView) ZoomFactor() float64 { + return (float64)(C.QGraphicsWebView_ZoomFactor(this.h)) +} + +func (this *QGraphicsWebView) SetZoomFactor(zoomFactor float64) { + C.QGraphicsWebView_SetZoomFactor(this.h, (C.double)(zoomFactor)) +} + +func (this *QGraphicsWebView) IsModified() bool { + return (bool)(C.QGraphicsWebView_IsModified(this.h)) +} + +func (this *QGraphicsWebView) Load(url *qt.QUrl) { + C.QGraphicsWebView_Load(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QGraphicsWebView) LoadWithRequest(request *network.QNetworkRequest) { + C.QGraphicsWebView_LoadWithRequest(this.h, (*C.QNetworkRequest)(request.UnsafePointer())) +} + +func (this *QGraphicsWebView) SetHtml(html string) { + html_ms := C.struct_miqt_string{} + html_ms.data = C.CString(html) + html_ms.len = C.size_t(len(html)) + defer C.free(unsafe.Pointer(html_ms.data)) + C.QGraphicsWebView_SetHtml(this.h, html_ms) +} + +func (this *QGraphicsWebView) SetContent(data []byte) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + C.QGraphicsWebView_SetContent(this.h, data_alias) +} + +func (this *QGraphicsWebView) History() *QWebHistory { + return UnsafeNewQWebHistory(unsafe.Pointer(C.QGraphicsWebView_History(this.h))) +} + +func (this *QGraphicsWebView) Settings() *QWebSettings { + return UnsafeNewQWebSettings(unsafe.Pointer(C.QGraphicsWebView_Settings(this.h))) +} + +func (this *QGraphicsWebView) PageAction(action QWebPage__WebAction) *qt.QAction { + return qt.UnsafeNewQAction(unsafe.Pointer(C.QGraphicsWebView_PageAction(this.h, (C.int)(action))), nil) +} + +func (this *QGraphicsWebView) TriggerPageAction(action QWebPage__WebAction) { + C.QGraphicsWebView_TriggerPageAction(this.h, (C.int)(action)) +} + +func (this *QGraphicsWebView) FindText(subString string) bool { + subString_ms := C.struct_miqt_string{} + subString_ms.data = C.CString(subString) + subString_ms.len = C.size_t(len(subString)) + defer C.free(unsafe.Pointer(subString_ms.data)) + return (bool)(C.QGraphicsWebView_FindText(this.h, subString_ms)) +} + +func (this *QGraphicsWebView) ResizesToContents() bool { + return (bool)(C.QGraphicsWebView_ResizesToContents(this.h)) +} + +func (this *QGraphicsWebView) SetResizesToContents(enabled bool) { + C.QGraphicsWebView_SetResizesToContents(this.h, (C.bool)(enabled)) +} + +func (this *QGraphicsWebView) IsTiledBackingStoreFrozen() bool { + return (bool)(C.QGraphicsWebView_IsTiledBackingStoreFrozen(this.h)) +} + +func (this *QGraphicsWebView) SetTiledBackingStoreFrozen(frozen bool) { + C.QGraphicsWebView_SetTiledBackingStoreFrozen(this.h, (C.bool)(frozen)) +} + +func (this *QGraphicsWebView) SetGeometry(rect *qt.QRectF) { + C.QGraphicsWebView_SetGeometry(this.h, (*C.QRectF)(rect.UnsafePointer())) +} + +func (this *QGraphicsWebView) UpdateGeometry() { + C.QGraphicsWebView_UpdateGeometry(this.h) +} + +func (this *QGraphicsWebView) Paint(param1 *qt.QPainter, options *qt.QStyleOptionGraphicsItem, widget *qt.QWidget) { + C.QGraphicsWebView_Paint(this.h, (*C.QPainter)(param1.UnsafePointer()), (*C.QStyleOptionGraphicsItem)(options.UnsafePointer()), (*C.QWidget)(widget.UnsafePointer())) +} + +func (this *QGraphicsWebView) ItemChange(change qt.QGraphicsItem__GraphicsItemChange, value *qt.QVariant) *qt.QVariant { + _ret := C.QGraphicsWebView_ItemChange(this.h, (C.int)(change), (*C.QVariant)(value.UnsafePointer())) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsWebView) Event(param1 *qt.QEvent) bool { + return (bool)(C.QGraphicsWebView_Event(this.h, (*C.QEvent)(param1.UnsafePointer()))) +} + +func (this *QGraphicsWebView) SizeHint(which qt.SizeHint, constraint *qt.QSizeF) *qt.QSizeF { + _ret := C.QGraphicsWebView_SizeHint(this.h, (C.int)(which), (*C.QSizeF)(constraint.UnsafePointer())) + _goptr := qt.UnsafeNewQSizeF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsWebView) InputMethodQuery(query qt.InputMethodQuery) *qt.QVariant { + _ret := C.QGraphicsWebView_InputMethodQuery(this.h, (C.int)(query)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QGraphicsWebView) RenderHints() qt.QPainter__RenderHint { + return (qt.QPainter__RenderHint)(C.QGraphicsWebView_RenderHints(this.h)) +} + +func (this *QGraphicsWebView) SetRenderHints(renderHints qt.QPainter__RenderHint) { + C.QGraphicsWebView_SetRenderHints(this.h, (C.int)(renderHints)) +} + +func (this *QGraphicsWebView) SetRenderHint(param1 qt.QPainter__RenderHint) { + C.QGraphicsWebView_SetRenderHint(this.h, (C.int)(param1)) +} + +func (this *QGraphicsWebView) Stop() { + C.QGraphicsWebView_Stop(this.h) +} + +func (this *QGraphicsWebView) Back() { + C.QGraphicsWebView_Back(this.h) +} + +func (this *QGraphicsWebView) Forward() { + C.QGraphicsWebView_Forward(this.h) +} + +func (this *QGraphicsWebView) Reload() { + C.QGraphicsWebView_Reload(this.h) +} + +func (this *QGraphicsWebView) LoadStarted() { + C.QGraphicsWebView_LoadStarted(this.h) +} +func (this *QGraphicsWebView) OnLoadStarted(slot func()) { + C.QGraphicsWebView_connect_LoadStarted(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_LoadStarted +func miqt_exec_callback_QGraphicsWebView_LoadStarted(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 *QGraphicsWebView) LoadFinished(param1 bool) { + C.QGraphicsWebView_LoadFinished(this.h, (C.bool)(param1)) +} +func (this *QGraphicsWebView) OnLoadFinished(slot func(param1 bool)) { + C.QGraphicsWebView_connect_LoadFinished(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_LoadFinished +func miqt_exec_callback_QGraphicsWebView_LoadFinished(cb C.intptr_t, param1 C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(param1) + + gofunc(slotval1) +} + +func (this *QGraphicsWebView) LoadProgress(progress int) { + C.QGraphicsWebView_LoadProgress(this.h, (C.int)(progress)) +} +func (this *QGraphicsWebView) OnLoadProgress(slot func(progress int)) { + C.QGraphicsWebView_connect_LoadProgress(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_LoadProgress +func miqt_exec_callback_QGraphicsWebView_LoadProgress(cb C.intptr_t, progress C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(progress int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(progress) + + gofunc(slotval1) +} + +func (this *QGraphicsWebView) UrlChanged(param1 *qt.QUrl) { + C.QGraphicsWebView_UrlChanged(this.h, (*C.QUrl)(param1.UnsafePointer())) +} +func (this *QGraphicsWebView) OnUrlChanged(slot func(param1 *qt.QUrl)) { + C.QGraphicsWebView_connect_UrlChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_UrlChanged +func miqt_exec_callback_QGraphicsWebView_UrlChanged(cb C.intptr_t, param1 *C.QUrl) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 *qt.QUrl)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(param1)) + + gofunc(slotval1) +} + +func (this *QGraphicsWebView) TitleChanged(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.QGraphicsWebView_TitleChanged(this.h, param1_ms) +} +func (this *QGraphicsWebView) OnTitleChanged(slot func(param1 string)) { + C.QGraphicsWebView_connect_TitleChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_TitleChanged +func miqt_exec_callback_QGraphicsWebView_TitleChanged(cb C.intptr_t, param1 C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var param1_ms C.struct_miqt_string = param1 + param1_ret := C.GoStringN(param1_ms.data, C.int(int64(param1_ms.len))) + C.free(unsafe.Pointer(param1_ms.data)) + slotval1 := param1_ret + + gofunc(slotval1) +} + +func (this *QGraphicsWebView) IconChanged() { + C.QGraphicsWebView_IconChanged(this.h) +} +func (this *QGraphicsWebView) OnIconChanged(slot func()) { + C.QGraphicsWebView_connect_IconChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_IconChanged +func miqt_exec_callback_QGraphicsWebView_IconChanged(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 *QGraphicsWebView) StatusBarMessage(message string) { + message_ms := C.struct_miqt_string{} + message_ms.data = C.CString(message) + message_ms.len = C.size_t(len(message)) + defer C.free(unsafe.Pointer(message_ms.data)) + C.QGraphicsWebView_StatusBarMessage(this.h, message_ms) +} +func (this *QGraphicsWebView) OnStatusBarMessage(slot func(message string)) { + C.QGraphicsWebView_connect_StatusBarMessage(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_StatusBarMessage +func miqt_exec_callback_QGraphicsWebView_StatusBarMessage(cb C.intptr_t, message C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(message string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var message_ms C.struct_miqt_string = message + message_ret := C.GoStringN(message_ms.data, C.int(int64(message_ms.len))) + C.free(unsafe.Pointer(message_ms.data)) + slotval1 := message_ret + + gofunc(slotval1) +} + +func (this *QGraphicsWebView) LinkClicked(param1 *qt.QUrl) { + C.QGraphicsWebView_LinkClicked(this.h, (*C.QUrl)(param1.UnsafePointer())) +} +func (this *QGraphicsWebView) OnLinkClicked(slot func(param1 *qt.QUrl)) { + C.QGraphicsWebView_connect_LinkClicked(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_LinkClicked +func miqt_exec_callback_QGraphicsWebView_LinkClicked(cb C.intptr_t, param1 *C.QUrl) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 *qt.QUrl)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(param1)) + + gofunc(slotval1) +} + +func QGraphicsWebView_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsWebView_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QGraphicsWebView_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsWebView_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QGraphicsWebView_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsWebView_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QGraphicsWebView_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QGraphicsWebView_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QGraphicsWebView) Load2(request *network.QNetworkRequest, operation network.QNetworkAccessManager__Operation) { + C.QGraphicsWebView_Load2(this.h, (*C.QNetworkRequest)(request.UnsafePointer()), (C.int)(operation)) +} + +func (this *QGraphicsWebView) Load3(request *network.QNetworkRequest, operation network.QNetworkAccessManager__Operation, body []byte) { + body_alias := C.struct_miqt_string{} + body_alias.data = (*C.char)(unsafe.Pointer(&body[0])) + body_alias.len = C.size_t(len(body)) + C.QGraphicsWebView_Load3(this.h, (*C.QNetworkRequest)(request.UnsafePointer()), (C.int)(operation), body_alias) +} + +func (this *QGraphicsWebView) SetHtml2(html string, baseUrl *qt.QUrl) { + html_ms := C.struct_miqt_string{} + html_ms.data = C.CString(html) + html_ms.len = C.size_t(len(html)) + defer C.free(unsafe.Pointer(html_ms.data)) + C.QGraphicsWebView_SetHtml2(this.h, html_ms, (*C.QUrl)(baseUrl.UnsafePointer())) +} + +func (this *QGraphicsWebView) SetContent2(data []byte, mimeType string) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + mimeType_ms := C.struct_miqt_string{} + mimeType_ms.data = C.CString(mimeType) + mimeType_ms.len = C.size_t(len(mimeType)) + defer C.free(unsafe.Pointer(mimeType_ms.data)) + C.QGraphicsWebView_SetContent2(this.h, data_alias, mimeType_ms) +} + +func (this *QGraphicsWebView) SetContent3(data []byte, mimeType string, baseUrl *qt.QUrl) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + mimeType_ms := C.struct_miqt_string{} + mimeType_ms.data = C.CString(mimeType) + mimeType_ms.len = C.size_t(len(mimeType)) + defer C.free(unsafe.Pointer(mimeType_ms.data)) + C.QGraphicsWebView_SetContent3(this.h, data_alias, mimeType_ms, (*C.QUrl)(baseUrl.UnsafePointer())) +} + +func (this *QGraphicsWebView) TriggerPageAction2(action QWebPage__WebAction, checked bool) { + C.QGraphicsWebView_TriggerPageAction2(this.h, (C.int)(action), (C.bool)(checked)) +} + +func (this *QGraphicsWebView) FindText2(subString string, options QWebPage__FindFlag) bool { + subString_ms := C.struct_miqt_string{} + subString_ms.data = C.CString(subString) + subString_ms.len = C.size_t(len(subString)) + defer C.free(unsafe.Pointer(subString_ms.data)) + return (bool)(C.QGraphicsWebView_FindText2(this.h, subString_ms, (C.int)(options))) +} + +func (this *QGraphicsWebView) SetRenderHint2(param1 qt.QPainter__RenderHint, enabled bool) { + C.QGraphicsWebView_SetRenderHint2(this.h, (C.int)(param1), (C.bool)(enabled)) +} + +func (this *QGraphicsWebView) callVirtualBase_SetGeometry(rect *qt.QRectF) { + + C.QGraphicsWebView_virtualbase_SetGeometry(unsafe.Pointer(this.h), (*C.QRectF)(rect.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnSetGeometry(slot func(super func(rect *qt.QRectF), rect *qt.QRectF)) { + C.QGraphicsWebView_override_virtual_SetGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_SetGeometry +func miqt_exec_callback_QGraphicsWebView_SetGeometry(self *C.QGraphicsWebView, cb C.intptr_t, rect *C.QRectF) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(rect *qt.QRectF), rect *qt.QRectF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQRectF(unsafe.Pointer(rect)) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_SetGeometry, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_UpdateGeometry() { + + C.QGraphicsWebView_virtualbase_UpdateGeometry(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsWebView) OnUpdateGeometry(slot func(super func())) { + C.QGraphicsWebView_override_virtual_UpdateGeometry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_UpdateGeometry +func miqt_exec_callback_QGraphicsWebView_UpdateGeometry(self *C.QGraphicsWebView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_UpdateGeometry) + +} + +func (this *QGraphicsWebView) callVirtualBase_Paint(param1 *qt.QPainter, options *qt.QStyleOptionGraphicsItem, widget *qt.QWidget) { + + C.QGraphicsWebView_virtualbase_Paint(unsafe.Pointer(this.h), (*C.QPainter)(param1.UnsafePointer()), (*C.QStyleOptionGraphicsItem)(options.UnsafePointer()), (*C.QWidget)(widget.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnPaint(slot func(super func(param1 *qt.QPainter, options *qt.QStyleOptionGraphicsItem, widget *qt.QWidget), param1 *qt.QPainter, options *qt.QStyleOptionGraphicsItem, widget *qt.QWidget)) { + C.QGraphicsWebView_override_virtual_Paint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_Paint +func miqt_exec_callback_QGraphicsWebView_Paint(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QPainter, options *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QPainter, options *qt.QStyleOptionGraphicsItem, widget *qt.QWidget), param1 *qt.QPainter, options *qt.QStyleOptionGraphicsItem, widget *qt.QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(param1)) + slotval2 := qt.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(options), nil) + slotval3 := qt.UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsWebView) callVirtualBase_ItemChange(change qt.QGraphicsItem__GraphicsItemChange, value *qt.QVariant) *qt.QVariant { + + _ret := C.QGraphicsWebView_virtualbase_ItemChange(unsafe.Pointer(this.h), (C.int)(change), (*C.QVariant)(value.UnsafePointer())) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsWebView) OnItemChange(slot func(super func(change qt.QGraphicsItem__GraphicsItemChange, value *qt.QVariant) *qt.QVariant, change qt.QGraphicsItem__GraphicsItemChange, value *qt.QVariant) *qt.QVariant) { + C.QGraphicsWebView_override_virtual_ItemChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_ItemChange +func miqt_exec_callback_QGraphicsWebView_ItemChange(self *C.QGraphicsWebView, cb C.intptr_t, change C.int, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(change qt.QGraphicsItem__GraphicsItemChange, value *qt.QVariant) *qt.QVariant, change qt.QGraphicsItem__GraphicsItemChange, value *qt.QVariant) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.QGraphicsItem__GraphicsItemChange)(change) + + slotval2 := qt.UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsWebView{h: self}).callVirtualBase_ItemChange, slotval1, slotval2) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QGraphicsWebView) callVirtualBase_Event(param1 *qt.QEvent) bool { + + return (bool)(C.QGraphicsWebView_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QGraphicsWebView) OnEvent(slot func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) { + C.QGraphicsWebView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_Event +func miqt_exec_callback_QGraphicsWebView_Event(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QGraphicsWebView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsWebView) callVirtualBase_SizeHint(which qt.SizeHint, constraint *qt.QSizeF) *qt.QSizeF { + + _ret := C.QGraphicsWebView_virtualbase_SizeHint(unsafe.Pointer(this.h), (C.int)(which), (*C.QSizeF)(constraint.UnsafePointer())) + _goptr := qt.UnsafeNewQSizeF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsWebView) OnSizeHint(slot func(super func(which qt.SizeHint, constraint *qt.QSizeF) *qt.QSizeF, which qt.SizeHint, constraint *qt.QSizeF) *qt.QSizeF) { + C.QGraphicsWebView_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_SizeHint +func miqt_exec_callback_QGraphicsWebView_SizeHint(self *C.QGraphicsWebView, cb C.intptr_t, which C.int, constraint *C.QSizeF) *C.QSizeF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(which qt.SizeHint, constraint *qt.QSizeF) *qt.QSizeF, which qt.SizeHint, constraint *qt.QSizeF) *qt.QSizeF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.SizeHint)(which) + + slotval2 := qt.UnsafeNewQSizeF(unsafe.Pointer(constraint)) + + virtualReturn := gofunc((&QGraphicsWebView{h: self}).callVirtualBase_SizeHint, slotval1, slotval2) + + return (*C.QSizeF)(virtualReturn.UnsafePointer()) + +} + +func (this *QGraphicsWebView) callVirtualBase_InputMethodQuery(query qt.InputMethodQuery) *qt.QVariant { + + _ret := C.QGraphicsWebView_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(query)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsWebView) OnInputMethodQuery(slot func(super func(query qt.InputMethodQuery) *qt.QVariant, query qt.InputMethodQuery) *qt.QVariant) { + C.QGraphicsWebView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_InputMethodQuery +func miqt_exec_callback_QGraphicsWebView_InputMethodQuery(self *C.QGraphicsWebView, cb C.intptr_t, query C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(query qt.InputMethodQuery) *qt.QVariant, query qt.InputMethodQuery) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.InputMethodQuery)(query) + + virtualReturn := gofunc((&QGraphicsWebView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QGraphicsWebView) callVirtualBase_MousePressEvent(param1 *qt.QGraphicsSceneMouseEvent) { + + C.QGraphicsWebView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QGraphicsSceneMouseEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnMousePressEvent(slot func(super func(param1 *qt.QGraphicsSceneMouseEvent), param1 *qt.QGraphicsSceneMouseEvent)) { + C.QGraphicsWebView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_MousePressEvent +func miqt_exec_callback_QGraphicsWebView_MousePressEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QGraphicsSceneMouseEvent), param1 *qt.QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_MouseDoubleClickEvent(param1 *qt.QGraphicsSceneMouseEvent) { + + C.QGraphicsWebView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QGraphicsSceneMouseEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnMouseDoubleClickEvent(slot func(super func(param1 *qt.QGraphicsSceneMouseEvent), param1 *qt.QGraphicsSceneMouseEvent)) { + C.QGraphicsWebView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_MouseDoubleClickEvent +func miqt_exec_callback_QGraphicsWebView_MouseDoubleClickEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QGraphicsSceneMouseEvent), param1 *qt.QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_MouseReleaseEvent(param1 *qt.QGraphicsSceneMouseEvent) { + + C.QGraphicsWebView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QGraphicsSceneMouseEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnMouseReleaseEvent(slot func(super func(param1 *qt.QGraphicsSceneMouseEvent), param1 *qt.QGraphicsSceneMouseEvent)) { + C.QGraphicsWebView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_MouseReleaseEvent +func miqt_exec_callback_QGraphicsWebView_MouseReleaseEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QGraphicsSceneMouseEvent), param1 *qt.QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_MouseMoveEvent(param1 *qt.QGraphicsSceneMouseEvent) { + + C.QGraphicsWebView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QGraphicsSceneMouseEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnMouseMoveEvent(slot func(super func(param1 *qt.QGraphicsSceneMouseEvent), param1 *qt.QGraphicsSceneMouseEvent)) { + C.QGraphicsWebView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_MouseMoveEvent +func miqt_exec_callback_QGraphicsWebView_MouseMoveEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QGraphicsSceneMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QGraphicsSceneMouseEvent), param1 *qt.QGraphicsSceneMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_HoverMoveEvent(param1 *qt.QGraphicsSceneHoverEvent) { + + C.QGraphicsWebView_virtualbase_HoverMoveEvent(unsafe.Pointer(this.h), (*C.QGraphicsSceneHoverEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnHoverMoveEvent(slot func(super func(param1 *qt.QGraphicsSceneHoverEvent), param1 *qt.QGraphicsSceneHoverEvent)) { + C.QGraphicsWebView_override_virtual_HoverMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_HoverMoveEvent +func miqt_exec_callback_QGraphicsWebView_HoverMoveEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QGraphicsSceneHoverEvent), param1 *qt.QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_HoverMoveEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_HoverLeaveEvent(param1 *qt.QGraphicsSceneHoverEvent) { + + C.QGraphicsWebView_virtualbase_HoverLeaveEvent(unsafe.Pointer(this.h), (*C.QGraphicsSceneHoverEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnHoverLeaveEvent(slot func(super func(param1 *qt.QGraphicsSceneHoverEvent), param1 *qt.QGraphicsSceneHoverEvent)) { + C.QGraphicsWebView_override_virtual_HoverLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_HoverLeaveEvent +func miqt_exec_callback_QGraphicsWebView_HoverLeaveEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QGraphicsSceneHoverEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QGraphicsSceneHoverEvent), param1 *qt.QGraphicsSceneHoverEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_WheelEvent(param1 *qt.QGraphicsSceneWheelEvent) { + + C.QGraphicsWebView_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QGraphicsSceneWheelEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnWheelEvent(slot func(super func(param1 *qt.QGraphicsSceneWheelEvent), param1 *qt.QGraphicsSceneWheelEvent)) { + C.QGraphicsWebView_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_WheelEvent +func miqt_exec_callback_QGraphicsWebView_WheelEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QGraphicsSceneWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QGraphicsSceneWheelEvent), param1 *qt.QGraphicsSceneWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQGraphicsSceneWheelEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_KeyPressEvent(param1 *qt.QKeyEvent) { + + C.QGraphicsWebView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnKeyPressEvent(slot func(super func(param1 *qt.QKeyEvent), param1 *qt.QKeyEvent)) { + C.QGraphicsWebView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_KeyPressEvent +func miqt_exec_callback_QGraphicsWebView_KeyPressEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QKeyEvent), param1 *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_KeyReleaseEvent(param1 *qt.QKeyEvent) { + + C.QGraphicsWebView_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnKeyReleaseEvent(slot func(super func(param1 *qt.QKeyEvent), param1 *qt.QKeyEvent)) { + C.QGraphicsWebView_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_KeyReleaseEvent +func miqt_exec_callback_QGraphicsWebView_KeyReleaseEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QKeyEvent), param1 *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_ContextMenuEvent(param1 *qt.QGraphicsSceneContextMenuEvent) { + + C.QGraphicsWebView_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QGraphicsSceneContextMenuEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnContextMenuEvent(slot func(super func(param1 *qt.QGraphicsSceneContextMenuEvent), param1 *qt.QGraphicsSceneContextMenuEvent)) { + C.QGraphicsWebView_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_ContextMenuEvent +func miqt_exec_callback_QGraphicsWebView_ContextMenuEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QGraphicsSceneContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QGraphicsSceneContextMenuEvent), param1 *qt.QGraphicsSceneContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQGraphicsSceneContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_DragEnterEvent(param1 *qt.QGraphicsSceneDragDropEvent) { + + C.QGraphicsWebView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QGraphicsSceneDragDropEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnDragEnterEvent(slot func(super func(param1 *qt.QGraphicsSceneDragDropEvent), param1 *qt.QGraphicsSceneDragDropEvent)) { + C.QGraphicsWebView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_DragEnterEvent +func miqt_exec_callback_QGraphicsWebView_DragEnterEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QGraphicsSceneDragDropEvent), param1 *qt.QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_DragLeaveEvent(param1 *qt.QGraphicsSceneDragDropEvent) { + + C.QGraphicsWebView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QGraphicsSceneDragDropEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnDragLeaveEvent(slot func(super func(param1 *qt.QGraphicsSceneDragDropEvent), param1 *qt.QGraphicsSceneDragDropEvent)) { + C.QGraphicsWebView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_DragLeaveEvent +func miqt_exec_callback_QGraphicsWebView_DragLeaveEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QGraphicsSceneDragDropEvent), param1 *qt.QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_DragMoveEvent(param1 *qt.QGraphicsSceneDragDropEvent) { + + C.QGraphicsWebView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QGraphicsSceneDragDropEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnDragMoveEvent(slot func(super func(param1 *qt.QGraphicsSceneDragDropEvent), param1 *qt.QGraphicsSceneDragDropEvent)) { + C.QGraphicsWebView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_DragMoveEvent +func miqt_exec_callback_QGraphicsWebView_DragMoveEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QGraphicsSceneDragDropEvent), param1 *qt.QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_DropEvent(param1 *qt.QGraphicsSceneDragDropEvent) { + + C.QGraphicsWebView_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QGraphicsSceneDragDropEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnDropEvent(slot func(super func(param1 *qt.QGraphicsSceneDragDropEvent), param1 *qt.QGraphicsSceneDragDropEvent)) { + C.QGraphicsWebView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_DropEvent +func miqt_exec_callback_QGraphicsWebView_DropEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QGraphicsSceneDragDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QGraphicsSceneDragDropEvent), param1 *qt.QGraphicsSceneDragDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_FocusInEvent(param1 *qt.QFocusEvent) { + + C.QGraphicsWebView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnFocusInEvent(slot func(super func(param1 *qt.QFocusEvent), param1 *qt.QFocusEvent)) { + C.QGraphicsWebView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_FocusInEvent +func miqt_exec_callback_QGraphicsWebView_FocusInEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QFocusEvent), param1 *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_FocusOutEvent(param1 *qt.QFocusEvent) { + + C.QGraphicsWebView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnFocusOutEvent(slot func(super func(param1 *qt.QFocusEvent), param1 *qt.QFocusEvent)) { + C.QGraphicsWebView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_FocusOutEvent +func miqt_exec_callback_QGraphicsWebView_FocusOutEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QFocusEvent), param1 *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_InputMethodEvent(param1 *qt.QInputMethodEvent) { + + C.QGraphicsWebView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(param1.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnInputMethodEvent(slot func(super func(param1 *qt.QInputMethodEvent), param1 *qt.QInputMethodEvent)) { + C.QGraphicsWebView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_InputMethodEvent +func miqt_exec_callback_QGraphicsWebView_InputMethodEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QInputMethodEvent), param1 *qt.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QGraphicsWebView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QGraphicsWebView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QGraphicsWebView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_FocusNextPrevChild +func miqt_exec_callback_QGraphicsWebView_FocusNextPrevChild(self *C.QGraphicsWebView, 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((&QGraphicsWebView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsWebView) callVirtualBase_SceneEvent(param1 *qt.QEvent) bool { + + return (bool)(C.QGraphicsWebView_virtualbase_SceneEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QGraphicsWebView) OnSceneEvent(slot func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) { + C.QGraphicsWebView_override_virtual_SceneEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_SceneEvent +func miqt_exec_callback_QGraphicsWebView_SceneEvent(self *C.QGraphicsWebView, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QGraphicsWebView{h: self}).callVirtualBase_SceneEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsWebView) callVirtualBase_GetContentsMargins(left *float64, top *float64, right *float64, bottom *float64) { + + C.QGraphicsWebView_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 *QGraphicsWebView) OnGetContentsMargins(slot func(super func(left *float64, top *float64, right *float64, bottom *float64), left *float64, top *float64, right *float64, bottom *float64)) { + C.QGraphicsWebView_override_virtual_GetContentsMargins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_GetContentsMargins +func miqt_exec_callback_QGraphicsWebView_GetContentsMargins(self *C.QGraphicsWebView, 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((&QGraphicsWebView{h: self}).callVirtualBase_GetContentsMargins, slotval1, slotval2, slotval3, slotval4) + +} + +func (this *QGraphicsWebView) callVirtualBase_Type() int { + + return (int)(C.QGraphicsWebView_virtualbase_Type(unsafe.Pointer(this.h))) + +} +func (this *QGraphicsWebView) OnType(slot func(super func() int) int) { + C.QGraphicsWebView_override_virtual_Type(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_Type +func miqt_exec_callback_QGraphicsWebView_Type(self *C.QGraphicsWebView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsWebView{h: self}).callVirtualBase_Type) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsWebView) callVirtualBase_PaintWindowFrame(painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget) { + + C.QGraphicsWebView_virtualbase_PaintWindowFrame(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer()), (*C.QStyleOptionGraphicsItem)(option.UnsafePointer()), (*C.QWidget)(widget.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnPaintWindowFrame(slot func(super func(painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget), painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget)) { + C.QGraphicsWebView_override_virtual_PaintWindowFrame(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_PaintWindowFrame +func miqt_exec_callback_QGraphicsWebView_PaintWindowFrame(self *C.QGraphicsWebView, cb C.intptr_t, painter *C.QPainter, option *C.QStyleOptionGraphicsItem, widget *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget), painter *qt.QPainter, option *qt.QStyleOptionGraphicsItem, widget *qt.QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) + slotval2 := qt.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval3 := qt.UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_PaintWindowFrame, slotval1, slotval2, slotval3) + +} + +func (this *QGraphicsWebView) callVirtualBase_BoundingRect() *qt.QRectF { + + _ret := C.QGraphicsWebView_virtualbase_BoundingRect(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQRectF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsWebView) OnBoundingRect(slot func(super func() *qt.QRectF) *qt.QRectF) { + C.QGraphicsWebView_override_virtual_BoundingRect(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_BoundingRect +func miqt_exec_callback_QGraphicsWebView_BoundingRect(self *C.QGraphicsWebView, cb C.intptr_t) *C.QRectF { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QRectF) *qt.QRectF) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsWebView{h: self}).callVirtualBase_BoundingRect) + + return (*C.QRectF)(virtualReturn.UnsafePointer()) + +} + +func (this *QGraphicsWebView) callVirtualBase_Shape() *qt.QPainterPath { + + _ret := C.QGraphicsWebView_virtualbase_Shape(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQPainterPath(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsWebView) OnShape(slot func(super func() *qt.QPainterPath) *qt.QPainterPath) { + C.QGraphicsWebView_override_virtual_Shape(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_Shape +func miqt_exec_callback_QGraphicsWebView_Shape(self *C.QGraphicsWebView, cb C.intptr_t) *C.QPainterPath { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPainterPath) *qt.QPainterPath) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QGraphicsWebView{h: self}).callVirtualBase_Shape) + + return (*C.QPainterPath)(virtualReturn.UnsafePointer()) + +} + +func (this *QGraphicsWebView) callVirtualBase_InitStyleOption(option *qt.QStyleOption) { + + C.QGraphicsWebView_virtualbase_InitStyleOption(unsafe.Pointer(this.h), (*C.QStyleOption)(option.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnInitStyleOption(slot func(super func(option *qt.QStyleOption), option *qt.QStyleOption)) { + C.QGraphicsWebView_override_virtual_InitStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_InitStyleOption +func miqt_exec_callback_QGraphicsWebView_InitStyleOption(self *C.QGraphicsWebView, cb C.intptr_t, option *C.QStyleOption) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *qt.QStyleOption), option *qt.QStyleOption)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQStyleOption(unsafe.Pointer(option)) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_PropertyChange(propertyName string, value *qt.QVariant) *qt.QVariant { + propertyName_ms := C.struct_miqt_string{} + propertyName_ms.data = C.CString(propertyName) + propertyName_ms.len = C.size_t(len(propertyName)) + defer C.free(unsafe.Pointer(propertyName_ms.data)) + + _ret := C.QGraphicsWebView_virtualbase_PropertyChange(unsafe.Pointer(this.h), propertyName_ms, (*C.QVariant)(value.UnsafePointer())) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QGraphicsWebView) OnPropertyChange(slot func(super func(propertyName string, value *qt.QVariant) *qt.QVariant, propertyName string, value *qt.QVariant) *qt.QVariant) { + C.QGraphicsWebView_override_virtual_PropertyChange(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_PropertyChange +func miqt_exec_callback_QGraphicsWebView_PropertyChange(self *C.QGraphicsWebView, cb C.intptr_t, propertyName C.struct_miqt_string, value *C.QVariant) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(propertyName string, value *qt.QVariant) *qt.QVariant, propertyName string, value *qt.QVariant) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var propertyName_ms C.struct_miqt_string = propertyName + propertyName_ret := C.GoStringN(propertyName_ms.data, C.int(int64(propertyName_ms.len))) + C.free(unsafe.Pointer(propertyName_ms.data)) + slotval1 := propertyName_ret + slotval2 := qt.UnsafeNewQVariant(unsafe.Pointer(value)) + + virtualReturn := gofunc((&QGraphicsWebView{h: self}).callVirtualBase_PropertyChange, slotval1, slotval2) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QGraphicsWebView) callVirtualBase_WindowFrameEvent(e *qt.QEvent) bool { + + return (bool)(C.QGraphicsWebView_virtualbase_WindowFrameEvent(unsafe.Pointer(this.h), (*C.QEvent)(e.UnsafePointer()))) + +} +func (this *QGraphicsWebView) OnWindowFrameEvent(slot func(super func(e *qt.QEvent) bool, e *qt.QEvent) bool) { + C.QGraphicsWebView_override_virtual_WindowFrameEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_WindowFrameEvent +func miqt_exec_callback_QGraphicsWebView_WindowFrameEvent(self *C.QGraphicsWebView, cb C.intptr_t, e *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *qt.QEvent) bool, e *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(e)) + + virtualReturn := gofunc((&QGraphicsWebView{h: self}).callVirtualBase_WindowFrameEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QGraphicsWebView) callVirtualBase_WindowFrameSectionAt(pos *qt.QPointF) qt.WindowFrameSection { + + return (qt.WindowFrameSection)(C.QGraphicsWebView_virtualbase_WindowFrameSectionAt(unsafe.Pointer(this.h), (*C.QPointF)(pos.UnsafePointer()))) + +} +func (this *QGraphicsWebView) OnWindowFrameSectionAt(slot func(super func(pos *qt.QPointF) qt.WindowFrameSection, pos *qt.QPointF) qt.WindowFrameSection) { + C.QGraphicsWebView_override_virtual_WindowFrameSectionAt(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_WindowFrameSectionAt +func miqt_exec_callback_QGraphicsWebView_WindowFrameSectionAt(self *C.QGraphicsWebView, cb C.intptr_t, pos *C.QPointF) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(pos *qt.QPointF) qt.WindowFrameSection, pos *qt.QPointF) qt.WindowFrameSection) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPointF(unsafe.Pointer(pos)) + + virtualReturn := gofunc((&QGraphicsWebView{h: self}).callVirtualBase_WindowFrameSectionAt, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QGraphicsWebView) callVirtualBase_ChangeEvent(event *qt.QEvent) { + + C.QGraphicsWebView_virtualbase_ChangeEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnChangeEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QGraphicsWebView_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_ChangeEvent +func miqt_exec_callback_QGraphicsWebView_ChangeEvent(self *C.QGraphicsWebView, 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((&QGraphicsWebView{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_CloseEvent(event *qt.QCloseEvent) { + + C.QGraphicsWebView_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(event.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnCloseEvent(slot func(super func(event *qt.QCloseEvent), event *qt.QCloseEvent)) { + C.QGraphicsWebView_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_CloseEvent +func miqt_exec_callback_QGraphicsWebView_CloseEvent(self *C.QGraphicsWebView, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QCloseEvent), event *qt.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_HideEvent(event *qt.QHideEvent) { + + C.QGraphicsWebView_virtualbase_HideEvent(unsafe.Pointer(this.h), (*C.QHideEvent)(event.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnHideEvent(slot func(super func(event *qt.QHideEvent), event *qt.QHideEvent)) { + C.QGraphicsWebView_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_HideEvent +func miqt_exec_callback_QGraphicsWebView_HideEvent(self *C.QGraphicsWebView, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QHideEvent), event *qt.QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_MoveEvent(event *qt.QGraphicsSceneMoveEvent) { + + C.QGraphicsWebView_virtualbase_MoveEvent(unsafe.Pointer(this.h), (*C.QGraphicsSceneMoveEvent)(event.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnMoveEvent(slot func(super func(event *qt.QGraphicsSceneMoveEvent), event *qt.QGraphicsSceneMoveEvent)) { + C.QGraphicsWebView_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_MoveEvent +func miqt_exec_callback_QGraphicsWebView_MoveEvent(self *C.QGraphicsWebView, cb C.intptr_t, event *C.QGraphicsSceneMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QGraphicsSceneMoveEvent), event *qt.QGraphicsSceneMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQGraphicsSceneMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_PolishEvent() { + + C.QGraphicsWebView_virtualbase_PolishEvent(unsafe.Pointer(this.h)) + +} +func (this *QGraphicsWebView) OnPolishEvent(slot func(super func())) { + C.QGraphicsWebView_override_virtual_PolishEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_PolishEvent +func miqt_exec_callback_QGraphicsWebView_PolishEvent(self *C.QGraphicsWebView, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_PolishEvent) + +} + +func (this *QGraphicsWebView) callVirtualBase_ResizeEvent(event *qt.QGraphicsSceneResizeEvent) { + + C.QGraphicsWebView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QGraphicsSceneResizeEvent)(event.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnResizeEvent(slot func(super func(event *qt.QGraphicsSceneResizeEvent), event *qt.QGraphicsSceneResizeEvent)) { + C.QGraphicsWebView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_ResizeEvent +func miqt_exec_callback_QGraphicsWebView_ResizeEvent(self *C.QGraphicsWebView, cb C.intptr_t, event *C.QGraphicsSceneResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QGraphicsSceneResizeEvent), event *qt.QGraphicsSceneResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQGraphicsSceneResizeEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_ShowEvent(event *qt.QShowEvent) { + + C.QGraphicsWebView_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(event.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnShowEvent(slot func(super func(event *qt.QShowEvent), event *qt.QShowEvent)) { + C.QGraphicsWebView_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_ShowEvent +func miqt_exec_callback_QGraphicsWebView_ShowEvent(self *C.QGraphicsWebView, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QShowEvent), event *qt.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QGraphicsWebView{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_GrabMouseEvent(event *qt.QEvent) { + + C.QGraphicsWebView_virtualbase_GrabMouseEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnGrabMouseEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QGraphicsWebView_override_virtual_GrabMouseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_GrabMouseEvent +func miqt_exec_callback_QGraphicsWebView_GrabMouseEvent(self *C.QGraphicsWebView, 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((&QGraphicsWebView{h: self}).callVirtualBase_GrabMouseEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_UngrabMouseEvent(event *qt.QEvent) { + + C.QGraphicsWebView_virtualbase_UngrabMouseEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnUngrabMouseEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QGraphicsWebView_override_virtual_UngrabMouseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_UngrabMouseEvent +func miqt_exec_callback_QGraphicsWebView_UngrabMouseEvent(self *C.QGraphicsWebView, 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((&QGraphicsWebView{h: self}).callVirtualBase_UngrabMouseEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_GrabKeyboardEvent(event *qt.QEvent) { + + C.QGraphicsWebView_virtualbase_GrabKeyboardEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnGrabKeyboardEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QGraphicsWebView_override_virtual_GrabKeyboardEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_GrabKeyboardEvent +func miqt_exec_callback_QGraphicsWebView_GrabKeyboardEvent(self *C.QGraphicsWebView, 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((&QGraphicsWebView{h: self}).callVirtualBase_GrabKeyboardEvent, slotval1) + +} + +func (this *QGraphicsWebView) callVirtualBase_UngrabKeyboardEvent(event *qt.QEvent) { + + C.QGraphicsWebView_virtualbase_UngrabKeyboardEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QGraphicsWebView) OnUngrabKeyboardEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QGraphicsWebView_override_virtual_UngrabKeyboardEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QGraphicsWebView_UngrabKeyboardEvent +func miqt_exec_callback_QGraphicsWebView_UngrabKeyboardEvent(self *C.QGraphicsWebView, 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((&QGraphicsWebView{h: self}).callVirtualBase_UngrabKeyboardEvent, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QGraphicsWebView) Delete() { + C.QGraphicsWebView_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 *QGraphicsWebView) GoGC() { + runtime.SetFinalizer(this, func(this *QGraphicsWebView) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webkit/gen_qgraphicswebview.h b/qt/webkit/gen_qgraphicswebview.h new file mode 100644 index 00000000..4857f94d --- /dev/null +++ b/qt/webkit/gen_qgraphicswebview.h @@ -0,0 +1,282 @@ +#pragma once +#ifndef MIQT_QT_WEBKIT_GEN_QGRAPHICSWEBVIEW_H +#define MIQT_QT_WEBKIT_GEN_QGRAPHICSWEBVIEW_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QAction; +class QCloseEvent; +class QEvent; +class QFocusEvent; +class QGraphicsItem; +class QGraphicsLayoutItem; +class QGraphicsObject; +class QGraphicsSceneContextMenuEvent; +class QGraphicsSceneDragDropEvent; +class QGraphicsSceneHoverEvent; +class QGraphicsSceneMouseEvent; +class QGraphicsSceneMoveEvent; +class QGraphicsSceneResizeEvent; +class QGraphicsSceneWheelEvent; +class QGraphicsWebView; +class QGraphicsWidget; +class QHideEvent; +class QIcon; +class QInputMethodEvent; +class QKeyEvent; +class QMetaObject; +class QNetworkRequest; +class QObject; +class QPainter; +class QPainterPath; +class QPointF; +class QRectF; +class QShowEvent; +class QSizeF; +class QStyleOption; +class QStyleOptionGraphicsItem; +class QUrl; +class QVariant; +class QWebHistory; +class QWebPage; +class QWebSettings; +class QWidget; +#else +typedef struct QAction QAction; +typedef struct QCloseEvent QCloseEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QGraphicsItem QGraphicsItem; +typedef struct QGraphicsLayoutItem QGraphicsLayoutItem; +typedef struct QGraphicsObject QGraphicsObject; +typedef struct QGraphicsSceneContextMenuEvent QGraphicsSceneContextMenuEvent; +typedef struct QGraphicsSceneDragDropEvent QGraphicsSceneDragDropEvent; +typedef struct QGraphicsSceneHoverEvent QGraphicsSceneHoverEvent; +typedef struct QGraphicsSceneMouseEvent QGraphicsSceneMouseEvent; +typedef struct QGraphicsSceneMoveEvent QGraphicsSceneMoveEvent; +typedef struct QGraphicsSceneResizeEvent QGraphicsSceneResizeEvent; +typedef struct QGraphicsSceneWheelEvent QGraphicsSceneWheelEvent; +typedef struct QGraphicsWebView QGraphicsWebView; +typedef struct QGraphicsWidget QGraphicsWidget; +typedef struct QHideEvent QHideEvent; +typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; +typedef struct QMetaObject QMetaObject; +typedef struct QNetworkRequest QNetworkRequest; +typedef struct QObject QObject; +typedef struct QPainter QPainter; +typedef struct QPainterPath QPainterPath; +typedef struct QPointF QPointF; +typedef struct QRectF QRectF; +typedef struct QShowEvent QShowEvent; +typedef struct QSizeF QSizeF; +typedef struct QStyleOption QStyleOption; +typedef struct QStyleOptionGraphicsItem QStyleOptionGraphicsItem; +typedef struct QUrl QUrl; +typedef struct QVariant QVariant; +typedef struct QWebHistory QWebHistory; +typedef struct QWebPage QWebPage; +typedef struct QWebSettings QWebSettings; +typedef struct QWidget QWidget; +#endif + +void QGraphicsWebView_new(QGraphicsWebView** outptr_QGraphicsWebView, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +void QGraphicsWebView_new2(QGraphicsItem* parent, QGraphicsWebView** outptr_QGraphicsWebView, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +QMetaObject* QGraphicsWebView_MetaObject(const QGraphicsWebView* self); +void* QGraphicsWebView_Metacast(QGraphicsWebView* self, const char* param1); +struct miqt_string QGraphicsWebView_Tr(const char* s); +struct miqt_string QGraphicsWebView_TrUtf8(const char* s); +QWebPage* QGraphicsWebView_Page(const QGraphicsWebView* self); +void QGraphicsWebView_SetPage(QGraphicsWebView* self, QWebPage* page); +QUrl* QGraphicsWebView_Url(const QGraphicsWebView* self); +void QGraphicsWebView_SetUrl(QGraphicsWebView* self, QUrl* url); +struct miqt_string QGraphicsWebView_Title(const QGraphicsWebView* self); +QIcon* QGraphicsWebView_Icon(const QGraphicsWebView* self); +double QGraphicsWebView_ZoomFactor(const QGraphicsWebView* self); +void QGraphicsWebView_SetZoomFactor(QGraphicsWebView* self, double zoomFactor); +bool QGraphicsWebView_IsModified(const QGraphicsWebView* self); +void QGraphicsWebView_Load(QGraphicsWebView* self, QUrl* url); +void QGraphicsWebView_LoadWithRequest(QGraphicsWebView* self, QNetworkRequest* request); +void QGraphicsWebView_SetHtml(QGraphicsWebView* self, struct miqt_string html); +void QGraphicsWebView_SetContent(QGraphicsWebView* self, struct miqt_string data); +QWebHistory* QGraphicsWebView_History(const QGraphicsWebView* self); +QWebSettings* QGraphicsWebView_Settings(const QGraphicsWebView* self); +QAction* QGraphicsWebView_PageAction(const QGraphicsWebView* self, int action); +void QGraphicsWebView_TriggerPageAction(QGraphicsWebView* self, int action); +bool QGraphicsWebView_FindText(QGraphicsWebView* self, struct miqt_string subString); +bool QGraphicsWebView_ResizesToContents(const QGraphicsWebView* self); +void QGraphicsWebView_SetResizesToContents(QGraphicsWebView* self, bool enabled); +bool QGraphicsWebView_IsTiledBackingStoreFrozen(const QGraphicsWebView* self); +void QGraphicsWebView_SetTiledBackingStoreFrozen(QGraphicsWebView* self, bool frozen); +void QGraphicsWebView_SetGeometry(QGraphicsWebView* self, QRectF* rect); +void QGraphicsWebView_UpdateGeometry(QGraphicsWebView* self); +void QGraphicsWebView_Paint(QGraphicsWebView* self, QPainter* param1, QStyleOptionGraphicsItem* options, QWidget* widget); +QVariant* QGraphicsWebView_ItemChange(QGraphicsWebView* self, int change, QVariant* value); +bool QGraphicsWebView_Event(QGraphicsWebView* self, QEvent* param1); +QSizeF* QGraphicsWebView_SizeHint(const QGraphicsWebView* self, int which, QSizeF* constraint); +QVariant* QGraphicsWebView_InputMethodQuery(const QGraphicsWebView* self, int query); +int QGraphicsWebView_RenderHints(const QGraphicsWebView* self); +void QGraphicsWebView_SetRenderHints(QGraphicsWebView* self, int renderHints); +void QGraphicsWebView_SetRenderHint(QGraphicsWebView* self, int param1); +void QGraphicsWebView_Stop(QGraphicsWebView* self); +void QGraphicsWebView_Back(QGraphicsWebView* self); +void QGraphicsWebView_Forward(QGraphicsWebView* self); +void QGraphicsWebView_Reload(QGraphicsWebView* self); +void QGraphicsWebView_LoadStarted(QGraphicsWebView* self); +void QGraphicsWebView_connect_LoadStarted(QGraphicsWebView* self, intptr_t slot); +void QGraphicsWebView_LoadFinished(QGraphicsWebView* self, bool param1); +void QGraphicsWebView_connect_LoadFinished(QGraphicsWebView* self, intptr_t slot); +void QGraphicsWebView_LoadProgress(QGraphicsWebView* self, int progress); +void QGraphicsWebView_connect_LoadProgress(QGraphicsWebView* self, intptr_t slot); +void QGraphicsWebView_UrlChanged(QGraphicsWebView* self, QUrl* param1); +void QGraphicsWebView_connect_UrlChanged(QGraphicsWebView* self, intptr_t slot); +void QGraphicsWebView_TitleChanged(QGraphicsWebView* self, struct miqt_string param1); +void QGraphicsWebView_connect_TitleChanged(QGraphicsWebView* self, intptr_t slot); +void QGraphicsWebView_IconChanged(QGraphicsWebView* self); +void QGraphicsWebView_connect_IconChanged(QGraphicsWebView* self, intptr_t slot); +void QGraphicsWebView_StatusBarMessage(QGraphicsWebView* self, struct miqt_string message); +void QGraphicsWebView_connect_StatusBarMessage(QGraphicsWebView* self, intptr_t slot); +void QGraphicsWebView_LinkClicked(QGraphicsWebView* self, QUrl* param1); +void QGraphicsWebView_connect_LinkClicked(QGraphicsWebView* self, intptr_t slot); +void QGraphicsWebView_MousePressEvent(QGraphicsWebView* self, QGraphicsSceneMouseEvent* param1); +void QGraphicsWebView_MouseDoubleClickEvent(QGraphicsWebView* self, QGraphicsSceneMouseEvent* param1); +void QGraphicsWebView_MouseReleaseEvent(QGraphicsWebView* self, QGraphicsSceneMouseEvent* param1); +void QGraphicsWebView_MouseMoveEvent(QGraphicsWebView* self, QGraphicsSceneMouseEvent* param1); +void QGraphicsWebView_HoverMoveEvent(QGraphicsWebView* self, QGraphicsSceneHoverEvent* param1); +void QGraphicsWebView_HoverLeaveEvent(QGraphicsWebView* self, QGraphicsSceneHoverEvent* param1); +void QGraphicsWebView_WheelEvent(QGraphicsWebView* self, QGraphicsSceneWheelEvent* param1); +void QGraphicsWebView_KeyPressEvent(QGraphicsWebView* self, QKeyEvent* param1); +void QGraphicsWebView_KeyReleaseEvent(QGraphicsWebView* self, QKeyEvent* param1); +void QGraphicsWebView_ContextMenuEvent(QGraphicsWebView* self, QGraphicsSceneContextMenuEvent* param1); +void QGraphicsWebView_DragEnterEvent(QGraphicsWebView* self, QGraphicsSceneDragDropEvent* param1); +void QGraphicsWebView_DragLeaveEvent(QGraphicsWebView* self, QGraphicsSceneDragDropEvent* param1); +void QGraphicsWebView_DragMoveEvent(QGraphicsWebView* self, QGraphicsSceneDragDropEvent* param1); +void QGraphicsWebView_DropEvent(QGraphicsWebView* self, QGraphicsSceneDragDropEvent* param1); +void QGraphicsWebView_FocusInEvent(QGraphicsWebView* self, QFocusEvent* param1); +void QGraphicsWebView_FocusOutEvent(QGraphicsWebView* self, QFocusEvent* param1); +void QGraphicsWebView_InputMethodEvent(QGraphicsWebView* self, QInputMethodEvent* param1); +bool QGraphicsWebView_FocusNextPrevChild(QGraphicsWebView* self, bool next); +bool QGraphicsWebView_SceneEvent(QGraphicsWebView* self, QEvent* param1); +struct miqt_string QGraphicsWebView_Tr2(const char* s, const char* c); +struct miqt_string QGraphicsWebView_Tr3(const char* s, const char* c, int n); +struct miqt_string QGraphicsWebView_TrUtf82(const char* s, const char* c); +struct miqt_string QGraphicsWebView_TrUtf83(const char* s, const char* c, int n); +void QGraphicsWebView_Load2(QGraphicsWebView* self, QNetworkRequest* request, int operation); +void QGraphicsWebView_Load3(QGraphicsWebView* self, QNetworkRequest* request, int operation, struct miqt_string body); +void QGraphicsWebView_SetHtml2(QGraphicsWebView* self, struct miqt_string html, QUrl* baseUrl); +void QGraphicsWebView_SetContent2(QGraphicsWebView* self, struct miqt_string data, struct miqt_string mimeType); +void QGraphicsWebView_SetContent3(QGraphicsWebView* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl); +void QGraphicsWebView_TriggerPageAction2(QGraphicsWebView* self, int action, bool checked); +bool QGraphicsWebView_FindText2(QGraphicsWebView* self, struct miqt_string subString, int options); +void QGraphicsWebView_SetRenderHint2(QGraphicsWebView* self, int param1, bool enabled); +void QGraphicsWebView_override_virtual_SetGeometry(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_SetGeometry(void* self, QRectF* rect); +void QGraphicsWebView_override_virtual_UpdateGeometry(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_UpdateGeometry(void* self); +void QGraphicsWebView_override_virtual_Paint(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_Paint(void* self, QPainter* param1, QStyleOptionGraphicsItem* options, QWidget* widget); +void QGraphicsWebView_override_virtual_ItemChange(void* self, intptr_t slot); +QVariant* QGraphicsWebView_virtualbase_ItemChange(void* self, int change, QVariant* value); +void QGraphicsWebView_override_virtual_Event(void* self, intptr_t slot); +bool QGraphicsWebView_virtualbase_Event(void* self, QEvent* param1); +void QGraphicsWebView_override_virtual_SizeHint(void* self, intptr_t slot); +QSizeF* QGraphicsWebView_virtualbase_SizeHint(const void* self, int which, QSizeF* constraint); +void QGraphicsWebView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QGraphicsWebView_virtualbase_InputMethodQuery(const void* self, int query); +void QGraphicsWebView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_MousePressEvent(void* self, QGraphicsSceneMouseEvent* param1); +void QGraphicsWebView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_MouseDoubleClickEvent(void* self, QGraphicsSceneMouseEvent* param1); +void QGraphicsWebView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_MouseReleaseEvent(void* self, QGraphicsSceneMouseEvent* param1); +void QGraphicsWebView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_MouseMoveEvent(void* self, QGraphicsSceneMouseEvent* param1); +void QGraphicsWebView_override_virtual_HoverMoveEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_HoverMoveEvent(void* self, QGraphicsSceneHoverEvent* param1); +void QGraphicsWebView_override_virtual_HoverLeaveEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_HoverLeaveEvent(void* self, QGraphicsSceneHoverEvent* param1); +void QGraphicsWebView_override_virtual_WheelEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_WheelEvent(void* self, QGraphicsSceneWheelEvent* param1); +void QGraphicsWebView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QGraphicsWebView_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* param1); +void QGraphicsWebView_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_ContextMenuEvent(void* self, QGraphicsSceneContextMenuEvent* param1); +void QGraphicsWebView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_DragEnterEvent(void* self, QGraphicsSceneDragDropEvent* param1); +void QGraphicsWebView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_DragLeaveEvent(void* self, QGraphicsSceneDragDropEvent* param1); +void QGraphicsWebView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_DragMoveEvent(void* self, QGraphicsSceneDragDropEvent* param1); +void QGraphicsWebView_override_virtual_DropEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_DropEvent(void* self, QGraphicsSceneDragDropEvent* param1); +void QGraphicsWebView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_FocusInEvent(void* self, QFocusEvent* param1); +void QGraphicsWebView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1); +void QGraphicsWebView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QGraphicsWebView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QGraphicsWebView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QGraphicsWebView_override_virtual_SceneEvent(void* self, intptr_t slot); +bool QGraphicsWebView_virtualbase_SceneEvent(void* self, QEvent* param1); +void QGraphicsWebView_override_virtual_GetContentsMargins(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_GetContentsMargins(const void* self, double* left, double* top, double* right, double* bottom); +void QGraphicsWebView_override_virtual_Type(void* self, intptr_t slot); +int QGraphicsWebView_virtualbase_Type(const void* self); +void QGraphicsWebView_override_virtual_PaintWindowFrame(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_PaintWindowFrame(void* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget); +void QGraphicsWebView_override_virtual_BoundingRect(void* self, intptr_t slot); +QRectF* QGraphicsWebView_virtualbase_BoundingRect(const void* self); +void QGraphicsWebView_override_virtual_Shape(void* self, intptr_t slot); +QPainterPath* QGraphicsWebView_virtualbase_Shape(const void* self); +void QGraphicsWebView_override_virtual_InitStyleOption(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_InitStyleOption(const void* self, QStyleOption* option); +void QGraphicsWebView_override_virtual_PropertyChange(void* self, intptr_t slot); +QVariant* QGraphicsWebView_virtualbase_PropertyChange(void* self, struct miqt_string propertyName, QVariant* value); +void QGraphicsWebView_override_virtual_WindowFrameEvent(void* self, intptr_t slot); +bool QGraphicsWebView_virtualbase_WindowFrameEvent(void* self, QEvent* e); +void QGraphicsWebView_override_virtual_WindowFrameSectionAt(void* self, intptr_t slot); +int QGraphicsWebView_virtualbase_WindowFrameSectionAt(const void* self, QPointF* pos); +void QGraphicsWebView_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_ChangeEvent(void* self, QEvent* event); +void QGraphicsWebView_override_virtual_CloseEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QGraphicsWebView_override_virtual_HideEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_HideEvent(void* self, QHideEvent* event); +void QGraphicsWebView_override_virtual_MoveEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_MoveEvent(void* self, QGraphicsSceneMoveEvent* event); +void QGraphicsWebView_override_virtual_PolishEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_PolishEvent(void* self); +void QGraphicsWebView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_ResizeEvent(void* self, QGraphicsSceneResizeEvent* event); +void QGraphicsWebView_override_virtual_ShowEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QGraphicsWebView_override_virtual_GrabMouseEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_GrabMouseEvent(void* self, QEvent* event); +void QGraphicsWebView_override_virtual_UngrabMouseEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_UngrabMouseEvent(void* self, QEvent* event); +void QGraphicsWebView_override_virtual_GrabKeyboardEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_GrabKeyboardEvent(void* self, QEvent* event); +void QGraphicsWebView_override_virtual_UngrabKeyboardEvent(void* self, intptr_t slot); +void QGraphicsWebView_virtualbase_UngrabKeyboardEvent(void* self, QEvent* event); +void QGraphicsWebView_Delete(QGraphicsWebView* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webkit/gen_qwebdatabase.cpp b/qt/webkit/gen_qwebdatabase.cpp new file mode 100644 index 00000000..eb0e70c0 --- /dev/null +++ b/qt/webkit/gen_qwebdatabase.cpp @@ -0,0 +1,81 @@ +#include +#include +#include +#include +#include +#include +#include "gen_qwebdatabase.h" +#include "_cgo_export.h" + +void QWebDatabase_new(QWebDatabase* other, QWebDatabase** outptr_QWebDatabase) { + QWebDatabase* ret = new QWebDatabase(*other); + *outptr_QWebDatabase = ret; +} + +void QWebDatabase_OperatorAssign(QWebDatabase* self, QWebDatabase* other) { + self->operator=(*other); +} + +struct miqt_string QWebDatabase_Name(const QWebDatabase* self) { + QString _ret = self->name(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebDatabase_DisplayName(const QWebDatabase* self) { + QString _ret = self->displayName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +long long QWebDatabase_ExpectedSize(const QWebDatabase* self) { + qint64 _ret = self->expectedSize(); + return static_cast(_ret); +} + +long long QWebDatabase_Size(const QWebDatabase* self) { + qint64 _ret = self->size(); + return static_cast(_ret); +} + +struct miqt_string QWebDatabase_FileName(const QWebDatabase* self) { + QString _ret = self->fileName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QWebSecurityOrigin* QWebDatabase_Origin(const QWebDatabase* self) { + return new QWebSecurityOrigin(self->origin()); +} + +void QWebDatabase_RemoveDatabase(QWebDatabase* param1) { + QWebDatabase::removeDatabase(*param1); +} + +void QWebDatabase_RemoveAllDatabases() { + QWebDatabase::removeAllDatabases(); +} + +void QWebDatabase_Delete(QWebDatabase* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webkit/gen_qwebdatabase.go b/qt/webkit/gen_qwebdatabase.go new file mode 100644 index 00000000..a74652b5 --- /dev/null +++ b/qt/webkit/gen_qwebdatabase.go @@ -0,0 +1,122 @@ +package webkit + +/* + +#include "gen_qwebdatabase.h" +#include + +*/ +import "C" + +import ( + "runtime" + "unsafe" +) + +type QWebDatabase struct { + h *C.QWebDatabase + isSubclass bool +} + +func (this *QWebDatabase) cPointer() *C.QWebDatabase { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebDatabase) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebDatabase constructs the type using only CGO pointers. +func newQWebDatabase(h *C.QWebDatabase) *QWebDatabase { + if h == nil { + return nil + } + return &QWebDatabase{h: h} +} + +// UnsafeNewQWebDatabase constructs the type using only unsafe pointers. +func UnsafeNewQWebDatabase(h unsafe.Pointer) *QWebDatabase { + if h == nil { + return nil + } + + return &QWebDatabase{h: (*C.QWebDatabase)(h)} +} + +// NewQWebDatabase constructs a new QWebDatabase object. +func NewQWebDatabase(other *QWebDatabase) *QWebDatabase { + var outptr_QWebDatabase *C.QWebDatabase = nil + + C.QWebDatabase_new(other.cPointer(), &outptr_QWebDatabase) + ret := newQWebDatabase(outptr_QWebDatabase) + ret.isSubclass = true + return ret +} + +func (this *QWebDatabase) OperatorAssign(other *QWebDatabase) { + C.QWebDatabase_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QWebDatabase) Name() string { + var _ms C.struct_miqt_string = C.QWebDatabase_Name(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebDatabase) DisplayName() string { + var _ms C.struct_miqt_string = C.QWebDatabase_DisplayName(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebDatabase) ExpectedSize() int64 { + return (int64)(C.QWebDatabase_ExpectedSize(this.h)) +} + +func (this *QWebDatabase) Size() int64 { + return (int64)(C.QWebDatabase_Size(this.h)) +} + +func (this *QWebDatabase) FileName() string { + var _ms C.struct_miqt_string = C.QWebDatabase_FileName(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebDatabase) Origin() *QWebSecurityOrigin { + _ret := C.QWebDatabase_Origin(this.h) + _goptr := newQWebSecurityOrigin(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func QWebDatabase_RemoveDatabase(param1 *QWebDatabase) { + C.QWebDatabase_RemoveDatabase(param1.cPointer()) +} + +func QWebDatabase_RemoveAllDatabases() { + C.QWebDatabase_RemoveAllDatabases() +} + +// Delete this object from C++ memory. +func (this *QWebDatabase) Delete() { + C.QWebDatabase_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 *QWebDatabase) GoGC() { + runtime.SetFinalizer(this, func(this *QWebDatabase) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webkit/gen_qwebdatabase.h b/qt/webkit/gen_qwebdatabase.h new file mode 100644 index 00000000..905ef168 --- /dev/null +++ b/qt/webkit/gen_qwebdatabase.h @@ -0,0 +1,41 @@ +#pragma once +#ifndef MIQT_QT_WEBKIT_GEN_QWEBDATABASE_H +#define MIQT_QT_WEBKIT_GEN_QWEBDATABASE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QWebDatabase; +class QWebSecurityOrigin; +#else +typedef struct QWebDatabase QWebDatabase; +typedef struct QWebSecurityOrigin QWebSecurityOrigin; +#endif + +void QWebDatabase_new(QWebDatabase* other, QWebDatabase** outptr_QWebDatabase); +void QWebDatabase_OperatorAssign(QWebDatabase* self, QWebDatabase* other); +struct miqt_string QWebDatabase_Name(const QWebDatabase* self); +struct miqt_string QWebDatabase_DisplayName(const QWebDatabase* self); +long long QWebDatabase_ExpectedSize(const QWebDatabase* self); +long long QWebDatabase_Size(const QWebDatabase* self); +struct miqt_string QWebDatabase_FileName(const QWebDatabase* self); +QWebSecurityOrigin* QWebDatabase_Origin(const QWebDatabase* self); +void QWebDatabase_RemoveDatabase(QWebDatabase* param1); +void QWebDatabase_RemoveAllDatabases(); +void QWebDatabase_Delete(QWebDatabase* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webkit/gen_qwebelement.cpp b/qt/webkit/gen_qwebelement.cpp new file mode 100644 index 00000000..51b29142 --- /dev/null +++ b/qt/webkit/gen_qwebelement.cpp @@ -0,0 +1,755 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define WORKAROUND_INNER_CLASS_DEFINITION_QWebElementCollection__const_iterator +#define WORKAROUND_INNER_CLASS_DEFINITION_QWebElementCollection__iterator +#include +#include +#include "gen_qwebelement.h" +#include "_cgo_export.h" + +void QWebElement_new(QWebElement** outptr_QWebElement) { + QWebElement* ret = new QWebElement(); + *outptr_QWebElement = ret; +} + +void QWebElement_new2(QWebElement* param1, QWebElement** outptr_QWebElement) { + QWebElement* ret = new QWebElement(*param1); + *outptr_QWebElement = ret; +} + +void QWebElement_OperatorAssign(QWebElement* self, QWebElement* param1) { + self->operator=(*param1); +} + +bool QWebElement_OperatorEqual(const QWebElement* self, QWebElement* o) { + return (*self == *o); +} + +bool QWebElement_OperatorNotEqual(const QWebElement* self, QWebElement* o) { + return (*self != *o); +} + +bool QWebElement_IsNull(const QWebElement* self) { + return self->isNull(); +} + +QWebElementCollection* QWebElement_FindAll(const QWebElement* self, struct miqt_string selectorQuery) { + QString selectorQuery_QString = QString::fromUtf8(selectorQuery.data, selectorQuery.len); + return new QWebElementCollection(self->findAll(selectorQuery_QString)); +} + +QWebElement* QWebElement_FindFirst(const QWebElement* self, struct miqt_string selectorQuery) { + QString selectorQuery_QString = QString::fromUtf8(selectorQuery.data, selectorQuery.len); + return new QWebElement(self->findFirst(selectorQuery_QString)); +} + +void QWebElement_SetPlainText(QWebElement* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->setPlainText(text_QString); +} + +struct miqt_string QWebElement_ToPlainText(const QWebElement* self) { + QString _ret = self->toPlainText(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebElement_SetOuterXml(QWebElement* self, struct miqt_string markup) { + QString markup_QString = QString::fromUtf8(markup.data, markup.len); + self->setOuterXml(markup_QString); +} + +struct miqt_string QWebElement_ToOuterXml(const QWebElement* self) { + QString _ret = self->toOuterXml(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebElement_SetInnerXml(QWebElement* self, struct miqt_string markup) { + QString markup_QString = QString::fromUtf8(markup.data, markup.len); + self->setInnerXml(markup_QString); +} + +struct miqt_string QWebElement_ToInnerXml(const QWebElement* self) { + QString _ret = self->toInnerXml(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebElement_SetAttribute(QWebElement* self, struct miqt_string name, struct miqt_string value) { + QString name_QString = QString::fromUtf8(name.data, name.len); + QString value_QString = QString::fromUtf8(value.data, value.len); + self->setAttribute(name_QString, value_QString); +} + +void QWebElement_SetAttributeNS(QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value) { + QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len); + QString name_QString = QString::fromUtf8(name.data, name.len); + QString value_QString = QString::fromUtf8(value.data, value.len); + self->setAttributeNS(namespaceUri_QString, name_QString, value_QString); +} + +struct miqt_string QWebElement_Attribute(const QWebElement* self, struct miqt_string name) { + QString name_QString = QString::fromUtf8(name.data, name.len); + QString _ret = self->attribute(name_QString); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebElement_AttributeNS(const QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name) { + QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len); + QString name_QString = QString::fromUtf8(name.data, name.len); + QString _ret = self->attributeNS(namespaceUri_QString, name_QString); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QWebElement_HasAttribute(const QWebElement* self, struct miqt_string name) { + QString name_QString = QString::fromUtf8(name.data, name.len); + return self->hasAttribute(name_QString); +} + +bool QWebElement_HasAttributeNS(const QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name) { + QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len); + QString name_QString = QString::fromUtf8(name.data, name.len); + return self->hasAttributeNS(namespaceUri_QString, name_QString); +} + +void QWebElement_RemoveAttribute(QWebElement* self, struct miqt_string name) { + QString name_QString = QString::fromUtf8(name.data, name.len); + self->removeAttribute(name_QString); +} + +void QWebElement_RemoveAttributeNS(QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name) { + QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len); + QString name_QString = QString::fromUtf8(name.data, name.len); + self->removeAttributeNS(namespaceUri_QString, name_QString); +} + +bool QWebElement_HasAttributes(const QWebElement* self) { + return self->hasAttributes(); +} + +struct miqt_array /* of struct miqt_string */ QWebElement_AttributeNames(const QWebElement* self) { + QStringList _ret = self->attributeNames(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +struct miqt_array /* of struct miqt_string */ QWebElement_Classes(const QWebElement* self) { + QStringList _ret = self->classes(); + // 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; +} + +bool QWebElement_HasClass(const QWebElement* self, struct miqt_string name) { + QString name_QString = QString::fromUtf8(name.data, name.len); + return self->hasClass(name_QString); +} + +void QWebElement_AddClass(QWebElement* self, struct miqt_string name) { + QString name_QString = QString::fromUtf8(name.data, name.len); + self->addClass(name_QString); +} + +void QWebElement_RemoveClass(QWebElement* self, struct miqt_string name) { + QString name_QString = QString::fromUtf8(name.data, name.len); + self->removeClass(name_QString); +} + +void QWebElement_ToggleClass(QWebElement* self, struct miqt_string name) { + QString name_QString = QString::fromUtf8(name.data, name.len); + self->toggleClass(name_QString); +} + +bool QWebElement_HasFocus(const QWebElement* self) { + return self->hasFocus(); +} + +void QWebElement_SetFocus(QWebElement* self) { + self->setFocus(); +} + +QRect* QWebElement_Geometry(const QWebElement* self) { + return new QRect(self->geometry()); +} + +struct miqt_string QWebElement_TagName(const QWebElement* self) { + QString _ret = self->tagName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebElement_Prefix(const QWebElement* self) { + QString _ret = self->prefix(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebElement_LocalName(const QWebElement* self) { + QString _ret = self->localName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebElement_NamespaceUri(const QWebElement* self) { + QString _ret = self->namespaceUri(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QWebElement* QWebElement_Parent(const QWebElement* self) { + return new QWebElement(self->parent()); +} + +QWebElement* QWebElement_FirstChild(const QWebElement* self) { + return new QWebElement(self->firstChild()); +} + +QWebElement* QWebElement_LastChild(const QWebElement* self) { + return new QWebElement(self->lastChild()); +} + +QWebElement* QWebElement_NextSibling(const QWebElement* self) { + return new QWebElement(self->nextSibling()); +} + +QWebElement* QWebElement_PreviousSibling(const QWebElement* self) { + return new QWebElement(self->previousSibling()); +} + +QWebElement* QWebElement_Document(const QWebElement* self) { + return new QWebElement(self->document()); +} + +QWebFrame* QWebElement_WebFrame(const QWebElement* self) { + return self->webFrame(); +} + +void QWebElement_AppendInside(QWebElement* self, struct miqt_string markup) { + QString markup_QString = QString::fromUtf8(markup.data, markup.len); + self->appendInside(markup_QString); +} + +void QWebElement_AppendInsideWithElement(QWebElement* self, QWebElement* element) { + self->appendInside(*element); +} + +void QWebElement_PrependInside(QWebElement* self, struct miqt_string markup) { + QString markup_QString = QString::fromUtf8(markup.data, markup.len); + self->prependInside(markup_QString); +} + +void QWebElement_PrependInsideWithElement(QWebElement* self, QWebElement* element) { + self->prependInside(*element); +} + +void QWebElement_AppendOutside(QWebElement* self, struct miqt_string markup) { + QString markup_QString = QString::fromUtf8(markup.data, markup.len); + self->appendOutside(markup_QString); +} + +void QWebElement_AppendOutsideWithElement(QWebElement* self, QWebElement* element) { + self->appendOutside(*element); +} + +void QWebElement_PrependOutside(QWebElement* self, struct miqt_string markup) { + QString markup_QString = QString::fromUtf8(markup.data, markup.len); + self->prependOutside(markup_QString); +} + +void QWebElement_PrependOutsideWithElement(QWebElement* self, QWebElement* element) { + self->prependOutside(*element); +} + +void QWebElement_EncloseContentsWith(QWebElement* self, QWebElement* element) { + self->encloseContentsWith(*element); +} + +void QWebElement_EncloseContentsWithWithMarkup(QWebElement* self, struct miqt_string markup) { + QString markup_QString = QString::fromUtf8(markup.data, markup.len); + self->encloseContentsWith(markup_QString); +} + +void QWebElement_EncloseWith(QWebElement* self, struct miqt_string markup) { + QString markup_QString = QString::fromUtf8(markup.data, markup.len); + self->encloseWith(markup_QString); +} + +void QWebElement_EncloseWithWithElement(QWebElement* self, QWebElement* element) { + self->encloseWith(*element); +} + +void QWebElement_Replace(QWebElement* self, struct miqt_string markup) { + QString markup_QString = QString::fromUtf8(markup.data, markup.len); + self->replace(markup_QString); +} + +void QWebElement_ReplaceWithElement(QWebElement* self, QWebElement* element) { + self->replace(*element); +} + +QWebElement* QWebElement_Clone(const QWebElement* self) { + return new QWebElement(self->clone()); +} + +QWebElement* QWebElement_TakeFromDocument(QWebElement* self) { + QWebElement& _ret = self->takeFromDocument(); + // Cast returned reference into pointer + return &_ret; +} + +void QWebElement_RemoveFromDocument(QWebElement* self) { + self->removeFromDocument(); +} + +void QWebElement_RemoveAllChildren(QWebElement* self) { + self->removeAllChildren(); +} + +QVariant* QWebElement_EvaluateJavaScript(QWebElement* self, struct miqt_string scriptSource) { + QString scriptSource_QString = QString::fromUtf8(scriptSource.data, scriptSource.len); + return new QVariant(self->evaluateJavaScript(scriptSource_QString)); +} + +struct miqt_string QWebElement_StyleProperty(const QWebElement* self, struct miqt_string name, int strategy) { + QString name_QString = QString::fromUtf8(name.data, name.len); + QString _ret = self->styleProperty(name_QString, static_cast(strategy)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebElement_SetStyleProperty(QWebElement* self, struct miqt_string name, struct miqt_string value) { + QString name_QString = QString::fromUtf8(name.data, name.len); + QString value_QString = QString::fromUtf8(value.data, value.len); + self->setStyleProperty(name_QString, value_QString); +} + +void QWebElement_Render(QWebElement* self, QPainter* painter) { + self->render(painter); +} + +void QWebElement_Render2(QWebElement* self, QPainter* painter, QRect* clipRect) { + self->render(painter, *clipRect); +} + +struct miqt_string QWebElement_Attribute2(const QWebElement* self, struct miqt_string name, struct miqt_string defaultValue) { + QString name_QString = QString::fromUtf8(name.data, name.len); + QString defaultValue_QString = QString::fromUtf8(defaultValue.data, defaultValue.len); + QString _ret = self->attribute(name_QString, defaultValue_QString); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebElement_AttributeNS3(const QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string defaultValue) { + QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len); + QString name_QString = QString::fromUtf8(name.data, name.len); + QString defaultValue_QString = QString::fromUtf8(defaultValue.data, defaultValue.len); + QString _ret = self->attributeNS(namespaceUri_QString, name_QString, defaultValue_QString); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_array /* of struct miqt_string */ QWebElement_AttributeNames1(const QWebElement* self, struct miqt_string namespaceUri) { + QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len); + QStringList _ret = self->attributeNames(namespaceUri_QString); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QWebElement_Delete(QWebElement* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebElementCollection_new(QWebElementCollection** outptr_QWebElementCollection) { + QWebElementCollection* ret = new QWebElementCollection(); + *outptr_QWebElementCollection = ret; +} + +void QWebElementCollection_new2(QWebElement* contextElement, struct miqt_string query, QWebElementCollection** outptr_QWebElementCollection) { + QString query_QString = QString::fromUtf8(query.data, query.len); + QWebElementCollection* ret = new QWebElementCollection(*contextElement, query_QString); + *outptr_QWebElementCollection = ret; +} + +void QWebElementCollection_new3(QWebElementCollection* param1, QWebElementCollection** outptr_QWebElementCollection) { + QWebElementCollection* ret = new QWebElementCollection(*param1); + *outptr_QWebElementCollection = ret; +} + +void QWebElementCollection_OperatorAssign(QWebElementCollection* self, QWebElementCollection* param1) { + self->operator=(*param1); +} + +QWebElementCollection* QWebElementCollection_OperatorPlus(const QWebElementCollection* self, QWebElementCollection* other) { + return new QWebElementCollection(self->operator+(*other)); +} + +QWebElementCollection* QWebElementCollection_OperatorPlusAssign(QWebElementCollection* self, QWebElementCollection* other) { + QWebElementCollection& _ret = self->operator+=(*other); + // Cast returned reference into pointer + return &_ret; +} + +void QWebElementCollection_Append(QWebElementCollection* self, QWebElementCollection* collection) { + self->append(*collection); +} + +int QWebElementCollection_Count(const QWebElementCollection* self) { + return self->count(); +} + +QWebElement* QWebElementCollection_At(const QWebElementCollection* self, int i) { + return new QWebElement(self->at(static_cast(i))); +} + +QWebElement* QWebElementCollection_OperatorSubscript(const QWebElementCollection* self, int i) { + return new QWebElement(self->operator[](static_cast(i))); +} + +QWebElement* QWebElementCollection_First(const QWebElementCollection* self) { + return new QWebElement(self->first()); +} + +QWebElement* QWebElementCollection_Last(const QWebElementCollection* self) { + return new QWebElement(self->last()); +} + +struct miqt_array /* of QWebElement* */ QWebElementCollection_ToList(const QWebElementCollection* self) { + QList _ret = self->toList(); + // Convert QList<> from C++ memory to manually-managed C memory + QWebElement** _arr = static_cast(malloc(sizeof(QWebElement*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QWebElement(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +QWebElementCollection__const_iterator* QWebElementCollection_Begin(const QWebElementCollection* self) { + return new QWebElementCollection::const_iterator(self->begin()); +} + +QWebElementCollection__const_iterator* QWebElementCollection_End(const QWebElementCollection* self) { + return new QWebElementCollection::const_iterator(self->end()); +} + +QWebElementCollection__const_iterator* QWebElementCollection_ConstBegin(const QWebElementCollection* self) { + return new QWebElementCollection::const_iterator(self->constBegin()); +} + +QWebElementCollection__const_iterator* QWebElementCollection_ConstEnd(const QWebElementCollection* self) { + return new QWebElementCollection::const_iterator(self->constEnd()); +} + +QWebElementCollection__iterator* QWebElementCollection_Begin2(QWebElementCollection* self) { + return new QWebElementCollection::iterator(self->begin()); +} + +QWebElementCollection__iterator* QWebElementCollection_End2(QWebElementCollection* self) { + return new QWebElementCollection::iterator(self->end()); +} + +void QWebElementCollection_Delete(QWebElementCollection* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebElementCollection__const_iterator_new(QWebElementCollection* collection_, int index, QWebElementCollection__const_iterator** outptr_QWebElementCollection__const_iterator) { + QWebElementCollection::const_iterator* ret = new QWebElementCollection::const_iterator(collection_, static_cast(index)); + *outptr_QWebElementCollection__const_iterator = ret; +} + +void QWebElementCollection__const_iterator_new2(QWebElementCollection__const_iterator* o, QWebElementCollection__const_iterator** outptr_QWebElementCollection__const_iterator) { + QWebElementCollection::const_iterator* ret = new QWebElementCollection::const_iterator(*o); + *outptr_QWebElementCollection__const_iterator = ret; +} + +QWebElement* QWebElementCollection__const_iterator_OperatorMultiply(const QWebElementCollection__const_iterator* self) { + return new QWebElement(self->operator*()); +} + +bool QWebElementCollection__const_iterator_OperatorEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o) { + return (*self == *o); +} + +bool QWebElementCollection__const_iterator_OperatorNotEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o) { + return (*self != *o); +} + +bool QWebElementCollection__const_iterator_OperatorLesser(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o) { + return (*self < *o); +} + +bool QWebElementCollection__const_iterator_OperatorLesserOrEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o) { + return (*self <= *o); +} + +bool QWebElementCollection__const_iterator_OperatorGreater(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o) { + return (*self > *o); +} + +bool QWebElementCollection__const_iterator_OperatorGreaterOrEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o) { + return (*self >= *o); +} + +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorPlusPlus(QWebElementCollection__const_iterator* self) { + QWebElementCollection::const_iterator& _ret = self->operator++(); + // Cast returned reference into pointer + return &_ret; +} + +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorPlusPlusWithInt(QWebElementCollection__const_iterator* self, int param1) { + return new QWebElementCollection::const_iterator(self->operator++(static_cast(param1))); +} + +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorMinusMinus(QWebElementCollection__const_iterator* self) { + QWebElementCollection::const_iterator& _ret = self->operator--(); + // Cast returned reference into pointer + return &_ret; +} + +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorMinusMinusWithInt(QWebElementCollection__const_iterator* self, int param1) { + return new QWebElementCollection::const_iterator(self->operator--(static_cast(param1))); +} + +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorPlusAssign(QWebElementCollection__const_iterator* self, int j) { + QWebElementCollection::const_iterator& _ret = self->operator+=(static_cast(j)); + // Cast returned reference into pointer + return &_ret; +} + +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorMinusAssign(QWebElementCollection__const_iterator* self, int j) { + QWebElementCollection::const_iterator& _ret = self->operator-=(static_cast(j)); + // Cast returned reference into pointer + return &_ret; +} + +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorPlus(const QWebElementCollection__const_iterator* self, int j) { + return new QWebElementCollection::const_iterator(self->operator+(static_cast(j))); +} + +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorMinus(const QWebElementCollection__const_iterator* self, int j) { + return new QWebElementCollection::const_iterator(self->operator-(static_cast(j))); +} + +int QWebElementCollection__const_iterator_OperatorMinusWithQWebElementCollectionconstIterator(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* j) { + return self->operator-(*j); +} + +void QWebElementCollection__const_iterator_Delete(QWebElementCollection__const_iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebElementCollection__iterator_new(QWebElementCollection* collection_, int index, QWebElementCollection__iterator** outptr_QWebElementCollection__iterator) { + QWebElementCollection::iterator* ret = new QWebElementCollection::iterator(collection_, static_cast(index)); + *outptr_QWebElementCollection__iterator = ret; +} + +void QWebElementCollection__iterator_new2(QWebElementCollection__iterator* o, QWebElementCollection__iterator** outptr_QWebElementCollection__iterator) { + QWebElementCollection::iterator* ret = new QWebElementCollection::iterator(*o); + *outptr_QWebElementCollection__iterator = ret; +} + +QWebElement* QWebElementCollection__iterator_OperatorMultiply(const QWebElementCollection__iterator* self) { + return new QWebElement(self->operator*()); +} + +bool QWebElementCollection__iterator_OperatorEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o) { + return (*self == *o); +} + +bool QWebElementCollection__iterator_OperatorNotEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o) { + return (*self != *o); +} + +bool QWebElementCollection__iterator_OperatorLesser(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o) { + return (*self < *o); +} + +bool QWebElementCollection__iterator_OperatorLesserOrEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o) { + return (*self <= *o); +} + +bool QWebElementCollection__iterator_OperatorGreater(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o) { + return (*self > *o); +} + +bool QWebElementCollection__iterator_OperatorGreaterOrEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o) { + return (*self >= *o); +} + +QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorPlusPlus(QWebElementCollection__iterator* self) { + QWebElementCollection::iterator& _ret = self->operator++(); + // Cast returned reference into pointer + return &_ret; +} + +QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorPlusPlusWithInt(QWebElementCollection__iterator* self, int param1) { + return new QWebElementCollection::iterator(self->operator++(static_cast(param1))); +} + +QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorMinusMinus(QWebElementCollection__iterator* self) { + QWebElementCollection::iterator& _ret = self->operator--(); + // Cast returned reference into pointer + return &_ret; +} + +QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorMinusMinusWithInt(QWebElementCollection__iterator* self, int param1) { + return new QWebElementCollection::iterator(self->operator--(static_cast(param1))); +} + +QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorPlusAssign(QWebElementCollection__iterator* self, int j) { + QWebElementCollection::iterator& _ret = self->operator+=(static_cast(j)); + // Cast returned reference into pointer + return &_ret; +} + +QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorMinusAssign(QWebElementCollection__iterator* self, int j) { + QWebElementCollection::iterator& _ret = self->operator-=(static_cast(j)); + // Cast returned reference into pointer + return &_ret; +} + +QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorPlus(const QWebElementCollection__iterator* self, int j) { + return new QWebElementCollection::iterator(self->operator+(static_cast(j))); +} + +QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorMinus(const QWebElementCollection__iterator* self, int j) { + return new QWebElementCollection::iterator(self->operator-(static_cast(j))); +} + +int QWebElementCollection__iterator_OperatorMinusWithQWebElementCollectioniterator(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* j) { + return self->operator-(*j); +} + +void QWebElementCollection__iterator_Delete(QWebElementCollection__iterator* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webkit/gen_qwebelement.go b/qt/webkit/gen_qwebelement.go new file mode 100644 index 00000000..d1f8d6f1 --- /dev/null +++ b/qt/webkit/gen_qwebelement.go @@ -0,0 +1,1105 @@ +package webkit + +/* + +#include "gen_qwebelement.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QWebElement__StyleResolveStrategy int + +const ( + QWebElement__InlineStyle QWebElement__StyleResolveStrategy = 0 + QWebElement__CascadedStyle QWebElement__StyleResolveStrategy = 1 + QWebElement__ComputedStyle QWebElement__StyleResolveStrategy = 2 +) + +type QWebElement struct { + h *C.QWebElement + isSubclass bool +} + +func (this *QWebElement) cPointer() *C.QWebElement { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebElement) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebElement constructs the type using only CGO pointers. +func newQWebElement(h *C.QWebElement) *QWebElement { + if h == nil { + return nil + } + return &QWebElement{h: h} +} + +// UnsafeNewQWebElement constructs the type using only unsafe pointers. +func UnsafeNewQWebElement(h unsafe.Pointer) *QWebElement { + if h == nil { + return nil + } + + return &QWebElement{h: (*C.QWebElement)(h)} +} + +// NewQWebElement constructs a new QWebElement object. +func NewQWebElement() *QWebElement { + var outptr_QWebElement *C.QWebElement = nil + + C.QWebElement_new(&outptr_QWebElement) + ret := newQWebElement(outptr_QWebElement) + ret.isSubclass = true + return ret +} + +// NewQWebElement2 constructs a new QWebElement object. +func NewQWebElement2(param1 *QWebElement) *QWebElement { + var outptr_QWebElement *C.QWebElement = nil + + C.QWebElement_new2(param1.cPointer(), &outptr_QWebElement) + ret := newQWebElement(outptr_QWebElement) + ret.isSubclass = true + return ret +} + +func (this *QWebElement) OperatorAssign(param1 *QWebElement) { + C.QWebElement_OperatorAssign(this.h, param1.cPointer()) +} + +func (this *QWebElement) OperatorEqual(o *QWebElement) bool { + return (bool)(C.QWebElement_OperatorEqual(this.h, o.cPointer())) +} + +func (this *QWebElement) OperatorNotEqual(o *QWebElement) bool { + return (bool)(C.QWebElement_OperatorNotEqual(this.h, o.cPointer())) +} + +func (this *QWebElement) IsNull() bool { + return (bool)(C.QWebElement_IsNull(this.h)) +} + +func (this *QWebElement) FindAll(selectorQuery string) *QWebElementCollection { + selectorQuery_ms := C.struct_miqt_string{} + selectorQuery_ms.data = C.CString(selectorQuery) + selectorQuery_ms.len = C.size_t(len(selectorQuery)) + defer C.free(unsafe.Pointer(selectorQuery_ms.data)) + _ret := C.QWebElement_FindAll(this.h, selectorQuery_ms) + _goptr := newQWebElementCollection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElement) FindFirst(selectorQuery string) *QWebElement { + selectorQuery_ms := C.struct_miqt_string{} + selectorQuery_ms.data = C.CString(selectorQuery) + selectorQuery_ms.len = C.size_t(len(selectorQuery)) + defer C.free(unsafe.Pointer(selectorQuery_ms.data)) + _ret := C.QWebElement_FindFirst(this.h, selectorQuery_ms) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElement) SetPlainText(text string) { + text_ms := C.struct_miqt_string{} + text_ms.data = C.CString(text) + text_ms.len = C.size_t(len(text)) + defer C.free(unsafe.Pointer(text_ms.data)) + C.QWebElement_SetPlainText(this.h, text_ms) +} + +func (this *QWebElement) ToPlainText() string { + var _ms C.struct_miqt_string = C.QWebElement_ToPlainText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebElement) SetOuterXml(markup string) { + markup_ms := C.struct_miqt_string{} + markup_ms.data = C.CString(markup) + markup_ms.len = C.size_t(len(markup)) + defer C.free(unsafe.Pointer(markup_ms.data)) + C.QWebElement_SetOuterXml(this.h, markup_ms) +} + +func (this *QWebElement) ToOuterXml() string { + var _ms C.struct_miqt_string = C.QWebElement_ToOuterXml(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebElement) SetInnerXml(markup string) { + markup_ms := C.struct_miqt_string{} + markup_ms.data = C.CString(markup) + markup_ms.len = C.size_t(len(markup)) + defer C.free(unsafe.Pointer(markup_ms.data)) + C.QWebElement_SetInnerXml(this.h, markup_ms) +} + +func (this *QWebElement) ToInnerXml() string { + var _ms C.struct_miqt_string = C.QWebElement_ToInnerXml(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebElement) SetAttribute(name string, value string) { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + value_ms := C.struct_miqt_string{} + value_ms.data = C.CString(value) + value_ms.len = C.size_t(len(value)) + defer C.free(unsafe.Pointer(value_ms.data)) + C.QWebElement_SetAttribute(this.h, name_ms, value_ms) +} + +func (this *QWebElement) SetAttributeNS(namespaceUri string, name string, value string) { + namespaceUri_ms := C.struct_miqt_string{} + namespaceUri_ms.data = C.CString(namespaceUri) + namespaceUri_ms.len = C.size_t(len(namespaceUri)) + defer C.free(unsafe.Pointer(namespaceUri_ms.data)) + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + value_ms := C.struct_miqt_string{} + value_ms.data = C.CString(value) + value_ms.len = C.size_t(len(value)) + defer C.free(unsafe.Pointer(value_ms.data)) + C.QWebElement_SetAttributeNS(this.h, namespaceUri_ms, name_ms, value_ms) +} + +func (this *QWebElement) Attribute(name string) string { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + var _ms C.struct_miqt_string = C.QWebElement_Attribute(this.h, name_ms) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebElement) AttributeNS(namespaceUri string, name string) string { + namespaceUri_ms := C.struct_miqt_string{} + namespaceUri_ms.data = C.CString(namespaceUri) + namespaceUri_ms.len = C.size_t(len(namespaceUri)) + defer C.free(unsafe.Pointer(namespaceUri_ms.data)) + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + var _ms C.struct_miqt_string = C.QWebElement_AttributeNS(this.h, namespaceUri_ms, name_ms) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebElement) HasAttribute(name string) bool { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + return (bool)(C.QWebElement_HasAttribute(this.h, name_ms)) +} + +func (this *QWebElement) HasAttributeNS(namespaceUri string, name string) bool { + namespaceUri_ms := C.struct_miqt_string{} + namespaceUri_ms.data = C.CString(namespaceUri) + namespaceUri_ms.len = C.size_t(len(namespaceUri)) + defer C.free(unsafe.Pointer(namespaceUri_ms.data)) + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + return (bool)(C.QWebElement_HasAttributeNS(this.h, namespaceUri_ms, name_ms)) +} + +func (this *QWebElement) RemoveAttribute(name string) { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + C.QWebElement_RemoveAttribute(this.h, name_ms) +} + +func (this *QWebElement) RemoveAttributeNS(namespaceUri string, name string) { + namespaceUri_ms := C.struct_miqt_string{} + namespaceUri_ms.data = C.CString(namespaceUri) + namespaceUri_ms.len = C.size_t(len(namespaceUri)) + defer C.free(unsafe.Pointer(namespaceUri_ms.data)) + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + C.QWebElement_RemoveAttributeNS(this.h, namespaceUri_ms, name_ms) +} + +func (this *QWebElement) HasAttributes() bool { + return (bool)(C.QWebElement_HasAttributes(this.h)) +} + +func (this *QWebElement) AttributeNames() []string { + var _ma C.struct_miqt_array = C.QWebElement_AttributeNames(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 *QWebElement) Classes() []string { + var _ma C.struct_miqt_array = C.QWebElement_Classes(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 *QWebElement) HasClass(name string) bool { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + return (bool)(C.QWebElement_HasClass(this.h, name_ms)) +} + +func (this *QWebElement) AddClass(name string) { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + C.QWebElement_AddClass(this.h, name_ms) +} + +func (this *QWebElement) RemoveClass(name string) { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + C.QWebElement_RemoveClass(this.h, name_ms) +} + +func (this *QWebElement) ToggleClass(name string) { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + C.QWebElement_ToggleClass(this.h, name_ms) +} + +func (this *QWebElement) HasFocus() bool { + return (bool)(C.QWebElement_HasFocus(this.h)) +} + +func (this *QWebElement) SetFocus() { + C.QWebElement_SetFocus(this.h) +} + +func (this *QWebElement) Geometry() *qt.QRect { + _ret := C.QWebElement_Geometry(this.h) + _goptr := qt.UnsafeNewQRect(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElement) TagName() string { + var _ms C.struct_miqt_string = C.QWebElement_TagName(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebElement) Prefix() string { + var _ms C.struct_miqt_string = C.QWebElement_Prefix(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebElement) LocalName() string { + var _ms C.struct_miqt_string = C.QWebElement_LocalName(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebElement) NamespaceUri() string { + var _ms C.struct_miqt_string = C.QWebElement_NamespaceUri(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebElement) Parent() *QWebElement { + _ret := C.QWebElement_Parent(this.h) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElement) FirstChild() *QWebElement { + _ret := C.QWebElement_FirstChild(this.h) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElement) LastChild() *QWebElement { + _ret := C.QWebElement_LastChild(this.h) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElement) NextSibling() *QWebElement { + _ret := C.QWebElement_NextSibling(this.h) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElement) PreviousSibling() *QWebElement { + _ret := C.QWebElement_PreviousSibling(this.h) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElement) Document() *QWebElement { + _ret := C.QWebElement_Document(this.h) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElement) WebFrame() *QWebFrame { + return UnsafeNewQWebFrame(unsafe.Pointer(C.QWebElement_WebFrame(this.h)), nil) +} + +func (this *QWebElement) AppendInside(markup string) { + markup_ms := C.struct_miqt_string{} + markup_ms.data = C.CString(markup) + markup_ms.len = C.size_t(len(markup)) + defer C.free(unsafe.Pointer(markup_ms.data)) + C.QWebElement_AppendInside(this.h, markup_ms) +} + +func (this *QWebElement) AppendInsideWithElement(element *QWebElement) { + C.QWebElement_AppendInsideWithElement(this.h, element.cPointer()) +} + +func (this *QWebElement) PrependInside(markup string) { + markup_ms := C.struct_miqt_string{} + markup_ms.data = C.CString(markup) + markup_ms.len = C.size_t(len(markup)) + defer C.free(unsafe.Pointer(markup_ms.data)) + C.QWebElement_PrependInside(this.h, markup_ms) +} + +func (this *QWebElement) PrependInsideWithElement(element *QWebElement) { + C.QWebElement_PrependInsideWithElement(this.h, element.cPointer()) +} + +func (this *QWebElement) AppendOutside(markup string) { + markup_ms := C.struct_miqt_string{} + markup_ms.data = C.CString(markup) + markup_ms.len = C.size_t(len(markup)) + defer C.free(unsafe.Pointer(markup_ms.data)) + C.QWebElement_AppendOutside(this.h, markup_ms) +} + +func (this *QWebElement) AppendOutsideWithElement(element *QWebElement) { + C.QWebElement_AppendOutsideWithElement(this.h, element.cPointer()) +} + +func (this *QWebElement) PrependOutside(markup string) { + markup_ms := C.struct_miqt_string{} + markup_ms.data = C.CString(markup) + markup_ms.len = C.size_t(len(markup)) + defer C.free(unsafe.Pointer(markup_ms.data)) + C.QWebElement_PrependOutside(this.h, markup_ms) +} + +func (this *QWebElement) PrependOutsideWithElement(element *QWebElement) { + C.QWebElement_PrependOutsideWithElement(this.h, element.cPointer()) +} + +func (this *QWebElement) EncloseContentsWith(element *QWebElement) { + C.QWebElement_EncloseContentsWith(this.h, element.cPointer()) +} + +func (this *QWebElement) EncloseContentsWithWithMarkup(markup string) { + markup_ms := C.struct_miqt_string{} + markup_ms.data = C.CString(markup) + markup_ms.len = C.size_t(len(markup)) + defer C.free(unsafe.Pointer(markup_ms.data)) + C.QWebElement_EncloseContentsWithWithMarkup(this.h, markup_ms) +} + +func (this *QWebElement) EncloseWith(markup string) { + markup_ms := C.struct_miqt_string{} + markup_ms.data = C.CString(markup) + markup_ms.len = C.size_t(len(markup)) + defer C.free(unsafe.Pointer(markup_ms.data)) + C.QWebElement_EncloseWith(this.h, markup_ms) +} + +func (this *QWebElement) EncloseWithWithElement(element *QWebElement) { + C.QWebElement_EncloseWithWithElement(this.h, element.cPointer()) +} + +func (this *QWebElement) Replace(markup string) { + markup_ms := C.struct_miqt_string{} + markup_ms.data = C.CString(markup) + markup_ms.len = C.size_t(len(markup)) + defer C.free(unsafe.Pointer(markup_ms.data)) + C.QWebElement_Replace(this.h, markup_ms) +} + +func (this *QWebElement) ReplaceWithElement(element *QWebElement) { + C.QWebElement_ReplaceWithElement(this.h, element.cPointer()) +} + +func (this *QWebElement) Clone() *QWebElement { + _ret := C.QWebElement_Clone(this.h) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElement) TakeFromDocument() *QWebElement { + return UnsafeNewQWebElement(unsafe.Pointer(C.QWebElement_TakeFromDocument(this.h))) +} + +func (this *QWebElement) RemoveFromDocument() { + C.QWebElement_RemoveFromDocument(this.h) +} + +func (this *QWebElement) RemoveAllChildren() { + C.QWebElement_RemoveAllChildren(this.h) +} + +func (this *QWebElement) EvaluateJavaScript(scriptSource string) *qt.QVariant { + scriptSource_ms := C.struct_miqt_string{} + scriptSource_ms.data = C.CString(scriptSource) + scriptSource_ms.len = C.size_t(len(scriptSource)) + defer C.free(unsafe.Pointer(scriptSource_ms.data)) + _ret := C.QWebElement_EvaluateJavaScript(this.h, scriptSource_ms) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElement) StyleProperty(name string, strategy QWebElement__StyleResolveStrategy) string { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + var _ms C.struct_miqt_string = C.QWebElement_StyleProperty(this.h, name_ms, (C.int)(strategy)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebElement) SetStyleProperty(name string, value string) { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + value_ms := C.struct_miqt_string{} + value_ms.data = C.CString(value) + value_ms.len = C.size_t(len(value)) + defer C.free(unsafe.Pointer(value_ms.data)) + C.QWebElement_SetStyleProperty(this.h, name_ms, value_ms) +} + +func (this *QWebElement) Render(painter *qt.QPainter) { + C.QWebElement_Render(this.h, (*C.QPainter)(painter.UnsafePointer())) +} + +func (this *QWebElement) Render2(painter *qt.QPainter, clipRect *qt.QRect) { + C.QWebElement_Render2(this.h, (*C.QPainter)(painter.UnsafePointer()), (*C.QRect)(clipRect.UnsafePointer())) +} + +func (this *QWebElement) Attribute2(name string, defaultValue string) string { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + defaultValue_ms := C.struct_miqt_string{} + defaultValue_ms.data = C.CString(defaultValue) + defaultValue_ms.len = C.size_t(len(defaultValue)) + defer C.free(unsafe.Pointer(defaultValue_ms.data)) + var _ms C.struct_miqt_string = C.QWebElement_Attribute2(this.h, name_ms, defaultValue_ms) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebElement) AttributeNS3(namespaceUri string, name string, defaultValue string) string { + namespaceUri_ms := C.struct_miqt_string{} + namespaceUri_ms.data = C.CString(namespaceUri) + namespaceUri_ms.len = C.size_t(len(namespaceUri)) + defer C.free(unsafe.Pointer(namespaceUri_ms.data)) + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + defaultValue_ms := C.struct_miqt_string{} + defaultValue_ms.data = C.CString(defaultValue) + defaultValue_ms.len = C.size_t(len(defaultValue)) + defer C.free(unsafe.Pointer(defaultValue_ms.data)) + var _ms C.struct_miqt_string = C.QWebElement_AttributeNS3(this.h, namespaceUri_ms, name_ms, defaultValue_ms) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebElement) AttributeNames1(namespaceUri string) []string { + namespaceUri_ms := C.struct_miqt_string{} + namespaceUri_ms.data = C.CString(namespaceUri) + namespaceUri_ms.len = C.size_t(len(namespaceUri)) + defer C.free(unsafe.Pointer(namespaceUri_ms.data)) + var _ma C.struct_miqt_array = C.QWebElement_AttributeNames1(this.h, namespaceUri_ms) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebElement) Delete() { + C.QWebElement_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 *QWebElement) GoGC() { + runtime.SetFinalizer(this, func(this *QWebElement) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebElementCollection struct { + h *C.QWebElementCollection + isSubclass bool +} + +func (this *QWebElementCollection) cPointer() *C.QWebElementCollection { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebElementCollection) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebElementCollection constructs the type using only CGO pointers. +func newQWebElementCollection(h *C.QWebElementCollection) *QWebElementCollection { + if h == nil { + return nil + } + return &QWebElementCollection{h: h} +} + +// UnsafeNewQWebElementCollection constructs the type using only unsafe pointers. +func UnsafeNewQWebElementCollection(h unsafe.Pointer) *QWebElementCollection { + if h == nil { + return nil + } + + return &QWebElementCollection{h: (*C.QWebElementCollection)(h)} +} + +// NewQWebElementCollection constructs a new QWebElementCollection object. +func NewQWebElementCollection() *QWebElementCollection { + var outptr_QWebElementCollection *C.QWebElementCollection = nil + + C.QWebElementCollection_new(&outptr_QWebElementCollection) + ret := newQWebElementCollection(outptr_QWebElementCollection) + ret.isSubclass = true + return ret +} + +// NewQWebElementCollection2 constructs a new QWebElementCollection object. +func NewQWebElementCollection2(contextElement *QWebElement, query string) *QWebElementCollection { + query_ms := C.struct_miqt_string{} + query_ms.data = C.CString(query) + query_ms.len = C.size_t(len(query)) + defer C.free(unsafe.Pointer(query_ms.data)) + var outptr_QWebElementCollection *C.QWebElementCollection = nil + + C.QWebElementCollection_new2(contextElement.cPointer(), query_ms, &outptr_QWebElementCollection) + ret := newQWebElementCollection(outptr_QWebElementCollection) + ret.isSubclass = true + return ret +} + +// NewQWebElementCollection3 constructs a new QWebElementCollection object. +func NewQWebElementCollection3(param1 *QWebElementCollection) *QWebElementCollection { + var outptr_QWebElementCollection *C.QWebElementCollection = nil + + C.QWebElementCollection_new3(param1.cPointer(), &outptr_QWebElementCollection) + ret := newQWebElementCollection(outptr_QWebElementCollection) + ret.isSubclass = true + return ret +} + +func (this *QWebElementCollection) OperatorAssign(param1 *QWebElementCollection) { + C.QWebElementCollection_OperatorAssign(this.h, param1.cPointer()) +} + +func (this *QWebElementCollection) OperatorPlus(other *QWebElementCollection) *QWebElementCollection { + _ret := C.QWebElementCollection_OperatorPlus(this.h, other.cPointer()) + _goptr := newQWebElementCollection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection) OperatorPlusAssign(other *QWebElementCollection) *QWebElementCollection { + return UnsafeNewQWebElementCollection(unsafe.Pointer(C.QWebElementCollection_OperatorPlusAssign(this.h, other.cPointer()))) +} + +func (this *QWebElementCollection) Append(collection *QWebElementCollection) { + C.QWebElementCollection_Append(this.h, collection.cPointer()) +} + +func (this *QWebElementCollection) Count() int { + return (int)(C.QWebElementCollection_Count(this.h)) +} + +func (this *QWebElementCollection) At(i int) *QWebElement { + _ret := C.QWebElementCollection_At(this.h, (C.int)(i)) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection) OperatorSubscript(i int) *QWebElement { + _ret := C.QWebElementCollection_OperatorSubscript(this.h, (C.int)(i)) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection) First() *QWebElement { + _ret := C.QWebElementCollection_First(this.h) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection) Last() *QWebElement { + _ret := C.QWebElementCollection_Last(this.h) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection) ToList() []QWebElement { + var _ma C.struct_miqt_array = C.QWebElementCollection_ToList(this.h) + _ret := make([]QWebElement, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebElement)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebElement(_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 *QWebElementCollection) Begin() *QWebElementCollection__const_iterator { + _ret := C.QWebElementCollection_Begin(this.h) + _goptr := newQWebElementCollection__const_iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection) End() *QWebElementCollection__const_iterator { + _ret := C.QWebElementCollection_End(this.h) + _goptr := newQWebElementCollection__const_iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection) ConstBegin() *QWebElementCollection__const_iterator { + _ret := C.QWebElementCollection_ConstBegin(this.h) + _goptr := newQWebElementCollection__const_iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection) ConstEnd() *QWebElementCollection__const_iterator { + _ret := C.QWebElementCollection_ConstEnd(this.h) + _goptr := newQWebElementCollection__const_iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection) Begin2() *QWebElementCollection__iterator { + _ret := C.QWebElementCollection_Begin2(this.h) + _goptr := newQWebElementCollection__iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection) End2() *QWebElementCollection__iterator { + _ret := C.QWebElementCollection_End2(this.h) + _goptr := newQWebElementCollection__iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +// Delete this object from C++ memory. +func (this *QWebElementCollection) Delete() { + C.QWebElementCollection_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 *QWebElementCollection) GoGC() { + runtime.SetFinalizer(this, func(this *QWebElementCollection) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebElementCollection__const_iterator struct { + h *C.QWebElementCollection__const_iterator + isSubclass bool +} + +func (this *QWebElementCollection__const_iterator) cPointer() *C.QWebElementCollection__const_iterator { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebElementCollection__const_iterator) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebElementCollection__const_iterator constructs the type using only CGO pointers. +func newQWebElementCollection__const_iterator(h *C.QWebElementCollection__const_iterator) *QWebElementCollection__const_iterator { + if h == nil { + return nil + } + return &QWebElementCollection__const_iterator{h: h} +} + +// UnsafeNewQWebElementCollection__const_iterator constructs the type using only unsafe pointers. +func UnsafeNewQWebElementCollection__const_iterator(h unsafe.Pointer) *QWebElementCollection__const_iterator { + if h == nil { + return nil + } + + return &QWebElementCollection__const_iterator{h: (*C.QWebElementCollection__const_iterator)(h)} +} + +// NewQWebElementCollection__const_iterator constructs a new QWebElementCollection::const_iterator object. +func NewQWebElementCollection__const_iterator(collection_ *QWebElementCollection, index int) *QWebElementCollection__const_iterator { + var outptr_QWebElementCollection__const_iterator *C.QWebElementCollection__const_iterator = nil + + C.QWebElementCollection__const_iterator_new(collection_.cPointer(), (C.int)(index), &outptr_QWebElementCollection__const_iterator) + ret := newQWebElementCollection__const_iterator(outptr_QWebElementCollection__const_iterator) + ret.isSubclass = true + return ret +} + +// NewQWebElementCollection__const_iterator2 constructs a new QWebElementCollection::const_iterator object. +func NewQWebElementCollection__const_iterator2(o *QWebElementCollection__const_iterator) *QWebElementCollection__const_iterator { + var outptr_QWebElementCollection__const_iterator *C.QWebElementCollection__const_iterator = nil + + C.QWebElementCollection__const_iterator_new2(o.cPointer(), &outptr_QWebElementCollection__const_iterator) + ret := newQWebElementCollection__const_iterator(outptr_QWebElementCollection__const_iterator) + ret.isSubclass = true + return ret +} + +func (this *QWebElementCollection__const_iterator) OperatorMultiply() *QWebElement { + _ret := C.QWebElementCollection__const_iterator_OperatorMultiply(this.h) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection__const_iterator) OperatorEqual(o *QWebElementCollection__const_iterator) bool { + return (bool)(C.QWebElementCollection__const_iterator_OperatorEqual(this.h, o.cPointer())) +} + +func (this *QWebElementCollection__const_iterator) OperatorNotEqual(o *QWebElementCollection__const_iterator) bool { + return (bool)(C.QWebElementCollection__const_iterator_OperatorNotEqual(this.h, o.cPointer())) +} + +func (this *QWebElementCollection__const_iterator) OperatorLesser(o *QWebElementCollection__const_iterator) bool { + return (bool)(C.QWebElementCollection__const_iterator_OperatorLesser(this.h, o.cPointer())) +} + +func (this *QWebElementCollection__const_iterator) OperatorLesserOrEqual(o *QWebElementCollection__const_iterator) bool { + return (bool)(C.QWebElementCollection__const_iterator_OperatorLesserOrEqual(this.h, o.cPointer())) +} + +func (this *QWebElementCollection__const_iterator) OperatorGreater(o *QWebElementCollection__const_iterator) bool { + return (bool)(C.QWebElementCollection__const_iterator_OperatorGreater(this.h, o.cPointer())) +} + +func (this *QWebElementCollection__const_iterator) OperatorGreaterOrEqual(o *QWebElementCollection__const_iterator) bool { + return (bool)(C.QWebElementCollection__const_iterator_OperatorGreaterOrEqual(this.h, o.cPointer())) +} + +func (this *QWebElementCollection__const_iterator) OperatorPlusPlus() *QWebElementCollection__const_iterator { + return UnsafeNewQWebElementCollection__const_iterator(unsafe.Pointer(C.QWebElementCollection__const_iterator_OperatorPlusPlus(this.h))) +} + +func (this *QWebElementCollection__const_iterator) OperatorPlusPlusWithInt(param1 int) *QWebElementCollection__const_iterator { + _ret := C.QWebElementCollection__const_iterator_OperatorPlusPlusWithInt(this.h, (C.int)(param1)) + _goptr := newQWebElementCollection__const_iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection__const_iterator) OperatorMinusMinus() *QWebElementCollection__const_iterator { + return UnsafeNewQWebElementCollection__const_iterator(unsafe.Pointer(C.QWebElementCollection__const_iterator_OperatorMinusMinus(this.h))) +} + +func (this *QWebElementCollection__const_iterator) OperatorMinusMinusWithInt(param1 int) *QWebElementCollection__const_iterator { + _ret := C.QWebElementCollection__const_iterator_OperatorMinusMinusWithInt(this.h, (C.int)(param1)) + _goptr := newQWebElementCollection__const_iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection__const_iterator) OperatorPlusAssign(j int) *QWebElementCollection__const_iterator { + return UnsafeNewQWebElementCollection__const_iterator(unsafe.Pointer(C.QWebElementCollection__const_iterator_OperatorPlusAssign(this.h, (C.int)(j)))) +} + +func (this *QWebElementCollection__const_iterator) OperatorMinusAssign(j int) *QWebElementCollection__const_iterator { + return UnsafeNewQWebElementCollection__const_iterator(unsafe.Pointer(C.QWebElementCollection__const_iterator_OperatorMinusAssign(this.h, (C.int)(j)))) +} + +func (this *QWebElementCollection__const_iterator) OperatorPlus(j int) *QWebElementCollection__const_iterator { + _ret := C.QWebElementCollection__const_iterator_OperatorPlus(this.h, (C.int)(j)) + _goptr := newQWebElementCollection__const_iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection__const_iterator) OperatorMinus(j int) *QWebElementCollection__const_iterator { + _ret := C.QWebElementCollection__const_iterator_OperatorMinus(this.h, (C.int)(j)) + _goptr := newQWebElementCollection__const_iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection__const_iterator) OperatorMinusWithQWebElementCollectionconstIterator(j QWebElementCollection__const_iterator) int { + return (int)(C.QWebElementCollection__const_iterator_OperatorMinusWithQWebElementCollectionconstIterator(this.h, j.cPointer())) +} + +// Delete this object from C++ memory. +func (this *QWebElementCollection__const_iterator) Delete() { + C.QWebElementCollection__const_iterator_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 *QWebElementCollection__const_iterator) GoGC() { + runtime.SetFinalizer(this, func(this *QWebElementCollection__const_iterator) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebElementCollection__iterator struct { + h *C.QWebElementCollection__iterator + isSubclass bool +} + +func (this *QWebElementCollection__iterator) cPointer() *C.QWebElementCollection__iterator { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebElementCollection__iterator) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebElementCollection__iterator constructs the type using only CGO pointers. +func newQWebElementCollection__iterator(h *C.QWebElementCollection__iterator) *QWebElementCollection__iterator { + if h == nil { + return nil + } + return &QWebElementCollection__iterator{h: h} +} + +// UnsafeNewQWebElementCollection__iterator constructs the type using only unsafe pointers. +func UnsafeNewQWebElementCollection__iterator(h unsafe.Pointer) *QWebElementCollection__iterator { + if h == nil { + return nil + } + + return &QWebElementCollection__iterator{h: (*C.QWebElementCollection__iterator)(h)} +} + +// NewQWebElementCollection__iterator constructs a new QWebElementCollection::iterator object. +func NewQWebElementCollection__iterator(collection_ *QWebElementCollection, index int) *QWebElementCollection__iterator { + var outptr_QWebElementCollection__iterator *C.QWebElementCollection__iterator = nil + + C.QWebElementCollection__iterator_new(collection_.cPointer(), (C.int)(index), &outptr_QWebElementCollection__iterator) + ret := newQWebElementCollection__iterator(outptr_QWebElementCollection__iterator) + ret.isSubclass = true + return ret +} + +// NewQWebElementCollection__iterator2 constructs a new QWebElementCollection::iterator object. +func NewQWebElementCollection__iterator2(o *QWebElementCollection__iterator) *QWebElementCollection__iterator { + var outptr_QWebElementCollection__iterator *C.QWebElementCollection__iterator = nil + + C.QWebElementCollection__iterator_new2(o.cPointer(), &outptr_QWebElementCollection__iterator) + ret := newQWebElementCollection__iterator(outptr_QWebElementCollection__iterator) + ret.isSubclass = true + return ret +} + +func (this *QWebElementCollection__iterator) OperatorMultiply() *QWebElement { + _ret := C.QWebElementCollection__iterator_OperatorMultiply(this.h) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection__iterator) OperatorEqual(o *QWebElementCollection__iterator) bool { + return (bool)(C.QWebElementCollection__iterator_OperatorEqual(this.h, o.cPointer())) +} + +func (this *QWebElementCollection__iterator) OperatorNotEqual(o *QWebElementCollection__iterator) bool { + return (bool)(C.QWebElementCollection__iterator_OperatorNotEqual(this.h, o.cPointer())) +} + +func (this *QWebElementCollection__iterator) OperatorLesser(o *QWebElementCollection__iterator) bool { + return (bool)(C.QWebElementCollection__iterator_OperatorLesser(this.h, o.cPointer())) +} + +func (this *QWebElementCollection__iterator) OperatorLesserOrEqual(o *QWebElementCollection__iterator) bool { + return (bool)(C.QWebElementCollection__iterator_OperatorLesserOrEqual(this.h, o.cPointer())) +} + +func (this *QWebElementCollection__iterator) OperatorGreater(o *QWebElementCollection__iterator) bool { + return (bool)(C.QWebElementCollection__iterator_OperatorGreater(this.h, o.cPointer())) +} + +func (this *QWebElementCollection__iterator) OperatorGreaterOrEqual(o *QWebElementCollection__iterator) bool { + return (bool)(C.QWebElementCollection__iterator_OperatorGreaterOrEqual(this.h, o.cPointer())) +} + +func (this *QWebElementCollection__iterator) OperatorPlusPlus() *QWebElementCollection__iterator { + return UnsafeNewQWebElementCollection__iterator(unsafe.Pointer(C.QWebElementCollection__iterator_OperatorPlusPlus(this.h))) +} + +func (this *QWebElementCollection__iterator) OperatorPlusPlusWithInt(param1 int) *QWebElementCollection__iterator { + _ret := C.QWebElementCollection__iterator_OperatorPlusPlusWithInt(this.h, (C.int)(param1)) + _goptr := newQWebElementCollection__iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection__iterator) OperatorMinusMinus() *QWebElementCollection__iterator { + return UnsafeNewQWebElementCollection__iterator(unsafe.Pointer(C.QWebElementCollection__iterator_OperatorMinusMinus(this.h))) +} + +func (this *QWebElementCollection__iterator) OperatorMinusMinusWithInt(param1 int) *QWebElementCollection__iterator { + _ret := C.QWebElementCollection__iterator_OperatorMinusMinusWithInt(this.h, (C.int)(param1)) + _goptr := newQWebElementCollection__iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection__iterator) OperatorPlusAssign(j int) *QWebElementCollection__iterator { + return UnsafeNewQWebElementCollection__iterator(unsafe.Pointer(C.QWebElementCollection__iterator_OperatorPlusAssign(this.h, (C.int)(j)))) +} + +func (this *QWebElementCollection__iterator) OperatorMinusAssign(j int) *QWebElementCollection__iterator { + return UnsafeNewQWebElementCollection__iterator(unsafe.Pointer(C.QWebElementCollection__iterator_OperatorMinusAssign(this.h, (C.int)(j)))) +} + +func (this *QWebElementCollection__iterator) OperatorPlus(j int) *QWebElementCollection__iterator { + _ret := C.QWebElementCollection__iterator_OperatorPlus(this.h, (C.int)(j)) + _goptr := newQWebElementCollection__iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection__iterator) OperatorMinus(j int) *QWebElementCollection__iterator { + _ret := C.QWebElementCollection__iterator_OperatorMinus(this.h, (C.int)(j)) + _goptr := newQWebElementCollection__iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebElementCollection__iterator) OperatorMinusWithQWebElementCollectioniterator(j QWebElementCollection__iterator) int { + return (int)(C.QWebElementCollection__iterator_OperatorMinusWithQWebElementCollectioniterator(this.h, j.cPointer())) +} + +// Delete this object from C++ memory. +func (this *QWebElementCollection__iterator) Delete() { + C.QWebElementCollection__iterator_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 *QWebElementCollection__iterator) GoGC() { + runtime.SetFinalizer(this, func(this *QWebElementCollection__iterator) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webkit/gen_qwebelement.h b/qt/webkit/gen_qwebelement.h new file mode 100644 index 00000000..656ec7ca --- /dev/null +++ b/qt/webkit/gen_qwebelement.h @@ -0,0 +1,181 @@ +#pragma once +#ifndef MIQT_QT_WEBKIT_GEN_QWEBELEMENT_H +#define MIQT_QT_WEBKIT_GEN_QWEBELEMENT_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QPainter; +class QRect; +class QVariant; +class QWebElement; +class QWebElementCollection; +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebElementCollection__const_iterator) +typedef QWebElementCollection::const_iterator QWebElementCollection__const_iterator; +#else +class QWebElementCollection__const_iterator; +#endif +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebElementCollection__iterator) +typedef QWebElementCollection::iterator QWebElementCollection__iterator; +#else +class QWebElementCollection__iterator; +#endif +class QWebFrame; +#else +typedef struct QPainter QPainter; +typedef struct QRect QRect; +typedef struct QVariant QVariant; +typedef struct QWebElement QWebElement; +typedef struct QWebElementCollection QWebElementCollection; +typedef struct QWebElementCollection__const_iterator QWebElementCollection__const_iterator; +typedef struct QWebElementCollection__iterator QWebElementCollection__iterator; +typedef struct QWebFrame QWebFrame; +#endif + +void QWebElement_new(QWebElement** outptr_QWebElement); +void QWebElement_new2(QWebElement* param1, QWebElement** outptr_QWebElement); +void QWebElement_OperatorAssign(QWebElement* self, QWebElement* param1); +bool QWebElement_OperatorEqual(const QWebElement* self, QWebElement* o); +bool QWebElement_OperatorNotEqual(const QWebElement* self, QWebElement* o); +bool QWebElement_IsNull(const QWebElement* self); +QWebElementCollection* QWebElement_FindAll(const QWebElement* self, struct miqt_string selectorQuery); +QWebElement* QWebElement_FindFirst(const QWebElement* self, struct miqt_string selectorQuery); +void QWebElement_SetPlainText(QWebElement* self, struct miqt_string text); +struct miqt_string QWebElement_ToPlainText(const QWebElement* self); +void QWebElement_SetOuterXml(QWebElement* self, struct miqt_string markup); +struct miqt_string QWebElement_ToOuterXml(const QWebElement* self); +void QWebElement_SetInnerXml(QWebElement* self, struct miqt_string markup); +struct miqt_string QWebElement_ToInnerXml(const QWebElement* self); +void QWebElement_SetAttribute(QWebElement* self, struct miqt_string name, struct miqt_string value); +void QWebElement_SetAttributeNS(QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value); +struct miqt_string QWebElement_Attribute(const QWebElement* self, struct miqt_string name); +struct miqt_string QWebElement_AttributeNS(const QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name); +bool QWebElement_HasAttribute(const QWebElement* self, struct miqt_string name); +bool QWebElement_HasAttributeNS(const QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name); +void QWebElement_RemoveAttribute(QWebElement* self, struct miqt_string name); +void QWebElement_RemoveAttributeNS(QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name); +bool QWebElement_HasAttributes(const QWebElement* self); +struct miqt_array /* of struct miqt_string */ QWebElement_AttributeNames(const QWebElement* self); +struct miqt_array /* of struct miqt_string */ QWebElement_Classes(const QWebElement* self); +bool QWebElement_HasClass(const QWebElement* self, struct miqt_string name); +void QWebElement_AddClass(QWebElement* self, struct miqt_string name); +void QWebElement_RemoveClass(QWebElement* self, struct miqt_string name); +void QWebElement_ToggleClass(QWebElement* self, struct miqt_string name); +bool QWebElement_HasFocus(const QWebElement* self); +void QWebElement_SetFocus(QWebElement* self); +QRect* QWebElement_Geometry(const QWebElement* self); +struct miqt_string QWebElement_TagName(const QWebElement* self); +struct miqt_string QWebElement_Prefix(const QWebElement* self); +struct miqt_string QWebElement_LocalName(const QWebElement* self); +struct miqt_string QWebElement_NamespaceUri(const QWebElement* self); +QWebElement* QWebElement_Parent(const QWebElement* self); +QWebElement* QWebElement_FirstChild(const QWebElement* self); +QWebElement* QWebElement_LastChild(const QWebElement* self); +QWebElement* QWebElement_NextSibling(const QWebElement* self); +QWebElement* QWebElement_PreviousSibling(const QWebElement* self); +QWebElement* QWebElement_Document(const QWebElement* self); +QWebFrame* QWebElement_WebFrame(const QWebElement* self); +void QWebElement_AppendInside(QWebElement* self, struct miqt_string markup); +void QWebElement_AppendInsideWithElement(QWebElement* self, QWebElement* element); +void QWebElement_PrependInside(QWebElement* self, struct miqt_string markup); +void QWebElement_PrependInsideWithElement(QWebElement* self, QWebElement* element); +void QWebElement_AppendOutside(QWebElement* self, struct miqt_string markup); +void QWebElement_AppendOutsideWithElement(QWebElement* self, QWebElement* element); +void QWebElement_PrependOutside(QWebElement* self, struct miqt_string markup); +void QWebElement_PrependOutsideWithElement(QWebElement* self, QWebElement* element); +void QWebElement_EncloseContentsWith(QWebElement* self, QWebElement* element); +void QWebElement_EncloseContentsWithWithMarkup(QWebElement* self, struct miqt_string markup); +void QWebElement_EncloseWith(QWebElement* self, struct miqt_string markup); +void QWebElement_EncloseWithWithElement(QWebElement* self, QWebElement* element); +void QWebElement_Replace(QWebElement* self, struct miqt_string markup); +void QWebElement_ReplaceWithElement(QWebElement* self, QWebElement* element); +QWebElement* QWebElement_Clone(const QWebElement* self); +QWebElement* QWebElement_TakeFromDocument(QWebElement* self); +void QWebElement_RemoveFromDocument(QWebElement* self); +void QWebElement_RemoveAllChildren(QWebElement* self); +QVariant* QWebElement_EvaluateJavaScript(QWebElement* self, struct miqt_string scriptSource); +struct miqt_string QWebElement_StyleProperty(const QWebElement* self, struct miqt_string name, int strategy); +void QWebElement_SetStyleProperty(QWebElement* self, struct miqt_string name, struct miqt_string value); +void QWebElement_Render(QWebElement* self, QPainter* painter); +void QWebElement_Render2(QWebElement* self, QPainter* painter, QRect* clipRect); +struct miqt_string QWebElement_Attribute2(const QWebElement* self, struct miqt_string name, struct miqt_string defaultValue); +struct miqt_string QWebElement_AttributeNS3(const QWebElement* self, struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string defaultValue); +struct miqt_array /* of struct miqt_string */ QWebElement_AttributeNames1(const QWebElement* self, struct miqt_string namespaceUri); +void QWebElement_Delete(QWebElement* self, bool isSubclass); + +void QWebElementCollection_new(QWebElementCollection** outptr_QWebElementCollection); +void QWebElementCollection_new2(QWebElement* contextElement, struct miqt_string query, QWebElementCollection** outptr_QWebElementCollection); +void QWebElementCollection_new3(QWebElementCollection* param1, QWebElementCollection** outptr_QWebElementCollection); +void QWebElementCollection_OperatorAssign(QWebElementCollection* self, QWebElementCollection* param1); +QWebElementCollection* QWebElementCollection_OperatorPlus(const QWebElementCollection* self, QWebElementCollection* other); +QWebElementCollection* QWebElementCollection_OperatorPlusAssign(QWebElementCollection* self, QWebElementCollection* other); +void QWebElementCollection_Append(QWebElementCollection* self, QWebElementCollection* collection); +int QWebElementCollection_Count(const QWebElementCollection* self); +QWebElement* QWebElementCollection_At(const QWebElementCollection* self, int i); +QWebElement* QWebElementCollection_OperatorSubscript(const QWebElementCollection* self, int i); +QWebElement* QWebElementCollection_First(const QWebElementCollection* self); +QWebElement* QWebElementCollection_Last(const QWebElementCollection* self); +struct miqt_array /* of QWebElement* */ QWebElementCollection_ToList(const QWebElementCollection* self); +QWebElementCollection__const_iterator* QWebElementCollection_Begin(const QWebElementCollection* self); +QWebElementCollection__const_iterator* QWebElementCollection_End(const QWebElementCollection* self); +QWebElementCollection__const_iterator* QWebElementCollection_ConstBegin(const QWebElementCollection* self); +QWebElementCollection__const_iterator* QWebElementCollection_ConstEnd(const QWebElementCollection* self); +QWebElementCollection__iterator* QWebElementCollection_Begin2(QWebElementCollection* self); +QWebElementCollection__iterator* QWebElementCollection_End2(QWebElementCollection* self); +void QWebElementCollection_Delete(QWebElementCollection* self, bool isSubclass); + +void QWebElementCollection__const_iterator_new(QWebElementCollection* collection_, int index, QWebElementCollection__const_iterator** outptr_QWebElementCollection__const_iterator); +void QWebElementCollection__const_iterator_new2(QWebElementCollection__const_iterator* o, QWebElementCollection__const_iterator** outptr_QWebElementCollection__const_iterator); +QWebElement* QWebElementCollection__const_iterator_OperatorMultiply(const QWebElementCollection__const_iterator* self); +bool QWebElementCollection__const_iterator_OperatorEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o); +bool QWebElementCollection__const_iterator_OperatorNotEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o); +bool QWebElementCollection__const_iterator_OperatorLesser(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o); +bool QWebElementCollection__const_iterator_OperatorLesserOrEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o); +bool QWebElementCollection__const_iterator_OperatorGreater(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o); +bool QWebElementCollection__const_iterator_OperatorGreaterOrEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o); +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorPlusPlus(QWebElementCollection__const_iterator* self); +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorPlusPlusWithInt(QWebElementCollection__const_iterator* self, int param1); +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorMinusMinus(QWebElementCollection__const_iterator* self); +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorMinusMinusWithInt(QWebElementCollection__const_iterator* self, int param1); +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorPlusAssign(QWebElementCollection__const_iterator* self, int j); +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorMinusAssign(QWebElementCollection__const_iterator* self, int j); +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorPlus(const QWebElementCollection__const_iterator* self, int j); +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_OperatorMinus(const QWebElementCollection__const_iterator* self, int j); +int QWebElementCollection__const_iterator_OperatorMinusWithQWebElementCollectionconstIterator(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* j); +void QWebElementCollection__const_iterator_Delete(QWebElementCollection__const_iterator* self, bool isSubclass); + +void QWebElementCollection__iterator_new(QWebElementCollection* collection_, int index, QWebElementCollection__iterator** outptr_QWebElementCollection__iterator); +void QWebElementCollection__iterator_new2(QWebElementCollection__iterator* o, QWebElementCollection__iterator** outptr_QWebElementCollection__iterator); +QWebElement* QWebElementCollection__iterator_OperatorMultiply(const QWebElementCollection__iterator* self); +bool QWebElementCollection__iterator_OperatorEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o); +bool QWebElementCollection__iterator_OperatorNotEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o); +bool QWebElementCollection__iterator_OperatorLesser(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o); +bool QWebElementCollection__iterator_OperatorLesserOrEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o); +bool QWebElementCollection__iterator_OperatorGreater(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o); +bool QWebElementCollection__iterator_OperatorGreaterOrEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o); +QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorPlusPlus(QWebElementCollection__iterator* self); +QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorPlusPlusWithInt(QWebElementCollection__iterator* self, int param1); +QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorMinusMinus(QWebElementCollection__iterator* self); +QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorMinusMinusWithInt(QWebElementCollection__iterator* self, int param1); +QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorPlusAssign(QWebElementCollection__iterator* self, int j); +QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorMinusAssign(QWebElementCollection__iterator* self, int j); +QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorPlus(const QWebElementCollection__iterator* self, int j); +QWebElementCollection__iterator* QWebElementCollection__iterator_OperatorMinus(const QWebElementCollection__iterator* self, int j); +int QWebElementCollection__iterator_OperatorMinusWithQWebElementCollectioniterator(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* j); +void QWebElementCollection__iterator_Delete(QWebElementCollection__iterator* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webkit/gen_qwebframe.cpp b/qt/webkit/gen_qwebframe.cpp new file mode 100644 index 00000000..3686c3a7 --- /dev/null +++ b/qt/webkit/gen_qwebframe.cpp @@ -0,0 +1,623 @@ +#include +#include +#include +#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_qwebframe.h" +#include "_cgo_export.h" + +void QWebHitTestResult_new(QWebHitTestResult** outptr_QWebHitTestResult) { + QWebHitTestResult* ret = new QWebHitTestResult(); + *outptr_QWebHitTestResult = ret; +} + +void QWebHitTestResult_new2(QWebHitTestResult* other, QWebHitTestResult** outptr_QWebHitTestResult) { + QWebHitTestResult* ret = new QWebHitTestResult(*other); + *outptr_QWebHitTestResult = ret; +} + +void QWebHitTestResult_OperatorAssign(QWebHitTestResult* self, QWebHitTestResult* other) { + self->operator=(*other); +} + +bool QWebHitTestResult_IsNull(const QWebHitTestResult* self) { + return self->isNull(); +} + +QPoint* QWebHitTestResult_Pos(const QWebHitTestResult* self) { + return new QPoint(self->pos()); +} + +QRect* QWebHitTestResult_BoundingRect(const QWebHitTestResult* self) { + return new QRect(self->boundingRect()); +} + +QWebElement* QWebHitTestResult_EnclosingBlockElement(const QWebHitTestResult* self) { + return new QWebElement(self->enclosingBlockElement()); +} + +struct miqt_string QWebHitTestResult_Title(const QWebHitTestResult* self) { + QString _ret = self->title(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebHitTestResult_LinkText(const QWebHitTestResult* self) { + QString _ret = self->linkText(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QUrl* QWebHitTestResult_LinkUrl(const QWebHitTestResult* self) { + return new QUrl(self->linkUrl()); +} + +QUrl* QWebHitTestResult_LinkTitle(const QWebHitTestResult* self) { + return new QUrl(self->linkTitle()); +} + +struct miqt_string QWebHitTestResult_LinkTitleString(const QWebHitTestResult* self) { + QString _ret = self->linkTitleString(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QWebFrame* QWebHitTestResult_LinkTargetFrame(const QWebHitTestResult* self) { + return self->linkTargetFrame(); +} + +QWebElement* QWebHitTestResult_LinkElement(const QWebHitTestResult* self) { + return new QWebElement(self->linkElement()); +} + +struct miqt_string QWebHitTestResult_AlternateText(const QWebHitTestResult* self) { + QString _ret = self->alternateText(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QUrl* QWebHitTestResult_ImageUrl(const QWebHitTestResult* self) { + return new QUrl(self->imageUrl()); +} + +QPixmap* QWebHitTestResult_Pixmap(const QWebHitTestResult* self) { + return new QPixmap(self->pixmap()); +} + +QUrl* QWebHitTestResult_MediaUrl(const QWebHitTestResult* self) { + return new QUrl(self->mediaUrl()); +} + +bool QWebHitTestResult_IsContentEditable(const QWebHitTestResult* self) { + return self->isContentEditable(); +} + +bool QWebHitTestResult_IsContentSelected(const QWebHitTestResult* self) { + return self->isContentSelected(); +} + +QWebElement* QWebHitTestResult_Element(const QWebHitTestResult* self) { + return new QWebElement(self->element()); +} + +QWebFrame* QWebHitTestResult_Frame(const QWebHitTestResult* self) { + return self->frame(); +} + +void QWebHitTestResult_Delete(QWebHitTestResult* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +QMetaObject* QWebFrame_MetaObject(const QWebFrame* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebFrame_Metacast(QWebFrame* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebFrame_Tr(const char* s) { + QString _ret = QWebFrame::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebFrame_TrUtf8(const char* s) { + QString _ret = QWebFrame::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QWebPage* QWebFrame_Page(const QWebFrame* self) { + return self->page(); +} + +void QWebFrame_Load(QWebFrame* self, QUrl* url) { + self->load(*url); +} + +void QWebFrame_LoadWithRequest(QWebFrame* self, QNetworkRequest* request) { + self->load(*request); +} + +void QWebFrame_SetHtml(QWebFrame* self, struct miqt_string html) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->setHtml(html_QString); +} + +void QWebFrame_SetContent(QWebFrame* self, struct miqt_string data) { + QByteArray data_QByteArray(data.data, data.len); + self->setContent(data_QByteArray); +} + +void QWebFrame_AddToJavaScriptWindowObject(QWebFrame* self, struct miqt_string name, QObject* object) { + QString name_QString = QString::fromUtf8(name.data, name.len); + self->addToJavaScriptWindowObject(name_QString, object); +} + +struct miqt_string QWebFrame_ToHtml(const QWebFrame* self) { + QString _ret = self->toHtml(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebFrame_ToPlainText(const QWebFrame* self) { + QString _ret = self->toPlainText(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebFrame_Title(const QWebFrame* self) { + QString _ret = self->title(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebFrame_SetUrl(QWebFrame* self, QUrl* url) { + self->setUrl(*url); +} + +QUrl* QWebFrame_Url(const QWebFrame* self) { + return new QUrl(self->url()); +} + +QUrl* QWebFrame_RequestedUrl(const QWebFrame* self) { + return new QUrl(self->requestedUrl()); +} + +QUrl* QWebFrame_BaseUrl(const QWebFrame* self) { + return new QUrl(self->baseUrl()); +} + +QIcon* QWebFrame_Icon(const QWebFrame* self) { + return new QIcon(self->icon()); +} + +struct miqt_string QWebFrame_FrameName(const QWebFrame* self) { + QString _ret = self->frameName(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QWebFrame* QWebFrame_ParentFrame(const QWebFrame* self) { + return self->parentFrame(); +} + +struct miqt_array /* of QWebFrame* */ QWebFrame_ChildFrames(const QWebFrame* self) { + QList _ret = self->childFrames(); + // Convert QList<> from C++ memory to manually-managed C memory + QWebFrame** _arr = static_cast(malloc(sizeof(QWebFrame*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = _ret[i]; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +int QWebFrame_ScrollBarPolicy(const QWebFrame* self, int orientation) { + Qt::ScrollBarPolicy _ret = self->scrollBarPolicy(static_cast(orientation)); + return static_cast(_ret); +} + +void QWebFrame_SetScrollBarPolicy(QWebFrame* self, int orientation, int policy) { + self->setScrollBarPolicy(static_cast(orientation), static_cast(policy)); +} + +void QWebFrame_SetScrollBarValue(QWebFrame* self, int orientation, int value) { + self->setScrollBarValue(static_cast(orientation), static_cast(value)); +} + +int QWebFrame_ScrollBarValue(const QWebFrame* self, int orientation) { + return self->scrollBarValue(static_cast(orientation)); +} + +int QWebFrame_ScrollBarMinimum(const QWebFrame* self, int orientation) { + return self->scrollBarMinimum(static_cast(orientation)); +} + +int QWebFrame_ScrollBarMaximum(const QWebFrame* self, int orientation) { + return self->scrollBarMaximum(static_cast(orientation)); +} + +QRect* QWebFrame_ScrollBarGeometry(const QWebFrame* self, int orientation) { + return new QRect(self->scrollBarGeometry(static_cast(orientation))); +} + +void QWebFrame_Scroll(QWebFrame* self, int param1, int param2) { + self->scroll(static_cast(param1), static_cast(param2)); +} + +QPoint* QWebFrame_ScrollPosition(const QWebFrame* self) { + return new QPoint(self->scrollPosition()); +} + +void QWebFrame_SetScrollPosition(QWebFrame* self, QPoint* pos) { + self->setScrollPosition(*pos); +} + +void QWebFrame_ScrollToAnchor(QWebFrame* self, struct miqt_string anchor) { + QString anchor_QString = QString::fromUtf8(anchor.data, anchor.len); + self->scrollToAnchor(anchor_QString); +} + +void QWebFrame_Render(QWebFrame* self, QPainter* param1) { + self->render(param1); +} + +void QWebFrame_Render2(QWebFrame* self, QPainter* param1, int layer) { + self->render(param1, static_cast(layer)); +} + +void QWebFrame_SetTextSizeMultiplier(QWebFrame* self, double factor) { + self->setTextSizeMultiplier(static_cast(factor)); +} + +double QWebFrame_TextSizeMultiplier(const QWebFrame* self) { + qreal _ret = self->textSizeMultiplier(); + return static_cast(_ret); +} + +double QWebFrame_ZoomFactor(const QWebFrame* self) { + qreal _ret = self->zoomFactor(); + return static_cast(_ret); +} + +void QWebFrame_SetZoomFactor(QWebFrame* self, double factor) { + self->setZoomFactor(static_cast(factor)); +} + +bool QWebFrame_HasFocus(const QWebFrame* self) { + return self->hasFocus(); +} + +void QWebFrame_SetFocus(QWebFrame* self) { + self->setFocus(); +} + +QPoint* QWebFrame_Pos(const QWebFrame* self) { + return new QPoint(self->pos()); +} + +QRect* QWebFrame_Geometry(const QWebFrame* self) { + return new QRect(self->geometry()); +} + +QSize* QWebFrame_ContentsSize(const QWebFrame* self) { + return new QSize(self->contentsSize()); +} + +QWebElement* QWebFrame_DocumentElement(const QWebFrame* self) { + return new QWebElement(self->documentElement()); +} + +QWebElement* QWebFrame_OwnerElement(const QWebFrame* self) { + return new QWebElement(self->ownerElement()); +} + +QWebElementCollection* QWebFrame_FindAllElements(const QWebFrame* self, struct miqt_string selectorQuery) { + QString selectorQuery_QString = QString::fromUtf8(selectorQuery.data, selectorQuery.len); + return new QWebElementCollection(self->findAllElements(selectorQuery_QString)); +} + +QWebElement* QWebFrame_FindFirstElement(const QWebFrame* self, struct miqt_string selectorQuery) { + QString selectorQuery_QString = QString::fromUtf8(selectorQuery.data, selectorQuery.len); + return new QWebElement(self->findFirstElement(selectorQuery_QString)); +} + +QWebHitTestResult* QWebFrame_HitTestContent(const QWebFrame* self, QPoint* pos) { + return new QWebHitTestResult(self->hitTestContent(*pos)); +} + +bool QWebFrame_Event(QWebFrame* self, QEvent* param1) { + return self->event(param1); +} + +QWebSecurityOrigin* QWebFrame_SecurityOrigin(const QWebFrame* self) { + return new QWebSecurityOrigin(self->securityOrigin()); +} + +QVariant* QWebFrame_EvaluateJavaScript(QWebFrame* self, struct miqt_string scriptSource) { + QString scriptSource_QString = QString::fromUtf8(scriptSource.data, scriptSource.len); + return new QVariant(self->evaluateJavaScript(scriptSource_QString)); +} + +void QWebFrame_Print(const QWebFrame* self, QPrinter* printer) { + self->print(printer); +} + +void QWebFrame_JavaScriptWindowObjectCleared(QWebFrame* self) { + self->javaScriptWindowObjectCleared(); +} + +void QWebFrame_connect_JavaScriptWindowObjectCleared(QWebFrame* self, intptr_t slot) { + QWebFrame::connect(self, static_cast(&QWebFrame::javaScriptWindowObjectCleared), self, [=]() { + miqt_exec_callback_QWebFrame_JavaScriptWindowObjectCleared(slot); + }); +} + +void QWebFrame_ProvisionalLoad(QWebFrame* self) { + self->provisionalLoad(); +} + +void QWebFrame_connect_ProvisionalLoad(QWebFrame* self, intptr_t slot) { + QWebFrame::connect(self, static_cast(&QWebFrame::provisionalLoad), self, [=]() { + miqt_exec_callback_QWebFrame_ProvisionalLoad(slot); + }); +} + +void QWebFrame_TitleChanged(QWebFrame* self, struct miqt_string title) { + QString title_QString = QString::fromUtf8(title.data, title.len); + self->titleChanged(title_QString); +} + +void QWebFrame_connect_TitleChanged(QWebFrame* self, intptr_t slot) { + QWebFrame::connect(self, static_cast(&QWebFrame::titleChanged), self, [=](const QString& title) { + const QString title_ret = title; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray title_b = title_ret.toUtf8(); + struct miqt_string title_ms; + title_ms.len = title_b.length(); + title_ms.data = static_cast(malloc(title_ms.len)); + memcpy(title_ms.data, title_b.data(), title_ms.len); + struct miqt_string sigval1 = title_ms; + miqt_exec_callback_QWebFrame_TitleChanged(slot, sigval1); + }); +} + +void QWebFrame_UrlChanged(QWebFrame* self, QUrl* url) { + self->urlChanged(*url); +} + +void QWebFrame_connect_UrlChanged(QWebFrame* self, intptr_t slot) { + QWebFrame::connect(self, static_cast(&QWebFrame::urlChanged), self, [=](const QUrl& url) { + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + miqt_exec_callback_QWebFrame_UrlChanged(slot, sigval1); + }); +} + +void QWebFrame_InitialLayoutCompleted(QWebFrame* self) { + self->initialLayoutCompleted(); +} + +void QWebFrame_connect_InitialLayoutCompleted(QWebFrame* self, intptr_t slot) { + QWebFrame::connect(self, static_cast(&QWebFrame::initialLayoutCompleted), self, [=]() { + miqt_exec_callback_QWebFrame_InitialLayoutCompleted(slot); + }); +} + +void QWebFrame_IconChanged(QWebFrame* self) { + self->iconChanged(); +} + +void QWebFrame_connect_IconChanged(QWebFrame* self, intptr_t slot) { + QWebFrame::connect(self, static_cast(&QWebFrame::iconChanged), self, [=]() { + miqt_exec_callback_QWebFrame_IconChanged(slot); + }); +} + +void QWebFrame_ContentsSizeChanged(QWebFrame* self, QSize* size) { + self->contentsSizeChanged(*size); +} + +void QWebFrame_connect_ContentsSizeChanged(QWebFrame* self, intptr_t slot) { + QWebFrame::connect(self, static_cast(&QWebFrame::contentsSizeChanged), self, [=](const QSize& size) { + const QSize& size_ret = size; + // Cast returned reference into pointer + QSize* sigval1 = const_cast(&size_ret); + miqt_exec_callback_QWebFrame_ContentsSizeChanged(slot, sigval1); + }); +} + +void QWebFrame_LoadStarted(QWebFrame* self) { + self->loadStarted(); +} + +void QWebFrame_connect_LoadStarted(QWebFrame* self, intptr_t slot) { + QWebFrame::connect(self, static_cast(&QWebFrame::loadStarted), self, [=]() { + miqt_exec_callback_QWebFrame_LoadStarted(slot); + }); +} + +void QWebFrame_LoadFinished(QWebFrame* self, bool ok) { + self->loadFinished(ok); +} + +void QWebFrame_connect_LoadFinished(QWebFrame* self, intptr_t slot) { + QWebFrame::connect(self, static_cast(&QWebFrame::loadFinished), self, [=](bool ok) { + bool sigval1 = ok; + miqt_exec_callback_QWebFrame_LoadFinished(slot, sigval1); + }); +} + +void QWebFrame_PageChanged(QWebFrame* self) { + self->pageChanged(); +} + +void QWebFrame_connect_PageChanged(QWebFrame* self, intptr_t slot) { + QWebFrame::connect(self, static_cast(&QWebFrame::pageChanged), self, [=]() { + miqt_exec_callback_QWebFrame_PageChanged(slot); + }); +} + +struct miqt_string QWebFrame_Tr2(const char* s, const char* c) { + QString _ret = QWebFrame::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebFrame_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebFrame::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebFrame_TrUtf82(const char* s, const char* c) { + QString _ret = QWebFrame::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebFrame_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebFrame::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebFrame_Load2(QWebFrame* self, QNetworkRequest* request, int operation) { + self->load(*request, static_cast(operation)); +} + +void QWebFrame_Load3(QWebFrame* self, QNetworkRequest* request, int operation, struct miqt_string body) { + QByteArray body_QByteArray(body.data, body.len); + self->load(*request, static_cast(operation), body_QByteArray); +} + +void QWebFrame_SetHtml2(QWebFrame* self, struct miqt_string html, QUrl* baseUrl) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->setHtml(html_QString, *baseUrl); +} + +void QWebFrame_SetContent2(QWebFrame* self, struct miqt_string data, struct miqt_string mimeType) { + QByteArray data_QByteArray(data.data, data.len); + QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); + self->setContent(data_QByteArray, mimeType_QString); +} + +void QWebFrame_SetContent3(QWebFrame* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl) { + QByteArray data_QByteArray(data.data, data.len); + QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); + self->setContent(data_QByteArray, mimeType_QString, *baseUrl); +} + +void QWebFrame_AddToJavaScriptWindowObject3(QWebFrame* self, struct miqt_string name, QObject* object, int ownership) { + QString name_QString = QString::fromUtf8(name.data, name.len); + self->addToJavaScriptWindowObject(name_QString, object, static_cast(ownership)); +} + +void QWebFrame_Render22(QWebFrame* self, QPainter* param1, QRegion* clip) { + self->render(param1, *clip); +} + +void QWebFrame_Render3(QWebFrame* self, QPainter* param1, int layer, QRegion* clip) { + self->render(param1, static_cast(layer), *clip); +} + diff --git a/qt/webkit/gen_qwebframe.go b/qt/webkit/gen_qwebframe.go new file mode 100644 index 00000000..cb3317e6 --- /dev/null +++ b/qt/webkit/gen_qwebframe.go @@ -0,0 +1,869 @@ +package webkit + +/* + +#include "gen_qwebframe.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "github.com/mappu/miqt/qt/network" + "github.com/mappu/miqt/qt/printsupport" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebFrame__ValueOwnership int + +const ( + QWebFrame__QtOwnership QWebFrame__ValueOwnership = 0 + QWebFrame__ScriptOwnership QWebFrame__ValueOwnership = 1 + QWebFrame__AutoOwnership QWebFrame__ValueOwnership = 2 +) + +type QWebFrame__RenderLayer int + +const ( + QWebFrame__ContentsLayer QWebFrame__RenderLayer = 16 + QWebFrame__ScrollBarLayer QWebFrame__RenderLayer = 32 + QWebFrame__PanIconLayer QWebFrame__RenderLayer = 64 + QWebFrame__AllLayers QWebFrame__RenderLayer = 255 +) + +type QWebHitTestResult struct { + h *C.QWebHitTestResult + isSubclass bool +} + +func (this *QWebHitTestResult) cPointer() *C.QWebHitTestResult { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebHitTestResult) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebHitTestResult constructs the type using only CGO pointers. +func newQWebHitTestResult(h *C.QWebHitTestResult) *QWebHitTestResult { + if h == nil { + return nil + } + return &QWebHitTestResult{h: h} +} + +// UnsafeNewQWebHitTestResult constructs the type using only unsafe pointers. +func UnsafeNewQWebHitTestResult(h unsafe.Pointer) *QWebHitTestResult { + if h == nil { + return nil + } + + return &QWebHitTestResult{h: (*C.QWebHitTestResult)(h)} +} + +// NewQWebHitTestResult constructs a new QWebHitTestResult object. +func NewQWebHitTestResult() *QWebHitTestResult { + var outptr_QWebHitTestResult *C.QWebHitTestResult = nil + + C.QWebHitTestResult_new(&outptr_QWebHitTestResult) + ret := newQWebHitTestResult(outptr_QWebHitTestResult) + ret.isSubclass = true + return ret +} + +// NewQWebHitTestResult2 constructs a new QWebHitTestResult object. +func NewQWebHitTestResult2(other *QWebHitTestResult) *QWebHitTestResult { + var outptr_QWebHitTestResult *C.QWebHitTestResult = nil + + C.QWebHitTestResult_new2(other.cPointer(), &outptr_QWebHitTestResult) + ret := newQWebHitTestResult(outptr_QWebHitTestResult) + ret.isSubclass = true + return ret +} + +func (this *QWebHitTestResult) OperatorAssign(other *QWebHitTestResult) { + C.QWebHitTestResult_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QWebHitTestResult) IsNull() bool { + return (bool)(C.QWebHitTestResult_IsNull(this.h)) +} + +func (this *QWebHitTestResult) Pos() *qt.QPoint { + _ret := C.QWebHitTestResult_Pos(this.h) + _goptr := qt.UnsafeNewQPoint(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHitTestResult) BoundingRect() *qt.QRect { + _ret := C.QWebHitTestResult_BoundingRect(this.h) + _goptr := qt.UnsafeNewQRect(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHitTestResult) EnclosingBlockElement() *QWebElement { + _ret := C.QWebHitTestResult_EnclosingBlockElement(this.h) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHitTestResult) Title() string { + var _ms C.struct_miqt_string = C.QWebHitTestResult_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebHitTestResult) LinkText() string { + var _ms C.struct_miqt_string = C.QWebHitTestResult_LinkText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebHitTestResult) LinkUrl() *qt.QUrl { + _ret := C.QWebHitTestResult_LinkUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHitTestResult) LinkTitle() *qt.QUrl { + _ret := C.QWebHitTestResult_LinkTitle(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHitTestResult) LinkTitleString() string { + var _ms C.struct_miqt_string = C.QWebHitTestResult_LinkTitleString(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebHitTestResult) LinkTargetFrame() *QWebFrame { + return UnsafeNewQWebFrame(unsafe.Pointer(C.QWebHitTestResult_LinkTargetFrame(this.h)), nil) +} + +func (this *QWebHitTestResult) LinkElement() *QWebElement { + _ret := C.QWebHitTestResult_LinkElement(this.h) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHitTestResult) AlternateText() string { + var _ms C.struct_miqt_string = C.QWebHitTestResult_AlternateText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebHitTestResult) ImageUrl() *qt.QUrl { + _ret := C.QWebHitTestResult_ImageUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHitTestResult) Pixmap() *qt.QPixmap { + _ret := C.QWebHitTestResult_Pixmap(this.h) + _goptr := qt.UnsafeNewQPixmap(unsafe.Pointer(_ret), nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHitTestResult) MediaUrl() *qt.QUrl { + _ret := C.QWebHitTestResult_MediaUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHitTestResult) IsContentEditable() bool { + return (bool)(C.QWebHitTestResult_IsContentEditable(this.h)) +} + +func (this *QWebHitTestResult) IsContentSelected() bool { + return (bool)(C.QWebHitTestResult_IsContentSelected(this.h)) +} + +func (this *QWebHitTestResult) Element() *QWebElement { + _ret := C.QWebHitTestResult_Element(this.h) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHitTestResult) Frame() *QWebFrame { + return UnsafeNewQWebFrame(unsafe.Pointer(C.QWebHitTestResult_Frame(this.h)), nil) +} + +// Delete this object from C++ memory. +func (this *QWebHitTestResult) Delete() { + C.QWebHitTestResult_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 *QWebHitTestResult) GoGC() { + runtime.SetFinalizer(this, func(this *QWebHitTestResult) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebFrame struct { + h *C.QWebFrame + isSubclass bool + *qt.QObject +} + +func (this *QWebFrame) cPointer() *C.QWebFrame { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebFrame) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebFrame constructs the type using only CGO pointers. +func newQWebFrame(h *C.QWebFrame, h_QObject *C.QObject) *QWebFrame { + if h == nil { + return nil + } + return &QWebFrame{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebFrame constructs the type using only unsafe pointers. +func UnsafeNewQWebFrame(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebFrame { + if h == nil { + return nil + } + + return &QWebFrame{h: (*C.QWebFrame)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebFrame) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebFrame_MetaObject(this.h))) +} + +func (this *QWebFrame) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebFrame_Metacast(this.h, param1_Cstring)) +} + +func QWebFrame_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebFrame_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebFrame_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebFrame_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebFrame) Page() *QWebPage { + return UnsafeNewQWebPage(unsafe.Pointer(C.QWebFrame_Page(this.h)), nil) +} + +func (this *QWebFrame) Load(url *qt.QUrl) { + C.QWebFrame_Load(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebFrame) LoadWithRequest(request *network.QNetworkRequest) { + C.QWebFrame_LoadWithRequest(this.h, (*C.QNetworkRequest)(request.UnsafePointer())) +} + +func (this *QWebFrame) SetHtml(html string) { + html_ms := C.struct_miqt_string{} + html_ms.data = C.CString(html) + html_ms.len = C.size_t(len(html)) + defer C.free(unsafe.Pointer(html_ms.data)) + C.QWebFrame_SetHtml(this.h, html_ms) +} + +func (this *QWebFrame) SetContent(data []byte) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + C.QWebFrame_SetContent(this.h, data_alias) +} + +func (this *QWebFrame) AddToJavaScriptWindowObject(name string, object *qt.QObject) { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + C.QWebFrame_AddToJavaScriptWindowObject(this.h, name_ms, (*C.QObject)(object.UnsafePointer())) +} + +func (this *QWebFrame) ToHtml() string { + var _ms C.struct_miqt_string = C.QWebFrame_ToHtml(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebFrame) ToPlainText() string { + var _ms C.struct_miqt_string = C.QWebFrame_ToPlainText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebFrame) Title() string { + var _ms C.struct_miqt_string = C.QWebFrame_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebFrame) SetUrl(url *qt.QUrl) { + C.QWebFrame_SetUrl(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebFrame) Url() *qt.QUrl { + _ret := C.QWebFrame_Url(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFrame) RequestedUrl() *qt.QUrl { + _ret := C.QWebFrame_RequestedUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFrame) BaseUrl() *qt.QUrl { + _ret := C.QWebFrame_BaseUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFrame) Icon() *qt.QIcon { + _ret := C.QWebFrame_Icon(this.h) + _goptr := qt.UnsafeNewQIcon(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFrame) FrameName() string { + var _ms C.struct_miqt_string = C.QWebFrame_FrameName(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebFrame) ParentFrame() *QWebFrame { + return UnsafeNewQWebFrame(unsafe.Pointer(C.QWebFrame_ParentFrame(this.h)), nil) +} + +func (this *QWebFrame) ChildFrames() []*QWebFrame { + var _ma C.struct_miqt_array = C.QWebFrame_ChildFrames(this.h) + _ret := make([]*QWebFrame, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebFrame)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _ret[i] = UnsafeNewQWebFrame(unsafe.Pointer(_outCast[i]), nil) + } + return _ret +} + +func (this *QWebFrame) ScrollBarPolicy(orientation qt.Orientation) qt.ScrollBarPolicy { + return (qt.ScrollBarPolicy)(C.QWebFrame_ScrollBarPolicy(this.h, (C.int)(orientation))) +} + +func (this *QWebFrame) SetScrollBarPolicy(orientation qt.Orientation, policy qt.ScrollBarPolicy) { + C.QWebFrame_SetScrollBarPolicy(this.h, (C.int)(orientation), (C.int)(policy)) +} + +func (this *QWebFrame) SetScrollBarValue(orientation qt.Orientation, value int) { + C.QWebFrame_SetScrollBarValue(this.h, (C.int)(orientation), (C.int)(value)) +} + +func (this *QWebFrame) ScrollBarValue(orientation qt.Orientation) int { + return (int)(C.QWebFrame_ScrollBarValue(this.h, (C.int)(orientation))) +} + +func (this *QWebFrame) ScrollBarMinimum(orientation qt.Orientation) int { + return (int)(C.QWebFrame_ScrollBarMinimum(this.h, (C.int)(orientation))) +} + +func (this *QWebFrame) ScrollBarMaximum(orientation qt.Orientation) int { + return (int)(C.QWebFrame_ScrollBarMaximum(this.h, (C.int)(orientation))) +} + +func (this *QWebFrame) ScrollBarGeometry(orientation qt.Orientation) *qt.QRect { + _ret := C.QWebFrame_ScrollBarGeometry(this.h, (C.int)(orientation)) + _goptr := qt.UnsafeNewQRect(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFrame) Scroll(param1 int, param2 int) { + C.QWebFrame_Scroll(this.h, (C.int)(param1), (C.int)(param2)) +} + +func (this *QWebFrame) ScrollPosition() *qt.QPoint { + _ret := C.QWebFrame_ScrollPosition(this.h) + _goptr := qt.UnsafeNewQPoint(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFrame) SetScrollPosition(pos *qt.QPoint) { + C.QWebFrame_SetScrollPosition(this.h, (*C.QPoint)(pos.UnsafePointer())) +} + +func (this *QWebFrame) ScrollToAnchor(anchor string) { + anchor_ms := C.struct_miqt_string{} + anchor_ms.data = C.CString(anchor) + anchor_ms.len = C.size_t(len(anchor)) + defer C.free(unsafe.Pointer(anchor_ms.data)) + C.QWebFrame_ScrollToAnchor(this.h, anchor_ms) +} + +func (this *QWebFrame) Render(param1 *qt.QPainter) { + C.QWebFrame_Render(this.h, (*C.QPainter)(param1.UnsafePointer())) +} + +func (this *QWebFrame) Render2(param1 *qt.QPainter, layer QWebFrame__RenderLayer) { + C.QWebFrame_Render2(this.h, (*C.QPainter)(param1.UnsafePointer()), (C.int)(layer)) +} + +func (this *QWebFrame) SetTextSizeMultiplier(factor float64) { + C.QWebFrame_SetTextSizeMultiplier(this.h, (C.double)(factor)) +} + +func (this *QWebFrame) TextSizeMultiplier() float64 { + return (float64)(C.QWebFrame_TextSizeMultiplier(this.h)) +} + +func (this *QWebFrame) ZoomFactor() float64 { + return (float64)(C.QWebFrame_ZoomFactor(this.h)) +} + +func (this *QWebFrame) SetZoomFactor(factor float64) { + C.QWebFrame_SetZoomFactor(this.h, (C.double)(factor)) +} + +func (this *QWebFrame) HasFocus() bool { + return (bool)(C.QWebFrame_HasFocus(this.h)) +} + +func (this *QWebFrame) SetFocus() { + C.QWebFrame_SetFocus(this.h) +} + +func (this *QWebFrame) Pos() *qt.QPoint { + _ret := C.QWebFrame_Pos(this.h) + _goptr := qt.UnsafeNewQPoint(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFrame) Geometry() *qt.QRect { + _ret := C.QWebFrame_Geometry(this.h) + _goptr := qt.UnsafeNewQRect(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFrame) ContentsSize() *qt.QSize { + _ret := C.QWebFrame_ContentsSize(this.h) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFrame) DocumentElement() *QWebElement { + _ret := C.QWebFrame_DocumentElement(this.h) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFrame) OwnerElement() *QWebElement { + _ret := C.QWebFrame_OwnerElement(this.h) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFrame) FindAllElements(selectorQuery string) *QWebElementCollection { + selectorQuery_ms := C.struct_miqt_string{} + selectorQuery_ms.data = C.CString(selectorQuery) + selectorQuery_ms.len = C.size_t(len(selectorQuery)) + defer C.free(unsafe.Pointer(selectorQuery_ms.data)) + _ret := C.QWebFrame_FindAllElements(this.h, selectorQuery_ms) + _goptr := newQWebElementCollection(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFrame) FindFirstElement(selectorQuery string) *QWebElement { + selectorQuery_ms := C.struct_miqt_string{} + selectorQuery_ms.data = C.CString(selectorQuery) + selectorQuery_ms.len = C.size_t(len(selectorQuery)) + defer C.free(unsafe.Pointer(selectorQuery_ms.data)) + _ret := C.QWebFrame_FindFirstElement(this.h, selectorQuery_ms) + _goptr := newQWebElement(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFrame) HitTestContent(pos *qt.QPoint) *QWebHitTestResult { + _ret := C.QWebFrame_HitTestContent(this.h, (*C.QPoint)(pos.UnsafePointer())) + _goptr := newQWebHitTestResult(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFrame) Event(param1 *qt.QEvent) bool { + return (bool)(C.QWebFrame_Event(this.h, (*C.QEvent)(param1.UnsafePointer()))) +} + +func (this *QWebFrame) SecurityOrigin() *QWebSecurityOrigin { + _ret := C.QWebFrame_SecurityOrigin(this.h) + _goptr := newQWebSecurityOrigin(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFrame) EvaluateJavaScript(scriptSource string) *qt.QVariant { + scriptSource_ms := C.struct_miqt_string{} + scriptSource_ms.data = C.CString(scriptSource) + scriptSource_ms.len = C.size_t(len(scriptSource)) + defer C.free(unsafe.Pointer(scriptSource_ms.data)) + _ret := C.QWebFrame_EvaluateJavaScript(this.h, scriptSource_ms) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFrame) Print(printer *printsupport.QPrinter) { + C.QWebFrame_Print(this.h, (*C.QPrinter)(printer.UnsafePointer())) +} + +func (this *QWebFrame) JavaScriptWindowObjectCleared() { + C.QWebFrame_JavaScriptWindowObjectCleared(this.h) +} +func (this *QWebFrame) OnJavaScriptWindowObjectCleared(slot func()) { + C.QWebFrame_connect_JavaScriptWindowObjectCleared(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebFrame_JavaScriptWindowObjectCleared +func miqt_exec_callback_QWebFrame_JavaScriptWindowObjectCleared(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 *QWebFrame) ProvisionalLoad() { + C.QWebFrame_ProvisionalLoad(this.h) +} +func (this *QWebFrame) OnProvisionalLoad(slot func()) { + C.QWebFrame_connect_ProvisionalLoad(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebFrame_ProvisionalLoad +func miqt_exec_callback_QWebFrame_ProvisionalLoad(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 *QWebFrame) TitleChanged(title string) { + title_ms := C.struct_miqt_string{} + title_ms.data = C.CString(title) + title_ms.len = C.size_t(len(title)) + defer C.free(unsafe.Pointer(title_ms.data)) + C.QWebFrame_TitleChanged(this.h, title_ms) +} +func (this *QWebFrame) OnTitleChanged(slot func(title string)) { + C.QWebFrame_connect_TitleChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebFrame_TitleChanged +func miqt_exec_callback_QWebFrame_TitleChanged(cb C.intptr_t, title C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(title string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var title_ms C.struct_miqt_string = title + title_ret := C.GoStringN(title_ms.data, C.int(int64(title_ms.len))) + C.free(unsafe.Pointer(title_ms.data)) + slotval1 := title_ret + + gofunc(slotval1) +} + +func (this *QWebFrame) UrlChanged(url *qt.QUrl) { + C.QWebFrame_UrlChanged(this.h, (*C.QUrl)(url.UnsafePointer())) +} +func (this *QWebFrame) OnUrlChanged(slot func(url *qt.QUrl)) { + C.QWebFrame_connect_UrlChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebFrame_UrlChanged +func miqt_exec_callback_QWebFrame_UrlChanged(cb C.intptr_t, url *C.QUrl) { + gofunc, ok := cgo.Handle(cb).Value().(func(url *qt.QUrl)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(url)) + + gofunc(slotval1) +} + +func (this *QWebFrame) InitialLayoutCompleted() { + C.QWebFrame_InitialLayoutCompleted(this.h) +} +func (this *QWebFrame) OnInitialLayoutCompleted(slot func()) { + C.QWebFrame_connect_InitialLayoutCompleted(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebFrame_InitialLayoutCompleted +func miqt_exec_callback_QWebFrame_InitialLayoutCompleted(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 *QWebFrame) IconChanged() { + C.QWebFrame_IconChanged(this.h) +} +func (this *QWebFrame) OnIconChanged(slot func()) { + C.QWebFrame_connect_IconChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebFrame_IconChanged +func miqt_exec_callback_QWebFrame_IconChanged(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 *QWebFrame) ContentsSizeChanged(size *qt.QSize) { + C.QWebFrame_ContentsSizeChanged(this.h, (*C.QSize)(size.UnsafePointer())) +} +func (this *QWebFrame) OnContentsSizeChanged(slot func(size *qt.QSize)) { + C.QWebFrame_connect_ContentsSizeChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebFrame_ContentsSizeChanged +func miqt_exec_callback_QWebFrame_ContentsSizeChanged(cb C.intptr_t, size *C.QSize) { + gofunc, ok := cgo.Handle(cb).Value().(func(size *qt.QSize)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQSize(unsafe.Pointer(size)) + + gofunc(slotval1) +} + +func (this *QWebFrame) LoadStarted() { + C.QWebFrame_LoadStarted(this.h) +} +func (this *QWebFrame) OnLoadStarted(slot func()) { + C.QWebFrame_connect_LoadStarted(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebFrame_LoadStarted +func miqt_exec_callback_QWebFrame_LoadStarted(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 *QWebFrame) LoadFinished(ok bool) { + C.QWebFrame_LoadFinished(this.h, (C.bool)(ok)) +} +func (this *QWebFrame) OnLoadFinished(slot func(ok bool)) { + C.QWebFrame_connect_LoadFinished(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebFrame_LoadFinished +func miqt_exec_callback_QWebFrame_LoadFinished(cb C.intptr_t, ok C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(ok bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(ok) + + gofunc(slotval1) +} + +func (this *QWebFrame) PageChanged() { + C.QWebFrame_PageChanged(this.h) +} +func (this *QWebFrame) OnPageChanged(slot func()) { + C.QWebFrame_connect_PageChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebFrame_PageChanged +func miqt_exec_callback_QWebFrame_PageChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func QWebFrame_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebFrame_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebFrame_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebFrame_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebFrame_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebFrame_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebFrame_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebFrame_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebFrame) Load2(request *network.QNetworkRequest, operation network.QNetworkAccessManager__Operation) { + C.QWebFrame_Load2(this.h, (*C.QNetworkRequest)(request.UnsafePointer()), (C.int)(operation)) +} + +func (this *QWebFrame) Load3(request *network.QNetworkRequest, operation network.QNetworkAccessManager__Operation, body []byte) { + body_alias := C.struct_miqt_string{} + body_alias.data = (*C.char)(unsafe.Pointer(&body[0])) + body_alias.len = C.size_t(len(body)) + C.QWebFrame_Load3(this.h, (*C.QNetworkRequest)(request.UnsafePointer()), (C.int)(operation), body_alias) +} + +func (this *QWebFrame) SetHtml2(html string, baseUrl *qt.QUrl) { + html_ms := C.struct_miqt_string{} + html_ms.data = C.CString(html) + html_ms.len = C.size_t(len(html)) + defer C.free(unsafe.Pointer(html_ms.data)) + C.QWebFrame_SetHtml2(this.h, html_ms, (*C.QUrl)(baseUrl.UnsafePointer())) +} + +func (this *QWebFrame) SetContent2(data []byte, mimeType string) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + mimeType_ms := C.struct_miqt_string{} + mimeType_ms.data = C.CString(mimeType) + mimeType_ms.len = C.size_t(len(mimeType)) + defer C.free(unsafe.Pointer(mimeType_ms.data)) + C.QWebFrame_SetContent2(this.h, data_alias, mimeType_ms) +} + +func (this *QWebFrame) SetContent3(data []byte, mimeType string, baseUrl *qt.QUrl) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + mimeType_ms := C.struct_miqt_string{} + mimeType_ms.data = C.CString(mimeType) + mimeType_ms.len = C.size_t(len(mimeType)) + defer C.free(unsafe.Pointer(mimeType_ms.data)) + C.QWebFrame_SetContent3(this.h, data_alias, mimeType_ms, (*C.QUrl)(baseUrl.UnsafePointer())) +} + +func (this *QWebFrame) AddToJavaScriptWindowObject3(name string, object *qt.QObject, ownership QWebFrame__ValueOwnership) { + name_ms := C.struct_miqt_string{} + name_ms.data = C.CString(name) + name_ms.len = C.size_t(len(name)) + defer C.free(unsafe.Pointer(name_ms.data)) + C.QWebFrame_AddToJavaScriptWindowObject3(this.h, name_ms, (*C.QObject)(object.UnsafePointer()), (C.int)(ownership)) +} + +func (this *QWebFrame) Render22(param1 *qt.QPainter, clip *qt.QRegion) { + C.QWebFrame_Render22(this.h, (*C.QPainter)(param1.UnsafePointer()), (*C.QRegion)(clip.UnsafePointer())) +} + +func (this *QWebFrame) Render3(param1 *qt.QPainter, layer QWebFrame__RenderLayer, clip *qt.QRegion) { + C.QWebFrame_Render3(this.h, (*C.QPainter)(param1.UnsafePointer()), (C.int)(layer), (*C.QRegion)(clip.UnsafePointer())) +} diff --git a/qt/webkit/gen_qwebframe.h b/qt/webkit/gen_qwebframe.h new file mode 100644 index 00000000..45330185 --- /dev/null +++ b/qt/webkit/gen_qwebframe.h @@ -0,0 +1,174 @@ +#pragma once +#ifndef MIQT_QT_WEBKIT_GEN_QWEBFRAME_H +#define MIQT_QT_WEBKIT_GEN_QWEBFRAME_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QEvent; +class QIcon; +class QMetaObject; +class QNetworkRequest; +class QObject; +class QPainter; +class QPixmap; +class QPoint; +class QPrinter; +class QRect; +class QRegion; +class QSize; +class QUrl; +class QVariant; +class QWebElement; +class QWebElementCollection; +class QWebFrame; +class QWebHitTestResult; +class QWebPage; +class QWebSecurityOrigin; +#else +typedef struct QEvent QEvent; +typedef struct QIcon QIcon; +typedef struct QMetaObject QMetaObject; +typedef struct QNetworkRequest QNetworkRequest; +typedef struct QObject QObject; +typedef struct QPainter QPainter; +typedef struct QPixmap QPixmap; +typedef struct QPoint QPoint; +typedef struct QPrinter QPrinter; +typedef struct QRect QRect; +typedef struct QRegion QRegion; +typedef struct QSize QSize; +typedef struct QUrl QUrl; +typedef struct QVariant QVariant; +typedef struct QWebElement QWebElement; +typedef struct QWebElementCollection QWebElementCollection; +typedef struct QWebFrame QWebFrame; +typedef struct QWebHitTestResult QWebHitTestResult; +typedef struct QWebPage QWebPage; +typedef struct QWebSecurityOrigin QWebSecurityOrigin; +#endif + +void QWebHitTestResult_new(QWebHitTestResult** outptr_QWebHitTestResult); +void QWebHitTestResult_new2(QWebHitTestResult* other, QWebHitTestResult** outptr_QWebHitTestResult); +void QWebHitTestResult_OperatorAssign(QWebHitTestResult* self, QWebHitTestResult* other); +bool QWebHitTestResult_IsNull(const QWebHitTestResult* self); +QPoint* QWebHitTestResult_Pos(const QWebHitTestResult* self); +QRect* QWebHitTestResult_BoundingRect(const QWebHitTestResult* self); +QWebElement* QWebHitTestResult_EnclosingBlockElement(const QWebHitTestResult* self); +struct miqt_string QWebHitTestResult_Title(const QWebHitTestResult* self); +struct miqt_string QWebHitTestResult_LinkText(const QWebHitTestResult* self); +QUrl* QWebHitTestResult_LinkUrl(const QWebHitTestResult* self); +QUrl* QWebHitTestResult_LinkTitle(const QWebHitTestResult* self); +struct miqt_string QWebHitTestResult_LinkTitleString(const QWebHitTestResult* self); +QWebFrame* QWebHitTestResult_LinkTargetFrame(const QWebHitTestResult* self); +QWebElement* QWebHitTestResult_LinkElement(const QWebHitTestResult* self); +struct miqt_string QWebHitTestResult_AlternateText(const QWebHitTestResult* self); +QUrl* QWebHitTestResult_ImageUrl(const QWebHitTestResult* self); +QPixmap* QWebHitTestResult_Pixmap(const QWebHitTestResult* self); +QUrl* QWebHitTestResult_MediaUrl(const QWebHitTestResult* self); +bool QWebHitTestResult_IsContentEditable(const QWebHitTestResult* self); +bool QWebHitTestResult_IsContentSelected(const QWebHitTestResult* self); +QWebElement* QWebHitTestResult_Element(const QWebHitTestResult* self); +QWebFrame* QWebHitTestResult_Frame(const QWebHitTestResult* self); +void QWebHitTestResult_Delete(QWebHitTestResult* self, bool isSubclass); + +QMetaObject* QWebFrame_MetaObject(const QWebFrame* self); +void* QWebFrame_Metacast(QWebFrame* self, const char* param1); +struct miqt_string QWebFrame_Tr(const char* s); +struct miqt_string QWebFrame_TrUtf8(const char* s); +QWebPage* QWebFrame_Page(const QWebFrame* self); +void QWebFrame_Load(QWebFrame* self, QUrl* url); +void QWebFrame_LoadWithRequest(QWebFrame* self, QNetworkRequest* request); +void QWebFrame_SetHtml(QWebFrame* self, struct miqt_string html); +void QWebFrame_SetContent(QWebFrame* self, struct miqt_string data); +void QWebFrame_AddToJavaScriptWindowObject(QWebFrame* self, struct miqt_string name, QObject* object); +struct miqt_string QWebFrame_ToHtml(const QWebFrame* self); +struct miqt_string QWebFrame_ToPlainText(const QWebFrame* self); +struct miqt_string QWebFrame_Title(const QWebFrame* self); +void QWebFrame_SetUrl(QWebFrame* self, QUrl* url); +QUrl* QWebFrame_Url(const QWebFrame* self); +QUrl* QWebFrame_RequestedUrl(const QWebFrame* self); +QUrl* QWebFrame_BaseUrl(const QWebFrame* self); +QIcon* QWebFrame_Icon(const QWebFrame* self); +struct miqt_string QWebFrame_FrameName(const QWebFrame* self); +QWebFrame* QWebFrame_ParentFrame(const QWebFrame* self); +struct miqt_array /* of QWebFrame* */ QWebFrame_ChildFrames(const QWebFrame* self); +int QWebFrame_ScrollBarPolicy(const QWebFrame* self, int orientation); +void QWebFrame_SetScrollBarPolicy(QWebFrame* self, int orientation, int policy); +void QWebFrame_SetScrollBarValue(QWebFrame* self, int orientation, int value); +int QWebFrame_ScrollBarValue(const QWebFrame* self, int orientation); +int QWebFrame_ScrollBarMinimum(const QWebFrame* self, int orientation); +int QWebFrame_ScrollBarMaximum(const QWebFrame* self, int orientation); +QRect* QWebFrame_ScrollBarGeometry(const QWebFrame* self, int orientation); +void QWebFrame_Scroll(QWebFrame* self, int param1, int param2); +QPoint* QWebFrame_ScrollPosition(const QWebFrame* self); +void QWebFrame_SetScrollPosition(QWebFrame* self, QPoint* pos); +void QWebFrame_ScrollToAnchor(QWebFrame* self, struct miqt_string anchor); +void QWebFrame_Render(QWebFrame* self, QPainter* param1); +void QWebFrame_Render2(QWebFrame* self, QPainter* param1, int layer); +void QWebFrame_SetTextSizeMultiplier(QWebFrame* self, double factor); +double QWebFrame_TextSizeMultiplier(const QWebFrame* self); +double QWebFrame_ZoomFactor(const QWebFrame* self); +void QWebFrame_SetZoomFactor(QWebFrame* self, double factor); +bool QWebFrame_HasFocus(const QWebFrame* self); +void QWebFrame_SetFocus(QWebFrame* self); +QPoint* QWebFrame_Pos(const QWebFrame* self); +QRect* QWebFrame_Geometry(const QWebFrame* self); +QSize* QWebFrame_ContentsSize(const QWebFrame* self); +QWebElement* QWebFrame_DocumentElement(const QWebFrame* self); +QWebElement* QWebFrame_OwnerElement(const QWebFrame* self); +QWebElementCollection* QWebFrame_FindAllElements(const QWebFrame* self, struct miqt_string selectorQuery); +QWebElement* QWebFrame_FindFirstElement(const QWebFrame* self, struct miqt_string selectorQuery); +QWebHitTestResult* QWebFrame_HitTestContent(const QWebFrame* self, QPoint* pos); +bool QWebFrame_Event(QWebFrame* self, QEvent* param1); +QWebSecurityOrigin* QWebFrame_SecurityOrigin(const QWebFrame* self); +QVariant* QWebFrame_EvaluateJavaScript(QWebFrame* self, struct miqt_string scriptSource); +void QWebFrame_Print(const QWebFrame* self, QPrinter* printer); +void QWebFrame_JavaScriptWindowObjectCleared(QWebFrame* self); +void QWebFrame_connect_JavaScriptWindowObjectCleared(QWebFrame* self, intptr_t slot); +void QWebFrame_ProvisionalLoad(QWebFrame* self); +void QWebFrame_connect_ProvisionalLoad(QWebFrame* self, intptr_t slot); +void QWebFrame_TitleChanged(QWebFrame* self, struct miqt_string title); +void QWebFrame_connect_TitleChanged(QWebFrame* self, intptr_t slot); +void QWebFrame_UrlChanged(QWebFrame* self, QUrl* url); +void QWebFrame_connect_UrlChanged(QWebFrame* self, intptr_t slot); +void QWebFrame_InitialLayoutCompleted(QWebFrame* self); +void QWebFrame_connect_InitialLayoutCompleted(QWebFrame* self, intptr_t slot); +void QWebFrame_IconChanged(QWebFrame* self); +void QWebFrame_connect_IconChanged(QWebFrame* self, intptr_t slot); +void QWebFrame_ContentsSizeChanged(QWebFrame* self, QSize* size); +void QWebFrame_connect_ContentsSizeChanged(QWebFrame* self, intptr_t slot); +void QWebFrame_LoadStarted(QWebFrame* self); +void QWebFrame_connect_LoadStarted(QWebFrame* self, intptr_t slot); +void QWebFrame_LoadFinished(QWebFrame* self, bool ok); +void QWebFrame_connect_LoadFinished(QWebFrame* self, intptr_t slot); +void QWebFrame_PageChanged(QWebFrame* self); +void QWebFrame_connect_PageChanged(QWebFrame* self, intptr_t slot); +struct miqt_string QWebFrame_Tr2(const char* s, const char* c); +struct miqt_string QWebFrame_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebFrame_TrUtf82(const char* s, const char* c); +struct miqt_string QWebFrame_TrUtf83(const char* s, const char* c, int n); +void QWebFrame_Load2(QWebFrame* self, QNetworkRequest* request, int operation); +void QWebFrame_Load3(QWebFrame* self, QNetworkRequest* request, int operation, struct miqt_string body); +void QWebFrame_SetHtml2(QWebFrame* self, struct miqt_string html, QUrl* baseUrl); +void QWebFrame_SetContent2(QWebFrame* self, struct miqt_string data, struct miqt_string mimeType); +void QWebFrame_SetContent3(QWebFrame* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl); +void QWebFrame_AddToJavaScriptWindowObject3(QWebFrame* self, struct miqt_string name, QObject* object, int ownership); +void QWebFrame_Render22(QWebFrame* self, QPainter* param1, QRegion* clip); +void QWebFrame_Render3(QWebFrame* self, QPainter* param1, int layer, QRegion* clip); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webkit/gen_qwebfullscreenrequest.cpp b/qt/webkit/gen_qwebfullscreenrequest.cpp new file mode 100644 index 00000000..cb9e379a --- /dev/null +++ b/qt/webkit/gen_qwebfullscreenrequest.cpp @@ -0,0 +1,47 @@ +#include +#include +#include +#include +#include "gen_qwebfullscreenrequest.h" +#include "_cgo_export.h" + +void QWebFullScreenRequest_new(QWebFullScreenRequest** outptr_QWebFullScreenRequest) { + QWebFullScreenRequest* ret = new QWebFullScreenRequest(); + *outptr_QWebFullScreenRequest = ret; +} + +void QWebFullScreenRequest_new2(QWebFullScreenRequest* param1, QWebFullScreenRequest** outptr_QWebFullScreenRequest) { + QWebFullScreenRequest* ret = new QWebFullScreenRequest(*param1); + *outptr_QWebFullScreenRequest = ret; +} + +void QWebFullScreenRequest_Accept(QWebFullScreenRequest* self) { + self->accept(); +} + +void QWebFullScreenRequest_Reject(QWebFullScreenRequest* self) { + self->reject(); +} + +bool QWebFullScreenRequest_ToggleOn(const QWebFullScreenRequest* self) { + return self->toggleOn(); +} + +QUrl* QWebFullScreenRequest_Origin(const QWebFullScreenRequest* self) { + return new QUrl(self->origin()); +} + +QWebElement* QWebFullScreenRequest_Element(const QWebFullScreenRequest* self) { + const QWebElement& _ret = self->element(); + // Cast returned reference into pointer + return const_cast(&_ret); +} + +void QWebFullScreenRequest_Delete(QWebFullScreenRequest* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webkit/gen_qwebfullscreenrequest.go b/qt/webkit/gen_qwebfullscreenrequest.go new file mode 100644 index 00000000..40c1c6e8 --- /dev/null +++ b/qt/webkit/gen_qwebfullscreenrequest.go @@ -0,0 +1,108 @@ +package webkit + +/* + +#include "gen_qwebfullscreenrequest.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QWebFullScreenRequest struct { + h *C.QWebFullScreenRequest + isSubclass bool +} + +func (this *QWebFullScreenRequest) cPointer() *C.QWebFullScreenRequest { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebFullScreenRequest) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebFullScreenRequest constructs the type using only CGO pointers. +func newQWebFullScreenRequest(h *C.QWebFullScreenRequest) *QWebFullScreenRequest { + if h == nil { + return nil + } + return &QWebFullScreenRequest{h: h} +} + +// UnsafeNewQWebFullScreenRequest constructs the type using only unsafe pointers. +func UnsafeNewQWebFullScreenRequest(h unsafe.Pointer) *QWebFullScreenRequest { + if h == nil { + return nil + } + + return &QWebFullScreenRequest{h: (*C.QWebFullScreenRequest)(h)} +} + +// NewQWebFullScreenRequest constructs a new QWebFullScreenRequest object. +func NewQWebFullScreenRequest() *QWebFullScreenRequest { + var outptr_QWebFullScreenRequest *C.QWebFullScreenRequest = nil + + C.QWebFullScreenRequest_new(&outptr_QWebFullScreenRequest) + ret := newQWebFullScreenRequest(outptr_QWebFullScreenRequest) + ret.isSubclass = true + return ret +} + +// NewQWebFullScreenRequest2 constructs a new QWebFullScreenRequest object. +func NewQWebFullScreenRequest2(param1 *QWebFullScreenRequest) *QWebFullScreenRequest { + var outptr_QWebFullScreenRequest *C.QWebFullScreenRequest = nil + + C.QWebFullScreenRequest_new2(param1.cPointer(), &outptr_QWebFullScreenRequest) + ret := newQWebFullScreenRequest(outptr_QWebFullScreenRequest) + ret.isSubclass = true + return ret +} + +func (this *QWebFullScreenRequest) Accept() { + C.QWebFullScreenRequest_Accept(this.h) +} + +func (this *QWebFullScreenRequest) Reject() { + C.QWebFullScreenRequest_Reject(this.h) +} + +func (this *QWebFullScreenRequest) ToggleOn() bool { + return (bool)(C.QWebFullScreenRequest_ToggleOn(this.h)) +} + +func (this *QWebFullScreenRequest) Origin() *qt.QUrl { + _ret := C.QWebFullScreenRequest_Origin(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebFullScreenRequest) Element() *QWebElement { + return UnsafeNewQWebElement(unsafe.Pointer(C.QWebFullScreenRequest_Element(this.h))) +} + +// Delete this object from C++ memory. +func (this *QWebFullScreenRequest) Delete() { + C.QWebFullScreenRequest_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 *QWebFullScreenRequest) GoGC() { + runtime.SetFinalizer(this, func(this *QWebFullScreenRequest) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webkit/gen_qwebfullscreenrequest.h b/qt/webkit/gen_qwebfullscreenrequest.h new file mode 100644 index 00000000..2de632d1 --- /dev/null +++ b/qt/webkit/gen_qwebfullscreenrequest.h @@ -0,0 +1,40 @@ +#pragma once +#ifndef MIQT_QT_WEBKIT_GEN_QWEBFULLSCREENREQUEST_H +#define MIQT_QT_WEBKIT_GEN_QWEBFULLSCREENREQUEST_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QUrl; +class QWebElement; +class QWebFullScreenRequest; +#else +typedef struct QUrl QUrl; +typedef struct QWebElement QWebElement; +typedef struct QWebFullScreenRequest QWebFullScreenRequest; +#endif + +void QWebFullScreenRequest_new(QWebFullScreenRequest** outptr_QWebFullScreenRequest); +void QWebFullScreenRequest_new2(QWebFullScreenRequest* param1, QWebFullScreenRequest** outptr_QWebFullScreenRequest); +void QWebFullScreenRequest_Accept(QWebFullScreenRequest* self); +void QWebFullScreenRequest_Reject(QWebFullScreenRequest* self); +bool QWebFullScreenRequest_ToggleOn(const QWebFullScreenRequest* self); +QUrl* QWebFullScreenRequest_Origin(const QWebFullScreenRequest* self); +QWebElement* QWebFullScreenRequest_Element(const QWebFullScreenRequest* self); +void QWebFullScreenRequest_Delete(QWebFullScreenRequest* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webkit/gen_qwebhistory.cpp b/qt/webkit/gen_qwebhistory.cpp new file mode 100644 index 00000000..bf03b567 --- /dev/null +++ b/qt/webkit/gen_qwebhistory.cpp @@ -0,0 +1,238 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebhistory.h" +#include "_cgo_export.h" + +void QWebHistoryItem_new(QWebHistoryItem* other, QWebHistoryItem** outptr_QWebHistoryItem) { + QWebHistoryItem* ret = new QWebHistoryItem(*other); + *outptr_QWebHistoryItem = ret; +} + +void QWebHistoryItem_OperatorAssign(QWebHistoryItem* self, QWebHistoryItem* other) { + self->operator=(*other); +} + +QUrl* QWebHistoryItem_OriginalUrl(const QWebHistoryItem* self) { + return new QUrl(self->originalUrl()); +} + +QUrl* QWebHistoryItem_Url(const QWebHistoryItem* self) { + return new QUrl(self->url()); +} + +struct miqt_string QWebHistoryItem_Title(const QWebHistoryItem* self) { + QString _ret = self->title(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QDateTime* QWebHistoryItem_LastVisited(const QWebHistoryItem* self) { + return new QDateTime(self->lastVisited()); +} + +QIcon* QWebHistoryItem_Icon(const QWebHistoryItem* self) { + return new QIcon(self->icon()); +} + +QVariant* QWebHistoryItem_UserData(const QWebHistoryItem* self) { + return new QVariant(self->userData()); +} + +void QWebHistoryItem_SetUserData(QWebHistoryItem* self, QVariant* userData) { + self->setUserData(*userData); +} + +bool QWebHistoryItem_IsValid(const QWebHistoryItem* self) { + return self->isValid(); +} + +struct miqt_map /* of struct miqt_string to QVariant* */ QWebHistoryItem_ToMap(const QWebHistoryItem* self) { + QVariantMap _ret = self->toMap(); + // Convert QMap<> from C++ memory to manually-managed C memory + struct miqt_string* _karr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + QString _mapkey_ret = _itr->first; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _mapkey_b = _mapkey_ret.toUtf8(); + struct miqt_string _mapkey_ms; + _mapkey_ms.len = _mapkey_b.length(); + _mapkey_ms.data = static_cast(malloc(_mapkey_ms.len)); + memcpy(_mapkey_ms.data, _mapkey_b.data(), _mapkey_ms.len); + _karr[_ctr] = _mapkey_ms; + _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; +} + +void QWebHistoryItem_LoadFromMap(QWebHistoryItem* self, struct miqt_map /* of struct miqt_string to QVariant* */ mapVal) { + QVariantMap mapVal_QMap; + struct miqt_string* mapVal_karr = static_cast(mapVal.keys); + QVariant** mapVal_varr = static_cast(mapVal.values); + for(size_t i = 0; i < mapVal.len; ++i) { + QString mapVal_karr_i_QString = QString::fromUtf8(mapVal_karr[i].data, mapVal_karr[i].len); + mapVal_QMap[mapVal_karr_i_QString] = *(mapVal_varr[i]); + } + self->loadFromMap(mapVal_QMap); +} + +void QWebHistoryItem_Delete(QWebHistoryItem* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebHistory_Clear(QWebHistory* self) { + self->clear(); +} + +struct miqt_array /* of QWebHistoryItem* */ QWebHistory_Items(const QWebHistory* self) { + QList _ret = self->items(); + // Convert QList<> from C++ memory to manually-managed C memory + QWebHistoryItem** _arr = static_cast(malloc(sizeof(QWebHistoryItem*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QWebHistoryItem(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +struct miqt_array /* of QWebHistoryItem* */ QWebHistory_BackItems(const QWebHistory* self, int maxItems) { + QList _ret = self->backItems(static_cast(maxItems)); + // Convert QList<> from C++ memory to manually-managed C memory + QWebHistoryItem** _arr = static_cast(malloc(sizeof(QWebHistoryItem*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QWebHistoryItem(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +struct miqt_array /* of QWebHistoryItem* */ QWebHistory_ForwardItems(const QWebHistory* self, int maxItems) { + QList _ret = self->forwardItems(static_cast(maxItems)); + // Convert QList<> from C++ memory to manually-managed C memory + QWebHistoryItem** _arr = static_cast(malloc(sizeof(QWebHistoryItem*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QWebHistoryItem(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +bool QWebHistory_CanGoBack(const QWebHistory* self) { + return self->canGoBack(); +} + +bool QWebHistory_CanGoForward(const QWebHistory* self) { + return self->canGoForward(); +} + +void QWebHistory_Back(QWebHistory* self) { + self->back(); +} + +void QWebHistory_Forward(QWebHistory* self) { + self->forward(); +} + +void QWebHistory_GoToItem(QWebHistory* self, QWebHistoryItem* item) { + self->goToItem(*item); +} + +QWebHistoryItem* QWebHistory_BackItem(const QWebHistory* self) { + return new QWebHistoryItem(self->backItem()); +} + +QWebHistoryItem* QWebHistory_CurrentItem(const QWebHistory* self) { + return new QWebHistoryItem(self->currentItem()); +} + +QWebHistoryItem* QWebHistory_ForwardItem(const QWebHistory* self) { + return new QWebHistoryItem(self->forwardItem()); +} + +QWebHistoryItem* QWebHistory_ItemAt(const QWebHistory* self, int i) { + return new QWebHistoryItem(self->itemAt(static_cast(i))); +} + +int QWebHistory_CurrentItemIndex(const QWebHistory* self) { + return self->currentItemIndex(); +} + +int QWebHistory_Count(const QWebHistory* self) { + return self->count(); +} + +int QWebHistory_MaximumItemCount(const QWebHistory* self) { + return self->maximumItemCount(); +} + +void QWebHistory_SetMaximumItemCount(QWebHistory* self, int count) { + self->setMaximumItemCount(static_cast(count)); +} + +struct miqt_map /* of struct miqt_string to QVariant* */ QWebHistory_ToMap(const QWebHistory* self) { + QVariantMap _ret = self->toMap(); + // Convert QMap<> from C++ memory to manually-managed C memory + struct miqt_string* _karr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + QString _mapkey_ret = _itr->first; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _mapkey_b = _mapkey_ret.toUtf8(); + struct miqt_string _mapkey_ms; + _mapkey_ms.len = _mapkey_b.length(); + _mapkey_ms.data = static_cast(malloc(_mapkey_ms.len)); + memcpy(_mapkey_ms.data, _mapkey_b.data(), _mapkey_ms.len); + _karr[_ctr] = _mapkey_ms; + _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; +} + +void QWebHistory_LoadFromMap(QWebHistory* self, struct miqt_map /* of struct miqt_string to QVariant* */ mapVal) { + QVariantMap mapVal_QMap; + struct miqt_string* mapVal_karr = static_cast(mapVal.keys); + QVariant** mapVal_varr = static_cast(mapVal.values); + for(size_t i = 0; i < mapVal.len; ++i) { + QString mapVal_karr_i_QString = QString::fromUtf8(mapVal_karr[i].data, mapVal_karr[i].len); + mapVal_QMap[mapVal_karr_i_QString] = *(mapVal_varr[i]); + } + self->loadFromMap(mapVal_QMap); +} + diff --git a/qt/webkit/gen_qwebhistory.go b/qt/webkit/gen_qwebhistory.go new file mode 100644 index 00000000..83df4d00 --- /dev/null +++ b/qt/webkit/gen_qwebhistory.go @@ -0,0 +1,358 @@ +package webkit + +/* + +#include "gen_qwebhistory.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QWebHistoryItem struct { + h *C.QWebHistoryItem + isSubclass bool +} + +func (this *QWebHistoryItem) cPointer() *C.QWebHistoryItem { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebHistoryItem) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebHistoryItem constructs the type using only CGO pointers. +func newQWebHistoryItem(h *C.QWebHistoryItem) *QWebHistoryItem { + if h == nil { + return nil + } + return &QWebHistoryItem{h: h} +} + +// UnsafeNewQWebHistoryItem constructs the type using only unsafe pointers. +func UnsafeNewQWebHistoryItem(h unsafe.Pointer) *QWebHistoryItem { + if h == nil { + return nil + } + + return &QWebHistoryItem{h: (*C.QWebHistoryItem)(h)} +} + +// NewQWebHistoryItem constructs a new QWebHistoryItem object. +func NewQWebHistoryItem(other *QWebHistoryItem) *QWebHistoryItem { + var outptr_QWebHistoryItem *C.QWebHistoryItem = nil + + C.QWebHistoryItem_new(other.cPointer(), &outptr_QWebHistoryItem) + ret := newQWebHistoryItem(outptr_QWebHistoryItem) + ret.isSubclass = true + return ret +} + +func (this *QWebHistoryItem) OperatorAssign(other *QWebHistoryItem) { + C.QWebHistoryItem_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QWebHistoryItem) OriginalUrl() *qt.QUrl { + _ret := C.QWebHistoryItem_OriginalUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHistoryItem) Url() *qt.QUrl { + _ret := C.QWebHistoryItem_Url(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHistoryItem) Title() string { + var _ms C.struct_miqt_string = C.QWebHistoryItem_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebHistoryItem) LastVisited() *qt.QDateTime { + _ret := C.QWebHistoryItem_LastVisited(this.h) + _goptr := qt.UnsafeNewQDateTime(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHistoryItem) Icon() *qt.QIcon { + _ret := C.QWebHistoryItem_Icon(this.h) + _goptr := qt.UnsafeNewQIcon(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHistoryItem) UserData() *qt.QVariant { + _ret := C.QWebHistoryItem_UserData(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 *QWebHistoryItem) SetUserData(userData *qt.QVariant) { + C.QWebHistoryItem_SetUserData(this.h, (*C.QVariant)(userData.UnsafePointer())) +} + +func (this *QWebHistoryItem) IsValid() bool { + return (bool)(C.QWebHistoryItem_IsValid(this.h)) +} + +func (this *QWebHistoryItem) ToMap() map[string]qt.QVariant { + var _mm C.struct_miqt_map = C.QWebHistoryItem_ToMap(this.h) + _ret := make(map[string]qt.QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + var _mapkey_ms C.struct_miqt_string = _Keys[i] + _mapkey_ret := C.GoStringN(_mapkey_ms.data, C.int(int64(_mapkey_ms.len))) + C.free(unsafe.Pointer(_mapkey_ms.data)) + _entry_Key := _mapkey_ret + _mapval_ret := _Values[i] + _mapval_goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_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 *QWebHistoryItem) LoadFromMap(mapVal map[string]qt.QVariant) { + mapVal_Keys_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(mapVal)))) + defer C.free(unsafe.Pointer(mapVal_Keys_CArray)) + mapVal_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(mapVal)))) + defer C.free(unsafe.Pointer(mapVal_Values_CArray)) + mapVal_ctr := 0 + for mapVal_k, mapVal_v := range mapVal { + mapVal_k_ms := C.struct_miqt_string{} + mapVal_k_ms.data = C.CString(mapVal_k) + mapVal_k_ms.len = C.size_t(len(mapVal_k)) + defer C.free(unsafe.Pointer(mapVal_k_ms.data)) + mapVal_Keys_CArray[mapVal_ctr] = mapVal_k_ms + mapVal_Values_CArray[mapVal_ctr] = (*C.QVariant)(mapVal_v.UnsafePointer()) + mapVal_ctr++ + } + mapVal_mm := C.struct_miqt_map{ + len: C.size_t(len(mapVal)), + keys: unsafe.Pointer(mapVal_Keys_CArray), + values: unsafe.Pointer(mapVal_Values_CArray), + } + C.QWebHistoryItem_LoadFromMap(this.h, mapVal_mm) +} + +// Delete this object from C++ memory. +func (this *QWebHistoryItem) Delete() { + C.QWebHistoryItem_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 *QWebHistoryItem) GoGC() { + runtime.SetFinalizer(this, func(this *QWebHistoryItem) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebHistory struct { + h *C.QWebHistory + isSubclass bool +} + +func (this *QWebHistory) cPointer() *C.QWebHistory { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebHistory) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebHistory constructs the type using only CGO pointers. +func newQWebHistory(h *C.QWebHistory) *QWebHistory { + if h == nil { + return nil + } + return &QWebHistory{h: h} +} + +// UnsafeNewQWebHistory constructs the type using only unsafe pointers. +func UnsafeNewQWebHistory(h unsafe.Pointer) *QWebHistory { + if h == nil { + return nil + } + + return &QWebHistory{h: (*C.QWebHistory)(h)} +} + +func (this *QWebHistory) Clear() { + C.QWebHistory_Clear(this.h) +} + +func (this *QWebHistory) Items() []QWebHistoryItem { + var _ma C.struct_miqt_array = C.QWebHistory_Items(this.h) + _ret := make([]QWebHistoryItem, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebHistoryItem)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebHistoryItem(_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 *QWebHistory) BackItems(maxItems int) []QWebHistoryItem { + var _ma C.struct_miqt_array = C.QWebHistory_BackItems(this.h, (C.int)(maxItems)) + _ret := make([]QWebHistoryItem, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebHistoryItem)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebHistoryItem(_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 *QWebHistory) ForwardItems(maxItems int) []QWebHistoryItem { + var _ma C.struct_miqt_array = C.QWebHistory_ForwardItems(this.h, (C.int)(maxItems)) + _ret := make([]QWebHistoryItem, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebHistoryItem)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebHistoryItem(_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 *QWebHistory) CanGoBack() bool { + return (bool)(C.QWebHistory_CanGoBack(this.h)) +} + +func (this *QWebHistory) CanGoForward() bool { + return (bool)(C.QWebHistory_CanGoForward(this.h)) +} + +func (this *QWebHistory) Back() { + C.QWebHistory_Back(this.h) +} + +func (this *QWebHistory) Forward() { + C.QWebHistory_Forward(this.h) +} + +func (this *QWebHistory) GoToItem(item *QWebHistoryItem) { + C.QWebHistory_GoToItem(this.h, item.cPointer()) +} + +func (this *QWebHistory) BackItem() *QWebHistoryItem { + _ret := C.QWebHistory_BackItem(this.h) + _goptr := newQWebHistoryItem(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHistory) CurrentItem() *QWebHistoryItem { + _ret := C.QWebHistory_CurrentItem(this.h) + _goptr := newQWebHistoryItem(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHistory) ForwardItem() *QWebHistoryItem { + _ret := C.QWebHistory_ForwardItem(this.h) + _goptr := newQWebHistoryItem(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHistory) ItemAt(i int) *QWebHistoryItem { + _ret := C.QWebHistory_ItemAt(this.h, (C.int)(i)) + _goptr := newQWebHistoryItem(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebHistory) CurrentItemIndex() int { + return (int)(C.QWebHistory_CurrentItemIndex(this.h)) +} + +func (this *QWebHistory) Count() int { + return (int)(C.QWebHistory_Count(this.h)) +} + +func (this *QWebHistory) MaximumItemCount() int { + return (int)(C.QWebHistory_MaximumItemCount(this.h)) +} + +func (this *QWebHistory) SetMaximumItemCount(count int) { + C.QWebHistory_SetMaximumItemCount(this.h, (C.int)(count)) +} + +func (this *QWebHistory) ToMap() map[string]qt.QVariant { + var _mm C.struct_miqt_map = C.QWebHistory_ToMap(this.h) + _ret := make(map[string]qt.QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + var _mapkey_ms C.struct_miqt_string = _Keys[i] + _mapkey_ret := C.GoStringN(_mapkey_ms.data, C.int(int64(_mapkey_ms.len))) + C.free(unsafe.Pointer(_mapkey_ms.data)) + _entry_Key := _mapkey_ret + _mapval_ret := _Values[i] + _mapval_goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_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 *QWebHistory) LoadFromMap(mapVal map[string]qt.QVariant) { + mapVal_Keys_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(mapVal)))) + defer C.free(unsafe.Pointer(mapVal_Keys_CArray)) + mapVal_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(mapVal)))) + defer C.free(unsafe.Pointer(mapVal_Values_CArray)) + mapVal_ctr := 0 + for mapVal_k, mapVal_v := range mapVal { + mapVal_k_ms := C.struct_miqt_string{} + mapVal_k_ms.data = C.CString(mapVal_k) + mapVal_k_ms.len = C.size_t(len(mapVal_k)) + defer C.free(unsafe.Pointer(mapVal_k_ms.data)) + mapVal_Keys_CArray[mapVal_ctr] = mapVal_k_ms + mapVal_Values_CArray[mapVal_ctr] = (*C.QVariant)(mapVal_v.UnsafePointer()) + mapVal_ctr++ + } + mapVal_mm := C.struct_miqt_map{ + len: C.size_t(len(mapVal)), + keys: unsafe.Pointer(mapVal_Keys_CArray), + values: unsafe.Pointer(mapVal_Values_CArray), + } + C.QWebHistory_LoadFromMap(this.h, mapVal_mm) +} diff --git a/qt/webkit/gen_qwebhistory.h b/qt/webkit/gen_qwebhistory.h new file mode 100644 index 00000000..5d94d0dd --- /dev/null +++ b/qt/webkit/gen_qwebhistory.h @@ -0,0 +1,71 @@ +#pragma once +#ifndef MIQT_QT_WEBKIT_GEN_QWEBHISTORY_H +#define MIQT_QT_WEBKIT_GEN_QWEBHISTORY_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QDateTime; +class QIcon; +class QUrl; +class QVariant; +class QWebHistory; +class QWebHistoryItem; +#else +typedef struct QDateTime QDateTime; +typedef struct QIcon QIcon; +typedef struct QUrl QUrl; +typedef struct QVariant QVariant; +typedef struct QWebHistory QWebHistory; +typedef struct QWebHistoryItem QWebHistoryItem; +#endif + +void QWebHistoryItem_new(QWebHistoryItem* other, QWebHistoryItem** outptr_QWebHistoryItem); +void QWebHistoryItem_OperatorAssign(QWebHistoryItem* self, QWebHistoryItem* other); +QUrl* QWebHistoryItem_OriginalUrl(const QWebHistoryItem* self); +QUrl* QWebHistoryItem_Url(const QWebHistoryItem* self); +struct miqt_string QWebHistoryItem_Title(const QWebHistoryItem* self); +QDateTime* QWebHistoryItem_LastVisited(const QWebHistoryItem* self); +QIcon* QWebHistoryItem_Icon(const QWebHistoryItem* self); +QVariant* QWebHistoryItem_UserData(const QWebHistoryItem* self); +void QWebHistoryItem_SetUserData(QWebHistoryItem* self, QVariant* userData); +bool QWebHistoryItem_IsValid(const QWebHistoryItem* self); +struct miqt_map /* of struct miqt_string to QVariant* */ QWebHistoryItem_ToMap(const QWebHistoryItem* self); +void QWebHistoryItem_LoadFromMap(QWebHistoryItem* self, struct miqt_map /* of struct miqt_string to QVariant* */ mapVal); +void QWebHistoryItem_Delete(QWebHistoryItem* self, bool isSubclass); + +void QWebHistory_Clear(QWebHistory* self); +struct miqt_array /* of QWebHistoryItem* */ QWebHistory_Items(const QWebHistory* self); +struct miqt_array /* of QWebHistoryItem* */ QWebHistory_BackItems(const QWebHistory* self, int maxItems); +struct miqt_array /* of QWebHistoryItem* */ QWebHistory_ForwardItems(const QWebHistory* self, int maxItems); +bool QWebHistory_CanGoBack(const QWebHistory* self); +bool QWebHistory_CanGoForward(const QWebHistory* self); +void QWebHistory_Back(QWebHistory* self); +void QWebHistory_Forward(QWebHistory* self); +void QWebHistory_GoToItem(QWebHistory* self, QWebHistoryItem* item); +QWebHistoryItem* QWebHistory_BackItem(const QWebHistory* self); +QWebHistoryItem* QWebHistory_CurrentItem(const QWebHistory* self); +QWebHistoryItem* QWebHistory_ForwardItem(const QWebHistory* self); +QWebHistoryItem* QWebHistory_ItemAt(const QWebHistory* self, int i); +int QWebHistory_CurrentItemIndex(const QWebHistory* self); +int QWebHistory_Count(const QWebHistory* self); +int QWebHistory_MaximumItemCount(const QWebHistory* self); +void QWebHistory_SetMaximumItemCount(QWebHistory* self, int count); +struct miqt_map /* of struct miqt_string to QVariant* */ QWebHistory_ToMap(const QWebHistory* self); +void QWebHistory_LoadFromMap(QWebHistory* self, struct miqt_map /* of struct miqt_string to QVariant* */ mapVal); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webkit/gen_qwebhistoryinterface.cpp b/qt/webkit/gen_qwebhistoryinterface.cpp new file mode 100644 index 00000000..09aaa017 --- /dev/null +++ b/qt/webkit/gen_qwebhistoryinterface.cpp @@ -0,0 +1,417 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebhistoryinterface.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebHistoryInterface : public virtual QWebHistoryInterface { +public: + + MiqtVirtualQWebHistoryInterface(): QWebHistoryInterface() {}; + MiqtVirtualQWebHistoryInterface(QObject* parent): QWebHistoryInterface(parent) {}; + + virtual ~MiqtVirtualQWebHistoryInterface() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__HistoryContains = 0; + + // Subclass to allow providing a Go implementation + virtual bool historyContains(const QString& url) const override { + if (handle__HistoryContains == 0) { + return false; // Pure virtual, there is no base we can call + } + + const QString url_ret = url; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray url_b = url_ret.toUtf8(); + struct miqt_string url_ms; + url_ms.len = url_b.length(); + url_ms.data = static_cast(malloc(url_ms.len)); + memcpy(url_ms.data, url_b.data(), url_ms.len); + struct miqt_string sigval1 = url_ms; + + bool callback_return_value = miqt_exec_callback_QWebHistoryInterface_HistoryContains(const_cast(this), handle__HistoryContains, sigval1); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AddHistoryEntry = 0; + + // Subclass to allow providing a Go implementation + virtual void addHistoryEntry(const QString& url) override { + if (handle__AddHistoryEntry == 0) { + return; // Pure virtual, there is no base we can call + } + + const QString url_ret = url; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray url_b = url_ret.toUtf8(); + struct miqt_string url_ms; + url_ms.len = url_b.length(); + url_ms.data = static_cast(malloc(url_ms.len)); + memcpy(url_ms.data, url_b.data(), url_ms.len); + struct miqt_string sigval1 = url_ms; + + miqt_exec_callback_QWebHistoryInterface_AddHistoryEntry(this, handle__AddHistoryEntry, 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 QWebHistoryInterface::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWebHistoryInterface_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWebHistoryInterface::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 QWebHistoryInterface::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWebHistoryInterface_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWebHistoryInterface::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) { + QWebHistoryInterface::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWebHistoryInterface_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWebHistoryInterface::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) { + QWebHistoryInterface::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWebHistoryInterface_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWebHistoryInterface::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) { + QWebHistoryInterface::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebHistoryInterface_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWebHistoryInterface::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) { + QWebHistoryInterface::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebHistoryInterface_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWebHistoryInterface::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) { + QWebHistoryInterface::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebHistoryInterface_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWebHistoryInterface::disconnectNotify(*signal); + + } + +}; + +void QWebHistoryInterface_new(QWebHistoryInterface** outptr_QWebHistoryInterface, QObject** outptr_QObject) { + MiqtVirtualQWebHistoryInterface* ret = new MiqtVirtualQWebHistoryInterface(); + *outptr_QWebHistoryInterface = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebHistoryInterface_new2(QObject* parent, QWebHistoryInterface** outptr_QWebHistoryInterface, QObject** outptr_QObject) { + MiqtVirtualQWebHistoryInterface* ret = new MiqtVirtualQWebHistoryInterface(parent); + *outptr_QWebHistoryInterface = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QWebHistoryInterface_MetaObject(const QWebHistoryInterface* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebHistoryInterface_Metacast(QWebHistoryInterface* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebHistoryInterface_Tr(const char* s) { + QString _ret = QWebHistoryInterface::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebHistoryInterface_TrUtf8(const char* s) { + QString _ret = QWebHistoryInterface::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebHistoryInterface_SetDefaultInterface(QWebHistoryInterface* defaultInterface) { + QWebHistoryInterface::setDefaultInterface(defaultInterface); +} + +QWebHistoryInterface* QWebHistoryInterface_DefaultInterface() { + return QWebHistoryInterface::defaultInterface(); +} + +bool QWebHistoryInterface_HistoryContains(const QWebHistoryInterface* self, struct miqt_string url) { + QString url_QString = QString::fromUtf8(url.data, url.len); + return self->historyContains(url_QString); +} + +void QWebHistoryInterface_AddHistoryEntry(QWebHistoryInterface* self, struct miqt_string url) { + QString url_QString = QString::fromUtf8(url.data, url.len); + self->addHistoryEntry(url_QString); +} + +struct miqt_string QWebHistoryInterface_Tr2(const char* s, const char* c) { + QString _ret = QWebHistoryInterface::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebHistoryInterface_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebHistoryInterface::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebHistoryInterface_TrUtf82(const char* s, const char* c) { + QString _ret = QWebHistoryInterface::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebHistoryInterface_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebHistoryInterface::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebHistoryInterface_override_virtual_HistoryContains(void* self, intptr_t slot) { + dynamic_cast( (QWebHistoryInterface*)(self) )->handle__HistoryContains = slot; +} + +void QWebHistoryInterface_override_virtual_AddHistoryEntry(void* self, intptr_t slot) { + dynamic_cast( (QWebHistoryInterface*)(self) )->handle__AddHistoryEntry = slot; +} + +void QWebHistoryInterface_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebHistoryInterface*)(self) )->handle__Event = slot; +} + +bool QWebHistoryInterface_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWebHistoryInterface*)(self) )->virtualbase_Event(event); +} + +void QWebHistoryInterface_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWebHistoryInterface*)(self) )->handle__EventFilter = slot; +} + +bool QWebHistoryInterface_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWebHistoryInterface*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWebHistoryInterface_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebHistoryInterface*)(self) )->handle__TimerEvent = slot; +} + +void QWebHistoryInterface_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWebHistoryInterface*)(self) )->virtualbase_TimerEvent(event); +} + +void QWebHistoryInterface_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebHistoryInterface*)(self) )->handle__ChildEvent = slot; +} + +void QWebHistoryInterface_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWebHistoryInterface*)(self) )->virtualbase_ChildEvent(event); +} + +void QWebHistoryInterface_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebHistoryInterface*)(self) )->handle__CustomEvent = slot; +} + +void QWebHistoryInterface_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebHistoryInterface*)(self) )->virtualbase_CustomEvent(event); +} + +void QWebHistoryInterface_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebHistoryInterface*)(self) )->handle__ConnectNotify = slot; +} + +void QWebHistoryInterface_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebHistoryInterface*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWebHistoryInterface_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebHistoryInterface*)(self) )->handle__DisconnectNotify = slot; +} + +void QWebHistoryInterface_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebHistoryInterface*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWebHistoryInterface_Delete(QWebHistoryInterface* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webkit/gen_qwebhistoryinterface.go b/qt/webkit/gen_qwebhistoryinterface.go new file mode 100644 index 00000000..b2ae972d --- /dev/null +++ b/qt/webkit/gen_qwebhistoryinterface.go @@ -0,0 +1,395 @@ +package webkit + +/* + +#include "gen_qwebhistoryinterface.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebHistoryInterface struct { + h *C.QWebHistoryInterface + isSubclass bool + *qt.QObject +} + +func (this *QWebHistoryInterface) cPointer() *C.QWebHistoryInterface { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebHistoryInterface) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebHistoryInterface constructs the type using only CGO pointers. +func newQWebHistoryInterface(h *C.QWebHistoryInterface, h_QObject *C.QObject) *QWebHistoryInterface { + if h == nil { + return nil + } + return &QWebHistoryInterface{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebHistoryInterface constructs the type using only unsafe pointers. +func UnsafeNewQWebHistoryInterface(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebHistoryInterface { + if h == nil { + return nil + } + + return &QWebHistoryInterface{h: (*C.QWebHistoryInterface)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +// NewQWebHistoryInterface constructs a new QWebHistoryInterface object. +func NewQWebHistoryInterface() *QWebHistoryInterface { + var outptr_QWebHistoryInterface *C.QWebHistoryInterface = nil + var outptr_QObject *C.QObject = nil + + C.QWebHistoryInterface_new(&outptr_QWebHistoryInterface, &outptr_QObject) + ret := newQWebHistoryInterface(outptr_QWebHistoryInterface, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebHistoryInterface2 constructs a new QWebHistoryInterface object. +func NewQWebHistoryInterface2(parent *qt.QObject) *QWebHistoryInterface { + var outptr_QWebHistoryInterface *C.QWebHistoryInterface = nil + var outptr_QObject *C.QObject = nil + + C.QWebHistoryInterface_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebHistoryInterface, &outptr_QObject) + ret := newQWebHistoryInterface(outptr_QWebHistoryInterface, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QWebHistoryInterface) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebHistoryInterface_MetaObject(this.h))) +} + +func (this *QWebHistoryInterface) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebHistoryInterface_Metacast(this.h, param1_Cstring)) +} + +func QWebHistoryInterface_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebHistoryInterface_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebHistoryInterface_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebHistoryInterface_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebHistoryInterface_SetDefaultInterface(defaultInterface *QWebHistoryInterface) { + C.QWebHistoryInterface_SetDefaultInterface(defaultInterface.cPointer()) +} + +func QWebHistoryInterface_DefaultInterface() *QWebHistoryInterface { + return UnsafeNewQWebHistoryInterface(unsafe.Pointer(C.QWebHistoryInterface_DefaultInterface()), nil) +} + +func (this *QWebHistoryInterface) HistoryContains(url string) bool { + url_ms := C.struct_miqt_string{} + url_ms.data = C.CString(url) + url_ms.len = C.size_t(len(url)) + defer C.free(unsafe.Pointer(url_ms.data)) + return (bool)(C.QWebHistoryInterface_HistoryContains(this.h, url_ms)) +} + +func (this *QWebHistoryInterface) AddHistoryEntry(url string) { + url_ms := C.struct_miqt_string{} + url_ms.data = C.CString(url) + url_ms.len = C.size_t(len(url)) + defer C.free(unsafe.Pointer(url_ms.data)) + C.QWebHistoryInterface_AddHistoryEntry(this.h, url_ms) +} + +func QWebHistoryInterface_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebHistoryInterface_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebHistoryInterface_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebHistoryInterface_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebHistoryInterface_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebHistoryInterface_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebHistoryInterface_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebHistoryInterface_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QWebHistoryInterface) OnHistoryContains(slot func(url string) bool) { + C.QWebHistoryInterface_override_virtual_HistoryContains(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebHistoryInterface_HistoryContains +func miqt_exec_callback_QWebHistoryInterface_HistoryContains(self *C.QWebHistoryInterface, cb C.intptr_t, url C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(url string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var url_ms C.struct_miqt_string = url + url_ret := C.GoStringN(url_ms.data, C.int(int64(url_ms.len))) + C.free(unsafe.Pointer(url_ms.data)) + slotval1 := url_ret + + virtualReturn := gofunc(slotval1) + + return (C.bool)(virtualReturn) + +} +func (this *QWebHistoryInterface) OnAddHistoryEntry(slot func(url string)) { + C.QWebHistoryInterface_override_virtual_AddHistoryEntry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebHistoryInterface_AddHistoryEntry +func miqt_exec_callback_QWebHistoryInterface_AddHistoryEntry(self *C.QWebHistoryInterface, cb C.intptr_t, url C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(url string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var url_ms C.struct_miqt_string = url + url_ret := C.GoStringN(url_ms.data, C.int(int64(url_ms.len))) + C.free(unsafe.Pointer(url_ms.data)) + slotval1 := url_ret + + gofunc(slotval1) + +} + +func (this *QWebHistoryInterface) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QWebHistoryInterface_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebHistoryInterface) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QWebHistoryInterface_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebHistoryInterface_Event +func miqt_exec_callback_QWebHistoryInterface_Event(self *C.QWebHistoryInterface, 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((&QWebHistoryInterface{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebHistoryInterface) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QWebHistoryInterface_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebHistoryInterface) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QWebHistoryInterface_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebHistoryInterface_EventFilter +func miqt_exec_callback_QWebHistoryInterface_EventFilter(self *C.QWebHistoryInterface, 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((&QWebHistoryInterface{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebHistoryInterface) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QWebHistoryInterface_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QWebHistoryInterface) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QWebHistoryInterface_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebHistoryInterface_TimerEvent +func miqt_exec_callback_QWebHistoryInterface_TimerEvent(self *C.QWebHistoryInterface, 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((&QWebHistoryInterface{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWebHistoryInterface) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QWebHistoryInterface_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QWebHistoryInterface) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QWebHistoryInterface_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebHistoryInterface_ChildEvent +func miqt_exec_callback_QWebHistoryInterface_ChildEvent(self *C.QWebHistoryInterface, 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((&QWebHistoryInterface{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWebHistoryInterface) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QWebHistoryInterface_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebHistoryInterface) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QWebHistoryInterface_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebHistoryInterface_CustomEvent +func miqt_exec_callback_QWebHistoryInterface_CustomEvent(self *C.QWebHistoryInterface, 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((&QWebHistoryInterface{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWebHistoryInterface) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QWebHistoryInterface_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebHistoryInterface) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebHistoryInterface_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebHistoryInterface_ConnectNotify +func miqt_exec_callback_QWebHistoryInterface_ConnectNotify(self *C.QWebHistoryInterface, 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((&QWebHistoryInterface{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWebHistoryInterface) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QWebHistoryInterface_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebHistoryInterface) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebHistoryInterface_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebHistoryInterface_DisconnectNotify +func miqt_exec_callback_QWebHistoryInterface_DisconnectNotify(self *C.QWebHistoryInterface, 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((&QWebHistoryInterface{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QWebHistoryInterface) Delete() { + C.QWebHistoryInterface_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 *QWebHistoryInterface) GoGC() { + runtime.SetFinalizer(this, func(this *QWebHistoryInterface) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webkit/gen_qwebhistoryinterface.h b/qt/webkit/gen_qwebhistoryinterface.h new file mode 100644 index 00000000..aa23209a --- /dev/null +++ b/qt/webkit/gen_qwebhistoryinterface.h @@ -0,0 +1,73 @@ +#pragma once +#ifndef MIQT_QT_WEBKIT_GEN_QWEBHISTORYINTERFACE_H +#define MIQT_QT_WEBKIT_GEN_QWEBHISTORYINTERFACE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QObject; +class QTimerEvent; +class QWebHistoryInterface; +#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 QWebHistoryInterface QWebHistoryInterface; +#endif + +void QWebHistoryInterface_new(QWebHistoryInterface** outptr_QWebHistoryInterface, QObject** outptr_QObject); +void QWebHistoryInterface_new2(QObject* parent, QWebHistoryInterface** outptr_QWebHistoryInterface, QObject** outptr_QObject); +QMetaObject* QWebHistoryInterface_MetaObject(const QWebHistoryInterface* self); +void* QWebHistoryInterface_Metacast(QWebHistoryInterface* self, const char* param1); +struct miqt_string QWebHistoryInterface_Tr(const char* s); +struct miqt_string QWebHistoryInterface_TrUtf8(const char* s); +void QWebHistoryInterface_SetDefaultInterface(QWebHistoryInterface* defaultInterface); +QWebHistoryInterface* QWebHistoryInterface_DefaultInterface(); +bool QWebHistoryInterface_HistoryContains(const QWebHistoryInterface* self, struct miqt_string url); +void QWebHistoryInterface_AddHistoryEntry(QWebHistoryInterface* self, struct miqt_string url); +struct miqt_string QWebHistoryInterface_Tr2(const char* s, const char* c); +struct miqt_string QWebHistoryInterface_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebHistoryInterface_TrUtf82(const char* s, const char* c); +struct miqt_string QWebHistoryInterface_TrUtf83(const char* s, const char* c, int n); +void QWebHistoryInterface_override_virtual_HistoryContains(void* self, intptr_t slot); +bool QWebHistoryInterface_virtualbase_HistoryContains(const void* self, struct miqt_string url); +void QWebHistoryInterface_override_virtual_AddHistoryEntry(void* self, intptr_t slot); +void QWebHistoryInterface_virtualbase_AddHistoryEntry(void* self, struct miqt_string url); +void QWebHistoryInterface_override_virtual_Event(void* self, intptr_t slot); +bool QWebHistoryInterface_virtualbase_Event(void* self, QEvent* event); +void QWebHistoryInterface_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWebHistoryInterface_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWebHistoryInterface_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWebHistoryInterface_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWebHistoryInterface_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWebHistoryInterface_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWebHistoryInterface_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWebHistoryInterface_virtualbase_CustomEvent(void* self, QEvent* event); +void QWebHistoryInterface_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWebHistoryInterface_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWebHistoryInterface_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWebHistoryInterface_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWebHistoryInterface_Delete(QWebHistoryInterface* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webkit/gen_qwebinspector.cpp b/qt/webkit/gen_qwebinspector.cpp new file mode 100644 index 00000000..f87f5945 --- /dev/null +++ b/qt/webkit/gen_qwebinspector.cpp @@ -0,0 +1,1465 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#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_qwebinspector.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebInspector : public virtual QWebInspector { +public: + + MiqtVirtualQWebInspector(QWidget* parent): QWebInspector(parent) {}; + MiqtVirtualQWebInspector(): QWebInspector() {}; + + virtual ~MiqtVirtualQWebInspector() = 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 QWebInspector::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWebInspector_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QWebInspector::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QWebInspector::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QWebInspector_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QWebInspector::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__ResizeEvent == 0) { + QWebInspector::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* event) { + + QWebInspector::resizeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QWebInspector::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QWebInspector::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) { + QWebInspector::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QWebInspector::hideEvent(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) { + QWebInspector::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QWebInspector::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QWebInspector::devType(); + } + + + int callback_return_value = miqt_exec_callback_QWebInspector_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QWebInspector::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) { + QWebInspector::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QWebInspector_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QWebInspector::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QWebInspector::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWebInspector_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QWebInspector::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 QWebInspector::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QWebInspector_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 QWebInspector::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 QWebInspector::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QWebInspector_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QWebInspector::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 QWebInspector::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QWebInspector_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QWebInspector::paintEngine(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* event) override { + if (handle__MousePressEvent == 0) { + QWebInspector::mousePressEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* event) { + + QWebInspector::mousePressEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* event) override { + if (handle__MouseReleaseEvent == 0) { + QWebInspector::mouseReleaseEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* event) { + + QWebInspector::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) { + QWebInspector::mouseDoubleClickEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* event) { + + QWebInspector::mouseDoubleClickEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* event) override { + if (handle__MouseMoveEvent == 0) { + QWebInspector::mouseMoveEvent(event); + return; + } + + QMouseEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* event) { + + QWebInspector::mouseMoveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__WheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* event) override { + if (handle__WheelEvent == 0) { + QWebInspector::wheelEvent(event); + return; + } + + QWheelEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* event) { + + QWebInspector::wheelEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* event) override { + if (handle__KeyPressEvent == 0) { + QWebInspector::keyPressEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* event) { + + QWebInspector::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) { + QWebInspector::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* event) { + + QWebInspector::keyReleaseEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__FocusInEvent == 0) { + QWebInspector::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* event) { + + QWebInspector::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) { + QWebInspector::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* event) { + + QWebInspector::focusOutEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__EnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__EnterEvent == 0) { + QWebInspector::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QWebInspector::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) { + QWebInspector::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QWebInspector::leaveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__PaintEvent == 0) { + QWebInspector::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* event) { + + QWebInspector::paintEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__MoveEvent == 0) { + QWebInspector::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QWebInspector::moveEvent(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) { + QWebInspector::contextMenuEvent(event); + return; + } + + QContextMenuEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* event) { + + QWebInspector::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) { + QWebInspector::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QWebInspector::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) { + QWebInspector::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QWebInspector::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) { + QWebInspector::dragEnterEvent(event); + return; + } + + QDragEnterEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* event) { + + QWebInspector::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) { + QWebInspector::dragMoveEvent(event); + return; + } + + QDragMoveEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* event) { + + QWebInspector::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) { + QWebInspector::dragLeaveEvent(event); + return; + } + + QDragLeaveEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* event) { + + QWebInspector::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) { + QWebInspector::dropEvent(event); + return; + } + + QDropEvent* sigval1 = event; + + miqt_exec_callback_QWebInspector_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* event) { + + QWebInspector::dropEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__NativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__NativeEvent == 0) { + return QWebInspector::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_QWebInspector_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 QWebInspector::nativeEvent(eventType_QByteArray, message, static_cast(result)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QWebInspector::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QWebInspector_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QWebInspector::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__Metric == 0) { + return QWebInspector::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QWebInspector_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 QWebInspector::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) { + QWebInspector::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QWebInspector_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QWebInspector::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 QWebInspector::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QWebInspector_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QWebInspector::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 QWebInspector::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QWebInspector_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QWebInspector::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) { + QWebInspector::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QWebInspector_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QWebInspector::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 QWebInspector::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QWebInspector_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(QWebInspector::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 QWebInspector::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QWebInspector_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QWebInspector::focusNextPrevChild(next); + + } + +}; + +void QWebInspector_new(QWidget* parent, QWebInspector** outptr_QWebInspector, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWebInspector* ret = new MiqtVirtualQWebInspector(parent); + *outptr_QWebInspector = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QWebInspector_new2(QWebInspector** outptr_QWebInspector, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWebInspector* ret = new MiqtVirtualQWebInspector(); + *outptr_QWebInspector = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QWebInspector_MetaObject(const QWebInspector* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebInspector_Metacast(QWebInspector* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebInspector_Tr(const char* s) { + QString _ret = QWebInspector::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebInspector_TrUtf8(const char* s) { + QString _ret = QWebInspector::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebInspector_SetPage(QWebInspector* self, QWebPage* page) { + self->setPage(page); +} + +QWebPage* QWebInspector_Page(const QWebInspector* self) { + return self->page(); +} + +QSize* QWebInspector_SizeHint(const QWebInspector* self) { + return new QSize(self->sizeHint()); +} + +bool QWebInspector_Event(QWebInspector* self, QEvent* param1) { + return self->event(param1); +} + +struct miqt_string QWebInspector_Tr2(const char* s, const char* c) { + QString _ret = QWebInspector::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebInspector_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebInspector::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebInspector_TrUtf82(const char* s, const char* c) { + QString _ret = QWebInspector::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebInspector_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebInspector::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebInspector_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__SizeHint = slot; +} + +QSize* QWebInspector_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQWebInspector*)(self) )->virtualbase_SizeHint(); +} + +void QWebInspector_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__Event = slot; +} + +bool QWebInspector_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_Event(param1); +} + +void QWebInspector_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__ResizeEvent = slot; +} + +void QWebInspector_virtualbase_ResizeEvent(void* self, QResizeEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_ResizeEvent(event); +} + +void QWebInspector_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__ShowEvent = slot; +} + +void QWebInspector_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_ShowEvent(event); +} + +void QWebInspector_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__HideEvent = slot; +} + +void QWebInspector_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_HideEvent(event); +} + +void QWebInspector_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__CloseEvent = slot; +} + +void QWebInspector_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_CloseEvent(event); +} + +void QWebInspector_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__DevType = slot; +} + +int QWebInspector_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQWebInspector*)(self) )->virtualbase_DevType(); +} + +void QWebInspector_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__SetVisible = slot; +} + +void QWebInspector_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_SetVisible(visible); +} + +void QWebInspector_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QWebInspector_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQWebInspector*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QWebInspector_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__HeightForWidth = slot; +} + +int QWebInspector_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQWebInspector*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QWebInspector_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QWebInspector_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQWebInspector*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QWebInspector_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QWebInspector_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQWebInspector*)(self) )->virtualbase_PaintEngine(); +} + +void QWebInspector_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__MousePressEvent = slot; +} + +void QWebInspector_virtualbase_MousePressEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_MousePressEvent(event); +} + +void QWebInspector_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QWebInspector_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_MouseReleaseEvent(event); +} + +void QWebInspector_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QWebInspector_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_MouseDoubleClickEvent(event); +} + +void QWebInspector_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__MouseMoveEvent = slot; +} + +void QWebInspector_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_MouseMoveEvent(event); +} + +void QWebInspector_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__WheelEvent = slot; +} + +void QWebInspector_virtualbase_WheelEvent(void* self, QWheelEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_WheelEvent(event); +} + +void QWebInspector_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__KeyPressEvent = slot; +} + +void QWebInspector_virtualbase_KeyPressEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_KeyPressEvent(event); +} + +void QWebInspector_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QWebInspector_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_KeyReleaseEvent(event); +} + +void QWebInspector_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__FocusInEvent = slot; +} + +void QWebInspector_virtualbase_FocusInEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_FocusInEvent(event); +} + +void QWebInspector_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__FocusOutEvent = slot; +} + +void QWebInspector_virtualbase_FocusOutEvent(void* self, QFocusEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_FocusOutEvent(event); +} + +void QWebInspector_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__EnterEvent = slot; +} + +void QWebInspector_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_EnterEvent(event); +} + +void QWebInspector_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__LeaveEvent = slot; +} + +void QWebInspector_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_LeaveEvent(event); +} + +void QWebInspector_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__PaintEvent = slot; +} + +void QWebInspector_virtualbase_PaintEvent(void* self, QPaintEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_PaintEvent(event); +} + +void QWebInspector_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__MoveEvent = slot; +} + +void QWebInspector_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_MoveEvent(event); +} + +void QWebInspector_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__ContextMenuEvent = slot; +} + +void QWebInspector_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_ContextMenuEvent(event); +} + +void QWebInspector_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__TabletEvent = slot; +} + +void QWebInspector_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_TabletEvent(event); +} + +void QWebInspector_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__ActionEvent = slot; +} + +void QWebInspector_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_ActionEvent(event); +} + +void QWebInspector_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__DragEnterEvent = slot; +} + +void QWebInspector_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_DragEnterEvent(event); +} + +void QWebInspector_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__DragMoveEvent = slot; +} + +void QWebInspector_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_DragMoveEvent(event); +} + +void QWebInspector_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__DragLeaveEvent = slot; +} + +void QWebInspector_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_DragLeaveEvent(event); +} + +void QWebInspector_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__DropEvent = slot; +} + +void QWebInspector_virtualbase_DropEvent(void* self, QDropEvent* event) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_DropEvent(event); +} + +void QWebInspector_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__NativeEvent = slot; +} + +bool QWebInspector_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QWebInspector_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__ChangeEvent = slot; +} + +void QWebInspector_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QWebInspector_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__Metric = slot; +} + +int QWebInspector_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQWebInspector*)(self) )->virtualbase_Metric(param1); +} + +void QWebInspector_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__InitPainter = slot; +} + +void QWebInspector_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQWebInspector*)(self) )->virtualbase_InitPainter(painter); +} + +void QWebInspector_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QWebInspector_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQWebInspector*)(self) )->virtualbase_Redirected(offset); +} + +void QWebInspector_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QWebInspector_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQWebInspector*)(self) )->virtualbase_SharedPainter(); +} + +void QWebInspector_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__InputMethodEvent = slot; +} + +void QWebInspector_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QWebInspector_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QWebInspector_virtualbase_InputMethodQuery(const void* self, int param1) { + return ( (const MiqtVirtualQWebInspector*)(self) )->virtualbase_InputMethodQuery(param1); +} + +void QWebInspector_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QWebInspector*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QWebInspector_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQWebInspector*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QWebInspector_Delete(QWebInspector* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webkit/gen_qwebinspector.go b/qt/webkit/gen_qwebinspector.go new file mode 100644 index 00000000..070642f9 --- /dev/null +++ b/qt/webkit/gen_qwebinspector.go @@ -0,0 +1,1152 @@ +package webkit + +/* + +#include "gen_qwebinspector.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebInspector struct { + h *C.QWebInspector + isSubclass bool + *qt.QWidget +} + +func (this *QWebInspector) cPointer() *C.QWebInspector { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebInspector) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebInspector constructs the type using only CGO pointers. +func newQWebInspector(h *C.QWebInspector, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWebInspector { + if h == nil { + return nil + } + return &QWebInspector{h: h, + QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} +} + +// UnsafeNewQWebInspector constructs the type using only unsafe pointers. +func UnsafeNewQWebInspector(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWebInspector { + if h == nil { + return nil + } + + return &QWebInspector{h: (*C.QWebInspector)(h), + QWidget: qt.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +} + +// NewQWebInspector constructs a new QWebInspector object. +func NewQWebInspector(parent *qt.QWidget) *QWebInspector { + var outptr_QWebInspector *C.QWebInspector = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWebInspector_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QWebInspector, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWebInspector(outptr_QWebInspector, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQWebInspector2 constructs a new QWebInspector object. +func NewQWebInspector2() *QWebInspector { + var outptr_QWebInspector *C.QWebInspector = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWebInspector_new2(&outptr_QWebInspector, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWebInspector(outptr_QWebInspector, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +func (this *QWebInspector) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebInspector_MetaObject(this.h))) +} + +func (this *QWebInspector) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebInspector_Metacast(this.h, param1_Cstring)) +} + +func QWebInspector_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebInspector_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebInspector_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebInspector_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebInspector) SetPage(page *QWebPage) { + C.QWebInspector_SetPage(this.h, page.cPointer()) +} + +func (this *QWebInspector) Page() *QWebPage { + return UnsafeNewQWebPage(unsafe.Pointer(C.QWebInspector_Page(this.h)), nil) +} + +func (this *QWebInspector) SizeHint() *qt.QSize { + _ret := C.QWebInspector_SizeHint(this.h) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebInspector) Event(param1 *qt.QEvent) bool { + return (bool)(C.QWebInspector_Event(this.h, (*C.QEvent)(param1.UnsafePointer()))) +} + +func QWebInspector_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebInspector_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebInspector_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebInspector_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebInspector_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebInspector_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebInspector_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebInspector_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebInspector) callVirtualBase_SizeHint() *qt.QSize { + + _ret := C.QWebInspector_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWebInspector) OnSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QWebInspector_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_SizeHint +func miqt_exec_callback_QWebInspector_SizeHint(self *C.QWebInspector, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebInspector{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebInspector) callVirtualBase_Event(param1 *qt.QEvent) bool { + + return (bool)(C.QWebInspector_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QWebInspector) OnEvent(slot func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) { + C.QWebInspector_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_Event +func miqt_exec_callback_QWebInspector_Event(self *C.QWebInspector, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QWebInspector{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebInspector) callVirtualBase_ResizeEvent(event *qt.QResizeEvent) { + + C.QWebInspector_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnResizeEvent(slot func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) { + C.QWebInspector_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_ResizeEvent +func miqt_exec_callback_QWebInspector_ResizeEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_ShowEvent(event *qt.QShowEvent) { + + C.QWebInspector_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnShowEvent(slot func(super func(event *qt.QShowEvent), event *qt.QShowEvent)) { + C.QWebInspector_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_ShowEvent +func miqt_exec_callback_QWebInspector_ShowEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QShowEvent), event *qt.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_HideEvent(event *qt.QHideEvent) { + + C.QWebInspector_virtualbase_HideEvent(unsafe.Pointer(this.h), (*C.QHideEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnHideEvent(slot func(super func(event *qt.QHideEvent), event *qt.QHideEvent)) { + C.QWebInspector_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_HideEvent +func miqt_exec_callback_QWebInspector_HideEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QHideEvent), event *qt.QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_CloseEvent(event *qt.QCloseEvent) { + + C.QWebInspector_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnCloseEvent(slot func(super func(event *qt.QCloseEvent), event *qt.QCloseEvent)) { + C.QWebInspector_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_CloseEvent +func miqt_exec_callback_QWebInspector_CloseEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QCloseEvent), event *qt.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_DevType() int { + + return (int)(C.QWebInspector_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QWebInspector) OnDevType(slot func(super func() int) int) { + C.QWebInspector_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_DevType +func miqt_exec_callback_QWebInspector_DevType(self *C.QWebInspector, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebInspector{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QWebInspector) callVirtualBase_SetVisible(visible bool) { + + C.QWebInspector_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QWebInspector) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QWebInspector_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_SetVisible +func miqt_exec_callback_QWebInspector_SetVisible(self *C.QWebInspector, 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((&QWebInspector{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_MinimumSizeHint() *qt.QSize { + + _ret := C.QWebInspector_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWebInspector) OnMinimumSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QWebInspector_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_MinimumSizeHint +func miqt_exec_callback_QWebInspector_MinimumSizeHint(self *C.QWebInspector, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebInspector{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebInspector) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QWebInspector_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWebInspector) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QWebInspector_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_HeightForWidth +func miqt_exec_callback_QWebInspector_HeightForWidth(self *C.QWebInspector, 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((&QWebInspector{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWebInspector) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QWebInspector_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QWebInspector) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QWebInspector_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_HasHeightForWidth +func miqt_exec_callback_QWebInspector_HasHeightForWidth(self *C.QWebInspector, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebInspector{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebInspector) callVirtualBase_PaintEngine() *qt.QPaintEngine { + + return qt.UnsafeNewQPaintEngine(unsafe.Pointer(C.QWebInspector_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QWebInspector) OnPaintEngine(slot func(super func() *qt.QPaintEngine) *qt.QPaintEngine) { + C.QWebInspector_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_PaintEngine +func miqt_exec_callback_QWebInspector_PaintEngine(self *C.QWebInspector, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPaintEngine) *qt.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebInspector{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebInspector) callVirtualBase_MousePressEvent(event *qt.QMouseEvent) { + + C.QWebInspector_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnMousePressEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QWebInspector_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_MousePressEvent +func miqt_exec_callback_QWebInspector_MousePressEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_MouseReleaseEvent(event *qt.QMouseEvent) { + + C.QWebInspector_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnMouseReleaseEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QWebInspector_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_MouseReleaseEvent +func miqt_exec_callback_QWebInspector_MouseReleaseEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_MouseDoubleClickEvent(event *qt.QMouseEvent) { + + C.QWebInspector_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnMouseDoubleClickEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QWebInspector_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_MouseDoubleClickEvent +func miqt_exec_callback_QWebInspector_MouseDoubleClickEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_MouseMoveEvent(event *qt.QMouseEvent) { + + C.QWebInspector_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnMouseMoveEvent(slot func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) { + C.QWebInspector_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_MouseMoveEvent +func miqt_exec_callback_QWebInspector_MouseMoveEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMouseEvent), event *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_WheelEvent(event *qt.QWheelEvent) { + + C.QWebInspector_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnWheelEvent(slot func(super func(event *qt.QWheelEvent), event *qt.QWheelEvent)) { + C.QWebInspector_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_WheelEvent +func miqt_exec_callback_QWebInspector_WheelEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QWheelEvent), event *qt.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_KeyPressEvent(event *qt.QKeyEvent) { + + C.QWebInspector_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnKeyPressEvent(slot func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) { + C.QWebInspector_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_KeyPressEvent +func miqt_exec_callback_QWebInspector_KeyPressEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_KeyReleaseEvent(event *qt.QKeyEvent) { + + C.QWebInspector_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnKeyReleaseEvent(slot func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) { + C.QWebInspector_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_KeyReleaseEvent +func miqt_exec_callback_QWebInspector_KeyReleaseEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_FocusInEvent(event *qt.QFocusEvent) { + + C.QWebInspector_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnFocusInEvent(slot func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) { + C.QWebInspector_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_FocusInEvent +func miqt_exec_callback_QWebInspector_FocusInEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_FocusOutEvent(event *qt.QFocusEvent) { + + C.QWebInspector_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnFocusOutEvent(slot func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) { + C.QWebInspector_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_FocusOutEvent +func miqt_exec_callback_QWebInspector_FocusOutEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_EnterEvent(event *qt.QEvent) { + + C.QWebInspector_virtualbase_EnterEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnEnterEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QWebInspector_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_EnterEvent +func miqt_exec_callback_QWebInspector_EnterEvent(self *C.QWebInspector, 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((&QWebInspector{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_LeaveEvent(event *qt.QEvent) { + + C.QWebInspector_virtualbase_LeaveEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnLeaveEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QWebInspector_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_LeaveEvent +func miqt_exec_callback_QWebInspector_LeaveEvent(self *C.QWebInspector, 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((&QWebInspector{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_PaintEvent(event *qt.QPaintEvent) { + + C.QWebInspector_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnPaintEvent(slot func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) { + C.QWebInspector_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_PaintEvent +func miqt_exec_callback_QWebInspector_PaintEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_MoveEvent(event *qt.QMoveEvent) { + + C.QWebInspector_virtualbase_MoveEvent(unsafe.Pointer(this.h), (*C.QMoveEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnMoveEvent(slot func(super func(event *qt.QMoveEvent), event *qt.QMoveEvent)) { + C.QWebInspector_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_MoveEvent +func miqt_exec_callback_QWebInspector_MoveEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMoveEvent), event *qt.QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_ContextMenuEvent(event *qt.QContextMenuEvent) { + + C.QWebInspector_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnContextMenuEvent(slot func(super func(event *qt.QContextMenuEvent), event *qt.QContextMenuEvent)) { + C.QWebInspector_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_ContextMenuEvent +func miqt_exec_callback_QWebInspector_ContextMenuEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QContextMenuEvent), event *qt.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_TabletEvent(event *qt.QTabletEvent) { + + C.QWebInspector_virtualbase_TabletEvent(unsafe.Pointer(this.h), (*C.QTabletEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnTabletEvent(slot func(super func(event *qt.QTabletEvent), event *qt.QTabletEvent)) { + C.QWebInspector_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_TabletEvent +func miqt_exec_callback_QWebInspector_TabletEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTabletEvent), event *qt.QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_ActionEvent(event *qt.QActionEvent) { + + C.QWebInspector_virtualbase_ActionEvent(unsafe.Pointer(this.h), (*C.QActionEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnActionEvent(slot func(super func(event *qt.QActionEvent), event *qt.QActionEvent)) { + C.QWebInspector_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_ActionEvent +func miqt_exec_callback_QWebInspector_ActionEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QActionEvent), event *qt.QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_DragEnterEvent(event *qt.QDragEnterEvent) { + + C.QWebInspector_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnDragEnterEvent(slot func(super func(event *qt.QDragEnterEvent), event *qt.QDragEnterEvent)) { + C.QWebInspector_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_DragEnterEvent +func miqt_exec_callback_QWebInspector_DragEnterEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragEnterEvent), event *qt.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_DragMoveEvent(event *qt.QDragMoveEvent) { + + C.QWebInspector_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnDragMoveEvent(slot func(super func(event *qt.QDragMoveEvent), event *qt.QDragMoveEvent)) { + C.QWebInspector_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_DragMoveEvent +func miqt_exec_callback_QWebInspector_DragMoveEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragMoveEvent), event *qt.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_DragLeaveEvent(event *qt.QDragLeaveEvent) { + + C.QWebInspector_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnDragLeaveEvent(slot func(super func(event *qt.QDragLeaveEvent), event *qt.QDragLeaveEvent)) { + C.QWebInspector_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_DragLeaveEvent +func miqt_exec_callback_QWebInspector_DragLeaveEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDragLeaveEvent), event *qt.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_DropEvent(event *qt.QDropEvent) { + + C.QWebInspector_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(event.UnsafePointer())) + +} +func (this *QWebInspector) OnDropEvent(slot func(super func(event *qt.QDropEvent), event *qt.QDropEvent)) { + C.QWebInspector_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_DropEvent +func miqt_exec_callback_QWebInspector_DropEvent(self *C.QWebInspector, cb C.intptr_t, event *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QDropEvent), event *qt.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QWebInspector) 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.QWebInspector_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QWebInspector) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QWebInspector_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_NativeEvent +func miqt_exec_callback_QWebInspector_NativeEvent(self *C.QWebInspector, 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((&QWebInspector{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebInspector) callVirtualBase_ChangeEvent(param1 *qt.QEvent) { + + C.QWebInspector_virtualbase_ChangeEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer())) + +} +func (this *QWebInspector) OnChangeEvent(slot func(super func(param1 *qt.QEvent), param1 *qt.QEvent)) { + C.QWebInspector_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_ChangeEvent +func miqt_exec_callback_QWebInspector_ChangeEvent(self *C.QWebInspector, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent), param1 *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QWebInspector{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_Metric(param1 qt.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QWebInspector_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWebInspector) OnMetric(slot func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) { + C.QWebInspector_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_Metric +func miqt_exec_callback_QWebInspector_Metric(self *C.QWebInspector, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QWebInspector{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWebInspector) callVirtualBase_InitPainter(painter *qt.QPainter) { + + C.QWebInspector_virtualbase_InitPainter(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer())) + +} +func (this *QWebInspector) OnInitPainter(slot func(super func(painter *qt.QPainter), painter *qt.QPainter)) { + C.QWebInspector_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_InitPainter +func miqt_exec_callback_QWebInspector_InitPainter(self *C.QWebInspector, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt.QPainter), painter *qt.QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QWebInspector{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_Redirected(offset *qt.QPoint) *qt.QPaintDevice { + + return qt.UnsafeNewQPaintDevice(unsafe.Pointer(C.QWebInspector_virtualbase_Redirected(unsafe.Pointer(this.h), (*C.QPoint)(offset.UnsafePointer())))) +} +func (this *QWebInspector) OnRedirected(slot func(super func(offset *qt.QPoint) *qt.QPaintDevice, offset *qt.QPoint) *qt.QPaintDevice) { + C.QWebInspector_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_Redirected +func miqt_exec_callback_QWebInspector_Redirected(self *C.QWebInspector, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *qt.QPoint) *qt.QPaintDevice, offset *qt.QPoint) *qt.QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QWebInspector{h: self}).callVirtualBase_Redirected, slotval1) + + return (*C.QPaintDevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebInspector) callVirtualBase_SharedPainter() *qt.QPainter { + + return qt.UnsafeNewQPainter(unsafe.Pointer(C.QWebInspector_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QWebInspector) OnSharedPainter(slot func(super func() *qt.QPainter) *qt.QPainter) { + C.QWebInspector_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_SharedPainter +func miqt_exec_callback_QWebInspector_SharedPainter(self *C.QWebInspector, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPainter) *qt.QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebInspector{h: self}).callVirtualBase_SharedPainter) + + return (*C.QPainter)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebInspector) callVirtualBase_InputMethodEvent(param1 *qt.QInputMethodEvent) { + + C.QWebInspector_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(param1.UnsafePointer())) + +} +func (this *QWebInspector) OnInputMethodEvent(slot func(super func(param1 *qt.QInputMethodEvent), param1 *qt.QInputMethodEvent)) { + C.QWebInspector_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_InputMethodEvent +func miqt_exec_callback_QWebInspector_InputMethodEvent(self *C.QWebInspector, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QInputMethodEvent), param1 *qt.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWebInspector{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QWebInspector) callVirtualBase_InputMethodQuery(param1 qt.InputMethodQuery) *qt.QVariant { + + _ret := C.QWebInspector_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWebInspector) OnInputMethodQuery(slot func(super func(param1 qt.InputMethodQuery) *qt.QVariant, param1 qt.InputMethodQuery) *qt.QVariant) { + C.QWebInspector_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_InputMethodQuery +func miqt_exec_callback_QWebInspector_InputMethodQuery(self *C.QWebInspector, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt.InputMethodQuery) *qt.QVariant, param1 qt.InputMethodQuery) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.InputMethodQuery)(param1) + + virtualReturn := gofunc((&QWebInspector{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebInspector) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QWebInspector_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QWebInspector) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QWebInspector_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebInspector_FocusNextPrevChild +func miqt_exec_callback_QWebInspector_FocusNextPrevChild(self *C.QWebInspector, 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((&QWebInspector{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +// Delete this object from C++ memory. +func (this *QWebInspector) Delete() { + C.QWebInspector_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 *QWebInspector) GoGC() { + runtime.SetFinalizer(this, func(this *QWebInspector) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webkit/gen_qwebinspector.h b/qt/webkit/gen_qwebinspector.h new file mode 100644 index 00000000..a4a13c0e --- /dev/null +++ b/qt/webkit/gen_qwebinspector.h @@ -0,0 +1,187 @@ +#pragma once +#ifndef MIQT_QT_WEBKIT_GEN_QWEBINSPECTOR_H +#define MIQT_QT_WEBKIT_GEN_QWEBINSPECTOR_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QActionEvent; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; +class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QResizeEvent; +class QShowEvent; +class QSize; +class QTabletEvent; +class QVariant; +class QWebInspector; +class QWebPage; +class QWheelEvent; +class QWidget; +#else +typedef struct QActionEvent QActionEvent; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; +typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QVariant QVariant; +typedef struct QWebInspector QWebInspector; +typedef struct QWebPage QWebPage; +typedef struct QWheelEvent QWheelEvent; +typedef struct QWidget QWidget; +#endif + +void QWebInspector_new(QWidget* parent, QWebInspector** outptr_QWebInspector, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWebInspector_new2(QWebInspector** outptr_QWebInspector, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMetaObject* QWebInspector_MetaObject(const QWebInspector* self); +void* QWebInspector_Metacast(QWebInspector* self, const char* param1); +struct miqt_string QWebInspector_Tr(const char* s); +struct miqt_string QWebInspector_TrUtf8(const char* s); +void QWebInspector_SetPage(QWebInspector* self, QWebPage* page); +QWebPage* QWebInspector_Page(const QWebInspector* self); +QSize* QWebInspector_SizeHint(const QWebInspector* self); +bool QWebInspector_Event(QWebInspector* self, QEvent* param1); +void QWebInspector_ResizeEvent(QWebInspector* self, QResizeEvent* event); +void QWebInspector_ShowEvent(QWebInspector* self, QShowEvent* event); +void QWebInspector_HideEvent(QWebInspector* self, QHideEvent* event); +void QWebInspector_CloseEvent(QWebInspector* self, QCloseEvent* event); +struct miqt_string QWebInspector_Tr2(const char* s, const char* c); +struct miqt_string QWebInspector_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebInspector_TrUtf82(const char* s, const char* c); +struct miqt_string QWebInspector_TrUtf83(const char* s, const char* c, int n); +void QWebInspector_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QWebInspector_virtualbase_SizeHint(const void* self); +void QWebInspector_override_virtual_Event(void* self, intptr_t slot); +bool QWebInspector_virtualbase_Event(void* self, QEvent* param1); +void QWebInspector_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_ResizeEvent(void* self, QResizeEvent* event); +void QWebInspector_override_virtual_ShowEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QWebInspector_override_virtual_HideEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_HideEvent(void* self, QHideEvent* event); +void QWebInspector_override_virtual_CloseEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QWebInspector_override_virtual_DevType(void* self, intptr_t slot); +int QWebInspector_virtualbase_DevType(const void* self); +void QWebInspector_override_virtual_SetVisible(void* self, intptr_t slot); +void QWebInspector_virtualbase_SetVisible(void* self, bool visible); +void QWebInspector_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QWebInspector_virtualbase_MinimumSizeHint(const void* self); +void QWebInspector_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QWebInspector_virtualbase_HeightForWidth(const void* self, int param1); +void QWebInspector_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QWebInspector_virtualbase_HasHeightForWidth(const void* self); +void QWebInspector_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QWebInspector_virtualbase_PaintEngine(const void* self); +void QWebInspector_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_MousePressEvent(void* self, QMouseEvent* event); +void QWebInspector_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* event); +void QWebInspector_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* event); +void QWebInspector_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_MouseMoveEvent(void* self, QMouseEvent* event); +void QWebInspector_override_virtual_WheelEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_WheelEvent(void* self, QWheelEvent* event); +void QWebInspector_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_KeyPressEvent(void* self, QKeyEvent* event); +void QWebInspector_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* event); +void QWebInspector_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_FocusInEvent(void* self, QFocusEvent* event); +void QWebInspector_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_FocusOutEvent(void* self, QFocusEvent* event); +void QWebInspector_override_virtual_EnterEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_EnterEvent(void* self, QEvent* event); +void QWebInspector_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_LeaveEvent(void* self, QEvent* event); +void QWebInspector_override_virtual_PaintEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_PaintEvent(void* self, QPaintEvent* event); +void QWebInspector_override_virtual_MoveEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QWebInspector_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* event); +void QWebInspector_override_virtual_TabletEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QWebInspector_override_virtual_ActionEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QWebInspector_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* event); +void QWebInspector_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* event); +void QWebInspector_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* event); +void QWebInspector_override_virtual_DropEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_DropEvent(void* self, QDropEvent* event); +void QWebInspector_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QWebInspector_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QWebInspector_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QWebInspector_override_virtual_Metric(void* self, intptr_t slot); +int QWebInspector_virtualbase_Metric(const void* self, int param1); +void QWebInspector_override_virtual_InitPainter(void* self, intptr_t slot); +void QWebInspector_virtualbase_InitPainter(const void* self, QPainter* painter); +void QWebInspector_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QWebInspector_virtualbase_Redirected(const void* self, QPoint* offset); +void QWebInspector_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QWebInspector_virtualbase_SharedPainter(const void* self); +void QWebInspector_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QWebInspector_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QWebInspector_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QWebInspector_virtualbase_InputMethodQuery(const void* self, int param1); +void QWebInspector_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QWebInspector_virtualbase_FocusNextPrevChild(void* self, bool next); +void QWebInspector_Delete(QWebInspector* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webkit/gen_qwebkitplatformplugin.cpp b/qt/webkit/gen_qwebkitplatformplugin.cpp new file mode 100644 index 00000000..9a5105f9 --- /dev/null +++ b/qt/webkit/gen_qwebkitplatformplugin.cpp @@ -0,0 +1,722 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define WORKAROUND_INNER_CLASS_DEFINITION_QWebSpellChecker__GrammarDetail +#include +#include +#include "gen_qwebkitplatformplugin.h" +#include "_cgo_export.h" + +int QWebSelectData_ItemType(const QWebSelectData* self, int param1) { + QWebSelectData::ItemType _ret = self->itemType(static_cast(param1)); + return static_cast(_ret); +} + +struct miqt_string QWebSelectData_ItemText(const QWebSelectData* self, int index) { + QString _ret = self->itemText(static_cast(index)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebSelectData_ItemToolTip(const QWebSelectData* self, int index) { + QString _ret = self->itemToolTip(static_cast(index)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QWebSelectData_ItemIsEnabled(const QWebSelectData* self, int index) { + return self->itemIsEnabled(static_cast(index)); +} + +bool QWebSelectData_ItemIsSelected(const QWebSelectData* self, int index) { + return self->itemIsSelected(static_cast(index)); +} + +int QWebSelectData_ItemCount(const QWebSelectData* self) { + return self->itemCount(); +} + +bool QWebSelectData_Multiple(const QWebSelectData* self) { + return self->multiple(); +} + +QColor* QWebSelectData_BackgroundColor(const QWebSelectData* self) { + return new QColor(self->backgroundColor()); +} + +QColor* QWebSelectData_ForegroundColor(const QWebSelectData* self) { + return new QColor(self->foregroundColor()); +} + +QColor* QWebSelectData_ItemBackgroundColor(const QWebSelectData* self, int index) { + return new QColor(self->itemBackgroundColor(static_cast(index))); +} + +QColor* QWebSelectData_ItemForegroundColor(const QWebSelectData* self, int index) { + return new QColor(self->itemForegroundColor(static_cast(index))); +} + +void QWebSelectData_OperatorAssign(QWebSelectData* self, QWebSelectData* param1) { + self->operator=(*param1); +} + +void QWebSelectData_Delete(QWebSelectData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +QMetaObject* QWebSelectMethod_MetaObject(const QWebSelectMethod* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebSelectMethod_Metacast(QWebSelectMethod* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebSelectMethod_Tr(const char* s) { + QString _ret = QWebSelectMethod::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebSelectMethod_TrUtf8(const char* s) { + QString _ret = QWebSelectMethod::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebSelectMethod_Show(QWebSelectMethod* self, QWebSelectData* param1) { + self->show(*param1); +} + +void QWebSelectMethod_Hide(QWebSelectMethod* self) { + self->hide(); +} + +void QWebSelectMethod_SetGeometry(QWebSelectMethod* self, QRect* geometry) { + self->setGeometry(*geometry); +} + +void QWebSelectMethod_SetFont(QWebSelectMethod* self, QFont* font) { + self->setFont(*font); +} + +void QWebSelectMethod_SelectItem(QWebSelectMethod* self, int index, bool allowMultiplySelections, bool shift) { + self->selectItem(static_cast(index), allowMultiplySelections, shift); +} + +void QWebSelectMethod_connect_SelectItem(QWebSelectMethod* self, intptr_t slot) { + QWebSelectMethod::connect(self, static_cast(&QWebSelectMethod::selectItem), self, [=](int index, bool allowMultiplySelections, bool shift) { + int sigval1 = index; + bool sigval2 = allowMultiplySelections; + bool sigval3 = shift; + miqt_exec_callback_QWebSelectMethod_SelectItem(slot, sigval1, sigval2, sigval3); + }); +} + +void QWebSelectMethod_DidHide(QWebSelectMethod* self) { + self->didHide(); +} + +void QWebSelectMethod_connect_DidHide(QWebSelectMethod* self, intptr_t slot) { + QWebSelectMethod::connect(self, static_cast(&QWebSelectMethod::didHide), self, [=]() { + miqt_exec_callback_QWebSelectMethod_DidHide(slot); + }); +} + +struct miqt_string QWebSelectMethod_Tr2(const char* s, const char* c) { + QString _ret = QWebSelectMethod::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebSelectMethod_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebSelectMethod::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebSelectMethod_TrUtf82(const char* s, const char* c) { + QString _ret = QWebSelectMethod::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebSelectMethod_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebSelectMethod::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebSelectMethod_Delete(QWebSelectMethod* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +struct miqt_string QWebNotificationData_Title(const QWebNotificationData* self) { + const QString _ret = self->title(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebNotificationData_Message(const QWebNotificationData* self) { + const QString _ret = self->message(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QUrl* QWebNotificationData_IconUrl(const QWebNotificationData* self) { + return new QUrl(self->iconUrl()); +} + +QUrl* QWebNotificationData_OpenerPageUrl(const QWebNotificationData* self) { + return new QUrl(self->openerPageUrl()); +} + +void QWebNotificationData_OperatorAssign(QWebNotificationData* self, QWebNotificationData* param1) { + self->operator=(*param1); +} + +void QWebNotificationData_Delete(QWebNotificationData* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +QMetaObject* QWebNotificationPresenter_MetaObject(const QWebNotificationPresenter* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebNotificationPresenter_Metacast(QWebNotificationPresenter* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebNotificationPresenter_Tr(const char* s) { + QString _ret = QWebNotificationPresenter::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebNotificationPresenter_TrUtf8(const char* s) { + QString _ret = QWebNotificationPresenter::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebNotificationPresenter_ShowNotification(QWebNotificationPresenter* self, QWebNotificationData* param1) { + self->showNotification(param1); +} + +void QWebNotificationPresenter_NotificationClosed(QWebNotificationPresenter* self) { + self->notificationClosed(); +} + +void QWebNotificationPresenter_connect_NotificationClosed(QWebNotificationPresenter* self, intptr_t slot) { + QWebNotificationPresenter::connect(self, static_cast(&QWebNotificationPresenter::notificationClosed), self, [=]() { + miqt_exec_callback_QWebNotificationPresenter_NotificationClosed(slot); + }); +} + +void QWebNotificationPresenter_NotificationClicked(QWebNotificationPresenter* self) { + self->notificationClicked(); +} + +void QWebNotificationPresenter_connect_NotificationClicked(QWebNotificationPresenter* self, intptr_t slot) { + QWebNotificationPresenter::connect(self, static_cast(&QWebNotificationPresenter::notificationClicked), self, [=]() { + miqt_exec_callback_QWebNotificationPresenter_NotificationClicked(slot); + }); +} + +struct miqt_string QWebNotificationPresenter_Tr2(const char* s, const char* c) { + QString _ret = QWebNotificationPresenter::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebNotificationPresenter_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebNotificationPresenter::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebNotificationPresenter_TrUtf82(const char* s, const char* c) { + QString _ret = QWebNotificationPresenter::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebNotificationPresenter_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebNotificationPresenter::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebNotificationPresenter_Delete(QWebNotificationPresenter* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +QMetaObject* QWebHapticFeedbackPlayer_MetaObject(const QWebHapticFeedbackPlayer* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebHapticFeedbackPlayer_Metacast(QWebHapticFeedbackPlayer* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebHapticFeedbackPlayer_Tr(const char* s) { + QString _ret = QWebHapticFeedbackPlayer::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebHapticFeedbackPlayer_TrUtf8(const char* s) { + QString _ret = QWebHapticFeedbackPlayer::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebHapticFeedbackPlayer_PlayHapticFeedback(QWebHapticFeedbackPlayer* self, int param1, struct miqt_string hapticType, int param3) { + QString hapticType_QString = QString::fromUtf8(hapticType.data, hapticType.len); + self->playHapticFeedback(static_cast(param1), hapticType_QString, static_cast(param3)); +} + +struct miqt_string QWebHapticFeedbackPlayer_Tr2(const char* s, const char* c) { + QString _ret = QWebHapticFeedbackPlayer::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebHapticFeedbackPlayer_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebHapticFeedbackPlayer::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebHapticFeedbackPlayer_TrUtf82(const char* s, const char* c) { + QString _ret = QWebHapticFeedbackPlayer::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebHapticFeedbackPlayer_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebHapticFeedbackPlayer::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebHapticFeedbackPlayer_Delete(QWebHapticFeedbackPlayer* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +QMetaObject* QWebTouchModifier_MetaObject(const QWebTouchModifier* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebTouchModifier_Metacast(QWebTouchModifier* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebTouchModifier_Tr(const char* s) { + QString _ret = QWebTouchModifier::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebTouchModifier_TrUtf8(const char* s) { + QString _ret = QWebTouchModifier::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +unsigned int QWebTouchModifier_HitTestPaddingForTouch(const QWebTouchModifier* self, int param1) { + return self->hitTestPaddingForTouch(static_cast(param1)); +} + +struct miqt_string QWebTouchModifier_Tr2(const char* s, const char* c) { + QString _ret = QWebTouchModifier::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebTouchModifier_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebTouchModifier::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebTouchModifier_TrUtf82(const char* s, const char* c) { + QString _ret = QWebTouchModifier::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebTouchModifier_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebTouchModifier::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebTouchModifier_Delete(QWebTouchModifier* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +QMetaObject* QWebSpellChecker_MetaObject(const QWebSpellChecker* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebSpellChecker_Metacast(QWebSpellChecker* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebSpellChecker_Tr(const char* s) { + QString _ret = QWebSpellChecker::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebSpellChecker_TrUtf8(const char* s) { + QString _ret = QWebSpellChecker::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QWebSpellChecker_IsContinousSpellCheckingEnabled(const QWebSpellChecker* self) { + return self->isContinousSpellCheckingEnabled(); +} + +void QWebSpellChecker_ToggleContinousSpellChecking(QWebSpellChecker* self) { + self->toggleContinousSpellChecking(); +} + +void QWebSpellChecker_LearnWord(QWebSpellChecker* self, struct miqt_string word) { + QString word_QString = QString::fromUtf8(word.data, word.len); + self->learnWord(word_QString); +} + +void QWebSpellChecker_IgnoreWordInSpellDocument(QWebSpellChecker* self, struct miqt_string word) { + QString word_QString = QString::fromUtf8(word.data, word.len); + self->ignoreWordInSpellDocument(word_QString); +} + +void QWebSpellChecker_CheckSpellingOfString(QWebSpellChecker* self, struct miqt_string word, int* misspellingLocation, int* misspellingLength) { + QString word_QString = QString::fromUtf8(word.data, word.len); + self->checkSpellingOfString(word_QString, static_cast(misspellingLocation), static_cast(misspellingLength)); +} + +struct miqt_string QWebSpellChecker_AutoCorrectSuggestionForMisspelledWord(QWebSpellChecker* self, struct miqt_string word) { + QString word_QString = QString::fromUtf8(word.data, word.len); + QString _ret = self->autoCorrectSuggestionForMisspelledWord(word_QString); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebSpellChecker_GuessesForWord(QWebSpellChecker* self, struct miqt_string word, struct miqt_string context, struct miqt_array /* of struct miqt_string */ guesses) { + QString word_QString = QString::fromUtf8(word.data, word.len); + QString context_QString = QString::fromUtf8(context.data, context.len); + QStringList guesses_QList; + guesses_QList.reserve(guesses.len); + struct miqt_string* guesses_arr = static_cast(guesses.data); + for(size_t i = 0; i < guesses.len; ++i) { + QString guesses_arr_i_QString = QString::fromUtf8(guesses_arr[i].data, guesses_arr[i].len); + guesses_QList.push_back(guesses_arr_i_QString); + } + self->guessesForWord(word_QString, context_QString, guesses_QList); +} + +bool QWebSpellChecker_IsGrammarCheckingEnabled(QWebSpellChecker* self) { + return self->isGrammarCheckingEnabled(); +} + +void QWebSpellChecker_ToggleGrammarChecking(QWebSpellChecker* self) { + self->toggleGrammarChecking(); +} + +void QWebSpellChecker_CheckGrammarOfString(QWebSpellChecker* self, struct miqt_string param1, struct miqt_array /* of QWebSpellChecker__GrammarDetail* */ param2, int* badGrammarLocation, int* badGrammarLength) { + QString param1_QString = QString::fromUtf8(param1.data, param1.len); + QList param2_QList; + param2_QList.reserve(param2.len); + QWebSpellChecker__GrammarDetail** param2_arr = static_cast(param2.data); + for(size_t i = 0; i < param2.len; ++i) { + param2_QList.push_back(*(param2_arr[i])); + } + self->checkGrammarOfString(param1_QString, param2_QList, static_cast(badGrammarLocation), static_cast(badGrammarLength)); +} + +struct miqt_string QWebSpellChecker_Tr2(const char* s, const char* c) { + QString _ret = QWebSpellChecker::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebSpellChecker_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebSpellChecker::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebSpellChecker_TrUtf82(const char* s, const char* c) { + QString _ret = QWebSpellChecker::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebSpellChecker_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebSpellChecker::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebSpellChecker_Delete(QWebSpellChecker* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +bool QWebKitPlatformPlugin_SupportsExtension(const QWebKitPlatformPlugin* self, int param1) { + return self->supportsExtension(static_cast(param1)); +} + +QObject* QWebKitPlatformPlugin_CreateExtension(const QWebKitPlatformPlugin* self, int param1) { + return self->createExtension(static_cast(param1)); +} + +void QWebKitPlatformPlugin_OperatorAssign(QWebKitPlatformPlugin* self, QWebKitPlatformPlugin* param1) { + self->operator=(*param1); +} + +void QWebKitPlatformPlugin_Delete(QWebKitPlatformPlugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebSpellChecker__GrammarDetail_new(QWebSpellChecker__GrammarDetail* param1, QWebSpellChecker__GrammarDetail** outptr_QWebSpellChecker__GrammarDetail) { + QWebSpellChecker::GrammarDetail* ret = new QWebSpellChecker::GrammarDetail(*param1); + *outptr_QWebSpellChecker__GrammarDetail = ret; +} + +void QWebSpellChecker__GrammarDetail_OperatorAssign(QWebSpellChecker__GrammarDetail* self, QWebSpellChecker__GrammarDetail* param1) { + self->operator=(*param1); +} + +void QWebSpellChecker__GrammarDetail_Delete(QWebSpellChecker__GrammarDetail* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webkit/gen_qwebkitplatformplugin.go b/qt/webkit/gen_qwebkitplatformplugin.go new file mode 100644 index 00000000..1fc69544 --- /dev/null +++ b/qt/webkit/gen_qwebkitplatformplugin.go @@ -0,0 +1,1203 @@ +package webkit + +/* + +#include "gen_qwebkitplatformplugin.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebSelectData__ItemType int + +const ( + QWebSelectData__Option QWebSelectData__ItemType = 0 + QWebSelectData__Group QWebSelectData__ItemType = 1 + QWebSelectData__Separator QWebSelectData__ItemType = 2 +) + +type QWebHapticFeedbackPlayer__HapticStrength int + +const ( + QWebHapticFeedbackPlayer__None QWebHapticFeedbackPlayer__HapticStrength = 0 + QWebHapticFeedbackPlayer__Weak QWebHapticFeedbackPlayer__HapticStrength = 1 + QWebHapticFeedbackPlayer__Medium QWebHapticFeedbackPlayer__HapticStrength = 2 + QWebHapticFeedbackPlayer__Strong QWebHapticFeedbackPlayer__HapticStrength = 3 +) + +type QWebHapticFeedbackPlayer__HapticEvent int + +const ( + QWebHapticFeedbackPlayer__Press QWebHapticFeedbackPlayer__HapticEvent = 0 + QWebHapticFeedbackPlayer__Release QWebHapticFeedbackPlayer__HapticEvent = 1 +) + +type QWebTouchModifier__PaddingDirection int + +const ( + QWebTouchModifier__Up QWebTouchModifier__PaddingDirection = 0 + QWebTouchModifier__Right QWebTouchModifier__PaddingDirection = 1 + QWebTouchModifier__Down QWebTouchModifier__PaddingDirection = 2 + QWebTouchModifier__Left QWebTouchModifier__PaddingDirection = 3 +) + +type QWebKitPlatformPlugin__Extension int + +const ( + QWebKitPlatformPlugin__MultipleSelections QWebKitPlatformPlugin__Extension = 0 + QWebKitPlatformPlugin__Notifications QWebKitPlatformPlugin__Extension = 1 + QWebKitPlatformPlugin__Haptics QWebKitPlatformPlugin__Extension = 2 + QWebKitPlatformPlugin__TouchInteraction QWebKitPlatformPlugin__Extension = 3 + QWebKitPlatformPlugin__FullScreenVideoPlayer QWebKitPlatformPlugin__Extension = 4 + QWebKitPlatformPlugin__SpellChecker QWebKitPlatformPlugin__Extension = 5 +) + +type QWebSelectData struct { + h *C.QWebSelectData + isSubclass bool +} + +func (this *QWebSelectData) cPointer() *C.QWebSelectData { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebSelectData) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebSelectData constructs the type using only CGO pointers. +func newQWebSelectData(h *C.QWebSelectData) *QWebSelectData { + if h == nil { + return nil + } + return &QWebSelectData{h: h} +} + +// UnsafeNewQWebSelectData constructs the type using only unsafe pointers. +func UnsafeNewQWebSelectData(h unsafe.Pointer) *QWebSelectData { + if h == nil { + return nil + } + + return &QWebSelectData{h: (*C.QWebSelectData)(h)} +} + +func (this *QWebSelectData) ItemType(param1 int) QWebSelectData__ItemType { + return (QWebSelectData__ItemType)(C.QWebSelectData_ItemType(this.h, (C.int)(param1))) +} + +func (this *QWebSelectData) ItemText(index int) string { + var _ms C.struct_miqt_string = C.QWebSelectData_ItemText(this.h, (C.int)(index)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebSelectData) ItemToolTip(index int) string { + var _ms C.struct_miqt_string = C.QWebSelectData_ItemToolTip(this.h, (C.int)(index)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebSelectData) ItemIsEnabled(index int) bool { + return (bool)(C.QWebSelectData_ItemIsEnabled(this.h, (C.int)(index))) +} + +func (this *QWebSelectData) ItemIsSelected(index int) bool { + return (bool)(C.QWebSelectData_ItemIsSelected(this.h, (C.int)(index))) +} + +func (this *QWebSelectData) ItemCount() int { + return (int)(C.QWebSelectData_ItemCount(this.h)) +} + +func (this *QWebSelectData) Multiple() bool { + return (bool)(C.QWebSelectData_Multiple(this.h)) +} + +func (this *QWebSelectData) BackgroundColor() *qt.QColor { + _ret := C.QWebSelectData_BackgroundColor(this.h) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebSelectData) ForegroundColor() *qt.QColor { + _ret := C.QWebSelectData_ForegroundColor(this.h) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebSelectData) ItemBackgroundColor(index int) *qt.QColor { + _ret := C.QWebSelectData_ItemBackgroundColor(this.h, (C.int)(index)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebSelectData) ItemForegroundColor(index int) *qt.QColor { + _ret := C.QWebSelectData_ItemForegroundColor(this.h, (C.int)(index)) + _goptr := qt.UnsafeNewQColor(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebSelectData) OperatorAssign(param1 *QWebSelectData) { + C.QWebSelectData_OperatorAssign(this.h, param1.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebSelectData) Delete() { + C.QWebSelectData_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 *QWebSelectData) GoGC() { + runtime.SetFinalizer(this, func(this *QWebSelectData) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebSelectMethod struct { + h *C.QWebSelectMethod + isSubclass bool + *qt.QObject +} + +func (this *QWebSelectMethod) cPointer() *C.QWebSelectMethod { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebSelectMethod) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebSelectMethod constructs the type using only CGO pointers. +func newQWebSelectMethod(h *C.QWebSelectMethod, h_QObject *C.QObject) *QWebSelectMethod { + if h == nil { + return nil + } + return &QWebSelectMethod{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebSelectMethod constructs the type using only unsafe pointers. +func UnsafeNewQWebSelectMethod(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebSelectMethod { + if h == nil { + return nil + } + + return &QWebSelectMethod{h: (*C.QWebSelectMethod)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebSelectMethod) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebSelectMethod_MetaObject(this.h))) +} + +func (this *QWebSelectMethod) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebSelectMethod_Metacast(this.h, param1_Cstring)) +} + +func QWebSelectMethod_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebSelectMethod_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebSelectMethod_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebSelectMethod_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebSelectMethod) Show(param1 *QWebSelectData) { + C.QWebSelectMethod_Show(this.h, param1.cPointer()) +} + +func (this *QWebSelectMethod) Hide() { + C.QWebSelectMethod_Hide(this.h) +} + +func (this *QWebSelectMethod) SetGeometry(geometry *qt.QRect) { + C.QWebSelectMethod_SetGeometry(this.h, (*C.QRect)(geometry.UnsafePointer())) +} + +func (this *QWebSelectMethod) SetFont(font *qt.QFont) { + C.QWebSelectMethod_SetFont(this.h, (*C.QFont)(font.UnsafePointer())) +} + +func (this *QWebSelectMethod) SelectItem(index int, allowMultiplySelections bool, shift bool) { + C.QWebSelectMethod_SelectItem(this.h, (C.int)(index), (C.bool)(allowMultiplySelections), (C.bool)(shift)) +} +func (this *QWebSelectMethod) OnSelectItem(slot func(index int, allowMultiplySelections bool, shift bool)) { + C.QWebSelectMethod_connect_SelectItem(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebSelectMethod_SelectItem +func miqt_exec_callback_QWebSelectMethod_SelectItem(cb C.intptr_t, index C.int, allowMultiplySelections C.bool, shift C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(index int, allowMultiplySelections bool, shift bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(index) + + slotval2 := (bool)(allowMultiplySelections) + + slotval3 := (bool)(shift) + + gofunc(slotval1, slotval2, slotval3) +} + +func (this *QWebSelectMethod) DidHide() { + C.QWebSelectMethod_DidHide(this.h) +} +func (this *QWebSelectMethod) OnDidHide(slot func()) { + C.QWebSelectMethod_connect_DidHide(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebSelectMethod_DidHide +func miqt_exec_callback_QWebSelectMethod_DidHide(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func QWebSelectMethod_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebSelectMethod_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebSelectMethod_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebSelectMethod_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebSelectMethod_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebSelectMethod_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebSelectMethod_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebSelectMethod_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebSelectMethod) Delete() { + C.QWebSelectMethod_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 *QWebSelectMethod) GoGC() { + runtime.SetFinalizer(this, func(this *QWebSelectMethod) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebNotificationData struct { + h *C.QWebNotificationData + isSubclass bool +} + +func (this *QWebNotificationData) cPointer() *C.QWebNotificationData { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebNotificationData) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebNotificationData constructs the type using only CGO pointers. +func newQWebNotificationData(h *C.QWebNotificationData) *QWebNotificationData { + if h == nil { + return nil + } + return &QWebNotificationData{h: h} +} + +// UnsafeNewQWebNotificationData constructs the type using only unsafe pointers. +func UnsafeNewQWebNotificationData(h unsafe.Pointer) *QWebNotificationData { + if h == nil { + return nil + } + + return &QWebNotificationData{h: (*C.QWebNotificationData)(h)} +} + +func (this *QWebNotificationData) Title() string { + var _ms C.struct_miqt_string = C.QWebNotificationData_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebNotificationData) Message() string { + var _ms C.struct_miqt_string = C.QWebNotificationData_Message(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebNotificationData) IconUrl() *qt.QUrl { + _ret := C.QWebNotificationData_IconUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebNotificationData) OpenerPageUrl() *qt.QUrl { + _ret := C.QWebNotificationData_OpenerPageUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebNotificationData) OperatorAssign(param1 *QWebNotificationData) { + C.QWebNotificationData_OperatorAssign(this.h, param1.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebNotificationData) Delete() { + C.QWebNotificationData_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 *QWebNotificationData) GoGC() { + runtime.SetFinalizer(this, func(this *QWebNotificationData) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebNotificationPresenter struct { + h *C.QWebNotificationPresenter + isSubclass bool + *qt.QObject +} + +func (this *QWebNotificationPresenter) cPointer() *C.QWebNotificationPresenter { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebNotificationPresenter) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebNotificationPresenter constructs the type using only CGO pointers. +func newQWebNotificationPresenter(h *C.QWebNotificationPresenter, h_QObject *C.QObject) *QWebNotificationPresenter { + if h == nil { + return nil + } + return &QWebNotificationPresenter{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebNotificationPresenter constructs the type using only unsafe pointers. +func UnsafeNewQWebNotificationPresenter(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebNotificationPresenter { + if h == nil { + return nil + } + + return &QWebNotificationPresenter{h: (*C.QWebNotificationPresenter)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebNotificationPresenter) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebNotificationPresenter_MetaObject(this.h))) +} + +func (this *QWebNotificationPresenter) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebNotificationPresenter_Metacast(this.h, param1_Cstring)) +} + +func QWebNotificationPresenter_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebNotificationPresenter_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebNotificationPresenter_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebNotificationPresenter_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebNotificationPresenter) ShowNotification(param1 *QWebNotificationData) { + C.QWebNotificationPresenter_ShowNotification(this.h, param1.cPointer()) +} + +func (this *QWebNotificationPresenter) NotificationClosed() { + C.QWebNotificationPresenter_NotificationClosed(this.h) +} +func (this *QWebNotificationPresenter) OnNotificationClosed(slot func()) { + C.QWebNotificationPresenter_connect_NotificationClosed(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebNotificationPresenter_NotificationClosed +func miqt_exec_callback_QWebNotificationPresenter_NotificationClosed(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 *QWebNotificationPresenter) NotificationClicked() { + C.QWebNotificationPresenter_NotificationClicked(this.h) +} +func (this *QWebNotificationPresenter) OnNotificationClicked(slot func()) { + C.QWebNotificationPresenter_connect_NotificationClicked(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebNotificationPresenter_NotificationClicked +func miqt_exec_callback_QWebNotificationPresenter_NotificationClicked(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func QWebNotificationPresenter_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebNotificationPresenter_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebNotificationPresenter_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebNotificationPresenter_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebNotificationPresenter_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebNotificationPresenter_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebNotificationPresenter_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebNotificationPresenter_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebNotificationPresenter) Delete() { + C.QWebNotificationPresenter_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 *QWebNotificationPresenter) GoGC() { + runtime.SetFinalizer(this, func(this *QWebNotificationPresenter) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebHapticFeedbackPlayer struct { + h *C.QWebHapticFeedbackPlayer + isSubclass bool + *qt.QObject +} + +func (this *QWebHapticFeedbackPlayer) cPointer() *C.QWebHapticFeedbackPlayer { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebHapticFeedbackPlayer) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebHapticFeedbackPlayer constructs the type using only CGO pointers. +func newQWebHapticFeedbackPlayer(h *C.QWebHapticFeedbackPlayer, h_QObject *C.QObject) *QWebHapticFeedbackPlayer { + if h == nil { + return nil + } + return &QWebHapticFeedbackPlayer{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebHapticFeedbackPlayer constructs the type using only unsafe pointers. +func UnsafeNewQWebHapticFeedbackPlayer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebHapticFeedbackPlayer { + if h == nil { + return nil + } + + return &QWebHapticFeedbackPlayer{h: (*C.QWebHapticFeedbackPlayer)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebHapticFeedbackPlayer) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebHapticFeedbackPlayer_MetaObject(this.h))) +} + +func (this *QWebHapticFeedbackPlayer) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebHapticFeedbackPlayer_Metacast(this.h, param1_Cstring)) +} + +func QWebHapticFeedbackPlayer_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebHapticFeedbackPlayer_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebHapticFeedbackPlayer_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebHapticFeedbackPlayer_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebHapticFeedbackPlayer) PlayHapticFeedback(param1 QWebHapticFeedbackPlayer__HapticEvent, hapticType string, param3 QWebHapticFeedbackPlayer__HapticStrength) { + hapticType_ms := C.struct_miqt_string{} + hapticType_ms.data = C.CString(hapticType) + hapticType_ms.len = C.size_t(len(hapticType)) + defer C.free(unsafe.Pointer(hapticType_ms.data)) + C.QWebHapticFeedbackPlayer_PlayHapticFeedback(this.h, (C.int)(param1), hapticType_ms, (C.int)(param3)) +} + +func QWebHapticFeedbackPlayer_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebHapticFeedbackPlayer_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebHapticFeedbackPlayer_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebHapticFeedbackPlayer_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebHapticFeedbackPlayer_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebHapticFeedbackPlayer_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebHapticFeedbackPlayer_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebHapticFeedbackPlayer_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebHapticFeedbackPlayer) Delete() { + C.QWebHapticFeedbackPlayer_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 *QWebHapticFeedbackPlayer) GoGC() { + runtime.SetFinalizer(this, func(this *QWebHapticFeedbackPlayer) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebTouchModifier struct { + h *C.QWebTouchModifier + isSubclass bool + *qt.QObject +} + +func (this *QWebTouchModifier) cPointer() *C.QWebTouchModifier { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebTouchModifier) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebTouchModifier constructs the type using only CGO pointers. +func newQWebTouchModifier(h *C.QWebTouchModifier, h_QObject *C.QObject) *QWebTouchModifier { + if h == nil { + return nil + } + return &QWebTouchModifier{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebTouchModifier constructs the type using only unsafe pointers. +func UnsafeNewQWebTouchModifier(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebTouchModifier { + if h == nil { + return nil + } + + return &QWebTouchModifier{h: (*C.QWebTouchModifier)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebTouchModifier) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebTouchModifier_MetaObject(this.h))) +} + +func (this *QWebTouchModifier) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebTouchModifier_Metacast(this.h, param1_Cstring)) +} + +func QWebTouchModifier_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebTouchModifier_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebTouchModifier_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebTouchModifier_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebTouchModifier) HitTestPaddingForTouch(param1 QWebTouchModifier__PaddingDirection) uint { + return (uint)(C.QWebTouchModifier_HitTestPaddingForTouch(this.h, (C.int)(param1))) +} + +func QWebTouchModifier_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebTouchModifier_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebTouchModifier_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebTouchModifier_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebTouchModifier_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebTouchModifier_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebTouchModifier_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebTouchModifier_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebTouchModifier) Delete() { + C.QWebTouchModifier_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 *QWebTouchModifier) GoGC() { + runtime.SetFinalizer(this, func(this *QWebTouchModifier) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebSpellChecker struct { + h *C.QWebSpellChecker + isSubclass bool + *qt.QObject +} + +func (this *QWebSpellChecker) cPointer() *C.QWebSpellChecker { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebSpellChecker) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebSpellChecker constructs the type using only CGO pointers. +func newQWebSpellChecker(h *C.QWebSpellChecker, h_QObject *C.QObject) *QWebSpellChecker { + if h == nil { + return nil + } + return &QWebSpellChecker{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebSpellChecker constructs the type using only unsafe pointers. +func UnsafeNewQWebSpellChecker(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebSpellChecker { + if h == nil { + return nil + } + + return &QWebSpellChecker{h: (*C.QWebSpellChecker)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +func (this *QWebSpellChecker) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebSpellChecker_MetaObject(this.h))) +} + +func (this *QWebSpellChecker) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebSpellChecker_Metacast(this.h, param1_Cstring)) +} + +func QWebSpellChecker_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebSpellChecker_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebSpellChecker_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebSpellChecker_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebSpellChecker) IsContinousSpellCheckingEnabled() bool { + return (bool)(C.QWebSpellChecker_IsContinousSpellCheckingEnabled(this.h)) +} + +func (this *QWebSpellChecker) ToggleContinousSpellChecking() { + C.QWebSpellChecker_ToggleContinousSpellChecking(this.h) +} + +func (this *QWebSpellChecker) LearnWord(word string) { + word_ms := C.struct_miqt_string{} + word_ms.data = C.CString(word) + word_ms.len = C.size_t(len(word)) + defer C.free(unsafe.Pointer(word_ms.data)) + C.QWebSpellChecker_LearnWord(this.h, word_ms) +} + +func (this *QWebSpellChecker) IgnoreWordInSpellDocument(word string) { + word_ms := C.struct_miqt_string{} + word_ms.data = C.CString(word) + word_ms.len = C.size_t(len(word)) + defer C.free(unsafe.Pointer(word_ms.data)) + C.QWebSpellChecker_IgnoreWordInSpellDocument(this.h, word_ms) +} + +func (this *QWebSpellChecker) CheckSpellingOfString(word string, misspellingLocation *int, misspellingLength *int) { + word_ms := C.struct_miqt_string{} + word_ms.data = C.CString(word) + word_ms.len = C.size_t(len(word)) + defer C.free(unsafe.Pointer(word_ms.data)) + C.QWebSpellChecker_CheckSpellingOfString(this.h, word_ms, (*C.int)(unsafe.Pointer(misspellingLocation)), (*C.int)(unsafe.Pointer(misspellingLength))) +} + +func (this *QWebSpellChecker) AutoCorrectSuggestionForMisspelledWord(word string) string { + word_ms := C.struct_miqt_string{} + word_ms.data = C.CString(word) + word_ms.len = C.size_t(len(word)) + defer C.free(unsafe.Pointer(word_ms.data)) + var _ms C.struct_miqt_string = C.QWebSpellChecker_AutoCorrectSuggestionForMisspelledWord(this.h, word_ms) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebSpellChecker) GuessesForWord(word string, context string, guesses []string) { + word_ms := C.struct_miqt_string{} + word_ms.data = C.CString(word) + word_ms.len = C.size_t(len(word)) + defer C.free(unsafe.Pointer(word_ms.data)) + context_ms := C.struct_miqt_string{} + context_ms.data = C.CString(context) + context_ms.len = C.size_t(len(context)) + defer C.free(unsafe.Pointer(context_ms.data)) + guesses_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(guesses)))) + defer C.free(unsafe.Pointer(guesses_CArray)) + for i := range guesses { + guesses_i_ms := C.struct_miqt_string{} + guesses_i_ms.data = C.CString(guesses[i]) + guesses_i_ms.len = C.size_t(len(guesses[i])) + defer C.free(unsafe.Pointer(guesses_i_ms.data)) + guesses_CArray[i] = guesses_i_ms + } + guesses_ma := C.struct_miqt_array{len: C.size_t(len(guesses)), data: unsafe.Pointer(guesses_CArray)} + C.QWebSpellChecker_GuessesForWord(this.h, word_ms, context_ms, guesses_ma) +} + +func (this *QWebSpellChecker) IsGrammarCheckingEnabled() bool { + return (bool)(C.QWebSpellChecker_IsGrammarCheckingEnabled(this.h)) +} + +func (this *QWebSpellChecker) ToggleGrammarChecking() { + C.QWebSpellChecker_ToggleGrammarChecking(this.h) +} + +func (this *QWebSpellChecker) CheckGrammarOfString(param1 string, param2 []QWebSpellChecker__GrammarDetail, badGrammarLocation *int, badGrammarLength *int) { + 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)) + param2_CArray := (*[0xffff]*C.QWebSpellChecker__GrammarDetail)(C.malloc(C.size_t(8 * len(param2)))) + defer C.free(unsafe.Pointer(param2_CArray)) + for i := range param2 { + param2_CArray[i] = param2[i].cPointer() + } + param2_ma := C.struct_miqt_array{len: C.size_t(len(param2)), data: unsafe.Pointer(param2_CArray)} + C.QWebSpellChecker_CheckGrammarOfString(this.h, param1_ms, param2_ma, (*C.int)(unsafe.Pointer(badGrammarLocation)), (*C.int)(unsafe.Pointer(badGrammarLength))) +} + +func QWebSpellChecker_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebSpellChecker_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebSpellChecker_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebSpellChecker_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebSpellChecker_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebSpellChecker_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebSpellChecker_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebSpellChecker_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Delete this object from C++ memory. +func (this *QWebSpellChecker) Delete() { + C.QWebSpellChecker_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 *QWebSpellChecker) GoGC() { + runtime.SetFinalizer(this, func(this *QWebSpellChecker) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebKitPlatformPlugin struct { + h *C.QWebKitPlatformPlugin + isSubclass bool +} + +func (this *QWebKitPlatformPlugin) cPointer() *C.QWebKitPlatformPlugin { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebKitPlatformPlugin) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebKitPlatformPlugin constructs the type using only CGO pointers. +func newQWebKitPlatformPlugin(h *C.QWebKitPlatformPlugin) *QWebKitPlatformPlugin { + if h == nil { + return nil + } + return &QWebKitPlatformPlugin{h: h} +} + +// UnsafeNewQWebKitPlatformPlugin constructs the type using only unsafe pointers. +func UnsafeNewQWebKitPlatformPlugin(h unsafe.Pointer) *QWebKitPlatformPlugin { + if h == nil { + return nil + } + + return &QWebKitPlatformPlugin{h: (*C.QWebKitPlatformPlugin)(h)} +} + +func (this *QWebKitPlatformPlugin) SupportsExtension(param1 QWebKitPlatformPlugin__Extension) bool { + return (bool)(C.QWebKitPlatformPlugin_SupportsExtension(this.h, (C.int)(param1))) +} + +func (this *QWebKitPlatformPlugin) CreateExtension(param1 QWebKitPlatformPlugin__Extension) *qt.QObject { + return qt.UnsafeNewQObject(unsafe.Pointer(C.QWebKitPlatformPlugin_CreateExtension(this.h, (C.int)(param1)))) +} + +func (this *QWebKitPlatformPlugin) OperatorAssign(param1 *QWebKitPlatformPlugin) { + C.QWebKitPlatformPlugin_OperatorAssign(this.h, param1.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebKitPlatformPlugin) Delete() { + C.QWebKitPlatformPlugin_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 *QWebKitPlatformPlugin) GoGC() { + runtime.SetFinalizer(this, func(this *QWebKitPlatformPlugin) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebSpellChecker__GrammarDetail struct { + h *C.QWebSpellChecker__GrammarDetail + isSubclass bool +} + +func (this *QWebSpellChecker__GrammarDetail) cPointer() *C.QWebSpellChecker__GrammarDetail { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebSpellChecker__GrammarDetail) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebSpellChecker__GrammarDetail constructs the type using only CGO pointers. +func newQWebSpellChecker__GrammarDetail(h *C.QWebSpellChecker__GrammarDetail) *QWebSpellChecker__GrammarDetail { + if h == nil { + return nil + } + return &QWebSpellChecker__GrammarDetail{h: h} +} + +// UnsafeNewQWebSpellChecker__GrammarDetail constructs the type using only unsafe pointers. +func UnsafeNewQWebSpellChecker__GrammarDetail(h unsafe.Pointer) *QWebSpellChecker__GrammarDetail { + if h == nil { + return nil + } + + return &QWebSpellChecker__GrammarDetail{h: (*C.QWebSpellChecker__GrammarDetail)(h)} +} + +// NewQWebSpellChecker__GrammarDetail constructs a new QWebSpellChecker::GrammarDetail object. +func NewQWebSpellChecker__GrammarDetail(param1 *QWebSpellChecker__GrammarDetail) *QWebSpellChecker__GrammarDetail { + var outptr_QWebSpellChecker__GrammarDetail *C.QWebSpellChecker__GrammarDetail = nil + + C.QWebSpellChecker__GrammarDetail_new(param1.cPointer(), &outptr_QWebSpellChecker__GrammarDetail) + ret := newQWebSpellChecker__GrammarDetail(outptr_QWebSpellChecker__GrammarDetail) + ret.isSubclass = true + return ret +} + +func (this *QWebSpellChecker__GrammarDetail) OperatorAssign(param1 *QWebSpellChecker__GrammarDetail) { + C.QWebSpellChecker__GrammarDetail_OperatorAssign(this.h, param1.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebSpellChecker__GrammarDetail) Delete() { + C.QWebSpellChecker__GrammarDetail_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 *QWebSpellChecker__GrammarDetail) GoGC() { + runtime.SetFinalizer(this, func(this *QWebSpellChecker__GrammarDetail) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webkit/gen_qwebkitplatformplugin.h b/qt/webkit/gen_qwebkitplatformplugin.h new file mode 100644 index 00000000..389e71a8 --- /dev/null +++ b/qt/webkit/gen_qwebkitplatformplugin.h @@ -0,0 +1,164 @@ +#pragma once +#ifndef MIQT_QT_WEBKIT_GEN_QWEBKITPLATFORMPLUGIN_H +#define MIQT_QT_WEBKIT_GEN_QWEBKITPLATFORMPLUGIN_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QColor; +class QFont; +class QMetaObject; +class QObject; +class QRect; +class QUrl; +class QWebHapticFeedbackPlayer; +class QWebKitPlatformPlugin; +class QWebNotificationData; +class QWebNotificationPresenter; +class QWebSelectData; +class QWebSelectMethod; +class QWebSpellChecker; +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebSpellChecker__GrammarDetail) +typedef QWebSpellChecker::GrammarDetail QWebSpellChecker__GrammarDetail; +#else +class QWebSpellChecker__GrammarDetail; +#endif +class QWebTouchModifier; +#else +typedef struct QColor QColor; +typedef struct QFont QFont; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QRect QRect; +typedef struct QUrl QUrl; +typedef struct QWebHapticFeedbackPlayer QWebHapticFeedbackPlayer; +typedef struct QWebKitPlatformPlugin QWebKitPlatformPlugin; +typedef struct QWebNotificationData QWebNotificationData; +typedef struct QWebNotificationPresenter QWebNotificationPresenter; +typedef struct QWebSelectData QWebSelectData; +typedef struct QWebSelectMethod QWebSelectMethod; +typedef struct QWebSpellChecker QWebSpellChecker; +typedef struct QWebSpellChecker__GrammarDetail QWebSpellChecker__GrammarDetail; +typedef struct QWebTouchModifier QWebTouchModifier; +#endif + +int QWebSelectData_ItemType(const QWebSelectData* self, int param1); +struct miqt_string QWebSelectData_ItemText(const QWebSelectData* self, int index); +struct miqt_string QWebSelectData_ItemToolTip(const QWebSelectData* self, int index); +bool QWebSelectData_ItemIsEnabled(const QWebSelectData* self, int index); +bool QWebSelectData_ItemIsSelected(const QWebSelectData* self, int index); +int QWebSelectData_ItemCount(const QWebSelectData* self); +bool QWebSelectData_Multiple(const QWebSelectData* self); +QColor* QWebSelectData_BackgroundColor(const QWebSelectData* self); +QColor* QWebSelectData_ForegroundColor(const QWebSelectData* self); +QColor* QWebSelectData_ItemBackgroundColor(const QWebSelectData* self, int index); +QColor* QWebSelectData_ItemForegroundColor(const QWebSelectData* self, int index); +void QWebSelectData_OperatorAssign(QWebSelectData* self, QWebSelectData* param1); +void QWebSelectData_Delete(QWebSelectData* self, bool isSubclass); + +QMetaObject* QWebSelectMethod_MetaObject(const QWebSelectMethod* self); +void* QWebSelectMethod_Metacast(QWebSelectMethod* self, const char* param1); +struct miqt_string QWebSelectMethod_Tr(const char* s); +struct miqt_string QWebSelectMethod_TrUtf8(const char* s); +void QWebSelectMethod_Show(QWebSelectMethod* self, QWebSelectData* param1); +void QWebSelectMethod_Hide(QWebSelectMethod* self); +void QWebSelectMethod_SetGeometry(QWebSelectMethod* self, QRect* geometry); +void QWebSelectMethod_SetFont(QWebSelectMethod* self, QFont* font); +void QWebSelectMethod_SelectItem(QWebSelectMethod* self, int index, bool allowMultiplySelections, bool shift); +void QWebSelectMethod_connect_SelectItem(QWebSelectMethod* self, intptr_t slot); +void QWebSelectMethod_DidHide(QWebSelectMethod* self); +void QWebSelectMethod_connect_DidHide(QWebSelectMethod* self, intptr_t slot); +struct miqt_string QWebSelectMethod_Tr2(const char* s, const char* c); +struct miqt_string QWebSelectMethod_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebSelectMethod_TrUtf82(const char* s, const char* c); +struct miqt_string QWebSelectMethod_TrUtf83(const char* s, const char* c, int n); +void QWebSelectMethod_Delete(QWebSelectMethod* self, bool isSubclass); + +struct miqt_string QWebNotificationData_Title(const QWebNotificationData* self); +struct miqt_string QWebNotificationData_Message(const QWebNotificationData* self); +QUrl* QWebNotificationData_IconUrl(const QWebNotificationData* self); +QUrl* QWebNotificationData_OpenerPageUrl(const QWebNotificationData* self); +void QWebNotificationData_OperatorAssign(QWebNotificationData* self, QWebNotificationData* param1); +void QWebNotificationData_Delete(QWebNotificationData* self, bool isSubclass); + +QMetaObject* QWebNotificationPresenter_MetaObject(const QWebNotificationPresenter* self); +void* QWebNotificationPresenter_Metacast(QWebNotificationPresenter* self, const char* param1); +struct miqt_string QWebNotificationPresenter_Tr(const char* s); +struct miqt_string QWebNotificationPresenter_TrUtf8(const char* s); +void QWebNotificationPresenter_ShowNotification(QWebNotificationPresenter* self, QWebNotificationData* param1); +void QWebNotificationPresenter_NotificationClosed(QWebNotificationPresenter* self); +void QWebNotificationPresenter_connect_NotificationClosed(QWebNotificationPresenter* self, intptr_t slot); +void QWebNotificationPresenter_NotificationClicked(QWebNotificationPresenter* self); +void QWebNotificationPresenter_connect_NotificationClicked(QWebNotificationPresenter* self, intptr_t slot); +struct miqt_string QWebNotificationPresenter_Tr2(const char* s, const char* c); +struct miqt_string QWebNotificationPresenter_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebNotificationPresenter_TrUtf82(const char* s, const char* c); +struct miqt_string QWebNotificationPresenter_TrUtf83(const char* s, const char* c, int n); +void QWebNotificationPresenter_Delete(QWebNotificationPresenter* self, bool isSubclass); + +QMetaObject* QWebHapticFeedbackPlayer_MetaObject(const QWebHapticFeedbackPlayer* self); +void* QWebHapticFeedbackPlayer_Metacast(QWebHapticFeedbackPlayer* self, const char* param1); +struct miqt_string QWebHapticFeedbackPlayer_Tr(const char* s); +struct miqt_string QWebHapticFeedbackPlayer_TrUtf8(const char* s); +void QWebHapticFeedbackPlayer_PlayHapticFeedback(QWebHapticFeedbackPlayer* self, int param1, struct miqt_string hapticType, int param3); +struct miqt_string QWebHapticFeedbackPlayer_Tr2(const char* s, const char* c); +struct miqt_string QWebHapticFeedbackPlayer_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebHapticFeedbackPlayer_TrUtf82(const char* s, const char* c); +struct miqt_string QWebHapticFeedbackPlayer_TrUtf83(const char* s, const char* c, int n); +void QWebHapticFeedbackPlayer_Delete(QWebHapticFeedbackPlayer* self, bool isSubclass); + +QMetaObject* QWebTouchModifier_MetaObject(const QWebTouchModifier* self); +void* QWebTouchModifier_Metacast(QWebTouchModifier* self, const char* param1); +struct miqt_string QWebTouchModifier_Tr(const char* s); +struct miqt_string QWebTouchModifier_TrUtf8(const char* s); +unsigned int QWebTouchModifier_HitTestPaddingForTouch(const QWebTouchModifier* self, int param1); +struct miqt_string QWebTouchModifier_Tr2(const char* s, const char* c); +struct miqt_string QWebTouchModifier_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebTouchModifier_TrUtf82(const char* s, const char* c); +struct miqt_string QWebTouchModifier_TrUtf83(const char* s, const char* c, int n); +void QWebTouchModifier_Delete(QWebTouchModifier* self, bool isSubclass); + +QMetaObject* QWebSpellChecker_MetaObject(const QWebSpellChecker* self); +void* QWebSpellChecker_Metacast(QWebSpellChecker* self, const char* param1); +struct miqt_string QWebSpellChecker_Tr(const char* s); +struct miqt_string QWebSpellChecker_TrUtf8(const char* s); +bool QWebSpellChecker_IsContinousSpellCheckingEnabled(const QWebSpellChecker* self); +void QWebSpellChecker_ToggleContinousSpellChecking(QWebSpellChecker* self); +void QWebSpellChecker_LearnWord(QWebSpellChecker* self, struct miqt_string word); +void QWebSpellChecker_IgnoreWordInSpellDocument(QWebSpellChecker* self, struct miqt_string word); +void QWebSpellChecker_CheckSpellingOfString(QWebSpellChecker* self, struct miqt_string word, int* misspellingLocation, int* misspellingLength); +struct miqt_string QWebSpellChecker_AutoCorrectSuggestionForMisspelledWord(QWebSpellChecker* self, struct miqt_string word); +void QWebSpellChecker_GuessesForWord(QWebSpellChecker* self, struct miqt_string word, struct miqt_string context, struct miqt_array /* of struct miqt_string */ guesses); +bool QWebSpellChecker_IsGrammarCheckingEnabled(QWebSpellChecker* self); +void QWebSpellChecker_ToggleGrammarChecking(QWebSpellChecker* self); +void QWebSpellChecker_CheckGrammarOfString(QWebSpellChecker* self, struct miqt_string param1, struct miqt_array /* of QWebSpellChecker__GrammarDetail* */ param2, int* badGrammarLocation, int* badGrammarLength); +struct miqt_string QWebSpellChecker_Tr2(const char* s, const char* c); +struct miqt_string QWebSpellChecker_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebSpellChecker_TrUtf82(const char* s, const char* c); +struct miqt_string QWebSpellChecker_TrUtf83(const char* s, const char* c, int n); +void QWebSpellChecker_Delete(QWebSpellChecker* self, bool isSubclass); + +bool QWebKitPlatformPlugin_SupportsExtension(const QWebKitPlatformPlugin* self, int param1); +QObject* QWebKitPlatformPlugin_CreateExtension(const QWebKitPlatformPlugin* self, int param1); +void QWebKitPlatformPlugin_OperatorAssign(QWebKitPlatformPlugin* self, QWebKitPlatformPlugin* param1); +void QWebKitPlatformPlugin_Delete(QWebKitPlatformPlugin* self, bool isSubclass); + +void QWebSpellChecker__GrammarDetail_new(QWebSpellChecker__GrammarDetail* param1, QWebSpellChecker__GrammarDetail** outptr_QWebSpellChecker__GrammarDetail); +void QWebSpellChecker__GrammarDetail_OperatorAssign(QWebSpellChecker__GrammarDetail* self, QWebSpellChecker__GrammarDetail* param1); +void QWebSpellChecker__GrammarDetail_Delete(QWebSpellChecker__GrammarDetail* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webkit/gen_qwebpage.cpp b/qt/webkit/gen_qwebpage.cpp new file mode 100644 index 00000000..377e4146 --- /dev/null +++ b/qt/webkit/gen_qwebpage.cpp @@ -0,0 +1,1708 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ChooseMultipleFilesExtensionOption +#define WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ChooseMultipleFilesExtensionReturn +#define WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ErrorPageExtensionOption +#define WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ErrorPageExtensionReturn +#define WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ExtensionOption +#define WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ExtensionReturn +#define WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ViewportAttributes +#include +#include +#include +#include +#include +#include "gen_qwebpage.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebPage : public virtual QWebPage { +public: + + MiqtVirtualQWebPage(): QWebPage() {}; + MiqtVirtualQWebPage(QObject* parent): QWebPage(parent) {}; + + virtual ~MiqtVirtualQWebPage() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__TriggerAction = 0; + + // Subclass to allow providing a Go implementation + virtual void triggerAction(QWebPage::WebAction action, bool checked) override { + if (handle__TriggerAction == 0) { + QWebPage::triggerAction(action, checked); + return; + } + + QWebPage::WebAction action_ret = action; + int sigval1 = static_cast(action_ret); + bool sigval2 = checked; + + miqt_exec_callback_QWebPage_TriggerAction(this, handle__TriggerAction, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TriggerAction(int action, bool checked) { + + QWebPage::triggerAction(static_cast(action), checked); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QWebPage::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QWebPage_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QWebPage::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual bool extension(QWebPage::Extension extension, const QWebPage::ExtensionOption* option, QWebPage::ExtensionReturn* output) override { + if (handle__Extension == 0) { + return QWebPage::extension(extension, option, output); + } + + QWebPage::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + QWebPage__ExtensionOption* sigval2 = (QWebPage__ExtensionOption*) option; + QWebPage__ExtensionReturn* sigval3 = output; + + bool callback_return_value = miqt_exec_callback_QWebPage_Extension(this, handle__Extension, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Extension(int extension, QWebPage__ExtensionOption* option, QWebPage__ExtensionReturn* output) { + + return QWebPage::extension(static_cast(extension), option, output); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QWebPage::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QWebPage::supportsExtension(extension); + } + + QWebPage::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QWebPage_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QWebPage::supportsExtension(static_cast(extension)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShouldInterruptJavaScript = 0; + + // Subclass to allow providing a Go implementation + virtual bool shouldInterruptJavaScript() override { + if (handle__ShouldInterruptJavaScript == 0) { + return QWebPage::shouldInterruptJavaScript(); + } + + + bool callback_return_value = miqt_exec_callback_QWebPage_ShouldInterruptJavaScript(this, handle__ShouldInterruptJavaScript); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_ShouldInterruptJavaScript() { + + return QWebPage::shouldInterruptJavaScript(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateWindow = 0; + + // Subclass to allow providing a Go implementation + virtual QWebPage* createWindow(QWebPage::WebWindowType typeVal) override { + if (handle__CreateWindow == 0) { + return QWebPage::createWindow(typeVal); + } + + QWebPage::WebWindowType typeVal_ret = typeVal; + int sigval1 = static_cast(typeVal_ret); + + QWebPage* callback_return_value = miqt_exec_callback_QWebPage_CreateWindow(this, handle__CreateWindow, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWebPage* virtualbase_CreateWindow(int typeVal) { + + return QWebPage::createWindow(static_cast(typeVal)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreatePlugin = 0; + + // Subclass to allow providing a Go implementation + virtual QObject* createPlugin(const QString& classid, const QUrl& url, const QStringList& paramNames, const QStringList& paramValues) override { + if (handle__CreatePlugin == 0) { + return QWebPage::createPlugin(classid, url, paramNames, paramValues); + } + + const QString classid_ret = classid; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray classid_b = classid_ret.toUtf8(); + struct miqt_string classid_ms; + classid_ms.len = classid_b.length(); + classid_ms.data = static_cast(malloc(classid_ms.len)); + memcpy(classid_ms.data, classid_b.data(), classid_ms.len); + struct miqt_string sigval1 = classid_ms; + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval2 = const_cast(&url_ret); + const QStringList& paramNames_ret = paramNames; + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* paramNames_arr = static_cast(malloc(sizeof(struct miqt_string) * paramNames_ret.length())); + for (size_t i = 0, e = paramNames_ret.length(); i < e; ++i) { + QString paramNames_lv_ret = paramNames_ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray paramNames_lv_b = paramNames_lv_ret.toUtf8(); + struct miqt_string paramNames_lv_ms; + paramNames_lv_ms.len = paramNames_lv_b.length(); + paramNames_lv_ms.data = static_cast(malloc(paramNames_lv_ms.len)); + memcpy(paramNames_lv_ms.data, paramNames_lv_b.data(), paramNames_lv_ms.len); + paramNames_arr[i] = paramNames_lv_ms; + } + struct miqt_array paramNames_out; + paramNames_out.len = paramNames_ret.length(); + paramNames_out.data = static_cast(paramNames_arr); + struct miqt_array /* of struct miqt_string */ sigval3 = paramNames_out; + const QStringList& paramValues_ret = paramValues; + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* paramValues_arr = static_cast(malloc(sizeof(struct miqt_string) * paramValues_ret.length())); + for (size_t i = 0, e = paramValues_ret.length(); i < e; ++i) { + QString paramValues_lv_ret = paramValues_ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray paramValues_lv_b = paramValues_lv_ret.toUtf8(); + struct miqt_string paramValues_lv_ms; + paramValues_lv_ms.len = paramValues_lv_b.length(); + paramValues_lv_ms.data = static_cast(malloc(paramValues_lv_ms.len)); + memcpy(paramValues_lv_ms.data, paramValues_lv_b.data(), paramValues_lv_ms.len); + paramValues_arr[i] = paramValues_lv_ms; + } + struct miqt_array paramValues_out; + paramValues_out.len = paramValues_ret.length(); + paramValues_out.data = static_cast(paramValues_arr); + struct miqt_array /* of struct miqt_string */ sigval4 = paramValues_out; + + QObject* callback_return_value = miqt_exec_callback_QWebPage_CreatePlugin(this, handle__CreatePlugin, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QObject* virtualbase_CreatePlugin(struct miqt_string classid, QUrl* url, struct miqt_array /* of struct miqt_string */ paramNames, struct miqt_array /* of struct miqt_string */ paramValues) { + QString classid_QString = QString::fromUtf8(classid.data, classid.len); + QStringList paramNames_QList; + paramNames_QList.reserve(paramNames.len); + struct miqt_string* paramNames_arr = static_cast(paramNames.data); + for(size_t i = 0; i < paramNames.len; ++i) { + QString paramNames_arr_i_QString = QString::fromUtf8(paramNames_arr[i].data, paramNames_arr[i].len); + paramNames_QList.push_back(paramNames_arr_i_QString); + } + QStringList paramValues_QList; + paramValues_QList.reserve(paramValues.len); + struct miqt_string* paramValues_arr = static_cast(paramValues.data); + for(size_t i = 0; i < paramValues.len; ++i) { + QString paramValues_arr_i_QString = QString::fromUtf8(paramValues_arr[i].data, paramValues_arr[i].len); + paramValues_QList.push_back(paramValues_arr_i_QString); + } + + return QWebPage::createPlugin(classid_QString, *url, paramNames_QList, paramValues_QList); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__AcceptNavigationRequest = 0; + + // Subclass to allow providing a Go implementation + virtual bool acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& request, QWebPage::NavigationType typeVal) override { + if (handle__AcceptNavigationRequest == 0) { + return QWebPage::acceptNavigationRequest(frame, request, typeVal); + } + + QWebFrame* sigval1 = frame; + const QNetworkRequest& request_ret = request; + // Cast returned reference into pointer + QNetworkRequest* sigval2 = const_cast(&request_ret); + QWebPage::NavigationType typeVal_ret = typeVal; + int sigval3 = static_cast(typeVal_ret); + + bool callback_return_value = miqt_exec_callback_QWebPage_AcceptNavigationRequest(this, handle__AcceptNavigationRequest, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_AcceptNavigationRequest(QWebFrame* frame, QNetworkRequest* request, int typeVal) { + + return QWebPage::acceptNavigationRequest(frame, *request, static_cast(typeVal)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChooseFile = 0; + + // Subclass to allow providing a Go implementation + virtual QString chooseFile(QWebFrame* originatingFrame, const QString& oldFile) override { + if (handle__ChooseFile == 0) { + return QWebPage::chooseFile(originatingFrame, oldFile); + } + + QWebFrame* sigval1 = originatingFrame; + const QString oldFile_ret = oldFile; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray oldFile_b = oldFile_ret.toUtf8(); + struct miqt_string oldFile_ms; + oldFile_ms.len = oldFile_b.length(); + oldFile_ms.data = static_cast(malloc(oldFile_ms.len)); + memcpy(oldFile_ms.data, oldFile_b.data(), oldFile_ms.len); + struct miqt_string sigval2 = oldFile_ms; + + struct miqt_string callback_return_value = miqt_exec_callback_QWebPage_ChooseFile(this, handle__ChooseFile, sigval1, sigval2); + QString callback_return_value_QString = QString::fromUtf8(callback_return_value.data, callback_return_value.len); + + return callback_return_value_QString; + } + + // Wrapper to allow calling protected method + struct miqt_string virtualbase_ChooseFile(QWebFrame* originatingFrame, struct miqt_string oldFile) { + QString oldFile_QString = QString::fromUtf8(oldFile.data, oldFile.len); + + QString _ret = QWebPage::chooseFile(originatingFrame, oldFile_QString); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + 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__JavaScriptAlert = 0; + + // Subclass to allow providing a Go implementation + virtual void javaScriptAlert(QWebFrame* originatingFrame, const QString& msg) override { + if (handle__JavaScriptAlert == 0) { + QWebPage::javaScriptAlert(originatingFrame, msg); + return; + } + + QWebFrame* sigval1 = originatingFrame; + const QString msg_ret = msg; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray msg_b = msg_ret.toUtf8(); + struct miqt_string msg_ms; + msg_ms.len = msg_b.length(); + msg_ms.data = static_cast(malloc(msg_ms.len)); + memcpy(msg_ms.data, msg_b.data(), msg_ms.len); + struct miqt_string sigval2 = msg_ms; + + miqt_exec_callback_QWebPage_JavaScriptAlert(this, handle__JavaScriptAlert, sigval1, sigval2); + + + } + + // Wrapper to allow calling protected method + void virtualbase_JavaScriptAlert(QWebFrame* originatingFrame, struct miqt_string msg) { + QString msg_QString = QString::fromUtf8(msg.data, msg.len); + + QWebPage::javaScriptAlert(originatingFrame, msg_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__JavaScriptConfirm = 0; + + // Subclass to allow providing a Go implementation + virtual bool javaScriptConfirm(QWebFrame* originatingFrame, const QString& msg) override { + if (handle__JavaScriptConfirm == 0) { + return QWebPage::javaScriptConfirm(originatingFrame, msg); + } + + QWebFrame* sigval1 = originatingFrame; + const QString msg_ret = msg; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray msg_b = msg_ret.toUtf8(); + struct miqt_string msg_ms; + msg_ms.len = msg_b.length(); + msg_ms.data = static_cast(malloc(msg_ms.len)); + memcpy(msg_ms.data, msg_b.data(), msg_ms.len); + struct miqt_string sigval2 = msg_ms; + + bool callback_return_value = miqt_exec_callback_QWebPage_JavaScriptConfirm(this, handle__JavaScriptConfirm, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_JavaScriptConfirm(QWebFrame* originatingFrame, struct miqt_string msg) { + QString msg_QString = QString::fromUtf8(msg.data, msg.len); + + return QWebPage::javaScriptConfirm(originatingFrame, msg_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__JavaScriptConsoleMessage = 0; + + // Subclass to allow providing a Go implementation + virtual void javaScriptConsoleMessage(const QString& message, int lineNumber, const QString& sourceID) override { + if (handle__JavaScriptConsoleMessage == 0) { + QWebPage::javaScriptConsoleMessage(message, lineNumber, sourceID); + return; + } + + const QString message_ret = message; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray message_b = message_ret.toUtf8(); + struct miqt_string message_ms; + message_ms.len = message_b.length(); + message_ms.data = static_cast(malloc(message_ms.len)); + memcpy(message_ms.data, message_b.data(), message_ms.len); + struct miqt_string sigval1 = message_ms; + int sigval2 = lineNumber; + const QString sourceID_ret = sourceID; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray sourceID_b = sourceID_ret.toUtf8(); + struct miqt_string sourceID_ms; + sourceID_ms.len = sourceID_b.length(); + sourceID_ms.data = static_cast(malloc(sourceID_ms.len)); + memcpy(sourceID_ms.data, sourceID_b.data(), sourceID_ms.len); + struct miqt_string sigval3 = sourceID_ms; + + miqt_exec_callback_QWebPage_JavaScriptConsoleMessage(this, handle__JavaScriptConsoleMessage, sigval1, sigval2, sigval3); + + + } + + // Wrapper to allow calling protected method + void virtualbase_JavaScriptConsoleMessage(struct miqt_string message, int lineNumber, struct miqt_string sourceID) { + QString message_QString = QString::fromUtf8(message.data, message.len); + QString sourceID_QString = QString::fromUtf8(sourceID.data, sourceID.len); + + QWebPage::javaScriptConsoleMessage(message_QString, static_cast(lineNumber), sourceID_QString); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__UserAgentForUrl = 0; + + // Subclass to allow providing a Go implementation + virtual QString userAgentForUrl(const QUrl& url) const override { + if (handle__UserAgentForUrl == 0) { + return QWebPage::userAgentForUrl(url); + } + + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + + struct miqt_string callback_return_value = miqt_exec_callback_QWebPage_UserAgentForUrl(const_cast(this), handle__UserAgentForUrl, 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_UserAgentForUrl(QUrl* url) const { + + QString _ret = QWebPage::userAgentForUrl(*url); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + 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__EventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__EventFilter == 0) { + return QWebPage::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWebPage_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWebPage::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) { + QWebPage::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWebPage_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWebPage::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) { + QWebPage::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWebPage_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWebPage::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) { + QWebPage::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebPage_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWebPage::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) { + QWebPage::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebPage_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWebPage::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) { + QWebPage::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebPage_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWebPage::disconnectNotify(*signal); + + } + +}; + +void QWebPage_new(QWebPage** outptr_QWebPage, QObject** outptr_QObject) { + MiqtVirtualQWebPage* ret = new MiqtVirtualQWebPage(); + *outptr_QWebPage = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebPage_new2(QObject* parent, QWebPage** outptr_QWebPage, QObject** outptr_QObject) { + MiqtVirtualQWebPage* ret = new MiqtVirtualQWebPage(parent); + *outptr_QWebPage = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QWebPage_MetaObject(const QWebPage* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebPage_Metacast(QWebPage* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebPage_Tr(const char* s) { + QString _ret = QWebPage::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebPage_TrUtf8(const char* s) { + QString _ret = QWebPage::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QWebFrame* QWebPage_MainFrame(const QWebPage* self) { + return self->mainFrame(); +} + +QWebFrame* QWebPage_CurrentFrame(const QWebPage* self) { + return self->currentFrame(); +} + +QWebFrame* QWebPage_FrameAt(const QWebPage* self, QPoint* pos) { + return self->frameAt(*pos); +} + +QWebHistory* QWebPage_History(const QWebPage* self) { + return self->history(); +} + +QWebSettings* QWebPage_Settings(const QWebPage* self) { + return self->settings(); +} + +void QWebPage_SetView(QWebPage* self, QWidget* view) { + self->setView(view); +} + +QWidget* QWebPage_View(const QWebPage* self) { + return self->view(); +} + +bool QWebPage_IsModified(const QWebPage* self) { + return self->isModified(); +} + +QUndoStack* QWebPage_UndoStack(const QWebPage* self) { + return self->undoStack(); +} + +void QWebPage_SetNetworkAccessManager(QWebPage* self, QNetworkAccessManager* manager) { + self->setNetworkAccessManager(manager); +} + +QNetworkAccessManager* QWebPage_NetworkAccessManager(const QWebPage* self) { + return self->networkAccessManager(); +} + +void QWebPage_SetPluginFactory(QWebPage* self, QWebPluginFactory* factory) { + self->setPluginFactory(factory); +} + +QWebPluginFactory* QWebPage_PluginFactory(const QWebPage* self) { + return self->pluginFactory(); +} + +unsigned long long QWebPage_TotalBytes(const QWebPage* self) { + quint64 _ret = self->totalBytes(); + return static_cast(_ret); +} + +unsigned long long QWebPage_BytesReceived(const QWebPage* self) { + quint64 _ret = self->bytesReceived(); + return static_cast(_ret); +} + +int QWebPage_VisibilityState(const QWebPage* self) { + QWebPage::VisibilityState _ret = self->visibilityState(); + return static_cast(_ret); +} + +void QWebPage_SetVisibilityState(QWebPage* self, int visibilityState) { + self->setVisibilityState(static_cast(visibilityState)); +} + +bool QWebPage_RecentlyAudible(const QWebPage* self) { + return self->recentlyAudible(); +} + +bool QWebPage_HasSelection(const QWebPage* self) { + return self->hasSelection(); +} + +struct miqt_string QWebPage_SelectedText(const QWebPage* self) { + QString _ret = self->selectedText(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebPage_SelectedHtml(const QWebPage* self) { + QString _ret = self->selectedHtml(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QAction* QWebPage_Action(const QWebPage* self, int action) { + return self->action(static_cast(action)); +} + +QAction* QWebPage_CustomAction(const QWebPage* self, int action) { + return self->customAction(static_cast(action)); +} + +void QWebPage_TriggerAction(QWebPage* self, int action, bool checked) { + self->triggerAction(static_cast(action), checked); +} + +void QWebPage_SetDevicePixelRatio(QWebPage* self, double ratio) { + self->setDevicePixelRatio(static_cast(ratio)); +} + +double QWebPage_DevicePixelRatio(const QWebPage* self) { + qreal _ret = self->devicePixelRatio(); + return static_cast(_ret); +} + +void QWebPage_ResetDevicePixelRatio(QWebPage* self) { + self->resetDevicePixelRatio(); +} + +QSize* QWebPage_ViewportSize(const QWebPage* self) { + return new QSize(self->viewportSize()); +} + +void QWebPage_SetViewportSize(const QWebPage* self, QSize* size) { + self->setViewportSize(*size); +} + +QWebPage__ViewportAttributes* QWebPage_ViewportAttributesForSize(const QWebPage* self, QSize* availableSize) { + return new QWebPage::ViewportAttributes(self->viewportAttributesForSize(*availableSize)); +} + +QSize* QWebPage_PreferredContentsSize(const QWebPage* self) { + return new QSize(self->preferredContentsSize()); +} + +void QWebPage_SetPreferredContentsSize(const QWebPage* self, QSize* size) { + self->setPreferredContentsSize(*size); +} + +void QWebPage_SetActualVisibleContentRect(const QWebPage* self, QRect* rect) { + self->setActualVisibleContentRect(*rect); +} + +bool QWebPage_Event(QWebPage* self, QEvent* param1) { + return self->event(param1); +} + +bool QWebPage_FocusNextPrevChild(QWebPage* self, bool next) { + return self->focusNextPrevChild(next); +} + +QVariant* QWebPage_InputMethodQuery(const QWebPage* self, int property) { + return new QVariant(self->inputMethodQuery(static_cast(property))); +} + +bool QWebPage_FindText(QWebPage* self, struct miqt_string subString) { + QString subString_QString = QString::fromUtf8(subString.data, subString.len); + return self->findText(subString_QString); +} + +void QWebPage_SetForwardUnsupportedContent(QWebPage* self, bool forward) { + self->setForwardUnsupportedContent(forward); +} + +bool QWebPage_ForwardUnsupportedContent(const QWebPage* self) { + return self->forwardUnsupportedContent(); +} + +void QWebPage_SetLinkDelegationPolicy(QWebPage* self, int policy) { + self->setLinkDelegationPolicy(static_cast(policy)); +} + +int QWebPage_LinkDelegationPolicy(const QWebPage* self) { + QWebPage::LinkDelegationPolicy _ret = self->linkDelegationPolicy(); + return static_cast(_ret); +} + +void QWebPage_SetPalette(QWebPage* self, QPalette* palette) { + self->setPalette(*palette); +} + +QPalette* QWebPage_Palette(const QWebPage* self) { + return new QPalette(self->palette()); +} + +void QWebPage_SetContentEditable(QWebPage* self, bool editable) { + self->setContentEditable(editable); +} + +bool QWebPage_IsContentEditable(const QWebPage* self) { + return self->isContentEditable(); +} + +bool QWebPage_SwallowContextMenuEvent(QWebPage* self, QContextMenuEvent* event) { + return self->swallowContextMenuEvent(event); +} + +void QWebPage_UpdatePositionDependentActions(QWebPage* self, QPoint* pos) { + self->updatePositionDependentActions(*pos); +} + +QMenu* QWebPage_CreateStandardContextMenu(QWebPage* self) { + return self->createStandardContextMenu(); +} + +void QWebPage_SetFeaturePermission(QWebPage* self, QWebFrame* frame, int feature, int policy) { + self->setFeaturePermission(frame, static_cast(feature), static_cast(policy)); +} + +struct miqt_array /* of struct miqt_string */ QWebPage_SupportedContentTypes(const QWebPage* self) { + QStringList _ret = self->supportedContentTypes(); + // 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; +} + +bool QWebPage_SupportsContentType(const QWebPage* self, struct miqt_string mimeType) { + QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); + return self->supportsContentType(mimeType_QString); +} + +bool QWebPage_Extension(QWebPage* self, int extension, QWebPage__ExtensionOption* option, QWebPage__ExtensionReturn* output) { + return self->extension(static_cast(extension), option, output); +} + +bool QWebPage_SupportsExtension(const QWebPage* self, int extension) { + return self->supportsExtension(static_cast(extension)); +} + +bool QWebPage_ShouldInterruptJavaScript(QWebPage* self) { + return self->shouldInterruptJavaScript(); +} + +void QWebPage_LoadStarted(QWebPage* self) { + self->loadStarted(); +} + +void QWebPage_connect_LoadStarted(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::loadStarted), self, [=]() { + miqt_exec_callback_QWebPage_LoadStarted(slot); + }); +} + +void QWebPage_LoadProgress(QWebPage* self, int progress) { + self->loadProgress(static_cast(progress)); +} + +void QWebPage_connect_LoadProgress(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::loadProgress), self, [=](int progress) { + int sigval1 = progress; + miqt_exec_callback_QWebPage_LoadProgress(slot, sigval1); + }); +} + +void QWebPage_LoadFinished(QWebPage* self, bool ok) { + self->loadFinished(ok); +} + +void QWebPage_connect_LoadFinished(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::loadFinished), self, [=](bool ok) { + bool sigval1 = ok; + miqt_exec_callback_QWebPage_LoadFinished(slot, sigval1); + }); +} + +void QWebPage_LinkHovered(QWebPage* self, struct miqt_string link, struct miqt_string title, struct miqt_string textContent) { + QString link_QString = QString::fromUtf8(link.data, link.len); + QString title_QString = QString::fromUtf8(title.data, title.len); + QString textContent_QString = QString::fromUtf8(textContent.data, textContent.len); + self->linkHovered(link_QString, title_QString, textContent_QString); +} + +void QWebPage_connect_LinkHovered(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::linkHovered), self, [=](const QString& link, const QString& title, const QString& textContent) { + const QString link_ret = link; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray link_b = link_ret.toUtf8(); + struct miqt_string link_ms; + link_ms.len = link_b.length(); + link_ms.data = static_cast(malloc(link_ms.len)); + memcpy(link_ms.data, link_b.data(), link_ms.len); + struct miqt_string sigval1 = link_ms; + const QString title_ret = title; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray title_b = title_ret.toUtf8(); + struct miqt_string title_ms; + title_ms.len = title_b.length(); + title_ms.data = static_cast(malloc(title_ms.len)); + memcpy(title_ms.data, title_b.data(), title_ms.len); + struct miqt_string sigval2 = title_ms; + const QString textContent_ret = textContent; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray textContent_b = textContent_ret.toUtf8(); + struct miqt_string textContent_ms; + textContent_ms.len = textContent_b.length(); + textContent_ms.data = static_cast(malloc(textContent_ms.len)); + memcpy(textContent_ms.data, textContent_b.data(), textContent_ms.len); + struct miqt_string sigval3 = textContent_ms; + miqt_exec_callback_QWebPage_LinkHovered(slot, sigval1, sigval2, sigval3); + }); +} + +void QWebPage_StatusBarMessage(QWebPage* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->statusBarMessage(text_QString); +} + +void QWebPage_connect_StatusBarMessage(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::statusBarMessage), self, [=](const QString& text) { + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + 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_QWebPage_StatusBarMessage(slot, sigval1); + }); +} + +void QWebPage_SelectionChanged(QWebPage* self) { + self->selectionChanged(); +} + +void QWebPage_connect_SelectionChanged(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::selectionChanged), self, [=]() { + miqt_exec_callback_QWebPage_SelectionChanged(slot); + }); +} + +void QWebPage_FrameCreated(QWebPage* self, QWebFrame* frame) { + self->frameCreated(frame); +} + +void QWebPage_connect_FrameCreated(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::frameCreated), self, [=](QWebFrame* frame) { + QWebFrame* sigval1 = frame; + miqt_exec_callback_QWebPage_FrameCreated(slot, sigval1); + }); +} + +void QWebPage_GeometryChangeRequested(QWebPage* self, QRect* geom) { + self->geometryChangeRequested(*geom); +} + +void QWebPage_connect_GeometryChangeRequested(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::geometryChangeRequested), self, [=](const QRect& geom) { + const QRect& geom_ret = geom; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&geom_ret); + miqt_exec_callback_QWebPage_GeometryChangeRequested(slot, sigval1); + }); +} + +void QWebPage_RepaintRequested(QWebPage* self, QRect* dirtyRect) { + self->repaintRequested(*dirtyRect); +} + +void QWebPage_connect_RepaintRequested(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::repaintRequested), self, [=](const QRect& dirtyRect) { + const QRect& dirtyRect_ret = dirtyRect; + // Cast returned reference into pointer + QRect* sigval1 = const_cast(&dirtyRect_ret); + miqt_exec_callback_QWebPage_RepaintRequested(slot, sigval1); + }); +} + +void QWebPage_ScrollRequested(QWebPage* self, int dx, int dy, QRect* scrollViewRect) { + self->scrollRequested(static_cast(dx), static_cast(dy), *scrollViewRect); +} + +void QWebPage_connect_ScrollRequested(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::scrollRequested), self, [=](int dx, int dy, const QRect& scrollViewRect) { + int sigval1 = dx; + int sigval2 = dy; + const QRect& scrollViewRect_ret = scrollViewRect; + // Cast returned reference into pointer + QRect* sigval3 = const_cast(&scrollViewRect_ret); + miqt_exec_callback_QWebPage_ScrollRequested(slot, sigval1, sigval2, sigval3); + }); +} + +void QWebPage_WindowCloseRequested(QWebPage* self) { + self->windowCloseRequested(); +} + +void QWebPage_connect_WindowCloseRequested(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::windowCloseRequested), self, [=]() { + miqt_exec_callback_QWebPage_WindowCloseRequested(slot); + }); +} + +void QWebPage_PrintRequested(QWebPage* self, QWebFrame* frame) { + self->printRequested(frame); +} + +void QWebPage_connect_PrintRequested(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::printRequested), self, [=](QWebFrame* frame) { + QWebFrame* sigval1 = frame; + miqt_exec_callback_QWebPage_PrintRequested(slot, sigval1); + }); +} + +void QWebPage_LinkClicked(QWebPage* self, QUrl* url) { + self->linkClicked(*url); +} + +void QWebPage_connect_LinkClicked(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::linkClicked), self, [=](const QUrl& url) { + const QUrl& url_ret = url; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(&url_ret); + miqt_exec_callback_QWebPage_LinkClicked(slot, sigval1); + }); +} + +void QWebPage_ToolBarVisibilityChangeRequested(QWebPage* self, bool visible) { + self->toolBarVisibilityChangeRequested(visible); +} + +void QWebPage_connect_ToolBarVisibilityChangeRequested(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::toolBarVisibilityChangeRequested), self, [=](bool visible) { + bool sigval1 = visible; + miqt_exec_callback_QWebPage_ToolBarVisibilityChangeRequested(slot, sigval1); + }); +} + +void QWebPage_StatusBarVisibilityChangeRequested(QWebPage* self, bool visible) { + self->statusBarVisibilityChangeRequested(visible); +} + +void QWebPage_connect_StatusBarVisibilityChangeRequested(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::statusBarVisibilityChangeRequested), self, [=](bool visible) { + bool sigval1 = visible; + miqt_exec_callback_QWebPage_StatusBarVisibilityChangeRequested(slot, sigval1); + }); +} + +void QWebPage_MenuBarVisibilityChangeRequested(QWebPage* self, bool visible) { + self->menuBarVisibilityChangeRequested(visible); +} + +void QWebPage_connect_MenuBarVisibilityChangeRequested(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::menuBarVisibilityChangeRequested), self, [=](bool visible) { + bool sigval1 = visible; + miqt_exec_callback_QWebPage_MenuBarVisibilityChangeRequested(slot, sigval1); + }); +} + +void QWebPage_UnsupportedContent(QWebPage* self, QNetworkReply* reply) { + self->unsupportedContent(reply); +} + +void QWebPage_connect_UnsupportedContent(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::unsupportedContent), self, [=](QNetworkReply* reply) { + QNetworkReply* sigval1 = reply; + miqt_exec_callback_QWebPage_UnsupportedContent(slot, sigval1); + }); +} + +void QWebPage_DownloadRequested(QWebPage* self, QNetworkRequest* request) { + self->downloadRequested(*request); +} + +void QWebPage_connect_DownloadRequested(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::downloadRequested), self, [=](const QNetworkRequest& request) { + const QNetworkRequest& request_ret = request; + // Cast returned reference into pointer + QNetworkRequest* sigval1 = const_cast(&request_ret); + miqt_exec_callback_QWebPage_DownloadRequested(slot, sigval1); + }); +} + +void QWebPage_FocusedElementChanged(QWebPage* self, QWebElement* element) { + self->focusedElementChanged(*element); +} + +void QWebPage_connect_FocusedElementChanged(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::focusedElementChanged), self, [=](const QWebElement& element) { + const QWebElement& element_ret = element; + // Cast returned reference into pointer + QWebElement* sigval1 = const_cast(&element_ret); + miqt_exec_callback_QWebPage_FocusedElementChanged(slot, sigval1); + }); +} + +void QWebPage_MicroFocusChanged(QWebPage* self) { + self->microFocusChanged(); +} + +void QWebPage_connect_MicroFocusChanged(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::microFocusChanged), self, [=]() { + miqt_exec_callback_QWebPage_MicroFocusChanged(slot); + }); +} + +void QWebPage_ContentsChanged(QWebPage* self) { + self->contentsChanged(); +} + +void QWebPage_connect_ContentsChanged(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::contentsChanged), self, [=]() { + miqt_exec_callback_QWebPage_ContentsChanged(slot); + }); +} + +void QWebPage_DatabaseQuotaExceeded(QWebPage* self, QWebFrame* frame, struct miqt_string databaseName) { + QString databaseName_QString = QString::fromUtf8(databaseName.data, databaseName.len); + self->databaseQuotaExceeded(frame, databaseName_QString); +} + +void QWebPage_connect_DatabaseQuotaExceeded(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::databaseQuotaExceeded), self, [=](QWebFrame* frame, QString databaseName) { + QWebFrame* sigval1 = frame; + QString databaseName_ret = databaseName; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray databaseName_b = databaseName_ret.toUtf8(); + struct miqt_string databaseName_ms; + databaseName_ms.len = databaseName_b.length(); + databaseName_ms.data = static_cast(malloc(databaseName_ms.len)); + memcpy(databaseName_ms.data, databaseName_b.data(), databaseName_ms.len); + struct miqt_string sigval2 = databaseName_ms; + miqt_exec_callback_QWebPage_DatabaseQuotaExceeded(slot, sigval1, sigval2); + }); +} + +void QWebPage_ApplicationCacheQuotaExceeded(QWebPage* self, QWebSecurityOrigin* origin, unsigned long long defaultOriginQuota, unsigned long long totalSpaceNeeded) { + self->applicationCacheQuotaExceeded(origin, static_cast(defaultOriginQuota), static_cast(totalSpaceNeeded)); +} + +void QWebPage_connect_ApplicationCacheQuotaExceeded(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::applicationCacheQuotaExceeded), self, [=](QWebSecurityOrigin* origin, quint64 defaultOriginQuota, quint64 totalSpaceNeeded) { + QWebSecurityOrigin* sigval1 = origin; + quint64 defaultOriginQuota_ret = defaultOriginQuota; + unsigned long long sigval2 = static_cast(defaultOriginQuota_ret); + quint64 totalSpaceNeeded_ret = totalSpaceNeeded; + unsigned long long sigval3 = static_cast(totalSpaceNeeded_ret); + miqt_exec_callback_QWebPage_ApplicationCacheQuotaExceeded(slot, sigval1, sigval2, sigval3); + }); +} + +void QWebPage_SaveFrameStateRequested(QWebPage* self, QWebFrame* frame, QWebHistoryItem* item) { + self->saveFrameStateRequested(frame, item); +} + +void QWebPage_connect_SaveFrameStateRequested(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::saveFrameStateRequested), self, [=](QWebFrame* frame, QWebHistoryItem* item) { + QWebFrame* sigval1 = frame; + QWebHistoryItem* sigval2 = item; + miqt_exec_callback_QWebPage_SaveFrameStateRequested(slot, sigval1, sigval2); + }); +} + +void QWebPage_RestoreFrameStateRequested(QWebPage* self, QWebFrame* frame) { + self->restoreFrameStateRequested(frame); +} + +void QWebPage_connect_RestoreFrameStateRequested(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::restoreFrameStateRequested), self, [=](QWebFrame* frame) { + QWebFrame* sigval1 = frame; + miqt_exec_callback_QWebPage_RestoreFrameStateRequested(slot, sigval1); + }); +} + +void QWebPage_ViewportChangeRequested(QWebPage* self) { + self->viewportChangeRequested(); +} + +void QWebPage_connect_ViewportChangeRequested(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::viewportChangeRequested), self, [=]() { + miqt_exec_callback_QWebPage_ViewportChangeRequested(slot); + }); +} + +void QWebPage_FeaturePermissionRequested(QWebPage* self, QWebFrame* frame, int feature) { + self->featurePermissionRequested(frame, static_cast(feature)); +} + +void QWebPage_connect_FeaturePermissionRequested(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::featurePermissionRequested), self, [=](QWebFrame* frame, QWebPage::Feature feature) { + QWebFrame* sigval1 = frame; + QWebPage::Feature feature_ret = feature; + int sigval2 = static_cast(feature_ret); + miqt_exec_callback_QWebPage_FeaturePermissionRequested(slot, sigval1, sigval2); + }); +} + +void QWebPage_FeaturePermissionRequestCanceled(QWebPage* self, QWebFrame* frame, int feature) { + self->featurePermissionRequestCanceled(frame, static_cast(feature)); +} + +void QWebPage_connect_FeaturePermissionRequestCanceled(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::featurePermissionRequestCanceled), self, [=](QWebFrame* frame, QWebPage::Feature feature) { + QWebFrame* sigval1 = frame; + QWebPage::Feature feature_ret = feature; + int sigval2 = static_cast(feature_ret); + miqt_exec_callback_QWebPage_FeaturePermissionRequestCanceled(slot, sigval1, sigval2); + }); +} + +void QWebPage_FullScreenRequested(QWebPage* self, QWebFullScreenRequest* fullScreenRequest) { + self->fullScreenRequested(*fullScreenRequest); +} + +void QWebPage_connect_FullScreenRequested(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::fullScreenRequested), self, [=](QWebFullScreenRequest fullScreenRequest) { + QWebFullScreenRequest* sigval1 = new QWebFullScreenRequest(fullScreenRequest); + miqt_exec_callback_QWebPage_FullScreenRequested(slot, sigval1); + }); +} + +void QWebPage_ConsoleMessageReceived(QWebPage* self, int source, int level, struct miqt_string message, int lineNumber, struct miqt_string sourceID) { + QString message_QString = QString::fromUtf8(message.data, message.len); + QString sourceID_QString = QString::fromUtf8(sourceID.data, sourceID.len); + self->consoleMessageReceived(static_cast(source), static_cast(level), message_QString, static_cast(lineNumber), sourceID_QString); +} + +void QWebPage_connect_ConsoleMessageReceived(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::consoleMessageReceived), self, [=](QWebPage::MessageSource source, QWebPage::MessageLevel level, const QString& message, int lineNumber, const QString& sourceID) { + QWebPage::MessageSource source_ret = source; + int sigval1 = static_cast(source_ret); + QWebPage::MessageLevel level_ret = level; + int sigval2 = static_cast(level_ret); + const QString message_ret = message; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray message_b = message_ret.toUtf8(); + struct miqt_string message_ms; + message_ms.len = message_b.length(); + message_ms.data = static_cast(malloc(message_ms.len)); + memcpy(message_ms.data, message_b.data(), message_ms.len); + struct miqt_string sigval3 = message_ms; + int sigval4 = lineNumber; + const QString sourceID_ret = sourceID; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray sourceID_b = sourceID_ret.toUtf8(); + struct miqt_string sourceID_ms; + sourceID_ms.len = sourceID_b.length(); + sourceID_ms.data = static_cast(malloc(sourceID_ms.len)); + memcpy(sourceID_ms.data, sourceID_b.data(), sourceID_ms.len); + struct miqt_string sigval5 = sourceID_ms; + miqt_exec_callback_QWebPage_ConsoleMessageReceived(slot, sigval1, sigval2, sigval3, sigval4, sigval5); + }); +} + +void QWebPage_RecentlyAudibleChanged(QWebPage* self, bool recentlyAudible) { + self->recentlyAudibleChanged(recentlyAudible); +} + +void QWebPage_connect_RecentlyAudibleChanged(QWebPage* self, intptr_t slot) { + MiqtVirtualQWebPage::connect(self, static_cast(&QWebPage::recentlyAudibleChanged), self, [=](bool recentlyAudible) { + bool sigval1 = recentlyAudible; + miqt_exec_callback_QWebPage_RecentlyAudibleChanged(slot, sigval1); + }); +} + +struct miqt_string QWebPage_Tr2(const char* s, const char* c) { + QString _ret = QWebPage::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebPage_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebPage::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebPage_TrUtf82(const char* s, const char* c) { + QString _ret = QWebPage::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebPage_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebPage::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QWebPage_FindText2(QWebPage* self, struct miqt_string subString, int options) { + QString subString_QString = QString::fromUtf8(subString.data, subString.len); + return self->findText(subString_QString, static_cast(options)); +} + +void QWebPage_override_virtual_TriggerAction(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__TriggerAction = slot; +} + +void QWebPage_virtualbase_TriggerAction(void* self, int action, bool checked) { + ( (MiqtVirtualQWebPage*)(self) )->virtualbase_TriggerAction(action, checked); +} + +void QWebPage_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__Event = slot; +} + +bool QWebPage_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQWebPage*)(self) )->virtualbase_Event(param1); +} + +void QWebPage_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__Extension = slot; +} + +bool QWebPage_virtualbase_Extension(void* self, int extension, QWebPage__ExtensionOption* option, QWebPage__ExtensionReturn* output) { + return ( (MiqtVirtualQWebPage*)(self) )->virtualbase_Extension(extension, option, output); +} + +void QWebPage_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__SupportsExtension = slot; +} + +bool QWebPage_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQWebPage*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QWebPage_override_virtual_ShouldInterruptJavaScript(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__ShouldInterruptJavaScript = slot; +} + +bool QWebPage_virtualbase_ShouldInterruptJavaScript(void* self) { + return ( (MiqtVirtualQWebPage*)(self) )->virtualbase_ShouldInterruptJavaScript(); +} + +void QWebPage_override_virtual_CreateWindow(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__CreateWindow = slot; +} + +QWebPage* QWebPage_virtualbase_CreateWindow(void* self, int typeVal) { + return ( (MiqtVirtualQWebPage*)(self) )->virtualbase_CreateWindow(typeVal); +} + +void QWebPage_override_virtual_CreatePlugin(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__CreatePlugin = slot; +} + +QObject* QWebPage_virtualbase_CreatePlugin(void* self, struct miqt_string classid, QUrl* url, struct miqt_array /* of struct miqt_string */ paramNames, struct miqt_array /* of struct miqt_string */ paramValues) { + return ( (MiqtVirtualQWebPage*)(self) )->virtualbase_CreatePlugin(classid, url, paramNames, paramValues); +} + +void QWebPage_override_virtual_AcceptNavigationRequest(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__AcceptNavigationRequest = slot; +} + +bool QWebPage_virtualbase_AcceptNavigationRequest(void* self, QWebFrame* frame, QNetworkRequest* request, int typeVal) { + return ( (MiqtVirtualQWebPage*)(self) )->virtualbase_AcceptNavigationRequest(frame, request, typeVal); +} + +void QWebPage_override_virtual_ChooseFile(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__ChooseFile = slot; +} + +struct miqt_string QWebPage_virtualbase_ChooseFile(void* self, QWebFrame* originatingFrame, struct miqt_string oldFile) { + return ( (MiqtVirtualQWebPage*)(self) )->virtualbase_ChooseFile(originatingFrame, oldFile); +} + +void QWebPage_override_virtual_JavaScriptAlert(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__JavaScriptAlert = slot; +} + +void QWebPage_virtualbase_JavaScriptAlert(void* self, QWebFrame* originatingFrame, struct miqt_string msg) { + ( (MiqtVirtualQWebPage*)(self) )->virtualbase_JavaScriptAlert(originatingFrame, msg); +} + +void QWebPage_override_virtual_JavaScriptConfirm(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__JavaScriptConfirm = slot; +} + +bool QWebPage_virtualbase_JavaScriptConfirm(void* self, QWebFrame* originatingFrame, struct miqt_string msg) { + return ( (MiqtVirtualQWebPage*)(self) )->virtualbase_JavaScriptConfirm(originatingFrame, msg); +} + +void QWebPage_override_virtual_JavaScriptConsoleMessage(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__JavaScriptConsoleMessage = slot; +} + +void QWebPage_virtualbase_JavaScriptConsoleMessage(void* self, struct miqt_string message, int lineNumber, struct miqt_string sourceID) { + ( (MiqtVirtualQWebPage*)(self) )->virtualbase_JavaScriptConsoleMessage(message, lineNumber, sourceID); +} + +void QWebPage_override_virtual_UserAgentForUrl(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__UserAgentForUrl = slot; +} + +struct miqt_string QWebPage_virtualbase_UserAgentForUrl(const void* self, QUrl* url) { + return ( (const MiqtVirtualQWebPage*)(self) )->virtualbase_UserAgentForUrl(url); +} + +void QWebPage_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__EventFilter = slot; +} + +bool QWebPage_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWebPage*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWebPage_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__TimerEvent = slot; +} + +void QWebPage_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWebPage*)(self) )->virtualbase_TimerEvent(event); +} + +void QWebPage_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__ChildEvent = slot; +} + +void QWebPage_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWebPage*)(self) )->virtualbase_ChildEvent(event); +} + +void QWebPage_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__CustomEvent = slot; +} + +void QWebPage_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebPage*)(self) )->virtualbase_CustomEvent(event); +} + +void QWebPage_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__ConnectNotify = slot; +} + +void QWebPage_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebPage*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWebPage_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebPage*)(self) )->handle__DisconnectNotify = slot; +} + +void QWebPage_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebPage*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWebPage_Delete(QWebPage* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebPage__ViewportAttributes_new(QWebPage__ViewportAttributes** outptr_QWebPage__ViewportAttributes) { + QWebPage::ViewportAttributes* ret = new QWebPage::ViewportAttributes(); + *outptr_QWebPage__ViewportAttributes = ret; +} + +void QWebPage__ViewportAttributes_new2(QWebPage__ViewportAttributes* other, QWebPage__ViewportAttributes** outptr_QWebPage__ViewportAttributes) { + QWebPage::ViewportAttributes* ret = new QWebPage::ViewportAttributes(*other); + *outptr_QWebPage__ViewportAttributes = ret; +} + +void QWebPage__ViewportAttributes_OperatorAssign(QWebPage__ViewportAttributes* self, QWebPage__ViewportAttributes* other) { + self->operator=(*other); +} + +double QWebPage__ViewportAttributes_InitialScaleFactor(const QWebPage__ViewportAttributes* self) { + qreal _ret = self->initialScaleFactor(); + return static_cast(_ret); +} + +double QWebPage__ViewportAttributes_MinimumScaleFactor(const QWebPage__ViewportAttributes* self) { + qreal _ret = self->minimumScaleFactor(); + return static_cast(_ret); +} + +double QWebPage__ViewportAttributes_MaximumScaleFactor(const QWebPage__ViewportAttributes* self) { + qreal _ret = self->maximumScaleFactor(); + return static_cast(_ret); +} + +double QWebPage__ViewportAttributes_DevicePixelRatio(const QWebPage__ViewportAttributes* self) { + qreal _ret = self->devicePixelRatio(); + return static_cast(_ret); +} + +bool QWebPage__ViewportAttributes_IsUserScalable(const QWebPage__ViewportAttributes* self) { + return self->isUserScalable(); +} + +bool QWebPage__ViewportAttributes_IsValid(const QWebPage__ViewportAttributes* self) { + return self->isValid(); +} + +QSizeF* QWebPage__ViewportAttributes_Size(const QWebPage__ViewportAttributes* self) { + return new QSizeF(self->size()); +} + +void QWebPage__ViewportAttributes_Delete(QWebPage__ViewportAttributes* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebPage__ExtensionOption_new(QWebPage__ExtensionOption* param1, QWebPage__ExtensionOption** outptr_QWebPage__ExtensionOption) { + QWebPage::ExtensionOption* ret = new QWebPage::ExtensionOption(*param1); + *outptr_QWebPage__ExtensionOption = ret; +} + +void QWebPage__ExtensionOption_Delete(QWebPage__ExtensionOption* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebPage__ExtensionReturn_new(QWebPage__ExtensionReturn* param1, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn) { + QWebPage::ExtensionReturn* ret = new QWebPage::ExtensionReturn(*param1); + *outptr_QWebPage__ExtensionReturn = ret; +} + +void QWebPage__ExtensionReturn_new2(QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn) { + QWebPage::ExtensionReturn* ret = new QWebPage::ExtensionReturn(); + *outptr_QWebPage__ExtensionReturn = ret; +} + +void QWebPage__ExtensionReturn_Delete(QWebPage__ExtensionReturn* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebPage__ChooseMultipleFilesExtensionOption_Delete(QWebPage__ChooseMultipleFilesExtensionOption* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebPage__ChooseMultipleFilesExtensionReturn_Delete(QWebPage__ChooseMultipleFilesExtensionReturn* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebPage__ErrorPageExtensionOption_new(QWebPage__ErrorPageExtensionOption* param1, QWebPage__ErrorPageExtensionOption** outptr_QWebPage__ErrorPageExtensionOption, QWebPage__ExtensionOption** outptr_QWebPage__ExtensionOption) { + QWebPage::ErrorPageExtensionOption* ret = new QWebPage::ErrorPageExtensionOption(*param1); + *outptr_QWebPage__ErrorPageExtensionOption = ret; + *outptr_QWebPage__ExtensionOption = static_cast(ret); +} + +void QWebPage__ErrorPageExtensionOption_OperatorAssign(QWebPage__ErrorPageExtensionOption* self, QWebPage__ErrorPageExtensionOption* param1) { + self->operator=(*param1); +} + +void QWebPage__ErrorPageExtensionOption_Delete(QWebPage__ErrorPageExtensionOption* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebPage__ErrorPageExtensionReturn_new(QWebPage__ErrorPageExtensionReturn** outptr_QWebPage__ErrorPageExtensionReturn, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn) { + QWebPage::ErrorPageExtensionReturn* ret = new QWebPage::ErrorPageExtensionReturn(); + *outptr_QWebPage__ErrorPageExtensionReturn = ret; + *outptr_QWebPage__ExtensionReturn = static_cast(ret); +} + +void QWebPage__ErrorPageExtensionReturn_new2(QWebPage__ErrorPageExtensionReturn* param1, QWebPage__ErrorPageExtensionReturn** outptr_QWebPage__ErrorPageExtensionReturn, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn) { + QWebPage::ErrorPageExtensionReturn* ret = new QWebPage::ErrorPageExtensionReturn(*param1); + *outptr_QWebPage__ErrorPageExtensionReturn = ret; + *outptr_QWebPage__ExtensionReturn = static_cast(ret); +} + +void QWebPage__ErrorPageExtensionReturn_OperatorAssign(QWebPage__ErrorPageExtensionReturn* self, QWebPage__ErrorPageExtensionReturn* param1) { + self->operator=(*param1); +} + +void QWebPage__ErrorPageExtensionReturn_Delete(QWebPage__ErrorPageExtensionReturn* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webkit/gen_qwebpage.go b/qt/webkit/gen_qwebpage.go new file mode 100644 index 00000000..9dff8f7d --- /dev/null +++ b/qt/webkit/gen_qwebpage.go @@ -0,0 +1,2343 @@ +package webkit + +/* + +#include "gen_qwebpage.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "github.com/mappu/miqt/qt/network" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebPage__NavigationType int + +const ( + QWebPage__NavigationTypeLinkClicked QWebPage__NavigationType = 0 + QWebPage__NavigationTypeFormSubmitted QWebPage__NavigationType = 1 + QWebPage__NavigationTypeBackOrForward QWebPage__NavigationType = 2 + QWebPage__NavigationTypeReload QWebPage__NavigationType = 3 + QWebPage__NavigationTypeFormResubmitted QWebPage__NavigationType = 4 + QWebPage__NavigationTypeOther QWebPage__NavigationType = 5 +) + +type QWebPage__WebAction int + +const ( + QWebPage__NoWebAction QWebPage__WebAction = -1 + QWebPage__OpenLink QWebPage__WebAction = 0 + QWebPage__OpenLinkInNewWindow QWebPage__WebAction = 1 + QWebPage__OpenFrameInNewWindow QWebPage__WebAction = 2 + QWebPage__DownloadLinkToDisk QWebPage__WebAction = 3 + QWebPage__CopyLinkToClipboard QWebPage__WebAction = 4 + QWebPage__OpenImageInNewWindow QWebPage__WebAction = 5 + QWebPage__DownloadImageToDisk QWebPage__WebAction = 6 + QWebPage__CopyImageToClipboard QWebPage__WebAction = 7 + QWebPage__Back QWebPage__WebAction = 8 + QWebPage__Forward QWebPage__WebAction = 9 + QWebPage__Stop QWebPage__WebAction = 10 + QWebPage__Reload QWebPage__WebAction = 11 + QWebPage__Cut QWebPage__WebAction = 12 + QWebPage__Copy QWebPage__WebAction = 13 + QWebPage__Paste QWebPage__WebAction = 14 + QWebPage__Undo QWebPage__WebAction = 15 + QWebPage__Redo QWebPage__WebAction = 16 + QWebPage__MoveToNextChar QWebPage__WebAction = 17 + QWebPage__MoveToPreviousChar QWebPage__WebAction = 18 + QWebPage__MoveToNextWord QWebPage__WebAction = 19 + QWebPage__MoveToPreviousWord QWebPage__WebAction = 20 + QWebPage__MoveToNextLine QWebPage__WebAction = 21 + QWebPage__MoveToPreviousLine QWebPage__WebAction = 22 + QWebPage__MoveToStartOfLine QWebPage__WebAction = 23 + QWebPage__MoveToEndOfLine QWebPage__WebAction = 24 + QWebPage__MoveToStartOfBlock QWebPage__WebAction = 25 + QWebPage__MoveToEndOfBlock QWebPage__WebAction = 26 + QWebPage__MoveToStartOfDocument QWebPage__WebAction = 27 + QWebPage__MoveToEndOfDocument QWebPage__WebAction = 28 + QWebPage__SelectNextChar QWebPage__WebAction = 29 + QWebPage__SelectPreviousChar QWebPage__WebAction = 30 + QWebPage__SelectNextWord QWebPage__WebAction = 31 + QWebPage__SelectPreviousWord QWebPage__WebAction = 32 + QWebPage__SelectNextLine QWebPage__WebAction = 33 + QWebPage__SelectPreviousLine QWebPage__WebAction = 34 + QWebPage__SelectStartOfLine QWebPage__WebAction = 35 + QWebPage__SelectEndOfLine QWebPage__WebAction = 36 + QWebPage__SelectStartOfBlock QWebPage__WebAction = 37 + QWebPage__SelectEndOfBlock QWebPage__WebAction = 38 + QWebPage__SelectStartOfDocument QWebPage__WebAction = 39 + QWebPage__SelectEndOfDocument QWebPage__WebAction = 40 + QWebPage__DeleteStartOfWord QWebPage__WebAction = 41 + QWebPage__DeleteEndOfWord QWebPage__WebAction = 42 + QWebPage__SetTextDirectionDefault QWebPage__WebAction = 43 + QWebPage__SetTextDirectionLeftToRight QWebPage__WebAction = 44 + QWebPage__SetTextDirectionRightToLeft QWebPage__WebAction = 45 + QWebPage__ToggleBold QWebPage__WebAction = 46 + QWebPage__ToggleItalic QWebPage__WebAction = 47 + QWebPage__ToggleUnderline QWebPage__WebAction = 48 + QWebPage__InspectElement QWebPage__WebAction = 49 + QWebPage__InsertParagraphSeparator QWebPage__WebAction = 50 + QWebPage__InsertLineSeparator QWebPage__WebAction = 51 + QWebPage__SelectAll QWebPage__WebAction = 52 + QWebPage__ReloadAndBypassCache QWebPage__WebAction = 53 + QWebPage__PasteAndMatchStyle QWebPage__WebAction = 54 + QWebPage__RemoveFormat QWebPage__WebAction = 55 + QWebPage__ToggleStrikethrough QWebPage__WebAction = 56 + QWebPage__ToggleSubscript QWebPage__WebAction = 57 + QWebPage__ToggleSuperscript QWebPage__WebAction = 58 + QWebPage__InsertUnorderedList QWebPage__WebAction = 59 + QWebPage__InsertOrderedList QWebPage__WebAction = 60 + QWebPage__Indent QWebPage__WebAction = 61 + QWebPage__Outdent QWebPage__WebAction = 62 + QWebPage__AlignCenter QWebPage__WebAction = 63 + QWebPage__AlignJustified QWebPage__WebAction = 64 + QWebPage__AlignLeft QWebPage__WebAction = 65 + QWebPage__AlignRight QWebPage__WebAction = 66 + QWebPage__StopScheduledPageRefresh QWebPage__WebAction = 67 + QWebPage__CopyImageUrlToClipboard QWebPage__WebAction = 68 + QWebPage__OpenLinkInThisWindow QWebPage__WebAction = 69 + QWebPage__DownloadMediaToDisk QWebPage__WebAction = 70 + QWebPage__CopyMediaUrlToClipboard QWebPage__WebAction = 71 + QWebPage__ToggleMediaControls QWebPage__WebAction = 72 + QWebPage__ToggleMediaLoop QWebPage__WebAction = 73 + QWebPage__ToggleMediaPlayPause QWebPage__WebAction = 74 + QWebPage__ToggleMediaMute QWebPage__WebAction = 75 + QWebPage__ToggleVideoFullscreen QWebPage__WebAction = 76 + QWebPage__RequestClose QWebPage__WebAction = 77 + QWebPage__Unselect QWebPage__WebAction = 78 + QWebPage__WebActionCount QWebPage__WebAction = 79 +) + +type QWebPage__FindFlag int + +const ( + QWebPage__FindBackward QWebPage__FindFlag = 1 + QWebPage__FindCaseSensitively QWebPage__FindFlag = 2 + QWebPage__FindWrapsAroundDocument QWebPage__FindFlag = 4 + QWebPage__HighlightAllOccurrences QWebPage__FindFlag = 8 + QWebPage__FindAtWordBeginningsOnly QWebPage__FindFlag = 16 + QWebPage__TreatMedialCapitalAsWordBeginning QWebPage__FindFlag = 32 + QWebPage__FindBeginsInSelection QWebPage__FindFlag = 64 + QWebPage__FindAtWordEndingsOnly QWebPage__FindFlag = 128 + QWebPage__FindExactMatchOnly QWebPage__FindFlag = 144 +) + +type QWebPage__LinkDelegationPolicy int + +const ( + QWebPage__DontDelegateLinks QWebPage__LinkDelegationPolicy = 0 + QWebPage__DelegateExternalLinks QWebPage__LinkDelegationPolicy = 1 + QWebPage__DelegateAllLinks QWebPage__LinkDelegationPolicy = 2 +) + +type QWebPage__WebWindowType int + +const ( + QWebPage__WebBrowserWindow QWebPage__WebWindowType = 0 + QWebPage__WebModalDialog QWebPage__WebWindowType = 1 +) + +type QWebPage__PermissionPolicy int + +const ( + QWebPage__PermissionUnknown QWebPage__PermissionPolicy = 0 + QWebPage__PermissionGrantedByUser QWebPage__PermissionPolicy = 1 + QWebPage__PermissionDeniedByUser QWebPage__PermissionPolicy = 2 +) + +type QWebPage__Feature int + +const ( + QWebPage__Notifications QWebPage__Feature = 0 + QWebPage__Geolocation QWebPage__Feature = 1 +) + +type QWebPage__VisibilityState int + +const ( + QWebPage__VisibilityStateVisible QWebPage__VisibilityState = 0 + QWebPage__VisibilityStateHidden QWebPage__VisibilityState = 1 + QWebPage__VisibilityStatePrerender QWebPage__VisibilityState = 2 + QWebPage__VisibilityStateUnloaded QWebPage__VisibilityState = 3 +) + +type QWebPage__MessageSource int + +const ( + QWebPage__XmlMessageSource QWebPage__MessageSource = 0 + QWebPage__JSMessageSource QWebPage__MessageSource = 1 + QWebPage__NetworkMessageSource QWebPage__MessageSource = 2 + QWebPage__ConsoleAPIMessageSource QWebPage__MessageSource = 3 + QWebPage__StorageMessageSource QWebPage__MessageSource = 4 + QWebPage__AppCacheMessageSource QWebPage__MessageSource = 5 + QWebPage__RenderingMessageSource QWebPage__MessageSource = 6 + QWebPage__CSSMessageSource QWebPage__MessageSource = 7 + QWebPage__SecurityMessageSource QWebPage__MessageSource = 8 + QWebPage__ContentBlockerMessageSource QWebPage__MessageSource = 9 + QWebPage__OtherMessageSource QWebPage__MessageSource = 10 +) + +type QWebPage__MessageLevel int + +const ( + QWebPage__LogMessageLevel QWebPage__MessageLevel = 1 + QWebPage__WarningMessageLevel QWebPage__MessageLevel = 2 + QWebPage__ErrorMessageLevel QWebPage__MessageLevel = 3 + QWebPage__DebugMessageLevel QWebPage__MessageLevel = 4 + QWebPage__InfoMessageLevel QWebPage__MessageLevel = 5 +) + +type QWebPage__Extension int + +const ( + QWebPage__ChooseMultipleFilesExtension QWebPage__Extension = 0 + QWebPage__ErrorPageExtension QWebPage__Extension = 1 +) + +type QWebPage__ErrorDomain int + +const ( + QWebPage__QtNetwork QWebPage__ErrorDomain = 0 + QWebPage__Http QWebPage__ErrorDomain = 1 + QWebPage__WebKit QWebPage__ErrorDomain = 2 +) + +type QWebPage struct { + h *C.QWebPage + isSubclass bool + *qt.QObject +} + +func (this *QWebPage) cPointer() *C.QWebPage { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebPage) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebPage constructs the type using only CGO pointers. +func newQWebPage(h *C.QWebPage, h_QObject *C.QObject) *QWebPage { + if h == nil { + return nil + } + return &QWebPage{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebPage constructs the type using only unsafe pointers. +func UnsafeNewQWebPage(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebPage { + if h == nil { + return nil + } + + return &QWebPage{h: (*C.QWebPage)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +// NewQWebPage constructs a new QWebPage object. +func NewQWebPage() *QWebPage { + var outptr_QWebPage *C.QWebPage = nil + var outptr_QObject *C.QObject = nil + + C.QWebPage_new(&outptr_QWebPage, &outptr_QObject) + ret := newQWebPage(outptr_QWebPage, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebPage2 constructs a new QWebPage object. +func NewQWebPage2(parent *qt.QObject) *QWebPage { + var outptr_QWebPage *C.QWebPage = nil + var outptr_QObject *C.QObject = nil + + C.QWebPage_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebPage, &outptr_QObject) + ret := newQWebPage(outptr_QWebPage, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QWebPage) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebPage_MetaObject(this.h))) +} + +func (this *QWebPage) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebPage_Metacast(this.h, param1_Cstring)) +} + +func QWebPage_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebPage_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebPage_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebPage_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebPage) MainFrame() *QWebFrame { + return UnsafeNewQWebFrame(unsafe.Pointer(C.QWebPage_MainFrame(this.h)), nil) +} + +func (this *QWebPage) CurrentFrame() *QWebFrame { + return UnsafeNewQWebFrame(unsafe.Pointer(C.QWebPage_CurrentFrame(this.h)), nil) +} + +func (this *QWebPage) FrameAt(pos *qt.QPoint) *QWebFrame { + return UnsafeNewQWebFrame(unsafe.Pointer(C.QWebPage_FrameAt(this.h, (*C.QPoint)(pos.UnsafePointer()))), nil) +} + +func (this *QWebPage) History() *QWebHistory { + return UnsafeNewQWebHistory(unsafe.Pointer(C.QWebPage_History(this.h))) +} + +func (this *QWebPage) Settings() *QWebSettings { + return UnsafeNewQWebSettings(unsafe.Pointer(C.QWebPage_Settings(this.h))) +} + +func (this *QWebPage) SetView(view *qt.QWidget) { + C.QWebPage_SetView(this.h, (*C.QWidget)(view.UnsafePointer())) +} + +func (this *QWebPage) View() *qt.QWidget { + return qt.UnsafeNewQWidget(unsafe.Pointer(C.QWebPage_View(this.h)), nil, nil) +} + +func (this *QWebPage) IsModified() bool { + return (bool)(C.QWebPage_IsModified(this.h)) +} + +func (this *QWebPage) UndoStack() *qt.QUndoStack { + return qt.UnsafeNewQUndoStack(unsafe.Pointer(C.QWebPage_UndoStack(this.h)), nil) +} + +func (this *QWebPage) SetNetworkAccessManager(manager *network.QNetworkAccessManager) { + C.QWebPage_SetNetworkAccessManager(this.h, (*C.QNetworkAccessManager)(manager.UnsafePointer())) +} + +func (this *QWebPage) NetworkAccessManager() *network.QNetworkAccessManager { + return network.UnsafeNewQNetworkAccessManager(unsafe.Pointer(C.QWebPage_NetworkAccessManager(this.h)), nil) +} + +func (this *QWebPage) SetPluginFactory(factory *QWebPluginFactory) { + C.QWebPage_SetPluginFactory(this.h, factory.cPointer()) +} + +func (this *QWebPage) PluginFactory() *QWebPluginFactory { + return UnsafeNewQWebPluginFactory(unsafe.Pointer(C.QWebPage_PluginFactory(this.h)), nil) +} + +func (this *QWebPage) TotalBytes() uint64 { + return (uint64)(C.QWebPage_TotalBytes(this.h)) +} + +func (this *QWebPage) BytesReceived() uint64 { + return (uint64)(C.QWebPage_BytesReceived(this.h)) +} + +func (this *QWebPage) VisibilityState() QWebPage__VisibilityState { + return (QWebPage__VisibilityState)(C.QWebPage_VisibilityState(this.h)) +} + +func (this *QWebPage) SetVisibilityState(visibilityState QWebPage__VisibilityState) { + C.QWebPage_SetVisibilityState(this.h, (C.int)(visibilityState)) +} + +func (this *QWebPage) RecentlyAudible() bool { + return (bool)(C.QWebPage_RecentlyAudible(this.h)) +} + +func (this *QWebPage) HasSelection() bool { + return (bool)(C.QWebPage_HasSelection(this.h)) +} + +func (this *QWebPage) SelectedText() string { + var _ms C.struct_miqt_string = C.QWebPage_SelectedText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebPage) SelectedHtml() string { + var _ms C.struct_miqt_string = C.QWebPage_SelectedHtml(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebPage) Action(action QWebPage__WebAction) *qt.QAction { + return qt.UnsafeNewQAction(unsafe.Pointer(C.QWebPage_Action(this.h, (C.int)(action))), nil) +} + +func (this *QWebPage) CustomAction(action int) *qt.QAction { + return qt.UnsafeNewQAction(unsafe.Pointer(C.QWebPage_CustomAction(this.h, (C.int)(action))), nil) +} + +func (this *QWebPage) TriggerAction(action QWebPage__WebAction, checked bool) { + C.QWebPage_TriggerAction(this.h, (C.int)(action), (C.bool)(checked)) +} + +func (this *QWebPage) SetDevicePixelRatio(ratio float64) { + C.QWebPage_SetDevicePixelRatio(this.h, (C.double)(ratio)) +} + +func (this *QWebPage) DevicePixelRatio() float64 { + return (float64)(C.QWebPage_DevicePixelRatio(this.h)) +} + +func (this *QWebPage) ResetDevicePixelRatio() { + C.QWebPage_ResetDevicePixelRatio(this.h) +} + +func (this *QWebPage) ViewportSize() *qt.QSize { + _ret := C.QWebPage_ViewportSize(this.h) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebPage) SetViewportSize(size *qt.QSize) { + C.QWebPage_SetViewportSize(this.h, (*C.QSize)(size.UnsafePointer())) +} + +func (this *QWebPage) ViewportAttributesForSize(availableSize *qt.QSize) *QWebPage__ViewportAttributes { + _ret := C.QWebPage_ViewportAttributesForSize(this.h, (*C.QSize)(availableSize.UnsafePointer())) + _goptr := newQWebPage__ViewportAttributes(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebPage) PreferredContentsSize() *qt.QSize { + _ret := C.QWebPage_PreferredContentsSize(this.h) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebPage) SetPreferredContentsSize(size *qt.QSize) { + C.QWebPage_SetPreferredContentsSize(this.h, (*C.QSize)(size.UnsafePointer())) +} + +func (this *QWebPage) SetActualVisibleContentRect(rect *qt.QRect) { + C.QWebPage_SetActualVisibleContentRect(this.h, (*C.QRect)(rect.UnsafePointer())) +} + +func (this *QWebPage) Event(param1 *qt.QEvent) bool { + return (bool)(C.QWebPage_Event(this.h, (*C.QEvent)(param1.UnsafePointer()))) +} + +func (this *QWebPage) FocusNextPrevChild(next bool) bool { + return (bool)(C.QWebPage_FocusNextPrevChild(this.h, (C.bool)(next))) +} + +func (this *QWebPage) InputMethodQuery(property qt.InputMethodQuery) *qt.QVariant { + _ret := C.QWebPage_InputMethodQuery(this.h, (C.int)(property)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebPage) FindText(subString string) bool { + subString_ms := C.struct_miqt_string{} + subString_ms.data = C.CString(subString) + subString_ms.len = C.size_t(len(subString)) + defer C.free(unsafe.Pointer(subString_ms.data)) + return (bool)(C.QWebPage_FindText(this.h, subString_ms)) +} + +func (this *QWebPage) SetForwardUnsupportedContent(forward bool) { + C.QWebPage_SetForwardUnsupportedContent(this.h, (C.bool)(forward)) +} + +func (this *QWebPage) ForwardUnsupportedContent() bool { + return (bool)(C.QWebPage_ForwardUnsupportedContent(this.h)) +} + +func (this *QWebPage) SetLinkDelegationPolicy(policy QWebPage__LinkDelegationPolicy) { + C.QWebPage_SetLinkDelegationPolicy(this.h, (C.int)(policy)) +} + +func (this *QWebPage) LinkDelegationPolicy() QWebPage__LinkDelegationPolicy { + return (QWebPage__LinkDelegationPolicy)(C.QWebPage_LinkDelegationPolicy(this.h)) +} + +func (this *QWebPage) SetPalette(palette *qt.QPalette) { + C.QWebPage_SetPalette(this.h, (*C.QPalette)(palette.UnsafePointer())) +} + +func (this *QWebPage) Palette() *qt.QPalette { + _ret := C.QWebPage_Palette(this.h) + _goptr := qt.UnsafeNewQPalette(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebPage) SetContentEditable(editable bool) { + C.QWebPage_SetContentEditable(this.h, (C.bool)(editable)) +} + +func (this *QWebPage) IsContentEditable() bool { + return (bool)(C.QWebPage_IsContentEditable(this.h)) +} + +func (this *QWebPage) SwallowContextMenuEvent(event *qt.QContextMenuEvent) bool { + return (bool)(C.QWebPage_SwallowContextMenuEvent(this.h, (*C.QContextMenuEvent)(event.UnsafePointer()))) +} + +func (this *QWebPage) UpdatePositionDependentActions(pos *qt.QPoint) { + C.QWebPage_UpdatePositionDependentActions(this.h, (*C.QPoint)(pos.UnsafePointer())) +} + +func (this *QWebPage) CreateStandardContextMenu() *qt.QMenu { + return qt.UnsafeNewQMenu(unsafe.Pointer(C.QWebPage_CreateStandardContextMenu(this.h)), nil, nil, nil) +} + +func (this *QWebPage) SetFeaturePermission(frame *QWebFrame, feature QWebPage__Feature, policy QWebPage__PermissionPolicy) { + C.QWebPage_SetFeaturePermission(this.h, frame.cPointer(), (C.int)(feature), (C.int)(policy)) +} + +func (this *QWebPage) SupportedContentTypes() []string { + var _ma C.struct_miqt_array = C.QWebPage_SupportedContentTypes(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 *QWebPage) SupportsContentType(mimeType string) bool { + mimeType_ms := C.struct_miqt_string{} + mimeType_ms.data = C.CString(mimeType) + mimeType_ms.len = C.size_t(len(mimeType)) + defer C.free(unsafe.Pointer(mimeType_ms.data)) + return (bool)(C.QWebPage_SupportsContentType(this.h, mimeType_ms)) +} + +func (this *QWebPage) Extension(extension QWebPage__Extension, option *QWebPage__ExtensionOption, output *QWebPage__ExtensionReturn) bool { + return (bool)(C.QWebPage_Extension(this.h, (C.int)(extension), option.cPointer(), output.cPointer())) +} + +func (this *QWebPage) SupportsExtension(extension QWebPage__Extension) bool { + return (bool)(C.QWebPage_SupportsExtension(this.h, (C.int)(extension))) +} + +func (this *QWebPage) ShouldInterruptJavaScript() bool { + return (bool)(C.QWebPage_ShouldInterruptJavaScript(this.h)) +} + +func (this *QWebPage) LoadStarted() { + C.QWebPage_LoadStarted(this.h) +} +func (this *QWebPage) OnLoadStarted(slot func()) { + C.QWebPage_connect_LoadStarted(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_LoadStarted +func miqt_exec_callback_QWebPage_LoadStarted(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 *QWebPage) LoadProgress(progress int) { + C.QWebPage_LoadProgress(this.h, (C.int)(progress)) +} +func (this *QWebPage) OnLoadProgress(slot func(progress int)) { + C.QWebPage_connect_LoadProgress(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_LoadProgress +func miqt_exec_callback_QWebPage_LoadProgress(cb C.intptr_t, progress C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(progress int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(progress) + + gofunc(slotval1) +} + +func (this *QWebPage) LoadFinished(ok bool) { + C.QWebPage_LoadFinished(this.h, (C.bool)(ok)) +} +func (this *QWebPage) OnLoadFinished(slot func(ok bool)) { + C.QWebPage_connect_LoadFinished(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_LoadFinished +func miqt_exec_callback_QWebPage_LoadFinished(cb C.intptr_t, ok C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(ok bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(ok) + + gofunc(slotval1) +} + +func (this *QWebPage) LinkHovered(link string, title string, textContent string) { + link_ms := C.struct_miqt_string{} + link_ms.data = C.CString(link) + link_ms.len = C.size_t(len(link)) + defer C.free(unsafe.Pointer(link_ms.data)) + title_ms := C.struct_miqt_string{} + title_ms.data = C.CString(title) + title_ms.len = C.size_t(len(title)) + defer C.free(unsafe.Pointer(title_ms.data)) + textContent_ms := C.struct_miqt_string{} + textContent_ms.data = C.CString(textContent) + textContent_ms.len = C.size_t(len(textContent)) + defer C.free(unsafe.Pointer(textContent_ms.data)) + C.QWebPage_LinkHovered(this.h, link_ms, title_ms, textContent_ms) +} +func (this *QWebPage) OnLinkHovered(slot func(link string, title string, textContent string)) { + C.QWebPage_connect_LinkHovered(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_LinkHovered +func miqt_exec_callback_QWebPage_LinkHovered(cb C.intptr_t, link C.struct_miqt_string, title C.struct_miqt_string, textContent C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(link string, title string, textContent string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var link_ms C.struct_miqt_string = link + link_ret := C.GoStringN(link_ms.data, C.int(int64(link_ms.len))) + C.free(unsafe.Pointer(link_ms.data)) + slotval1 := link_ret + var title_ms C.struct_miqt_string = title + title_ret := C.GoStringN(title_ms.data, C.int(int64(title_ms.len))) + C.free(unsafe.Pointer(title_ms.data)) + slotval2 := title_ret + var textContent_ms C.struct_miqt_string = textContent + textContent_ret := C.GoStringN(textContent_ms.data, C.int(int64(textContent_ms.len))) + C.free(unsafe.Pointer(textContent_ms.data)) + slotval3 := textContent_ret + + gofunc(slotval1, slotval2, slotval3) +} + +func (this *QWebPage) StatusBarMessage(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.QWebPage_StatusBarMessage(this.h, text_ms) +} +func (this *QWebPage) OnStatusBarMessage(slot func(text string)) { + C.QWebPage_connect_StatusBarMessage(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_StatusBarMessage +func miqt_exec_callback_QWebPage_StatusBarMessage(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 *QWebPage) SelectionChanged() { + C.QWebPage_SelectionChanged(this.h) +} +func (this *QWebPage) OnSelectionChanged(slot func()) { + C.QWebPage_connect_SelectionChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_SelectionChanged +func miqt_exec_callback_QWebPage_SelectionChanged(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 *QWebPage) FrameCreated(frame *QWebFrame) { + C.QWebPage_FrameCreated(this.h, frame.cPointer()) +} +func (this *QWebPage) OnFrameCreated(slot func(frame *QWebFrame)) { + C.QWebPage_connect_FrameCreated(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_FrameCreated +func miqt_exec_callback_QWebPage_FrameCreated(cb C.intptr_t, frame *C.QWebFrame) { + gofunc, ok := cgo.Handle(cb).Value().(func(frame *QWebFrame)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebFrame(unsafe.Pointer(frame), nil) + + gofunc(slotval1) +} + +func (this *QWebPage) GeometryChangeRequested(geom *qt.QRect) { + C.QWebPage_GeometryChangeRequested(this.h, (*C.QRect)(geom.UnsafePointer())) +} +func (this *QWebPage) OnGeometryChangeRequested(slot func(geom *qt.QRect)) { + C.QWebPage_connect_GeometryChangeRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_GeometryChangeRequested +func miqt_exec_callback_QWebPage_GeometryChangeRequested(cb C.intptr_t, geom *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(geom *qt.QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQRect(unsafe.Pointer(geom)) + + gofunc(slotval1) +} + +func (this *QWebPage) RepaintRequested(dirtyRect *qt.QRect) { + C.QWebPage_RepaintRequested(this.h, (*C.QRect)(dirtyRect.UnsafePointer())) +} +func (this *QWebPage) OnRepaintRequested(slot func(dirtyRect *qt.QRect)) { + C.QWebPage_connect_RepaintRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_RepaintRequested +func miqt_exec_callback_QWebPage_RepaintRequested(cb C.intptr_t, dirtyRect *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(dirtyRect *qt.QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQRect(unsafe.Pointer(dirtyRect)) + + gofunc(slotval1) +} + +func (this *QWebPage) ScrollRequested(dx int, dy int, scrollViewRect *qt.QRect) { + C.QWebPage_ScrollRequested(this.h, (C.int)(dx), (C.int)(dy), (*C.QRect)(scrollViewRect.UnsafePointer())) +} +func (this *QWebPage) OnScrollRequested(slot func(dx int, dy int, scrollViewRect *qt.QRect)) { + C.QWebPage_connect_ScrollRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_ScrollRequested +func miqt_exec_callback_QWebPage_ScrollRequested(cb C.intptr_t, dx C.int, dy C.int, scrollViewRect *C.QRect) { + gofunc, ok := cgo.Handle(cb).Value().(func(dx int, dy int, scrollViewRect *qt.QRect)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + slotval3 := qt.UnsafeNewQRect(unsafe.Pointer(scrollViewRect)) + + gofunc(slotval1, slotval2, slotval3) +} + +func (this *QWebPage) WindowCloseRequested() { + C.QWebPage_WindowCloseRequested(this.h) +} +func (this *QWebPage) OnWindowCloseRequested(slot func()) { + C.QWebPage_connect_WindowCloseRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_WindowCloseRequested +func miqt_exec_callback_QWebPage_WindowCloseRequested(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 *QWebPage) PrintRequested(frame *QWebFrame) { + C.QWebPage_PrintRequested(this.h, frame.cPointer()) +} +func (this *QWebPage) OnPrintRequested(slot func(frame *QWebFrame)) { + C.QWebPage_connect_PrintRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_PrintRequested +func miqt_exec_callback_QWebPage_PrintRequested(cb C.intptr_t, frame *C.QWebFrame) { + gofunc, ok := cgo.Handle(cb).Value().(func(frame *QWebFrame)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebFrame(unsafe.Pointer(frame), nil) + + gofunc(slotval1) +} + +func (this *QWebPage) LinkClicked(url *qt.QUrl) { + C.QWebPage_LinkClicked(this.h, (*C.QUrl)(url.UnsafePointer())) +} +func (this *QWebPage) OnLinkClicked(slot func(url *qt.QUrl)) { + C.QWebPage_connect_LinkClicked(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_LinkClicked +func miqt_exec_callback_QWebPage_LinkClicked(cb C.intptr_t, url *C.QUrl) { + gofunc, ok := cgo.Handle(cb).Value().(func(url *qt.QUrl)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(url)) + + gofunc(slotval1) +} + +func (this *QWebPage) ToolBarVisibilityChangeRequested(visible bool) { + C.QWebPage_ToolBarVisibilityChangeRequested(this.h, (C.bool)(visible)) +} +func (this *QWebPage) OnToolBarVisibilityChangeRequested(slot func(visible bool)) { + C.QWebPage_connect_ToolBarVisibilityChangeRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_ToolBarVisibilityChangeRequested +func miqt_exec_callback_QWebPage_ToolBarVisibilityChangeRequested(cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc(slotval1) +} + +func (this *QWebPage) StatusBarVisibilityChangeRequested(visible bool) { + C.QWebPage_StatusBarVisibilityChangeRequested(this.h, (C.bool)(visible)) +} +func (this *QWebPage) OnStatusBarVisibilityChangeRequested(slot func(visible bool)) { + C.QWebPage_connect_StatusBarVisibilityChangeRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_StatusBarVisibilityChangeRequested +func miqt_exec_callback_QWebPage_StatusBarVisibilityChangeRequested(cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc(slotval1) +} + +func (this *QWebPage) MenuBarVisibilityChangeRequested(visible bool) { + C.QWebPage_MenuBarVisibilityChangeRequested(this.h, (C.bool)(visible)) +} +func (this *QWebPage) OnMenuBarVisibilityChangeRequested(slot func(visible bool)) { + C.QWebPage_connect_MenuBarVisibilityChangeRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_MenuBarVisibilityChangeRequested +func miqt_exec_callback_QWebPage_MenuBarVisibilityChangeRequested(cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc(slotval1) +} + +func (this *QWebPage) UnsupportedContent(reply *network.QNetworkReply) { + C.QWebPage_UnsupportedContent(this.h, (*C.QNetworkReply)(reply.UnsafePointer())) +} +func (this *QWebPage) OnUnsupportedContent(slot func(reply *network.QNetworkReply)) { + C.QWebPage_connect_UnsupportedContent(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_UnsupportedContent +func miqt_exec_callback_QWebPage_UnsupportedContent(cb C.intptr_t, reply *C.QNetworkReply) { + gofunc, ok := cgo.Handle(cb).Value().(func(reply *network.QNetworkReply)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := network.UnsafeNewQNetworkReply(unsafe.Pointer(reply), nil, nil) + + gofunc(slotval1) +} + +func (this *QWebPage) DownloadRequested(request *network.QNetworkRequest) { + C.QWebPage_DownloadRequested(this.h, (*C.QNetworkRequest)(request.UnsafePointer())) +} +func (this *QWebPage) OnDownloadRequested(slot func(request *network.QNetworkRequest)) { + C.QWebPage_connect_DownloadRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_DownloadRequested +func miqt_exec_callback_QWebPage_DownloadRequested(cb C.intptr_t, request *C.QNetworkRequest) { + gofunc, ok := cgo.Handle(cb).Value().(func(request *network.QNetworkRequest)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := network.UnsafeNewQNetworkRequest(unsafe.Pointer(request)) + + gofunc(slotval1) +} + +func (this *QWebPage) FocusedElementChanged(element *QWebElement) { + C.QWebPage_FocusedElementChanged(this.h, element.cPointer()) +} +func (this *QWebPage) OnFocusedElementChanged(slot func(element *QWebElement)) { + C.QWebPage_connect_FocusedElementChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_FocusedElementChanged +func miqt_exec_callback_QWebPage_FocusedElementChanged(cb C.intptr_t, element *C.QWebElement) { + gofunc, ok := cgo.Handle(cb).Value().(func(element *QWebElement)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebElement(unsafe.Pointer(element)) + + gofunc(slotval1) +} + +func (this *QWebPage) MicroFocusChanged() { + C.QWebPage_MicroFocusChanged(this.h) +} +func (this *QWebPage) OnMicroFocusChanged(slot func()) { + C.QWebPage_connect_MicroFocusChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_MicroFocusChanged +func miqt_exec_callback_QWebPage_MicroFocusChanged(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 *QWebPage) ContentsChanged() { + C.QWebPage_ContentsChanged(this.h) +} +func (this *QWebPage) OnContentsChanged(slot func()) { + C.QWebPage_connect_ContentsChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_ContentsChanged +func miqt_exec_callback_QWebPage_ContentsChanged(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 *QWebPage) DatabaseQuotaExceeded(frame *QWebFrame, databaseName string) { + databaseName_ms := C.struct_miqt_string{} + databaseName_ms.data = C.CString(databaseName) + databaseName_ms.len = C.size_t(len(databaseName)) + defer C.free(unsafe.Pointer(databaseName_ms.data)) + C.QWebPage_DatabaseQuotaExceeded(this.h, frame.cPointer(), databaseName_ms) +} +func (this *QWebPage) OnDatabaseQuotaExceeded(slot func(frame *QWebFrame, databaseName string)) { + C.QWebPage_connect_DatabaseQuotaExceeded(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_DatabaseQuotaExceeded +func miqt_exec_callback_QWebPage_DatabaseQuotaExceeded(cb C.intptr_t, frame *C.QWebFrame, databaseName C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(frame *QWebFrame, databaseName string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebFrame(unsafe.Pointer(frame), nil) + var databaseName_ms C.struct_miqt_string = databaseName + databaseName_ret := C.GoStringN(databaseName_ms.data, C.int(int64(databaseName_ms.len))) + C.free(unsafe.Pointer(databaseName_ms.data)) + slotval2 := databaseName_ret + + gofunc(slotval1, slotval2) +} + +func (this *QWebPage) ApplicationCacheQuotaExceeded(origin *QWebSecurityOrigin, defaultOriginQuota uint64, totalSpaceNeeded uint64) { + C.QWebPage_ApplicationCacheQuotaExceeded(this.h, origin.cPointer(), (C.ulonglong)(defaultOriginQuota), (C.ulonglong)(totalSpaceNeeded)) +} +func (this *QWebPage) OnApplicationCacheQuotaExceeded(slot func(origin *QWebSecurityOrigin, defaultOriginQuota uint64, totalSpaceNeeded uint64)) { + C.QWebPage_connect_ApplicationCacheQuotaExceeded(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_ApplicationCacheQuotaExceeded +func miqt_exec_callback_QWebPage_ApplicationCacheQuotaExceeded(cb C.intptr_t, origin *C.QWebSecurityOrigin, defaultOriginQuota C.ulonglong, totalSpaceNeeded C.ulonglong) { + gofunc, ok := cgo.Handle(cb).Value().(func(origin *QWebSecurityOrigin, defaultOriginQuota uint64, totalSpaceNeeded uint64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebSecurityOrigin(unsafe.Pointer(origin)) + slotval2 := (uint64)(defaultOriginQuota) + + slotval3 := (uint64)(totalSpaceNeeded) + + gofunc(slotval1, slotval2, slotval3) +} + +func (this *QWebPage) SaveFrameStateRequested(frame *QWebFrame, item *QWebHistoryItem) { + C.QWebPage_SaveFrameStateRequested(this.h, frame.cPointer(), item.cPointer()) +} +func (this *QWebPage) OnSaveFrameStateRequested(slot func(frame *QWebFrame, item *QWebHistoryItem)) { + C.QWebPage_connect_SaveFrameStateRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_SaveFrameStateRequested +func miqt_exec_callback_QWebPage_SaveFrameStateRequested(cb C.intptr_t, frame *C.QWebFrame, item *C.QWebHistoryItem) { + gofunc, ok := cgo.Handle(cb).Value().(func(frame *QWebFrame, item *QWebHistoryItem)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebFrame(unsafe.Pointer(frame), nil) + slotval2 := UnsafeNewQWebHistoryItem(unsafe.Pointer(item)) + + gofunc(slotval1, slotval2) +} + +func (this *QWebPage) RestoreFrameStateRequested(frame *QWebFrame) { + C.QWebPage_RestoreFrameStateRequested(this.h, frame.cPointer()) +} +func (this *QWebPage) OnRestoreFrameStateRequested(slot func(frame *QWebFrame)) { + C.QWebPage_connect_RestoreFrameStateRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_RestoreFrameStateRequested +func miqt_exec_callback_QWebPage_RestoreFrameStateRequested(cb C.intptr_t, frame *C.QWebFrame) { + gofunc, ok := cgo.Handle(cb).Value().(func(frame *QWebFrame)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebFrame(unsafe.Pointer(frame), nil) + + gofunc(slotval1) +} + +func (this *QWebPage) ViewportChangeRequested() { + C.QWebPage_ViewportChangeRequested(this.h) +} +func (this *QWebPage) OnViewportChangeRequested(slot func()) { + C.QWebPage_connect_ViewportChangeRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_ViewportChangeRequested +func miqt_exec_callback_QWebPage_ViewportChangeRequested(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 *QWebPage) FeaturePermissionRequested(frame *QWebFrame, feature QWebPage__Feature) { + C.QWebPage_FeaturePermissionRequested(this.h, frame.cPointer(), (C.int)(feature)) +} +func (this *QWebPage) OnFeaturePermissionRequested(slot func(frame *QWebFrame, feature QWebPage__Feature)) { + C.QWebPage_connect_FeaturePermissionRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_FeaturePermissionRequested +func miqt_exec_callback_QWebPage_FeaturePermissionRequested(cb C.intptr_t, frame *C.QWebFrame, feature C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(frame *QWebFrame, feature QWebPage__Feature)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebFrame(unsafe.Pointer(frame), nil) + slotval2 := (QWebPage__Feature)(feature) + + gofunc(slotval1, slotval2) +} + +func (this *QWebPage) FeaturePermissionRequestCanceled(frame *QWebFrame, feature QWebPage__Feature) { + C.QWebPage_FeaturePermissionRequestCanceled(this.h, frame.cPointer(), (C.int)(feature)) +} +func (this *QWebPage) OnFeaturePermissionRequestCanceled(slot func(frame *QWebFrame, feature QWebPage__Feature)) { + C.QWebPage_connect_FeaturePermissionRequestCanceled(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_FeaturePermissionRequestCanceled +func miqt_exec_callback_QWebPage_FeaturePermissionRequestCanceled(cb C.intptr_t, frame *C.QWebFrame, feature C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(frame *QWebFrame, feature QWebPage__Feature)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebFrame(unsafe.Pointer(frame), nil) + slotval2 := (QWebPage__Feature)(feature) + + gofunc(slotval1, slotval2) +} + +func (this *QWebPage) FullScreenRequested(fullScreenRequest QWebFullScreenRequest) { + C.QWebPage_FullScreenRequested(this.h, fullScreenRequest.cPointer()) +} +func (this *QWebPage) OnFullScreenRequested(slot func(fullScreenRequest QWebFullScreenRequest)) { + C.QWebPage_connect_FullScreenRequested(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_FullScreenRequested +func miqt_exec_callback_QWebPage_FullScreenRequested(cb C.intptr_t, fullScreenRequest *C.QWebFullScreenRequest) { + gofunc, ok := cgo.Handle(cb).Value().(func(fullScreenRequest QWebFullScreenRequest)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + fullScreenRequest_ret := fullScreenRequest + fullScreenRequest_goptr := newQWebFullScreenRequest(fullScreenRequest_ret) + fullScreenRequest_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *fullScreenRequest_goptr + + gofunc(slotval1) +} + +func (this *QWebPage) ConsoleMessageReceived(source QWebPage__MessageSource, level QWebPage__MessageLevel, message string, lineNumber int, sourceID string) { + message_ms := C.struct_miqt_string{} + message_ms.data = C.CString(message) + message_ms.len = C.size_t(len(message)) + defer C.free(unsafe.Pointer(message_ms.data)) + sourceID_ms := C.struct_miqt_string{} + sourceID_ms.data = C.CString(sourceID) + sourceID_ms.len = C.size_t(len(sourceID)) + defer C.free(unsafe.Pointer(sourceID_ms.data)) + C.QWebPage_ConsoleMessageReceived(this.h, (C.int)(source), (C.int)(level), message_ms, (C.int)(lineNumber), sourceID_ms) +} +func (this *QWebPage) OnConsoleMessageReceived(slot func(source QWebPage__MessageSource, level QWebPage__MessageLevel, message string, lineNumber int, sourceID string)) { + C.QWebPage_connect_ConsoleMessageReceived(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_ConsoleMessageReceived +func miqt_exec_callback_QWebPage_ConsoleMessageReceived(cb C.intptr_t, source C.int, level C.int, message C.struct_miqt_string, lineNumber C.int, sourceID C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(source QWebPage__MessageSource, level QWebPage__MessageLevel, message string, lineNumber int, sourceID string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebPage__MessageSource)(source) + + slotval2 := (QWebPage__MessageLevel)(level) + + var message_ms C.struct_miqt_string = message + message_ret := C.GoStringN(message_ms.data, C.int(int64(message_ms.len))) + C.free(unsafe.Pointer(message_ms.data)) + slotval3 := message_ret + slotval4 := (int)(lineNumber) + + var sourceID_ms C.struct_miqt_string = sourceID + sourceID_ret := C.GoStringN(sourceID_ms.data, C.int(int64(sourceID_ms.len))) + C.free(unsafe.Pointer(sourceID_ms.data)) + slotval5 := sourceID_ret + + gofunc(slotval1, slotval2, slotval3, slotval4, slotval5) +} + +func (this *QWebPage) RecentlyAudibleChanged(recentlyAudible bool) { + C.QWebPage_RecentlyAudibleChanged(this.h, (C.bool)(recentlyAudible)) +} +func (this *QWebPage) OnRecentlyAudibleChanged(slot func(recentlyAudible bool)) { + C.QWebPage_connect_RecentlyAudibleChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_RecentlyAudibleChanged +func miqt_exec_callback_QWebPage_RecentlyAudibleChanged(cb C.intptr_t, recentlyAudible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(recentlyAudible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(recentlyAudible) + + gofunc(slotval1) +} + +func QWebPage_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebPage_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebPage_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebPage_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebPage_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebPage_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebPage_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebPage_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebPage) FindText2(subString string, options QWebPage__FindFlag) bool { + subString_ms := C.struct_miqt_string{} + subString_ms.data = C.CString(subString) + subString_ms.len = C.size_t(len(subString)) + defer C.free(unsafe.Pointer(subString_ms.data)) + return (bool)(C.QWebPage_FindText2(this.h, subString_ms, (C.int)(options))) +} + +func (this *QWebPage) callVirtualBase_TriggerAction(action QWebPage__WebAction, checked bool) { + + C.QWebPage_virtualbase_TriggerAction(unsafe.Pointer(this.h), (C.int)(action), (C.bool)(checked)) + +} +func (this *QWebPage) OnTriggerAction(slot func(super func(action QWebPage__WebAction, checked bool), action QWebPage__WebAction, checked bool)) { + C.QWebPage_override_virtual_TriggerAction(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_TriggerAction +func miqt_exec_callback_QWebPage_TriggerAction(self *C.QWebPage, cb C.intptr_t, action C.int, checked C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(action QWebPage__WebAction, checked bool), action QWebPage__WebAction, checked bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebPage__WebAction)(action) + + slotval2 := (bool)(checked) + + gofunc((&QWebPage{h: self}).callVirtualBase_TriggerAction, slotval1, slotval2) + +} + +func (this *QWebPage) callVirtualBase_Event(param1 *qt.QEvent) bool { + + return (bool)(C.QWebPage_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QWebPage) OnEvent(slot func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) { + C.QWebPage_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_Event +func miqt_exec_callback_QWebPage_Event(self *C.QWebPage, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QWebPage{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebPage) callVirtualBase_Extension(extension QWebPage__Extension, option *QWebPage__ExtensionOption, output *QWebPage__ExtensionReturn) bool { + + return (bool)(C.QWebPage_virtualbase_Extension(unsafe.Pointer(this.h), (C.int)(extension), option.cPointer(), output.cPointer())) + +} +func (this *QWebPage) OnExtension(slot func(super func(extension QWebPage__Extension, option *QWebPage__ExtensionOption, output *QWebPage__ExtensionReturn) bool, extension QWebPage__Extension, option *QWebPage__ExtensionOption, output *QWebPage__ExtensionReturn) bool) { + C.QWebPage_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_Extension +func miqt_exec_callback_QWebPage_Extension(self *C.QWebPage, cb C.intptr_t, extension C.int, option *C.QWebPage__ExtensionOption, output *C.QWebPage__ExtensionReturn) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QWebPage__Extension, option *QWebPage__ExtensionOption, output *QWebPage__ExtensionReturn) bool, extension QWebPage__Extension, option *QWebPage__ExtensionOption, output *QWebPage__ExtensionReturn) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebPage__Extension)(extension) + + slotval2 := UnsafeNewQWebPage__ExtensionOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQWebPage__ExtensionReturn(unsafe.Pointer(output)) + + virtualReturn := gofunc((&QWebPage{h: self}).callVirtualBase_Extension, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebPage) callVirtualBase_SupportsExtension(extension QWebPage__Extension) bool { + + return (bool)(C.QWebPage_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QWebPage) OnSupportsExtension(slot func(super func(extension QWebPage__Extension) bool, extension QWebPage__Extension) bool) { + C.QWebPage_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_SupportsExtension +func miqt_exec_callback_QWebPage_SupportsExtension(self *C.QWebPage, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QWebPage__Extension) bool, extension QWebPage__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebPage__Extension)(extension) + + virtualReturn := gofunc((&QWebPage{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebPage) callVirtualBase_ShouldInterruptJavaScript() bool { + + return (bool)(C.QWebPage_virtualbase_ShouldInterruptJavaScript(unsafe.Pointer(this.h))) + +} +func (this *QWebPage) OnShouldInterruptJavaScript(slot func(super func() bool) bool) { + C.QWebPage_override_virtual_ShouldInterruptJavaScript(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_ShouldInterruptJavaScript +func miqt_exec_callback_QWebPage_ShouldInterruptJavaScript(self *C.QWebPage, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebPage{h: self}).callVirtualBase_ShouldInterruptJavaScript) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebPage) callVirtualBase_CreateWindow(typeVal QWebPage__WebWindowType) *QWebPage { + + return UnsafeNewQWebPage(unsafe.Pointer(C.QWebPage_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal))), nil) +} +func (this *QWebPage) OnCreateWindow(slot func(super func(typeVal QWebPage__WebWindowType) *QWebPage, typeVal QWebPage__WebWindowType) *QWebPage) { + C.QWebPage_override_virtual_CreateWindow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_CreateWindow +func miqt_exec_callback_QWebPage_CreateWindow(self *C.QWebPage, cb C.intptr_t, typeVal C.int) *C.QWebPage { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal QWebPage__WebWindowType) *QWebPage, typeVal QWebPage__WebWindowType) *QWebPage) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebPage__WebWindowType)(typeVal) + + virtualReturn := gofunc((&QWebPage{h: self}).callVirtualBase_CreateWindow, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QWebPage) callVirtualBase_CreatePlugin(classid string, url *qt.QUrl, paramNames []string, paramValues []string) *qt.QObject { + classid_ms := C.struct_miqt_string{} + classid_ms.data = C.CString(classid) + classid_ms.len = C.size_t(len(classid)) + defer C.free(unsafe.Pointer(classid_ms.data)) + paramNames_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(paramNames)))) + defer C.free(unsafe.Pointer(paramNames_CArray)) + for i := range paramNames { + paramNames_i_ms := C.struct_miqt_string{} + paramNames_i_ms.data = C.CString(paramNames[i]) + paramNames_i_ms.len = C.size_t(len(paramNames[i])) + defer C.free(unsafe.Pointer(paramNames_i_ms.data)) + paramNames_CArray[i] = paramNames_i_ms + } + paramNames_ma := C.struct_miqt_array{len: C.size_t(len(paramNames)), data: unsafe.Pointer(paramNames_CArray)} + paramValues_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(paramValues)))) + defer C.free(unsafe.Pointer(paramValues_CArray)) + for i := range paramValues { + paramValues_i_ms := C.struct_miqt_string{} + paramValues_i_ms.data = C.CString(paramValues[i]) + paramValues_i_ms.len = C.size_t(len(paramValues[i])) + defer C.free(unsafe.Pointer(paramValues_i_ms.data)) + paramValues_CArray[i] = paramValues_i_ms + } + paramValues_ma := C.struct_miqt_array{len: C.size_t(len(paramValues)), data: unsafe.Pointer(paramValues_CArray)} + + return qt.UnsafeNewQObject(unsafe.Pointer(C.QWebPage_virtualbase_CreatePlugin(unsafe.Pointer(this.h), classid_ms, (*C.QUrl)(url.UnsafePointer()), paramNames_ma, paramValues_ma))) +} +func (this *QWebPage) OnCreatePlugin(slot func(super func(classid string, url *qt.QUrl, paramNames []string, paramValues []string) *qt.QObject, classid string, url *qt.QUrl, paramNames []string, paramValues []string) *qt.QObject) { + C.QWebPage_override_virtual_CreatePlugin(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_CreatePlugin +func miqt_exec_callback_QWebPage_CreatePlugin(self *C.QWebPage, cb C.intptr_t, classid C.struct_miqt_string, url *C.QUrl, paramNames C.struct_miqt_array, paramValues C.struct_miqt_array) *C.QObject { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(classid string, url *qt.QUrl, paramNames []string, paramValues []string) *qt.QObject, classid string, url *qt.QUrl, paramNames []string, paramValues []string) *qt.QObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var classid_ms C.struct_miqt_string = classid + classid_ret := C.GoStringN(classid_ms.data, C.int(int64(classid_ms.len))) + C.free(unsafe.Pointer(classid_ms.data)) + slotval1 := classid_ret + slotval2 := qt.UnsafeNewQUrl(unsafe.Pointer(url)) + var paramNames_ma C.struct_miqt_array = paramNames + paramNames_ret := make([]string, int(paramNames_ma.len)) + paramNames_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(paramNames_ma.data)) // hey ya + for i := 0; i < int(paramNames_ma.len); i++ { + var paramNames_lv_ms C.struct_miqt_string = paramNames_outCast[i] + paramNames_lv_ret := C.GoStringN(paramNames_lv_ms.data, C.int(int64(paramNames_lv_ms.len))) + C.free(unsafe.Pointer(paramNames_lv_ms.data)) + paramNames_ret[i] = paramNames_lv_ret + } + slotval3 := paramNames_ret + + var paramValues_ma C.struct_miqt_array = paramValues + paramValues_ret := make([]string, int(paramValues_ma.len)) + paramValues_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(paramValues_ma.data)) // hey ya + for i := 0; i < int(paramValues_ma.len); i++ { + var paramValues_lv_ms C.struct_miqt_string = paramValues_outCast[i] + paramValues_lv_ret := C.GoStringN(paramValues_lv_ms.data, C.int(int64(paramValues_lv_ms.len))) + C.free(unsafe.Pointer(paramValues_lv_ms.data)) + paramValues_ret[i] = paramValues_lv_ret + } + slotval4 := paramValues_ret + + virtualReturn := gofunc((&QWebPage{h: self}).callVirtualBase_CreatePlugin, slotval1, slotval2, slotval3, slotval4) + + return (*C.QObject)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebPage) callVirtualBase_AcceptNavigationRequest(frame *QWebFrame, request *network.QNetworkRequest, typeVal QWebPage__NavigationType) bool { + + return (bool)(C.QWebPage_virtualbase_AcceptNavigationRequest(unsafe.Pointer(this.h), frame.cPointer(), (*C.QNetworkRequest)(request.UnsafePointer()), (C.int)(typeVal))) + +} +func (this *QWebPage) OnAcceptNavigationRequest(slot func(super func(frame *QWebFrame, request *network.QNetworkRequest, typeVal QWebPage__NavigationType) bool, frame *QWebFrame, request *network.QNetworkRequest, typeVal QWebPage__NavigationType) bool) { + C.QWebPage_override_virtual_AcceptNavigationRequest(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_AcceptNavigationRequest +func miqt_exec_callback_QWebPage_AcceptNavigationRequest(self *C.QWebPage, cb C.intptr_t, frame *C.QWebFrame, request *C.QNetworkRequest, typeVal C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(frame *QWebFrame, request *network.QNetworkRequest, typeVal QWebPage__NavigationType) bool, frame *QWebFrame, request *network.QNetworkRequest, typeVal QWebPage__NavigationType) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebFrame(unsafe.Pointer(frame), nil) + slotval2 := network.UnsafeNewQNetworkRequest(unsafe.Pointer(request)) + slotval3 := (QWebPage__NavigationType)(typeVal) + + virtualReturn := gofunc((&QWebPage{h: self}).callVirtualBase_AcceptNavigationRequest, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebPage) callVirtualBase_ChooseFile(originatingFrame *QWebFrame, oldFile string) string { + oldFile_ms := C.struct_miqt_string{} + oldFile_ms.data = C.CString(oldFile) + oldFile_ms.len = C.size_t(len(oldFile)) + defer C.free(unsafe.Pointer(oldFile_ms.data)) + + var _ms C.struct_miqt_string = C.QWebPage_virtualbase_ChooseFile(unsafe.Pointer(this.h), originatingFrame.cPointer(), oldFile_ms) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QWebPage) OnChooseFile(slot func(super func(originatingFrame *QWebFrame, oldFile string) string, originatingFrame *QWebFrame, oldFile string) string) { + C.QWebPage_override_virtual_ChooseFile(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_ChooseFile +func miqt_exec_callback_QWebPage_ChooseFile(self *C.QWebPage, cb C.intptr_t, originatingFrame *C.QWebFrame, oldFile C.struct_miqt_string) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(originatingFrame *QWebFrame, oldFile string) string, originatingFrame *QWebFrame, oldFile string) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebFrame(unsafe.Pointer(originatingFrame), nil) + var oldFile_ms C.struct_miqt_string = oldFile + oldFile_ret := C.GoStringN(oldFile_ms.data, C.int(int64(oldFile_ms.len))) + C.free(unsafe.Pointer(oldFile_ms.data)) + slotval2 := oldFile_ret + + virtualReturn := gofunc((&QWebPage{h: self}).callVirtualBase_ChooseFile, slotval1, slotval2) + virtualReturn_ms := C.struct_miqt_string{} + virtualReturn_ms.data = C.CString(virtualReturn) + virtualReturn_ms.len = C.size_t(len(virtualReturn)) + defer C.free(unsafe.Pointer(virtualReturn_ms.data)) + + return virtualReturn_ms + +} + +func (this *QWebPage) callVirtualBase_JavaScriptAlert(originatingFrame *QWebFrame, msg string) { + msg_ms := C.struct_miqt_string{} + msg_ms.data = C.CString(msg) + msg_ms.len = C.size_t(len(msg)) + defer C.free(unsafe.Pointer(msg_ms.data)) + + C.QWebPage_virtualbase_JavaScriptAlert(unsafe.Pointer(this.h), originatingFrame.cPointer(), msg_ms) + +} +func (this *QWebPage) OnJavaScriptAlert(slot func(super func(originatingFrame *QWebFrame, msg string), originatingFrame *QWebFrame, msg string)) { + C.QWebPage_override_virtual_JavaScriptAlert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_JavaScriptAlert +func miqt_exec_callback_QWebPage_JavaScriptAlert(self *C.QWebPage, cb C.intptr_t, originatingFrame *C.QWebFrame, msg C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(originatingFrame *QWebFrame, msg string), originatingFrame *QWebFrame, msg string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebFrame(unsafe.Pointer(originatingFrame), nil) + var msg_ms C.struct_miqt_string = msg + msg_ret := C.GoStringN(msg_ms.data, C.int(int64(msg_ms.len))) + C.free(unsafe.Pointer(msg_ms.data)) + slotval2 := msg_ret + + gofunc((&QWebPage{h: self}).callVirtualBase_JavaScriptAlert, slotval1, slotval2) + +} + +func (this *QWebPage) callVirtualBase_JavaScriptConfirm(originatingFrame *QWebFrame, msg string) bool { + msg_ms := C.struct_miqt_string{} + msg_ms.data = C.CString(msg) + msg_ms.len = C.size_t(len(msg)) + defer C.free(unsafe.Pointer(msg_ms.data)) + + return (bool)(C.QWebPage_virtualbase_JavaScriptConfirm(unsafe.Pointer(this.h), originatingFrame.cPointer(), msg_ms)) + +} +func (this *QWebPage) OnJavaScriptConfirm(slot func(super func(originatingFrame *QWebFrame, msg string) bool, originatingFrame *QWebFrame, msg string) bool) { + C.QWebPage_override_virtual_JavaScriptConfirm(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_JavaScriptConfirm +func miqt_exec_callback_QWebPage_JavaScriptConfirm(self *C.QWebPage, cb C.intptr_t, originatingFrame *C.QWebFrame, msg C.struct_miqt_string) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(originatingFrame *QWebFrame, msg string) bool, originatingFrame *QWebFrame, msg string) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := UnsafeNewQWebFrame(unsafe.Pointer(originatingFrame), nil) + var msg_ms C.struct_miqt_string = msg + msg_ret := C.GoStringN(msg_ms.data, C.int(int64(msg_ms.len))) + C.free(unsafe.Pointer(msg_ms.data)) + slotval2 := msg_ret + + virtualReturn := gofunc((&QWebPage{h: self}).callVirtualBase_JavaScriptConfirm, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebPage) callVirtualBase_JavaScriptConsoleMessage(message string, lineNumber int, sourceID string) { + message_ms := C.struct_miqt_string{} + message_ms.data = C.CString(message) + message_ms.len = C.size_t(len(message)) + defer C.free(unsafe.Pointer(message_ms.data)) + sourceID_ms := C.struct_miqt_string{} + sourceID_ms.data = C.CString(sourceID) + sourceID_ms.len = C.size_t(len(sourceID)) + defer C.free(unsafe.Pointer(sourceID_ms.data)) + + C.QWebPage_virtualbase_JavaScriptConsoleMessage(unsafe.Pointer(this.h), message_ms, (C.int)(lineNumber), sourceID_ms) + +} +func (this *QWebPage) OnJavaScriptConsoleMessage(slot func(super func(message string, lineNumber int, sourceID string), message string, lineNumber int, sourceID string)) { + C.QWebPage_override_virtual_JavaScriptConsoleMessage(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_JavaScriptConsoleMessage +func miqt_exec_callback_QWebPage_JavaScriptConsoleMessage(self *C.QWebPage, cb C.intptr_t, message C.struct_miqt_string, lineNumber C.int, sourceID C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(message string, lineNumber int, sourceID string), message string, lineNumber int, sourceID string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var message_ms C.struct_miqt_string = message + message_ret := C.GoStringN(message_ms.data, C.int(int64(message_ms.len))) + C.free(unsafe.Pointer(message_ms.data)) + slotval1 := message_ret + slotval2 := (int)(lineNumber) + + var sourceID_ms C.struct_miqt_string = sourceID + sourceID_ret := C.GoStringN(sourceID_ms.data, C.int(int64(sourceID_ms.len))) + C.free(unsafe.Pointer(sourceID_ms.data)) + slotval3 := sourceID_ret + + gofunc((&QWebPage{h: self}).callVirtualBase_JavaScriptConsoleMessage, slotval1, slotval2, slotval3) + +} + +func (this *QWebPage) callVirtualBase_UserAgentForUrl(url *qt.QUrl) string { + + var _ms C.struct_miqt_string = C.QWebPage_virtualbase_UserAgentForUrl(unsafe.Pointer(this.h), (*C.QUrl)(url.UnsafePointer())) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QWebPage) OnUserAgentForUrl(slot func(super func(url *qt.QUrl) string, url *qt.QUrl) string) { + C.QWebPage_override_virtual_UserAgentForUrl(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_UserAgentForUrl +func miqt_exec_callback_QWebPage_UserAgentForUrl(self *C.QWebPage, cb C.intptr_t, url *C.QUrl) C.struct_miqt_string { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(url *qt.QUrl) string, url *qt.QUrl) string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(url)) + + virtualReturn := gofunc((&QWebPage{h: self}).callVirtualBase_UserAgentForUrl, 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 *QWebPage) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QWebPage_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebPage) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QWebPage_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_EventFilter +func miqt_exec_callback_QWebPage_EventFilter(self *C.QWebPage, 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((&QWebPage{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebPage) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QWebPage_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QWebPage) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QWebPage_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_TimerEvent +func miqt_exec_callback_QWebPage_TimerEvent(self *C.QWebPage, 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((&QWebPage{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWebPage) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QWebPage_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QWebPage) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QWebPage_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_ChildEvent +func miqt_exec_callback_QWebPage_ChildEvent(self *C.QWebPage, 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((&QWebPage{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWebPage) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QWebPage_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebPage) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QWebPage_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_CustomEvent +func miqt_exec_callback_QWebPage_CustomEvent(self *C.QWebPage, 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((&QWebPage{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWebPage) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QWebPage_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebPage) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebPage_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_ConnectNotify +func miqt_exec_callback_QWebPage_ConnectNotify(self *C.QWebPage, 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((&QWebPage{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWebPage) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QWebPage_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebPage) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebPage_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPage_DisconnectNotify +func miqt_exec_callback_QWebPage_DisconnectNotify(self *C.QWebPage, 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((&QWebPage{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QWebPage) Delete() { + C.QWebPage_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 *QWebPage) GoGC() { + runtime.SetFinalizer(this, func(this *QWebPage) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebPage__ViewportAttributes struct { + h *C.QWebPage__ViewportAttributes + isSubclass bool +} + +func (this *QWebPage__ViewportAttributes) cPointer() *C.QWebPage__ViewportAttributes { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebPage__ViewportAttributes) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebPage__ViewportAttributes constructs the type using only CGO pointers. +func newQWebPage__ViewportAttributes(h *C.QWebPage__ViewportAttributes) *QWebPage__ViewportAttributes { + if h == nil { + return nil + } + return &QWebPage__ViewportAttributes{h: h} +} + +// UnsafeNewQWebPage__ViewportAttributes constructs the type using only unsafe pointers. +func UnsafeNewQWebPage__ViewportAttributes(h unsafe.Pointer) *QWebPage__ViewportAttributes { + if h == nil { + return nil + } + + return &QWebPage__ViewportAttributes{h: (*C.QWebPage__ViewportAttributes)(h)} +} + +// NewQWebPage__ViewportAttributes constructs a new QWebPage::ViewportAttributes object. +func NewQWebPage__ViewportAttributes() *QWebPage__ViewportAttributes { + var outptr_QWebPage__ViewportAttributes *C.QWebPage__ViewportAttributes = nil + + C.QWebPage__ViewportAttributes_new(&outptr_QWebPage__ViewportAttributes) + ret := newQWebPage__ViewportAttributes(outptr_QWebPage__ViewportAttributes) + ret.isSubclass = true + return ret +} + +// NewQWebPage__ViewportAttributes2 constructs a new QWebPage::ViewportAttributes object. +func NewQWebPage__ViewportAttributes2(other *QWebPage__ViewportAttributes) *QWebPage__ViewportAttributes { + var outptr_QWebPage__ViewportAttributes *C.QWebPage__ViewportAttributes = nil + + C.QWebPage__ViewportAttributes_new2(other.cPointer(), &outptr_QWebPage__ViewportAttributes) + ret := newQWebPage__ViewportAttributes(outptr_QWebPage__ViewportAttributes) + ret.isSubclass = true + return ret +} + +func (this *QWebPage__ViewportAttributes) OperatorAssign(other *QWebPage__ViewportAttributes) { + C.QWebPage__ViewportAttributes_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QWebPage__ViewportAttributes) InitialScaleFactor() float64 { + return (float64)(C.QWebPage__ViewportAttributes_InitialScaleFactor(this.h)) +} + +func (this *QWebPage__ViewportAttributes) MinimumScaleFactor() float64 { + return (float64)(C.QWebPage__ViewportAttributes_MinimumScaleFactor(this.h)) +} + +func (this *QWebPage__ViewportAttributes) MaximumScaleFactor() float64 { + return (float64)(C.QWebPage__ViewportAttributes_MaximumScaleFactor(this.h)) +} + +func (this *QWebPage__ViewportAttributes) DevicePixelRatio() float64 { + return (float64)(C.QWebPage__ViewportAttributes_DevicePixelRatio(this.h)) +} + +func (this *QWebPage__ViewportAttributes) IsUserScalable() bool { + return (bool)(C.QWebPage__ViewportAttributes_IsUserScalable(this.h)) +} + +func (this *QWebPage__ViewportAttributes) IsValid() bool { + return (bool)(C.QWebPage__ViewportAttributes_IsValid(this.h)) +} + +func (this *QWebPage__ViewportAttributes) Size() *qt.QSizeF { + _ret := C.QWebPage__ViewportAttributes_Size(this.h) + _goptr := qt.UnsafeNewQSizeF(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +// Delete this object from C++ memory. +func (this *QWebPage__ViewportAttributes) Delete() { + C.QWebPage__ViewportAttributes_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 *QWebPage__ViewportAttributes) GoGC() { + runtime.SetFinalizer(this, func(this *QWebPage__ViewportAttributes) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebPage__ExtensionOption struct { + h *C.QWebPage__ExtensionOption + isSubclass bool +} + +func (this *QWebPage__ExtensionOption) cPointer() *C.QWebPage__ExtensionOption { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebPage__ExtensionOption) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebPage__ExtensionOption constructs the type using only CGO pointers. +func newQWebPage__ExtensionOption(h *C.QWebPage__ExtensionOption) *QWebPage__ExtensionOption { + if h == nil { + return nil + } + return &QWebPage__ExtensionOption{h: h} +} + +// UnsafeNewQWebPage__ExtensionOption constructs the type using only unsafe pointers. +func UnsafeNewQWebPage__ExtensionOption(h unsafe.Pointer) *QWebPage__ExtensionOption { + if h == nil { + return nil + } + + return &QWebPage__ExtensionOption{h: (*C.QWebPage__ExtensionOption)(h)} +} + +// NewQWebPage__ExtensionOption constructs a new QWebPage::ExtensionOption object. +func NewQWebPage__ExtensionOption(param1 *QWebPage__ExtensionOption) *QWebPage__ExtensionOption { + var outptr_QWebPage__ExtensionOption *C.QWebPage__ExtensionOption = nil + + C.QWebPage__ExtensionOption_new(param1.cPointer(), &outptr_QWebPage__ExtensionOption) + ret := newQWebPage__ExtensionOption(outptr_QWebPage__ExtensionOption) + ret.isSubclass = true + return ret +} + +// Delete this object from C++ memory. +func (this *QWebPage__ExtensionOption) Delete() { + C.QWebPage__ExtensionOption_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 *QWebPage__ExtensionOption) GoGC() { + runtime.SetFinalizer(this, func(this *QWebPage__ExtensionOption) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebPage__ExtensionReturn struct { + h *C.QWebPage__ExtensionReturn + isSubclass bool +} + +func (this *QWebPage__ExtensionReturn) cPointer() *C.QWebPage__ExtensionReturn { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebPage__ExtensionReturn) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebPage__ExtensionReturn constructs the type using only CGO pointers. +func newQWebPage__ExtensionReturn(h *C.QWebPage__ExtensionReturn) *QWebPage__ExtensionReturn { + if h == nil { + return nil + } + return &QWebPage__ExtensionReturn{h: h} +} + +// UnsafeNewQWebPage__ExtensionReturn constructs the type using only unsafe pointers. +func UnsafeNewQWebPage__ExtensionReturn(h unsafe.Pointer) *QWebPage__ExtensionReturn { + if h == nil { + return nil + } + + return &QWebPage__ExtensionReturn{h: (*C.QWebPage__ExtensionReturn)(h)} +} + +// NewQWebPage__ExtensionReturn constructs a new QWebPage::ExtensionReturn object. +func NewQWebPage__ExtensionReturn(param1 *QWebPage__ExtensionReturn) *QWebPage__ExtensionReturn { + var outptr_QWebPage__ExtensionReturn *C.QWebPage__ExtensionReturn = nil + + C.QWebPage__ExtensionReturn_new(param1.cPointer(), &outptr_QWebPage__ExtensionReturn) + ret := newQWebPage__ExtensionReturn(outptr_QWebPage__ExtensionReturn) + ret.isSubclass = true + return ret +} + +// NewQWebPage__ExtensionReturn2 constructs a new QWebPage::ExtensionReturn object. +func NewQWebPage__ExtensionReturn2() *QWebPage__ExtensionReturn { + var outptr_QWebPage__ExtensionReturn *C.QWebPage__ExtensionReturn = nil + + C.QWebPage__ExtensionReturn_new2(&outptr_QWebPage__ExtensionReturn) + ret := newQWebPage__ExtensionReturn(outptr_QWebPage__ExtensionReturn) + ret.isSubclass = true + return ret +} + +// Delete this object from C++ memory. +func (this *QWebPage__ExtensionReturn) Delete() { + C.QWebPage__ExtensionReturn_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 *QWebPage__ExtensionReturn) GoGC() { + runtime.SetFinalizer(this, func(this *QWebPage__ExtensionReturn) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebPage__ChooseMultipleFilesExtensionOption struct { + h *C.QWebPage__ChooseMultipleFilesExtensionOption + isSubclass bool + *QWebPage__ExtensionOption +} + +func (this *QWebPage__ChooseMultipleFilesExtensionOption) cPointer() *C.QWebPage__ChooseMultipleFilesExtensionOption { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebPage__ChooseMultipleFilesExtensionOption) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebPage__ChooseMultipleFilesExtensionOption constructs the type using only CGO pointers. +func newQWebPage__ChooseMultipleFilesExtensionOption(h *C.QWebPage__ChooseMultipleFilesExtensionOption, h_QWebPage__ExtensionOption *C.QWebPage__ExtensionOption) *QWebPage__ChooseMultipleFilesExtensionOption { + if h == nil { + return nil + } + return &QWebPage__ChooseMultipleFilesExtensionOption{h: h, + QWebPage__ExtensionOption: newQWebPage__ExtensionOption(h_QWebPage__ExtensionOption)} +} + +// UnsafeNewQWebPage__ChooseMultipleFilesExtensionOption constructs the type using only unsafe pointers. +func UnsafeNewQWebPage__ChooseMultipleFilesExtensionOption(h unsafe.Pointer, h_QWebPage__ExtensionOption unsafe.Pointer) *QWebPage__ChooseMultipleFilesExtensionOption { + if h == nil { + return nil + } + + return &QWebPage__ChooseMultipleFilesExtensionOption{h: (*C.QWebPage__ChooseMultipleFilesExtensionOption)(h), + QWebPage__ExtensionOption: UnsafeNewQWebPage__ExtensionOption(h_QWebPage__ExtensionOption)} +} + +// Delete this object from C++ memory. +func (this *QWebPage__ChooseMultipleFilesExtensionOption) Delete() { + C.QWebPage__ChooseMultipleFilesExtensionOption_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 *QWebPage__ChooseMultipleFilesExtensionOption) GoGC() { + runtime.SetFinalizer(this, func(this *QWebPage__ChooseMultipleFilesExtensionOption) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebPage__ChooseMultipleFilesExtensionReturn struct { + h *C.QWebPage__ChooseMultipleFilesExtensionReturn + isSubclass bool + *QWebPage__ExtensionReturn +} + +func (this *QWebPage__ChooseMultipleFilesExtensionReturn) cPointer() *C.QWebPage__ChooseMultipleFilesExtensionReturn { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebPage__ChooseMultipleFilesExtensionReturn) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebPage__ChooseMultipleFilesExtensionReturn constructs the type using only CGO pointers. +func newQWebPage__ChooseMultipleFilesExtensionReturn(h *C.QWebPage__ChooseMultipleFilesExtensionReturn, h_QWebPage__ExtensionReturn *C.QWebPage__ExtensionReturn) *QWebPage__ChooseMultipleFilesExtensionReturn { + if h == nil { + return nil + } + return &QWebPage__ChooseMultipleFilesExtensionReturn{h: h, + QWebPage__ExtensionReturn: newQWebPage__ExtensionReturn(h_QWebPage__ExtensionReturn)} +} + +// UnsafeNewQWebPage__ChooseMultipleFilesExtensionReturn constructs the type using only unsafe pointers. +func UnsafeNewQWebPage__ChooseMultipleFilesExtensionReturn(h unsafe.Pointer, h_QWebPage__ExtensionReturn unsafe.Pointer) *QWebPage__ChooseMultipleFilesExtensionReturn { + if h == nil { + return nil + } + + return &QWebPage__ChooseMultipleFilesExtensionReturn{h: (*C.QWebPage__ChooseMultipleFilesExtensionReturn)(h), + QWebPage__ExtensionReturn: UnsafeNewQWebPage__ExtensionReturn(h_QWebPage__ExtensionReturn)} +} + +// Delete this object from C++ memory. +func (this *QWebPage__ChooseMultipleFilesExtensionReturn) Delete() { + C.QWebPage__ChooseMultipleFilesExtensionReturn_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 *QWebPage__ChooseMultipleFilesExtensionReturn) GoGC() { + runtime.SetFinalizer(this, func(this *QWebPage__ChooseMultipleFilesExtensionReturn) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebPage__ErrorPageExtensionOption struct { + h *C.QWebPage__ErrorPageExtensionOption + isSubclass bool + *QWebPage__ExtensionOption +} + +func (this *QWebPage__ErrorPageExtensionOption) cPointer() *C.QWebPage__ErrorPageExtensionOption { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebPage__ErrorPageExtensionOption) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebPage__ErrorPageExtensionOption constructs the type using only CGO pointers. +func newQWebPage__ErrorPageExtensionOption(h *C.QWebPage__ErrorPageExtensionOption, h_QWebPage__ExtensionOption *C.QWebPage__ExtensionOption) *QWebPage__ErrorPageExtensionOption { + if h == nil { + return nil + } + return &QWebPage__ErrorPageExtensionOption{h: h, + QWebPage__ExtensionOption: newQWebPage__ExtensionOption(h_QWebPage__ExtensionOption)} +} + +// UnsafeNewQWebPage__ErrorPageExtensionOption constructs the type using only unsafe pointers. +func UnsafeNewQWebPage__ErrorPageExtensionOption(h unsafe.Pointer, h_QWebPage__ExtensionOption unsafe.Pointer) *QWebPage__ErrorPageExtensionOption { + if h == nil { + return nil + } + + return &QWebPage__ErrorPageExtensionOption{h: (*C.QWebPage__ErrorPageExtensionOption)(h), + QWebPage__ExtensionOption: UnsafeNewQWebPage__ExtensionOption(h_QWebPage__ExtensionOption)} +} + +// NewQWebPage__ErrorPageExtensionOption constructs a new QWebPage::ErrorPageExtensionOption object. +func NewQWebPage__ErrorPageExtensionOption(param1 *QWebPage__ErrorPageExtensionOption) *QWebPage__ErrorPageExtensionOption { + var outptr_QWebPage__ErrorPageExtensionOption *C.QWebPage__ErrorPageExtensionOption = nil + var outptr_QWebPage__ExtensionOption *C.QWebPage__ExtensionOption = nil + + C.QWebPage__ErrorPageExtensionOption_new(param1.cPointer(), &outptr_QWebPage__ErrorPageExtensionOption, &outptr_QWebPage__ExtensionOption) + ret := newQWebPage__ErrorPageExtensionOption(outptr_QWebPage__ErrorPageExtensionOption, outptr_QWebPage__ExtensionOption) + ret.isSubclass = true + return ret +} + +func (this *QWebPage__ErrorPageExtensionOption) OperatorAssign(param1 *QWebPage__ErrorPageExtensionOption) { + C.QWebPage__ErrorPageExtensionOption_OperatorAssign(this.h, param1.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebPage__ErrorPageExtensionOption) Delete() { + C.QWebPage__ErrorPageExtensionOption_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 *QWebPage__ErrorPageExtensionOption) GoGC() { + runtime.SetFinalizer(this, func(this *QWebPage__ErrorPageExtensionOption) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebPage__ErrorPageExtensionReturn struct { + h *C.QWebPage__ErrorPageExtensionReturn + isSubclass bool + *QWebPage__ExtensionReturn +} + +func (this *QWebPage__ErrorPageExtensionReturn) cPointer() *C.QWebPage__ErrorPageExtensionReturn { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebPage__ErrorPageExtensionReturn) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebPage__ErrorPageExtensionReturn constructs the type using only CGO pointers. +func newQWebPage__ErrorPageExtensionReturn(h *C.QWebPage__ErrorPageExtensionReturn, h_QWebPage__ExtensionReturn *C.QWebPage__ExtensionReturn) *QWebPage__ErrorPageExtensionReturn { + if h == nil { + return nil + } + return &QWebPage__ErrorPageExtensionReturn{h: h, + QWebPage__ExtensionReturn: newQWebPage__ExtensionReturn(h_QWebPage__ExtensionReturn)} +} + +// UnsafeNewQWebPage__ErrorPageExtensionReturn constructs the type using only unsafe pointers. +func UnsafeNewQWebPage__ErrorPageExtensionReturn(h unsafe.Pointer, h_QWebPage__ExtensionReturn unsafe.Pointer) *QWebPage__ErrorPageExtensionReturn { + if h == nil { + return nil + } + + return &QWebPage__ErrorPageExtensionReturn{h: (*C.QWebPage__ErrorPageExtensionReturn)(h), + QWebPage__ExtensionReturn: UnsafeNewQWebPage__ExtensionReturn(h_QWebPage__ExtensionReturn)} +} + +// NewQWebPage__ErrorPageExtensionReturn constructs a new QWebPage::ErrorPageExtensionReturn object. +func NewQWebPage__ErrorPageExtensionReturn() *QWebPage__ErrorPageExtensionReturn { + var outptr_QWebPage__ErrorPageExtensionReturn *C.QWebPage__ErrorPageExtensionReturn = nil + var outptr_QWebPage__ExtensionReturn *C.QWebPage__ExtensionReturn = nil + + C.QWebPage__ErrorPageExtensionReturn_new(&outptr_QWebPage__ErrorPageExtensionReturn, &outptr_QWebPage__ExtensionReturn) + ret := newQWebPage__ErrorPageExtensionReturn(outptr_QWebPage__ErrorPageExtensionReturn, outptr_QWebPage__ExtensionReturn) + ret.isSubclass = true + return ret +} + +// NewQWebPage__ErrorPageExtensionReturn2 constructs a new QWebPage::ErrorPageExtensionReturn object. +func NewQWebPage__ErrorPageExtensionReturn2(param1 *QWebPage__ErrorPageExtensionReturn) *QWebPage__ErrorPageExtensionReturn { + var outptr_QWebPage__ErrorPageExtensionReturn *C.QWebPage__ErrorPageExtensionReturn = nil + var outptr_QWebPage__ExtensionReturn *C.QWebPage__ExtensionReturn = nil + + C.QWebPage__ErrorPageExtensionReturn_new2(param1.cPointer(), &outptr_QWebPage__ErrorPageExtensionReturn, &outptr_QWebPage__ExtensionReturn) + ret := newQWebPage__ErrorPageExtensionReturn(outptr_QWebPage__ErrorPageExtensionReturn, outptr_QWebPage__ExtensionReturn) + ret.isSubclass = true + return ret +} + +func (this *QWebPage__ErrorPageExtensionReturn) OperatorAssign(param1 *QWebPage__ErrorPageExtensionReturn) { + C.QWebPage__ErrorPageExtensionReturn_OperatorAssign(this.h, param1.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebPage__ErrorPageExtensionReturn) Delete() { + C.QWebPage__ErrorPageExtensionReturn_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 *QWebPage__ErrorPageExtensionReturn) GoGC() { + runtime.SetFinalizer(this, func(this *QWebPage__ErrorPageExtensionReturn) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webkit/gen_qwebpage.h b/qt/webkit/gen_qwebpage.h new file mode 100644 index 00000000..4cccb218 --- /dev/null +++ b/qt/webkit/gen_qwebpage.h @@ -0,0 +1,334 @@ +#pragma once +#ifndef MIQT_QT_WEBKIT_GEN_QWEBPAGE_H +#define MIQT_QT_WEBKIT_GEN_QWEBPAGE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QAction; +class QChildEvent; +class QContextMenuEvent; +class QEvent; +class QMenu; +class QMetaMethod; +class QMetaObject; +class QNetworkAccessManager; +class QNetworkReply; +class QNetworkRequest; +class QObject; +class QPalette; +class QPoint; +class QRect; +class QSize; +class QSizeF; +class QTimerEvent; +class QUndoStack; +class QUrl; +class QVariant; +class QWebElement; +class QWebFrame; +class QWebFullScreenRequest; +class QWebHistory; +class QWebHistoryItem; +class QWebPage; +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ChooseMultipleFilesExtensionOption) +typedef QWebPage::ChooseMultipleFilesExtensionOption QWebPage__ChooseMultipleFilesExtensionOption; +#else +class QWebPage__ChooseMultipleFilesExtensionOption; +#endif +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ChooseMultipleFilesExtensionReturn) +typedef QWebPage::ChooseMultipleFilesExtensionReturn QWebPage__ChooseMultipleFilesExtensionReturn; +#else +class QWebPage__ChooseMultipleFilesExtensionReturn; +#endif +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ErrorPageExtensionOption) +typedef QWebPage::ErrorPageExtensionOption QWebPage__ErrorPageExtensionOption; +#else +class QWebPage__ErrorPageExtensionOption; +#endif +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ErrorPageExtensionReturn) +typedef QWebPage::ErrorPageExtensionReturn QWebPage__ErrorPageExtensionReturn; +#else +class QWebPage__ErrorPageExtensionReturn; +#endif +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ExtensionOption) +typedef QWebPage::ExtensionOption QWebPage__ExtensionOption; +#else +class QWebPage__ExtensionOption; +#endif +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ExtensionReturn) +typedef QWebPage::ExtensionReturn QWebPage__ExtensionReturn; +#else +class QWebPage__ExtensionReturn; +#endif +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPage__ViewportAttributes) +typedef QWebPage::ViewportAttributes QWebPage__ViewportAttributes; +#else +class QWebPage__ViewportAttributes; +#endif +class QWebPluginFactory; +class QWebSecurityOrigin; +class QWebSettings; +class QWidget; +#else +typedef struct QAction QAction; +typedef struct QChildEvent QChildEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QEvent QEvent; +typedef struct QMenu QMenu; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QNetworkAccessManager QNetworkAccessManager; +typedef struct QNetworkReply QNetworkReply; +typedef struct QNetworkRequest QNetworkRequest; +typedef struct QObject QObject; +typedef struct QPalette QPalette; +typedef struct QPoint QPoint; +typedef struct QRect QRect; +typedef struct QSize QSize; +typedef struct QSizeF QSizeF; +typedef struct QTimerEvent QTimerEvent; +typedef struct QUndoStack QUndoStack; +typedef struct QUrl QUrl; +typedef struct QVariant QVariant; +typedef struct QWebElement QWebElement; +typedef struct QWebFrame QWebFrame; +typedef struct QWebFullScreenRequest QWebFullScreenRequest; +typedef struct QWebHistory QWebHistory; +typedef struct QWebHistoryItem QWebHistoryItem; +typedef struct QWebPage QWebPage; +typedef struct QWebPage__ChooseMultipleFilesExtensionOption QWebPage__ChooseMultipleFilesExtensionOption; +typedef struct QWebPage__ChooseMultipleFilesExtensionReturn QWebPage__ChooseMultipleFilesExtensionReturn; +typedef struct QWebPage__ErrorPageExtensionOption QWebPage__ErrorPageExtensionOption; +typedef struct QWebPage__ErrorPageExtensionReturn QWebPage__ErrorPageExtensionReturn; +typedef struct QWebPage__ExtensionOption QWebPage__ExtensionOption; +typedef struct QWebPage__ExtensionReturn QWebPage__ExtensionReturn; +typedef struct QWebPage__ViewportAttributes QWebPage__ViewportAttributes; +typedef struct QWebPluginFactory QWebPluginFactory; +typedef struct QWebSecurityOrigin QWebSecurityOrigin; +typedef struct QWebSettings QWebSettings; +typedef struct QWidget QWidget; +#endif + +void QWebPage_new(QWebPage** outptr_QWebPage, QObject** outptr_QObject); +void QWebPage_new2(QObject* parent, QWebPage** outptr_QWebPage, QObject** outptr_QObject); +QMetaObject* QWebPage_MetaObject(const QWebPage* self); +void* QWebPage_Metacast(QWebPage* self, const char* param1); +struct miqt_string QWebPage_Tr(const char* s); +struct miqt_string QWebPage_TrUtf8(const char* s); +QWebFrame* QWebPage_MainFrame(const QWebPage* self); +QWebFrame* QWebPage_CurrentFrame(const QWebPage* self); +QWebFrame* QWebPage_FrameAt(const QWebPage* self, QPoint* pos); +QWebHistory* QWebPage_History(const QWebPage* self); +QWebSettings* QWebPage_Settings(const QWebPage* self); +void QWebPage_SetView(QWebPage* self, QWidget* view); +QWidget* QWebPage_View(const QWebPage* self); +bool QWebPage_IsModified(const QWebPage* self); +QUndoStack* QWebPage_UndoStack(const QWebPage* self); +void QWebPage_SetNetworkAccessManager(QWebPage* self, QNetworkAccessManager* manager); +QNetworkAccessManager* QWebPage_NetworkAccessManager(const QWebPage* self); +void QWebPage_SetPluginFactory(QWebPage* self, QWebPluginFactory* factory); +QWebPluginFactory* QWebPage_PluginFactory(const QWebPage* self); +unsigned long long QWebPage_TotalBytes(const QWebPage* self); +unsigned long long QWebPage_BytesReceived(const QWebPage* self); +int QWebPage_VisibilityState(const QWebPage* self); +void QWebPage_SetVisibilityState(QWebPage* self, int visibilityState); +bool QWebPage_RecentlyAudible(const QWebPage* self); +bool QWebPage_HasSelection(const QWebPage* self); +struct miqt_string QWebPage_SelectedText(const QWebPage* self); +struct miqt_string QWebPage_SelectedHtml(const QWebPage* self); +QAction* QWebPage_Action(const QWebPage* self, int action); +QAction* QWebPage_CustomAction(const QWebPage* self, int action); +void QWebPage_TriggerAction(QWebPage* self, int action, bool checked); +void QWebPage_SetDevicePixelRatio(QWebPage* self, double ratio); +double QWebPage_DevicePixelRatio(const QWebPage* self); +void QWebPage_ResetDevicePixelRatio(QWebPage* self); +QSize* QWebPage_ViewportSize(const QWebPage* self); +void QWebPage_SetViewportSize(const QWebPage* self, QSize* size); +QWebPage__ViewportAttributes* QWebPage_ViewportAttributesForSize(const QWebPage* self, QSize* availableSize); +QSize* QWebPage_PreferredContentsSize(const QWebPage* self); +void QWebPage_SetPreferredContentsSize(const QWebPage* self, QSize* size); +void QWebPage_SetActualVisibleContentRect(const QWebPage* self, QRect* rect); +bool QWebPage_Event(QWebPage* self, QEvent* param1); +bool QWebPage_FocusNextPrevChild(QWebPage* self, bool next); +QVariant* QWebPage_InputMethodQuery(const QWebPage* self, int property); +bool QWebPage_FindText(QWebPage* self, struct miqt_string subString); +void QWebPage_SetForwardUnsupportedContent(QWebPage* self, bool forward); +bool QWebPage_ForwardUnsupportedContent(const QWebPage* self); +void QWebPage_SetLinkDelegationPolicy(QWebPage* self, int policy); +int QWebPage_LinkDelegationPolicy(const QWebPage* self); +void QWebPage_SetPalette(QWebPage* self, QPalette* palette); +QPalette* QWebPage_Palette(const QWebPage* self); +void QWebPage_SetContentEditable(QWebPage* self, bool editable); +bool QWebPage_IsContentEditable(const QWebPage* self); +bool QWebPage_SwallowContextMenuEvent(QWebPage* self, QContextMenuEvent* event); +void QWebPage_UpdatePositionDependentActions(QWebPage* self, QPoint* pos); +QMenu* QWebPage_CreateStandardContextMenu(QWebPage* self); +void QWebPage_SetFeaturePermission(QWebPage* self, QWebFrame* frame, int feature, int policy); +struct miqt_array /* of struct miqt_string */ QWebPage_SupportedContentTypes(const QWebPage* self); +bool QWebPage_SupportsContentType(const QWebPage* self, struct miqt_string mimeType); +bool QWebPage_Extension(QWebPage* self, int extension, QWebPage__ExtensionOption* option, QWebPage__ExtensionReturn* output); +bool QWebPage_SupportsExtension(const QWebPage* self, int extension); +bool QWebPage_ShouldInterruptJavaScript(QWebPage* self); +void QWebPage_LoadStarted(QWebPage* self); +void QWebPage_connect_LoadStarted(QWebPage* self, intptr_t slot); +void QWebPage_LoadProgress(QWebPage* self, int progress); +void QWebPage_connect_LoadProgress(QWebPage* self, intptr_t slot); +void QWebPage_LoadFinished(QWebPage* self, bool ok); +void QWebPage_connect_LoadFinished(QWebPage* self, intptr_t slot); +void QWebPage_LinkHovered(QWebPage* self, struct miqt_string link, struct miqt_string title, struct miqt_string textContent); +void QWebPage_connect_LinkHovered(QWebPage* self, intptr_t slot); +void QWebPage_StatusBarMessage(QWebPage* self, struct miqt_string text); +void QWebPage_connect_StatusBarMessage(QWebPage* self, intptr_t slot); +void QWebPage_SelectionChanged(QWebPage* self); +void QWebPage_connect_SelectionChanged(QWebPage* self, intptr_t slot); +void QWebPage_FrameCreated(QWebPage* self, QWebFrame* frame); +void QWebPage_connect_FrameCreated(QWebPage* self, intptr_t slot); +void QWebPage_GeometryChangeRequested(QWebPage* self, QRect* geom); +void QWebPage_connect_GeometryChangeRequested(QWebPage* self, intptr_t slot); +void QWebPage_RepaintRequested(QWebPage* self, QRect* dirtyRect); +void QWebPage_connect_RepaintRequested(QWebPage* self, intptr_t slot); +void QWebPage_ScrollRequested(QWebPage* self, int dx, int dy, QRect* scrollViewRect); +void QWebPage_connect_ScrollRequested(QWebPage* self, intptr_t slot); +void QWebPage_WindowCloseRequested(QWebPage* self); +void QWebPage_connect_WindowCloseRequested(QWebPage* self, intptr_t slot); +void QWebPage_PrintRequested(QWebPage* self, QWebFrame* frame); +void QWebPage_connect_PrintRequested(QWebPage* self, intptr_t slot); +void QWebPage_LinkClicked(QWebPage* self, QUrl* url); +void QWebPage_connect_LinkClicked(QWebPage* self, intptr_t slot); +void QWebPage_ToolBarVisibilityChangeRequested(QWebPage* self, bool visible); +void QWebPage_connect_ToolBarVisibilityChangeRequested(QWebPage* self, intptr_t slot); +void QWebPage_StatusBarVisibilityChangeRequested(QWebPage* self, bool visible); +void QWebPage_connect_StatusBarVisibilityChangeRequested(QWebPage* self, intptr_t slot); +void QWebPage_MenuBarVisibilityChangeRequested(QWebPage* self, bool visible); +void QWebPage_connect_MenuBarVisibilityChangeRequested(QWebPage* self, intptr_t slot); +void QWebPage_UnsupportedContent(QWebPage* self, QNetworkReply* reply); +void QWebPage_connect_UnsupportedContent(QWebPage* self, intptr_t slot); +void QWebPage_DownloadRequested(QWebPage* self, QNetworkRequest* request); +void QWebPage_connect_DownloadRequested(QWebPage* self, intptr_t slot); +void QWebPage_FocusedElementChanged(QWebPage* self, QWebElement* element); +void QWebPage_connect_FocusedElementChanged(QWebPage* self, intptr_t slot); +void QWebPage_MicroFocusChanged(QWebPage* self); +void QWebPage_connect_MicroFocusChanged(QWebPage* self, intptr_t slot); +void QWebPage_ContentsChanged(QWebPage* self); +void QWebPage_connect_ContentsChanged(QWebPage* self, intptr_t slot); +void QWebPage_DatabaseQuotaExceeded(QWebPage* self, QWebFrame* frame, struct miqt_string databaseName); +void QWebPage_connect_DatabaseQuotaExceeded(QWebPage* self, intptr_t slot); +void QWebPage_ApplicationCacheQuotaExceeded(QWebPage* self, QWebSecurityOrigin* origin, unsigned long long defaultOriginQuota, unsigned long long totalSpaceNeeded); +void QWebPage_connect_ApplicationCacheQuotaExceeded(QWebPage* self, intptr_t slot); +void QWebPage_SaveFrameStateRequested(QWebPage* self, QWebFrame* frame, QWebHistoryItem* item); +void QWebPage_connect_SaveFrameStateRequested(QWebPage* self, intptr_t slot); +void QWebPage_RestoreFrameStateRequested(QWebPage* self, QWebFrame* frame); +void QWebPage_connect_RestoreFrameStateRequested(QWebPage* self, intptr_t slot); +void QWebPage_ViewportChangeRequested(QWebPage* self); +void QWebPage_connect_ViewportChangeRequested(QWebPage* self, intptr_t slot); +void QWebPage_FeaturePermissionRequested(QWebPage* self, QWebFrame* frame, int feature); +void QWebPage_connect_FeaturePermissionRequested(QWebPage* self, intptr_t slot); +void QWebPage_FeaturePermissionRequestCanceled(QWebPage* self, QWebFrame* frame, int feature); +void QWebPage_connect_FeaturePermissionRequestCanceled(QWebPage* self, intptr_t slot); +void QWebPage_FullScreenRequested(QWebPage* self, QWebFullScreenRequest* fullScreenRequest); +void QWebPage_connect_FullScreenRequested(QWebPage* self, intptr_t slot); +void QWebPage_ConsoleMessageReceived(QWebPage* self, int source, int level, struct miqt_string message, int lineNumber, struct miqt_string sourceID); +void QWebPage_connect_ConsoleMessageReceived(QWebPage* self, intptr_t slot); +void QWebPage_RecentlyAudibleChanged(QWebPage* self, bool recentlyAudible); +void QWebPage_connect_RecentlyAudibleChanged(QWebPage* self, intptr_t slot); +QWebPage* QWebPage_CreateWindow(QWebPage* self, int typeVal); +QObject* QWebPage_CreatePlugin(QWebPage* self, struct miqt_string classid, QUrl* url, struct miqt_array /* of struct miqt_string */ paramNames, struct miqt_array /* of struct miqt_string */ paramValues); +bool QWebPage_AcceptNavigationRequest(QWebPage* self, QWebFrame* frame, QNetworkRequest* request, int typeVal); +struct miqt_string QWebPage_ChooseFile(QWebPage* self, QWebFrame* originatingFrame, struct miqt_string oldFile); +void QWebPage_JavaScriptAlert(QWebPage* self, QWebFrame* originatingFrame, struct miqt_string msg); +bool QWebPage_JavaScriptConfirm(QWebPage* self, QWebFrame* originatingFrame, struct miqt_string msg); +void QWebPage_JavaScriptConsoleMessage(QWebPage* self, struct miqt_string message, int lineNumber, struct miqt_string sourceID); +struct miqt_string QWebPage_UserAgentForUrl(const QWebPage* self, QUrl* url); +struct miqt_string QWebPage_Tr2(const char* s, const char* c); +struct miqt_string QWebPage_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebPage_TrUtf82(const char* s, const char* c); +struct miqt_string QWebPage_TrUtf83(const char* s, const char* c, int n); +bool QWebPage_FindText2(QWebPage* self, struct miqt_string subString, int options); +void QWebPage_override_virtual_TriggerAction(void* self, intptr_t slot); +void QWebPage_virtualbase_TriggerAction(void* self, int action, bool checked); +void QWebPage_override_virtual_Event(void* self, intptr_t slot); +bool QWebPage_virtualbase_Event(void* self, QEvent* param1); +void QWebPage_override_virtual_Extension(void* self, intptr_t slot); +bool QWebPage_virtualbase_Extension(void* self, int extension, QWebPage__ExtensionOption* option, QWebPage__ExtensionReturn* output); +void QWebPage_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QWebPage_virtualbase_SupportsExtension(const void* self, int extension); +void QWebPage_override_virtual_ShouldInterruptJavaScript(void* self, intptr_t slot); +bool QWebPage_virtualbase_ShouldInterruptJavaScript(void* self); +void QWebPage_override_virtual_CreateWindow(void* self, intptr_t slot); +QWebPage* QWebPage_virtualbase_CreateWindow(void* self, int typeVal); +void QWebPage_override_virtual_CreatePlugin(void* self, intptr_t slot); +QObject* QWebPage_virtualbase_CreatePlugin(void* self, struct miqt_string classid, QUrl* url, struct miqt_array /* of struct miqt_string */ paramNames, struct miqt_array /* of struct miqt_string */ paramValues); +void QWebPage_override_virtual_AcceptNavigationRequest(void* self, intptr_t slot); +bool QWebPage_virtualbase_AcceptNavigationRequest(void* self, QWebFrame* frame, QNetworkRequest* request, int typeVal); +void QWebPage_override_virtual_ChooseFile(void* self, intptr_t slot); +struct miqt_string QWebPage_virtualbase_ChooseFile(void* self, QWebFrame* originatingFrame, struct miqt_string oldFile); +void QWebPage_override_virtual_JavaScriptAlert(void* self, intptr_t slot); +void QWebPage_virtualbase_JavaScriptAlert(void* self, QWebFrame* originatingFrame, struct miqt_string msg); +void QWebPage_override_virtual_JavaScriptConfirm(void* self, intptr_t slot); +bool QWebPage_virtualbase_JavaScriptConfirm(void* self, QWebFrame* originatingFrame, struct miqt_string msg); +void QWebPage_override_virtual_JavaScriptConsoleMessage(void* self, intptr_t slot); +void QWebPage_virtualbase_JavaScriptConsoleMessage(void* self, struct miqt_string message, int lineNumber, struct miqt_string sourceID); +void QWebPage_override_virtual_UserAgentForUrl(void* self, intptr_t slot); +struct miqt_string QWebPage_virtualbase_UserAgentForUrl(const void* self, QUrl* url); +void QWebPage_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWebPage_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWebPage_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWebPage_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWebPage_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWebPage_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWebPage_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWebPage_virtualbase_CustomEvent(void* self, QEvent* event); +void QWebPage_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWebPage_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWebPage_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWebPage_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWebPage_Delete(QWebPage* self, bool isSubclass); + +void QWebPage__ViewportAttributes_new(QWebPage__ViewportAttributes** outptr_QWebPage__ViewportAttributes); +void QWebPage__ViewportAttributes_new2(QWebPage__ViewportAttributes* other, QWebPage__ViewportAttributes** outptr_QWebPage__ViewportAttributes); +void QWebPage__ViewportAttributes_OperatorAssign(QWebPage__ViewportAttributes* self, QWebPage__ViewportAttributes* other); +double QWebPage__ViewportAttributes_InitialScaleFactor(const QWebPage__ViewportAttributes* self); +double QWebPage__ViewportAttributes_MinimumScaleFactor(const QWebPage__ViewportAttributes* self); +double QWebPage__ViewportAttributes_MaximumScaleFactor(const QWebPage__ViewportAttributes* self); +double QWebPage__ViewportAttributes_DevicePixelRatio(const QWebPage__ViewportAttributes* self); +bool QWebPage__ViewportAttributes_IsUserScalable(const QWebPage__ViewportAttributes* self); +bool QWebPage__ViewportAttributes_IsValid(const QWebPage__ViewportAttributes* self); +QSizeF* QWebPage__ViewportAttributes_Size(const QWebPage__ViewportAttributes* self); +void QWebPage__ViewportAttributes_Delete(QWebPage__ViewportAttributes* self, bool isSubclass); + +void QWebPage__ExtensionOption_new(QWebPage__ExtensionOption* param1, QWebPage__ExtensionOption** outptr_QWebPage__ExtensionOption); +void QWebPage__ExtensionOption_Delete(QWebPage__ExtensionOption* self, bool isSubclass); + +void QWebPage__ExtensionReturn_new(QWebPage__ExtensionReturn* param1, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn); +void QWebPage__ExtensionReturn_new2(QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn); +void QWebPage__ExtensionReturn_Delete(QWebPage__ExtensionReturn* self, bool isSubclass); + +void QWebPage__ChooseMultipleFilesExtensionOption_Delete(QWebPage__ChooseMultipleFilesExtensionOption* self, bool isSubclass); + +void QWebPage__ChooseMultipleFilesExtensionReturn_Delete(QWebPage__ChooseMultipleFilesExtensionReturn* self, bool isSubclass); + +void QWebPage__ErrorPageExtensionOption_new(QWebPage__ErrorPageExtensionOption* param1, QWebPage__ErrorPageExtensionOption** outptr_QWebPage__ErrorPageExtensionOption, QWebPage__ExtensionOption** outptr_QWebPage__ExtensionOption); +void QWebPage__ErrorPageExtensionOption_OperatorAssign(QWebPage__ErrorPageExtensionOption* self, QWebPage__ErrorPageExtensionOption* param1); +void QWebPage__ErrorPageExtensionOption_Delete(QWebPage__ErrorPageExtensionOption* self, bool isSubclass); + +void QWebPage__ErrorPageExtensionReturn_new(QWebPage__ErrorPageExtensionReturn** outptr_QWebPage__ErrorPageExtensionReturn, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn); +void QWebPage__ErrorPageExtensionReturn_new2(QWebPage__ErrorPageExtensionReturn* param1, QWebPage__ErrorPageExtensionReturn** outptr_QWebPage__ErrorPageExtensionReturn, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn); +void QWebPage__ErrorPageExtensionReturn_OperatorAssign(QWebPage__ErrorPageExtensionReturn* self, QWebPage__ErrorPageExtensionReturn* param1); +void QWebPage__ErrorPageExtensionReturn_Delete(QWebPage__ErrorPageExtensionReturn* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webkit/gen_qwebpluginfactory.cpp b/qt/webkit/gen_qwebpluginfactory.cpp new file mode 100644 index 00000000..42cf7d8e --- /dev/null +++ b/qt/webkit/gen_qwebpluginfactory.cpp @@ -0,0 +1,639 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define WORKAROUND_INNER_CLASS_DEFINITION_QWebPluginFactory__ExtensionOption +#define WORKAROUND_INNER_CLASS_DEFINITION_QWebPluginFactory__ExtensionReturn +#define WORKAROUND_INNER_CLASS_DEFINITION_QWebPluginFactory__MimeType +#define WORKAROUND_INNER_CLASS_DEFINITION_QWebPluginFactory__Plugin +#include +#include "gen_qwebpluginfactory.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebPluginFactory : public virtual QWebPluginFactory { +public: + + MiqtVirtualQWebPluginFactory(): QWebPluginFactory() {}; + MiqtVirtualQWebPluginFactory(QObject* parent): QWebPluginFactory(parent) {}; + + virtual ~MiqtVirtualQWebPluginFactory() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__Plugins = 0; + + // Subclass to allow providing a Go implementation + virtual QList plugins() const override { + if (handle__Plugins == 0) { + return QList(); // Pure virtual, there is no base we can call + } + + + struct miqt_array /* of QWebPluginFactory__Plugin* */ callback_return_value = miqt_exec_callback_QWebPluginFactory_Plugins(const_cast(this), handle__Plugins); + QList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QWebPluginFactory__Plugin** 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__RefreshPlugins = 0; + + // Subclass to allow providing a Go implementation + virtual void refreshPlugins() override { + if (handle__RefreshPlugins == 0) { + QWebPluginFactory::refreshPlugins(); + return; + } + + + miqt_exec_callback_QWebPluginFactory_RefreshPlugins(this, handle__RefreshPlugins); + + + } + + // Wrapper to allow calling protected method + void virtualbase_RefreshPlugins() { + + QWebPluginFactory::refreshPlugins(); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Create = 0; + + // Subclass to allow providing a Go implementation + virtual QObject* create(const QString& mimeType, const QUrl& param2, const QStringList& argumentNames, const QStringList& argumentValues) const override { + if (handle__Create == 0) { + return nullptr; // Pure virtual, there is no base we can call + } + + const QString mimeType_ret = mimeType; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray mimeType_b = mimeType_ret.toUtf8(); + struct miqt_string mimeType_ms; + mimeType_ms.len = mimeType_b.length(); + mimeType_ms.data = static_cast(malloc(mimeType_ms.len)); + memcpy(mimeType_ms.data, mimeType_b.data(), mimeType_ms.len); + struct miqt_string sigval1 = mimeType_ms; + const QUrl& param2_ret = param2; + // Cast returned reference into pointer + QUrl* sigval2 = const_cast(¶m2_ret); + const QStringList& argumentNames_ret = argumentNames; + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* argumentNames_arr = static_cast(malloc(sizeof(struct miqt_string) * argumentNames_ret.length())); + for (size_t i = 0, e = argumentNames_ret.length(); i < e; ++i) { + QString argumentNames_lv_ret = argumentNames_ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray argumentNames_lv_b = argumentNames_lv_ret.toUtf8(); + struct miqt_string argumentNames_lv_ms; + argumentNames_lv_ms.len = argumentNames_lv_b.length(); + argumentNames_lv_ms.data = static_cast(malloc(argumentNames_lv_ms.len)); + memcpy(argumentNames_lv_ms.data, argumentNames_lv_b.data(), argumentNames_lv_ms.len); + argumentNames_arr[i] = argumentNames_lv_ms; + } + struct miqt_array argumentNames_out; + argumentNames_out.len = argumentNames_ret.length(); + argumentNames_out.data = static_cast(argumentNames_arr); + struct miqt_array /* of struct miqt_string */ sigval3 = argumentNames_out; + const QStringList& argumentValues_ret = argumentValues; + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* argumentValues_arr = static_cast(malloc(sizeof(struct miqt_string) * argumentValues_ret.length())); + for (size_t i = 0, e = argumentValues_ret.length(); i < e; ++i) { + QString argumentValues_lv_ret = argumentValues_ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray argumentValues_lv_b = argumentValues_lv_ret.toUtf8(); + struct miqt_string argumentValues_lv_ms; + argumentValues_lv_ms.len = argumentValues_lv_b.length(); + argumentValues_lv_ms.data = static_cast(malloc(argumentValues_lv_ms.len)); + memcpy(argumentValues_lv_ms.data, argumentValues_lv_b.data(), argumentValues_lv_ms.len); + argumentValues_arr[i] = argumentValues_lv_ms; + } + struct miqt_array argumentValues_out; + argumentValues_out.len = argumentValues_ret.length(); + argumentValues_out.data = static_cast(argumentValues_arr); + struct miqt_array /* of struct miqt_string */ sigval4 = argumentValues_out; + + QObject* callback_return_value = miqt_exec_callback_QWebPluginFactory_Create(const_cast(this), handle__Create, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Extension = 0; + + // Subclass to allow providing a Go implementation + virtual bool extension(QWebPluginFactory::Extension extension, const QWebPluginFactory::ExtensionOption* option, QWebPluginFactory::ExtensionReturn* output) override { + if (handle__Extension == 0) { + return QWebPluginFactory::extension(extension, option, output); + } + + QWebPluginFactory::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + QWebPluginFactory__ExtensionOption* sigval2 = (QWebPluginFactory__ExtensionOption*) option; + QWebPluginFactory__ExtensionReturn* sigval3 = output; + + bool callback_return_value = miqt_exec_callback_QWebPluginFactory_Extension(this, handle__Extension, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Extension(int extension, QWebPluginFactory__ExtensionOption* option, QWebPluginFactory__ExtensionReturn* output) { + + return QWebPluginFactory::extension(static_cast(extension), option, output); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__SupportsExtension = 0; + + // Subclass to allow providing a Go implementation + virtual bool supportsExtension(QWebPluginFactory::Extension extension) const override { + if (handle__SupportsExtension == 0) { + return QWebPluginFactory::supportsExtension(extension); + } + + QWebPluginFactory::Extension extension_ret = extension; + int sigval1 = static_cast(extension_ret); + + bool callback_return_value = miqt_exec_callback_QWebPluginFactory_SupportsExtension(const_cast(this), handle__SupportsExtension, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_SupportsExtension(int extension) const { + + return QWebPluginFactory::supportsExtension(static_cast(extension)); + + } + + // 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 QWebPluginFactory::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QWebPluginFactory_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* event) { + + return QWebPluginFactory::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 QWebPluginFactory::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QWebPluginFactory_EventFilter(this, handle__EventFilter, sigval1, sigval2); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_EventFilter(QObject* watched, QEvent* event) { + + return QWebPluginFactory::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) { + QWebPluginFactory::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QWebPluginFactory_TimerEvent(this, handle__TimerEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TimerEvent(QTimerEvent* event) { + + QWebPluginFactory::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) { + QWebPluginFactory::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QWebPluginFactory_ChildEvent(this, handle__ChildEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChildEvent(QChildEvent* event) { + + QWebPluginFactory::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) { + QWebPluginFactory::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebPluginFactory_CustomEvent(this, handle__CustomEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CustomEvent(QEvent* event) { + + QWebPluginFactory::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) { + QWebPluginFactory::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebPluginFactory_ConnectNotify(this, handle__ConnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ConnectNotify(QMetaMethod* signal) { + + QWebPluginFactory::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) { + QWebPluginFactory::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QWebPluginFactory_DisconnectNotify(this, handle__DisconnectNotify, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DisconnectNotify(QMetaMethod* signal) { + + QWebPluginFactory::disconnectNotify(*signal); + + } + +}; + +void QWebPluginFactory_new(QWebPluginFactory** outptr_QWebPluginFactory, QObject** outptr_QObject) { + MiqtVirtualQWebPluginFactory* ret = new MiqtVirtualQWebPluginFactory(); + *outptr_QWebPluginFactory = ret; + *outptr_QObject = static_cast(ret); +} + +void QWebPluginFactory_new2(QObject* parent, QWebPluginFactory** outptr_QWebPluginFactory, QObject** outptr_QObject) { + MiqtVirtualQWebPluginFactory* ret = new MiqtVirtualQWebPluginFactory(parent); + *outptr_QWebPluginFactory = ret; + *outptr_QObject = static_cast(ret); +} + +QMetaObject* QWebPluginFactory_MetaObject(const QWebPluginFactory* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebPluginFactory_Metacast(QWebPluginFactory* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebPluginFactory_Tr(const char* s) { + QString _ret = QWebPluginFactory::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebPluginFactory_TrUtf8(const char* s) { + QString _ret = QWebPluginFactory::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_array /* of QWebPluginFactory__Plugin* */ QWebPluginFactory_Plugins(const QWebPluginFactory* self) { + QList _ret = self->plugins(); + // Convert QList<> from C++ memory to manually-managed C memory + QWebPluginFactory__Plugin** _arr = static_cast(malloc(sizeof(QWebPluginFactory__Plugin*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QWebPluginFactory::Plugin(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QWebPluginFactory_RefreshPlugins(QWebPluginFactory* self) { + self->refreshPlugins(); +} + +QObject* QWebPluginFactory_Create(const QWebPluginFactory* self, struct miqt_string mimeType, QUrl* param2, struct miqt_array /* of struct miqt_string */ argumentNames, struct miqt_array /* of struct miqt_string */ argumentValues) { + QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); + QStringList argumentNames_QList; + argumentNames_QList.reserve(argumentNames.len); + struct miqt_string* argumentNames_arr = static_cast(argumentNames.data); + for(size_t i = 0; i < argumentNames.len; ++i) { + QString argumentNames_arr_i_QString = QString::fromUtf8(argumentNames_arr[i].data, argumentNames_arr[i].len); + argumentNames_QList.push_back(argumentNames_arr_i_QString); + } + QStringList argumentValues_QList; + argumentValues_QList.reserve(argumentValues.len); + struct miqt_string* argumentValues_arr = static_cast(argumentValues.data); + for(size_t i = 0; i < argumentValues.len; ++i) { + QString argumentValues_arr_i_QString = QString::fromUtf8(argumentValues_arr[i].data, argumentValues_arr[i].len); + argumentValues_QList.push_back(argumentValues_arr_i_QString); + } + return self->create(mimeType_QString, *param2, argumentNames_QList, argumentValues_QList); +} + +bool QWebPluginFactory_Extension(QWebPluginFactory* self, int extension, QWebPluginFactory__ExtensionOption* option, QWebPluginFactory__ExtensionReturn* output) { + return self->extension(static_cast(extension), option, output); +} + +bool QWebPluginFactory_SupportsExtension(const QWebPluginFactory* self, int extension) { + return self->supportsExtension(static_cast(extension)); +} + +struct miqt_string QWebPluginFactory_Tr2(const char* s, const char* c) { + QString _ret = QWebPluginFactory::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebPluginFactory_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebPluginFactory::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebPluginFactory_TrUtf82(const char* s, const char* c) { + QString _ret = QWebPluginFactory::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebPluginFactory_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebPluginFactory::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebPluginFactory_override_virtual_Plugins(void* self, intptr_t slot) { + dynamic_cast( (QWebPluginFactory*)(self) )->handle__Plugins = slot; +} + +void QWebPluginFactory_override_virtual_RefreshPlugins(void* self, intptr_t slot) { + dynamic_cast( (QWebPluginFactory*)(self) )->handle__RefreshPlugins = slot; +} + +void QWebPluginFactory_virtualbase_RefreshPlugins(void* self) { + ( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_RefreshPlugins(); +} + +void QWebPluginFactory_override_virtual_Create(void* self, intptr_t slot) { + dynamic_cast( (QWebPluginFactory*)(self) )->handle__Create = slot; +} + +void QWebPluginFactory_override_virtual_Extension(void* self, intptr_t slot) { + dynamic_cast( (QWebPluginFactory*)(self) )->handle__Extension = slot; +} + +bool QWebPluginFactory_virtualbase_Extension(void* self, int extension, QWebPluginFactory__ExtensionOption* option, QWebPluginFactory__ExtensionReturn* output) { + return ( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_Extension(extension, option, output); +} + +void QWebPluginFactory_override_virtual_SupportsExtension(void* self, intptr_t slot) { + dynamic_cast( (QWebPluginFactory*)(self) )->handle__SupportsExtension = slot; +} + +bool QWebPluginFactory_virtualbase_SupportsExtension(const void* self, int extension) { + return ( (const MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_SupportsExtension(extension); +} + +void QWebPluginFactory_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebPluginFactory*)(self) )->handle__Event = slot; +} + +bool QWebPluginFactory_virtualbase_Event(void* self, QEvent* event) { + return ( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_Event(event); +} + +void QWebPluginFactory_override_virtual_EventFilter(void* self, intptr_t slot) { + dynamic_cast( (QWebPluginFactory*)(self) )->handle__EventFilter = slot; +} + +bool QWebPluginFactory_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { + return ( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_EventFilter(watched, event); +} + +void QWebPluginFactory_override_virtual_TimerEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebPluginFactory*)(self) )->handle__TimerEvent = slot; +} + +void QWebPluginFactory_virtualbase_TimerEvent(void* self, QTimerEvent* event) { + ( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_TimerEvent(event); +} + +void QWebPluginFactory_override_virtual_ChildEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebPluginFactory*)(self) )->handle__ChildEvent = slot; +} + +void QWebPluginFactory_virtualbase_ChildEvent(void* self, QChildEvent* event) { + ( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_ChildEvent(event); +} + +void QWebPluginFactory_override_virtual_CustomEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebPluginFactory*)(self) )->handle__CustomEvent = slot; +} + +void QWebPluginFactory_virtualbase_CustomEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_CustomEvent(event); +} + +void QWebPluginFactory_override_virtual_ConnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebPluginFactory*)(self) )->handle__ConnectNotify = slot; +} + +void QWebPluginFactory_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_ConnectNotify(signal); +} + +void QWebPluginFactory_override_virtual_DisconnectNotify(void* self, intptr_t slot) { + dynamic_cast( (QWebPluginFactory*)(self) )->handle__DisconnectNotify = slot; +} + +void QWebPluginFactory_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { + ( (MiqtVirtualQWebPluginFactory*)(self) )->virtualbase_DisconnectNotify(signal); +} + +void QWebPluginFactory_Delete(QWebPluginFactory* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebPluginFactory__MimeType_new(QWebPluginFactory__MimeType* param1, QWebPluginFactory__MimeType** outptr_QWebPluginFactory__MimeType) { + QWebPluginFactory::MimeType* ret = new QWebPluginFactory::MimeType(*param1); + *outptr_QWebPluginFactory__MimeType = ret; +} + +bool QWebPluginFactory__MimeType_OperatorEqual(const QWebPluginFactory__MimeType* self, QWebPluginFactory__MimeType* other) { + return (*self == *other); +} + +bool QWebPluginFactory__MimeType_OperatorNotEqual(const QWebPluginFactory__MimeType* self, QWebPluginFactory__MimeType* other) { + return (*self != *other); +} + +void QWebPluginFactory__MimeType_OperatorAssign(QWebPluginFactory__MimeType* self, QWebPluginFactory__MimeType* param1) { + self->operator=(*param1); +} + +void QWebPluginFactory__MimeType_Delete(QWebPluginFactory__MimeType* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebPluginFactory__Plugin_new(QWebPluginFactory__Plugin* param1, QWebPluginFactory__Plugin** outptr_QWebPluginFactory__Plugin) { + QWebPluginFactory::Plugin* ret = new QWebPluginFactory::Plugin(*param1); + *outptr_QWebPluginFactory__Plugin = ret; +} + +void QWebPluginFactory__Plugin_OperatorAssign(QWebPluginFactory__Plugin* self, QWebPluginFactory__Plugin* param1) { + self->operator=(*param1); +} + +void QWebPluginFactory__Plugin_Delete(QWebPluginFactory__Plugin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebPluginFactory__ExtensionOption_Delete(QWebPluginFactory__ExtensionOption* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + +void QWebPluginFactory__ExtensionReturn_Delete(QWebPluginFactory__ExtensionReturn* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webkit/gen_qwebpluginfactory.go b/qt/webkit/gen_qwebpluginfactory.go new file mode 100644 index 00000000..dc4fb2f6 --- /dev/null +++ b/qt/webkit/gen_qwebpluginfactory.go @@ -0,0 +1,757 @@ +package webkit + +/* + +#include "gen_qwebpluginfactory.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebPluginFactory struct { + h *C.QWebPluginFactory + isSubclass bool + *qt.QObject +} + +func (this *QWebPluginFactory) cPointer() *C.QWebPluginFactory { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebPluginFactory) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebPluginFactory constructs the type using only CGO pointers. +func newQWebPluginFactory(h *C.QWebPluginFactory, h_QObject *C.QObject) *QWebPluginFactory { + if h == nil { + return nil + } + return &QWebPluginFactory{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} +} + +// UnsafeNewQWebPluginFactory constructs the type using only unsafe pointers. +func UnsafeNewQWebPluginFactory(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebPluginFactory { + if h == nil { + return nil + } + + return &QWebPluginFactory{h: (*C.QWebPluginFactory)(h), + QObject: qt.UnsafeNewQObject(h_QObject)} +} + +// NewQWebPluginFactory constructs a new QWebPluginFactory object. +func NewQWebPluginFactory() *QWebPluginFactory { + var outptr_QWebPluginFactory *C.QWebPluginFactory = nil + var outptr_QObject *C.QObject = nil + + C.QWebPluginFactory_new(&outptr_QWebPluginFactory, &outptr_QObject) + ret := newQWebPluginFactory(outptr_QWebPluginFactory, outptr_QObject) + ret.isSubclass = true + return ret +} + +// NewQWebPluginFactory2 constructs a new QWebPluginFactory object. +func NewQWebPluginFactory2(parent *qt.QObject) *QWebPluginFactory { + var outptr_QWebPluginFactory *C.QWebPluginFactory = nil + var outptr_QObject *C.QObject = nil + + C.QWebPluginFactory_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebPluginFactory, &outptr_QObject) + ret := newQWebPluginFactory(outptr_QWebPluginFactory, outptr_QObject) + ret.isSubclass = true + return ret +} + +func (this *QWebPluginFactory) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebPluginFactory_MetaObject(this.h))) +} + +func (this *QWebPluginFactory) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebPluginFactory_Metacast(this.h, param1_Cstring)) +} + +func QWebPluginFactory_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebPluginFactory_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebPluginFactory_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebPluginFactory_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebPluginFactory) Plugins() []QWebPluginFactory__Plugin { + var _ma C.struct_miqt_array = C.QWebPluginFactory_Plugins(this.h) + _ret := make([]QWebPluginFactory__Plugin, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebPluginFactory__Plugin)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebPluginFactory__Plugin(_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 *QWebPluginFactory) RefreshPlugins() { + C.QWebPluginFactory_RefreshPlugins(this.h) +} + +func (this *QWebPluginFactory) Create(mimeType string, param2 *qt.QUrl, argumentNames []string, argumentValues []string) *qt.QObject { + mimeType_ms := C.struct_miqt_string{} + mimeType_ms.data = C.CString(mimeType) + mimeType_ms.len = C.size_t(len(mimeType)) + defer C.free(unsafe.Pointer(mimeType_ms.data)) + argumentNames_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(argumentNames)))) + defer C.free(unsafe.Pointer(argumentNames_CArray)) + for i := range argumentNames { + argumentNames_i_ms := C.struct_miqt_string{} + argumentNames_i_ms.data = C.CString(argumentNames[i]) + argumentNames_i_ms.len = C.size_t(len(argumentNames[i])) + defer C.free(unsafe.Pointer(argumentNames_i_ms.data)) + argumentNames_CArray[i] = argumentNames_i_ms + } + argumentNames_ma := C.struct_miqt_array{len: C.size_t(len(argumentNames)), data: unsafe.Pointer(argumentNames_CArray)} + argumentValues_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(argumentValues)))) + defer C.free(unsafe.Pointer(argumentValues_CArray)) + for i := range argumentValues { + argumentValues_i_ms := C.struct_miqt_string{} + argumentValues_i_ms.data = C.CString(argumentValues[i]) + argumentValues_i_ms.len = C.size_t(len(argumentValues[i])) + defer C.free(unsafe.Pointer(argumentValues_i_ms.data)) + argumentValues_CArray[i] = argumentValues_i_ms + } + argumentValues_ma := C.struct_miqt_array{len: C.size_t(len(argumentValues)), data: unsafe.Pointer(argumentValues_CArray)} + return qt.UnsafeNewQObject(unsafe.Pointer(C.QWebPluginFactory_Create(this.h, mimeType_ms, (*C.QUrl)(param2.UnsafePointer()), argumentNames_ma, argumentValues_ma))) +} + +func (this *QWebPluginFactory) Extension(extension QWebPluginFactory__Extension, option *QWebPluginFactory__ExtensionOption, output *QWebPluginFactory__ExtensionReturn) bool { + return (bool)(C.QWebPluginFactory_Extension(this.h, (C.int)(extension), option.cPointer(), output.cPointer())) +} + +func (this *QWebPluginFactory) SupportsExtension(extension QWebPluginFactory__Extension) bool { + return (bool)(C.QWebPluginFactory_SupportsExtension(this.h, (C.int)(extension))) +} + +func QWebPluginFactory_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebPluginFactory_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebPluginFactory_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebPluginFactory_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebPluginFactory_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebPluginFactory_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebPluginFactory_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebPluginFactory_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} +func (this *QWebPluginFactory) OnPlugins(slot func() []QWebPluginFactory__Plugin) { + C.QWebPluginFactory_override_virtual_Plugins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPluginFactory_Plugins +func miqt_exec_callback_QWebPluginFactory_Plugins(self *C.QWebPluginFactory, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func() []QWebPluginFactory__Plugin) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc() + virtualReturn_CArray := (*[0xffff]*C.QWebPluginFactory__Plugin)(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 *QWebPluginFactory) callVirtualBase_RefreshPlugins() { + + C.QWebPluginFactory_virtualbase_RefreshPlugins(unsafe.Pointer(this.h)) + +} +func (this *QWebPluginFactory) OnRefreshPlugins(slot func(super func())) { + C.QWebPluginFactory_override_virtual_RefreshPlugins(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPluginFactory_RefreshPlugins +func miqt_exec_callback_QWebPluginFactory_RefreshPlugins(self *C.QWebPluginFactory, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QWebPluginFactory{h: self}).callVirtualBase_RefreshPlugins) + +} +func (this *QWebPluginFactory) OnCreate(slot func(mimeType string, param2 *qt.QUrl, argumentNames []string, argumentValues []string) *qt.QObject) { + C.QWebPluginFactory_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPluginFactory_Create +func miqt_exec_callback_QWebPluginFactory_Create(self *C.QWebPluginFactory, cb C.intptr_t, mimeType C.struct_miqt_string, param2 *C.QUrl, argumentNames C.struct_miqt_array, argumentValues C.struct_miqt_array) *C.QObject { + gofunc, ok := cgo.Handle(cb).Value().(func(mimeType string, param2 *qt.QUrl, argumentNames []string, argumentValues []string) *qt.QObject) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var mimeType_ms C.struct_miqt_string = mimeType + mimeType_ret := C.GoStringN(mimeType_ms.data, C.int(int64(mimeType_ms.len))) + C.free(unsafe.Pointer(mimeType_ms.data)) + slotval1 := mimeType_ret + slotval2 := qt.UnsafeNewQUrl(unsafe.Pointer(param2)) + var argumentNames_ma C.struct_miqt_array = argumentNames + argumentNames_ret := make([]string, int(argumentNames_ma.len)) + argumentNames_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(argumentNames_ma.data)) // hey ya + for i := 0; i < int(argumentNames_ma.len); i++ { + var argumentNames_lv_ms C.struct_miqt_string = argumentNames_outCast[i] + argumentNames_lv_ret := C.GoStringN(argumentNames_lv_ms.data, C.int(int64(argumentNames_lv_ms.len))) + C.free(unsafe.Pointer(argumentNames_lv_ms.data)) + argumentNames_ret[i] = argumentNames_lv_ret + } + slotval3 := argumentNames_ret + + var argumentValues_ma C.struct_miqt_array = argumentValues + argumentValues_ret := make([]string, int(argumentValues_ma.len)) + argumentValues_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(argumentValues_ma.data)) // hey ya + for i := 0; i < int(argumentValues_ma.len); i++ { + var argumentValues_lv_ms C.struct_miqt_string = argumentValues_outCast[i] + argumentValues_lv_ret := C.GoStringN(argumentValues_lv_ms.data, C.int(int64(argumentValues_lv_ms.len))) + C.free(unsafe.Pointer(argumentValues_lv_ms.data)) + argumentValues_ret[i] = argumentValues_lv_ret + } + slotval4 := argumentValues_ret + + virtualReturn := gofunc(slotval1, slotval2, slotval3, slotval4) + + return (*C.QObject)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebPluginFactory) callVirtualBase_Extension(extension QWebPluginFactory__Extension, option *QWebPluginFactory__ExtensionOption, output *QWebPluginFactory__ExtensionReturn) bool { + + return (bool)(C.QWebPluginFactory_virtualbase_Extension(unsafe.Pointer(this.h), (C.int)(extension), option.cPointer(), output.cPointer())) + +} +func (this *QWebPluginFactory) OnExtension(slot func(super func(extension QWebPluginFactory__Extension, option *QWebPluginFactory__ExtensionOption, output *QWebPluginFactory__ExtensionReturn) bool, extension QWebPluginFactory__Extension, option *QWebPluginFactory__ExtensionOption, output *QWebPluginFactory__ExtensionReturn) bool) { + C.QWebPluginFactory_override_virtual_Extension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPluginFactory_Extension +func miqt_exec_callback_QWebPluginFactory_Extension(self *C.QWebPluginFactory, cb C.intptr_t, extension C.int, option *C.QWebPluginFactory__ExtensionOption, output *C.QWebPluginFactory__ExtensionReturn) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QWebPluginFactory__Extension, option *QWebPluginFactory__ExtensionOption, output *QWebPluginFactory__ExtensionReturn) bool, extension QWebPluginFactory__Extension, option *QWebPluginFactory__ExtensionOption, output *QWebPluginFactory__ExtensionReturn) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebPluginFactory__Extension)(extension) + + slotval2 := UnsafeNewQWebPluginFactory__ExtensionOption(unsafe.Pointer(option)) + slotval3 := UnsafeNewQWebPluginFactory__ExtensionReturn(unsafe.Pointer(output)) + + virtualReturn := gofunc((&QWebPluginFactory{h: self}).callVirtualBase_Extension, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebPluginFactory) callVirtualBase_SupportsExtension(extension QWebPluginFactory__Extension) bool { + + return (bool)(C.QWebPluginFactory_virtualbase_SupportsExtension(unsafe.Pointer(this.h), (C.int)(extension))) + +} +func (this *QWebPluginFactory) OnSupportsExtension(slot func(super func(extension QWebPluginFactory__Extension) bool, extension QWebPluginFactory__Extension) bool) { + C.QWebPluginFactory_override_virtual_SupportsExtension(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPluginFactory_SupportsExtension +func miqt_exec_callback_QWebPluginFactory_SupportsExtension(self *C.QWebPluginFactory, cb C.intptr_t, extension C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(extension QWebPluginFactory__Extension) bool, extension QWebPluginFactory__Extension) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebPluginFactory__Extension)(extension) + + virtualReturn := gofunc((&QWebPluginFactory{h: self}).callVirtualBase_SupportsExtension, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebPluginFactory) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QWebPluginFactory_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebPluginFactory) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + C.QWebPluginFactory_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPluginFactory_Event +func miqt_exec_callback_QWebPluginFactory_Event(self *C.QWebPluginFactory, 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((&QWebPluginFactory{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebPluginFactory) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QWebPluginFactory_virtualbase_EventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QWebPluginFactory) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + C.QWebPluginFactory_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPluginFactory_EventFilter +func miqt_exec_callback_QWebPluginFactory_EventFilter(self *C.QWebPluginFactory, 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((&QWebPluginFactory{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebPluginFactory) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QWebPluginFactory_virtualbase_TimerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QWebPluginFactory) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + C.QWebPluginFactory_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPluginFactory_TimerEvent +func miqt_exec_callback_QWebPluginFactory_TimerEvent(self *C.QWebPluginFactory, 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((&QWebPluginFactory{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QWebPluginFactory) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QWebPluginFactory_virtualbase_ChildEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QWebPluginFactory) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + C.QWebPluginFactory_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPluginFactory_ChildEvent +func miqt_exec_callback_QWebPluginFactory_ChildEvent(self *C.QWebPluginFactory, 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((&QWebPluginFactory{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QWebPluginFactory) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QWebPluginFactory_virtualbase_CustomEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebPluginFactory) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QWebPluginFactory_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPluginFactory_CustomEvent +func miqt_exec_callback_QWebPluginFactory_CustomEvent(self *C.QWebPluginFactory, 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((&QWebPluginFactory{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QWebPluginFactory) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QWebPluginFactory_virtualbase_ConnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebPluginFactory) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebPluginFactory_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPluginFactory_ConnectNotify +func miqt_exec_callback_QWebPluginFactory_ConnectNotify(self *C.QWebPluginFactory, 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((&QWebPluginFactory{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QWebPluginFactory) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QWebPluginFactory_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QWebPluginFactory) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + C.QWebPluginFactory_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebPluginFactory_DisconnectNotify +func miqt_exec_callback_QWebPluginFactory_DisconnectNotify(self *C.QWebPluginFactory, 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((&QWebPluginFactory{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QWebPluginFactory) Delete() { + C.QWebPluginFactory_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 *QWebPluginFactory) GoGC() { + runtime.SetFinalizer(this, func(this *QWebPluginFactory) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebPluginFactory__MimeType struct { + h *C.QWebPluginFactory__MimeType + isSubclass bool +} + +func (this *QWebPluginFactory__MimeType) cPointer() *C.QWebPluginFactory__MimeType { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebPluginFactory__MimeType) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebPluginFactory__MimeType constructs the type using only CGO pointers. +func newQWebPluginFactory__MimeType(h *C.QWebPluginFactory__MimeType) *QWebPluginFactory__MimeType { + if h == nil { + return nil + } + return &QWebPluginFactory__MimeType{h: h} +} + +// UnsafeNewQWebPluginFactory__MimeType constructs the type using only unsafe pointers. +func UnsafeNewQWebPluginFactory__MimeType(h unsafe.Pointer) *QWebPluginFactory__MimeType { + if h == nil { + return nil + } + + return &QWebPluginFactory__MimeType{h: (*C.QWebPluginFactory__MimeType)(h)} +} + +// NewQWebPluginFactory__MimeType constructs a new QWebPluginFactory::MimeType object. +func NewQWebPluginFactory__MimeType(param1 *QWebPluginFactory__MimeType) *QWebPluginFactory__MimeType { + var outptr_QWebPluginFactory__MimeType *C.QWebPluginFactory__MimeType = nil + + C.QWebPluginFactory__MimeType_new(param1.cPointer(), &outptr_QWebPluginFactory__MimeType) + ret := newQWebPluginFactory__MimeType(outptr_QWebPluginFactory__MimeType) + ret.isSubclass = true + return ret +} + +func (this *QWebPluginFactory__MimeType) OperatorEqual(other *QWebPluginFactory__MimeType) bool { + return (bool)(C.QWebPluginFactory__MimeType_OperatorEqual(this.h, other.cPointer())) +} + +func (this *QWebPluginFactory__MimeType) OperatorNotEqual(other *QWebPluginFactory__MimeType) bool { + return (bool)(C.QWebPluginFactory__MimeType_OperatorNotEqual(this.h, other.cPointer())) +} + +func (this *QWebPluginFactory__MimeType) OperatorAssign(param1 *QWebPluginFactory__MimeType) { + C.QWebPluginFactory__MimeType_OperatorAssign(this.h, param1.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebPluginFactory__MimeType) Delete() { + C.QWebPluginFactory__MimeType_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 *QWebPluginFactory__MimeType) GoGC() { + runtime.SetFinalizer(this, func(this *QWebPluginFactory__MimeType) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebPluginFactory__Plugin struct { + h *C.QWebPluginFactory__Plugin + isSubclass bool +} + +func (this *QWebPluginFactory__Plugin) cPointer() *C.QWebPluginFactory__Plugin { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebPluginFactory__Plugin) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebPluginFactory__Plugin constructs the type using only CGO pointers. +func newQWebPluginFactory__Plugin(h *C.QWebPluginFactory__Plugin) *QWebPluginFactory__Plugin { + if h == nil { + return nil + } + return &QWebPluginFactory__Plugin{h: h} +} + +// UnsafeNewQWebPluginFactory__Plugin constructs the type using only unsafe pointers. +func UnsafeNewQWebPluginFactory__Plugin(h unsafe.Pointer) *QWebPluginFactory__Plugin { + if h == nil { + return nil + } + + return &QWebPluginFactory__Plugin{h: (*C.QWebPluginFactory__Plugin)(h)} +} + +// NewQWebPluginFactory__Plugin constructs a new QWebPluginFactory::Plugin object. +func NewQWebPluginFactory__Plugin(param1 *QWebPluginFactory__Plugin) *QWebPluginFactory__Plugin { + var outptr_QWebPluginFactory__Plugin *C.QWebPluginFactory__Plugin = nil + + C.QWebPluginFactory__Plugin_new(param1.cPointer(), &outptr_QWebPluginFactory__Plugin) + ret := newQWebPluginFactory__Plugin(outptr_QWebPluginFactory__Plugin) + ret.isSubclass = true + return ret +} + +func (this *QWebPluginFactory__Plugin) OperatorAssign(param1 *QWebPluginFactory__Plugin) { + C.QWebPluginFactory__Plugin_OperatorAssign(this.h, param1.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebPluginFactory__Plugin) Delete() { + C.QWebPluginFactory__Plugin_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 *QWebPluginFactory__Plugin) GoGC() { + runtime.SetFinalizer(this, func(this *QWebPluginFactory__Plugin) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebPluginFactory__ExtensionOption struct { + h *C.QWebPluginFactory__ExtensionOption + isSubclass bool +} + +func (this *QWebPluginFactory__ExtensionOption) cPointer() *C.QWebPluginFactory__ExtensionOption { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebPluginFactory__ExtensionOption) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebPluginFactory__ExtensionOption constructs the type using only CGO pointers. +func newQWebPluginFactory__ExtensionOption(h *C.QWebPluginFactory__ExtensionOption) *QWebPluginFactory__ExtensionOption { + if h == nil { + return nil + } + return &QWebPluginFactory__ExtensionOption{h: h} +} + +// UnsafeNewQWebPluginFactory__ExtensionOption constructs the type using only unsafe pointers. +func UnsafeNewQWebPluginFactory__ExtensionOption(h unsafe.Pointer) *QWebPluginFactory__ExtensionOption { + if h == nil { + return nil + } + + return &QWebPluginFactory__ExtensionOption{h: (*C.QWebPluginFactory__ExtensionOption)(h)} +} + +// Delete this object from C++ memory. +func (this *QWebPluginFactory__ExtensionOption) Delete() { + C.QWebPluginFactory__ExtensionOption_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 *QWebPluginFactory__ExtensionOption) GoGC() { + runtime.SetFinalizer(this, func(this *QWebPluginFactory__ExtensionOption) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QWebPluginFactory__ExtensionReturn struct { + h *C.QWebPluginFactory__ExtensionReturn + isSubclass bool +} + +func (this *QWebPluginFactory__ExtensionReturn) cPointer() *C.QWebPluginFactory__ExtensionReturn { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebPluginFactory__ExtensionReturn) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebPluginFactory__ExtensionReturn constructs the type using only CGO pointers. +func newQWebPluginFactory__ExtensionReturn(h *C.QWebPluginFactory__ExtensionReturn) *QWebPluginFactory__ExtensionReturn { + if h == nil { + return nil + } + return &QWebPluginFactory__ExtensionReturn{h: h} +} + +// UnsafeNewQWebPluginFactory__ExtensionReturn constructs the type using only unsafe pointers. +func UnsafeNewQWebPluginFactory__ExtensionReturn(h unsafe.Pointer) *QWebPluginFactory__ExtensionReturn { + if h == nil { + return nil + } + + return &QWebPluginFactory__ExtensionReturn{h: (*C.QWebPluginFactory__ExtensionReturn)(h)} +} + +// Delete this object from C++ memory. +func (this *QWebPluginFactory__ExtensionReturn) Delete() { + C.QWebPluginFactory__ExtensionReturn_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 *QWebPluginFactory__ExtensionReturn) GoGC() { + runtime.SetFinalizer(this, func(this *QWebPluginFactory__ExtensionReturn) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webkit/gen_qwebpluginfactory.h b/qt/webkit/gen_qwebpluginfactory.h new file mode 100644 index 00000000..d1abc450 --- /dev/null +++ b/qt/webkit/gen_qwebpluginfactory.h @@ -0,0 +1,120 @@ +#pragma once +#ifndef MIQT_QT_WEBKIT_GEN_QWEBPLUGINFACTORY_H +#define MIQT_QT_WEBKIT_GEN_QWEBPLUGINFACTORY_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QObject; +class QTimerEvent; +class QUrl; +class QWebPluginFactory; +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPluginFactory__ExtensionOption) +typedef QWebPluginFactory::ExtensionOption QWebPluginFactory__ExtensionOption; +#else +class QWebPluginFactory__ExtensionOption; +#endif +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPluginFactory__ExtensionReturn) +typedef QWebPluginFactory::ExtensionReturn QWebPluginFactory__ExtensionReturn; +#else +class QWebPluginFactory__ExtensionReturn; +#endif +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPluginFactory__MimeType) +typedef QWebPluginFactory::MimeType QWebPluginFactory__MimeType; +#else +class QWebPluginFactory__MimeType; +#endif +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QWebPluginFactory__Plugin) +typedef QWebPluginFactory::Plugin QWebPluginFactory__Plugin; +#else +class QWebPluginFactory__Plugin; +#endif +#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 QUrl QUrl; +typedef struct QWebPluginFactory QWebPluginFactory; +typedef struct QWebPluginFactory__ExtensionOption QWebPluginFactory__ExtensionOption; +typedef struct QWebPluginFactory__ExtensionReturn QWebPluginFactory__ExtensionReturn; +typedef struct QWebPluginFactory__MimeType QWebPluginFactory__MimeType; +typedef struct QWebPluginFactory__Plugin QWebPluginFactory__Plugin; +#endif + +void QWebPluginFactory_new(QWebPluginFactory** outptr_QWebPluginFactory, QObject** outptr_QObject); +void QWebPluginFactory_new2(QObject* parent, QWebPluginFactory** outptr_QWebPluginFactory, QObject** outptr_QObject); +QMetaObject* QWebPluginFactory_MetaObject(const QWebPluginFactory* self); +void* QWebPluginFactory_Metacast(QWebPluginFactory* self, const char* param1); +struct miqt_string QWebPluginFactory_Tr(const char* s); +struct miqt_string QWebPluginFactory_TrUtf8(const char* s); +struct miqt_array /* of QWebPluginFactory__Plugin* */ QWebPluginFactory_Plugins(const QWebPluginFactory* self); +void QWebPluginFactory_RefreshPlugins(QWebPluginFactory* self); +QObject* QWebPluginFactory_Create(const QWebPluginFactory* self, struct miqt_string mimeType, QUrl* param2, struct miqt_array /* of struct miqt_string */ argumentNames, struct miqt_array /* of struct miqt_string */ argumentValues); +bool QWebPluginFactory_Extension(QWebPluginFactory* self, int extension, QWebPluginFactory__ExtensionOption* option, QWebPluginFactory__ExtensionReturn* output); +bool QWebPluginFactory_SupportsExtension(const QWebPluginFactory* self, int extension); +struct miqt_string QWebPluginFactory_Tr2(const char* s, const char* c); +struct miqt_string QWebPluginFactory_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebPluginFactory_TrUtf82(const char* s, const char* c); +struct miqt_string QWebPluginFactory_TrUtf83(const char* s, const char* c, int n); +void QWebPluginFactory_override_virtual_Plugins(void* self, intptr_t slot); +struct miqt_array /* of QWebPluginFactory__Plugin* */ QWebPluginFactory_virtualbase_Plugins(const void* self); +void QWebPluginFactory_override_virtual_RefreshPlugins(void* self, intptr_t slot); +void QWebPluginFactory_virtualbase_RefreshPlugins(void* self); +void QWebPluginFactory_override_virtual_Create(void* self, intptr_t slot); +QObject* QWebPluginFactory_virtualbase_Create(const void* self, struct miqt_string mimeType, QUrl* param2, struct miqt_array /* of struct miqt_string */ argumentNames, struct miqt_array /* of struct miqt_string */ argumentValues); +void QWebPluginFactory_override_virtual_Extension(void* self, intptr_t slot); +bool QWebPluginFactory_virtualbase_Extension(void* self, int extension, QWebPluginFactory__ExtensionOption* option, QWebPluginFactory__ExtensionReturn* output); +void QWebPluginFactory_override_virtual_SupportsExtension(void* self, intptr_t slot); +bool QWebPluginFactory_virtualbase_SupportsExtension(const void* self, int extension); +void QWebPluginFactory_override_virtual_Event(void* self, intptr_t slot); +bool QWebPluginFactory_virtualbase_Event(void* self, QEvent* event); +void QWebPluginFactory_override_virtual_EventFilter(void* self, intptr_t slot); +bool QWebPluginFactory_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event); +void QWebPluginFactory_override_virtual_TimerEvent(void* self, intptr_t slot); +void QWebPluginFactory_virtualbase_TimerEvent(void* self, QTimerEvent* event); +void QWebPluginFactory_override_virtual_ChildEvent(void* self, intptr_t slot); +void QWebPluginFactory_virtualbase_ChildEvent(void* self, QChildEvent* event); +void QWebPluginFactory_override_virtual_CustomEvent(void* self, intptr_t slot); +void QWebPluginFactory_virtualbase_CustomEvent(void* self, QEvent* event); +void QWebPluginFactory_override_virtual_ConnectNotify(void* self, intptr_t slot); +void QWebPluginFactory_virtualbase_ConnectNotify(void* self, QMetaMethod* signal); +void QWebPluginFactory_override_virtual_DisconnectNotify(void* self, intptr_t slot); +void QWebPluginFactory_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); +void QWebPluginFactory_Delete(QWebPluginFactory* self, bool isSubclass); + +void QWebPluginFactory__MimeType_new(QWebPluginFactory__MimeType* param1, QWebPluginFactory__MimeType** outptr_QWebPluginFactory__MimeType); +bool QWebPluginFactory__MimeType_OperatorEqual(const QWebPluginFactory__MimeType* self, QWebPluginFactory__MimeType* other); +bool QWebPluginFactory__MimeType_OperatorNotEqual(const QWebPluginFactory__MimeType* self, QWebPluginFactory__MimeType* other); +void QWebPluginFactory__MimeType_OperatorAssign(QWebPluginFactory__MimeType* self, QWebPluginFactory__MimeType* param1); +void QWebPluginFactory__MimeType_Delete(QWebPluginFactory__MimeType* self, bool isSubclass); + +void QWebPluginFactory__Plugin_new(QWebPluginFactory__Plugin* param1, QWebPluginFactory__Plugin** outptr_QWebPluginFactory__Plugin); +void QWebPluginFactory__Plugin_OperatorAssign(QWebPluginFactory__Plugin* self, QWebPluginFactory__Plugin* param1); +void QWebPluginFactory__Plugin_Delete(QWebPluginFactory__Plugin* self, bool isSubclass); + +void QWebPluginFactory__ExtensionOption_Delete(QWebPluginFactory__ExtensionOption* self, bool isSubclass); + +void QWebPluginFactory__ExtensionReturn_Delete(QWebPluginFactory__ExtensionReturn* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webkit/gen_qwebsecurityorigin.cpp b/qt/webkit/gen_qwebsecurityorigin.cpp new file mode 100644 index 00000000..18e91fde --- /dev/null +++ b/qt/webkit/gen_qwebsecurityorigin.cpp @@ -0,0 +1,145 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebsecurityorigin.h" +#include "_cgo_export.h" + +void QWebSecurityOrigin_new(QUrl* url, QWebSecurityOrigin** outptr_QWebSecurityOrigin) { + QWebSecurityOrigin* ret = new QWebSecurityOrigin(*url); + *outptr_QWebSecurityOrigin = ret; +} + +void QWebSecurityOrigin_new2(QWebSecurityOrigin* other, QWebSecurityOrigin** outptr_QWebSecurityOrigin) { + QWebSecurityOrigin* ret = new QWebSecurityOrigin(*other); + *outptr_QWebSecurityOrigin = ret; +} + +struct miqt_array /* of QWebSecurityOrigin* */ QWebSecurityOrigin_AllOrigins() { + QList _ret = QWebSecurityOrigin::allOrigins(); + // Convert QList<> from C++ memory to manually-managed C memory + QWebSecurityOrigin** _arr = static_cast(malloc(sizeof(QWebSecurityOrigin*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QWebSecurityOrigin(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QWebSecurityOrigin_AddLocalScheme(struct miqt_string scheme) { + QString scheme_QString = QString::fromUtf8(scheme.data, scheme.len); + QWebSecurityOrigin::addLocalScheme(scheme_QString); +} + +void QWebSecurityOrigin_RemoveLocalScheme(struct miqt_string scheme) { + QString scheme_QString = QString::fromUtf8(scheme.data, scheme.len); + QWebSecurityOrigin::removeLocalScheme(scheme_QString); +} + +struct miqt_array /* of struct miqt_string */ QWebSecurityOrigin_LocalSchemes() { + QStringList _ret = QWebSecurityOrigin::localSchemes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QWebSecurityOrigin_AddAccessWhitelistEntry(QWebSecurityOrigin* self, struct miqt_string scheme, struct miqt_string host, int subdomainSetting) { + QString scheme_QString = QString::fromUtf8(scheme.data, scheme.len); + QString host_QString = QString::fromUtf8(host.data, host.len); + self->addAccessWhitelistEntry(scheme_QString, host_QString, static_cast(subdomainSetting)); +} + +void QWebSecurityOrigin_RemoveAccessWhitelistEntry(QWebSecurityOrigin* self, struct miqt_string scheme, struct miqt_string host, int subdomainSetting) { + QString scheme_QString = QString::fromUtf8(scheme.data, scheme.len); + QString host_QString = QString::fromUtf8(host.data, host.len); + self->removeAccessWhitelistEntry(scheme_QString, host_QString, static_cast(subdomainSetting)); +} + +struct miqt_string QWebSecurityOrigin_Scheme(const QWebSecurityOrigin* self) { + QString _ret = self->scheme(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebSecurityOrigin_Host(const QWebSecurityOrigin* self) { + QString _ret = self->host(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QWebSecurityOrigin_Port(const QWebSecurityOrigin* self) { + return self->port(); +} + +long long QWebSecurityOrigin_DatabaseUsage(const QWebSecurityOrigin* self) { + qint64 _ret = self->databaseUsage(); + return static_cast(_ret); +} + +long long QWebSecurityOrigin_DatabaseQuota(const QWebSecurityOrigin* self) { + qint64 _ret = self->databaseQuota(); + return static_cast(_ret); +} + +void QWebSecurityOrigin_SetDatabaseQuota(QWebSecurityOrigin* self, long long quota) { + self->setDatabaseQuota(static_cast(quota)); +} + +void QWebSecurityOrigin_SetApplicationCacheQuota(QWebSecurityOrigin* self, long long quota) { + self->setApplicationCacheQuota(static_cast(quota)); +} + +struct miqt_array /* of QWebDatabase* */ QWebSecurityOrigin_Databases(const QWebSecurityOrigin* self) { + QList _ret = self->databases(); + // Convert QList<> from C++ memory to manually-managed C memory + QWebDatabase** _arr = static_cast(malloc(sizeof(QWebDatabase*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QWebDatabase(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QWebSecurityOrigin_OperatorAssign(QWebSecurityOrigin* self, QWebSecurityOrigin* other) { + self->operator=(*other); +} + +void QWebSecurityOrigin_Delete(QWebSecurityOrigin* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webkit/gen_qwebsecurityorigin.go b/qt/webkit/gen_qwebsecurityorigin.go new file mode 100644 index 00000000..149f7c56 --- /dev/null +++ b/qt/webkit/gen_qwebsecurityorigin.go @@ -0,0 +1,209 @@ +package webkit + +/* + +#include "gen_qwebsecurityorigin.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QWebSecurityOrigin__SubdomainSetting int + +const ( + QWebSecurityOrigin__AllowSubdomains QWebSecurityOrigin__SubdomainSetting = 0 + QWebSecurityOrigin__DisallowSubdomains QWebSecurityOrigin__SubdomainSetting = 1 +) + +type QWebSecurityOrigin struct { + h *C.QWebSecurityOrigin + isSubclass bool +} + +func (this *QWebSecurityOrigin) cPointer() *C.QWebSecurityOrigin { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebSecurityOrigin) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebSecurityOrigin constructs the type using only CGO pointers. +func newQWebSecurityOrigin(h *C.QWebSecurityOrigin) *QWebSecurityOrigin { + if h == nil { + return nil + } + return &QWebSecurityOrigin{h: h} +} + +// UnsafeNewQWebSecurityOrigin constructs the type using only unsafe pointers. +func UnsafeNewQWebSecurityOrigin(h unsafe.Pointer) *QWebSecurityOrigin { + if h == nil { + return nil + } + + return &QWebSecurityOrigin{h: (*C.QWebSecurityOrigin)(h)} +} + +// NewQWebSecurityOrigin constructs a new QWebSecurityOrigin object. +func NewQWebSecurityOrigin(url *qt.QUrl) *QWebSecurityOrigin { + var outptr_QWebSecurityOrigin *C.QWebSecurityOrigin = nil + + C.QWebSecurityOrigin_new((*C.QUrl)(url.UnsafePointer()), &outptr_QWebSecurityOrigin) + ret := newQWebSecurityOrigin(outptr_QWebSecurityOrigin) + ret.isSubclass = true + return ret +} + +// NewQWebSecurityOrigin2 constructs a new QWebSecurityOrigin object. +func NewQWebSecurityOrigin2(other *QWebSecurityOrigin) *QWebSecurityOrigin { + var outptr_QWebSecurityOrigin *C.QWebSecurityOrigin = nil + + C.QWebSecurityOrigin_new2(other.cPointer(), &outptr_QWebSecurityOrigin) + ret := newQWebSecurityOrigin(outptr_QWebSecurityOrigin) + ret.isSubclass = true + return ret +} + +func QWebSecurityOrigin_AllOrigins() []QWebSecurityOrigin { + var _ma C.struct_miqt_array = C.QWebSecurityOrigin_AllOrigins() + _ret := make([]QWebSecurityOrigin, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebSecurityOrigin)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebSecurityOrigin(_lv_ret) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +func QWebSecurityOrigin_AddLocalScheme(scheme string) { + scheme_ms := C.struct_miqt_string{} + scheme_ms.data = C.CString(scheme) + scheme_ms.len = C.size_t(len(scheme)) + defer C.free(unsafe.Pointer(scheme_ms.data)) + C.QWebSecurityOrigin_AddLocalScheme(scheme_ms) +} + +func QWebSecurityOrigin_RemoveLocalScheme(scheme string) { + scheme_ms := C.struct_miqt_string{} + scheme_ms.data = C.CString(scheme) + scheme_ms.len = C.size_t(len(scheme)) + defer C.free(unsafe.Pointer(scheme_ms.data)) + C.QWebSecurityOrigin_RemoveLocalScheme(scheme_ms) +} + +func QWebSecurityOrigin_LocalSchemes() []string { + var _ma C.struct_miqt_array = C.QWebSecurityOrigin_LocalSchemes() + _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 *QWebSecurityOrigin) AddAccessWhitelistEntry(scheme string, host string, subdomainSetting QWebSecurityOrigin__SubdomainSetting) { + scheme_ms := C.struct_miqt_string{} + scheme_ms.data = C.CString(scheme) + scheme_ms.len = C.size_t(len(scheme)) + defer C.free(unsafe.Pointer(scheme_ms.data)) + host_ms := C.struct_miqt_string{} + host_ms.data = C.CString(host) + host_ms.len = C.size_t(len(host)) + defer C.free(unsafe.Pointer(host_ms.data)) + C.QWebSecurityOrigin_AddAccessWhitelistEntry(this.h, scheme_ms, host_ms, (C.int)(subdomainSetting)) +} + +func (this *QWebSecurityOrigin) RemoveAccessWhitelistEntry(scheme string, host string, subdomainSetting QWebSecurityOrigin__SubdomainSetting) { + scheme_ms := C.struct_miqt_string{} + scheme_ms.data = C.CString(scheme) + scheme_ms.len = C.size_t(len(scheme)) + defer C.free(unsafe.Pointer(scheme_ms.data)) + host_ms := C.struct_miqt_string{} + host_ms.data = C.CString(host) + host_ms.len = C.size_t(len(host)) + defer C.free(unsafe.Pointer(host_ms.data)) + C.QWebSecurityOrigin_RemoveAccessWhitelistEntry(this.h, scheme_ms, host_ms, (C.int)(subdomainSetting)) +} + +func (this *QWebSecurityOrigin) Scheme() string { + var _ms C.struct_miqt_string = C.QWebSecurityOrigin_Scheme(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebSecurityOrigin) Host() string { + var _ms C.struct_miqt_string = C.QWebSecurityOrigin_Host(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebSecurityOrigin) Port() int { + return (int)(C.QWebSecurityOrigin_Port(this.h)) +} + +func (this *QWebSecurityOrigin) DatabaseUsage() int64 { + return (int64)(C.QWebSecurityOrigin_DatabaseUsage(this.h)) +} + +func (this *QWebSecurityOrigin) DatabaseQuota() int64 { + return (int64)(C.QWebSecurityOrigin_DatabaseQuota(this.h)) +} + +func (this *QWebSecurityOrigin) SetDatabaseQuota(quota int64) { + C.QWebSecurityOrigin_SetDatabaseQuota(this.h, (C.longlong)(quota)) +} + +func (this *QWebSecurityOrigin) SetApplicationCacheQuota(quota int64) { + C.QWebSecurityOrigin_SetApplicationCacheQuota(this.h, (C.longlong)(quota)) +} + +func (this *QWebSecurityOrigin) Databases() []QWebDatabase { + var _ma C.struct_miqt_array = C.QWebSecurityOrigin_Databases(this.h) + _ret := make([]QWebDatabase, int(_ma.len)) + _outCast := (*[0xffff]*C.QWebDatabase)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_ret := _outCast[i] + _lv_goptr := newQWebDatabase(_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 *QWebSecurityOrigin) OperatorAssign(other *QWebSecurityOrigin) { + C.QWebSecurityOrigin_OperatorAssign(this.h, other.cPointer()) +} + +// Delete this object from C++ memory. +func (this *QWebSecurityOrigin) Delete() { + C.QWebSecurityOrigin_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 *QWebSecurityOrigin) GoGC() { + runtime.SetFinalizer(this, func(this *QWebSecurityOrigin) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webkit/gen_qwebsecurityorigin.h b/qt/webkit/gen_qwebsecurityorigin.h new file mode 100644 index 00000000..1a605efe --- /dev/null +++ b/qt/webkit/gen_qwebsecurityorigin.h @@ -0,0 +1,50 @@ +#pragma once +#ifndef MIQT_QT_WEBKIT_GEN_QWEBSECURITYORIGIN_H +#define MIQT_QT_WEBKIT_GEN_QWEBSECURITYORIGIN_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QUrl; +class QWebDatabase; +class QWebSecurityOrigin; +#else +typedef struct QUrl QUrl; +typedef struct QWebDatabase QWebDatabase; +typedef struct QWebSecurityOrigin QWebSecurityOrigin; +#endif + +void QWebSecurityOrigin_new(QUrl* url, QWebSecurityOrigin** outptr_QWebSecurityOrigin); +void QWebSecurityOrigin_new2(QWebSecurityOrigin* other, QWebSecurityOrigin** outptr_QWebSecurityOrigin); +struct miqt_array /* of QWebSecurityOrigin* */ QWebSecurityOrigin_AllOrigins(); +void QWebSecurityOrigin_AddLocalScheme(struct miqt_string scheme); +void QWebSecurityOrigin_RemoveLocalScheme(struct miqt_string scheme); +struct miqt_array /* of struct miqt_string */ QWebSecurityOrigin_LocalSchemes(); +void QWebSecurityOrigin_AddAccessWhitelistEntry(QWebSecurityOrigin* self, struct miqt_string scheme, struct miqt_string host, int subdomainSetting); +void QWebSecurityOrigin_RemoveAccessWhitelistEntry(QWebSecurityOrigin* self, struct miqt_string scheme, struct miqt_string host, int subdomainSetting); +struct miqt_string QWebSecurityOrigin_Scheme(const QWebSecurityOrigin* self); +struct miqt_string QWebSecurityOrigin_Host(const QWebSecurityOrigin* self); +int QWebSecurityOrigin_Port(const QWebSecurityOrigin* self); +long long QWebSecurityOrigin_DatabaseUsage(const QWebSecurityOrigin* self); +long long QWebSecurityOrigin_DatabaseQuota(const QWebSecurityOrigin* self); +void QWebSecurityOrigin_SetDatabaseQuota(QWebSecurityOrigin* self, long long quota); +void QWebSecurityOrigin_SetApplicationCacheQuota(QWebSecurityOrigin* self, long long quota); +struct miqt_array /* of QWebDatabase* */ QWebSecurityOrigin_Databases(const QWebSecurityOrigin* self); +void QWebSecurityOrigin_OperatorAssign(QWebSecurityOrigin* self, QWebSecurityOrigin* other); +void QWebSecurityOrigin_Delete(QWebSecurityOrigin* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webkit/gen_qwebsettings.cpp b/qt/webkit/gen_qwebsettings.cpp new file mode 100644 index 00000000..3b5f0444 --- /dev/null +++ b/qt/webkit/gen_qwebsettings.cpp @@ -0,0 +1,263 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qwebsettings.h" +#include "_cgo_export.h" + +QWebSettings* QWebSettings_GlobalSettings() { + return QWebSettings::globalSettings(); +} + +void QWebSettings_SetFontFamily(QWebSettings* self, int which, struct miqt_string family) { + QString family_QString = QString::fromUtf8(family.data, family.len); + self->setFontFamily(static_cast(which), family_QString); +} + +struct miqt_string QWebSettings_FontFamily(const QWebSettings* self, int which) { + QString _ret = self->fontFamily(static_cast(which)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebSettings_ResetFontFamily(QWebSettings* self, int which) { + self->resetFontFamily(static_cast(which)); +} + +void QWebSettings_SetFontSize(QWebSettings* self, int typeVal, int size) { + self->setFontSize(static_cast(typeVal), static_cast(size)); +} + +int QWebSettings_FontSize(const QWebSettings* self, int typeVal) { + return self->fontSize(static_cast(typeVal)); +} + +void QWebSettings_ResetFontSize(QWebSettings* self, int typeVal) { + self->resetFontSize(static_cast(typeVal)); +} + +void QWebSettings_SetAttribute(QWebSettings* self, int attr, bool on) { + self->setAttribute(static_cast(attr), on); +} + +bool QWebSettings_TestAttribute(const QWebSettings* self, int attr) { + return self->testAttribute(static_cast(attr)); +} + +void QWebSettings_ResetAttribute(QWebSettings* self, int attr) { + self->resetAttribute(static_cast(attr)); +} + +void QWebSettings_SetUserStyleSheetUrl(QWebSettings* self, QUrl* location) { + self->setUserStyleSheetUrl(*location); +} + +QUrl* QWebSettings_UserStyleSheetUrl(const QWebSettings* self) { + return new QUrl(self->userStyleSheetUrl()); +} + +void QWebSettings_SetDefaultTextEncoding(QWebSettings* self, struct miqt_string encoding) { + QString encoding_QString = QString::fromUtf8(encoding.data, encoding.len); + self->setDefaultTextEncoding(encoding_QString); +} + +struct miqt_string QWebSettings_DefaultTextEncoding(const QWebSettings* self) { + QString _ret = self->defaultTextEncoding(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebSettings_SetIconDatabasePath(struct miqt_string location) { + QString location_QString = QString::fromUtf8(location.data, location.len); + QWebSettings::setIconDatabasePath(location_QString); +} + +struct miqt_string QWebSettings_IconDatabasePath() { + QString _ret = QWebSettings::iconDatabasePath(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebSettings_ClearIconDatabase() { + QWebSettings::clearIconDatabase(); +} + +QIcon* QWebSettings_IconForUrl(QUrl* url) { + return new QIcon(QWebSettings::iconForUrl(*url)); +} + +void QWebSettings_SetPluginSearchPaths(struct miqt_array /* of struct miqt_string */ paths) { + QStringList paths_QList; + paths_QList.reserve(paths.len); + struct miqt_string* paths_arr = static_cast(paths.data); + for(size_t i = 0; i < paths.len; ++i) { + QString paths_arr_i_QString = QString::fromUtf8(paths_arr[i].data, paths_arr[i].len); + paths_QList.push_back(paths_arr_i_QString); + } + QWebSettings::setPluginSearchPaths(paths_QList); +} + +struct miqt_array /* of struct miqt_string */ QWebSettings_PluginSearchPaths() { + QStringList _ret = QWebSettings::pluginSearchPaths(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QWebSettings_SetWebGraphic(int typeVal, QPixmap* graphic) { + QWebSettings::setWebGraphic(static_cast(typeVal), *graphic); +} + +QPixmap* QWebSettings_WebGraphic(int typeVal) { + return new QPixmap(QWebSettings::webGraphic(static_cast(typeVal))); +} + +void QWebSettings_SetMaximumPagesInCache(int pages) { + QWebSettings::setMaximumPagesInCache(static_cast(pages)); +} + +int QWebSettings_MaximumPagesInCache() { + return QWebSettings::maximumPagesInCache(); +} + +void QWebSettings_SetObjectCacheCapacities(int cacheMinDeadCapacity, int cacheMaxDead, int totalCapacity) { + QWebSettings::setObjectCacheCapacities(static_cast(cacheMinDeadCapacity), static_cast(cacheMaxDead), static_cast(totalCapacity)); +} + +void QWebSettings_SetOfflineStoragePath(struct miqt_string path) { + QString path_QString = QString::fromUtf8(path.data, path.len); + QWebSettings::setOfflineStoragePath(path_QString); +} + +struct miqt_string QWebSettings_OfflineStoragePath() { + QString _ret = QWebSettings::offlineStoragePath(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebSettings_SetOfflineStorageDefaultQuota(long long maximumSize) { + QWebSettings::setOfflineStorageDefaultQuota(static_cast(maximumSize)); +} + +long long QWebSettings_OfflineStorageDefaultQuota() { + qint64 _ret = QWebSettings::offlineStorageDefaultQuota(); + return static_cast(_ret); +} + +void QWebSettings_SetOfflineWebApplicationCachePath(struct miqt_string path) { + QString path_QString = QString::fromUtf8(path.data, path.len); + QWebSettings::setOfflineWebApplicationCachePath(path_QString); +} + +struct miqt_string QWebSettings_OfflineWebApplicationCachePath() { + QString _ret = QWebSettings::offlineWebApplicationCachePath(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebSettings_SetOfflineWebApplicationCacheQuota(long long maximumSize) { + QWebSettings::setOfflineWebApplicationCacheQuota(static_cast(maximumSize)); +} + +long long QWebSettings_OfflineWebApplicationCacheQuota() { + qint64 _ret = QWebSettings::offlineWebApplicationCacheQuota(); + return static_cast(_ret); +} + +void QWebSettings_SetLocalStoragePath(QWebSettings* self, struct miqt_string path) { + QString path_QString = QString::fromUtf8(path.data, path.len); + self->setLocalStoragePath(path_QString); +} + +struct miqt_string QWebSettings_LocalStoragePath(const QWebSettings* self) { + QString _ret = self->localStoragePath(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebSettings_ClearMemoryCaches() { + QWebSettings::clearMemoryCaches(); +} + +void QWebSettings_EnablePersistentStorage() { + QWebSettings::enablePersistentStorage(); +} + +void QWebSettings_SetThirdPartyCookiePolicy(QWebSettings* self, int thirdPartyCookiePolicy) { + self->setThirdPartyCookiePolicy(static_cast(thirdPartyCookiePolicy)); +} + +int QWebSettings_ThirdPartyCookiePolicy(const QWebSettings* self) { + QWebSettings::ThirdPartyCookiePolicy _ret = self->thirdPartyCookiePolicy(); + return static_cast(_ret); +} + +void QWebSettings_SetCSSMediaType(QWebSettings* self, struct miqt_string cSSMediaType) { + QString cSSMediaType_QString = QString::fromUtf8(cSSMediaType.data, cSSMediaType.len); + self->setCSSMediaType(cSSMediaType_QString); +} + +struct miqt_string QWebSettings_CssMediaType(const QWebSettings* self) { + QString _ret = self->cssMediaType(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebSettings_EnablePersistentStorage1(struct miqt_string path) { + QString path_QString = QString::fromUtf8(path.data, path.len); + QWebSettings::enablePersistentStorage(path_QString); +} + diff --git a/qt/webkit/gen_qwebsettings.go b/qt/webkit/gen_qwebsettings.go new file mode 100644 index 00000000..1cc5ac91 --- /dev/null +++ b/qt/webkit/gen_qwebsettings.go @@ -0,0 +1,386 @@ +package webkit + +/* + +#include "gen_qwebsettings.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "unsafe" +) + +type QWebSettings__FontFamily int + +const ( + QWebSettings__StandardFont QWebSettings__FontFamily = 0 + QWebSettings__FixedFont QWebSettings__FontFamily = 1 + QWebSettings__SerifFont QWebSettings__FontFamily = 2 + QWebSettings__SansSerifFont QWebSettings__FontFamily = 3 + QWebSettings__CursiveFont QWebSettings__FontFamily = 4 + QWebSettings__FantasyFont QWebSettings__FontFamily = 5 +) + +type QWebSettings__WebAttribute int + +const ( + QWebSettings__AutoLoadImages QWebSettings__WebAttribute = 0 + QWebSettings__JavascriptEnabled QWebSettings__WebAttribute = 1 + QWebSettings__JavaEnabled QWebSettings__WebAttribute = 2 + QWebSettings__PluginsEnabled QWebSettings__WebAttribute = 3 + QWebSettings__PrivateBrowsingEnabled QWebSettings__WebAttribute = 4 + QWebSettings__JavascriptCanOpenWindows QWebSettings__WebAttribute = 5 + QWebSettings__JavascriptCanAccessClipboard QWebSettings__WebAttribute = 6 + QWebSettings__DeveloperExtrasEnabled QWebSettings__WebAttribute = 7 + QWebSettings__LinksIncludedInFocusChain QWebSettings__WebAttribute = 8 + QWebSettings__ZoomTextOnly QWebSettings__WebAttribute = 9 + QWebSettings__PrintElementBackgrounds QWebSettings__WebAttribute = 10 + QWebSettings__OfflineStorageDatabaseEnabled QWebSettings__WebAttribute = 11 + QWebSettings__OfflineWebApplicationCacheEnabled QWebSettings__WebAttribute = 12 + QWebSettings__LocalStorageEnabled QWebSettings__WebAttribute = 13 + QWebSettings__LocalStorageDatabaseEnabled QWebSettings__WebAttribute = 13 + QWebSettings__LocalContentCanAccessRemoteUrls QWebSettings__WebAttribute = 14 + QWebSettings__DnsPrefetchEnabled QWebSettings__WebAttribute = 15 + QWebSettings__XSSAuditingEnabled QWebSettings__WebAttribute = 16 + QWebSettings__AcceleratedCompositingEnabled QWebSettings__WebAttribute = 17 + QWebSettings__SpatialNavigationEnabled QWebSettings__WebAttribute = 18 + QWebSettings__LocalContentCanAccessFileUrls QWebSettings__WebAttribute = 19 + QWebSettings__TiledBackingStoreEnabled QWebSettings__WebAttribute = 20 + QWebSettings__FrameFlatteningEnabled QWebSettings__WebAttribute = 21 + QWebSettings__SiteSpecificQuirksEnabled QWebSettings__WebAttribute = 22 + QWebSettings__JavascriptCanCloseWindows QWebSettings__WebAttribute = 23 + QWebSettings__WebGLEnabled QWebSettings__WebAttribute = 24 + QWebSettings__CSSRegionsEnabled QWebSettings__WebAttribute = 25 + QWebSettings__HyperlinkAuditingEnabled QWebSettings__WebAttribute = 26 + QWebSettings__CSSGridLayoutEnabled QWebSettings__WebAttribute = 27 + QWebSettings__ScrollAnimatorEnabled QWebSettings__WebAttribute = 28 + QWebSettings__CaretBrowsingEnabled QWebSettings__WebAttribute = 29 + QWebSettings__NotificationsEnabled QWebSettings__WebAttribute = 30 + QWebSettings__WebAudioEnabled QWebSettings__WebAttribute = 31 + QWebSettings__Accelerated2dCanvasEnabled QWebSettings__WebAttribute = 32 + QWebSettings__MediaSourceEnabled QWebSettings__WebAttribute = 33 + QWebSettings__MediaEnabled QWebSettings__WebAttribute = 34 + QWebSettings__WebSecurityEnabled QWebSettings__WebAttribute = 35 + QWebSettings__FullScreenSupportEnabled QWebSettings__WebAttribute = 36 + QWebSettings__ImagesEnabled QWebSettings__WebAttribute = 37 + QWebSettings__AllowRunningInsecureContent QWebSettings__WebAttribute = 38 + QWebSettings__ErrorPageEnabled QWebSettings__WebAttribute = 39 +) + +type QWebSettings__WebGraphic int + +const ( + QWebSettings__MissingImageGraphic QWebSettings__WebGraphic = 0 + QWebSettings__MissingPluginGraphic QWebSettings__WebGraphic = 1 + QWebSettings__DefaultFrameIconGraphic QWebSettings__WebGraphic = 2 + QWebSettings__TextAreaSizeGripCornerGraphic QWebSettings__WebGraphic = 3 + QWebSettings__DeleteButtonGraphic QWebSettings__WebGraphic = 4 + QWebSettings__InputSpeechButtonGraphic QWebSettings__WebGraphic = 5 + QWebSettings__SearchCancelButtonGraphic QWebSettings__WebGraphic = 6 + QWebSettings__SearchCancelButtonPressedGraphic QWebSettings__WebGraphic = 7 +) + +type QWebSettings__FontSize int + +const ( + QWebSettings__MinimumFontSize QWebSettings__FontSize = 0 + QWebSettings__MinimumLogicalFontSize QWebSettings__FontSize = 1 + QWebSettings__DefaultFontSize QWebSettings__FontSize = 2 + QWebSettings__DefaultFixedFontSize QWebSettings__FontSize = 3 +) + +type QWebSettings__ThirdPartyCookiePolicy int + +const ( + QWebSettings__AlwaysAllowThirdPartyCookies QWebSettings__ThirdPartyCookiePolicy = 0 + QWebSettings__AlwaysBlockThirdPartyCookies QWebSettings__ThirdPartyCookiePolicy = 1 + QWebSettings__AllowThirdPartyWithExistingCookies QWebSettings__ThirdPartyCookiePolicy = 2 +) + +type QWebSettings struct { + h *C.QWebSettings + isSubclass bool +} + +func (this *QWebSettings) cPointer() *C.QWebSettings { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebSettings) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebSettings constructs the type using only CGO pointers. +func newQWebSettings(h *C.QWebSettings) *QWebSettings { + if h == nil { + return nil + } + return &QWebSettings{h: h} +} + +// UnsafeNewQWebSettings constructs the type using only unsafe pointers. +func UnsafeNewQWebSettings(h unsafe.Pointer) *QWebSettings { + if h == nil { + return nil + } + + return &QWebSettings{h: (*C.QWebSettings)(h)} +} + +func QWebSettings_GlobalSettings() *QWebSettings { + return UnsafeNewQWebSettings(unsafe.Pointer(C.QWebSettings_GlobalSettings())) +} + +func (this *QWebSettings) SetFontFamily(which QWebSettings__FontFamily, family string) { + family_ms := C.struct_miqt_string{} + family_ms.data = C.CString(family) + family_ms.len = C.size_t(len(family)) + defer C.free(unsafe.Pointer(family_ms.data)) + C.QWebSettings_SetFontFamily(this.h, (C.int)(which), family_ms) +} + +func (this *QWebSettings) FontFamily(which QWebSettings__FontFamily) string { + var _ms C.struct_miqt_string = C.QWebSettings_FontFamily(this.h, (C.int)(which)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebSettings) ResetFontFamily(which QWebSettings__FontFamily) { + C.QWebSettings_ResetFontFamily(this.h, (C.int)(which)) +} + +func (this *QWebSettings) SetFontSize(typeVal QWebSettings__FontSize, size int) { + C.QWebSettings_SetFontSize(this.h, (C.int)(typeVal), (C.int)(size)) +} + +func (this *QWebSettings) FontSize(typeVal QWebSettings__FontSize) int { + return (int)(C.QWebSettings_FontSize(this.h, (C.int)(typeVal))) +} + +func (this *QWebSettings) ResetFontSize(typeVal QWebSettings__FontSize) { + C.QWebSettings_ResetFontSize(this.h, (C.int)(typeVal)) +} + +func (this *QWebSettings) SetAttribute(attr QWebSettings__WebAttribute, on bool) { + C.QWebSettings_SetAttribute(this.h, (C.int)(attr), (C.bool)(on)) +} + +func (this *QWebSettings) TestAttribute(attr QWebSettings__WebAttribute) bool { + return (bool)(C.QWebSettings_TestAttribute(this.h, (C.int)(attr))) +} + +func (this *QWebSettings) ResetAttribute(attr QWebSettings__WebAttribute) { + C.QWebSettings_ResetAttribute(this.h, (C.int)(attr)) +} + +func (this *QWebSettings) SetUserStyleSheetUrl(location *qt.QUrl) { + C.QWebSettings_SetUserStyleSheetUrl(this.h, (*C.QUrl)(location.UnsafePointer())) +} + +func (this *QWebSettings) UserStyleSheetUrl() *qt.QUrl { + _ret := C.QWebSettings_UserStyleSheetUrl(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebSettings) SetDefaultTextEncoding(encoding string) { + encoding_ms := C.struct_miqt_string{} + encoding_ms.data = C.CString(encoding) + encoding_ms.len = C.size_t(len(encoding)) + defer C.free(unsafe.Pointer(encoding_ms.data)) + C.QWebSettings_SetDefaultTextEncoding(this.h, encoding_ms) +} + +func (this *QWebSettings) DefaultTextEncoding() string { + var _ms C.struct_miqt_string = C.QWebSettings_DefaultTextEncoding(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebSettings_SetIconDatabasePath(location string) { + location_ms := C.struct_miqt_string{} + location_ms.data = C.CString(location) + location_ms.len = C.size_t(len(location)) + defer C.free(unsafe.Pointer(location_ms.data)) + C.QWebSettings_SetIconDatabasePath(location_ms) +} + +func QWebSettings_IconDatabasePath() string { + var _ms C.struct_miqt_string = C.QWebSettings_IconDatabasePath() + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebSettings_ClearIconDatabase() { + C.QWebSettings_ClearIconDatabase() +} + +func QWebSettings_IconForUrl(url *qt.QUrl) *qt.QIcon { + _ret := C.QWebSettings_IconForUrl((*C.QUrl)(url.UnsafePointer())) + _goptr := qt.UnsafeNewQIcon(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func QWebSettings_SetPluginSearchPaths(paths []string) { + paths_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(paths)))) + defer C.free(unsafe.Pointer(paths_CArray)) + for i := range paths { + paths_i_ms := C.struct_miqt_string{} + paths_i_ms.data = C.CString(paths[i]) + paths_i_ms.len = C.size_t(len(paths[i])) + defer C.free(unsafe.Pointer(paths_i_ms.data)) + paths_CArray[i] = paths_i_ms + } + paths_ma := C.struct_miqt_array{len: C.size_t(len(paths)), data: unsafe.Pointer(paths_CArray)} + C.QWebSettings_SetPluginSearchPaths(paths_ma) +} + +func QWebSettings_PluginSearchPaths() []string { + var _ma C.struct_miqt_array = C.QWebSettings_PluginSearchPaths() + _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 QWebSettings_SetWebGraphic(typeVal QWebSettings__WebGraphic, graphic *qt.QPixmap) { + C.QWebSettings_SetWebGraphic((C.int)(typeVal), (*C.QPixmap)(graphic.UnsafePointer())) +} + +func QWebSettings_WebGraphic(typeVal QWebSettings__WebGraphic) *qt.QPixmap { + _ret := C.QWebSettings_WebGraphic((C.int)(typeVal)) + _goptr := qt.UnsafeNewQPixmap(unsafe.Pointer(_ret), nil) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func QWebSettings_SetMaximumPagesInCache(pages int) { + C.QWebSettings_SetMaximumPagesInCache((C.int)(pages)) +} + +func QWebSettings_MaximumPagesInCache() int { + return (int)(C.QWebSettings_MaximumPagesInCache()) +} + +func QWebSettings_SetObjectCacheCapacities(cacheMinDeadCapacity int, cacheMaxDead int, totalCapacity int) { + C.QWebSettings_SetObjectCacheCapacities((C.int)(cacheMinDeadCapacity), (C.int)(cacheMaxDead), (C.int)(totalCapacity)) +} + +func QWebSettings_SetOfflineStoragePath(path string) { + path_ms := C.struct_miqt_string{} + path_ms.data = C.CString(path) + path_ms.len = C.size_t(len(path)) + defer C.free(unsafe.Pointer(path_ms.data)) + C.QWebSettings_SetOfflineStoragePath(path_ms) +} + +func QWebSettings_OfflineStoragePath() string { + var _ms C.struct_miqt_string = C.QWebSettings_OfflineStoragePath() + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebSettings_SetOfflineStorageDefaultQuota(maximumSize int64) { + C.QWebSettings_SetOfflineStorageDefaultQuota((C.longlong)(maximumSize)) +} + +func QWebSettings_OfflineStorageDefaultQuota() int64 { + return (int64)(C.QWebSettings_OfflineStorageDefaultQuota()) +} + +func QWebSettings_SetOfflineWebApplicationCachePath(path string) { + path_ms := C.struct_miqt_string{} + path_ms.data = C.CString(path) + path_ms.len = C.size_t(len(path)) + defer C.free(unsafe.Pointer(path_ms.data)) + C.QWebSettings_SetOfflineWebApplicationCachePath(path_ms) +} + +func QWebSettings_OfflineWebApplicationCachePath() string { + var _ms C.struct_miqt_string = C.QWebSettings_OfflineWebApplicationCachePath() + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebSettings_SetOfflineWebApplicationCacheQuota(maximumSize int64) { + C.QWebSettings_SetOfflineWebApplicationCacheQuota((C.longlong)(maximumSize)) +} + +func QWebSettings_OfflineWebApplicationCacheQuota() int64 { + return (int64)(C.QWebSettings_OfflineWebApplicationCacheQuota()) +} + +func (this *QWebSettings) SetLocalStoragePath(path string) { + path_ms := C.struct_miqt_string{} + path_ms.data = C.CString(path) + path_ms.len = C.size_t(len(path)) + defer C.free(unsafe.Pointer(path_ms.data)) + C.QWebSettings_SetLocalStoragePath(this.h, path_ms) +} + +func (this *QWebSettings) LocalStoragePath() string { + var _ms C.struct_miqt_string = C.QWebSettings_LocalStoragePath(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebSettings_ClearMemoryCaches() { + C.QWebSettings_ClearMemoryCaches() +} + +func QWebSettings_EnablePersistentStorage() { + C.QWebSettings_EnablePersistentStorage() +} + +func (this *QWebSettings) SetThirdPartyCookiePolicy(thirdPartyCookiePolicy QWebSettings__ThirdPartyCookiePolicy) { + C.QWebSettings_SetThirdPartyCookiePolicy(this.h, (C.int)(thirdPartyCookiePolicy)) +} + +func (this *QWebSettings) ThirdPartyCookiePolicy() QWebSettings__ThirdPartyCookiePolicy { + return (QWebSettings__ThirdPartyCookiePolicy)(C.QWebSettings_ThirdPartyCookiePolicy(this.h)) +} + +func (this *QWebSettings) SetCSSMediaType(cSSMediaType string) { + cSSMediaType_ms := C.struct_miqt_string{} + cSSMediaType_ms.data = C.CString(cSSMediaType) + cSSMediaType_ms.len = C.size_t(len(cSSMediaType)) + defer C.free(unsafe.Pointer(cSSMediaType_ms.data)) + C.QWebSettings_SetCSSMediaType(this.h, cSSMediaType_ms) +} + +func (this *QWebSettings) CssMediaType() string { + var _ms C.struct_miqt_string = C.QWebSettings_CssMediaType(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebSettings_EnablePersistentStorage1(path string) { + path_ms := C.struct_miqt_string{} + path_ms.data = C.CString(path) + path_ms.len = C.size_t(len(path)) + defer C.free(unsafe.Pointer(path_ms.data)) + C.QWebSettings_EnablePersistentStorage1(path_ms) +} diff --git a/qt/webkit/gen_qwebsettings.h b/qt/webkit/gen_qwebsettings.h new file mode 100644 index 00000000..a8e44f56 --- /dev/null +++ b/qt/webkit/gen_qwebsettings.h @@ -0,0 +1,76 @@ +#pragma once +#ifndef MIQT_QT_WEBKIT_GEN_QWEBSETTINGS_H +#define MIQT_QT_WEBKIT_GEN_QWEBSETTINGS_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QIcon; +class QPixmap; +class QUrl; +class QWebSettings; +#else +typedef struct QIcon QIcon; +typedef struct QPixmap QPixmap; +typedef struct QUrl QUrl; +typedef struct QWebSettings QWebSettings; +#endif + +QWebSettings* QWebSettings_GlobalSettings(); +void QWebSettings_SetFontFamily(QWebSettings* self, int which, struct miqt_string family); +struct miqt_string QWebSettings_FontFamily(const QWebSettings* self, int which); +void QWebSettings_ResetFontFamily(QWebSettings* self, int which); +void QWebSettings_SetFontSize(QWebSettings* self, int typeVal, int size); +int QWebSettings_FontSize(const QWebSettings* self, int typeVal); +void QWebSettings_ResetFontSize(QWebSettings* self, int typeVal); +void QWebSettings_SetAttribute(QWebSettings* self, int attr, bool on); +bool QWebSettings_TestAttribute(const QWebSettings* self, int attr); +void QWebSettings_ResetAttribute(QWebSettings* self, int attr); +void QWebSettings_SetUserStyleSheetUrl(QWebSettings* self, QUrl* location); +QUrl* QWebSettings_UserStyleSheetUrl(const QWebSettings* self); +void QWebSettings_SetDefaultTextEncoding(QWebSettings* self, struct miqt_string encoding); +struct miqt_string QWebSettings_DefaultTextEncoding(const QWebSettings* self); +void QWebSettings_SetIconDatabasePath(struct miqt_string location); +struct miqt_string QWebSettings_IconDatabasePath(); +void QWebSettings_ClearIconDatabase(); +QIcon* QWebSettings_IconForUrl(QUrl* url); +void QWebSettings_SetPluginSearchPaths(struct miqt_array /* of struct miqt_string */ paths); +struct miqt_array /* of struct miqt_string */ QWebSettings_PluginSearchPaths(); +void QWebSettings_SetWebGraphic(int typeVal, QPixmap* graphic); +QPixmap* QWebSettings_WebGraphic(int typeVal); +void QWebSettings_SetMaximumPagesInCache(int pages); +int QWebSettings_MaximumPagesInCache(); +void QWebSettings_SetObjectCacheCapacities(int cacheMinDeadCapacity, int cacheMaxDead, int totalCapacity); +void QWebSettings_SetOfflineStoragePath(struct miqt_string path); +struct miqt_string QWebSettings_OfflineStoragePath(); +void QWebSettings_SetOfflineStorageDefaultQuota(long long maximumSize); +long long QWebSettings_OfflineStorageDefaultQuota(); +void QWebSettings_SetOfflineWebApplicationCachePath(struct miqt_string path); +struct miqt_string QWebSettings_OfflineWebApplicationCachePath(); +void QWebSettings_SetOfflineWebApplicationCacheQuota(long long maximumSize); +long long QWebSettings_OfflineWebApplicationCacheQuota(); +void QWebSettings_SetLocalStoragePath(QWebSettings* self, struct miqt_string path); +struct miqt_string QWebSettings_LocalStoragePath(const QWebSettings* self); +void QWebSettings_ClearMemoryCaches(); +void QWebSettings_EnablePersistentStorage(); +void QWebSettings_SetThirdPartyCookiePolicy(QWebSettings* self, int thirdPartyCookiePolicy); +int QWebSettings_ThirdPartyCookiePolicy(const QWebSettings* self); +void QWebSettings_SetCSSMediaType(QWebSettings* self, struct miqt_string cSSMediaType); +struct miqt_string QWebSettings_CssMediaType(const QWebSettings* self); +void QWebSettings_EnablePersistentStorage1(struct miqt_string path); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/webkit/gen_qwebview.cpp b/qt/webkit/gen_qwebview.cpp new file mode 100644 index 00000000..5bef30e1 --- /dev/null +++ b/qt/webkit/gen_qwebview.cpp @@ -0,0 +1,1806 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#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_qwebview.h" +#include "_cgo_export.h" + +class MiqtVirtualQWebView : public virtual QWebView { +public: + + MiqtVirtualQWebView(QWidget* parent): QWebView(parent) {}; + MiqtVirtualQWebView(): QWebView() {}; + + virtual ~MiqtVirtualQWebView() = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery property) const override { + if (handle__InputMethodQuery == 0) { + return QWebView::inputMethodQuery(property); + } + + Qt::InputMethodQuery property_ret = property; + int sigval1 = static_cast(property_ret); + + QVariant* callback_return_value = miqt_exec_callback_QWebView_InputMethodQuery(const_cast(this), handle__InputMethodQuery, sigval1); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QVariant* virtualbase_InputMethodQuery(int property) const { + + return new QVariant(QWebView::inputMethodQuery(static_cast(property))); + + } + + // 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 QWebView::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWebView_SizeHint(const_cast(this), handle__SizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_SizeHint() const { + + return new QSize(QWebView::sizeHint()); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__Event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__Event == 0) { + return QWebView::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QWebView_Event(this, handle__Event, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_Event(QEvent* param1) { + + return QWebView::event(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ResizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* param1) override { + if (handle__ResizeEvent == 0) { + QWebView::resizeEvent(param1); + return; + } + + QResizeEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_ResizeEvent(this, handle__ResizeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ResizeEvent(QResizeEvent* param1) { + + QWebView::resizeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__PaintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* param1) override { + if (handle__PaintEvent == 0) { + QWebView::paintEvent(param1); + return; + } + + QPaintEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_PaintEvent(this, handle__PaintEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_PaintEvent(QPaintEvent* param1) { + + QWebView::paintEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CreateWindow = 0; + + // Subclass to allow providing a Go implementation + virtual QWebView* createWindow(QWebPage::WebWindowType typeVal) override { + if (handle__CreateWindow == 0) { + return QWebView::createWindow(typeVal); + } + + QWebPage::WebWindowType typeVal_ret = typeVal; + int sigval1 = static_cast(typeVal_ret); + + QWebView* callback_return_value = miqt_exec_callback_QWebView_CreateWindow(this, handle__CreateWindow, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QWebView* virtualbase_CreateWindow(int typeVal) { + + return QWebView::createWindow(static_cast(typeVal)); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ChangeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__ChangeEvent == 0) { + QWebView::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_ChangeEvent(this, handle__ChangeEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ChangeEvent(QEvent* param1) { + + QWebView::changeEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__MouseMoveEvent == 0) { + QWebView::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_MouseMoveEvent(this, handle__MouseMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseMoveEvent(QMouseEvent* param1) { + + QWebView::mouseMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__MousePressEvent == 0) { + QWebView::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_MousePressEvent(this, handle__MousePressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MousePressEvent(QMouseEvent* param1) { + + QWebView::mousePressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* param1) override { + if (handle__MouseDoubleClickEvent == 0) { + QWebView::mouseDoubleClickEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_MouseDoubleClickEvent(this, handle__MouseDoubleClickEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseDoubleClickEvent(QMouseEvent* param1) { + + QWebView::mouseDoubleClickEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__MouseReleaseEvent == 0) { + QWebView::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_MouseReleaseEvent(this, handle__MouseReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MouseReleaseEvent(QMouseEvent* param1) { + + QWebView::mouseReleaseEvent(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) { + QWebView::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_ContextMenuEvent(this, handle__ContextMenuEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ContextMenuEvent(QContextMenuEvent* param1) { + + QWebView::contextMenuEvent(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) { + QWebView::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_WheelEvent(this, handle__WheelEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_WheelEvent(QWheelEvent* param1) { + + QWebView::wheelEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__KeyPressEvent == 0) { + QWebView::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_KeyPressEvent(this, handle__KeyPressEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyPressEvent(QKeyEvent* param1) { + + QWebView::keyPressEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__KeyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* param1) override { + if (handle__KeyReleaseEvent == 0) { + QWebView::keyReleaseEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_KeyReleaseEvent(this, handle__KeyReleaseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_KeyReleaseEvent(QKeyEvent* param1) { + + QWebView::keyReleaseEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* param1) override { + if (handle__DragEnterEvent == 0) { + QWebView::dragEnterEvent(param1); + return; + } + + QDragEnterEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_DragEnterEvent(this, handle__DragEnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragEnterEvent(QDragEnterEvent* param1) { + + QWebView::dragEnterEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* param1) override { + if (handle__DragLeaveEvent == 0) { + QWebView::dragLeaveEvent(param1); + return; + } + + QDragLeaveEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_DragLeaveEvent(this, handle__DragLeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragLeaveEvent(QDragLeaveEvent* param1) { + + QWebView::dragLeaveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* param1) override { + if (handle__DragMoveEvent == 0) { + QWebView::dragMoveEvent(param1); + return; + } + + QDragMoveEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_DragMoveEvent(this, handle__DragMoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DragMoveEvent(QDragMoveEvent* param1) { + + QWebView::dragMoveEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* param1) override { + if (handle__DropEvent == 0) { + QWebView::dropEvent(param1); + return; + } + + QDropEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_DropEvent(this, handle__DropEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_DropEvent(QDropEvent* param1) { + + QWebView::dropEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* param1) override { + if (handle__FocusInEvent == 0) { + QWebView::focusInEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_FocusInEvent(this, handle__FocusInEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusInEvent(QFocusEvent* param1) { + + QWebView::focusInEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* param1) override { + if (handle__FocusOutEvent == 0) { + QWebView::focusOutEvent(param1); + return; + } + + QFocusEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_FocusOutEvent(this, handle__FocusOutEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_FocusOutEvent(QFocusEvent* param1) { + + QWebView::focusOutEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__InputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__InputMethodEvent == 0) { + QWebView::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QWebView_InputMethodEvent(this, handle__InputMethodEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InputMethodEvent(QInputMethodEvent* param1) { + + QWebView::inputMethodEvent(param1); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__FocusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__FocusNextPrevChild == 0) { + return QWebView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QWebView_FocusNextPrevChild(this, handle__FocusNextPrevChild, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_FocusNextPrevChild(bool next) { + + return QWebView::focusNextPrevChild(next); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__DevType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__DevType == 0) { + return QWebView::devType(); + } + + + int callback_return_value = miqt_exec_callback_QWebView_DevType(const_cast(this), handle__DevType); + + return static_cast(callback_return_value); + } + + // Wrapper to allow calling protected method + int virtualbase_DevType() const { + + return QWebView::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) { + QWebView::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QWebView_SetVisible(this, handle__SetVisible, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_SetVisible(bool visible) { + + QWebView::setVisible(visible); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__MinimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__MinimumSizeHint == 0) { + return QWebView::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QWebView_MinimumSizeHint(const_cast(this), handle__MinimumSizeHint); + + return *callback_return_value; + } + + // Wrapper to allow calling protected method + QSize* virtualbase_MinimumSizeHint() const { + + return new QSize(QWebView::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 QWebView::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QWebView_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 QWebView::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 QWebView::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QWebView_HasHeightForWidth(const_cast(this), handle__HasHeightForWidth); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + bool virtualbase_HasHeightForWidth() const { + + return QWebView::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 QWebView::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QWebView_PaintEngine(const_cast(this), handle__PaintEngine); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintEngine* virtualbase_PaintEngine() const { + + return QWebView::paintEngine(); + + } + + // 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) { + QWebView::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebView_EnterEvent(this, handle__EnterEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_EnterEvent(QEvent* event) { + + QWebView::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) { + QWebView::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QWebView_LeaveEvent(this, handle__LeaveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_LeaveEvent(QEvent* event) { + + QWebView::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) { + QWebView::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QWebView_MoveEvent(this, handle__MoveEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_MoveEvent(QMoveEvent* event) { + + QWebView::moveEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__CloseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__CloseEvent == 0) { + QWebView::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QWebView_CloseEvent(this, handle__CloseEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_CloseEvent(QCloseEvent* event) { + + QWebView::closeEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__TabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__TabletEvent == 0) { + QWebView::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QWebView_TabletEvent(this, handle__TabletEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_TabletEvent(QTabletEvent* event) { + + QWebView::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) { + QWebView::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QWebView_ActionEvent(this, handle__ActionEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ActionEvent(QActionEvent* event) { + + QWebView::actionEvent(event); + + } + + // cgo.Handle value for overwritten implementation + intptr_t handle__ShowEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__ShowEvent == 0) { + QWebView::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QWebView_ShowEvent(this, handle__ShowEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_ShowEvent(QShowEvent* event) { + + QWebView::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) { + QWebView::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QWebView_HideEvent(this, handle__HideEvent, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_HideEvent(QHideEvent* event) { + + QWebView::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 QWebView::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_QWebView_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 QWebView::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 QWebView::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QWebView_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 QWebView::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) { + QWebView::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QWebView_InitPainter(const_cast(this), handle__InitPainter, sigval1); + + + } + + // Wrapper to allow calling protected method + void virtualbase_InitPainter(QPainter* painter) const { + + QWebView::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 QWebView::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QWebView_Redirected(const_cast(this), handle__Redirected, sigval1); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPaintDevice* virtualbase_Redirected(QPoint* offset) const { + + return QWebView::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 QWebView::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QWebView_SharedPainter(const_cast(this), handle__SharedPainter); + + return callback_return_value; + } + + // Wrapper to allow calling protected method + QPainter* virtualbase_SharedPainter() const { + + return QWebView::sharedPainter(); + + } + +}; + +void QWebView_new(QWidget* parent, QWebView** outptr_QWebView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWebView* ret = new MiqtVirtualQWebView(parent); + *outptr_QWebView = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +void QWebView_new2(QWebView** outptr_QWebView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + MiqtVirtualQWebView* ret = new MiqtVirtualQWebView(); + *outptr_QWebView = ret; + *outptr_QWidget = static_cast(ret); + *outptr_QObject = static_cast(ret); + *outptr_QPaintDevice = static_cast(ret); +} + +QMetaObject* QWebView_MetaObject(const QWebView* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QWebView_Metacast(QWebView* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QWebView_Tr(const char* s) { + QString _ret = QWebView::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebView_TrUtf8(const char* s) { + QString _ret = QWebView::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QWebPage* QWebView_Page(const QWebView* self) { + return self->page(); +} + +void QWebView_SetPage(QWebView* self, QWebPage* page) { + self->setPage(page); +} + +void QWebView_Load(QWebView* self, QUrl* url) { + self->load(*url); +} + +void QWebView_LoadWithRequest(QWebView* self, QNetworkRequest* request) { + self->load(*request); +} + +void QWebView_SetHtml(QWebView* self, struct miqt_string html) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->setHtml(html_QString); +} + +void QWebView_SetContent(QWebView* self, struct miqt_string data) { + QByteArray data_QByteArray(data.data, data.len); + self->setContent(data_QByteArray); +} + +QWebHistory* QWebView_History(const QWebView* self) { + return self->history(); +} + +QWebSettings* QWebView_Settings(const QWebView* self) { + return self->settings(); +} + +struct miqt_string QWebView_Title(const QWebView* self) { + QString _ret = self->title(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebView_SetUrl(QWebView* self, QUrl* url) { + self->setUrl(*url); +} + +QUrl* QWebView_Url(const QWebView* self) { + return new QUrl(self->url()); +} + +QIcon* QWebView_Icon(const QWebView* self) { + return new QIcon(self->icon()); +} + +bool QWebView_HasSelection(const QWebView* self) { + return self->hasSelection(); +} + +struct miqt_string QWebView_SelectedText(const QWebView* self) { + QString _ret = self->selectedText(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebView_SelectedHtml(const QWebView* self) { + QString _ret = self->selectedHtml(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QAction* QWebView_PageAction(const QWebView* self, int action) { + return self->pageAction(static_cast(action)); +} + +void QWebView_TriggerPageAction(QWebView* self, int action) { + self->triggerPageAction(static_cast(action)); +} + +bool QWebView_IsModified(const QWebView* self) { + return self->isModified(); +} + +QVariant* QWebView_InputMethodQuery(const QWebView* self, int property) { + return new QVariant(self->inputMethodQuery(static_cast(property))); +} + +QSize* QWebView_SizeHint(const QWebView* self) { + return new QSize(self->sizeHint()); +} + +double QWebView_ZoomFactor(const QWebView* self) { + qreal _ret = self->zoomFactor(); + return static_cast(_ret); +} + +void QWebView_SetZoomFactor(QWebView* self, double factor) { + self->setZoomFactor(static_cast(factor)); +} + +void QWebView_SetTextSizeMultiplier(QWebView* self, double factor) { + self->setTextSizeMultiplier(static_cast(factor)); +} + +double QWebView_TextSizeMultiplier(const QWebView* self) { + qreal _ret = self->textSizeMultiplier(); + return static_cast(_ret); +} + +int QWebView_RenderHints(const QWebView* self) { + QPainter::RenderHints _ret = self->renderHints(); + return static_cast(_ret); +} + +void QWebView_SetRenderHints(QWebView* self, int hints) { + self->setRenderHints(static_cast(hints)); +} + +void QWebView_SetRenderHint(QWebView* self, int hint) { + self->setRenderHint(static_cast(hint)); +} + +bool QWebView_FindText(QWebView* self, struct miqt_string subString) { + QString subString_QString = QString::fromUtf8(subString.data, subString.len); + return self->findText(subString_QString); +} + +bool QWebView_Event(QWebView* self, QEvent* param1) { + return self->event(param1); +} + +void QWebView_Stop(QWebView* self) { + self->stop(); +} + +void QWebView_Back(QWebView* self) { + self->back(); +} + +void QWebView_Forward(QWebView* self) { + self->forward(); +} + +void QWebView_Reload(QWebView* self) { + self->reload(); +} + +void QWebView_Print(const QWebView* self, QPrinter* param1) { + self->print(param1); +} + +void QWebView_LoadStarted(QWebView* self) { + self->loadStarted(); +} + +void QWebView_connect_LoadStarted(QWebView* self, intptr_t slot) { + MiqtVirtualQWebView::connect(self, static_cast(&QWebView::loadStarted), self, [=]() { + miqt_exec_callback_QWebView_LoadStarted(slot); + }); +} + +void QWebView_LoadProgress(QWebView* self, int progress) { + self->loadProgress(static_cast(progress)); +} + +void QWebView_connect_LoadProgress(QWebView* self, intptr_t slot) { + MiqtVirtualQWebView::connect(self, static_cast(&QWebView::loadProgress), self, [=](int progress) { + int sigval1 = progress; + miqt_exec_callback_QWebView_LoadProgress(slot, sigval1); + }); +} + +void QWebView_LoadFinished(QWebView* self, bool param1) { + self->loadFinished(param1); +} + +void QWebView_connect_LoadFinished(QWebView* self, intptr_t slot) { + MiqtVirtualQWebView::connect(self, static_cast(&QWebView::loadFinished), self, [=](bool param1) { + bool sigval1 = param1; + miqt_exec_callback_QWebView_LoadFinished(slot, sigval1); + }); +} + +void QWebView_TitleChanged(QWebView* self, struct miqt_string title) { + QString title_QString = QString::fromUtf8(title.data, title.len); + self->titleChanged(title_QString); +} + +void QWebView_connect_TitleChanged(QWebView* self, intptr_t slot) { + MiqtVirtualQWebView::connect(self, static_cast(&QWebView::titleChanged), self, [=](const QString& title) { + const QString title_ret = title; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray title_b = title_ret.toUtf8(); + struct miqt_string title_ms; + title_ms.len = title_b.length(); + title_ms.data = static_cast(malloc(title_ms.len)); + memcpy(title_ms.data, title_b.data(), title_ms.len); + struct miqt_string sigval1 = title_ms; + miqt_exec_callback_QWebView_TitleChanged(slot, sigval1); + }); +} + +void QWebView_StatusBarMessage(QWebView* self, struct miqt_string text) { + QString text_QString = QString::fromUtf8(text.data, text.len); + self->statusBarMessage(text_QString); +} + +void QWebView_connect_StatusBarMessage(QWebView* self, intptr_t slot) { + MiqtVirtualQWebView::connect(self, static_cast(&QWebView::statusBarMessage), self, [=](const QString& text) { + const QString text_ret = text; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray text_b = text_ret.toUtf8(); + 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_QWebView_StatusBarMessage(slot, sigval1); + }); +} + +void QWebView_LinkClicked(QWebView* self, QUrl* param1) { + self->linkClicked(*param1); +} + +void QWebView_connect_LinkClicked(QWebView* self, intptr_t slot) { + MiqtVirtualQWebView::connect(self, static_cast(&QWebView::linkClicked), self, [=](const QUrl& param1) { + const QUrl& param1_ret = param1; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(¶m1_ret); + miqt_exec_callback_QWebView_LinkClicked(slot, sigval1); + }); +} + +void QWebView_SelectionChanged(QWebView* self) { + self->selectionChanged(); +} + +void QWebView_connect_SelectionChanged(QWebView* self, intptr_t slot) { + MiqtVirtualQWebView::connect(self, static_cast(&QWebView::selectionChanged), self, [=]() { + miqt_exec_callback_QWebView_SelectionChanged(slot); + }); +} + +void QWebView_IconChanged(QWebView* self) { + self->iconChanged(); +} + +void QWebView_connect_IconChanged(QWebView* self, intptr_t slot) { + MiqtVirtualQWebView::connect(self, static_cast(&QWebView::iconChanged), self, [=]() { + miqt_exec_callback_QWebView_IconChanged(slot); + }); +} + +void QWebView_UrlChanged(QWebView* self, QUrl* param1) { + self->urlChanged(*param1); +} + +void QWebView_connect_UrlChanged(QWebView* self, intptr_t slot) { + MiqtVirtualQWebView::connect(self, static_cast(&QWebView::urlChanged), self, [=](const QUrl& param1) { + const QUrl& param1_ret = param1; + // Cast returned reference into pointer + QUrl* sigval1 = const_cast(¶m1_ret); + miqt_exec_callback_QWebView_UrlChanged(slot, sigval1); + }); +} + +struct miqt_string QWebView_Tr2(const char* s, const char* c) { + QString _ret = QWebView::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebView_Tr3(const char* s, const char* c, int n) { + QString _ret = QWebView::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebView_TrUtf82(const char* s, const char* c) { + QString _ret = QWebView::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QWebView_TrUtf83(const char* s, const char* c, int n) { + QString _ret = QWebView::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QWebView_Load2(QWebView* self, QNetworkRequest* request, int operation) { + self->load(*request, static_cast(operation)); +} + +void QWebView_Load3(QWebView* self, QNetworkRequest* request, int operation, struct miqt_string body) { + QByteArray body_QByteArray(body.data, body.len); + self->load(*request, static_cast(operation), body_QByteArray); +} + +void QWebView_SetHtml2(QWebView* self, struct miqt_string html, QUrl* baseUrl) { + QString html_QString = QString::fromUtf8(html.data, html.len); + self->setHtml(html_QString, *baseUrl); +} + +void QWebView_SetContent2(QWebView* self, struct miqt_string data, struct miqt_string mimeType) { + QByteArray data_QByteArray(data.data, data.len); + QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); + self->setContent(data_QByteArray, mimeType_QString); +} + +void QWebView_SetContent3(QWebView* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl) { + QByteArray data_QByteArray(data.data, data.len); + QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); + self->setContent(data_QByteArray, mimeType_QString, *baseUrl); +} + +void QWebView_TriggerPageAction2(QWebView* self, int action, bool checked) { + self->triggerPageAction(static_cast(action), checked); +} + +void QWebView_SetRenderHint2(QWebView* self, int hint, bool enabled) { + self->setRenderHint(static_cast(hint), enabled); +} + +bool QWebView_FindText2(QWebView* self, struct miqt_string subString, int options) { + QString subString_QString = QString::fromUtf8(subString.data, subString.len); + return self->findText(subString_QString, static_cast(options)); +} + +void QWebView_override_virtual_InputMethodQuery(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__InputMethodQuery = slot; +} + +QVariant* QWebView_virtualbase_InputMethodQuery(const void* self, int property) { + return ( (const MiqtVirtualQWebView*)(self) )->virtualbase_InputMethodQuery(property); +} + +void QWebView_override_virtual_SizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__SizeHint = slot; +} + +QSize* QWebView_virtualbase_SizeHint(const void* self) { + return ( (const MiqtVirtualQWebView*)(self) )->virtualbase_SizeHint(); +} + +void QWebView_override_virtual_Event(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__Event = slot; +} + +bool QWebView_virtualbase_Event(void* self, QEvent* param1) { + return ( (MiqtVirtualQWebView*)(self) )->virtualbase_Event(param1); +} + +void QWebView_override_virtual_ResizeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__ResizeEvent = slot; +} + +void QWebView_virtualbase_ResizeEvent(void* self, QResizeEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_ResizeEvent(param1); +} + +void QWebView_override_virtual_PaintEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__PaintEvent = slot; +} + +void QWebView_virtualbase_PaintEvent(void* self, QPaintEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_PaintEvent(param1); +} + +void QWebView_override_virtual_CreateWindow(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__CreateWindow = slot; +} + +QWebView* QWebView_virtualbase_CreateWindow(void* self, int typeVal) { + return ( (MiqtVirtualQWebView*)(self) )->virtualbase_CreateWindow(typeVal); +} + +void QWebView_override_virtual_ChangeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__ChangeEvent = slot; +} + +void QWebView_virtualbase_ChangeEvent(void* self, QEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_ChangeEvent(param1); +} + +void QWebView_override_virtual_MouseMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__MouseMoveEvent = slot; +} + +void QWebView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_MouseMoveEvent(param1); +} + +void QWebView_override_virtual_MousePressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__MousePressEvent = slot; +} + +void QWebView_virtualbase_MousePressEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_MousePressEvent(param1); +} + +void QWebView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__MouseDoubleClickEvent = slot; +} + +void QWebView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_MouseDoubleClickEvent(param1); +} + +void QWebView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__MouseReleaseEvent = slot; +} + +void QWebView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_MouseReleaseEvent(param1); +} + +void QWebView_override_virtual_ContextMenuEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__ContextMenuEvent = slot; +} + +void QWebView_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_ContextMenuEvent(param1); +} + +void QWebView_override_virtual_WheelEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__WheelEvent = slot; +} + +void QWebView_virtualbase_WheelEvent(void* self, QWheelEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_WheelEvent(param1); +} + +void QWebView_override_virtual_KeyPressEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__KeyPressEvent = slot; +} + +void QWebView_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_KeyPressEvent(param1); +} + +void QWebView_override_virtual_KeyReleaseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__KeyReleaseEvent = slot; +} + +void QWebView_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_KeyReleaseEvent(param1); +} + +void QWebView_override_virtual_DragEnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__DragEnterEvent = slot; +} + +void QWebView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_DragEnterEvent(param1); +} + +void QWebView_override_virtual_DragLeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__DragLeaveEvent = slot; +} + +void QWebView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_DragLeaveEvent(param1); +} + +void QWebView_override_virtual_DragMoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__DragMoveEvent = slot; +} + +void QWebView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_DragMoveEvent(param1); +} + +void QWebView_override_virtual_DropEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__DropEvent = slot; +} + +void QWebView_virtualbase_DropEvent(void* self, QDropEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_DropEvent(param1); +} + +void QWebView_override_virtual_FocusInEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__FocusInEvent = slot; +} + +void QWebView_virtualbase_FocusInEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_FocusInEvent(param1); +} + +void QWebView_override_virtual_FocusOutEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__FocusOutEvent = slot; +} + +void QWebView_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_FocusOutEvent(param1); +} + +void QWebView_override_virtual_InputMethodEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__InputMethodEvent = slot; +} + +void QWebView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_InputMethodEvent(param1); +} + +void QWebView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__FocusNextPrevChild = slot; +} + +bool QWebView_virtualbase_FocusNextPrevChild(void* self, bool next) { + return ( (MiqtVirtualQWebView*)(self) )->virtualbase_FocusNextPrevChild(next); +} + +void QWebView_override_virtual_DevType(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__DevType = slot; +} + +int QWebView_virtualbase_DevType(const void* self) { + return ( (const MiqtVirtualQWebView*)(self) )->virtualbase_DevType(); +} + +void QWebView_override_virtual_SetVisible(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__SetVisible = slot; +} + +void QWebView_virtualbase_SetVisible(void* self, bool visible) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_SetVisible(visible); +} + +void QWebView_override_virtual_MinimumSizeHint(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__MinimumSizeHint = slot; +} + +QSize* QWebView_virtualbase_MinimumSizeHint(const void* self) { + return ( (const MiqtVirtualQWebView*)(self) )->virtualbase_MinimumSizeHint(); +} + +void QWebView_override_virtual_HeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__HeightForWidth = slot; +} + +int QWebView_virtualbase_HeightForWidth(const void* self, int param1) { + return ( (const MiqtVirtualQWebView*)(self) )->virtualbase_HeightForWidth(param1); +} + +void QWebView_override_virtual_HasHeightForWidth(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__HasHeightForWidth = slot; +} + +bool QWebView_virtualbase_HasHeightForWidth(const void* self) { + return ( (const MiqtVirtualQWebView*)(self) )->virtualbase_HasHeightForWidth(); +} + +void QWebView_override_virtual_PaintEngine(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__PaintEngine = slot; +} + +QPaintEngine* QWebView_virtualbase_PaintEngine(const void* self) { + return ( (const MiqtVirtualQWebView*)(self) )->virtualbase_PaintEngine(); +} + +void QWebView_override_virtual_EnterEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__EnterEvent = slot; +} + +void QWebView_virtualbase_EnterEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_EnterEvent(event); +} + +void QWebView_override_virtual_LeaveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__LeaveEvent = slot; +} + +void QWebView_virtualbase_LeaveEvent(void* self, QEvent* event) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_LeaveEvent(event); +} + +void QWebView_override_virtual_MoveEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__MoveEvent = slot; +} + +void QWebView_virtualbase_MoveEvent(void* self, QMoveEvent* event) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_MoveEvent(event); +} + +void QWebView_override_virtual_CloseEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__CloseEvent = slot; +} + +void QWebView_virtualbase_CloseEvent(void* self, QCloseEvent* event) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_CloseEvent(event); +} + +void QWebView_override_virtual_TabletEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__TabletEvent = slot; +} + +void QWebView_virtualbase_TabletEvent(void* self, QTabletEvent* event) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_TabletEvent(event); +} + +void QWebView_override_virtual_ActionEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__ActionEvent = slot; +} + +void QWebView_virtualbase_ActionEvent(void* self, QActionEvent* event) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_ActionEvent(event); +} + +void QWebView_override_virtual_ShowEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__ShowEvent = slot; +} + +void QWebView_virtualbase_ShowEvent(void* self, QShowEvent* event) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_ShowEvent(event); +} + +void QWebView_override_virtual_HideEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__HideEvent = slot; +} + +void QWebView_virtualbase_HideEvent(void* self, QHideEvent* event) { + ( (MiqtVirtualQWebView*)(self) )->virtualbase_HideEvent(event); +} + +void QWebView_override_virtual_NativeEvent(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__NativeEvent = slot; +} + +bool QWebView_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + return ( (MiqtVirtualQWebView*)(self) )->virtualbase_NativeEvent(eventType, message, result); +} + +void QWebView_override_virtual_Metric(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__Metric = slot; +} + +int QWebView_virtualbase_Metric(const void* self, int param1) { + return ( (const MiqtVirtualQWebView*)(self) )->virtualbase_Metric(param1); +} + +void QWebView_override_virtual_InitPainter(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__InitPainter = slot; +} + +void QWebView_virtualbase_InitPainter(const void* self, QPainter* painter) { + ( (const MiqtVirtualQWebView*)(self) )->virtualbase_InitPainter(painter); +} + +void QWebView_override_virtual_Redirected(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__Redirected = slot; +} + +QPaintDevice* QWebView_virtualbase_Redirected(const void* self, QPoint* offset) { + return ( (const MiqtVirtualQWebView*)(self) )->virtualbase_Redirected(offset); +} + +void QWebView_override_virtual_SharedPainter(void* self, intptr_t slot) { + dynamic_cast( (QWebView*)(self) )->handle__SharedPainter = slot; +} + +QPainter* QWebView_virtualbase_SharedPainter(const void* self) { + return ( (const MiqtVirtualQWebView*)(self) )->virtualbase_SharedPainter(); +} + +void QWebView_Delete(QWebView* self, bool isSubclass) { + if (isSubclass) { + delete dynamic_cast( self ); + } else { + delete self; + } +} + diff --git a/qt/webkit/gen_qwebview.go b/qt/webkit/gen_qwebview.go new file mode 100644 index 00000000..6e005569 --- /dev/null +++ b/qt/webkit/gen_qwebview.go @@ -0,0 +1,1569 @@ +package webkit + +/* + +#include "gen_qwebview.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "github.com/mappu/miqt/qt/network" + "github.com/mappu/miqt/qt/printsupport" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QWebView struct { + h *C.QWebView + isSubclass bool + *qt.QWidget +} + +func (this *QWebView) cPointer() *C.QWebView { + if this == nil { + return nil + } + return this.h +} + +func (this *QWebView) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQWebView constructs the type using only CGO pointers. +func newQWebView(h *C.QWebView, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWebView { + if h == nil { + return nil + } + return &QWebView{h: h, + QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} +} + +// UnsafeNewQWebView constructs the type using only unsafe pointers. +func UnsafeNewQWebView(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWebView { + if h == nil { + return nil + } + + return &QWebView{h: (*C.QWebView)(h), + QWidget: qt.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +} + +// NewQWebView constructs a new QWebView object. +func NewQWebView(parent *qt.QWidget) *QWebView { + var outptr_QWebView *C.QWebView = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWebView_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QWebView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWebView(outptr_QWebView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +// NewQWebView2 constructs a new QWebView object. +func NewQWebView2() *QWebView { + var outptr_QWebView *C.QWebView = nil + var outptr_QWidget *C.QWidget = nil + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + + C.QWebView_new2(&outptr_QWebView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) + ret := newQWebView(outptr_QWebView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret.isSubclass = true + return ret +} + +func (this *QWebView) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QWebView_MetaObject(this.h))) +} + +func (this *QWebView) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QWebView_Metacast(this.h, param1_Cstring)) +} + +func QWebView_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebView_Tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebView_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QWebView_TrUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebView) Page() *QWebPage { + return UnsafeNewQWebPage(unsafe.Pointer(C.QWebView_Page(this.h)), nil) +} + +func (this *QWebView) SetPage(page *QWebPage) { + C.QWebView_SetPage(this.h, page.cPointer()) +} + +func (this *QWebView) Load(url *qt.QUrl) { + C.QWebView_Load(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebView) LoadWithRequest(request *network.QNetworkRequest) { + C.QWebView_LoadWithRequest(this.h, (*C.QNetworkRequest)(request.UnsafePointer())) +} + +func (this *QWebView) SetHtml(html string) { + html_ms := C.struct_miqt_string{} + html_ms.data = C.CString(html) + html_ms.len = C.size_t(len(html)) + defer C.free(unsafe.Pointer(html_ms.data)) + C.QWebView_SetHtml(this.h, html_ms) +} + +func (this *QWebView) SetContent(data []byte) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + C.QWebView_SetContent(this.h, data_alias) +} + +func (this *QWebView) History() *QWebHistory { + return UnsafeNewQWebHistory(unsafe.Pointer(C.QWebView_History(this.h))) +} + +func (this *QWebView) Settings() *QWebSettings { + return UnsafeNewQWebSettings(unsafe.Pointer(C.QWebView_Settings(this.h))) +} + +func (this *QWebView) Title() string { + var _ms C.struct_miqt_string = C.QWebView_Title(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebView) SetUrl(url *qt.QUrl) { + C.QWebView_SetUrl(this.h, (*C.QUrl)(url.UnsafePointer())) +} + +func (this *QWebView) Url() *qt.QUrl { + _ret := C.QWebView_Url(this.h) + _goptr := qt.UnsafeNewQUrl(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebView) Icon() *qt.QIcon { + _ret := C.QWebView_Icon(this.h) + _goptr := qt.UnsafeNewQIcon(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebView) HasSelection() bool { + return (bool)(C.QWebView_HasSelection(this.h)) +} + +func (this *QWebView) SelectedText() string { + var _ms C.struct_miqt_string = C.QWebView_SelectedText(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebView) SelectedHtml() string { + var _ms C.struct_miqt_string = C.QWebView_SelectedHtml(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebView) PageAction(action QWebPage__WebAction) *qt.QAction { + return qt.UnsafeNewQAction(unsafe.Pointer(C.QWebView_PageAction(this.h, (C.int)(action))), nil) +} + +func (this *QWebView) TriggerPageAction(action QWebPage__WebAction) { + C.QWebView_TriggerPageAction(this.h, (C.int)(action)) +} + +func (this *QWebView) IsModified() bool { + return (bool)(C.QWebView_IsModified(this.h)) +} + +func (this *QWebView) InputMethodQuery(property qt.InputMethodQuery) *qt.QVariant { + _ret := C.QWebView_InputMethodQuery(this.h, (C.int)(property)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebView) SizeHint() *qt.QSize { + _ret := C.QWebView_SizeHint(this.h) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QWebView) ZoomFactor() float64 { + return (float64)(C.QWebView_ZoomFactor(this.h)) +} + +func (this *QWebView) SetZoomFactor(factor float64) { + C.QWebView_SetZoomFactor(this.h, (C.double)(factor)) +} + +func (this *QWebView) SetTextSizeMultiplier(factor float64) { + C.QWebView_SetTextSizeMultiplier(this.h, (C.double)(factor)) +} + +func (this *QWebView) TextSizeMultiplier() float64 { + return (float64)(C.QWebView_TextSizeMultiplier(this.h)) +} + +func (this *QWebView) RenderHints() qt.QPainter__RenderHint { + return (qt.QPainter__RenderHint)(C.QWebView_RenderHints(this.h)) +} + +func (this *QWebView) SetRenderHints(hints qt.QPainter__RenderHint) { + C.QWebView_SetRenderHints(this.h, (C.int)(hints)) +} + +func (this *QWebView) SetRenderHint(hint qt.QPainter__RenderHint) { + C.QWebView_SetRenderHint(this.h, (C.int)(hint)) +} + +func (this *QWebView) FindText(subString string) bool { + subString_ms := C.struct_miqt_string{} + subString_ms.data = C.CString(subString) + subString_ms.len = C.size_t(len(subString)) + defer C.free(unsafe.Pointer(subString_ms.data)) + return (bool)(C.QWebView_FindText(this.h, subString_ms)) +} + +func (this *QWebView) Event(param1 *qt.QEvent) bool { + return (bool)(C.QWebView_Event(this.h, (*C.QEvent)(param1.UnsafePointer()))) +} + +func (this *QWebView) Stop() { + C.QWebView_Stop(this.h) +} + +func (this *QWebView) Back() { + C.QWebView_Back(this.h) +} + +func (this *QWebView) Forward() { + C.QWebView_Forward(this.h) +} + +func (this *QWebView) Reload() { + C.QWebView_Reload(this.h) +} + +func (this *QWebView) Print(param1 *printsupport.QPrinter) { + C.QWebView_Print(this.h, (*C.QPrinter)(param1.UnsafePointer())) +} + +func (this *QWebView) LoadStarted() { + C.QWebView_LoadStarted(this.h) +} +func (this *QWebView) OnLoadStarted(slot func()) { + C.QWebView_connect_LoadStarted(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_LoadStarted +func miqt_exec_callback_QWebView_LoadStarted(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 *QWebView) LoadProgress(progress int) { + C.QWebView_LoadProgress(this.h, (C.int)(progress)) +} +func (this *QWebView) OnLoadProgress(slot func(progress int)) { + C.QWebView_connect_LoadProgress(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_LoadProgress +func miqt_exec_callback_QWebView_LoadProgress(cb C.intptr_t, progress C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(progress int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(progress) + + gofunc(slotval1) +} + +func (this *QWebView) LoadFinished(param1 bool) { + C.QWebView_LoadFinished(this.h, (C.bool)(param1)) +} +func (this *QWebView) OnLoadFinished(slot func(param1 bool)) { + C.QWebView_connect_LoadFinished(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_LoadFinished +func miqt_exec_callback_QWebView_LoadFinished(cb C.intptr_t, param1 C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(param1) + + gofunc(slotval1) +} + +func (this *QWebView) TitleChanged(title string) { + title_ms := C.struct_miqt_string{} + title_ms.data = C.CString(title) + title_ms.len = C.size_t(len(title)) + defer C.free(unsafe.Pointer(title_ms.data)) + C.QWebView_TitleChanged(this.h, title_ms) +} +func (this *QWebView) OnTitleChanged(slot func(title string)) { + C.QWebView_connect_TitleChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_TitleChanged +func miqt_exec_callback_QWebView_TitleChanged(cb C.intptr_t, title C.struct_miqt_string) { + gofunc, ok := cgo.Handle(cb).Value().(func(title string)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var title_ms C.struct_miqt_string = title + title_ret := C.GoStringN(title_ms.data, C.int(int64(title_ms.len))) + C.free(unsafe.Pointer(title_ms.data)) + slotval1 := title_ret + + gofunc(slotval1) +} + +func (this *QWebView) StatusBarMessage(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.QWebView_StatusBarMessage(this.h, text_ms) +} +func (this *QWebView) OnStatusBarMessage(slot func(text string)) { + C.QWebView_connect_StatusBarMessage(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_StatusBarMessage +func miqt_exec_callback_QWebView_StatusBarMessage(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 *QWebView) LinkClicked(param1 *qt.QUrl) { + C.QWebView_LinkClicked(this.h, (*C.QUrl)(param1.UnsafePointer())) +} +func (this *QWebView) OnLinkClicked(slot func(param1 *qt.QUrl)) { + C.QWebView_connect_LinkClicked(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_LinkClicked +func miqt_exec_callback_QWebView_LinkClicked(cb C.intptr_t, param1 *C.QUrl) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 *qt.QUrl)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(param1)) + + gofunc(slotval1) +} + +func (this *QWebView) SelectionChanged() { + C.QWebView_SelectionChanged(this.h) +} +func (this *QWebView) OnSelectionChanged(slot func()) { + C.QWebView_connect_SelectionChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_SelectionChanged +func miqt_exec_callback_QWebView_SelectionChanged(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 *QWebView) IconChanged() { + C.QWebView_IconChanged(this.h) +} +func (this *QWebView) OnIconChanged(slot func()) { + C.QWebView_connect_IconChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_IconChanged +func miqt_exec_callback_QWebView_IconChanged(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 *QWebView) UrlChanged(param1 *qt.QUrl) { + C.QWebView_UrlChanged(this.h, (*C.QUrl)(param1.UnsafePointer())) +} +func (this *QWebView) OnUrlChanged(slot func(param1 *qt.QUrl)) { + C.QWebView_connect_UrlChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_UrlChanged +func miqt_exec_callback_QWebView_UrlChanged(cb C.intptr_t, param1 *C.QUrl) { + gofunc, ok := cgo.Handle(cb).Value().(func(param1 *qt.QUrl)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQUrl(unsafe.Pointer(param1)) + + gofunc(slotval1) +} + +func QWebView_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebView_Tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebView_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebView_Tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebView_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebView_TrUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QWebView_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QWebView_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QWebView) Load2(request *network.QNetworkRequest, operation network.QNetworkAccessManager__Operation) { + C.QWebView_Load2(this.h, (*C.QNetworkRequest)(request.UnsafePointer()), (C.int)(operation)) +} + +func (this *QWebView) Load3(request *network.QNetworkRequest, operation network.QNetworkAccessManager__Operation, body []byte) { + body_alias := C.struct_miqt_string{} + body_alias.data = (*C.char)(unsafe.Pointer(&body[0])) + body_alias.len = C.size_t(len(body)) + C.QWebView_Load3(this.h, (*C.QNetworkRequest)(request.UnsafePointer()), (C.int)(operation), body_alias) +} + +func (this *QWebView) SetHtml2(html string, baseUrl *qt.QUrl) { + html_ms := C.struct_miqt_string{} + html_ms.data = C.CString(html) + html_ms.len = C.size_t(len(html)) + defer C.free(unsafe.Pointer(html_ms.data)) + C.QWebView_SetHtml2(this.h, html_ms, (*C.QUrl)(baseUrl.UnsafePointer())) +} + +func (this *QWebView) SetContent2(data []byte, mimeType string) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + mimeType_ms := C.struct_miqt_string{} + mimeType_ms.data = C.CString(mimeType) + mimeType_ms.len = C.size_t(len(mimeType)) + defer C.free(unsafe.Pointer(mimeType_ms.data)) + C.QWebView_SetContent2(this.h, data_alias, mimeType_ms) +} + +func (this *QWebView) SetContent3(data []byte, mimeType string, baseUrl *qt.QUrl) { + data_alias := C.struct_miqt_string{} + data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) + data_alias.len = C.size_t(len(data)) + mimeType_ms := C.struct_miqt_string{} + mimeType_ms.data = C.CString(mimeType) + mimeType_ms.len = C.size_t(len(mimeType)) + defer C.free(unsafe.Pointer(mimeType_ms.data)) + C.QWebView_SetContent3(this.h, data_alias, mimeType_ms, (*C.QUrl)(baseUrl.UnsafePointer())) +} + +func (this *QWebView) TriggerPageAction2(action QWebPage__WebAction, checked bool) { + C.QWebView_TriggerPageAction2(this.h, (C.int)(action), (C.bool)(checked)) +} + +func (this *QWebView) SetRenderHint2(hint qt.QPainter__RenderHint, enabled bool) { + C.QWebView_SetRenderHint2(this.h, (C.int)(hint), (C.bool)(enabled)) +} + +func (this *QWebView) FindText2(subString string, options QWebPage__FindFlag) bool { + subString_ms := C.struct_miqt_string{} + subString_ms.data = C.CString(subString) + subString_ms.len = C.size_t(len(subString)) + defer C.free(unsafe.Pointer(subString_ms.data)) + return (bool)(C.QWebView_FindText2(this.h, subString_ms, (C.int)(options))) +} + +func (this *QWebView) callVirtualBase_InputMethodQuery(property qt.InputMethodQuery) *qt.QVariant { + + _ret := C.QWebView_virtualbase_InputMethodQuery(unsafe.Pointer(this.h), (C.int)(property)) + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWebView) OnInputMethodQuery(slot func(super func(property qt.InputMethodQuery) *qt.QVariant, property qt.InputMethodQuery) *qt.QVariant) { + C.QWebView_override_virtual_InputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_InputMethodQuery +func miqt_exec_callback_QWebView_InputMethodQuery(self *C.QWebView, cb C.intptr_t, property C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(property qt.InputMethodQuery) *qt.QVariant, property qt.InputMethodQuery) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.InputMethodQuery)(property) + + virtualReturn := gofunc((&QWebView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebView) callVirtualBase_SizeHint() *qt.QSize { + + _ret := C.QWebView_virtualbase_SizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWebView) OnSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QWebView_override_virtual_SizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_SizeHint +func miqt_exec_callback_QWebView_SizeHint(self *C.QWebView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebView{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebView) callVirtualBase_Event(param1 *qt.QEvent) bool { + + return (bool)(C.QWebView_virtualbase_Event(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QWebView) OnEvent(slot func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) { + C.QWebView_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_Event +func miqt_exec_callback_QWebView_Event(self *C.QWebView, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QWebView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebView) callVirtualBase_ResizeEvent(param1 *qt.QResizeEvent) { + + C.QWebView_virtualbase_ResizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnResizeEvent(slot func(super func(param1 *qt.QResizeEvent), param1 *qt.QResizeEvent)) { + C.QWebView_override_virtual_ResizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_ResizeEvent +func miqt_exec_callback_QWebView_ResizeEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QResizeEvent), param1 *qt.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWebView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_PaintEvent(param1 *qt.QPaintEvent) { + + C.QWebView_virtualbase_PaintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnPaintEvent(slot func(super func(param1 *qt.QPaintEvent), param1 *qt.QPaintEvent)) { + C.QWebView_override_virtual_PaintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_PaintEvent +func miqt_exec_callback_QWebView_PaintEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QPaintEvent), param1 *qt.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWebView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_CreateWindow(typeVal QWebPage__WebWindowType) *QWebView { + + return UnsafeNewQWebView(unsafe.Pointer(C.QWebView_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal))), nil, nil, nil) +} +func (this *QWebView) OnCreateWindow(slot func(super func(typeVal QWebPage__WebWindowType) *QWebView, typeVal QWebPage__WebWindowType) *QWebView) { + C.QWebView_override_virtual_CreateWindow(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_CreateWindow +func miqt_exec_callback_QWebView_CreateWindow(self *C.QWebView, cb C.intptr_t, typeVal C.int) *C.QWebView { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(typeVal QWebPage__WebWindowType) *QWebView, typeVal QWebPage__WebWindowType) *QWebView) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QWebPage__WebWindowType)(typeVal) + + virtualReturn := gofunc((&QWebView{h: self}).callVirtualBase_CreateWindow, slotval1) + + return virtualReturn.cPointer() + +} + +func (this *QWebView) callVirtualBase_ChangeEvent(param1 *qt.QEvent) { + + C.QWebView_virtualbase_ChangeEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnChangeEvent(slot func(super func(param1 *qt.QEvent), param1 *qt.QEvent)) { + C.QWebView_override_virtual_ChangeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_ChangeEvent +func miqt_exec_callback_QWebView_ChangeEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent), param1 *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QWebView{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_MouseMoveEvent(param1 *qt.QMouseEvent) { + + C.QWebView_virtualbase_MouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnMouseMoveEvent(slot func(super func(param1 *qt.QMouseEvent), param1 *qt.QMouseEvent)) { + C.QWebView_override_virtual_MouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_MouseMoveEvent +func miqt_exec_callback_QWebView_MouseMoveEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QMouseEvent), param1 *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWebView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_MousePressEvent(param1 *qt.QMouseEvent) { + + C.QWebView_virtualbase_MousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnMousePressEvent(slot func(super func(param1 *qt.QMouseEvent), param1 *qt.QMouseEvent)) { + C.QWebView_override_virtual_MousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_MousePressEvent +func miqt_exec_callback_QWebView_MousePressEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QMouseEvent), param1 *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWebView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_MouseDoubleClickEvent(param1 *qt.QMouseEvent) { + + C.QWebView_virtualbase_MouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnMouseDoubleClickEvent(slot func(super func(param1 *qt.QMouseEvent), param1 *qt.QMouseEvent)) { + C.QWebView_override_virtual_MouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_MouseDoubleClickEvent +func miqt_exec_callback_QWebView_MouseDoubleClickEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QMouseEvent), param1 *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWebView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_MouseReleaseEvent(param1 *qt.QMouseEvent) { + + C.QWebView_virtualbase_MouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnMouseReleaseEvent(slot func(super func(param1 *qt.QMouseEvent), param1 *qt.QMouseEvent)) { + C.QWebView_override_virtual_MouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_MouseReleaseEvent +func miqt_exec_callback_QWebView_MouseReleaseEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QMouseEvent), param1 *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWebView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_ContextMenuEvent(param1 *qt.QContextMenuEvent) { + + C.QWebView_virtualbase_ContextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnContextMenuEvent(slot func(super func(param1 *qt.QContextMenuEvent), param1 *qt.QContextMenuEvent)) { + C.QWebView_override_virtual_ContextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_ContextMenuEvent +func miqt_exec_callback_QWebView_ContextMenuEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QContextMenuEvent), param1 *qt.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWebView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_WheelEvent(param1 *qt.QWheelEvent) { + + C.QWebView_virtualbase_WheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnWheelEvent(slot func(super func(param1 *qt.QWheelEvent), param1 *qt.QWheelEvent)) { + C.QWebView_override_virtual_WheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_WheelEvent +func miqt_exec_callback_QWebView_WheelEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QWheelEvent), param1 *qt.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWebView{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_KeyPressEvent(param1 *qt.QKeyEvent) { + + C.QWebView_virtualbase_KeyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnKeyPressEvent(slot func(super func(param1 *qt.QKeyEvent), param1 *qt.QKeyEvent)) { + C.QWebView_override_virtual_KeyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_KeyPressEvent +func miqt_exec_callback_QWebView_KeyPressEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QKeyEvent), param1 *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWebView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_KeyReleaseEvent(param1 *qt.QKeyEvent) { + + C.QWebView_virtualbase_KeyReleaseEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnKeyReleaseEvent(slot func(super func(param1 *qt.QKeyEvent), param1 *qt.QKeyEvent)) { + C.QWebView_override_virtual_KeyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_KeyReleaseEvent +func miqt_exec_callback_QWebView_KeyReleaseEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QKeyEvent), param1 *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWebView{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_DragEnterEvent(param1 *qt.QDragEnterEvent) { + + C.QWebView_virtualbase_DragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnDragEnterEvent(slot func(super func(param1 *qt.QDragEnterEvent), param1 *qt.QDragEnterEvent)) { + C.QWebView_override_virtual_DragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_DragEnterEvent +func miqt_exec_callback_QWebView_DragEnterEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QDragEnterEvent), param1 *qt.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(param1), nil, nil, nil) + + gofunc((&QWebView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_DragLeaveEvent(param1 *qt.QDragLeaveEvent) { + + C.QWebView_virtualbase_DragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnDragLeaveEvent(slot func(super func(param1 *qt.QDragLeaveEvent), param1 *qt.QDragLeaveEvent)) { + C.QWebView_override_virtual_DragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_DragLeaveEvent +func miqt_exec_callback_QWebView_DragLeaveEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QDragLeaveEvent), param1 *qt.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWebView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_DragMoveEvent(param1 *qt.QDragMoveEvent) { + + C.QWebView_virtualbase_DragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnDragMoveEvent(slot func(super func(param1 *qt.QDragMoveEvent), param1 *qt.QDragMoveEvent)) { + C.QWebView_override_virtual_DragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_DragMoveEvent +func miqt_exec_callback_QWebView_DragMoveEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QDragMoveEvent), param1 *qt.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(param1), nil, nil) + + gofunc((&QWebView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_DropEvent(param1 *qt.QDropEvent) { + + C.QWebView_virtualbase_DropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnDropEvent(slot func(super func(param1 *qt.QDropEvent), param1 *qt.QDropEvent)) { + C.QWebView_override_virtual_DropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_DropEvent +func miqt_exec_callback_QWebView_DropEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QDropEvent), param1 *qt.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWebView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_FocusInEvent(param1 *qt.QFocusEvent) { + + C.QWebView_virtualbase_FocusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnFocusInEvent(slot func(super func(param1 *qt.QFocusEvent), param1 *qt.QFocusEvent)) { + C.QWebView_override_virtual_FocusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_FocusInEvent +func miqt_exec_callback_QWebView_FocusInEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QFocusEvent), param1 *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWebView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_FocusOutEvent(param1 *qt.QFocusEvent) { + + C.QWebView_virtualbase_FocusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnFocusOutEvent(slot func(super func(param1 *qt.QFocusEvent), param1 *qt.QFocusEvent)) { + C.QWebView_override_virtual_FocusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_FocusOutEvent +func miqt_exec_callback_QWebView_FocusOutEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QFocusEvent), param1 *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWebView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_InputMethodEvent(param1 *qt.QInputMethodEvent) { + + C.QWebView_virtualbase_InputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(param1.UnsafePointer())) + +} +func (this *QWebView) OnInputMethodEvent(slot func(super func(param1 *qt.QInputMethodEvent), param1 *qt.QInputMethodEvent)) { + C.QWebView_override_virtual_InputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_InputMethodEvent +func miqt_exec_callback_QWebView_InputMethodEvent(self *C.QWebView, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QInputMethodEvent), param1 *qt.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + + gofunc((&QWebView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QWebView_virtualbase_FocusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QWebView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + C.QWebView_override_virtual_FocusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_FocusNextPrevChild +func miqt_exec_callback_QWebView_FocusNextPrevChild(self *C.QWebView, 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((&QWebView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebView) callVirtualBase_DevType() int { + + return (int)(C.QWebView_virtualbase_DevType(unsafe.Pointer(this.h))) + +} +func (this *QWebView) OnDevType(slot func(super func() int) int) { + C.QWebView_override_virtual_DevType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_DevType +func miqt_exec_callback_QWebView_DevType(self *C.QWebView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebView{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QWebView) callVirtualBase_SetVisible(visible bool) { + + C.QWebView_virtualbase_SetVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QWebView) OnSetVisible(slot func(super func(visible bool), visible bool)) { + C.QWebView_override_virtual_SetVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_SetVisible +func miqt_exec_callback_QWebView_SetVisible(self *C.QWebView, 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((&QWebView{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QWebView) callVirtualBase_MinimumSizeHint() *qt.QSize { + + _ret := C.QWebView_virtualbase_MinimumSizeHint(unsafe.Pointer(this.h)) + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(_ret)) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QWebView) OnMinimumSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + C.QWebView_override_virtual_MinimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_MinimumSizeHint +func miqt_exec_callback_QWebView_MinimumSizeHint(self *C.QWebView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebView{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebView) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QWebView_virtualbase_HeightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWebView) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + C.QWebView_override_virtual_HeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_HeightForWidth +func miqt_exec_callback_QWebView_HeightForWidth(self *C.QWebView, 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((&QWebView{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWebView) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QWebView_virtualbase_HasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QWebView) OnHasHeightForWidth(slot func(super func() bool) bool) { + C.QWebView_override_virtual_HasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_HasHeightForWidth +func miqt_exec_callback_QWebView_HasHeightForWidth(self *C.QWebView, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebView{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebView) callVirtualBase_PaintEngine() *qt.QPaintEngine { + + return qt.UnsafeNewQPaintEngine(unsafe.Pointer(C.QWebView_virtualbase_PaintEngine(unsafe.Pointer(this.h)))) +} +func (this *QWebView) OnPaintEngine(slot func(super func() *qt.QPaintEngine) *qt.QPaintEngine) { + C.QWebView_override_virtual_PaintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_PaintEngine +func miqt_exec_callback_QWebView_PaintEngine(self *C.QWebView, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPaintEngine) *qt.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebView{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebView) callVirtualBase_EnterEvent(event *qt.QEvent) { + + C.QWebView_virtualbase_EnterEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebView) OnEnterEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QWebView_override_virtual_EnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_EnterEvent +func miqt_exec_callback_QWebView_EnterEvent(self *C.QWebView, 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((&QWebView{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_LeaveEvent(event *qt.QEvent) { + + C.QWebView_virtualbase_LeaveEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QWebView) OnLeaveEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + C.QWebView_override_virtual_LeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_LeaveEvent +func miqt_exec_callback_QWebView_LeaveEvent(self *C.QWebView, 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((&QWebView{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_MoveEvent(event *qt.QMoveEvent) { + + C.QWebView_virtualbase_MoveEvent(unsafe.Pointer(this.h), (*C.QMoveEvent)(event.UnsafePointer())) + +} +func (this *QWebView) OnMoveEvent(slot func(super func(event *qt.QMoveEvent), event *qt.QMoveEvent)) { + C.QWebView_override_virtual_MoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_MoveEvent +func miqt_exec_callback_QWebView_MoveEvent(self *C.QWebView, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMoveEvent), event *qt.QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebView{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_CloseEvent(event *qt.QCloseEvent) { + + C.QWebView_virtualbase_CloseEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(event.UnsafePointer())) + +} +func (this *QWebView) OnCloseEvent(slot func(super func(event *qt.QCloseEvent), event *qt.QCloseEvent)) { + C.QWebView_override_virtual_CloseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_CloseEvent +func miqt_exec_callback_QWebView_CloseEvent(self *C.QWebView, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QCloseEvent), event *qt.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebView{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_TabletEvent(event *qt.QTabletEvent) { + + C.QWebView_virtualbase_TabletEvent(unsafe.Pointer(this.h), (*C.QTabletEvent)(event.UnsafePointer())) + +} +func (this *QWebView) OnTabletEvent(slot func(super func(event *qt.QTabletEvent), event *qt.QTabletEvent)) { + C.QWebView_override_virtual_TabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_TabletEvent +func miqt_exec_callback_QWebView_TabletEvent(self *C.QWebView, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTabletEvent), event *qt.QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + + gofunc((&QWebView{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_ActionEvent(event *qt.QActionEvent) { + + C.QWebView_virtualbase_ActionEvent(unsafe.Pointer(this.h), (*C.QActionEvent)(event.UnsafePointer())) + +} +func (this *QWebView) OnActionEvent(slot func(super func(event *qt.QActionEvent), event *qt.QActionEvent)) { + C.QWebView_override_virtual_ActionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_ActionEvent +func miqt_exec_callback_QWebView_ActionEvent(self *C.QWebView, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QActionEvent), event *qt.QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebView{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_ShowEvent(event *qt.QShowEvent) { + + C.QWebView_virtualbase_ShowEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(event.UnsafePointer())) + +} +func (this *QWebView) OnShowEvent(slot func(super func(event *qt.QShowEvent), event *qt.QShowEvent)) { + C.QWebView_override_virtual_ShowEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_ShowEvent +func miqt_exec_callback_QWebView_ShowEvent(self *C.QWebView, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QShowEvent), event *qt.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebView{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QWebView) callVirtualBase_HideEvent(event *qt.QHideEvent) { + + C.QWebView_virtualbase_HideEvent(unsafe.Pointer(this.h), (*C.QHideEvent)(event.UnsafePointer())) + +} +func (this *QWebView) OnHideEvent(slot func(super func(event *qt.QHideEvent), event *qt.QHideEvent)) { + C.QWebView_override_virtual_HideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_HideEvent +func miqt_exec_callback_QWebView_HideEvent(self *C.QWebView, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QHideEvent), event *qt.QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + + gofunc((&QWebView{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QWebView) 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.QWebView_virtualbase_NativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QWebView) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + C.QWebView_override_virtual_NativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_NativeEvent +func miqt_exec_callback_QWebView_NativeEvent(self *C.QWebView, 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((&QWebView{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QWebView) callVirtualBase_Metric(param1 qt.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QWebView_virtualbase_Metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QWebView) OnMetric(slot func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) { + C.QWebView_override_virtual_Metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_Metric +func miqt_exec_callback_QWebView_Metric(self *C.QWebView, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QWebView{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QWebView) callVirtualBase_InitPainter(painter *qt.QPainter) { + + C.QWebView_virtualbase_InitPainter(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer())) + +} +func (this *QWebView) OnInitPainter(slot func(super func(painter *qt.QPainter), painter *qt.QPainter)) { + C.QWebView_override_virtual_InitPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_InitPainter +func miqt_exec_callback_QWebView_InitPainter(self *C.QWebView, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt.QPainter), painter *qt.QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QWebView{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QWebView) callVirtualBase_Redirected(offset *qt.QPoint) *qt.QPaintDevice { + + return qt.UnsafeNewQPaintDevice(unsafe.Pointer(C.QWebView_virtualbase_Redirected(unsafe.Pointer(this.h), (*C.QPoint)(offset.UnsafePointer())))) +} +func (this *QWebView) OnRedirected(slot func(super func(offset *qt.QPoint) *qt.QPaintDevice, offset *qt.QPoint) *qt.QPaintDevice) { + C.QWebView_override_virtual_Redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_Redirected +func miqt_exec_callback_QWebView_Redirected(self *C.QWebView, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *qt.QPoint) *qt.QPaintDevice, offset *qt.QPoint) *qt.QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QWebView{h: self}).callVirtualBase_Redirected, slotval1) + + return (*C.QPaintDevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QWebView) callVirtualBase_SharedPainter() *qt.QPainter { + + return qt.UnsafeNewQPainter(unsafe.Pointer(C.QWebView_virtualbase_SharedPainter(unsafe.Pointer(this.h)))) +} +func (this *QWebView) OnSharedPainter(slot func(super func() *qt.QPainter) *qt.QPainter) { + C.QWebView_override_virtual_SharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QWebView_SharedPainter +func miqt_exec_callback_QWebView_SharedPainter(self *C.QWebView, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPainter) *qt.QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QWebView{h: self}).callVirtualBase_SharedPainter) + + return (*C.QPainter)(virtualReturn.UnsafePointer()) + +} + +// Delete this object from C++ memory. +func (this *QWebView) Delete() { + C.QWebView_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 *QWebView) GoGC() { + runtime.SetFinalizer(this, func(this *QWebView) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/webkit/gen_qwebview.h b/qt/webkit/gen_qwebview.h new file mode 100644 index 00000000..7ed7a082 --- /dev/null +++ b/qt/webkit/gen_qwebview.h @@ -0,0 +1,275 @@ +#pragma once +#ifndef MIQT_QT_WEBKIT_GEN_QWEBVIEW_H +#define MIQT_QT_WEBKIT_GEN_QWEBVIEW_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QAction; +class QActionEvent; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QHideEvent; +class QIcon; +class QInputMethodEvent; +class QKeyEvent; +class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QNetworkRequest; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPoint; +class QPrinter; +class QResizeEvent; +class QShowEvent; +class QSize; +class QTabletEvent; +class QUrl; +class QVariant; +class QWebHistory; +class QWebPage; +class QWebSettings; +class QWebView; +class QWheelEvent; +class QWidget; +#else +typedef struct QAction QAction; +typedef struct QActionEvent QActionEvent; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QHideEvent QHideEvent; +typedef struct QIcon QIcon; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; +typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QNetworkRequest QNetworkRequest; +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 QPrinter QPrinter; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QTabletEvent QTabletEvent; +typedef struct QUrl QUrl; +typedef struct QVariant QVariant; +typedef struct QWebHistory QWebHistory; +typedef struct QWebPage QWebPage; +typedef struct QWebSettings QWebSettings; +typedef struct QWebView QWebView; +typedef struct QWheelEvent QWheelEvent; +typedef struct QWidget QWidget; +#endif + +void QWebView_new(QWidget* parent, QWebView** outptr_QWebView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +void QWebView_new2(QWebView** outptr_QWebView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMetaObject* QWebView_MetaObject(const QWebView* self); +void* QWebView_Metacast(QWebView* self, const char* param1); +struct miqt_string QWebView_Tr(const char* s); +struct miqt_string QWebView_TrUtf8(const char* s); +QWebPage* QWebView_Page(const QWebView* self); +void QWebView_SetPage(QWebView* self, QWebPage* page); +void QWebView_Load(QWebView* self, QUrl* url); +void QWebView_LoadWithRequest(QWebView* self, QNetworkRequest* request); +void QWebView_SetHtml(QWebView* self, struct miqt_string html); +void QWebView_SetContent(QWebView* self, struct miqt_string data); +QWebHistory* QWebView_History(const QWebView* self); +QWebSettings* QWebView_Settings(const QWebView* self); +struct miqt_string QWebView_Title(const QWebView* self); +void QWebView_SetUrl(QWebView* self, QUrl* url); +QUrl* QWebView_Url(const QWebView* self); +QIcon* QWebView_Icon(const QWebView* self); +bool QWebView_HasSelection(const QWebView* self); +struct miqt_string QWebView_SelectedText(const QWebView* self); +struct miqt_string QWebView_SelectedHtml(const QWebView* self); +QAction* QWebView_PageAction(const QWebView* self, int action); +void QWebView_TriggerPageAction(QWebView* self, int action); +bool QWebView_IsModified(const QWebView* self); +QVariant* QWebView_InputMethodQuery(const QWebView* self, int property); +QSize* QWebView_SizeHint(const QWebView* self); +double QWebView_ZoomFactor(const QWebView* self); +void QWebView_SetZoomFactor(QWebView* self, double factor); +void QWebView_SetTextSizeMultiplier(QWebView* self, double factor); +double QWebView_TextSizeMultiplier(const QWebView* self); +int QWebView_RenderHints(const QWebView* self); +void QWebView_SetRenderHints(QWebView* self, int hints); +void QWebView_SetRenderHint(QWebView* self, int hint); +bool QWebView_FindText(QWebView* self, struct miqt_string subString); +bool QWebView_Event(QWebView* self, QEvent* param1); +void QWebView_Stop(QWebView* self); +void QWebView_Back(QWebView* self); +void QWebView_Forward(QWebView* self); +void QWebView_Reload(QWebView* self); +void QWebView_Print(const QWebView* self, QPrinter* param1); +void QWebView_LoadStarted(QWebView* self); +void QWebView_connect_LoadStarted(QWebView* self, intptr_t slot); +void QWebView_LoadProgress(QWebView* self, int progress); +void QWebView_connect_LoadProgress(QWebView* self, intptr_t slot); +void QWebView_LoadFinished(QWebView* self, bool param1); +void QWebView_connect_LoadFinished(QWebView* self, intptr_t slot); +void QWebView_TitleChanged(QWebView* self, struct miqt_string title); +void QWebView_connect_TitleChanged(QWebView* self, intptr_t slot); +void QWebView_StatusBarMessage(QWebView* self, struct miqt_string text); +void QWebView_connect_StatusBarMessage(QWebView* self, intptr_t slot); +void QWebView_LinkClicked(QWebView* self, QUrl* param1); +void QWebView_connect_LinkClicked(QWebView* self, intptr_t slot); +void QWebView_SelectionChanged(QWebView* self); +void QWebView_connect_SelectionChanged(QWebView* self, intptr_t slot); +void QWebView_IconChanged(QWebView* self); +void QWebView_connect_IconChanged(QWebView* self, intptr_t slot); +void QWebView_UrlChanged(QWebView* self, QUrl* param1); +void QWebView_connect_UrlChanged(QWebView* self, intptr_t slot); +void QWebView_ResizeEvent(QWebView* self, QResizeEvent* param1); +void QWebView_PaintEvent(QWebView* self, QPaintEvent* param1); +QWebView* QWebView_CreateWindow(QWebView* self, int typeVal); +void QWebView_ChangeEvent(QWebView* self, QEvent* param1); +void QWebView_MouseMoveEvent(QWebView* self, QMouseEvent* param1); +void QWebView_MousePressEvent(QWebView* self, QMouseEvent* param1); +void QWebView_MouseDoubleClickEvent(QWebView* self, QMouseEvent* param1); +void QWebView_MouseReleaseEvent(QWebView* self, QMouseEvent* param1); +void QWebView_ContextMenuEvent(QWebView* self, QContextMenuEvent* param1); +void QWebView_WheelEvent(QWebView* self, QWheelEvent* param1); +void QWebView_KeyPressEvent(QWebView* self, QKeyEvent* param1); +void QWebView_KeyReleaseEvent(QWebView* self, QKeyEvent* param1); +void QWebView_DragEnterEvent(QWebView* self, QDragEnterEvent* param1); +void QWebView_DragLeaveEvent(QWebView* self, QDragLeaveEvent* param1); +void QWebView_DragMoveEvent(QWebView* self, QDragMoveEvent* param1); +void QWebView_DropEvent(QWebView* self, QDropEvent* param1); +void QWebView_FocusInEvent(QWebView* self, QFocusEvent* param1); +void QWebView_FocusOutEvent(QWebView* self, QFocusEvent* param1); +void QWebView_InputMethodEvent(QWebView* self, QInputMethodEvent* param1); +bool QWebView_FocusNextPrevChild(QWebView* self, bool next); +struct miqt_string QWebView_Tr2(const char* s, const char* c); +struct miqt_string QWebView_Tr3(const char* s, const char* c, int n); +struct miqt_string QWebView_TrUtf82(const char* s, const char* c); +struct miqt_string QWebView_TrUtf83(const char* s, const char* c, int n); +void QWebView_Load2(QWebView* self, QNetworkRequest* request, int operation); +void QWebView_Load3(QWebView* self, QNetworkRequest* request, int operation, struct miqt_string body); +void QWebView_SetHtml2(QWebView* self, struct miqt_string html, QUrl* baseUrl); +void QWebView_SetContent2(QWebView* self, struct miqt_string data, struct miqt_string mimeType); +void QWebView_SetContent3(QWebView* self, struct miqt_string data, struct miqt_string mimeType, QUrl* baseUrl); +void QWebView_TriggerPageAction2(QWebView* self, int action, bool checked); +void QWebView_SetRenderHint2(QWebView* self, int hint, bool enabled); +bool QWebView_FindText2(QWebView* self, struct miqt_string subString, int options); +void QWebView_override_virtual_InputMethodQuery(void* self, intptr_t slot); +QVariant* QWebView_virtualbase_InputMethodQuery(const void* self, int property); +void QWebView_override_virtual_SizeHint(void* self, intptr_t slot); +QSize* QWebView_virtualbase_SizeHint(const void* self); +void QWebView_override_virtual_Event(void* self, intptr_t slot); +bool QWebView_virtualbase_Event(void* self, QEvent* param1); +void QWebView_override_virtual_ResizeEvent(void* self, intptr_t slot); +void QWebView_virtualbase_ResizeEvent(void* self, QResizeEvent* param1); +void QWebView_override_virtual_PaintEvent(void* self, intptr_t slot); +void QWebView_virtualbase_PaintEvent(void* self, QPaintEvent* param1); +void QWebView_override_virtual_CreateWindow(void* self, intptr_t slot); +QWebView* QWebView_virtualbase_CreateWindow(void* self, int typeVal); +void QWebView_override_virtual_ChangeEvent(void* self, intptr_t slot); +void QWebView_virtualbase_ChangeEvent(void* self, QEvent* param1); +void QWebView_override_virtual_MouseMoveEvent(void* self, intptr_t slot); +void QWebView_virtualbase_MouseMoveEvent(void* self, QMouseEvent* param1); +void QWebView_override_virtual_MousePressEvent(void* self, intptr_t slot); +void QWebView_virtualbase_MousePressEvent(void* self, QMouseEvent* param1); +void QWebView_override_virtual_MouseDoubleClickEvent(void* self, intptr_t slot); +void QWebView_virtualbase_MouseDoubleClickEvent(void* self, QMouseEvent* param1); +void QWebView_override_virtual_MouseReleaseEvent(void* self, intptr_t slot); +void QWebView_virtualbase_MouseReleaseEvent(void* self, QMouseEvent* param1); +void QWebView_override_virtual_ContextMenuEvent(void* self, intptr_t slot); +void QWebView_virtualbase_ContextMenuEvent(void* self, QContextMenuEvent* param1); +void QWebView_override_virtual_WheelEvent(void* self, intptr_t slot); +void QWebView_virtualbase_WheelEvent(void* self, QWheelEvent* param1); +void QWebView_override_virtual_KeyPressEvent(void* self, intptr_t slot); +void QWebView_virtualbase_KeyPressEvent(void* self, QKeyEvent* param1); +void QWebView_override_virtual_KeyReleaseEvent(void* self, intptr_t slot); +void QWebView_virtualbase_KeyReleaseEvent(void* self, QKeyEvent* param1); +void QWebView_override_virtual_DragEnterEvent(void* self, intptr_t slot); +void QWebView_virtualbase_DragEnterEvent(void* self, QDragEnterEvent* param1); +void QWebView_override_virtual_DragLeaveEvent(void* self, intptr_t slot); +void QWebView_virtualbase_DragLeaveEvent(void* self, QDragLeaveEvent* param1); +void QWebView_override_virtual_DragMoveEvent(void* self, intptr_t slot); +void QWebView_virtualbase_DragMoveEvent(void* self, QDragMoveEvent* param1); +void QWebView_override_virtual_DropEvent(void* self, intptr_t slot); +void QWebView_virtualbase_DropEvent(void* self, QDropEvent* param1); +void QWebView_override_virtual_FocusInEvent(void* self, intptr_t slot); +void QWebView_virtualbase_FocusInEvent(void* self, QFocusEvent* param1); +void QWebView_override_virtual_FocusOutEvent(void* self, intptr_t slot); +void QWebView_virtualbase_FocusOutEvent(void* self, QFocusEvent* param1); +void QWebView_override_virtual_InputMethodEvent(void* self, intptr_t slot); +void QWebView_virtualbase_InputMethodEvent(void* self, QInputMethodEvent* param1); +void QWebView_override_virtual_FocusNextPrevChild(void* self, intptr_t slot); +bool QWebView_virtualbase_FocusNextPrevChild(void* self, bool next); +void QWebView_override_virtual_DevType(void* self, intptr_t slot); +int QWebView_virtualbase_DevType(const void* self); +void QWebView_override_virtual_SetVisible(void* self, intptr_t slot); +void QWebView_virtualbase_SetVisible(void* self, bool visible); +void QWebView_override_virtual_MinimumSizeHint(void* self, intptr_t slot); +QSize* QWebView_virtualbase_MinimumSizeHint(const void* self); +void QWebView_override_virtual_HeightForWidth(void* self, intptr_t slot); +int QWebView_virtualbase_HeightForWidth(const void* self, int param1); +void QWebView_override_virtual_HasHeightForWidth(void* self, intptr_t slot); +bool QWebView_virtualbase_HasHeightForWidth(const void* self); +void QWebView_override_virtual_PaintEngine(void* self, intptr_t slot); +QPaintEngine* QWebView_virtualbase_PaintEngine(const void* self); +void QWebView_override_virtual_EnterEvent(void* self, intptr_t slot); +void QWebView_virtualbase_EnterEvent(void* self, QEvent* event); +void QWebView_override_virtual_LeaveEvent(void* self, intptr_t slot); +void QWebView_virtualbase_LeaveEvent(void* self, QEvent* event); +void QWebView_override_virtual_MoveEvent(void* self, intptr_t slot); +void QWebView_virtualbase_MoveEvent(void* self, QMoveEvent* event); +void QWebView_override_virtual_CloseEvent(void* self, intptr_t slot); +void QWebView_virtualbase_CloseEvent(void* self, QCloseEvent* event); +void QWebView_override_virtual_TabletEvent(void* self, intptr_t slot); +void QWebView_virtualbase_TabletEvent(void* self, QTabletEvent* event); +void QWebView_override_virtual_ActionEvent(void* self, intptr_t slot); +void QWebView_virtualbase_ActionEvent(void* self, QActionEvent* event); +void QWebView_override_virtual_ShowEvent(void* self, intptr_t slot); +void QWebView_virtualbase_ShowEvent(void* self, QShowEvent* event); +void QWebView_override_virtual_HideEvent(void* self, intptr_t slot); +void QWebView_virtualbase_HideEvent(void* self, QHideEvent* event); +void QWebView_override_virtual_NativeEvent(void* self, intptr_t slot); +bool QWebView_virtualbase_NativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +void QWebView_override_virtual_Metric(void* self, intptr_t slot); +int QWebView_virtualbase_Metric(const void* self, int param1); +void QWebView_override_virtual_InitPainter(void* self, intptr_t slot); +void QWebView_virtualbase_InitPainter(const void* self, QPainter* painter); +void QWebView_override_virtual_Redirected(void* self, intptr_t slot); +QPaintDevice* QWebView_virtualbase_Redirected(const void* self, QPoint* offset); +void QWebView_override_virtual_SharedPainter(void* self, intptr_t slot); +QPainter* QWebView_virtualbase_SharedPainter(const void* self); +void QWebView_Delete(QWebView* self, bool isSubclass); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif From b91500af0783331d47491616a6cef4091ae85715 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 26 Nov 2024 22:31:41 +1300 Subject: [PATCH 12/12] webkit: add example --- .gitignore | 1 + examples/libraries/qt-webkit/main.go | 19 +++++++++++++++++++ examples/libraries/qt-webkit/screenshot.png | Bin 0 -> 30301 bytes 3 files changed, 20 insertions(+) create mode 100644 examples/libraries/qt-webkit/main.go create mode 100644 examples/libraries/qt-webkit/screenshot.png diff --git a/.gitignore b/.gitignore index a1dabbbf..179a6992 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ examples/libraries/qt-network/qt-network examples/libraries/qt-printsupport/qt-printsupport examples/libraries/qt-script/qt-script examples/libraries/qt-svg/qt-svg +examples/libraries/qt-webkit/qt-webkit examples/libraries/qt6-multimedia/qt6-multimedia examples/libraries/restricted-extras-qscintilla/restricted-extras-qscintilla diff --git a/examples/libraries/qt-webkit/main.go b/examples/libraries/qt-webkit/main.go new file mode 100644 index 00000000..b9fc7af2 --- /dev/null +++ b/examples/libraries/qt-webkit/main.go @@ -0,0 +1,19 @@ +package main + +import ( + "os" + + "github.com/mappu/miqt/qt" + "github.com/mappu/miqt/qt/webkit" +) + +func main() { + + qt.NewQApplication(os.Args) + + w := webkit.NewQWebView2() + w.Load(qt.NewQUrl3("https://www.github.com/mappu/miqt")) + w.Show() + + qt.QApplication_Exec() +} diff --git a/examples/libraries/qt-webkit/screenshot.png b/examples/libraries/qt-webkit/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..0934e0a93054638cc0fa88b5572f1662564fed01 GIT binary patch literal 30301 zcmdqJcT|&Kv@MEM1rZe#1pyVLNL48U0t!km(tA_sgd!ab7!?o^5a}Qw5_<0~p@@Qj zw9pBm2~t85T0#jS_lv)B?l||Jan5*uz4ykD5z6=Ny7pRY&bhWxk9F0U895lKsHm7V z)E^p9QPF5qQBmidqz8WUR6@)a_&DXIZtg=xb>qL_98BQuHe-@304~zn*H&6_z ztj5T$t-*=ekPr+VlmDapv=?YYI%A*EJ!CU__~7w5wzD6$4cN|o5aWVsiC>2c3hKOL zTZ8Yd^nvZZx=Xk4wM?O&?U7r`SFUGhE8kAg9#B~M*+VATcHMpVMewhGHxq>IE35wg z;oWtKbE*IR_YOgJhl|nT$13`4kN*5ivT$f?P2vsT!+VZI#+9eTOD*~!9F!8j92{nuC?=^IHdFGqQu=WR$Un?{90O~ur7jGt00=&(MD|IBQvB{q=>b~L|CX@|W$QQ?fk2Sc{>>goca4fnuc z<;bq{#nBt56};gm#dm4NY|jQl*y%scg+;RoJ=dSdMe`Pg06TR4pT({Yc$ChPcq36L zQ8e)utTJ!ITk!R#a}S*5ZuSKypHX;_2j9Uf?|z{s+i(Qhr_hPna+_T?r9D5N1Y!3x zo^J+*YF)-?l^y+$E%n;k*gW=sETkrAC}=78RM1V(i)%fxY5p;8QaMaT=)U))~ZP)OZSU;!bb{#kesC-2fG?eBgA#(kY8Z0=&C zsNVdeW#*$yaW7did~Y_ybpDVUg2oa|=j&e;8PA7?|6{Ga+(`y4N|FMC@`Z`Ki2{kD zXB^%mS^P>14SzSQm@l=ZO^vV_4}Q#=&-oTW%&~(edD+h6h%_nDbjM(c%@q|$9}9z+ z635BMaYfVJ=*`+I%S`iDJ(G9=Z&*w*mxD$#SWFJ#ZZSBl{DTkyC(U> zM~JiOvAwl`Idl-XvxwbeM@6_i)fMJNA0^25 z)%BrID~E8XmE4r(FNP`gf4eglN)XJrlAe6@#Nna?yTc`i%MR%$gVVmSXdf>G9u9tG z?jF%Fb?5un0xKieS}&dMi}o;q4fSxtc2ahKJwEIZ?1zLpTeK15cBy}hnmwyo5kEQl zRnQI6BJN53&#MNfv>zquoN-9(^JCP%Dw%0r>pVOHZ(rg`PEmH&w6#No<&%xb2RQ=q zmOeRd!EL*YUTh|}GvoiX8A5yaWj9PD_+?jf$QRvRb!TB4Q-^lGrl{iIvFawL$#Z-%07f<81 z{o5L;?;hD1JZ@f3M_Zpu2Q2!0u8rWPNYa1ZHb@0;*O2r>H4#T5U%pkA!rfVec%-c*QBBt_~hM^#^#bf05Fg?Ems{@$VoKan$DK)z2b)HLS2>u#h?lb|H>X9!PBLDThdE$z_t zp{8gO+^ec(rbJIE<5+$n>WkpbvOH4ZO_R8S`@WW0FYI{?C)Vmmsf`;A_)i%@?xPad zAU$MG?Qq5ma;7`!3|Z~Q!MB4AAZYFweu@6ov4Lr0F^8b-SqD0-*t0ofQBVSZY{M{b zXcdcat0yVMuX>F&VsifyUA~unRQp4Hwxr`jw*jj@_Q^OWU%SI9aCae1LR;30Lvv2q zU=if|FNIfzd>|0>vzJIK=w2yV0Jm8sSdZFfU;gy%xJTVSJ>W9NJckv z&fqIrZEjA1v%xuU>W-^2TS}Kb8<+h{=059h`iGY-G==#e|g)DJFTZ z{1uiE6ej+x#egkoD9Hk+9US6fz$CSH>Q36$KBRQp%!-zu^rZZF=e~8BK(0WZ0K0}= z`gqN2(U3K{jAI{xi4aMzeZi28o&p-%4|E%2GJR%a;;q$H3Hfv(No=Y4$Ky&m5DnqO zd`sL_5g;Ju)ue-oaD~mGTmtc@l64#+S{%OkDw5q`cR3jWb{i{l;(4*J@6~1noqSE0 zi5BOA;lA}?TN$;KYCYV(bDuuqsX2b`XB*E@s@0Iy(GDfss;vJWu(hk8YZYgkKZ2~q zDLGljGjLbeW8~?`p5hW~)mh>S+H8*;8m>K8<3J?O+OeX!KaV0YK~_iwg*eV10&!fu z{0)L7f;ECId`5QZJI3agCfgBwojdDNu216F!^W{f20w4U*!TX}F6q~MDT9RGlXhGj zm1OQ2VVq#+x2Kpi#`w#U+xSrn?sZrIX7*{ zdJ>&C%XrMA)246~R;ac{dYAMHQuH8~Oy|idvC1wSXd7>5XTXBEGniBvJSVBS9mWde zWW7;2LcE;@s^R<4a|TS$T(`|* zRLxO`p0SBKb2t|kQsPyj@3_*c$_VOSQ#hwx>9Bd%&&k-y{)Q{7rL+8&w5a zRkJi<-hJYSWobG*6C^tp!$gRX?{YyybR4h;1<4Wf;E8JEOW@+wjULuQ$7~O)cg!`{_p<$tegZ%kfUu?(zoC-atG_`O~X}h=Xt@ZMl_q zfafssKciFiDe+njf6`k&7IQ0leuc{lLJCdl)CsW<2V4)5L__v;Id_L^#%l-Ir9BWG z8eE5`uRIw{5_ActwtY1w+~($^CS51{)N;ClRiNqqh5iq)M3YwjSMw@B__<(R#J-xN z#uKn2;UbtB{1(<}b;hUToSc2bFvmh{@|ffR&$;Ox#O5KY2#6mxd+jNDD%eW`xx ztO*@}oK816iu%T)U0igh6rFMb^lYldeJX_o`E{IUawCg*V-O;WN%2&w6w79-_cxBV z=+2kRc5(Fzw2_4LWL%45VWIdgtD(h*Y&X5gr!=Zdo1{QNa+ zp%bn(a<4CaG{-2dA%VUmm|4UYqU>=pJ2?B0z;o%e_FY}OYkr&7cm`am6&B$AC*0NC~&Z4iLtJHMQL;8!) zos6NTRvqlrWGH$scdWz|X(Ng^u}cfsNYQVj4}(d=m8`S?kMlkMXhnjOiW|XYO+Z5Q-iM~EXdb*L7P9Sq}?|HIi-KguqQ^)ALAW=j)3u(VCR6C zN-C(^<#OQ5xt{^hQj%ulYn7>TD!LX!B+F`M=sw zwOhaA`FiXWEwptb^GWwuS}2V zzIG_X$m_q`cxHD~DYy)O>Xg<^;C%#VDtF*KB;nMbxt+f)k;K^~ZEm)$+3?q}&!+w} z>nTBrwGMptjNgQ{6AA!dD?p}kk<^yYtF$*6W(U_oEDKeVF;KJVLImpB1@{@{ib9j(@l3uv1m{F-C_ zJae_1K0lpx!n|8ahL1^`i+W;B`p>Ssyuz7!_!DX8$6p5Ig1(s^yg(D@XS-rJ%M1&2 z2?#B5^VSy!8y~gAs(!^O%?`+}TxmJ@oq>s043eg6!{ZiV2=ZD9CprN$7u(a`bWl5I4H zX){djEYzTd1+bR04fXC*PaOJ^>vH21jZ!V*2|p-lDdxGh(pK zuc?tYDpp;n|FX{yAN(=XKwh|{ao$UE#~N7=Dhu3N)Ym!m8qtw4M>YGEX(aIXM67u0 zvQquowU=*3K0kQq01+8S7lv~Nld@DDvaU}H1%uNbpzgYBW zS%}~)Rf#;~Ki_^LAe%(oLrytmXS!cM2^GiAP@sCtz^nSc5}5v1&7_;lp*~mw(zBtB ze2hfZKkYu#akg(y@~+pMXIYpuPQUMlU;kI!CBl>CfnX z$M7M~q{0TYk{OUyW?sV|nEC2wqLAUMFt^6-Wrr2la7qTPn$p-=%{$@0 z`!gnrjfxhJv9s`&Okacs)|&?7xhEf3=QhC)5LQ%FTZ?_-ZQ2(dV-*jbWj=|SXr_o| zZjc+7lP%2-sH&}6{4rK`!=XY${Pk5&yZM`}ul-=sPUqS^SjlFY_3xLOpcSZc87ofW zz+k8)=dn58FtY!)!pN{9xlGTTj~AIws-t>6}GuMWD7Q`ad00XSjL3^}5CuvhZ) zw4OH1O&n^=)SaZ zjbs1mG=rI3`YxA(%;b$N&(;G+idE!Yh3?!{klQP~51}5!>Exew%1>19F}cSCp=xNTRcsqUK~a2+oG@+7aah=mK{HZz%h zOT!{x(r@U&HJGUF@3Y?i^kTb5gW!<9<$;;56H{NiBB;Z0%jdUtUxGj!5Ep#&VfLL7 zO+-Pfn9Fy%NM$>!eJSF&2-;8*egf+)AAr^VdlmCLNrPd>tkR>G9mH6E7d;T>Gh~fKSX2QL71a4U=_2 z@R^+c)7})S6-=Co>Sw&ek*#FcPKB&?(3<4_!g%548}R$BU)?QhKMa{PXA_qb1oRy9 zX#Vy?R{(c%G9sN-@7{1fb)LPCskNW+w~-h$?Fug)fBzXes;hqv&8Zb&8fWM^ndRgC z(Bn<4nI*<0j-*4p7XBF5Mh-2u*I01-)fH3f{P*)wYHevo0Ld~x)O1nQ;-Oy{DN94s ze(mR-!P+LDmFkZt{)%OM<^35lmQ_!_zj`2GT5g41awK_t3@zZ35+a?%0`}^}Dxmvp znfmXszF2qJW*OXB2Rz4nISH4=w~wMPRvG-=)H894V^GjOUi)rnn5!DY$Er43WGFD^ z^5ewcfgq=-p$PEXCQ$Wrdl|e%YvW}Z)&VF#F~KtHmgFRczn%iZ>i-d>|7X$ouZ8;W zU#FZlpqGEU`!`+szX$pMH#U1#hJc&%6t%3ceQ~foB~|%*n1PpO#*LDIa@VcRytKa1ZAxY+C*-uj>Se0mK4gPpYRl4Iq%-m)kZ6 zcC^Hz&NZKh?$LBZT762rB_HxV=#xT2NdS*jmlAQ~j=a}AmGG@IE-lVP+Ueai!T~Q} z)*oI?*dQGXGV6y!kGy4sY3_fMJgu%);G!;I^UDH>iR1~j<6IfStb;7+_`ez)Me>78 zLE_Yg(oEXqqn)@5q86jE3WQ1C*b&$+LhC^CO2?oQ*&Xun?$5R+P^Nb^qBhD zOMmuOrhJY)ulhZXt~^Y)^gtRi36ueD5QYdrs1v>-0GCPe`L*pkx>dfE0bGl)4J>d*X;6&^ zwH{nleO&_Zq_+M${W1ca7L^_-IbqvYn8MD_JFxhdcaN!g6oP&2c(w~E!G@C5L)zbb zJE@I>?Zh%^7YEFNQ(`Fjtb>D{>s)AqweK+hghYk8Pr(H-*!Ka2fZWW$Mb(hw0}wEn z&=OP6g5~~}@74kRQW-S1%^?Z*RPpQb8`EwwmRa{QL`}~w1 zF)mIdEPw%GzW&a@-OkJgV<4Ff*Ld@y6DjVyDUK#e!xvg~lG z5NgX(jRfoQiaBl~0cq`z(BQPbyA2Gmtm9=Zn0SKy1)J-=Tvd!;oN>-q!hM>MY)g|B z!m1qI2j>*@T$tX+_NCz+IRm@tmVgS**oGjV{hmvbRWbaoo65b>;vO{>ZL=<>Hcdi- znbgAt*;uc^krwRHj?7f+>yq|*4~4VR5<((eVMiTksp#45Wg-f_OI<>pCV1thWKf)b z^^&w@3*n_@!&(mgNTGi2%rZ~d(bii5`I{2V9Fl@#?NEGA%I&jCw)5+c3?zb=lT6*a zV>=nl0V7l($#r&clwg!w3Z&siPqU z=vaA=*Pvda*0K! z8KX{Y_sUUaUA_X|9UiZ78nmO)6Udzdf_3?c6b>?Gy1*AREw#U=!lJO`2pNN<)Dq0x zlydFAapTKZZ`C}tGZ_3ho>L#iy@IZ2JM-@fa|(e4mUuA^E3@Cd#!h_ z4>x-MI(8x5(BkBOck!0AAREQPb%RN`8RVu2Z1 z(X&1mZW>iK%!SIEUmESOBz=$oA`DvqL?c!)SmpCphVK(vW~Pzq^)2-%Y%Y--NX5-E z$cO4Fz-HaFZmtCYhS++$Wa!ZXcXqV{3+}O``*2I>cqv#2U;<+!=EE~w?+H_n08zzR z9KLH%c_O!+k4xTP`+O?wS`Yvg>o`4Ox6JLPoBiB?&Dnm$Zv70vh$kZis98TW+0M(I z{X)Z2grOPh<1Pa{kHvCt5@yC{&@VhUR!3>v!3(pPik&U z6vdbA#NtW6SX70qv)@8AkUH6xs0JVv728~|Ijaef3Zl6V_^B;Vvih9Tp-71D(9?-> zYwR{}+`aS8$g=)Qzq?__M|SOo5+g(U_{6n4xH|DA0IBLd|L~}jb*$y0a|$bv1w?VB z?*1zM{to1~B8v*aT@0|%<%4LbkbS|VL-||_u`-AY0DcK``3&5X=?)N$2WpVj5j`d5Gg|NYB-Vb^Mr^OD8)-sZzP>r-55W21MY`%u zrX%&a3oe7i8??dcUa>)!0J{LR3R zr!TT!!HSS)kebDS^=bH`-1k!v`R0I`qux2-6OVpzF z2dQMIl6r0|vem~%7tzVKuLvAlhHzgt8@QE0iHYch)^A%?$;-Ov@iObPo7{$Q;hdP> zz?0etfYRZm=MV39cCmELEP)j7pmxDmIT)opX6^=vlSd9Pv`=vvNWe{@*`zwG3BXHQEY1y0yC7%wvHhMUw`1Lz>Xka`3lkMnkTU846+>WQumj?OYIHedbmNE|LMK|J)sH{|J`TI)?b}D@{9a-NOv>VmC zn*%8c&X8GK?yw{?4a%0vR_x0sI}M=NCp&cIT{=*R&@^ioyq)hg1B<^(+phdA8#{we zRc26JtS*|Y>1Kz}ch4L=tNB0&u8o85*?1M&YC<$}w3uB7+aWZs_qG6f-BUpT(>ZF# zTuZkBc+0*@OvtBphakAlhPdKqKU% z6{Q}0S~)eiqt(C(=P-#vF3$~a@UC)HG|FAu*?Lg>U-Uv z<6g{kLkW6{Q{jRY556RLNm+j6kaW3>pawDpRTW2NCtapIdv}X2x3|z65>aPLSFgTf zPi6DkP1|!evy9=8LR?9$B@g3<-f$-oICO%=)PMuQSU#7qv-&BeeJ}7Gu$X7kqqI94 z{IHJq==sGZi`X^h4&*N7BOI(#k}KIbQjgeDVL2NdPYNz0M@!hmB#I(6adgaSd=iiJ z6pDgR?5OxqURGU2n zW#Pt4xEQ3&;KL4`@;i zjXVPoO0oua9P<7Z8KSx)5o#?n#l}SIm(AGb*KJ`?^TSalKf;s{`AkBDr!<@Agdz zm&q?-&D%wWdrb=whcN|!z|%c6*KD)$#t&UDKXh_h$L;)8iSRndevXOG64rdUdBxXZ zkcH~X^@l#M0-Ws-UNZQuRrRU>+DUZy#mo|@xrWpyRfRJ^bppvY9pkZw?IbGDUCQ+F z-E6UUmymGTPbI&7p{cUH%V{L%nq^>zIOmB^4>}M>?fFJUk>>hu&2*diz-Y@mh7cp=aE{4J~2((cvJ-P;mI< z`QfH8K(PY<_Ej8dRcT8)U(ya8%so^5<~S=c^!Gysa|Jmn#Ft0We0@Wm5AEKi=Bwjd z&wkCUfYM?~W#U!pE`b>lZ-Z9GkB)Y@CpN=Kc#y}*sqgHb)hvpW*wE}k)tF3dq)VN9 z)OqC0L;CbkD^|r-HIO*m*U-+XrBk%P0o&pkU1k|@_0k(Q=lZ9i*4L>P=ikCpY%HFT6}E;zzV0K^B&;@6?9$X9 zdd~=#PqOV_pSB0s`vvD|&zOgI5iADL$-~vndVFlbqi^+dLEqn9=s=IjV|2Q%%JtaB zIE${(u}Za;w;cyhgkUmPpk497Rb!tO*Psbj68bnl=eW9vgSDf}3VI|X2#32I?!h%3 za!PQQ)HTR}5<nV zj@HPVu^Zh!b_fY&{CttGY?-ge$FGt3X=gAUoBZI%dM^j|5JWYk)(R~;SZYbiNDpaj z81Dvm1F!TZ34hsp>MHroQsF9NE8|m}lUi$s4_UO=(?*;ORhHR|BunyweJ&&d`U(Xj zr}Nn2f|!d;Sz=W`t-`UxZv+lS1V0JhLtm|_Z#wg>Fu+7*7k@Cibkikgu<2_ycc(DE zaP4ZWYU8S`%fo2J=-CHnC~ghKX=Z!B_~-QG+5+7*{Ks!knl@CG-f)UZoVY6SNK?R3 zSQ6?VThdlr8gN_Yb^!7FdWa>n4s#sgO!E43S9tVWay#_eR`6-M5rBH5ub6Pi^noI4 zPg5ez$-;(*PqmB}bl=5b`>U^6n)qAuQ0-H*baVEy_J|bEdSTTg39GQ|PZnEOQhj5S zxwTZ%jha7=PxUSOfq&Nm?Z&OIX-9eNgg#Wvs;BUpY$*_-VW?!9ibYDF$5)+0K=paE z(L{Pu7bA7gK&1|*S|Ub_)V{t&&H5MX3=uk=nUS}X0BdJk)@}p(){A#+-VRRmy*wo> zp+O{IP*M9gt?41B0E*g>nnNMjbMs1OpZFY`zjB0ga-Xi_z>HHtcI&O45Ar&nPF!6< zM4_tIZwxJ+N@vzv)`7l!pQ~}bmUP>PlQ*b(bM%H5G0E!KZ&9an~pdeWz-$d*EH!=`Q0sY(AE8AS3JJJB`KEd}BM)5Cc%H~u0> z$M28evR7p^oF5AeNRQxj*CIoBryK!NrO6sjbf!MjZ=vD*ZmtrF$;Bj^XDj_Ril-cw zwg3nfHmm&1Dg7~-=kcT8?gAhlkO19h=XzG;-4G8`K$dGlI~cG;P_!t+7eoF-gdu-@ zGlYMy$Y1gf&FYVWh-ko5&FL!ON8g6oM)krF{=L)c%K}lKcp<1yEWpI`7bF;fVJ`#CrU4@`#@R9jvt7eICf*q<_35Ej*9IS=<_ zw+YMvzx`~Zoiz541WBa5Ni)D!qGK zZ&1PLvOh{Rz!W5i5CIa}B7tA0+BZ|ueR2pR{!3QGVM$TRXbq8vY85CWW;`@2m<`3N zPlRv3GUmHT%khn|(&9KLlKXk~>-(GtKmt$ty;6pYgwQZl^F~7eRizQ+vtCp%9WCCv z+8W*9K6M^uodSr5t^ffHlmA@gFqWVN@S5L2f`>rSIR+3l_54Xv6IQ=se-_-h8^b9x zAazBoY3Y21e1OO1A)sV5(L2=oV`tJ_AU((vVL%~yQL8_S04#p91BG2FJZ9mlI}Mu) zqH&}Ksey8VWp5sW?&Sr>@Pt_hEhnwHe)|-5e9&R@nj+BfIvtYZpijGF0lbu_nWS0R zE*Z4_4B6<->sf!2Gdzd6vrnu=WSv`p?nc<_AlxjR08qGpM0-H1W&x;5OPLHsaBy-t zD{}~DI9F}Pqvq%2N{Hl8IK04~qWaV+Ky-nWR< zb0vydrxX17iC;TMg^553z(Zdz`|emS0 zC)&_REOrtcRpSA(;eAl>kbrzze#|qe4P~{~6O7=U-vZEPO}pmSl!CuN$1mAn+2=L$ttSEfH^I*cpM z@dPU#??07loH-UqC$7EJyUug>$NP3Zr)+S&l;`X{H7rwi91kwoebi$_qT#)qlAr=n zx$czF8j3&(Vfm4HiPZXheQ$OEJE7$)5H=}Q_cLdXZU%}itYw;Gn-AjN7pG{#_2pzA z|DvG#mAn^(DJQIA)AQx(+YY^ryrpY-SUau@r)2neZ&;Y@4a)(bjpO#Sw-jx(H(3-N z@ifZ6nPWPSH|^0oHg7dH0iE=v;0G49&I`%BK6n%0*{Xl zgcL(Xib_!O?<8OBZ`#G>DZdSX$HJ^b50=fhLv5R$=Y^1AzzDJMU;5754C(5eE%EgH zASNy;d4zwoqy(U#jWbsvhzr218py|cZCK~u!2C8MpsV;KLH(})Vf8!Nv|<{l?pTlA zUW1pdd>%9tnNusXsC$mqVGe}Hdf|{iKkt2x$Z{d^S=ec6J-wFK4h2EG4*-_Xz3csD zjfjB!T2O8F_%D|h*TzYJXnF$3xB*C;i9QPR+iC_k8{Vh^iWxGW{U~a%ns1pCE$A+^ zZEJ0@88qeP^tFY1O1YaeSilC|0aC{5>bR3;cD$LoOLoPzhlfYsT(fb*hlrrW^?n1r zw~8a73-#fuj?U^Wt?1omDK^opiK0DOb-g?(iK5IeG%SG5>{DS4q6Iw-*C|sO4pl~) z5@qT{DZF9;37`~a0ul)>$AfvTyu0QjCoabka^xCx;0e%I|C>wwClZSFQky8!R#nnagCv9n7zo~9mtw} z!rUUu#jktdr~y7D#%9(-sp z#Qsb(E<0YW(RbFO5D=H?8~k9>&z@dRWjl)xB}5EE>rr3U>=7x|^(!B5Xw8J!#t6lb z39+ulRl7hTOkmng*!oS6-aPvqcZ|?NBGIl6R;LC5feC*3EoDVQzC1O+HQm<}sRdCvf1Rt`PkC z7;2fBQ@U}lo}+;A;^B*+Cv`kpF4?%u&*hjevwgeRokwa!IR5jHAHWU^9GuRt7u~&g zq@cY8(}m;NE`HMJOs|ta3o>X67oiMau z0s9b}GD6FiZ-KizM6uXQUV+(V6gT53VFZD_xJM^$9ApA0 z&E8dC_(3+;1zAEbrY?dq^LJ%`{J0jhZg2Y5*t3}&!oOQr!l27*aKzx@7lsj6p-DJH zwc65``?^`~Dn(#;mU{z+S(;-n7KMTf_;cQVKbguq+4uksJR^BHQei%NzU7In zlD-IEi-DMTDecgxTavqrz!fte6p^DV-$t7G^3dr!0kc5`XbttUoRZw8;LyV_qXa~X zGT<@|UmU&vJo|uoZ!_Y}L6LnP2Fm+sN>(DzcQI6zjvrs01*kh786~6b#<};^l<~nw z45HUhX}bjR9B`fzf_wUC+HE`bl<4P1AlZY7k3kKijy=)Fb^yYu4fzzb^ZN#q_CkG3 z1H4lz)$pJ7$J4HoN2Vu>u71d*eW+cOVvRP+^Ml4;vKi9& zXR#fDK$qRQ#C|x9=O%c1VtD+*JOhiBB-UP*jmI>2j!7(!msz%e%au~0zMJZ7s!|zw zs@8!Fw{E}Vhixi}gPwX`dSWu3AUpc8dM)USkcVHk*T|GB zLq1oCGfToAxp1p6B2FxX`4vFrcy}Bk!)TQ*Rs%|uTFs6X7(eF0wNI1Zr4+JoD=)&M zkvm+STgha1lA{EZ?I5=M#*oe`lj(uoJ8L@xSn9j4AoJi!g*b_i?TN{I`p&%9W{A=S zwEUnjx@%>u;rwL9QCo{HvP~2~UO@yhYZkW{^1YB<=&?;|6M*GR2Pe0AWTUF%T3`_52beeZ3t*48Cx+FT zc^~IqtHhu{>)7#ObE(Z;y3a^SM>8Khx^sy|n;7u9j+Sh2H zxaA{yv=Z;X?OGcMcL~N!_XIL~mLcW**7=C!uL_|eE|Zy#p^PYcSFfPa)gi)eSdr63 zFeJRy7E!GoOl|0j6jgv|CzlY9?Cj>@>c!WRjDMAR}0z=MRddt?ZIdJ*6FsgDk9Q@werl;zi|$bakp=X%1`5(7iu)?w+3mI{E>RL?&N}&of{0be&s^ z_cxAMqr%5Isk>HCr*~6{{*yUJN>*qt^HKJk@uXPBbz3?X@PqXq1+7D4CwE(6V@YKb zrG7;qU!az@k-ol_>UjSbOM{qShU1BC#~-Km_N$;PMVMTBE*qgMCBtRctmUqmFrUTW zbd;82WUGbq5)W^|Yejtc((CkN1nCyMa)k0Q`Sy1Y4JJI3T}aNdQU>^-0{|X;Zw4-kZrdUWG6zdbSUg7%a(!AKNh% z9IZ?n4gPWaHUH_&{2CT!t>d{yLo>#SUx^%WMTH1L%rv=B(n=kTB4_FUdQ7yDq8@ww z0a34C@v6Rz(6KH%jB)iXSx5o^j0`$27>^Gf@||Q{i^tZCJ{~n%Ipp5t@RYlo!z~yi zHq<(v0ev`kIk;_oh8tx%$3oFUh)Sa$CWan|pMuXlk$NF=hj3uAH%*`Z-GCwG9*5!@ zv-kw@e#NakP|mgb!}qT6^*dJv(ULXP39V0kW8;%2_Ow>Lf-sg+4|O`Pl9;{0xSLBQ z4I1c?j2q&T5w&EkhJ>Fl1IeBNHYjY}lyvMKg*Tdf}|9lJ(0W7ymB8A3%H>HFN z76&{eEpw=$%FTPk_c;u#z8S#};c3i&@DPh`ycPQ?{NXd>@2?`5*45zwXN(&cg4VxG z0ED;7sob=O*MukZN+*)KGw}R~UhQ@8u)o1sgTeQ)sRa&c52wnDk_J+SDt|l-YkPEf z9KAv+n`o)9DRia@z7Ct1ToJ$$G!xs|`X)-x@yse3sB}%Tbj9+M5x8R@p-%T9l>ur( z0rK_}dRqz~k#^rULheKXLY!r8@w8xBlG}+wI zXGOer%7>hPU8GFBOr}f;*a9AD_nD<>3*axG;UA%>>h?1BvTXGYrOLTxZLE_X*tF~U zgrIARvFL{~%?gbQoeKSmBp@g2ZyLBuixCn=+Tl91WrK9L1CdXtCG!{_4*@P&Bb zCP{UrbH9lf^J=n_pOW_Kyaq^&k_)6Ib*UbZGPMp46U|fMr5hnB_m1 zZM-CKuNOTHoVW_noqObRerIrrhky!y~z z$&%n7ze(^(MPhMlQi)l=oF93r9yh}U(@BxvTXkC&20La?xXvf{3(03QXVf?1f&Ufa ze1Ua>p>Upm->?3;+P>DCspXGHU7wp0Lr_XR<+inw*x~~uu9$E&nz^Zub6)I zNQ-h+=4@)=C5C+GSC6eCf#O_KAgmET#hH8uS!PT=W$7KDLw_reOW?_y)5B7R72ToY;)!kUkjiHQpamQ2muZ z*Mz1&&Fv^N=bcjLF)^&!YSZNkM!lrm%mKWR?;F>9*zQ8=4@#12t&|+P9;kqvC53tC z2+n}o$g&eC=@&me^%Wdbu<){dAMutCb$&##kcDNL4YVgm3v%3Z#{B>*_5`?yeLCW* zXl`Fc(oLr_q`y}R&x_JVlB`o}%e}xKZ|9#1O9Uxs1A@;TR2Z6&ncQ&SKI1lqB_QL~ zR2)XWgh}Ps@D?_fec>_ISCL#V zjgh0H8A3f0E$Sj;ug5~fiPfth1UFJiX1Q+-wbq=&lMK6=rXvC=?)iO z($U0Q_etCHw7Cr`niOu*5O#NNpdi+GF)31g9+R(4h=8QT+9y!V$6+7DH*=rg;y<_B zm%{n!cuDGIN^IYWEEALh^;^u^MLNP+AT6@>f^H=YKR_*3xK;%eP_Ny~^UrK)@#7S8cb|oQM~#>J#PO}j07cQoBcIcR zDLWJo>`?YWkCW}a#pk@LWY_Q9LAUQtC7#*L_iba>YK@0RYG7Eo3dfd3k^YSu1qK}J z1v`ZR-Q}7Aur9k-*lJ<-3y47V)iwiEy_|9yp3ksM+*WWpbm}p@G#t$AGytQ+*57K= z`B}XORN+Mp(NewL^Y4%3F=aZYjcRMgA5Qgmm81h@U=#AtooE;?vxS_j1^~IHFdDQ&SiCJ$}{wb~lTvSPW;s;9N_Wh;=*ro*HMk_2? zv~@2O;rrEqo;E*Dky(kxzK+8W)E%2?&XFn!uyZGMs9pwwCSHs*rg6g02a}4&+)zu8 z8Ku`RAk;6Cg{Yf#?H}dZ1KgCHjAmaMvQj881WvCr^Pv^!o=z5(Pn92ko6(meO$F%n zTobqO4qe@R4fcCf~X*11yO-GfFN~d1Q{fN5Q=~l3nf&MCZS|R z2N8y%AcQ`GB+^Hz(jtS1f`AZeXbJ)%O466CH)NN4i>&oI$TmEz>;VEyzQmW#qjbNmaJC8ki;qzEe za+j>)sUthq?VOtth3=Pq(~2bpjx)H~0jZX7(qd?}gYY#)MjRkT)L z+NRm!nB1W89|?|cPFS-yFsdEhSJYyMS?{D8?j7B>C$RH;t@$h5iufm~dY6GEwLOHT zel*3A`9bRU<2Q#lbd!b;_)E5k=6_Fn%YSrmai)u;wKgUP&Wm_z$;dsC`eFrQd>{zBrpML=;8x_zQF*hhtQhk8mkejgqDvWVNIBN;Nv)cj($F;Yeg44a1U1xGf4T{` zQb|4`kbf1QpE@c>?kIRr&|6I{biH`8FSc44XIiEsmhhZmW5&_6E)Tw~F;s|v!Q!6+ z#f7tV*~~R3!Fp%YzJh5q2(-En_`}3i5I%QW6W;PjiNNzlWkTN&i6p^ zlElw_>&kl7;sHS(G7+jrz~eVletj03vbKr!C{_&9ru)5L?#%k&qlNyQeC=3#@mL`P^;Qmt;w1YC3l_or#I#Qx*{MsV(E=%4D|G;&Q9q}IkgK?Wfv3Vd?3Y^ z6U`+q1|HH#%wfE}H5-)G9am*puEp0|6iMpkyec*LPAL7Gcw9Ms#lyPTF-@#KSBRr%y=}K8HW*ujWnnd>nmnb}uZtC*47}M>I9P^jv9kXC zlO$E?GF8?}-b%~LD5umK`URY(dOUxZJm*u^m|T1LIr$jwI<4Bx6lZ{Q$3@`^a4kqU z9MLJBx1+Tcl0fhRyd>}yN`2kBks_P3)<*+$`aRl%PrLOxyMA-fb@{VWU+z-!5_L&* zRPdHeE11-OKR5pqNdG^Wn|oazd?kCDlYw_1uf|WWoQVW72;|>!-FPb5Wpkbef;K%` z46#Xn+113E-qO2kglIQ>a%}Qxr$9D@wJ)x{_vG;-#M*D$Ue5@8vyCqt0sq@x*jf@Z zdikcrEt&1##JzHX7$ePS6MS$zoZ9FjjU<1w8_P8USLSn&71?ggxHxkSY}lKYZOGRT zu&Hm>DjCS^c`OIq&>vwKKs1AkPDJ3DJdy$A;x#@8E=U)yLayPi_kVYXktn$Ozq~23 z@?7qN?;ZPo_ljewUk^7c>UuFm|2_GH4Lc`L(waSY{?Fn4oC+v|!P(&ro3~#qA7T|u zGcqbxhyC62Swhtu5q-p8yJac3pxGQ`Sowq zNN@NtEIt7PzYJ(rsq#*)T>6AGh;VlxRv}xM@Np`vWd_ouzc%3`9L4D!_@gC)G;~y; z8Hw3=(9>Wb~9{mY!`vmHzdP@_niDrz90p!GvCsQ}j&Z3Gwk84;znE4xG()d~m zz*%>fVfpZHBzlQZ+i8>d`%hi#8?GFDtHSqsV8kuXuY}7kA&sBr=+mpW= zhWgGo?CA%(sIQM<#S!Ds)OSlp@nnE+-KIUg&=pHBY4{1+tES=HzohQ==Hl;oW`d|4 zaQF_t{{8sS1RN>zR0#8C)k4z=cj$F{q*u;ZWBkj9`Wb|L1Wx-OR}P#g zs=lJ;H~l(x<{eJ7=^BhK`f_vaPWCSUHq45deS1A1yM-sTes z#mifl{fZQ7kl8z|ym+ko0KujMF-ZLo4O-o#o*UfCfmUMdHZ-t<=+Dyt4P`menpS)g zr7{0fsJp`JD%U20=)_YtP~cS6=1Tx{aTNf_4iKQEs>|LcB*QfO3wxDZ;sNHWL+ypW zo(!mw01n3i4rw0P;3l(a@6PV%gH{W-j>mc)$Lu0SWCw1*kjtTu@RZ7_U%rW(U4b?x zYH5$H>%-$_H&zy_=U<6=s9b_x!$FQ6beAB2-ztL`S^hn8C2+{{N@EVF1bPuv#nprp z7OfgFb|Lfz*&dRSq}o_KCLc>7nwK~mGd^X-Jb*)M$A>2^J6Hu1xjhfG@F6DvoH}L3 zFMzg^`@$}UbMVH9J@OvQQ$7AYE6_D-s5YZmZkuq@^1(-XZV!4&_KQSmwtgZt_Tbrp z;N}EbS2)FXkcR>;SBWqHUHIkxLk72NU4>!!Bq{-^#j%auPR}HW&@QCDx4Knj z^jk4yk5q~fHYItasB^zmNVVk2&uE&83=ygc6aRihmG*hU&w{%Jy z`{qHsoDCIl!XpxAIpv|@dx+2wYieEU@{nQugVBU1nBA7NI5<&VoMs-JD~Tn0GfR2 z`j1-_PUE~E173aBi|^aL@BawLWoq9#|EOUOn&ZkLEaU@(?rU{h`((}F%H1+1M|uNy z>)D&c#L00$`1R7sxU6gMe*3`>@L>IH7UOneSKiSgGP{yNu6Z{$cMqIA&kA|%B`5~_ zJ^JyNOFJUNqOiCdEk7qF-O6$4%B2C-%JXK?OyY$R<0tLcc7GO!Udi%l;8^pnpE&pH zUcqm*L7u#0CM|$g^8HHznN3oVTpkR6gtrNxh6dEoc91nqF@rGr&pV0Y29%*Inmu-$tG=!)LsZ@mO=&IP4Iu}@D(RLMoy*uLY=w?h{c1&k=qb%FE*7wxm1 z();x4ptnhk#S_4nR_Ps96ufiH-Z^x0OzY)U4sBNB)#p|A;#ZSPJ(~oDjW4{je9rpq zeB=-B=m+DUnpPjUs3-7LBrhz~#GPW2$zIMXJD%vXrPr4~kG1v5?guVW?asfsK1n;2 za4x@+y)c@owCTC5fN<%P3|1{UZSGCd<#Xru+RMf0E^PBYqu}jGNP4R<>|HAzE$rU+ z>?l42I72oM-pzSrAHhI11jimKoUNLxmD+>}fAMSF**mK%m$%Ia1byJQJ0|`-B4uhB zw#;WZ?*e;%WXkTP_`09%ccDWkRroM3n}ME(A|Emz$z(P3QB`3ZC%*IQE(?$9D|VV_ zYc%K|k#f-D(AyTZn4`64@yt<43Un8Zsb?O#Fv3dpdbN+<{!qnANI5C8*^whpZ-1mh z|KZNr{W=lF!v@KUGGrs8)OI<;mpezo(Ox5AHw15t-4b4Jwo(6}<`8(7g~LXI>J9Cw z;R!06`1VP^FS9tb03xacVtxO$x@v4jRS;tF#My3VB)^8yh=$b=<0W zV>KU?p&4uf{j7^ZyF1DG;)82Z{gOinwarQ1fb)W%k zLlJZ+7({qu7o1`oAiy7>uP}~{kiKvS1pWuLRSLQIKm0dT58j7h8V!H&Mz?mS1tiG+ zr=R})IsejQ|NA?+bOL?}@nt47C7A;MxuF~)@s*J%cMzp>_PLV!4LI6#Qklo#XOaMS zc2rN4lCZvkCfI?l1s@l2;6j6uMWp$Ayt*BSnCke?#^D^ynk-oq4R zWFmNWm`oN%3!WFyd57>ktE00q6DBiNBF*Gp<5dS4X`&Z@r?-KlvHRbOj`;T?x-@C{Eqh7nvx-P)go&&fJ z8Aft^H_$wpVlbo9Ym)7c>Way}0>KO#n97zZd|bORqf8Ku$R?ir@kF%Y!~QCN&)mYo zRy#?f4ZKgkBSbjodV={_+wF~*{92nTKV<0KmD52%U-a=PakbM1X{t&FDW?kzQ3bX& zss^blrwlSQH2^#yrvXj7*)cUhVh4-^Uzxr@kYEU8D&-j-Jn2%aEAgIa?Sy!&1lX^b ztcSx#^92)GC&bE2w2+Xdt-KgHR5xG|#_ye|34vVqz2oA9Qw1 zmjIZHG15MsK6s!SSPxYFrU@A@9)*C1BUJj$Btxk8fQ-;(WiwDSLp5q-JZ9kW4&MCZ z>VzR_NR@QR&CP9Ui|>KwDmt~MGJU=HYM=xDF=Pgh^9n0-TP+v5^DX1Tc1WfJ^F_j% zy1XaBZ!3VXS+y$vsQ%T>Tl2as&oDWL${5yO=Q#v1r%KmWo~*c!|9`RHh5lz^FBzR^ zi<3!%1Y#2CBM7YR5D6#i5LU19V=#_FGTaj;G}&l57lzm!7|oo8Nf93^FZBqOz@$H! zVZ&xZvh|Rhk>Xi<2A_hk7;3R5jV76kZAQR%qzlwJ=S9!lcs#s|=TV8HlIXvi`(Zn} z!NQ0$rrcw&qiT-5=vwME`il7sazuS#Zqx(2Y&6wVBo8>C*~&aa6ljIkAhgS3S7rz4 z&E?P)3ISE>Y0sflEj)mghyceNHyQ>U*d!oi-VV>*-l6%ad?R;pLMOj&ra+EDf#&`5 zb4BWebRfCwB;z@%lAaL!V*$2=1uRxhW@cvV)S=i2`-sE(eH=a9Xq58#BD<$obkfR` zGy?r9XDg@9*Tu6kR%ak>heel_CX8$`a&U0CT~`9BN_?>UR8V!rG_ZRvC`=28tCrMF z3D@~RR7`{{o&*dS4{aqpDZtz3100d#Rlv*a$ z7TJ+iCFP@0zzlX$>yJ*@q;t0?fsVikco+1g(|k;DjG6Mq#K!wM3o&MfYYr`vpIBkX z3#L>$cMvOfU|{npkl!!#03s~MM-usXfGp$D(Q^T{TRIqFYFvm@zXReV4dhVwu;A?0 zWW_23^-DwKo(bI$(E0_1G2c(`4gzjW8gG;OgC~%IU;#)nnVVOb>zz=&B?EXVNMIYY zff^+n@NJKQX7WrLq_51n|EYNKU-pH62BLp=um5OFm^{w8i%>-P48c`XtyK2%?4Vj#XXjVF4O}x%6Gty! z&AAAe7o;e{D&a+R3;|-;l^mJKcM(|_*>>Qkd{|3w@gxGa@2flaia2{!TAisjM!(c& z(xh%9FIZL$sS_6B#fV1;nuiJLxX(F?9s?CVKt9He3K5kCMotnqv+QZtBw*jISweDr zKz;rpvLM1X8x zXTISL+NIW>S{oerdEmJ>6-sJsc3};T%8mCXhuO6990(k+U_vH!wN{O(K-xGts=4&; zES(H}GCu(i$PEN8xiCROCq1}p)C(XORVdtaAc3V8=W|}sxTH4}vgnIKQs|$w7=3LE zB>x%eLj1hCE zt?XD7{2s`N3;-%dK8c}tK9t~IfhuP!Ge?BhYwoGe$&!4s=GNpIWuirg;g#*U#V`3l_ z81>~Dkor@CR|XSnS8C?6r#T0KvMSp$R3`cg#6I)C*{|kLeFg4~@gMf+{x&imu$Ckx z%MuQuM?!R??lJZQjZh8UL38y}7Sn;e+Evs6r7!(NZ0ljfRcIX}Z1)wf*O#w}2Uee# zOOPb53UGrRh~U%habV*X-W>}i4ano^%}amq%YT%<5}u`^MSo+okZ56HL7H|=(Gu59 z8TsKxj3Pl3JPY&4&W8K>3-&J4s%$5k0TaYw+^A7cdPMVrS19!DapSp`UFd_ES6{~- z#J(k*q8q2H+#ZB_-hH{sPnk@q0M6G&t%c%u4Wp;IW-~%aH)te30QgkT14T>gS!{in zz$6R>4RQG-fHaLD$1S1&hwpuI8%Q(}EZ0X#g;{UYjhH(0^V?FTho8Q(bMeYw&w&_+ynZ74A~{nAQr8+}Uzh$YB2T zJRrxPkCs+!C#CsW6_eoysJL?}uu^|LgT#Mb7Ita20b{$#kl_C3r1T#fnUDXQq9m8e zIz`8~1bK%dNg42G|H#@Y+5dZyzss#UVfS58hX~ON%0Hfc+8M9o+|Z6d`?3*V1KxCO z&J#e~pmB$4pbn0O@-gC)umH@~4bs4K7{jE+RyFxx;QtFj%2kAD3zUPAf5eXOZhU-= zIdS4d+iTlyYm}0N!G{EE51CCE0tD3(`X7><(y<9#Ba;ke+c?sD_DKv-vKk>Vyx4 zG~Lbt#n_?#<$DQ*jGzTQuG!RN1Fm$Us0y-k6I!VeQ2lwanP2Be7q@Kl`X*w*9x=yF z?6&iBD?l{Xw&CP8PI)wh7)UuGwNCNom-j+N6(bQGDMGXdss?zp==}}%e>+6jzF#Gl z>;ZOAhOwF`CpK5Ca^6&nfaL5F@C0x?KilW-LANW0<~-!104zD4Y%_3j?x)ZkNUtV= zK8{uw1JEi%W zhY)L^TrC?Vp`i-!$&)PDik|>w*D5a-GhYJL9Of3Yjg(D$F2$0EE8GOpNazMtEnG6{ za_BHLUxeliZl)Z(qK67jxcQ~;FxZcT_t9#z$2RdwDqD$;bR-&RzpR6)HmG)o^f2;b zqMS_!u*BYY*Swx*D@t9x7HbfnjQ>Kdz)Et%rQlloFQf(5`;+keOV^a$^LG)i2R z@N9zYGnt*pcBL`947L(ys#YG`k!#dg{gQsfeHef};i7Mfkekrf= zM3x zp@Lm4yJmI?P>zSnlpT(gBJEa&VY&`cA{vp!IvrE5__^t-1iDX+Rn$kB-)^)@?Wyg4 z4kO=?t^~$z@etveO{xxMw?suZve<8;kVDUA8S9}eo_b3P?w>y#b+Q?re9@k zYa8cJ28_D&f9&0a@hYx9M5qPt?^iSZthv$-4%TYm=x$jHjO}8>bknb|)5(`m$O0$z zc~$SAjI~Sg?%OWcjw;=ZH;lObgV%*mPkEqkVaewSOY!KN*UWt5|KQ0<)uvGr5kUsea(U9W@c$AEQWkvn1jXmcYlp<3&o*b3aF_?!B>~) zE20I_cPq{e-QSE!wK=5eZ0_RZXp|A>ZtwR?m}4R%;;*Mk5{tA`w6nDHw7HgCQ5PjH zY`AR1-0A<|xI}f?vu6vx-aPPRdfReaI>&^z^m-&BnL9P{X7`W@c|r8yEQ3trOtVbO z&sxszUf$Jh-k55s%@~%#SeMp({gh|*m{v1yjp;);hL#C^t7KCfAhTGB(MJg9KbUgX zyG7dP;)|=NBLu?F+Ql##S?pr&7p4i4HdbZRPj9}bK5CaTcn*`fW0H2*V65FVBtGX+ z@ffS^F53e4F)@ZXTx64Ihvfutwa`!T>|_gvAqi>h7vCvCg0U-h}!DxYge#7}=C zIZ}(Be_<4*9zOH?O&@5wGJUAQ=~9uzseksMF(3Ag6}F~JWM~8%(4RGOU8uCA;0b?rdy+xtJ)xuh%-Z$_mn%@xnK znVOmT`nfBz^!;k&pJ;g7rg{Y3RHu3b9qOZSL?hL%I<(nY)ly%GKCB7x(I2o_x9&Fq zEIgs-+=U#WO!0{5*S2Q++>QJ9daZtW)GpC}p#4z$5rGDi!^#b6BlfFrv0RRp84X1pF%VDM1+JVJc-I$ zboIpTxvzMDnpO5gYpdqzFt@qAq4;12tXTza%%EZWQ|)2g>MGGBKbH2TJv zv)+AlTX*`FOx@Inhel)ygJ$lNRMfkxF4FX9GIle!-*d&uQq7iSc+4}LxD=*R>oy-QLqsxreLk9Z{{ z@6>O6>m-4VD4y8;!8A~$rUFlS(;!Xhh2u)E2=2{G=frcxB5IG}4pR?{K0dnN(xu}* zQAJQ&(C}$Rj_pa!`wOu=WAFMoBK_EE=BFs<80Xl8>(_GLIJHHd5VNR+=l{&RL~USq zu<_El65aXVN@T}inPL>-u`e+J-*X?8BtDBgDC<*9g3qqdODx1Rn0{YmRTN6TuzTv)u9B6#cpmEmU=?gNnyZas-^}2O> MI)>VXKiY@>AJ)wVB>(^b literal 0 HcmV?d00001