2024-08-25 04:08:24 +00:00
|
|
|
#include <QDesktopWidget>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QPoint>
|
|
|
|
#include <QRect>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QWidget>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qdesktopwidget.h"
|
|
|
|
#include "gen_qdesktopwidget.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QDesktopWidget* QDesktopWidget_new() {
|
|
|
|
return new QDesktopWidget();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QDesktopWidget_MetaObject(const QDesktopWidget* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDesktopWidget_Tr(const char* s) {
|
|
|
|
QString _ret = QDesktopWidget::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* QDesktopWidget_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QDesktopWidget::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-11 05:41:09 +00:00
|
|
|
int QDesktopWidget_ScreenNumber(const QDesktopWidget* self) {
|
|
|
|
return self->screenNumber();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QDesktopWidget_ScreenGeometry(const QDesktopWidget* self, QWidget* widget) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRect _ret = self->screenGeometry(widget);
|
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
|
|
|
QRect* QDesktopWidget_AvailableGeometry(const QDesktopWidget* self, QWidget* widget) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRect _ret = self->availableGeometry(widget);
|
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 QDesktopWidget_IsVirtualDesktop(const QDesktopWidget* self) {
|
|
|
|
return self->isVirtualDesktop();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDesktopWidget_NumScreens(const QDesktopWidget* self) {
|
|
|
|
return self->numScreens();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDesktopWidget_ScreenCount(const QDesktopWidget* self) {
|
|
|
|
return self->screenCount();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDesktopWidget_PrimaryScreen(const QDesktopWidget* self) {
|
|
|
|
return self->primaryScreen();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDesktopWidget_ScreenNumberWithQPoint(const QDesktopWidget* self, QPoint* param1) {
|
|
|
|
return self->screenNumber(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QWidget* QDesktopWidget_Screen(QDesktopWidget* self) {
|
|
|
|
return self->screen();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QDesktopWidget_ScreenGeometry2(const QDesktopWidget* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRect _ret = self->screenGeometry();
|
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
|
|
|
QRect* QDesktopWidget_ScreenGeometryWithPoint(const QDesktopWidget* self, QPoint* point) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRect _ret = self->screenGeometry(*point);
|
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
|
|
|
QRect* QDesktopWidget_AvailableGeometry2(const QDesktopWidget* 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-11 05:41:09 +00:00
|
|
|
QRect* QDesktopWidget_AvailableGeometryWithPoint(const QDesktopWidget* self, QPoint* point) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRect _ret = self->availableGeometry(*point);
|
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
|
|
|
}
|
|
|
|
|
|
|
|
void QDesktopWidget_Resized(QDesktopWidget* self, int param1) {
|
|
|
|
self->resized(static_cast<int>(param1));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDesktopWidget_connect_Resized(QDesktopWidget* self, void* slot) {
|
|
|
|
QDesktopWidget::connect(self, static_cast<void (QDesktopWidget::*)(int)>(&QDesktopWidget::resized), self, [=](int param1) {
|
2024-09-14 22:29:05 +00:00
|
|
|
int sigval1 = param1;
|
|
|
|
miqt_exec_callback_QDesktopWidget_Resized(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDesktopWidget_WorkAreaResized(QDesktopWidget* self, int param1) {
|
|
|
|
self->workAreaResized(static_cast<int>(param1));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDesktopWidget_connect_WorkAreaResized(QDesktopWidget* self, void* slot) {
|
|
|
|
QDesktopWidget::connect(self, static_cast<void (QDesktopWidget::*)(int)>(&QDesktopWidget::workAreaResized), self, [=](int param1) {
|
2024-09-14 22:29:05 +00:00
|
|
|
int sigval1 = param1;
|
|
|
|
miqt_exec_callback_QDesktopWidget_WorkAreaResized(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDesktopWidget_ScreenCountChanged(QDesktopWidget* self, int param1) {
|
|
|
|
self->screenCountChanged(static_cast<int>(param1));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDesktopWidget_connect_ScreenCountChanged(QDesktopWidget* self, void* slot) {
|
|
|
|
QDesktopWidget::connect(self, static_cast<void (QDesktopWidget::*)(int)>(&QDesktopWidget::screenCountChanged), self, [=](int param1) {
|
2024-09-14 22:29:05 +00:00
|
|
|
int sigval1 = param1;
|
|
|
|
miqt_exec_callback_QDesktopWidget_ScreenCountChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDesktopWidget_PrimaryScreenChanged(QDesktopWidget* self) {
|
|
|
|
self->primaryScreenChanged();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDesktopWidget_connect_PrimaryScreenChanged(QDesktopWidget* self, void* slot) {
|
|
|
|
QDesktopWidget::connect(self, static_cast<void (QDesktopWidget::*)()>(&QDesktopWidget::primaryScreenChanged), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QDesktopWidget_PrimaryScreenChanged(slot);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDesktopWidget_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QDesktopWidget::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* QDesktopWidget_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QDesktopWidget::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* QDesktopWidget_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QDesktopWidget::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* QDesktopWidget_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QDesktopWidget::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
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDesktopWidget_ScreenNumber1(const QDesktopWidget* self, QWidget* widget) {
|
|
|
|
return self->screenNumber(widget);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QWidget* QDesktopWidget_Screen1(QDesktopWidget* self, int screen) {
|
|
|
|
return self->screen(static_cast<int>(screen));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QDesktopWidget_ScreenGeometry1(const QDesktopWidget* self, int screen) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRect _ret = self->screenGeometry(static_cast<int>(screen));
|
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
|
|
|
QRect* QDesktopWidget_AvailableGeometry1(const QDesktopWidget* self, int screen) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRect _ret = self->availableGeometry(static_cast<int>(screen));
|
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
|
|
|
}
|
|
|
|
|
|
|
|
void QDesktopWidget_Delete(QDesktopWidget* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|