2024-08-25 04:08:24 +00:00
|
|
|
#include <QAction>
|
|
|
|
#include <QBackingStore>
|
|
|
|
#include <QBitmap>
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <QCursor>
|
|
|
|
#include <QFont>
|
|
|
|
#include <QFontInfo>
|
|
|
|
#include <QFontMetrics>
|
|
|
|
#include <QGraphicsEffect>
|
|
|
|
#include <QGraphicsProxyWidget>
|
|
|
|
#include <QIcon>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QKeySequence>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QLayout>
|
|
|
|
#include <QList>
|
|
|
|
#include <QLocale>
|
|
|
|
#include <QMargins>
|
|
|
|
#include <QMetaObject>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QPaintDevice>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QPaintEngine>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QPainter>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QPalette>
|
|
|
|
#include <QPixmap>
|
|
|
|
#include <QPoint>
|
|
|
|
#include <QRect>
|
|
|
|
#include <QRegion>
|
|
|
|
#include <QScreen>
|
|
|
|
#include <QSize>
|
|
|
|
#include <QSizePolicy>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QStyle>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QVariant>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QWidget>
|
|
|
|
#include <QWidgetData>
|
|
|
|
#include <QWindow>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qwidget.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qwidget.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
extern void miqt_exec_callback(void* cb, int argc, void* argv);
|
|
|
|
}
|
|
|
|
|
|
|
|
QWidgetData* QWidgetData_new(QWidgetData* param1) {
|
|
|
|
return new QWidgetData(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidgetData_OperatorAssign(QWidgetData* self, QWidgetData* param1) {
|
|
|
|
self->operator=(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidgetData_Delete(QWidgetData* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QWidget* QWidget_new() {
|
|
|
|
return new QWidget();
|
|
|
|
}
|
|
|
|
|
|
|
|
QWidget* QWidget_new2(QWidget* parent) {
|
|
|
|
return new QWidget(parent);
|
|
|
|
}
|
|
|
|
|
|
|
|
QWidget* QWidget_new3(QWidget* parent, int f) {
|
|
|
|
return new QWidget(parent, static_cast<Qt::WindowFlags>(f));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QWidget_MetaObject(const QWidget* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QWidget_Tr(const char* s, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QWidget::tr(s);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QWidget_TrUtf8(const char* s, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QWidget::trUtf8(s);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QWidget_DevType(const QWidget* self) {
|
|
|
|
return self->devType();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QWidget_WinId(const QWidget* self) {
|
|
|
|
return self->winId();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_CreateWinId(QWidget* self) {
|
|
|
|
self->createWinId();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QWidget_InternalWinId(const QWidget* self) {
|
|
|
|
return self->internalWinId();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QWidget_EffectiveWinId(const QWidget* self) {
|
|
|
|
return self->effectiveWinId();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QStyle* QWidget_Style(const QWidget* self) {
|
|
|
|
return self->style();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetStyle(QWidget* self, QStyle* style) {
|
|
|
|
self->setStyle(style);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsTopLevel(const QWidget* self) {
|
|
|
|
return self->isTopLevel();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsWindow(const QWidget* self) {
|
|
|
|
return self->isWindow();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsModal(const QWidget* self) {
|
|
|
|
return self->isModal();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QWidget_WindowModality(const QWidget* self) {
|
|
|
|
Qt::WindowModality ret = self->windowModality();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetWindowModality(QWidget* self, uintptr_t windowModality) {
|
|
|
|
self->setWindowModality(static_cast<Qt::WindowModality>(windowModality));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsEnabled(const QWidget* self) {
|
|
|
|
return self->isEnabled();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsEnabledTo(const QWidget* self, QWidget* param1) {
|
|
|
|
return self->isEnabledTo(param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsEnabledToTLW(const QWidget* self) {
|
|
|
|
return self->isEnabledToTLW();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetEnabled(QWidget* self, bool enabled) {
|
|
|
|
self->setEnabled(enabled);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetDisabled(QWidget* self, bool disabled) {
|
|
|
|
self->setDisabled(disabled);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetWindowModified(QWidget* self, bool windowModified) {
|
|
|
|
self->setWindowModified(windowModified);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QWidget_FrameGeometry(const QWidget* self) {
|
|
|
|
QRect ret = self->frameGeometry();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QWidget_Geometry(const QWidget* self) {
|
|
|
|
const QRect& ret = self->geometry();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
|
|
|
return const_cast<QRect*>(&ret);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QWidget_NormalGeometry(const QWidget* self) {
|
|
|
|
QRect ret = self->normalGeometry();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QWidget_X(const QWidget* self) {
|
|
|
|
return self->x();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QWidget_Y(const QWidget* self) {
|
|
|
|
return self->y();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPoint* QWidget_Pos(const QWidget* self) {
|
|
|
|
QPoint ret = self->pos();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QPoint*>(new QPoint(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QWidget_FrameSize(const QWidget* self) {
|
|
|
|
QSize ret = self->frameSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QWidget_Size(const QWidget* self) {
|
|
|
|
QSize ret = self->size();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QWidget_Width(const QWidget* self) {
|
|
|
|
return self->width();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QWidget_Height(const QWidget* self) {
|
|
|
|
return self->height();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QWidget_Rect(const QWidget* self) {
|
|
|
|
QRect ret = self->rect();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QWidget_ChildrenRect(const QWidget* self) {
|
|
|
|
QRect ret = self->childrenRect();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRegion* QWidget_ChildrenRegion(const QWidget* self) {
|
|
|
|
QRegion ret = self->childrenRegion();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRegion*>(new QRegion(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QWidget_MinimumSize(const QWidget* self) {
|
|
|
|
QSize ret = self->minimumSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QWidget_MaximumSize(const QWidget* self) {
|
|
|
|
QSize ret = self->maximumSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QWidget_MinimumWidth(const QWidget* self) {
|
|
|
|
return self->minimumWidth();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QWidget_MinimumHeight(const QWidget* self) {
|
|
|
|
return self->minimumHeight();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QWidget_MaximumWidth(const QWidget* self) {
|
|
|
|
return self->maximumWidth();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QWidget_MaximumHeight(const QWidget* self) {
|
|
|
|
return self->maximumHeight();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetMinimumSize(QWidget* self, QSize* minimumSize) {
|
|
|
|
self->setMinimumSize(*minimumSize);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetMinimumSize2(QWidget* self, int minw, int minh) {
|
|
|
|
self->setMinimumSize(static_cast<int>(minw), static_cast<int>(minh));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetMaximumSize(QWidget* self, QSize* maximumSize) {
|
|
|
|
self->setMaximumSize(*maximumSize);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetMaximumSize2(QWidget* self, int maxw, int maxh) {
|
|
|
|
self->setMaximumSize(static_cast<int>(maxw), static_cast<int>(maxh));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetMinimumWidth(QWidget* self, int minw) {
|
|
|
|
self->setMinimumWidth(static_cast<int>(minw));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetMinimumHeight(QWidget* self, int minh) {
|
|
|
|
self->setMinimumHeight(static_cast<int>(minh));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetMaximumWidth(QWidget* self, int maxw) {
|
|
|
|
self->setMaximumWidth(static_cast<int>(maxw));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetMaximumHeight(QWidget* self, int maxh) {
|
|
|
|
self->setMaximumHeight(static_cast<int>(maxh));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QWidget_SizeIncrement(const QWidget* self) {
|
|
|
|
QSize ret = self->sizeIncrement();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetSizeIncrement(QWidget* self, QSize* sizeIncrement) {
|
|
|
|
self->setSizeIncrement(*sizeIncrement);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetSizeIncrement2(QWidget* self, int w, int h) {
|
|
|
|
self->setSizeIncrement(static_cast<int>(w), static_cast<int>(h));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QWidget_BaseSize(const QWidget* self) {
|
|
|
|
QSize ret = self->baseSize();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetBaseSize(QWidget* self, QSize* baseSize) {
|
|
|
|
self->setBaseSize(*baseSize);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetBaseSize2(QWidget* self, int basew, int baseh) {
|
|
|
|
self->setBaseSize(static_cast<int>(basew), static_cast<int>(baseh));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetFixedSize(QWidget* self, QSize* fixedSize) {
|
|
|
|
self->setFixedSize(*fixedSize);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetFixedSize2(QWidget* self, int w, int h) {
|
|
|
|
self->setFixedSize(static_cast<int>(w), static_cast<int>(h));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetFixedWidth(QWidget* self, int w) {
|
|
|
|
self->setFixedWidth(static_cast<int>(w));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetFixedHeight(QWidget* self, int h) {
|
|
|
|
self->setFixedHeight(static_cast<int>(h));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPoint* QWidget_MapToGlobal(const QWidget* self, QPoint* param1) {
|
|
|
|
QPoint ret = self->mapToGlobal(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QPoint*>(new QPoint(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPoint* QWidget_MapFromGlobal(const QWidget* self, QPoint* param1) {
|
|
|
|
QPoint ret = self->mapFromGlobal(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QPoint*>(new QPoint(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPoint* QWidget_MapToParent(const QWidget* self, QPoint* param1) {
|
|
|
|
QPoint ret = self->mapToParent(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QPoint*>(new QPoint(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPoint* QWidget_MapFromParent(const QWidget* self, QPoint* param1) {
|
|
|
|
QPoint ret = self->mapFromParent(*param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QPoint*>(new QPoint(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPoint* QWidget_MapTo(const QWidget* self, QWidget* param1, QPoint* param2) {
|
|
|
|
QPoint ret = self->mapTo(param1, *param2);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QPoint*>(new QPoint(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPoint* QWidget_MapFrom(const QWidget* self, QWidget* param1, QPoint* param2) {
|
|
|
|
QPoint ret = self->mapFrom(param1, *param2);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QPoint*>(new QPoint(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QWidget_Window(const QWidget* self) {
|
|
|
|
return self->window();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QWidget_NativeParentWidget(const QWidget* self) {
|
|
|
|
return self->nativeParentWidget();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QWidget_TopLevelWidget(const QWidget* self) {
|
|
|
|
return self->topLevelWidget();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPalette* QWidget_Palette(const QWidget* self) {
|
|
|
|
const QPalette& ret = self->palette();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
|
|
|
return const_cast<QPalette*>(&ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetPalette(QWidget* self, QPalette* palette) {
|
|
|
|
self->setPalette(*palette);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QWidget_SetBackgroundRole(QWidget* self, uintptr_t backgroundRole) {
|
|
|
|
self->setBackgroundRole(static_cast<QPalette::ColorRole>(backgroundRole));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QWidget_BackgroundRole(const QWidget* self) {
|
|
|
|
QPalette::ColorRole ret = self->backgroundRole();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetForegroundRole(QWidget* self, uintptr_t foregroundRole) {
|
|
|
|
self->setForegroundRole(static_cast<QPalette::ColorRole>(foregroundRole));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QWidget_ForegroundRole(const QWidget* self) {
|
|
|
|
QPalette::ColorRole ret = self->foregroundRole();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QFont* QWidget_Font(const QWidget* self) {
|
|
|
|
const QFont& ret = self->font();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
|
|
|
return const_cast<QFont*>(&ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetFont(QWidget* self, QFont* font) {
|
|
|
|
self->setFont(*font);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QFontMetrics* QWidget_FontMetrics(const QWidget* self) {
|
|
|
|
QFontMetrics ret = self->fontMetrics();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QFontMetrics*>(new QFontMetrics(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QFontInfo* QWidget_FontInfo(const QWidget* self) {
|
|
|
|
QFontInfo ret = self->fontInfo();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QFontInfo*>(new QFontInfo(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QCursor* QWidget_Cursor(const QWidget* self) {
|
|
|
|
QCursor ret = self->cursor();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QCursor*>(new QCursor(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetCursor(QWidget* self, QCursor* cursor) {
|
|
|
|
self->setCursor(*cursor);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_UnsetCursor(QWidget* self) {
|
|
|
|
self->unsetCursor();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetMouseTracking(QWidget* self, bool enable) {
|
|
|
|
self->setMouseTracking(enable);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_HasMouseTracking(const QWidget* self) {
|
|
|
|
return self->hasMouseTracking();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_UnderMouse(const QWidget* self) {
|
|
|
|
return self->underMouse();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetTabletTracking(QWidget* self, bool enable) {
|
|
|
|
self->setTabletTracking(enable);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_HasTabletTracking(const QWidget* self) {
|
|
|
|
return self->hasTabletTracking();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetMask(QWidget* self, QBitmap* mask) {
|
|
|
|
self->setMask(*mask);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetMaskWithMask(QWidget* self, QRegion* mask) {
|
|
|
|
self->setMask(*mask);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRegion* QWidget_Mask(const QWidget* self) {
|
|
|
|
QRegion ret = self->mask();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRegion*>(new QRegion(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_ClearMask(QWidget* self) {
|
|
|
|
self->clearMask();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QWidget_Render(QWidget* self, QPaintDevice* target) {
|
|
|
|
self->render(target);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_RenderWithPainter(QWidget* self, QPainter* painter) {
|
|
|
|
self->render(painter);
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
QPixmap* QWidget_Grab(QWidget* self) {
|
|
|
|
QPixmap ret = self->grab();
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QPixmap*>(new QPixmap(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QGraphicsEffect* QWidget_GraphicsEffect(const QWidget* self) {
|
|
|
|
return self->graphicsEffect();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetGraphicsEffect(QWidget* self, QGraphicsEffect* effect) {
|
|
|
|
self->setGraphicsEffect(effect);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QWidget_GrabGesture(QWidget* self, uintptr_t typeVal) {
|
|
|
|
self->grabGesture(static_cast<Qt::GestureType>(typeVal));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_UngrabGesture(QWidget* self, uintptr_t typeVal) {
|
|
|
|
self->ungrabGesture(static_cast<Qt::GestureType>(typeVal));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QWidget_SetWindowTitle(QWidget* self, const char* windowTitle, size_t windowTitle_Strlen) {
|
|
|
|
QString windowTitle_QString = QString::fromUtf8(windowTitle, windowTitle_Strlen);
|
|
|
|
self->setWindowTitle(windowTitle_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetStyleSheet(QWidget* self, const char* styleSheet, size_t styleSheet_Strlen) {
|
|
|
|
QString styleSheet_QString = QString::fromUtf8(styleSheet, styleSheet_Strlen);
|
|
|
|
self->setStyleSheet(styleSheet_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QWidget_StyleSheet(const QWidget* self, char** _out, int* _out_Strlen) {
|
|
|
|
QString ret = self->styleSheet();
|
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
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QWidget_WindowTitle(const QWidget* self, char** _out, int* _out_Strlen) {
|
|
|
|
QString ret = self->windowTitle();
|
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
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetWindowIcon(QWidget* self, QIcon* icon) {
|
|
|
|
self->setWindowIcon(*icon);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QIcon* QWidget_WindowIcon(const QWidget* self) {
|
|
|
|
QIcon ret = self->windowIcon();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QIcon*>(new QIcon(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetWindowIconText(QWidget* self, const char* windowIconText, size_t windowIconText_Strlen) {
|
|
|
|
QString windowIconText_QString = QString::fromUtf8(windowIconText, windowIconText_Strlen);
|
|
|
|
self->setWindowIconText(windowIconText_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QWidget_WindowIconText(const QWidget* self, char** _out, int* _out_Strlen) {
|
|
|
|
QString ret = self->windowIconText();
|
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
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetWindowRole(QWidget* self, const char* windowRole, size_t windowRole_Strlen) {
|
|
|
|
QString windowRole_QString = QString::fromUtf8(windowRole, windowRole_Strlen);
|
|
|
|
self->setWindowRole(windowRole_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QWidget_WindowRole(const QWidget* self, char** _out, int* _out_Strlen) {
|
|
|
|
QString ret = self->windowRole();
|
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
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetWindowFilePath(QWidget* self, const char* filePath, size_t filePath_Strlen) {
|
|
|
|
QString filePath_QString = QString::fromUtf8(filePath, filePath_Strlen);
|
|
|
|
self->setWindowFilePath(filePath_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QWidget_WindowFilePath(const QWidget* self, char** _out, int* _out_Strlen) {
|
|
|
|
QString ret = self->windowFilePath();
|
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
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetWindowOpacity(QWidget* self, double level) {
|
|
|
|
self->setWindowOpacity(static_cast<qreal>(level));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
double QWidget_WindowOpacity(const QWidget* self) {
|
|
|
|
return self->windowOpacity();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsWindowModified(const QWidget* self) {
|
|
|
|
return self->isWindowModified();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetToolTip(QWidget* self, const char* toolTip, size_t toolTip_Strlen) {
|
|
|
|
QString toolTip_QString = QString::fromUtf8(toolTip, toolTip_Strlen);
|
|
|
|
self->setToolTip(toolTip_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QWidget_ToolTip(const QWidget* self, char** _out, int* _out_Strlen) {
|
|
|
|
QString ret = self->toolTip();
|
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
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetToolTipDuration(QWidget* self, int msec) {
|
|
|
|
self->setToolTipDuration(static_cast<int>(msec));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QWidget_ToolTipDuration(const QWidget* self) {
|
|
|
|
return self->toolTipDuration();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetStatusTip(QWidget* self, const char* statusTip, size_t statusTip_Strlen) {
|
|
|
|
QString statusTip_QString = QString::fromUtf8(statusTip, statusTip_Strlen);
|
|
|
|
self->setStatusTip(statusTip_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QWidget_StatusTip(const QWidget* self, char** _out, int* _out_Strlen) {
|
|
|
|
QString ret = self->statusTip();
|
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
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetWhatsThis(QWidget* self, const char* whatsThis, size_t whatsThis_Strlen) {
|
|
|
|
QString whatsThis_QString = QString::fromUtf8(whatsThis, whatsThis_Strlen);
|
|
|
|
self->setWhatsThis(whatsThis_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QWidget_WhatsThis(const QWidget* self, char** _out, int* _out_Strlen) {
|
|
|
|
QString ret = self->whatsThis();
|
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
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QWidget_AccessibleName(const QWidget* self, char** _out, int* _out_Strlen) {
|
|
|
|
QString ret = self->accessibleName();
|
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
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetAccessibleName(QWidget* self, const char* name, size_t name_Strlen) {
|
|
|
|
QString name_QString = QString::fromUtf8(name, name_Strlen);
|
|
|
|
self->setAccessibleName(name_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QWidget_AccessibleDescription(const QWidget* self, char** _out, int* _out_Strlen) {
|
|
|
|
QString ret = self->accessibleDescription();
|
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
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetAccessibleDescription(QWidget* self, const char* description, size_t description_Strlen) {
|
|
|
|
QString description_QString = QString::fromUtf8(description, description_Strlen);
|
|
|
|
self->setAccessibleDescription(description_QString);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QWidget_SetLayoutDirection(QWidget* self, uintptr_t direction) {
|
|
|
|
self->setLayoutDirection(static_cast<Qt::LayoutDirection>(direction));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QWidget_LayoutDirection(const QWidget* self) {
|
|
|
|
Qt::LayoutDirection ret = self->layoutDirection();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QWidget_UnsetLayoutDirection(QWidget* self) {
|
|
|
|
self->unsetLayoutDirection();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetLocale(QWidget* self, QLocale* locale) {
|
|
|
|
self->setLocale(*locale);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QLocale* QWidget_Locale(const QWidget* self) {
|
|
|
|
QLocale ret = self->locale();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QLocale*>(new QLocale(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_UnsetLocale(QWidget* self) {
|
|
|
|
self->unsetLocale();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsRightToLeft(const QWidget* self) {
|
|
|
|
return self->isRightToLeft();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsLeftToRight(const QWidget* self) {
|
|
|
|
return self->isLeftToRight();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetFocus(QWidget* self) {
|
|
|
|
self->setFocus();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsActiveWindow(const QWidget* self) {
|
|
|
|
return self->isActiveWindow();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_ActivateWindow(QWidget* self) {
|
|
|
|
self->activateWindow();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_ClearFocus(QWidget* self) {
|
|
|
|
self->clearFocus();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QWidget_SetFocusWithReason(QWidget* self, uintptr_t reason) {
|
|
|
|
self->setFocus(static_cast<Qt::FocusReason>(reason));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QWidget_FocusPolicy(const QWidget* self) {
|
|
|
|
Qt::FocusPolicy ret = self->focusPolicy();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetFocusPolicy(QWidget* self, uintptr_t policy) {
|
|
|
|
self->setFocusPolicy(static_cast<Qt::FocusPolicy>(policy));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_HasFocus(const QWidget* self) {
|
|
|
|
return self->hasFocus();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetTabOrder(QWidget* param1, QWidget* param2) {
|
|
|
|
QWidget::setTabOrder(param1, param2);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetFocusProxy(QWidget* self, QWidget* focusProxy) {
|
|
|
|
self->setFocusProxy(focusProxy);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QWidget_FocusProxy(const QWidget* self) {
|
|
|
|
return self->focusProxy();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QWidget_ContextMenuPolicy(const QWidget* self) {
|
|
|
|
Qt::ContextMenuPolicy ret = self->contextMenuPolicy();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetContextMenuPolicy(QWidget* self, uintptr_t policy) {
|
|
|
|
self->setContextMenuPolicy(static_cast<Qt::ContextMenuPolicy>(policy));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_GrabMouse(QWidget* self) {
|
|
|
|
self->grabMouse();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_GrabMouseWithQCursor(QWidget* self, QCursor* param1) {
|
|
|
|
self->grabMouse(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_ReleaseMouse(QWidget* self) {
|
|
|
|
self->releaseMouse();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_GrabKeyboard(QWidget* self) {
|
|
|
|
self->grabKeyboard();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_ReleaseKeyboard(QWidget* self) {
|
|
|
|
self->releaseKeyboard();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
int QWidget_GrabShortcut(QWidget* self, QKeySequence* key) {
|
|
|
|
return self->grabShortcut(*key);
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QWidget_ReleaseShortcut(QWidget* self, int id) {
|
|
|
|
self->releaseShortcut(static_cast<int>(id));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetShortcutEnabled(QWidget* self, int id) {
|
|
|
|
self->setShortcutEnabled(static_cast<int>(id));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetShortcutAutoRepeat(QWidget* self, int id) {
|
|
|
|
self->setShortcutAutoRepeat(static_cast<int>(id));
|
|
|
|
}
|
|
|
|
|
|
|
|
QWidget* QWidget_MouseGrabber() {
|
|
|
|
return QWidget::mouseGrabber();
|
|
|
|
}
|
|
|
|
|
|
|
|
QWidget* QWidget_KeyboardGrabber() {
|
|
|
|
return QWidget::keyboardGrabber();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_UpdatesEnabled(const QWidget* self) {
|
|
|
|
return self->updatesEnabled();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetUpdatesEnabled(QWidget* self, bool enable) {
|
|
|
|
self->setUpdatesEnabled(enable);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QGraphicsProxyWidget* QWidget_GraphicsProxyWidget(const QWidget* self) {
|
|
|
|
return self->graphicsProxyWidget();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Update(QWidget* self) {
|
|
|
|
self->update();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Repaint(QWidget* self) {
|
|
|
|
self->repaint();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Update2(QWidget* self, int x, int y, int w, int h) {
|
|
|
|
self->update(static_cast<int>(x), static_cast<int>(y), static_cast<int>(w), static_cast<int>(h));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_UpdateWithQRect(QWidget* self, QRect* param1) {
|
|
|
|
self->update(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_UpdateWithQRegion(QWidget* self, QRegion* param1) {
|
|
|
|
self->update(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Repaint2(QWidget* self, int x, int y, int w, int h) {
|
|
|
|
self->repaint(static_cast<int>(x), static_cast<int>(y), static_cast<int>(w), static_cast<int>(h));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_RepaintWithQRect(QWidget* self, QRect* param1) {
|
|
|
|
self->repaint(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_RepaintWithQRegion(QWidget* self, QRegion* param1) {
|
|
|
|
self->repaint(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetVisible(QWidget* self, bool visible) {
|
|
|
|
self->setVisible(visible);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetHidden(QWidget* self, bool hidden) {
|
|
|
|
self->setHidden(hidden);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Show(QWidget* self) {
|
|
|
|
self->show();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Hide(QWidget* self) {
|
|
|
|
self->hide();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_ShowMinimized(QWidget* self) {
|
|
|
|
self->showMinimized();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_ShowMaximized(QWidget* self) {
|
|
|
|
self->showMaximized();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_ShowFullScreen(QWidget* self) {
|
|
|
|
self->showFullScreen();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_ShowNormal(QWidget* self) {
|
|
|
|
self->showNormal();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QWidget_Close(QWidget* self) {
|
|
|
|
return self->close();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Raise(QWidget* self) {
|
|
|
|
self->raise();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Lower(QWidget* self) {
|
|
|
|
self->lower();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_StackUnder(QWidget* self, QWidget* param1) {
|
|
|
|
self->stackUnder(param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Move(QWidget* self, int x, int y) {
|
|
|
|
self->move(static_cast<int>(x), static_cast<int>(y));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_MoveWithQPoint(QWidget* self, QPoint* param1) {
|
|
|
|
self->move(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Resize(QWidget* self, int w, int h) {
|
|
|
|
self->resize(static_cast<int>(w), static_cast<int>(h));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_ResizeWithQSize(QWidget* self, QSize* param1) {
|
|
|
|
self->resize(*param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetGeometry(QWidget* self, int x, int y, int w, int h) {
|
|
|
|
self->setGeometry(static_cast<int>(x), static_cast<int>(y), static_cast<int>(w), static_cast<int>(h));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetGeometryWithGeometry(QWidget* self, QRect* geometry) {
|
|
|
|
self->setGeometry(*geometry);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QByteArray* QWidget_SaveGeometry(const QWidget* self) {
|
|
|
|
QByteArray ret = self->saveGeometry();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QByteArray*>(new QByteArray(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QWidget_RestoreGeometry(QWidget* self, QByteArray* geometry) {
|
|
|
|
return self->restoreGeometry(*geometry);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_AdjustSize(QWidget* self) {
|
|
|
|
self->adjustSize();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsVisible(const QWidget* self) {
|
|
|
|
return self->isVisible();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsVisibleTo(const QWidget* self, QWidget* param1) {
|
|
|
|
return self->isVisibleTo(param1);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsHidden(const QWidget* self) {
|
|
|
|
return self->isHidden();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsMinimized(const QWidget* self) {
|
|
|
|
return self->isMinimized();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsMaximized(const QWidget* self) {
|
|
|
|
return self->isMaximized();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsFullScreen(const QWidget* self) {
|
|
|
|
return self->isFullScreen();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QWidget_WindowState(const QWidget* self) {
|
|
|
|
Qt::WindowStates ret = self->windowState();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<int>(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetWindowState(QWidget* self, int state) {
|
|
|
|
self->setWindowState(static_cast<Qt::WindowStates>(state));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_OverrideWindowState(QWidget* self, int state) {
|
|
|
|
self->overrideWindowState(static_cast<Qt::WindowStates>(state));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QWidget_SizeHint(const QWidget* self) {
|
|
|
|
QSize ret = self->sizeHint();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QWidget_MinimumSizeHint(const QWidget* self) {
|
|
|
|
QSize ret = self->minimumSizeHint();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSize*>(new QSize(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSizePolicy* QWidget_SizePolicy(const QWidget* self) {
|
|
|
|
QSizePolicy ret = self->sizePolicy();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QSizePolicy*>(new QSizePolicy(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetSizePolicy(QWidget* self, QSizePolicy* sizePolicy) {
|
|
|
|
self->setSizePolicy(*sizePolicy);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QWidget_SetSizePolicy2(QWidget* self, uintptr_t horizontal, uintptr_t vertical) {
|
|
|
|
self->setSizePolicy(static_cast<QSizePolicy::Policy>(horizontal), static_cast<QSizePolicy::Policy>(vertical));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QWidget_HeightForWidth(const QWidget* self, int param1) {
|
|
|
|
return self->heightForWidth(static_cast<int>(param1));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_HasHeightForWidth(const QWidget* self) {
|
|
|
|
return self->hasHeightForWidth();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRegion* QWidget_VisibleRegion(const QWidget* self) {
|
|
|
|
QRegion ret = self->visibleRegion();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRegion*>(new QRegion(ret));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetContentsMargins(QWidget* self, int left, int top, int right, int bottom) {
|
|
|
|
self->setContentsMargins(static_cast<int>(left), static_cast<int>(top), static_cast<int>(right), static_cast<int>(bottom));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetContentsMarginsWithMargins(QWidget* self, QMargins* margins) {
|
|
|
|
self->setContentsMargins(*margins);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QWidget_GetContentsMargins(const QWidget* self, int* left, int* top, int* right, int* bottom) {
|
|
|
|
self->getContentsMargins(static_cast<int*>(left), static_cast<int*>(top), static_cast<int*>(right), static_cast<int*>(bottom));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMargins* QWidget_ContentsMargins(const QWidget* self) {
|
|
|
|
QMargins ret = self->contentsMargins();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QMargins*>(new QMargins(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QWidget_ContentsRect(const QWidget* self) {
|
|
|
|
QRect ret = self->contentsRect();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QRect*>(new QRect(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QLayout* QWidget_Layout(const QWidget* self) {
|
|
|
|
return self->layout();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetLayout(QWidget* self, QLayout* layout) {
|
|
|
|
self->setLayout(layout);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_UpdateGeometry(QWidget* self) {
|
|
|
|
self->updateGeometry();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetParent(QWidget* self, QWidget* parent) {
|
|
|
|
self->setParent(parent);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QWidget_SetParent2(QWidget* self, QWidget* parent, int f) {
|
|
|
|
self->setParent(parent, static_cast<Qt::WindowFlags>(f));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QWidget_Scroll(QWidget* self, int dx, int dy) {
|
|
|
|
self->scroll(static_cast<int>(dx), static_cast<int>(dy));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Scroll2(QWidget* self, int dx, int dy, QRect* param3) {
|
|
|
|
self->scroll(static_cast<int>(dx), static_cast<int>(dy), *param3);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QWidget_FocusWidget(const QWidget* self) {
|
|
|
|
return self->focusWidget();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QWidget_NextInFocusChain(const QWidget* self) {
|
|
|
|
return self->nextInFocusChain();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QWidget_PreviousInFocusChain(const QWidget* self) {
|
|
|
|
return self->previousInFocusChain();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_AcceptDrops(const QWidget* self) {
|
|
|
|
return self->acceptDrops();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetAcceptDrops(QWidget* self, bool on) {
|
|
|
|
self->setAcceptDrops(on);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_AddAction(QWidget* self, QAction* action) {
|
|
|
|
self->addAction(action);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_AddActions(QWidget* self, QAction** actions, size_t actions_len) {
|
2024-08-29 07:01:51 +00:00
|
|
|
QList<QAction*> actions_QList;
|
2024-08-25 04:08:24 +00:00
|
|
|
actions_QList.reserve(actions_len);
|
|
|
|
for(size_t i = 0; i < actions_len; ++i) {
|
|
|
|
actions_QList.push_back(actions[i]);
|
|
|
|
}
|
|
|
|
self->addActions(actions_QList);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_InsertActions(QWidget* self, QAction* before, QAction** actions, size_t actions_len) {
|
2024-08-29 07:01:51 +00:00
|
|
|
QList<QAction*> actions_QList;
|
2024-08-25 04:08:24 +00:00
|
|
|
actions_QList.reserve(actions_len);
|
|
|
|
for(size_t i = 0; i < actions_len; ++i) {
|
|
|
|
actions_QList.push_back(actions[i]);
|
|
|
|
}
|
|
|
|
self->insertActions(before, actions_QList);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_InsertAction(QWidget* self, QAction* before, QAction* action) {
|
|
|
|
self->insertAction(before, action);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_RemoveAction(QWidget* self, QAction* action) {
|
|
|
|
self->removeAction(action);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QWidget_Actions(const QWidget* self, QAction*** _out, size_t* _out_len) {
|
|
|
|
QList<QAction*> ret = self->actions();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
|
|
|
QAction** __out = static_cast<QAction**>(malloc(sizeof(QAction*) * ret.length()));
|
|
|
|
for (size_t i = 0, e = ret.length(); i < e; ++i) {
|
|
|
|
__out[i] = ret[i];
|
|
|
|
}
|
|
|
|
*_out = __out;
|
|
|
|
*_out_len = ret.length();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QWidget_ParentWidget(const QWidget* self) {
|
|
|
|
return self->parentWidget();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetWindowFlags(QWidget* self, int typeVal) {
|
|
|
|
self->setWindowFlags(static_cast<Qt::WindowFlags>(typeVal));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QWidget_WindowFlags(const QWidget* self) {
|
|
|
|
Qt::WindowFlags ret = self->windowFlags();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<int>(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetWindowFlag(QWidget* self, uintptr_t param1) {
|
|
|
|
self->setWindowFlag(static_cast<Qt::WindowType>(param1));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_OverrideWindowFlags(QWidget* self, int typeVal) {
|
|
|
|
self->overrideWindowFlags(static_cast<Qt::WindowFlags>(typeVal));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QWidget_WindowType(const QWidget* self) {
|
|
|
|
Qt::WindowType ret = self->windowType();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<uintptr_t>(ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QWidget* QWidget_Find(uintptr_t param1) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return QWidget::find(static_cast<WId>(param1));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QWidget_ChildAt(const QWidget* self, int x, int y) {
|
|
|
|
return self->childAt(static_cast<int>(x), static_cast<int>(y));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QWidget_ChildAtWithQPoint(const QWidget* self, QPoint* p) {
|
|
|
|
return self->childAt(*p);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetAttribute(QWidget* self, uintptr_t param1) {
|
|
|
|
self->setAttribute(static_cast<Qt::WidgetAttribute>(param1));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_TestAttribute(const QWidget* self, uintptr_t param1) {
|
|
|
|
return self->testAttribute(static_cast<Qt::WidgetAttribute>(param1));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPaintEngine* QWidget_PaintEngine(const QWidget* self) {
|
|
|
|
return self->paintEngine();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QWidget_EnsurePolished(const QWidget* self) {
|
|
|
|
self->ensurePolished();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_IsAncestorOf(const QWidget* self, QWidget* child) {
|
|
|
|
return self->isAncestorOf(child);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QWidget_AutoFillBackground(const QWidget* self) {
|
|
|
|
return self->autoFillBackground();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetAutoFillBackground(QWidget* self, bool enabled) {
|
|
|
|
self->setAutoFillBackground(enabled);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QBackingStore* QWidget_BackingStore(const QWidget* self) {
|
|
|
|
return self->backingStore();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWindow* QWidget_WindowHandle(const QWidget* self) {
|
|
|
|
return self->windowHandle();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QScreen* QWidget_Screen(const QWidget* self) {
|
|
|
|
return self->screen();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QWidget* QWidget_CreateWindowContainer(QWindow* window) {
|
|
|
|
return QWidget::createWindowContainer(window);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_WindowTitleChanged(QWidget* self, const char* title, size_t title_Strlen) {
|
|
|
|
QString title_QString = QString::fromUtf8(title, title_Strlen);
|
|
|
|
self->windowTitleChanged(title_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_connect_WindowTitleChanged(QWidget* self, void* slot) {
|
|
|
|
QWidget::connect(self, static_cast<void (QWidget::*)(const QString&)>(&QWidget::windowTitleChanged), self, [=](const QString& title) {
|
|
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_WindowIconChanged(QWidget* self, QIcon* icon) {
|
|
|
|
self->windowIconChanged(*icon);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_connect_WindowIconChanged(QWidget* self, void* slot) {
|
|
|
|
QWidget::connect(self, static_cast<void (QWidget::*)(const QIcon&)>(&QWidget::windowIconChanged), self, [=](const QIcon& icon) {
|
|
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_WindowIconTextChanged(QWidget* self, const char* iconText, size_t iconText_Strlen) {
|
|
|
|
QString iconText_QString = QString::fromUtf8(iconText, iconText_Strlen);
|
|
|
|
self->windowIconTextChanged(iconText_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_connect_WindowIconTextChanged(QWidget* self, void* slot) {
|
|
|
|
QWidget::connect(self, static_cast<void (QWidget::*)(const QString&)>(&QWidget::windowIconTextChanged), self, [=](const QString& iconText) {
|
|
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_CustomContextMenuRequested(QWidget* self, QPoint* pos) {
|
|
|
|
self->customContextMenuRequested(*pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_connect_CustomContextMenuRequested(QWidget* self, void* slot) {
|
|
|
|
QWidget::connect(self, static_cast<void (QWidget::*)(const QPoint&)>(&QWidget::customContextMenuRequested), self, [=](const QPoint& pos) {
|
|
|
|
miqt_exec_callback(slot, 0, nullptr);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QVariant* QWidget_InputMethodQuery(const QWidget* self, uintptr_t param1) {
|
|
|
|
QVariant ret = self->inputMethodQuery(static_cast<Qt::InputMethodQuery>(param1));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QVariant*>(new QVariant(ret));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QWidget_InputMethodHints(const QWidget* self) {
|
|
|
|
Qt::InputMethodHints ret = self->inputMethodHints();
|
2024-08-29 07:01:51 +00:00
|
|
|
return static_cast<int>(ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetInputMethodHints(QWidget* self, int hints) {
|
|
|
|
self->setInputMethodHints(static_cast<Qt::InputMethodHints>(hints));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Tr2(const char* s, const char* c, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QWidget::tr(s, c);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QWidget_Tr3(const char* s, const char* c, int n, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QWidget::tr(s, c, static_cast<int>(n));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QWidget_TrUtf82(const char* s, const char* c, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QWidget::trUtf8(s, c);
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QWidget_TrUtf83(const char* s, const char* c, int n, char** _out, int* _out_Strlen) {
|
2024-08-25 04:08:24 +00:00
|
|
|
QString ret = QWidget::trUtf8(s, c, static_cast<int>(n));
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray b = ret.toUtf8();
|
|
|
|
*_out = static_cast<char*>(malloc(b.length()));
|
|
|
|
memcpy(*_out, b.data(), b.length());
|
|
|
|
*_out_Strlen = b.length();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QWidget_Render2(QWidget* self, QPaintDevice* target, QPoint* targetOffset) {
|
|
|
|
self->render(target, *targetOffset);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Render3(QWidget* self, QPaintDevice* target, QPoint* targetOffset, QRegion* sourceRegion) {
|
|
|
|
self->render(target, *targetOffset, *sourceRegion);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Render4(QWidget* self, QPaintDevice* target, QPoint* targetOffset, QRegion* sourceRegion, int renderFlags) {
|
|
|
|
self->render(target, *targetOffset, *sourceRegion, static_cast<QWidget::RenderFlags>(renderFlags));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Render22(QWidget* self, QPainter* painter, QPoint* targetOffset) {
|
|
|
|
self->render(painter, *targetOffset);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Render32(QWidget* self, QPainter* painter, QPoint* targetOffset, QRegion* sourceRegion) {
|
|
|
|
self->render(painter, *targetOffset, *sourceRegion);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_Render42(QWidget* self, QPainter* painter, QPoint* targetOffset, QRegion* sourceRegion, int renderFlags) {
|
|
|
|
self->render(painter, *targetOffset, *sourceRegion, static_cast<QWidget::RenderFlags>(renderFlags));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
QPixmap* QWidget_Grab1(QWidget* self, QRect* rectangle) {
|
|
|
|
QPixmap ret = self->grab(*rectangle);
|
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
|
|
return static_cast<QPixmap*>(new QPixmap(ret));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QWidget_GrabGesture2(QWidget* self, uintptr_t typeVal, int flags) {
|
|
|
|
self->grabGesture(static_cast<Qt::GestureType>(typeVal), static_cast<Qt::GestureFlags>(flags));
|
|
|
|
}
|
|
|
|
|
|
|
|
int QWidget_GrabShortcut2(QWidget* self, QKeySequence* key, uintptr_t context) {
|
|
|
|
return self->grabShortcut(*key, static_cast<Qt::ShortcutContext>(context));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QWidget_SetShortcutEnabled2(QWidget* self, int id, bool enable) {
|
|
|
|
self->setShortcutEnabled(static_cast<int>(id), enable);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetShortcutAutoRepeat2(QWidget* self, int id, bool enable) {
|
|
|
|
self->setShortcutAutoRepeat(static_cast<int>(id), enable);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QWidget_SetWindowFlag2(QWidget* self, uintptr_t param1, bool on) {
|
|
|
|
self->setWindowFlag(static_cast<Qt::WindowType>(param1), on);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QWidget_SetAttribute2(QWidget* self, uintptr_t param1, bool on) {
|
|
|
|
self->setAttribute(static_cast<Qt::WidgetAttribute>(param1), on);
|
|
|
|
}
|
|
|
|
|
|
|
|
QWidget* QWidget_CreateWindowContainer2(QWindow* window, QWidget* parent) {
|
|
|
|
return QWidget::createWindowContainer(window, parent);
|
|
|
|
}
|
|
|
|
|
|
|
|
QWidget* QWidget_CreateWindowContainer3(QWindow* window, QWidget* parent, int flags) {
|
|
|
|
return QWidget::createWindowContainer(window, parent, static_cast<Qt::WindowFlags>(flags));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QWidget_Delete(QWidget* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|