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