mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58:37 +00:00
148 lines
4.7 KiB
C++
148 lines
4.7 KiB
C++
#include <QColor>
|
|
#include <QMetaObject>
|
|
#include <QPixmap>
|
|
#include <QScreen>
|
|
#include <QSplashScreen>
|
|
#include <QString>
|
|
#include <QByteArray>
|
|
#include <cstring>
|
|
#include <QWidget>
|
|
#include <qsplashscreen.h>
|
|
#include "gen_qsplashscreen.h"
|
|
#include "_cgo_export.h"
|
|
|
|
QSplashScreen* QSplashScreen_new() {
|
|
return new QSplashScreen();
|
|
}
|
|
|
|
QSplashScreen* QSplashScreen_new2(QScreen* screen) {
|
|
return new QSplashScreen(screen);
|
|
}
|
|
|
|
QSplashScreen* QSplashScreen_new3(QPixmap* pixmap) {
|
|
return new QSplashScreen(*pixmap);
|
|
}
|
|
|
|
QSplashScreen* QSplashScreen_new4(QPixmap* pixmap, int f) {
|
|
return new QSplashScreen(*pixmap, static_cast<Qt::WindowFlags>(f));
|
|
}
|
|
|
|
QSplashScreen* QSplashScreen_new5(QScreen* screen, QPixmap* pixmap) {
|
|
return new QSplashScreen(screen, *pixmap);
|
|
}
|
|
|
|
QSplashScreen* QSplashScreen_new6(QScreen* screen, QPixmap* pixmap, int f) {
|
|
return new QSplashScreen(screen, *pixmap, static_cast<Qt::WindowFlags>(f));
|
|
}
|
|
|
|
QMetaObject* QSplashScreen_MetaObject(const QSplashScreen* self) {
|
|
return (QMetaObject*) self->metaObject();
|
|
}
|
|
|
|
void* QSplashScreen_Metacast(QSplashScreen* self, const char* param1) {
|
|
return self->qt_metacast(param1);
|
|
}
|
|
|
|
struct miqt_string QSplashScreen_Tr(const char* s) {
|
|
QString _ret = QSplashScreen::tr(s);
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray _b = _ret.toUtf8();
|
|
struct miqt_string _ms;
|
|
_ms.len = _b.length();
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
return _ms;
|
|
}
|
|
|
|
void QSplashScreen_SetPixmap(QSplashScreen* self, QPixmap* pixmap) {
|
|
self->setPixmap(*pixmap);
|
|
}
|
|
|
|
QPixmap* QSplashScreen_Pixmap(const QSplashScreen* self) {
|
|
return new QPixmap(self->pixmap());
|
|
}
|
|
|
|
void QSplashScreen_Finish(QSplashScreen* self, QWidget* w) {
|
|
self->finish(w);
|
|
}
|
|
|
|
void QSplashScreen_Repaint(QSplashScreen* self) {
|
|
self->repaint();
|
|
}
|
|
|
|
struct miqt_string QSplashScreen_Message(const QSplashScreen* self) {
|
|
QString _ret = self->message();
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray _b = _ret.toUtf8();
|
|
struct miqt_string _ms;
|
|
_ms.len = _b.length();
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
return _ms;
|
|
}
|
|
|
|
void QSplashScreen_ShowMessage(QSplashScreen* self, struct miqt_string message) {
|
|
QString message_QString = QString::fromUtf8(message.data, message.len);
|
|
self->showMessage(message_QString);
|
|
}
|
|
|
|
void QSplashScreen_ClearMessage(QSplashScreen* self) {
|
|
self->clearMessage();
|
|
}
|
|
|
|
void QSplashScreen_MessageChanged(QSplashScreen* self, struct miqt_string message) {
|
|
QString message_QString = QString::fromUtf8(message.data, message.len);
|
|
self->messageChanged(message_QString);
|
|
}
|
|
|
|
void QSplashScreen_connect_MessageChanged(QSplashScreen* self, intptr_t slot) {
|
|
QSplashScreen::connect(self, static_cast<void (QSplashScreen::*)(const QString&)>(&QSplashScreen::messageChanged), self, [=](const QString& message) {
|
|
const QString message_ret = message;
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray message_b = message_ret.toUtf8();
|
|
struct miqt_string message_ms;
|
|
message_ms.len = message_b.length();
|
|
message_ms.data = static_cast<char*>(malloc(message_ms.len));
|
|
memcpy(message_ms.data, message_b.data(), message_ms.len);
|
|
struct miqt_string sigval1 = message_ms;
|
|
miqt_exec_callback_QSplashScreen_MessageChanged(slot, sigval1);
|
|
});
|
|
}
|
|
|
|
struct miqt_string QSplashScreen_Tr2(const char* s, const char* c) {
|
|
QString _ret = QSplashScreen::tr(s, c);
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray _b = _ret.toUtf8();
|
|
struct miqt_string _ms;
|
|
_ms.len = _b.length();
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
return _ms;
|
|
}
|
|
|
|
struct miqt_string QSplashScreen_Tr3(const char* s, const char* c, int n) {
|
|
QString _ret = QSplashScreen::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();
|
|
struct miqt_string _ms;
|
|
_ms.len = _b.length();
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
return _ms;
|
|
}
|
|
|
|
void QSplashScreen_ShowMessage2(QSplashScreen* self, struct miqt_string message, int alignment) {
|
|
QString message_QString = QString::fromUtf8(message.data, message.len);
|
|
self->showMessage(message_QString, static_cast<int>(alignment));
|
|
}
|
|
|
|
void QSplashScreen_ShowMessage3(QSplashScreen* self, struct miqt_string message, int alignment, QColor* color) {
|
|
QString message_QString = QString::fromUtf8(message.data, message.len);
|
|
self->showMessage(message_QString, static_cast<int>(alignment), *color);
|
|
}
|
|
|
|
void QSplashScreen_Delete(QSplashScreen* self) {
|
|
delete self;
|
|
}
|
|
|