mirror of
https://github.com/mappu/miqt.git
synced 2024-12-23 09:28:36 +00:00
110 lines
3.3 KiB
C++
110 lines
3.3 KiB
C++
|
#include <QMetaObject>
|
||
|
#include <QSize>
|
||
|
#include <QString>
|
||
|
#include <QByteArray>
|
||
|
#include <cstring>
|
||
|
#include <QVideoSink>
|
||
|
#include <QVideoWidget>
|
||
|
#include <QWidget>
|
||
|
#include <qvideowidget.h>
|
||
|
#include "gen_qvideowidget.h"
|
||
|
#include "_cgo_export.h"
|
||
|
|
||
|
QVideoWidget* QVideoWidget_new(QWidget* parent) {
|
||
|
return new QVideoWidget(parent);
|
||
|
}
|
||
|
|
||
|
QVideoWidget* QVideoWidget_new2() {
|
||
|
return new QVideoWidget();
|
||
|
}
|
||
|
|
||
|
QMetaObject* QVideoWidget_MetaObject(const QVideoWidget* self) {
|
||
|
return (QMetaObject*) self->metaObject();
|
||
|
}
|
||
|
|
||
|
void* QVideoWidget_Metacast(QVideoWidget* self, const char* param1) {
|
||
|
return self->qt_metacast(param1);
|
||
|
}
|
||
|
|
||
|
struct miqt_string QVideoWidget_Tr(const char* s) {
|
||
|
QString _ret = QVideoWidget::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;
|
||
|
}
|
||
|
|
||
|
QVideoSink* QVideoWidget_VideoSink(const QVideoWidget* self) {
|
||
|
return self->videoSink();
|
||
|
}
|
||
|
|
||
|
int QVideoWidget_AspectRatioMode(const QVideoWidget* self) {
|
||
|
Qt::AspectRatioMode _ret = self->aspectRatioMode();
|
||
|
return static_cast<int>(_ret);
|
||
|
}
|
||
|
|
||
|
QSize* QVideoWidget_SizeHint(const QVideoWidget* self) {
|
||
|
return new QSize(self->sizeHint());
|
||
|
}
|
||
|
|
||
|
void QVideoWidget_SetFullScreen(QVideoWidget* self, bool fullScreen) {
|
||
|
self->setFullScreen(fullScreen);
|
||
|
}
|
||
|
|
||
|
void QVideoWidget_SetAspectRatioMode(QVideoWidget* self, int mode) {
|
||
|
self->setAspectRatioMode(static_cast<Qt::AspectRatioMode>(mode));
|
||
|
}
|
||
|
|
||
|
void QVideoWidget_FullScreenChanged(QVideoWidget* self, bool fullScreen) {
|
||
|
self->fullScreenChanged(fullScreen);
|
||
|
}
|
||
|
|
||
|
void QVideoWidget_connect_FullScreenChanged(QVideoWidget* self, intptr_t slot) {
|
||
|
QVideoWidget::connect(self, static_cast<void (QVideoWidget::*)(bool)>(&QVideoWidget::fullScreenChanged), self, [=](bool fullScreen) {
|
||
|
bool sigval1 = fullScreen;
|
||
|
miqt_exec_callback_QVideoWidget_FullScreenChanged(slot, sigval1);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
void QVideoWidget_AspectRatioModeChanged(QVideoWidget* self, int mode) {
|
||
|
self->aspectRatioModeChanged(static_cast<Qt::AspectRatioMode>(mode));
|
||
|
}
|
||
|
|
||
|
void QVideoWidget_connect_AspectRatioModeChanged(QVideoWidget* self, intptr_t slot) {
|
||
|
QVideoWidget::connect(self, static_cast<void (QVideoWidget::*)(Qt::AspectRatioMode)>(&QVideoWidget::aspectRatioModeChanged), self, [=](Qt::AspectRatioMode mode) {
|
||
|
Qt::AspectRatioMode mode_ret = mode;
|
||
|
int sigval1 = static_cast<int>(mode_ret);
|
||
|
miqt_exec_callback_QVideoWidget_AspectRatioModeChanged(slot, sigval1);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
struct miqt_string QVideoWidget_Tr2(const char* s, const char* c) {
|
||
|
QString _ret = QVideoWidget::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 QVideoWidget_Tr3(const char* s, const char* c, int n) {
|
||
|
QString _ret = QVideoWidget::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 QVideoWidget_Delete(QVideoWidget* self) {
|
||
|
delete self;
|
||
|
}
|
||
|
|