2024-08-25 04:08:24 +00:00
|
|
|
#include <QPageSize>
|
|
|
|
#include <QRect>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QRectF>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QSize>
|
|
|
|
#include <QSizeF>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qpagesize.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qpagesize.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPageSize* QPageSize_new() {
|
|
|
|
return new QPageSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPageSize* QPageSize_new2(int pageSizeId) {
|
|
|
|
return new QPageSize(static_cast<QPageSize::PageSizeId>(pageSizeId));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPageSize* QPageSize_new3(QSize* pointSize) {
|
|
|
|
return new QPageSize(*pointSize);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPageSize* QPageSize_new4(QSizeF* size, int units) {
|
|
|
|
return new QPageSize(*size, static_cast<QPageSize::Unit>(units));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPageSize* QPageSize_new5(QPageSize* other) {
|
|
|
|
return new QPageSize(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPageSize* QPageSize_new6(QSize* pointSize, struct miqt_string name) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString name_QString = QString::fromUtf8(name.data, name.len);
|
2024-12-07 04:15:57 +00:00
|
|
|
return new QPageSize(*pointSize, name_QString);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPageSize* QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString name_QString = QString::fromUtf8(name.data, name.len);
|
2024-12-07 04:15:57 +00:00
|
|
|
return new QPageSize(*pointSize, name_QString, static_cast<QPageSize::SizeMatchPolicy>(matchPolicy));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPageSize* QPageSize_new8(QSizeF* size, int units, struct miqt_string name) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString name_QString = QString::fromUtf8(name.data, name.len);
|
2024-12-07 04:15:57 +00:00
|
|
|
return new QPageSize(*size, static_cast<QPageSize::Unit>(units), name_QString);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPageSize* QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy) {
|
2024-10-18 23:53:33 +00:00
|
|
|
QString name_QString = QString::fromUtf8(name.data, name.len);
|
2024-12-07 04:15:57 +00:00
|
|
|
return new QPageSize(*size, static_cast<QPageSize::Unit>(units), name_QString, static_cast<QPageSize::SizeMatchPolicy>(matchPolicy));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QPageSize_OperatorAssign(QPageSize* self, QPageSize* other) {
|
|
|
|
self->operator=(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPageSize_Swap(QPageSize* self, QPageSize* other) {
|
|
|
|
self->swap(*other);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPageSize_IsEquivalentTo(const QPageSize* self, QPageSize* other) {
|
|
|
|
return self->isEquivalentTo(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPageSize_IsValid(const QPageSize* self) {
|
|
|
|
return self->isValid();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QPageSize_Key(const QPageSize* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->key();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
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;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QPageSize_Name(const QPageSize* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->name();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
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;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPageSize_Id(const QPageSize* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPageSize::PageSizeId _ret = self->id();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QPageSize_WindowsId(const QPageSize* self) {
|
|
|
|
return self->windowsId();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSizeF* QPageSize_DefinitionSize(const QPageSize* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSizeF(self->definitionSize());
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPageSize_DefinitionUnits(const QPageSize* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPageSize::Unit _ret = self->definitionUnits();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QSizeF* QPageSize_Size(const QPageSize* self, int units) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSizeF(self->size(static_cast<QPageSize::Unit>(units)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QPageSize_SizePoints(const QPageSize* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(self->sizePoints());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QPageSize_SizePixels(const QPageSize* self, int resolution) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(self->sizePixels(static_cast<int>(resolution)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QRectF* QPageSize_Rect(const QPageSize* self, int units) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRectF(self->rect(static_cast<QPageSize::Unit>(units)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QPageSize_RectPoints(const QPageSize* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRect(self->rectPoints());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QPageSize_RectPixels(const QPageSize* self, int resolution) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRect(self->rectPixels(static_cast<int>(resolution)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QPageSize_KeyWithPageSizeId(int pageSizeId) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QPageSize::key(static_cast<QPageSize::PageSizeId>(pageSizeId));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
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;
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QPageSize_NameWithPageSizeId(int pageSizeId) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = QPageSize::name(static_cast<QPageSize::PageSizeId>(pageSizeId));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-18 23:53:33 +00:00
|
|
|
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;
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPageSize_IdWithPointSize(QSize* pointSize) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPageSize::PageSizeId _ret = QPageSize::id(*pointSize);
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPageSize_Id2(QSizeF* size, int units) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPageSize::PageSizeId _ret = QPageSize::id(*size, static_cast<QPageSize::Unit>(units));
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPageSize_IdWithWindowsId(int windowsId) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPageSize::PageSizeId _ret = QPageSize::id(static_cast<int>(windowsId));
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPageSize_WindowsIdWithPageSizeId(int pageSizeId) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return QPageSize::windowsId(static_cast<QPageSize::PageSizeId>(pageSizeId));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QSizeF* QPageSize_DefinitionSizeWithPageSizeId(int pageSizeId) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSizeF(QPageSize::definitionSize(static_cast<QPageSize::PageSizeId>(pageSizeId)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPageSize_DefinitionUnitsWithPageSizeId(int pageSizeId) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPageSize::Unit _ret = QPageSize::definitionUnits(static_cast<QPageSize::PageSizeId>(pageSizeId));
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QSizeF* QPageSize_Size2(int pageSizeId, int units) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSizeF(QPageSize::size(static_cast<QPageSize::PageSizeId>(pageSizeId), static_cast<QPageSize::Unit>(units)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QSize* QPageSize_SizePointsWithPageSizeId(int pageSizeId) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(QPageSize::sizePoints(static_cast<QPageSize::PageSizeId>(pageSizeId)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QSize* QPageSize_SizePixels2(int pageSizeId, int resolution) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(QPageSize::sizePixels(static_cast<QPageSize::PageSizeId>(pageSizeId), static_cast<int>(resolution)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPageSize_Id22(QSize* pointSize, int matchPolicy) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPageSize::PageSizeId _ret = QPageSize::id(*pointSize, static_cast<QPageSize::SizeMatchPolicy>(matchPolicy));
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPageSize_Id3(QSizeF* size, int units, int matchPolicy) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPageSize::PageSizeId _ret = QPageSize::id(*size, static_cast<QPageSize::Unit>(units), static_cast<QPageSize::SizeMatchPolicy>(matchPolicy));
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPageSize_Delete(QPageSize* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<QPageSize*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|