miqt/qt/multimedia/gen_qabstractvideosurface.cpp

725 lines
25 KiB
C++
Raw Normal View History

2024-11-04 23:15:32 +13:00
#include <QAbstractVideoSurface>
#include <QChildEvent>
#include <QEvent>
2024-11-04 23:15:32 +13:00
#include <QList>
#include <QMetaMethod>
2024-11-04 23:15:32 +13:00
#include <QMetaObject>
2024-11-19 19:29:06 +13:00
#include <QObject>
2024-11-04 23:15:32 +13:00
#include <QSize>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QTimerEvent>
2024-11-04 23:15:32 +13:00
#include <QVideoFrame>
#include <QVideoSurfaceFormat>
#include <qabstractvideosurface.h>
#include "gen_qabstractvideosurface.h"
#ifdef __cplusplus
extern "C" {
#endif
2025-02-01 13:45:16 +13:00
void miqt_exec_callback_QAbstractVideoSurface_activeChanged(intptr_t, bool);
void miqt_exec_callback_QAbstractVideoSurface_surfaceFormatChanged(intptr_t, QVideoSurfaceFormat*);
void miqt_exec_callback_QAbstractVideoSurface_supportedFormatsChanged(intptr_t);
void miqt_exec_callback_QAbstractVideoSurface_nativeResolutionChanged(intptr_t, QSize*);
struct miqt_array /* of int */ miqt_exec_callback_QAbstractVideoSurface_supportedPixelFormats(const QAbstractVideoSurface*, intptr_t, int);
bool miqt_exec_callback_QAbstractVideoSurface_isFormatSupported(const QAbstractVideoSurface*, intptr_t, QVideoSurfaceFormat*);
QVideoSurfaceFormat* miqt_exec_callback_QAbstractVideoSurface_nearestFormat(const QAbstractVideoSurface*, intptr_t, QVideoSurfaceFormat*);
bool miqt_exec_callback_QAbstractVideoSurface_start(QAbstractVideoSurface*, intptr_t, QVideoSurfaceFormat*);
void miqt_exec_callback_QAbstractVideoSurface_stop(QAbstractVideoSurface*, intptr_t);
bool miqt_exec_callback_QAbstractVideoSurface_present(QAbstractVideoSurface*, intptr_t, QVideoFrame*);
bool miqt_exec_callback_QAbstractVideoSurface_event(QAbstractVideoSurface*, intptr_t, QEvent*);
bool miqt_exec_callback_QAbstractVideoSurface_eventFilter(QAbstractVideoSurface*, intptr_t, QObject*, QEvent*);
void miqt_exec_callback_QAbstractVideoSurface_timerEvent(QAbstractVideoSurface*, intptr_t, QTimerEvent*);
void miqt_exec_callback_QAbstractVideoSurface_childEvent(QAbstractVideoSurface*, intptr_t, QChildEvent*);
void miqt_exec_callback_QAbstractVideoSurface_customEvent(QAbstractVideoSurface*, intptr_t, QEvent*);
void miqt_exec_callback_QAbstractVideoSurface_connectNotify(QAbstractVideoSurface*, intptr_t, QMetaMethod*);
void miqt_exec_callback_QAbstractVideoSurface_disconnectNotify(QAbstractVideoSurface*, intptr_t, QMetaMethod*);
#ifdef __cplusplus
} /* extern C */
#endif
2024-11-04 23:15:32 +13:00
class MiqtVirtualQAbstractVideoSurface final : public QAbstractVideoSurface {
public:
MiqtVirtualQAbstractVideoSurface(): QAbstractVideoSurface() {};
MiqtVirtualQAbstractVideoSurface(QObject* parent): QAbstractVideoSurface(parent) {};
virtual ~MiqtVirtualQAbstractVideoSurface() override = default;
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__supportedPixelFormats = 0;
// Subclass to allow providing a Go implementation
2025-02-01 13:45:16 +13:00
virtual QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType type) const override {
if (handle__supportedPixelFormats == 0) {
return QList<QVideoFrame::PixelFormat>(); // Pure virtual, there is no base we can call
}
2025-02-01 13:45:16 +13:00
QAbstractVideoBuffer::HandleType type_ret = type;
int sigval1 = static_cast<int>(type_ret);
2025-02-01 13:45:16 +13:00
struct miqt_array /* of int */ callback_return_value = miqt_exec_callback_QAbstractVideoSurface_supportedPixelFormats(this, handle__supportedPixelFormats, sigval1);
QList<QVideoFrame::PixelFormat> callback_return_value_QList;
callback_return_value_QList.reserve(callback_return_value.len);
int* callback_return_value_arr = static_cast<int*>(callback_return_value.data);
for(size_t i = 0; i < callback_return_value.len; ++i) {
callback_return_value_QList.push_back(static_cast<QVideoFrame::PixelFormat>(callback_return_value_arr[i]));
}
return callback_return_value_QList;
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__isFormatSupported = 0;
// Subclass to allow providing a Go implementation
virtual bool isFormatSupported(const QVideoSurfaceFormat& format) const override {
2025-02-01 13:45:16 +13:00
if (handle__isFormatSupported == 0) {
return QAbstractVideoSurface::isFormatSupported(format);
}
const QVideoSurfaceFormat& format_ret = format;
// Cast returned reference into pointer
QVideoSurfaceFormat* sigval1 = const_cast<QVideoSurfaceFormat*>(&format_ret);
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QAbstractVideoSurface_isFormatSupported(this, handle__isFormatSupported, sigval1);
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_isFormatSupported(QVideoSurfaceFormat* format) const {
return QAbstractVideoSurface::isFormatSupported(*format);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__nearestFormat = 0;
// Subclass to allow providing a Go implementation
virtual QVideoSurfaceFormat nearestFormat(const QVideoSurfaceFormat& format) const override {
2025-02-01 13:45:16 +13:00
if (handle__nearestFormat == 0) {
return QAbstractVideoSurface::nearestFormat(format);
}
const QVideoSurfaceFormat& format_ret = format;
// Cast returned reference into pointer
QVideoSurfaceFormat* sigval1 = const_cast<QVideoSurfaceFormat*>(&format_ret);
2025-02-01 13:45:16 +13:00
QVideoSurfaceFormat* callback_return_value = miqt_exec_callback_QAbstractVideoSurface_nearestFormat(this, handle__nearestFormat, sigval1);
return *callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
QVideoSurfaceFormat* virtualbase_nearestFormat(QVideoSurfaceFormat* format) const {
return new QVideoSurfaceFormat(QAbstractVideoSurface::nearestFormat(*format));
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__start = 0;
// Subclass to allow providing a Go implementation
virtual bool start(const QVideoSurfaceFormat& format) override {
2025-02-01 13:45:16 +13:00
if (handle__start == 0) {
return QAbstractVideoSurface::start(format);
}
const QVideoSurfaceFormat& format_ret = format;
// Cast returned reference into pointer
QVideoSurfaceFormat* sigval1 = const_cast<QVideoSurfaceFormat*>(&format_ret);
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QAbstractVideoSurface_start(this, handle__start, sigval1);
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_start(QVideoSurfaceFormat* format) {
return QAbstractVideoSurface::start(*format);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__stop = 0;
// Subclass to allow providing a Go implementation
virtual void stop() override {
2025-02-01 13:45:16 +13:00
if (handle__stop == 0) {
QAbstractVideoSurface::stop();
return;
}
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QAbstractVideoSurface_stop(this, handle__stop);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_stop() {
QAbstractVideoSurface::stop();
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__present = 0;
// Subclass to allow providing a Go implementation
virtual bool present(const QVideoFrame& frame) override {
2025-02-01 13:45:16 +13:00
if (handle__present == 0) {
return false; // Pure virtual, there is no base we can call
}
const QVideoFrame& frame_ret = frame;
// Cast returned reference into pointer
QVideoFrame* sigval1 = const_cast<QVideoFrame*>(&frame_ret);
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QAbstractVideoSurface_present(this, handle__present, sigval1);
return callback_return_value;
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__event = 0;
// Subclass to allow providing a Go implementation
virtual bool event(QEvent* event) override {
2025-02-01 13:45:16 +13:00
if (handle__event == 0) {
return QAbstractVideoSurface::event(event);
}
QEvent* sigval1 = event;
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QAbstractVideoSurface_event(this, handle__event, sigval1);
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_event(QEvent* event) {
return QAbstractVideoSurface::event(event);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__eventFilter = 0;
// Subclass to allow providing a Go implementation
virtual bool eventFilter(QObject* watched, QEvent* event) override {
2025-02-01 13:45:16 +13:00
if (handle__eventFilter == 0) {
return QAbstractVideoSurface::eventFilter(watched, event);
}
QObject* sigval1 = watched;
QEvent* sigval2 = event;
2025-02-01 13:45:16 +13:00
bool callback_return_value = miqt_exec_callback_QAbstractVideoSurface_eventFilter(this, handle__eventFilter, sigval1, sigval2);
return callback_return_value;
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
bool virtualbase_eventFilter(QObject* watched, QEvent* event) {
return QAbstractVideoSurface::eventFilter(watched, event);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__timerEvent = 0;
// Subclass to allow providing a Go implementation
virtual void timerEvent(QTimerEvent* event) override {
2025-02-01 13:45:16 +13:00
if (handle__timerEvent == 0) {
QAbstractVideoSurface::timerEvent(event);
return;
}
QTimerEvent* sigval1 = event;
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QAbstractVideoSurface_timerEvent(this, handle__timerEvent, sigval1);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_timerEvent(QTimerEvent* event) {
QAbstractVideoSurface::timerEvent(event);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__childEvent = 0;
// Subclass to allow providing a Go implementation
virtual void childEvent(QChildEvent* event) override {
2025-02-01 13:45:16 +13:00
if (handle__childEvent == 0) {
QAbstractVideoSurface::childEvent(event);
return;
}
QChildEvent* sigval1 = event;
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QAbstractVideoSurface_childEvent(this, handle__childEvent, sigval1);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_childEvent(QChildEvent* event) {
QAbstractVideoSurface::childEvent(event);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__customEvent = 0;
// Subclass to allow providing a Go implementation
virtual void customEvent(QEvent* event) override {
2025-02-01 13:45:16 +13:00
if (handle__customEvent == 0) {
QAbstractVideoSurface::customEvent(event);
return;
}
QEvent* sigval1 = event;
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QAbstractVideoSurface_customEvent(this, handle__customEvent, sigval1);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_customEvent(QEvent* event) {
QAbstractVideoSurface::customEvent(event);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__connectNotify = 0;
// Subclass to allow providing a Go implementation
virtual void connectNotify(const QMetaMethod& signal) override {
2025-02-01 13:45:16 +13:00
if (handle__connectNotify == 0) {
QAbstractVideoSurface::connectNotify(signal);
return;
}
const QMetaMethod& signal_ret = signal;
// Cast returned reference into pointer
QMetaMethod* sigval1 = const_cast<QMetaMethod*>(&signal_ret);
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QAbstractVideoSurface_connectNotify(this, handle__connectNotify, sigval1);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_connectNotify(QMetaMethod* signal) {
QAbstractVideoSurface::connectNotify(*signal);
}
// cgo.Handle value for overwritten implementation
2025-02-01 13:45:16 +13:00
intptr_t handle__disconnectNotify = 0;
// Subclass to allow providing a Go implementation
virtual void disconnectNotify(const QMetaMethod& signal) override {
2025-02-01 13:45:16 +13:00
if (handle__disconnectNotify == 0) {
QAbstractVideoSurface::disconnectNotify(signal);
return;
}
const QMetaMethod& signal_ret = signal;
// Cast returned reference into pointer
QMetaMethod* sigval1 = const_cast<QMetaMethod*>(&signal_ret);
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QAbstractVideoSurface_disconnectNotify(this, handle__disconnectNotify, sigval1);
}
// Wrapper to allow calling protected method
2025-02-01 13:45:16 +13:00
void virtualbase_disconnectNotify(QMetaMethod* signal) {
QAbstractVideoSurface::disconnectNotify(*signal);
}
};
2024-12-07 17:15:57 +13:00
QAbstractVideoSurface* QAbstractVideoSurface_new() {
return new MiqtVirtualQAbstractVideoSurface();
}
2024-12-07 17:15:57 +13:00
QAbstractVideoSurface* QAbstractVideoSurface_new2(QObject* parent) {
return new MiqtVirtualQAbstractVideoSurface(parent);
}
void QAbstractVideoSurface_virtbase(QAbstractVideoSurface* src, QObject** outptr_QObject) {
*outptr_QObject = static_cast<QObject*>(src);
}
2025-02-01 13:45:16 +13:00
QMetaObject* QAbstractVideoSurface_metaObject(const QAbstractVideoSurface* self) {
2024-11-04 23:15:32 +13:00
return (QMetaObject*) self->metaObject();
}
2025-02-01 13:45:16 +13:00
void* QAbstractVideoSurface_metacast(QAbstractVideoSurface* self, const char* param1) {
2024-11-04 23:15:32 +13:00
return self->qt_metacast(param1);
}
2025-02-01 13:45:16 +13:00
struct miqt_string QAbstractVideoSurface_tr(const char* s) {
2024-11-04 23:15:32 +13:00
QString _ret = QAbstractVideoSurface::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
struct miqt_string QAbstractVideoSurface_trUtf8(const char* s) {
2024-11-04 23:15:32 +13:00
QString _ret = QAbstractVideoSurface::trUtf8(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
struct miqt_array /* of int */ QAbstractVideoSurface_supportedPixelFormats(const QAbstractVideoSurface* self, int type) {
QList<QVideoFrame::PixelFormat> _ret = self->supportedPixelFormats(static_cast<QAbstractVideoBuffer::HandleType>(type));
2024-11-04 23:15:32 +13:00
// Convert QList<> from C++ memory to manually-managed C memory
int* _arr = static_cast<int*>(malloc(sizeof(int) * _ret.length()));
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
QVideoFrame::PixelFormat _lv_ret = _ret[i];
_arr[i] = static_cast<int>(_lv_ret);
}
struct miqt_array _out;
_out.len = _ret.length();
_out.data = static_cast<void*>(_arr);
return _out;
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_isFormatSupported(const QAbstractVideoSurface* self, QVideoSurfaceFormat* format) {
2024-11-04 23:15:32 +13:00
return self->isFormatSupported(*format);
}
2025-02-01 13:45:16 +13:00
QVideoSurfaceFormat* QAbstractVideoSurface_nearestFormat(const QAbstractVideoSurface* self, QVideoSurfaceFormat* format) {
2024-11-04 23:15:32 +13:00
return new QVideoSurfaceFormat(self->nearestFormat(*format));
}
2025-02-01 13:45:16 +13:00
QVideoSurfaceFormat* QAbstractVideoSurface_surfaceFormat(const QAbstractVideoSurface* self) {
2024-11-04 23:15:32 +13:00
return new QVideoSurfaceFormat(self->surfaceFormat());
}
2025-02-01 13:45:16 +13:00
QSize* QAbstractVideoSurface_nativeResolution(const QAbstractVideoSurface* self) {
2024-11-04 23:15:32 +13:00
return new QSize(self->nativeResolution());
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_start(QAbstractVideoSurface* self, QVideoSurfaceFormat* format) {
2024-11-04 23:15:32 +13:00
return self->start(*format);
}
2025-02-01 13:45:16 +13:00
void QAbstractVideoSurface_stop(QAbstractVideoSurface* self) {
2024-11-04 23:15:32 +13:00
self->stop();
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_isActive(const QAbstractVideoSurface* self) {
2024-11-04 23:15:32 +13:00
return self->isActive();
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_present(QAbstractVideoSurface* self, QVideoFrame* frame) {
2024-11-04 23:15:32 +13:00
return self->present(*frame);
}
2025-02-01 13:45:16 +13:00
int QAbstractVideoSurface_error(const QAbstractVideoSurface* self) {
2024-11-04 23:15:32 +13:00
QAbstractVideoSurface::Error _ret = self->error();
return static_cast<int>(_ret);
}
2025-02-01 13:45:16 +13:00
void QAbstractVideoSurface_activeChanged(QAbstractVideoSurface* self, bool active) {
2024-11-04 23:15:32 +13:00
self->activeChanged(active);
}
2025-02-01 13:45:16 +13:00
void QAbstractVideoSurface_connect_activeChanged(QAbstractVideoSurface* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface::connect(self, static_cast<void (QAbstractVideoSurface::*)(bool)>(&QAbstractVideoSurface::activeChanged), self, [=](bool active) {
2024-11-04 23:15:32 +13:00
bool sigval1 = active;
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QAbstractVideoSurface_activeChanged(slot, sigval1);
2024-11-04 23:15:32 +13:00
});
}
2025-02-01 13:45:16 +13:00
void QAbstractVideoSurface_surfaceFormatChanged(QAbstractVideoSurface* self, QVideoSurfaceFormat* format) {
2024-11-04 23:15:32 +13:00
self->surfaceFormatChanged(*format);
}
2025-02-01 13:45:16 +13:00
void QAbstractVideoSurface_connect_surfaceFormatChanged(QAbstractVideoSurface* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface::connect(self, static_cast<void (QAbstractVideoSurface::*)(const QVideoSurfaceFormat&)>(&QAbstractVideoSurface::surfaceFormatChanged), self, [=](const QVideoSurfaceFormat& format) {
2024-11-04 23:15:32 +13:00
const QVideoSurfaceFormat& format_ret = format;
// Cast returned reference into pointer
QVideoSurfaceFormat* sigval1 = const_cast<QVideoSurfaceFormat*>(&format_ret);
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QAbstractVideoSurface_surfaceFormatChanged(slot, sigval1);
2024-11-04 23:15:32 +13:00
});
}
2025-02-01 13:45:16 +13:00
void QAbstractVideoSurface_supportedFormatsChanged(QAbstractVideoSurface* self) {
2024-11-04 23:15:32 +13:00
self->supportedFormatsChanged();
}
2025-02-01 13:45:16 +13:00
void QAbstractVideoSurface_connect_supportedFormatsChanged(QAbstractVideoSurface* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface::connect(self, static_cast<void (QAbstractVideoSurface::*)()>(&QAbstractVideoSurface::supportedFormatsChanged), self, [=]() {
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QAbstractVideoSurface_supportedFormatsChanged(slot);
2024-11-04 23:15:32 +13:00
});
}
2025-02-01 13:45:16 +13:00
void QAbstractVideoSurface_nativeResolutionChanged(QAbstractVideoSurface* self, QSize* resolution) {
2024-11-04 23:15:32 +13:00
self->nativeResolutionChanged(*resolution);
}
2025-02-01 13:45:16 +13:00
void QAbstractVideoSurface_connect_nativeResolutionChanged(QAbstractVideoSurface* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface::connect(self, static_cast<void (QAbstractVideoSurface::*)(const QSize&)>(&QAbstractVideoSurface::nativeResolutionChanged), self, [=](const QSize& resolution) {
2024-11-04 23:15:32 +13:00
const QSize& resolution_ret = resolution;
// Cast returned reference into pointer
QSize* sigval1 = const_cast<QSize*>(&resolution_ret);
2025-02-01 13:45:16 +13:00
miqt_exec_callback_QAbstractVideoSurface_nativeResolutionChanged(slot, sigval1);
2024-11-04 23:15:32 +13:00
});
}
2025-02-01 13:45:16 +13:00
struct miqt_string QAbstractVideoSurface_tr2(const char* s, const char* c) {
2024-11-04 23:15:32 +13:00
QString _ret = QAbstractVideoSurface::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 QAbstractVideoSurface_tr3(const char* s, const char* c, int n) {
2024-11-04 23:15:32 +13:00
QString _ret = QAbstractVideoSurface::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
struct miqt_string QAbstractVideoSurface_trUtf82(const char* s, const char* c) {
2024-11-04 23:15:32 +13:00
QString _ret = QAbstractVideoSurface::trUtf8(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 QAbstractVideoSurface_trUtf83(const char* s, const char* c, int n) {
2024-11-04 23:15:32 +13:00
QString _ret = QAbstractVideoSurface::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();
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
bool QAbstractVideoSurface_override_virtual_supportedPixelFormats(void* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface* self_cast = dynamic_cast<MiqtVirtualQAbstractVideoSurface*>( (QAbstractVideoSurface*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__supportedPixelFormats = slot;
return true;
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_override_virtual_isFormatSupported(void* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface* self_cast = dynamic_cast<MiqtVirtualQAbstractVideoSurface*>( (QAbstractVideoSurface*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__isFormatSupported = slot;
return true;
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_virtualbase_isFormatSupported(const void* self, QVideoSurfaceFormat* format) {
return ( (const MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_isFormatSupported(format);
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_override_virtual_nearestFormat(void* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface* self_cast = dynamic_cast<MiqtVirtualQAbstractVideoSurface*>( (QAbstractVideoSurface*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__nearestFormat = slot;
return true;
}
2025-02-01 13:45:16 +13:00
QVideoSurfaceFormat* QAbstractVideoSurface_virtualbase_nearestFormat(const void* self, QVideoSurfaceFormat* format) {
return ( (const MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_nearestFormat(format);
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_override_virtual_start(void* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface* self_cast = dynamic_cast<MiqtVirtualQAbstractVideoSurface*>( (QAbstractVideoSurface*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__start = slot;
return true;
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_virtualbase_start(void* self, QVideoSurfaceFormat* format) {
return ( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_start(format);
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_override_virtual_stop(void* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface* self_cast = dynamic_cast<MiqtVirtualQAbstractVideoSurface*>( (QAbstractVideoSurface*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__stop = slot;
return true;
}
2025-02-01 13:45:16 +13:00
void QAbstractVideoSurface_virtualbase_stop(void* self) {
( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_stop();
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_override_virtual_present(void* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface* self_cast = dynamic_cast<MiqtVirtualQAbstractVideoSurface*>( (QAbstractVideoSurface*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__present = slot;
return true;
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_override_virtual_event(void* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface* self_cast = dynamic_cast<MiqtVirtualQAbstractVideoSurface*>( (QAbstractVideoSurface*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__event = slot;
return true;
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_virtualbase_event(void* self, QEvent* event) {
return ( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_event(event);
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_override_virtual_eventFilter(void* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface* self_cast = dynamic_cast<MiqtVirtualQAbstractVideoSurface*>( (QAbstractVideoSurface*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__eventFilter = slot;
return true;
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event) {
return ( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_eventFilter(watched, event);
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_override_virtual_timerEvent(void* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface* self_cast = dynamic_cast<MiqtVirtualQAbstractVideoSurface*>( (QAbstractVideoSurface*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__timerEvent = slot;
return true;
}
2025-02-01 13:45:16 +13:00
void QAbstractVideoSurface_virtualbase_timerEvent(void* self, QTimerEvent* event) {
( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_timerEvent(event);
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_override_virtual_childEvent(void* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface* self_cast = dynamic_cast<MiqtVirtualQAbstractVideoSurface*>( (QAbstractVideoSurface*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__childEvent = slot;
return true;
}
2025-02-01 13:45:16 +13:00
void QAbstractVideoSurface_virtualbase_childEvent(void* self, QChildEvent* event) {
( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_childEvent(event);
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_override_virtual_customEvent(void* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface* self_cast = dynamic_cast<MiqtVirtualQAbstractVideoSurface*>( (QAbstractVideoSurface*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__customEvent = slot;
return true;
}
2025-02-01 13:45:16 +13:00
void QAbstractVideoSurface_virtualbase_customEvent(void* self, QEvent* event) {
( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_customEvent(event);
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_override_virtual_connectNotify(void* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface* self_cast = dynamic_cast<MiqtVirtualQAbstractVideoSurface*>( (QAbstractVideoSurface*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__connectNotify = slot;
return true;
}
2025-02-01 13:45:16 +13:00
void QAbstractVideoSurface_virtualbase_connectNotify(void* self, QMetaMethod* signal) {
( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_connectNotify(signal);
}
2025-02-01 13:45:16 +13:00
bool QAbstractVideoSurface_override_virtual_disconnectNotify(void* self, intptr_t slot) {
MiqtVirtualQAbstractVideoSurface* self_cast = dynamic_cast<MiqtVirtualQAbstractVideoSurface*>( (QAbstractVideoSurface*)(self) );
if (self_cast == nullptr) {
return false;
}
2025-02-01 13:45:16 +13:00
self_cast->handle__disconnectNotify = slot;
return true;
}
2025-02-01 13:45:16 +13:00
void QAbstractVideoSurface_virtualbase_disconnectNotify(void* self, QMetaMethod* signal) {
( (MiqtVirtualQAbstractVideoSurface*)(self) )->virtualbase_disconnectNotify(signal);
}
2025-02-01 13:45:16 +13:00
void QAbstractVideoSurface_delete(QAbstractVideoSurface* self) {
delete self;
2024-11-04 23:15:32 +13:00
}