miqt/qt6/multimedia/gen_qgraphicsvideoitem.cpp

133 lines
4.1 KiB
C++

#include <QGraphicsItem>
#include <QGraphicsVideoItem>
#include <QMetaObject>
#include <QPainter>
#include <QPointF>
#include <QRectF>
#include <QSizeF>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QStyleOptionGraphicsItem>
#include <QVideoSink>
#include <QWidget>
#include <qgraphicsvideoitem.h>
#include "gen_qgraphicsvideoitem.h"
#include "_cgo_export.h"
QGraphicsVideoItem* QGraphicsVideoItem_new() {
return new QGraphicsVideoItem();
}
QGraphicsVideoItem* QGraphicsVideoItem_new2(QGraphicsItem* parent) {
return new QGraphicsVideoItem(parent);
}
QMetaObject* QGraphicsVideoItem_MetaObject(const QGraphicsVideoItem* self) {
return (QMetaObject*) self->metaObject();
}
void* QGraphicsVideoItem_Metacast(QGraphicsVideoItem* self, const char* param1) {
return self->qt_metacast(param1);
}
struct miqt_string QGraphicsVideoItem_Tr(const char* s) {
QString _ret = QGraphicsVideoItem::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* QGraphicsVideoItem_VideoSink(const QGraphicsVideoItem* self) {
return self->videoSink();
}
int QGraphicsVideoItem_AspectRatioMode(const QGraphicsVideoItem* self) {
Qt::AspectRatioMode _ret = self->aspectRatioMode();
return static_cast<int>(_ret);
}
void QGraphicsVideoItem_SetAspectRatioMode(QGraphicsVideoItem* self, int mode) {
self->setAspectRatioMode(static_cast<Qt::AspectRatioMode>(mode));
}
QPointF* QGraphicsVideoItem_Offset(const QGraphicsVideoItem* self) {
return new QPointF(self->offset());
}
void QGraphicsVideoItem_SetOffset(QGraphicsVideoItem* self, QPointF* offset) {
self->setOffset(*offset);
}
QSizeF* QGraphicsVideoItem_Size(const QGraphicsVideoItem* self) {
return new QSizeF(self->size());
}
void QGraphicsVideoItem_SetSize(QGraphicsVideoItem* self, QSizeF* size) {
self->setSize(*size);
}
QSizeF* QGraphicsVideoItem_NativeSize(const QGraphicsVideoItem* self) {
return new QSizeF(self->nativeSize());
}
QRectF* QGraphicsVideoItem_BoundingRect(const QGraphicsVideoItem* self) {
return new QRectF(self->boundingRect());
}
void QGraphicsVideoItem_Paint(QGraphicsVideoItem* self, QPainter* painter, QStyleOptionGraphicsItem* option) {
self->paint(painter, option);
}
int QGraphicsVideoItem_Type(const QGraphicsVideoItem* self) {
return self->type();
}
void QGraphicsVideoItem_NativeSizeChanged(QGraphicsVideoItem* self, QSizeF* size) {
self->nativeSizeChanged(*size);
}
void QGraphicsVideoItem_connect_NativeSizeChanged(QGraphicsVideoItem* self, intptr_t slot) {
QGraphicsVideoItem::connect(self, static_cast<void (QGraphicsVideoItem::*)(const QSizeF&)>(&QGraphicsVideoItem::nativeSizeChanged), self, [=](const QSizeF& size) {
const QSizeF& size_ret = size;
// Cast returned reference into pointer
QSizeF* sigval1 = const_cast<QSizeF*>(&size_ret);
miqt_exec_callback_QGraphicsVideoItem_NativeSizeChanged(slot, sigval1);
});
}
struct miqt_string QGraphicsVideoItem_Tr2(const char* s, const char* c) {
QString _ret = QGraphicsVideoItem::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 QGraphicsVideoItem_Tr3(const char* s, const char* c, int n) {
QString _ret = QGraphicsVideoItem::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 QGraphicsVideoItem_Paint3(QGraphicsVideoItem* self, QPainter* painter, QStyleOptionGraphicsItem* option, QWidget* widget) {
self->paint(painter, option, widget);
}
void QGraphicsVideoItem_Delete(QGraphicsVideoItem* self) {
delete self;
}