#include #include #define WORKAROUND_INNER_CLASS_DEFINITION_QIconEngine__AvailableSizesArgument #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 QIconEngine_AvailableSizes(const QIconEngine* self) { QList _ret = self->availableSizes(); // 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(const 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(const 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); } struct miqt_array QIconEngine_AvailableSizes1(const QIconEngine* self, int mode) { QList _ret = self->availableSizes(static_cast(mode)); // 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_array QIconEngine_AvailableSizes2(const 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; } void QIconEngine_Delete(QIconEngine* self) { delete self; } QIconEngine__AvailableSizesArgument* QIconEngine__AvailableSizesArgument_new(QIconEngine__AvailableSizesArgument* param1) { return new QIconEngine::AvailableSizesArgument(*param1); } void QIconEngine__AvailableSizesArgument_OperatorAssign(QIconEngine__AvailableSizesArgument* self, QIconEngine__AvailableSizesArgument* param1) { self->operator=(*param1); } void QIconEngine__AvailableSizesArgument_Delete(QIconEngine__AvailableSizesArgument* self) { delete self; } QIconEngine__ScaledPixmapArgument* QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1) { return new QIconEngine::ScaledPixmapArgument(*param1); } void QIconEngine__ScaledPixmapArgument_OperatorAssign(QIconEngine__ScaledPixmapArgument* self, QIconEngine__ScaledPixmapArgument* param1) { self->operator=(*param1); } void QIconEngine__ScaledPixmapArgument_Delete(QIconEngine__ScaledPixmapArgument* self) { delete self; }