miqt/qt6/gen_qpropertyanimation.cpp
2024-10-21 19:10:31 +13:00

97 lines
3.1 KiB
C++

#include <QByteArray>
#include <QMetaObject>
#include <QObject>
#include <QPropertyAnimation>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <qpropertyanimation.h>
#include "gen_qpropertyanimation.h"
#include "_cgo_export.h"
QPropertyAnimation* QPropertyAnimation_new() {
return new QPropertyAnimation();
}
QPropertyAnimation* QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName) {
QByteArray propertyName_QByteArray(propertyName.data, propertyName.len);
return new QPropertyAnimation(target, propertyName_QByteArray);
}
QPropertyAnimation* QPropertyAnimation_new3(QObject* parent) {
return new QPropertyAnimation(parent);
}
QPropertyAnimation* QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent) {
QByteArray propertyName_QByteArray(propertyName.data, propertyName.len);
return new QPropertyAnimation(target, propertyName_QByteArray, parent);
}
QMetaObject* QPropertyAnimation_MetaObject(const QPropertyAnimation* self) {
return (QMetaObject*) self->metaObject();
}
void* QPropertyAnimation_Metacast(QPropertyAnimation* self, const char* param1) {
return self->qt_metacast(param1);
}
struct miqt_string QPropertyAnimation_Tr(const char* s) {
QString _ret = QPropertyAnimation::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;
}
QObject* QPropertyAnimation_TargetObject(const QPropertyAnimation* self) {
return self->targetObject();
}
void QPropertyAnimation_SetTargetObject(QPropertyAnimation* self, QObject* target) {
self->setTargetObject(target);
}
struct miqt_string QPropertyAnimation_PropertyName(const QPropertyAnimation* self) {
QByteArray _qb = self->propertyName();
struct miqt_string _ms;
_ms.len = _qb.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _qb.data(), _ms.len);
return _ms;
}
void QPropertyAnimation_SetPropertyName(QPropertyAnimation* self, struct miqt_string propertyName) {
QByteArray propertyName_QByteArray(propertyName.data, propertyName.len);
self->setPropertyName(propertyName_QByteArray);
}
struct miqt_string QPropertyAnimation_Tr2(const char* s, const char* c) {
QString _ret = QPropertyAnimation::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 QPropertyAnimation_Tr3(const char* s, const char* c, int n) {
QString _ret = QPropertyAnimation::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 QPropertyAnimation_Delete(QPropertyAnimation* self) {
delete self;
}