miqt/qt6/webengine/gen_qwebenginenavigationrequest.cpp

100 lines
3.2 KiB
C++
Raw Normal View History

2024-11-27 18:16:48 +13:00
#include <QMetaObject>
#include <QObject>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <QWebEngineNavigationRequest>
#include <qwebenginenavigationrequest.h>
#include "gen_qwebenginenavigationrequest.h"
#ifdef __cplusplus
extern "C" {
#endif
2025-02-01 13:45:16 +13:00
void miqt_exec_callback_QWebEngineNavigationRequest_actionChanged(intptr_t);
#ifdef __cplusplus
} /* extern C */
#endif
2024-11-27 18:16:48 +13:00
2024-12-07 17:15:57 +13:00
void QWebEngineNavigationRequest_virtbase(QWebEngineNavigationRequest* src, QObject** outptr_QObject) {
*outptr_QObject = static_cast<QObject*>(src);
}
2025-02-01 13:45:16 +13:00
QMetaObject* QWebEngineNavigationRequest_metaObject(const QWebEngineNavigationRequest* self) {
2024-11-27 18:16:48 +13:00
return (QMetaObject*) self->metaObject();
}
2025-02-01 13:45:16 +13:00
void* QWebEngineNavigationRequest_metacast(QWebEngineNavigationRequest* self, const char* param1) {
2024-11-27 18:16:48 +13:00
return self->qt_metacast(param1);
}
2025-02-01 13:45:16 +13:00
struct miqt_string QWebEngineNavigationRequest_tr(const char* s) {
2024-11-27 18:16:48 +13:00
QString _ret = QWebEngineNavigationRequest::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;
}
2025-02-01 13:45:16 +13:00
QUrl* QWebEngineNavigationRequest_url(const QWebEngineNavigationRequest* self) {
2024-11-27 18:16:48 +13:00
return new QUrl(self->url());
}
2025-02-01 13:45:16 +13:00
bool QWebEngineNavigationRequest_isMainFrame(const QWebEngineNavigationRequest* self) {
2024-11-27 18:16:48 +13:00
return self->isMainFrame();
}
2025-02-01 13:45:16 +13:00
int QWebEngineNavigationRequest_navigationType(const QWebEngineNavigationRequest* self) {
2024-11-27 18:16:48 +13:00
QWebEngineNavigationRequest::NavigationType _ret = self->navigationType();
return static_cast<int>(_ret);
}
2025-02-01 13:45:16 +13:00
void QWebEngineNavigationRequest_accept(QWebEngineNavigationRequest* self) {
2024-11-27 18:16:48 +13:00
self->accept();
}
2025-02-01 13:45:16 +13:00
void QWebEngineNavigationRequest_reject(QWebEngineNavigationRequest* self) {
2024-11-27 18:16:48 +13:00
self->reject();
}
2025-02-01 13:45:16 +13:00
void QWebEngineNavigationRequest_actionChanged(QWebEngineNavigationRequest* self) {
2024-11-27 18:16:48 +13:00
self->actionChanged();
}
2025-02-01 13:45:16 +13:00
void QWebEngineNavigationRequest_connect_actionChanged(QWebEngineNavigationRequest* self, intptr_t slot) {
2024-11-27 18:16:48 +13:00
QWebEngineNavigationRequest::connect(self, static_cast<void (QWebEngineNavigationRequest::*)()>(&QWebEngineNavigationRequest::actionChanged), self, [=]() {
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QWebEngineNavigationRequest_actionChanged(slot);
2024-11-27 18:16:48 +13:00
});
}
2025-02-01 13:45:16 +13:00
struct miqt_string QWebEngineNavigationRequest_tr2(const char* s, const char* c) {
2024-11-27 18:16:48 +13:00
QString _ret = QWebEngineNavigationRequest::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;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QWebEngineNavigationRequest_tr3(const char* s, const char* c, int n) {
2024-11-27 18:16:48 +13:00
QString _ret = QWebEngineNavigationRequest::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;
}
2025-02-01 13:45:16 +13:00
void QWebEngineNavigationRequest_delete(QWebEngineNavigationRequest* self) {
delete self;
2024-11-27 18:16:48 +13:00
}