mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 00:48:38 +00:00
svg: initial build
This commit is contained in:
parent
fc47abea0e
commit
86a8f2b6b8
6
qt/svg/cflags.go
Normal file
6
qt/svg/cflags.go
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
package svg
|
||||||
|
|
||||||
|
/*
|
||||||
|
#cgo pkg-config: Qt5Svg
|
||||||
|
*/
|
||||||
|
import "C"
|
324
qt/svg/gen_qgraphicssvgitem.cpp
Normal file
324
qt/svg/gen_qgraphicssvgitem.cpp
Normal file
@ -0,0 +1,324 @@
|
|||||||
|
#include <QEvent>
|
||||||
|
#include <QGraphicsItem>
|
||||||
|
#include <QGraphicsObject>
|
||||||
|
#include <QGraphicsSvgItem>
|
||||||
|
#include <QMetaObject>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QRectF>
|
||||||
|
#include <QSize>
|
||||||
|
#include <QString>
|
||||||
|
#include <QByteArray>
|
||||||
|
#include <cstring>
|
||||||
|
#include <QStyleOptionGraphicsItem>
|
||||||
|
#include <QSvgRenderer>
|
||||||
|
#include <QWidget>
|
||||||
|
#include <qgraphicssvgitem.h>
|
||||||
|
#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<MiqtVirtualQGraphicsSvgItem*>(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<MiqtVirtualQGraphicsSvgItem*>(this), handle__Type);
|
||||||
|
|
||||||
|
return static_cast<int>(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<QGraphicsObject*>(ret);
|
||||||
|
*outptr_QObject = static_cast<QObject*>(ret);
|
||||||
|
*outptr_QGraphicsItem = static_cast<QGraphicsItem*>(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<QGraphicsObject*>(ret);
|
||||||
|
*outptr_QObject = static_cast<QObject*>(ret);
|
||||||
|
*outptr_QGraphicsItem = static_cast<QGraphicsItem*>(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<QGraphicsObject*>(ret);
|
||||||
|
*outptr_QObject = static_cast<QObject*>(ret);
|
||||||
|
*outptr_QGraphicsItem = static_cast<QGraphicsItem*>(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<QGraphicsObject*>(ret);
|
||||||
|
*outptr_QObject = static_cast<QObject*>(ret);
|
||||||
|
*outptr_QGraphicsItem = static_cast<QGraphicsItem*>(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<char*>(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<char*>(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<char*>(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<char*>(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<int>(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<char*>(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<char*>(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<int>(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<char*>(malloc(_ms.len));
|
||||||
|
memcpy(_ms.data, _b.data(), _ms.len);
|
||||||
|
return _ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QGraphicsSvgItem_override_virtual_BoundingRect(void* self, intptr_t slot) {
|
||||||
|
dynamic_cast<MiqtVirtualQGraphicsSvgItem*>( (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<MiqtVirtualQGraphicsSvgItem*>( (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<MiqtVirtualQGraphicsSvgItem*>( (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<MiqtVirtualQGraphicsSvgItem*>( (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<MiqtVirtualQGraphicsSvgItem*>( self );
|
||||||
|
} else {
|
||||||
|
delete self;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
361
qt/svg/gen_qgraphicssvgitem.go
Normal file
361
qt/svg/gen_qgraphicssvgitem.go
Normal file
@ -0,0 +1,361 @@
|
|||||||
|
package svg
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
#include "gen_qgraphicssvgitem.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
*/
|
||||||
|
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)
|
||||||
|
})
|
||||||
|
}
|
82
qt/svg/gen_qgraphicssvgitem.h
Normal file
82
qt/svg/gen_qgraphicssvgitem.h
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
#pragma once
|
||||||
|
#ifndef MIQT_QT_SVG_GEN_QGRAPHICSSVGITEM_H
|
||||||
|
#define MIQT_QT_SVG_GEN_QGRAPHICSSVGITEM_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#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
|
312
qt/svg/gen_qsvggenerator.cpp
Normal file
312
qt/svg/gen_qsvggenerator.cpp
Normal file
@ -0,0 +1,312 @@
|
|||||||
|
#include <QIODevice>
|
||||||
|
#include <QPaintDevice>
|
||||||
|
#include <QPaintEngine>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QPoint>
|
||||||
|
#include <QRect>
|
||||||
|
#include <QRectF>
|
||||||
|
#include <QSize>
|
||||||
|
#include <QString>
|
||||||
|
#include <QByteArray>
|
||||||
|
#include <cstring>
|
||||||
|
#include <QSvgGenerator>
|
||||||
|
#include <qsvggenerator.h>
|
||||||
|
#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<MiqtVirtualQSvgGenerator*>(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<int>(metric_ret);
|
||||||
|
|
||||||
|
int callback_return_value = miqt_exec_callback_QSvgGenerator_Metric(const_cast<MiqtVirtualQSvgGenerator*>(this), handle__Metric, sigval1);
|
||||||
|
|
||||||
|
return static_cast<int>(callback_return_value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrapper to allow calling protected method
|
||||||
|
int virtualbase_Metric(int metric) const {
|
||||||
|
|
||||||
|
return QSvgGenerator::metric(static_cast<QPaintDevice::PaintDeviceMetric>(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<MiqtVirtualQSvgGenerator*>(this), handle__DevType);
|
||||||
|
|
||||||
|
return static_cast<int>(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<MiqtVirtualQSvgGenerator*>(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<MiqtVirtualQSvgGenerator*>(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<MiqtVirtualQSvgGenerator*>(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<QPaintDevice*>(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<char*>(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<char*>(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<char*>(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<int>(dpi));
|
||||||
|
}
|
||||||
|
|
||||||
|
int QSvgGenerator_Resolution(const QSvgGenerator* self) {
|
||||||
|
return self->resolution();
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSvgGenerator_override_virtual_PaintEngine(void* self, intptr_t slot) {
|
||||||
|
dynamic_cast<MiqtVirtualQSvgGenerator*>( (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<MiqtVirtualQSvgGenerator*>( (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<MiqtVirtualQSvgGenerator*>( (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<MiqtVirtualQSvgGenerator*>( (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<MiqtVirtualQSvgGenerator*>( (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<MiqtVirtualQSvgGenerator*>( (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<MiqtVirtualQSvgGenerator*>( self );
|
||||||
|
} else {
|
||||||
|
delete self;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
310
qt/svg/gen_qsvggenerator.go
Normal file
310
qt/svg/gen_qsvggenerator.go
Normal file
@ -0,0 +1,310 @@
|
|||||||
|
package svg
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
#include "gen_qsvggenerator.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
*/
|
||||||
|
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)
|
||||||
|
})
|
||||||
|
}
|
76
qt/svg/gen_qsvggenerator.h
Normal file
76
qt/svg/gen_qsvggenerator.h
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
#pragma once
|
||||||
|
#ifndef MIQT_QT_SVG_GEN_QSVGGENERATOR_H
|
||||||
|
#define MIQT_QT_SVG_GEN_QSVGGENERATOR_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#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
|
518
qt/svg/gen_qsvgrenderer.cpp
Normal file
518
qt/svg/gen_qsvgrenderer.cpp
Normal file
@ -0,0 +1,518 @@
|
|||||||
|
#include <QByteArray>
|
||||||
|
#include <QChildEvent>
|
||||||
|
#include <QEvent>
|
||||||
|
#include <QMatrix>
|
||||||
|
#include <QMetaMethod>
|
||||||
|
#include <QMetaObject>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QRect>
|
||||||
|
#include <QRectF>
|
||||||
|
#include <QSize>
|
||||||
|
#include <QString>
|
||||||
|
#include <QByteArray>
|
||||||
|
#include <cstring>
|
||||||
|
#include <QSvgRenderer>
|
||||||
|
#include <QTimerEvent>
|
||||||
|
#include <QTransform>
|
||||||
|
#include <QXmlStreamReader>
|
||||||
|
#include <qsvgrenderer.h>
|
||||||
|
#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<QMetaMethod*>(&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<QMetaMethod*>(&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<QObject*>(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<QObject*>(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<QObject*>(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSvgRenderer_new4(QXmlStreamReader* contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) {
|
||||||
|
MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents);
|
||||||
|
*outptr_QSvgRenderer = ret;
|
||||||
|
*outptr_QObject = static_cast<QObject*>(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSvgRenderer_new5(QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) {
|
||||||
|
MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(parent);
|
||||||
|
*outptr_QSvgRenderer = ret;
|
||||||
|
*outptr_QObject = static_cast<QObject*>(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<QObject*>(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<QObject*>(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<QObject*>(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<char*>(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<char*>(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<int>(_ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSvgRenderer_SetAspectRatioMode(QSvgRenderer* self, int mode) {
|
||||||
|
self->setAspectRatioMode(static_cast<Qt::AspectRatioMode>(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<int>(num));
|
||||||
|
}
|
||||||
|
|
||||||
|
int QSvgRenderer_CurrentFrame(const QSvgRenderer* self) {
|
||||||
|
return self->currentFrame();
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSvgRenderer_SetCurrentFrame(QSvgRenderer* self, int currentFrame) {
|
||||||
|
self->setCurrentFrame(static_cast<int>(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<void (QSvgRenderer::*)()>(&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<char*>(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<int>(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<char*>(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<char*>(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<int>(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<char*>(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<MiqtVirtualQSvgRenderer*>( (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<MiqtVirtualQSvgRenderer*>( (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<MiqtVirtualQSvgRenderer*>( (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<MiqtVirtualQSvgRenderer*>( (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<MiqtVirtualQSvgRenderer*>( (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<MiqtVirtualQSvgRenderer*>( (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<MiqtVirtualQSvgRenderer*>( (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<MiqtVirtualQSvgRenderer*>( self );
|
||||||
|
} else {
|
||||||
|
delete self;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
575
qt/svg/gen_qsvgrenderer.go
Normal file
575
qt/svg/gen_qsvgrenderer.go
Normal file
@ -0,0 +1,575 @@
|
|||||||
|
package svg
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
#include "gen_qsvgrenderer.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
*/
|
||||||
|
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)
|
||||||
|
})
|
||||||
|
}
|
114
qt/svg/gen_qsvgrenderer.h
Normal file
114
qt/svg/gen_qsvgrenderer.h
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
#pragma once
|
||||||
|
#ifndef MIQT_QT_SVG_GEN_QSVGRENDERER_H
|
||||||
|
#define MIQT_QT_SVG_GEN_QSVGRENDERER_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#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
|
1487
qt/svg/gen_qsvgwidget.cpp
Normal file
1487
qt/svg/gen_qsvgwidget.cpp
Normal file
File diff suppressed because it is too large
Load Diff
1193
qt/svg/gen_qsvgwidget.go
Normal file
1193
qt/svg/gen_qsvgwidget.go
Normal file
File diff suppressed because it is too large
Load Diff
188
qt/svg/gen_qsvgwidget.h
Normal file
188
qt/svg/gen_qsvgwidget.h
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
#pragma once
|
||||||
|
#ifndef MIQT_QT_SVG_GEN_QSVGWIDGET_H
|
||||||
|
#define MIQT_QT_SVG_GEN_QSVGWIDGET_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#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
|
6
qt6/svg/cflags.go
Normal file
6
qt6/svg/cflags.go
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
package svg
|
||||||
|
|
||||||
|
/*
|
||||||
|
#cgo pkg-config: Qt6SvgWidgets
|
||||||
|
*/
|
||||||
|
import "C"
|
291
qt6/svg/gen_qgraphicssvgitem.cpp
Normal file
291
qt6/svg/gen_qgraphicssvgitem.cpp
Normal file
@ -0,0 +1,291 @@
|
|||||||
|
#include <QEvent>
|
||||||
|
#include <QGraphicsItem>
|
||||||
|
#include <QGraphicsObject>
|
||||||
|
#include <QGraphicsSvgItem>
|
||||||
|
#include <QMetaObject>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QRectF>
|
||||||
|
#include <QSize>
|
||||||
|
#include <QString>
|
||||||
|
#include <QByteArray>
|
||||||
|
#include <cstring>
|
||||||
|
#include <QStyleOptionGraphicsItem>
|
||||||
|
#include <QSvgRenderer>
|
||||||
|
#include <QWidget>
|
||||||
|
#include <qgraphicssvgitem.h>
|
||||||
|
#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<MiqtVirtualQGraphicsSvgItem*>(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<MiqtVirtualQGraphicsSvgItem*>(this), handle__Type);
|
||||||
|
|
||||||
|
return static_cast<int>(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<QGraphicsObject*>(ret);
|
||||||
|
*outptr_QObject = static_cast<QObject*>(ret);
|
||||||
|
*outptr_QGraphicsItem = static_cast<QGraphicsItem*>(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<QGraphicsObject*>(ret);
|
||||||
|
*outptr_QObject = static_cast<QObject*>(ret);
|
||||||
|
*outptr_QGraphicsItem = static_cast<QGraphicsItem*>(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<QGraphicsObject*>(ret);
|
||||||
|
*outptr_QObject = static_cast<QObject*>(ret);
|
||||||
|
*outptr_QGraphicsItem = static_cast<QGraphicsItem*>(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<QGraphicsObject*>(ret);
|
||||||
|
*outptr_QObject = static_cast<QObject*>(ret);
|
||||||
|
*outptr_QGraphicsItem = static_cast<QGraphicsItem*>(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<char*>(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<char*>(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<char*>(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<int>(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<char*>(malloc(_ms.len));
|
||||||
|
memcpy(_ms.data, _b.data(), _ms.len);
|
||||||
|
return _ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QGraphicsSvgItem_override_virtual_BoundingRect(void* self, intptr_t slot) {
|
||||||
|
dynamic_cast<MiqtVirtualQGraphicsSvgItem*>( (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<MiqtVirtualQGraphicsSvgItem*>( (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<MiqtVirtualQGraphicsSvgItem*>( (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<MiqtVirtualQGraphicsSvgItem*>( (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<MiqtVirtualQGraphicsSvgItem*>( self );
|
||||||
|
} else {
|
||||||
|
delete self;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
330
qt6/svg/gen_qgraphicssvgitem.go
Normal file
330
qt6/svg/gen_qgraphicssvgitem.go
Normal file
@ -0,0 +1,330 @@
|
|||||||
|
package svg
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
#include "gen_qgraphicssvgitem.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
*/
|
||||||
|
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)
|
||||||
|
})
|
||||||
|
}
|
79
qt6/svg/gen_qgraphicssvgitem.h
Normal file
79
qt6/svg/gen_qgraphicssvgitem.h
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
#pragma once
|
||||||
|
#ifndef MIQT_QT6_SVG_GEN_QGRAPHICSSVGITEM_H
|
||||||
|
#define MIQT_QT6_SVG_GEN_QGRAPHICSSVGITEM_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#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
|
312
qt6/svg/gen_qsvggenerator.cpp
Normal file
312
qt6/svg/gen_qsvggenerator.cpp
Normal file
@ -0,0 +1,312 @@
|
|||||||
|
#include <QIODevice>
|
||||||
|
#include <QPaintDevice>
|
||||||
|
#include <QPaintEngine>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QPoint>
|
||||||
|
#include <QRect>
|
||||||
|
#include <QRectF>
|
||||||
|
#include <QSize>
|
||||||
|
#include <QString>
|
||||||
|
#include <QByteArray>
|
||||||
|
#include <cstring>
|
||||||
|
#include <QSvgGenerator>
|
||||||
|
#include <qsvggenerator.h>
|
||||||
|
#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<MiqtVirtualQSvgGenerator*>(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<int>(metric_ret);
|
||||||
|
|
||||||
|
int callback_return_value = miqt_exec_callback_QSvgGenerator_Metric(const_cast<MiqtVirtualQSvgGenerator*>(this), handle__Metric, sigval1);
|
||||||
|
|
||||||
|
return static_cast<int>(callback_return_value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrapper to allow calling protected method
|
||||||
|
int virtualbase_Metric(int metric) const {
|
||||||
|
|
||||||
|
return QSvgGenerator::metric(static_cast<QPaintDevice::PaintDeviceMetric>(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<MiqtVirtualQSvgGenerator*>(this), handle__DevType);
|
||||||
|
|
||||||
|
return static_cast<int>(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<MiqtVirtualQSvgGenerator*>(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<MiqtVirtualQSvgGenerator*>(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<MiqtVirtualQSvgGenerator*>(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<QPaintDevice*>(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<char*>(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<char*>(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<char*>(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<int>(dpi));
|
||||||
|
}
|
||||||
|
|
||||||
|
int QSvgGenerator_Resolution(const QSvgGenerator* self) {
|
||||||
|
return self->resolution();
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSvgGenerator_override_virtual_PaintEngine(void* self, intptr_t slot) {
|
||||||
|
dynamic_cast<MiqtVirtualQSvgGenerator*>( (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<MiqtVirtualQSvgGenerator*>( (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<MiqtVirtualQSvgGenerator*>( (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<MiqtVirtualQSvgGenerator*>( (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<MiqtVirtualQSvgGenerator*>( (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<MiqtVirtualQSvgGenerator*>( (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<MiqtVirtualQSvgGenerator*>( self );
|
||||||
|
} else {
|
||||||
|
delete self;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
310
qt6/svg/gen_qsvggenerator.go
Normal file
310
qt6/svg/gen_qsvggenerator.go
Normal file
@ -0,0 +1,310 @@
|
|||||||
|
package svg
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
#include "gen_qsvggenerator.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
*/
|
||||||
|
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)
|
||||||
|
})
|
||||||
|
}
|
76
qt6/svg/gen_qsvggenerator.h
Normal file
76
qt6/svg/gen_qsvggenerator.h
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
#pragma once
|
||||||
|
#ifndef MIQT_QT6_SVG_GEN_QSVGGENERATOR_H
|
||||||
|
#define MIQT_QT6_SVG_GEN_QSVGGENERATOR_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#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
|
479
qt6/svg/gen_qsvgrenderer.cpp
Normal file
479
qt6/svg/gen_qsvgrenderer.cpp
Normal file
@ -0,0 +1,479 @@
|
|||||||
|
#include <QByteArray>
|
||||||
|
#include <QChildEvent>
|
||||||
|
#include <QEvent>
|
||||||
|
#include <QMetaMethod>
|
||||||
|
#include <QMetaObject>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QRect>
|
||||||
|
#include <QRectF>
|
||||||
|
#include <QSize>
|
||||||
|
#include <QString>
|
||||||
|
#include <QByteArray>
|
||||||
|
#include <cstring>
|
||||||
|
#include <QSvgRenderer>
|
||||||
|
#include <QTimerEvent>
|
||||||
|
#include <QTransform>
|
||||||
|
#include <QXmlStreamReader>
|
||||||
|
#include <qsvgrenderer.h>
|
||||||
|
#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<QMetaMethod*>(&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<QMetaMethod*>(&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<QObject*>(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<QObject*>(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<QObject*>(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSvgRenderer_new4(QXmlStreamReader* contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) {
|
||||||
|
MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents);
|
||||||
|
*outptr_QSvgRenderer = ret;
|
||||||
|
*outptr_QObject = static_cast<QObject*>(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSvgRenderer_new5(QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) {
|
||||||
|
MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(parent);
|
||||||
|
*outptr_QSvgRenderer = ret;
|
||||||
|
*outptr_QObject = static_cast<QObject*>(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<QObject*>(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<QObject*>(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<QObject*>(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<char*>(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<int>(_ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSvgRenderer_SetAspectRatioMode(QSvgRenderer* self, int mode) {
|
||||||
|
self->setAspectRatioMode(static_cast<Qt::AspectRatioMode>(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<int>(num));
|
||||||
|
}
|
||||||
|
|
||||||
|
int QSvgRenderer_CurrentFrame(const QSvgRenderer* self) {
|
||||||
|
return self->currentFrame();
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSvgRenderer_SetCurrentFrame(QSvgRenderer* self, int currentFrame) {
|
||||||
|
self->setCurrentFrame(static_cast<int>(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<void (QSvgRenderer::*)()>(&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<char*>(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<int>(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<char*>(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<MiqtVirtualQSvgRenderer*>( (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<MiqtVirtualQSvgRenderer*>( (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<MiqtVirtualQSvgRenderer*>( (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<MiqtVirtualQSvgRenderer*>( (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<MiqtVirtualQSvgRenderer*>( (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<MiqtVirtualQSvgRenderer*>( (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<MiqtVirtualQSvgRenderer*>( (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<MiqtVirtualQSvgRenderer*>( self );
|
||||||
|
} else {
|
||||||
|
delete self;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
533
qt6/svg/gen_qsvgrenderer.go
Normal file
533
qt6/svg/gen_qsvgrenderer.go
Normal file
@ -0,0 +1,533 @@
|
|||||||
|
package svg
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
#include "gen_qsvgrenderer.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
*/
|
||||||
|
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)
|
||||||
|
})
|
||||||
|
}
|
108
qt6/svg/gen_qsvgrenderer.h
Normal file
108
qt6/svg/gen_qsvgrenderer.h
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
#pragma once
|
||||||
|
#ifndef MIQT_QT6_SVG_GEN_QSVGRENDERER_H
|
||||||
|
#define MIQT_QT6_SVG_GEN_QSVGRENDERER_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#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
|
1456
qt6/svg/gen_qsvgwidget.cpp
Normal file
1456
qt6/svg/gen_qsvgwidget.cpp
Normal file
File diff suppressed because it is too large
Load Diff
1162
qt6/svg/gen_qsvgwidget.go
Normal file
1162
qt6/svg/gen_qsvgwidget.go
Normal file
File diff suppressed because it is too large
Load Diff
187
qt6/svg/gen_qsvgwidget.h
Normal file
187
qt6/svg/gen_qsvgwidget.h
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
#pragma once
|
||||||
|
#ifndef MIQT_QT6_SVG_GEN_QSVGWIDGET_H
|
||||||
|
#define MIQT_QT6_SVG_GEN_QSVGWIDGET_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#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
|
Loading…
Reference in New Issue
Block a user