#include #include #define WORKAROUND_INNER_CLASS_DEFINITION_QIconEngine__ScaledPixmapArgument #include #include #include #include #include #include #include #include #include #include "gen_qiconengine.h" #include "_cgo_export.h" void QIconEngine_Paint(QIconEngine* self, QPainter* painter, QRect* rect, int mode, int state) { self->paint(painter, *rect, static_cast(mode), static_cast(state)); } QSize* QIconEngine_ActualSize(QIconEngine* self, QSize* size, int mode, int state) { return new QSize(self->actualSize(*size, static_cast(mode), static_cast(state))); } QPixmap* QIconEngine_Pixmap(QIconEngine* self, QSize* size, int mode, int state) { return new QPixmap(self->pixmap(*size, static_cast(mode), static_cast(state))); } void QIconEngine_AddPixmap(QIconEngine* self, QPixmap* pixmap, int mode, int state) { self->addPixmap(*pixmap, static_cast(mode), static_cast(state)); } void QIconEngine_AddFile(QIconEngine* self, struct miqt_string fileName, QSize* size, int mode, int state) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); self->addFile(fileName_QString, *size, static_cast(mode), static_cast(state)); } struct miqt_string QIconEngine_Key(const QIconEngine* self) { QString _ret = self->key(); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } QIconEngine* QIconEngine_Clone(const QIconEngine* self) { return self->clone(); } bool QIconEngine_Read(QIconEngine* self, QDataStream* in) { return self->read(*in); } bool QIconEngine_Write(const QIconEngine* self, QDataStream* out) { return self->write(*out); } struct miqt_array /* of QSize* */ QIconEngine_AvailableSizes(QIconEngine* self, int mode, int state) { QList _ret = self->availableSizes(static_cast(mode), static_cast(state)); // Convert QList<> from C++ memory to manually-managed C memory QSize** _arr = static_cast(malloc(sizeof(QSize*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { _arr[i] = new QSize(_ret[i]); } struct miqt_array _out; _out.len = _ret.length(); _out.data = static_cast(_arr); return _out; } struct miqt_string QIconEngine_IconName(QIconEngine* self) { QString _ret = self->iconName(); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } bool QIconEngine_IsNull(QIconEngine* self) { return self->isNull(); } QPixmap* QIconEngine_ScaledPixmap(QIconEngine* self, QSize* size, int mode, int state, double scale) { return new QPixmap(self->scaledPixmap(*size, static_cast(mode), static_cast(state), static_cast(scale))); } void QIconEngine_VirtualHook(QIconEngine* self, int id, void* data) { self->virtual_hook(static_cast(id), data); } void QIconEngine_Delete(QIconEngine* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } } void QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1, QIconEngine__ScaledPixmapArgument** outptr_QIconEngine__ScaledPixmapArgument) { QIconEngine::ScaledPixmapArgument* ret = new QIconEngine::ScaledPixmapArgument(*param1); *outptr_QIconEngine__ScaledPixmapArgument = ret; } void QIconEngine__ScaledPixmapArgument_OperatorAssign(QIconEngine__ScaledPixmapArgument* self, QIconEngine__ScaledPixmapArgument* param1) { self->operator=(*param1); } void QIconEngine__ScaledPixmapArgument_Delete(QIconEngine__ScaledPixmapArgument* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } }