#include #include #include #include #include #include #include #include #include #include "gen_qpagesize.h" #include "_cgo_export.h" void QPageSize_new(QPageSize** outptr_QPageSize) { QPageSize* ret = new QPageSize(); *outptr_QPageSize = ret; } void QPageSize_new2(int pageSizeId, QPageSize** outptr_QPageSize) { QPageSize* ret = new QPageSize(static_cast(pageSizeId)); *outptr_QPageSize = ret; } void QPageSize_new3(QSize* pointSize, QPageSize** outptr_QPageSize) { QPageSize* ret = new QPageSize(*pointSize); *outptr_QPageSize = ret; } void QPageSize_new4(QSizeF* size, int units, QPageSize** outptr_QPageSize) { QPageSize* ret = new QPageSize(*size, static_cast(units)); *outptr_QPageSize = ret; } void QPageSize_new5(QPageSize* other, QPageSize** outptr_QPageSize) { QPageSize* ret = new QPageSize(*other); *outptr_QPageSize = ret; } void QPageSize_new6(QSize* pointSize, struct miqt_string name, QPageSize** outptr_QPageSize) { QString name_QString = QString::fromUtf8(name.data, name.len); QPageSize* ret = new QPageSize(*pointSize, name_QString); *outptr_QPageSize = ret; } void QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize) { QString name_QString = QString::fromUtf8(name.data, name.len); QPageSize* ret = new QPageSize(*pointSize, name_QString, static_cast(matchPolicy)); *outptr_QPageSize = ret; } void QPageSize_new8(QSizeF* size, int units, struct miqt_string name, QPageSize** outptr_QPageSize) { QString name_QString = QString::fromUtf8(name.data, name.len); QPageSize* ret = new QPageSize(*size, static_cast(units), name_QString); *outptr_QPageSize = ret; } void QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize) { QString name_QString = QString::fromUtf8(name.data, name.len); QPageSize* ret = new QPageSize(*size, static_cast(units), name_QString, static_cast(matchPolicy)); *outptr_QPageSize = ret; } void QPageSize_OperatorAssign(QPageSize* self, QPageSize* other) { self->operator=(*other); } void QPageSize_Swap(QPageSize* self, QPageSize* other) { self->swap(*other); } bool QPageSize_IsEquivalentTo(const QPageSize* self, QPageSize* other) { return self->isEquivalentTo(*other); } bool QPageSize_IsValid(const QPageSize* self) { return self->isValid(); } struct miqt_string QPageSize_Key(const QPageSize* 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; } struct miqt_string QPageSize_Name(const QPageSize* self) { QString _ret = self->name(); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } int QPageSize_Id(const QPageSize* self) { QPageSize::PageSizeId _ret = self->id(); return static_cast(_ret); } int QPageSize_WindowsId(const QPageSize* self) { return self->windowsId(); } QSizeF* QPageSize_DefinitionSize(const QPageSize* self) { return new QSizeF(self->definitionSize()); } int QPageSize_DefinitionUnits(const QPageSize* self) { QPageSize::Unit _ret = self->definitionUnits(); return static_cast(_ret); } QSizeF* QPageSize_Size(const QPageSize* self, int units) { return new QSizeF(self->size(static_cast(units))); } QSize* QPageSize_SizePoints(const QPageSize* self) { return new QSize(self->sizePoints()); } QSize* QPageSize_SizePixels(const QPageSize* self, int resolution) { return new QSize(self->sizePixels(static_cast(resolution))); } QRectF* QPageSize_Rect(const QPageSize* self, int units) { return new QRectF(self->rect(static_cast(units))); } QRect* QPageSize_RectPoints(const QPageSize* self) { return new QRect(self->rectPoints()); } QRect* QPageSize_RectPixels(const QPageSize* self, int resolution) { return new QRect(self->rectPixels(static_cast(resolution))); } struct miqt_string QPageSize_KeyWithPageSizeId(int pageSizeId) { QString _ret = QPageSize::key(static_cast(pageSizeId)); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } struct miqt_string QPageSize_NameWithPageSizeId(int pageSizeId) { QString _ret = QPageSize::name(static_cast(pageSizeId)); // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory QByteArray _b = _ret.toUtf8(); struct miqt_string _ms; _ms.len = _b.length(); _ms.data = static_cast(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } int QPageSize_IdWithPointSize(QSize* pointSize) { QPageSize::PageSizeId _ret = QPageSize::id(*pointSize); return static_cast(_ret); } int QPageSize_Id2(QSizeF* size, int units) { QPageSize::PageSizeId _ret = QPageSize::id(*size, static_cast(units)); return static_cast(_ret); } int QPageSize_IdWithWindowsId(int windowsId) { QPageSize::PageSizeId _ret = QPageSize::id(static_cast(windowsId)); return static_cast(_ret); } int QPageSize_WindowsIdWithPageSizeId(int pageSizeId) { return QPageSize::windowsId(static_cast(pageSizeId)); } QSizeF* QPageSize_DefinitionSizeWithPageSizeId(int pageSizeId) { return new QSizeF(QPageSize::definitionSize(static_cast(pageSizeId))); } int QPageSize_DefinitionUnitsWithPageSizeId(int pageSizeId) { QPageSize::Unit _ret = QPageSize::definitionUnits(static_cast(pageSizeId)); return static_cast(_ret); } QSizeF* QPageSize_Size2(int pageSizeId, int units) { return new QSizeF(QPageSize::size(static_cast(pageSizeId), static_cast(units))); } QSize* QPageSize_SizePointsWithPageSizeId(int pageSizeId) { return new QSize(QPageSize::sizePoints(static_cast(pageSizeId))); } QSize* QPageSize_SizePixels2(int pageSizeId, int resolution) { return new QSize(QPageSize::sizePixels(static_cast(pageSizeId), static_cast(resolution))); } int QPageSize_Id22(QSize* pointSize, int matchPolicy) { QPageSize::PageSizeId _ret = QPageSize::id(*pointSize, static_cast(matchPolicy)); return static_cast(_ret); } int QPageSize_Id3(QSizeF* size, int units, int matchPolicy) { QPageSize::PageSizeId _ret = QPageSize::id(*size, static_cast(units), static_cast(matchPolicy)); return static_cast(_ret); } void QPageSize_Delete(QPageSize* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } }