2024-08-25 04:08:24 +00:00
|
|
|
#include <QList>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QPixmap>
|
|
|
|
#include <QPoint>
|
|
|
|
#include <QRect>
|
|
|
|
#include <QScreen>
|
|
|
|
#include <QSize>
|
|
|
|
#include <QSizeF>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
|
|
|
#include <QTransform>
|
|
|
|
#include "qscreen.h"
|
|
|
|
#include "gen_qscreen.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QScreen_MetaObject(const QScreen* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QScreen_Tr(const char* s) {
|
|
|
|
QString _ret = QScreen::tr(s);
|
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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QScreen_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QScreen::trUtf8(s);
|
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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QScreen_Name(const QScreen* self) {
|
|
|
|
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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QScreen_Manufacturer(const QScreen* self) {
|
|
|
|
QString _ret = self->manufacturer();
|
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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QScreen_Model(const QScreen* self) {
|
|
|
|
QString _ret = self->model();
|
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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QScreen_SerialNumber(const QScreen* self) {
|
|
|
|
QString _ret = self->serialNumber();
|
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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QScreen_Depth(const QScreen* self) {
|
|
|
|
return self->depth();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QScreen_Size(const QScreen* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QSize _ret = self->size();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QSize*>(new QSize(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QScreen_Geometry(const QScreen* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRect _ret = self->geometry();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QRect*>(new QRect(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSizeF* QScreen_PhysicalSize(const QScreen* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QSizeF _ret = self->physicalSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QSizeF*>(new QSizeF(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QScreen_PhysicalDotsPerInchX(const QScreen* self) {
|
|
|
|
return self->physicalDotsPerInchX();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QScreen_PhysicalDotsPerInchY(const QScreen* self) {
|
|
|
|
return self->physicalDotsPerInchY();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QScreen_PhysicalDotsPerInch(const QScreen* self) {
|
|
|
|
return self->physicalDotsPerInch();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QScreen_LogicalDotsPerInchX(const QScreen* self) {
|
|
|
|
return self->logicalDotsPerInchX();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QScreen_LogicalDotsPerInchY(const QScreen* self) {
|
|
|
|
return self->logicalDotsPerInchY();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QScreen_LogicalDotsPerInch(const QScreen* self) {
|
|
|
|
return self->logicalDotsPerInch();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QScreen_DevicePixelRatio(const QScreen* self) {
|
|
|
|
return self->devicePixelRatio();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QScreen_AvailableSize(const QScreen* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QSize _ret = self->availableSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QSize*>(new QSize(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QScreen_AvailableGeometry(const QScreen* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRect _ret = self->availableGeometry();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QRect*>(new QRect(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* QScreen_VirtualSiblings(const QScreen* self) {
|
|
|
|
QList<QScreen*> _ret = self->virtualSiblings();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QScreen** _arr = static_cast<QScreen**>(malloc(sizeof(QScreen*) * _ret.length()));
|
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
_arr[i] = _ret[i];
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
|
|
|
_out->len = _ret.length();
|
|
|
|
_out->data = static_cast<void*>(_arr);
|
|
|
|
return _out;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QScreen* QScreen_VirtualSiblingAt(QScreen* self, QPoint* point) {
|
|
|
|
return self->virtualSiblingAt(*point);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QScreen_VirtualSize(const QScreen* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QSize _ret = self->virtualSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QSize*>(new QSize(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QScreen_VirtualGeometry(const QScreen* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRect _ret = self->virtualGeometry();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QRect*>(new QRect(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QScreen_AvailableVirtualSize(const QScreen* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QSize _ret = self->availableVirtualSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QSize*>(new QSize(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QScreen_AvailableVirtualGeometry(const QScreen* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRect _ret = self->availableVirtualGeometry();
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QRect*>(new QRect(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QScreen_PrimaryOrientation(const QScreen* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::ScreenOrientation _ret = self->primaryOrientation();
|
|
|
|
return static_cast<uintptr_t>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QScreen_Orientation(const QScreen* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::ScreenOrientation _ret = self->orientation();
|
|
|
|
return static_cast<uintptr_t>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QScreen_NativeOrientation(const QScreen* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::ScreenOrientation _ret = self->nativeOrientation();
|
|
|
|
return static_cast<uintptr_t>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QScreen_OrientationUpdateMask(const QScreen* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::ScreenOrientations _ret = self->orientationUpdateMask();
|
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_SetOrientationUpdateMask(QScreen* self, int mask) {
|
|
|
|
self->setOrientationUpdateMask(static_cast<Qt::ScreenOrientations>(mask));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QScreen_AngleBetween(const QScreen* self, uintptr_t a, uintptr_t b) {
|
|
|
|
return self->angleBetween(static_cast<Qt::ScreenOrientation>(a), static_cast<Qt::ScreenOrientation>(b));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QTransform* QScreen_TransformBetween(const QScreen* self, uintptr_t a, uintptr_t b, QRect* target) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTransform _ret = self->transformBetween(static_cast<Qt::ScreenOrientation>(a), static_cast<Qt::ScreenOrientation>(b), *target);
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QTransform*>(new QTransform(_ret));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QScreen_MapBetween(const QScreen* self, uintptr_t a, uintptr_t b, QRect* rect) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRect _ret = self->mapBetween(static_cast<Qt::ScreenOrientation>(a), static_cast<Qt::ScreenOrientation>(b), *rect);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QRect*>(new QRect(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QScreen_IsPortrait(const QScreen* self, uintptr_t orientation) {
|
|
|
|
return self->isPortrait(static_cast<Qt::ScreenOrientation>(orientation));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QScreen_IsLandscape(const QScreen* self, uintptr_t orientation) {
|
|
|
|
return self->isLandscape(static_cast<Qt::ScreenOrientation>(orientation));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
QPixmap* QScreen_GrabWindow(QScreen* self, uintptr_t window) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPixmap _ret = self->grabWindow(static_cast<quintptr>(window));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QPixmap*>(new QPixmap(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QScreen_RefreshRate(const QScreen* self) {
|
|
|
|
return self->refreshRate();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_GeometryChanged(QScreen* self, QRect* geometry) {
|
|
|
|
self->geometryChanged(*geometry);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_connect_GeometryChanged(QScreen* self, void* slot) {
|
|
|
|
QScreen::connect(self, static_cast<void (QScreen::*)(const QRect&)>(&QScreen::geometryChanged), self, [=](const QRect& geometry) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QRect& geometry_ret = geometry;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QRect* sigval1 = const_cast<QRect*>(&geometry_ret);
|
|
|
|
miqt_exec_callback_QScreen_GeometryChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_AvailableGeometryChanged(QScreen* self, QRect* geometry) {
|
|
|
|
self->availableGeometryChanged(*geometry);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_connect_AvailableGeometryChanged(QScreen* self, void* slot) {
|
|
|
|
QScreen::connect(self, static_cast<void (QScreen::*)(const QRect&)>(&QScreen::availableGeometryChanged), self, [=](const QRect& geometry) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QRect& geometry_ret = geometry;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QRect* sigval1 = const_cast<QRect*>(&geometry_ret);
|
|
|
|
miqt_exec_callback_QScreen_AvailableGeometryChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_PhysicalSizeChanged(QScreen* self, QSizeF* size) {
|
|
|
|
self->physicalSizeChanged(*size);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_connect_PhysicalSizeChanged(QScreen* self, void* slot) {
|
|
|
|
QScreen::connect(self, static_cast<void (QScreen::*)(const QSizeF&)>(&QScreen::physicalSizeChanged), self, [=](const QSizeF& size) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QSizeF& size_ret = size;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QSizeF* sigval1 = const_cast<QSizeF*>(&size_ret);
|
|
|
|
miqt_exec_callback_QScreen_PhysicalSizeChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_PhysicalDotsPerInchChanged(QScreen* self, double dpi) {
|
|
|
|
self->physicalDotsPerInchChanged(static_cast<qreal>(dpi));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_connect_PhysicalDotsPerInchChanged(QScreen* self, void* slot) {
|
|
|
|
QScreen::connect(self, static_cast<void (QScreen::*)(qreal)>(&QScreen::physicalDotsPerInchChanged), self, [=](qreal dpi) {
|
2024-09-14 22:29:05 +00:00
|
|
|
double sigval1 = dpi;
|
|
|
|
miqt_exec_callback_QScreen_PhysicalDotsPerInchChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_LogicalDotsPerInchChanged(QScreen* self, double dpi) {
|
|
|
|
self->logicalDotsPerInchChanged(static_cast<qreal>(dpi));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_connect_LogicalDotsPerInchChanged(QScreen* self, void* slot) {
|
|
|
|
QScreen::connect(self, static_cast<void (QScreen::*)(qreal)>(&QScreen::logicalDotsPerInchChanged), self, [=](qreal dpi) {
|
2024-09-14 22:29:05 +00:00
|
|
|
double sigval1 = dpi;
|
|
|
|
miqt_exec_callback_QScreen_LogicalDotsPerInchChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_VirtualGeometryChanged(QScreen* self, QRect* rect) {
|
|
|
|
self->virtualGeometryChanged(*rect);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_connect_VirtualGeometryChanged(QScreen* self, void* slot) {
|
|
|
|
QScreen::connect(self, static_cast<void (QScreen::*)(const QRect&)>(&QScreen::virtualGeometryChanged), self, [=](const QRect& rect) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QRect& rect_ret = rect;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QRect* sigval1 = const_cast<QRect*>(&rect_ret);
|
|
|
|
miqt_exec_callback_QScreen_VirtualGeometryChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QScreen_PrimaryOrientationChanged(QScreen* self, uintptr_t orientation) {
|
|
|
|
self->primaryOrientationChanged(static_cast<Qt::ScreenOrientation>(orientation));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_connect_PrimaryOrientationChanged(QScreen* self, void* slot) {
|
|
|
|
QScreen::connect(self, static_cast<void (QScreen::*)(Qt::ScreenOrientation)>(&QScreen::primaryOrientationChanged), self, [=](Qt::ScreenOrientation orientation) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::ScreenOrientation orientation_ret = orientation;
|
|
|
|
uintptr_t sigval1 = static_cast<uintptr_t>(orientation_ret);
|
|
|
|
miqt_exec_callback_QScreen_PrimaryOrientationChanged(slot, sigval1);
|
2024-08-29 07:01:51 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_OrientationChanged(QScreen* self, uintptr_t orientation) {
|
|
|
|
self->orientationChanged(static_cast<Qt::ScreenOrientation>(orientation));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_connect_OrientationChanged(QScreen* self, void* slot) {
|
|
|
|
QScreen::connect(self, static_cast<void (QScreen::*)(Qt::ScreenOrientation)>(&QScreen::orientationChanged), self, [=](Qt::ScreenOrientation orientation) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::ScreenOrientation orientation_ret = orientation;
|
|
|
|
uintptr_t sigval1 = static_cast<uintptr_t>(orientation_ret);
|
|
|
|
miqt_exec_callback_QScreen_OrientationChanged(slot, sigval1);
|
2024-08-29 07:01:51 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QScreen_RefreshRateChanged(QScreen* self, double refreshRate) {
|
|
|
|
self->refreshRateChanged(static_cast<qreal>(refreshRate));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_connect_RefreshRateChanged(QScreen* self, void* slot) {
|
|
|
|
QScreen::connect(self, static_cast<void (QScreen::*)(qreal)>(&QScreen::refreshRateChanged), self, [=](qreal refreshRate) {
|
2024-09-14 22:29:05 +00:00
|
|
|
double sigval1 = refreshRate;
|
|
|
|
miqt_exec_callback_QScreen_RefreshRateChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QScreen_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QScreen::tr(s, c);
|
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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QScreen_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QScreen::tr(s, c, static_cast<int>(n));
|
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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QScreen_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QScreen::trUtf8(s, c);
|
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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QScreen_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QScreen::trUtf8(s, c, static_cast<int>(n));
|
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();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QScreen_GrabWindow2(QScreen* self, uintptr_t window, int x) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPixmap _ret = self->grabWindow(static_cast<quintptr>(window), static_cast<int>(x));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QPixmap*>(new QPixmap(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QScreen_GrabWindow3(QScreen* self, uintptr_t window, int x, int y) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPixmap _ret = self->grabWindow(static_cast<quintptr>(window), static_cast<int>(x), static_cast<int>(y));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QPixmap*>(new QPixmap(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QScreen_GrabWindow4(QScreen* self, uintptr_t window, int x, int y, int w) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPixmap _ret = self->grabWindow(static_cast<quintptr>(window), static_cast<int>(x), static_cast<int>(y), static_cast<int>(w));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QPixmap*>(new QPixmap(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QPixmap* QScreen_GrabWindow5(QScreen* self, uintptr_t window, int x, int y, int w, int h) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPixmap _ret = self->grabWindow(static_cast<quintptr>(window), static_cast<int>(x), static_cast<int>(y), static_cast<int>(w), static_cast<int>(h));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QPixmap*>(new QPixmap(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QScreen_Delete(QScreen* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|