2024-08-25 04:08:24 +00:00
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QPoint>
|
|
|
|
#include <QRect>
|
|
|
|
#include <QRubberBand>
|
|
|
|
#include <QSize>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
|
|
|
#include <QWidget>
|
|
|
|
#include "qrubberband.h"
|
|
|
|
#include "gen_qrubberband.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QRubberBand* QRubberBand_new(uintptr_t param1) {
|
|
|
|
return new QRubberBand(static_cast<QRubberBand::Shape>(param1));
|
|
|
|
}
|
|
|
|
|
|
|
|
QRubberBand* QRubberBand_new2(uintptr_t param1, QWidget* param2) {
|
|
|
|
return new QRubberBand(static_cast<QRubberBand::Shape>(param1), param2);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QRubberBand_MetaObject(const QRubberBand* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QRubberBand_Tr(const char* s) {
|
|
|
|
QString _ret = QRubberBand::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* QRubberBand_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QRubberBand::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
|
|
|
uintptr_t QRubberBand_Shape(const QRubberBand* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRubberBand::Shape _ret = self->shape();
|
|
|
|
return static_cast<uintptr_t>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QRubberBand_SetGeometry(QRubberBand* self, QRect* r) {
|
|
|
|
self->setGeometry(*r);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QRubberBand_SetGeometry2(QRubberBand* 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 QRubberBand_Move(QRubberBand* self, int x, int y) {
|
|
|
|
self->move(static_cast<int>(x), static_cast<int>(y));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QRubberBand_MoveWithQPoint(QRubberBand* self, QPoint* p) {
|
|
|
|
self->move(*p);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QRubberBand_Resize(QRubberBand* self, int w, int h) {
|
|
|
|
self->resize(static_cast<int>(w), static_cast<int>(h));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QRubberBand_ResizeWithQSize(QRubberBand* self, QSize* s) {
|
|
|
|
self->resize(*s);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QRubberBand_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QRubberBand::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* QRubberBand_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QRubberBand::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* QRubberBand_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QRubberBand::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* QRubberBand_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QRubberBand::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
|
|
|
}
|
|
|
|
|
|
|
|
void QRubberBand_Delete(QRubberBand* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|