miqt/qt6/gen_qproperty.cpp

200 lines
5.7 KiB
C++
Raw Normal View History

2024-10-20 18:21:03 +13:00
#include <QMetaType>
#include <QPropertyBindingError>
#include <QPropertyBindingSourceLocation>
#include <QPropertyNotifier>
#include <QPropertyObserver>
#include <QPropertyObserverBase>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <QUntypedBindable>
#include <QUntypedPropertyBinding>
#include <qproperty.h>
#include "gen_qproperty.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
} /* extern C */
#endif
2024-10-20 18:21:03 +13:00
2024-12-07 17:15:57 +13:00
QPropertyBindingSourceLocation* QPropertyBindingSourceLocation_new() {
return new QPropertyBindingSourceLocation();
2024-10-20 18:21:03 +13:00
}
2024-12-07 17:15:57 +13:00
QPropertyBindingSourceLocation* QPropertyBindingSourceLocation_new2(QPropertyBindingSourceLocation* param1) {
return new QPropertyBindingSourceLocation(*param1);
2024-10-20 18:21:03 +13:00
}
2025-02-01 13:45:16 +13:00
void QPropertyBindingSourceLocation_delete(QPropertyBindingSourceLocation* self) {
delete self;
2024-10-20 18:21:03 +13:00
}
2024-12-07 17:15:57 +13:00
QPropertyBindingError* QPropertyBindingError_new() {
return new QPropertyBindingError();
2024-10-20 18:21:03 +13:00
}
2025-02-01 13:45:16 +13:00
QPropertyBindingError* QPropertyBindingError_new2(int type) {
return new QPropertyBindingError(static_cast<QPropertyBindingError::Type>(type));
2024-10-20 18:21:03 +13:00
}
2024-12-07 17:15:57 +13:00
QPropertyBindingError* QPropertyBindingError_new3(QPropertyBindingError* other) {
return new QPropertyBindingError(*other);
2024-10-20 18:21:03 +13:00
}
2025-02-01 13:45:16 +13:00
QPropertyBindingError* QPropertyBindingError_new4(int type, struct miqt_string description) {
2024-10-20 18:21:03 +13:00
QString description_QString = QString::fromUtf8(description.data, description.len);
2025-02-01 13:45:16 +13:00
return new QPropertyBindingError(static_cast<QPropertyBindingError::Type>(type), description_QString);
2024-10-20 18:21:03 +13:00
}
2025-02-01 13:45:16 +13:00
void QPropertyBindingError_operatorAssign(QPropertyBindingError* self, QPropertyBindingError* other) {
2024-10-20 18:21:03 +13:00
self->operator=(*other);
}
2025-02-01 13:45:16 +13:00
bool QPropertyBindingError_hasError(const QPropertyBindingError* self) {
2024-10-20 18:21:03 +13:00
return self->hasError();
}
2025-02-01 13:45:16 +13:00
int QPropertyBindingError_type(const QPropertyBindingError* self) {
2024-10-20 18:21:03 +13:00
QPropertyBindingError::Type _ret = self->type();
return static_cast<int>(_ret);
}
2025-02-01 13:45:16 +13:00
struct miqt_string QPropertyBindingError_description(const QPropertyBindingError* self) {
2024-10-20 18:21:03 +13:00
QString _ret = self->description();
// 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 QPropertyBindingError_delete(QPropertyBindingError* self) {
delete self;
2024-10-20 18:21:03 +13:00
}
2024-12-07 17:15:57 +13:00
QUntypedPropertyBinding* QUntypedPropertyBinding_new() {
return new QUntypedPropertyBinding();
2024-10-20 18:21:03 +13:00
}
2024-12-07 17:15:57 +13:00
QUntypedPropertyBinding* QUntypedPropertyBinding_new2(QUntypedPropertyBinding* other) {
return new QUntypedPropertyBinding(*other);
2024-10-20 18:21:03 +13:00
}
2025-02-01 13:45:16 +13:00
void QUntypedPropertyBinding_operatorAssign(QUntypedPropertyBinding* self, QUntypedPropertyBinding* other) {
2024-10-20 18:21:03 +13:00
self->operator=(*other);
}
2025-02-01 13:45:16 +13:00
bool QUntypedPropertyBinding_isNull(const QUntypedPropertyBinding* self) {
2024-10-20 18:21:03 +13:00
return self->isNull();
}
2025-02-01 13:45:16 +13:00
QPropertyBindingError* QUntypedPropertyBinding_error(const QUntypedPropertyBinding* self) {
2024-10-20 18:21:03 +13:00
return new QPropertyBindingError(self->error());
}
2025-02-01 13:45:16 +13:00
QMetaType* QUntypedPropertyBinding_valueMetaType(const QUntypedPropertyBinding* self) {
2024-10-20 18:21:03 +13:00
return new QMetaType(self->valueMetaType());
}
2025-02-01 13:45:16 +13:00
void QUntypedPropertyBinding_delete(QUntypedPropertyBinding* self) {
delete self;
2024-10-20 18:21:03 +13:00
}
2024-12-07 17:15:57 +13:00
QPropertyObserverBase* QPropertyObserverBase_new() {
return new QPropertyObserverBase();
2024-10-20 18:21:03 +13:00
}
2024-12-07 17:15:57 +13:00
QPropertyObserverBase* QPropertyObserverBase_new2(QPropertyObserverBase* param1) {
return new QPropertyObserverBase(*param1);
2024-10-20 18:21:03 +13:00
}
2025-02-01 13:45:16 +13:00
void QPropertyObserverBase_delete(QPropertyObserverBase* self) {
delete self;
2024-10-20 18:21:03 +13:00
}
2024-12-07 17:15:57 +13:00
QPropertyObserver* QPropertyObserver_new() {
return new QPropertyObserver();
}
void QPropertyObserver_virtbase(QPropertyObserver* src, QPropertyObserverBase** outptr_QPropertyObserverBase) {
*outptr_QPropertyObserverBase = static_cast<QPropertyObserverBase*>(src);
2024-10-20 18:21:03 +13:00
}
2025-02-01 13:45:16 +13:00
void QPropertyObserver_delete(QPropertyObserver* self) {
delete self;
2024-10-20 18:21:03 +13:00
}
2024-12-07 17:15:57 +13:00
QPropertyNotifier* QPropertyNotifier_new() {
return new QPropertyNotifier();
}
void QPropertyNotifier_virtbase(QPropertyNotifier* src, QPropertyObserver** outptr_QPropertyObserver) {
*outptr_QPropertyObserver = static_cast<QPropertyObserver*>(src);
2024-10-20 18:21:03 +13:00
}
2025-02-01 13:45:16 +13:00
void QPropertyNotifier_delete(QPropertyNotifier* self) {
delete self;
2024-10-20 18:21:03 +13:00
}
2024-12-07 17:15:57 +13:00
QUntypedBindable* QUntypedBindable_new() {
return new QUntypedBindable();
2024-10-20 18:21:03 +13:00
}
2024-12-07 17:15:57 +13:00
QUntypedBindable* QUntypedBindable_new2(QUntypedBindable* param1) {
return new QUntypedBindable(*param1);
2024-10-20 18:21:03 +13:00
}
2025-02-01 13:45:16 +13:00
bool QUntypedBindable_isValid(const QUntypedBindable* self) {
2024-10-20 18:21:03 +13:00
return self->isValid();
}
2025-02-01 13:45:16 +13:00
bool QUntypedBindable_isBindable(const QUntypedBindable* self) {
2024-10-20 18:21:03 +13:00
return self->isBindable();
}
2025-02-01 13:45:16 +13:00
bool QUntypedBindable_isReadOnly(const QUntypedBindable* self) {
2024-10-20 18:21:03 +13:00
return self->isReadOnly();
}
2025-02-01 13:45:16 +13:00
QUntypedPropertyBinding* QUntypedBindable_makeBinding(const QUntypedBindable* self) {
2024-10-20 18:21:03 +13:00
return new QUntypedPropertyBinding(self->makeBinding());
}
2025-02-01 13:45:16 +13:00
QUntypedPropertyBinding* QUntypedBindable_takeBinding(QUntypedBindable* self) {
2024-10-20 18:21:03 +13:00
return new QUntypedPropertyBinding(self->takeBinding());
}
2025-02-01 13:45:16 +13:00
void QUntypedBindable_observe(const QUntypedBindable* self, QPropertyObserver* observer) {
2024-10-20 18:21:03 +13:00
self->observe(observer);
}
2025-02-01 13:45:16 +13:00
QUntypedPropertyBinding* QUntypedBindable_binding(const QUntypedBindable* self) {
2024-10-20 18:21:03 +13:00
return new QUntypedPropertyBinding(self->binding());
}
2025-02-01 13:45:16 +13:00
bool QUntypedBindable_setBinding(QUntypedBindable* self, QUntypedPropertyBinding* binding) {
2024-10-20 18:21:03 +13:00
return self->setBinding(*binding);
}
2025-02-01 13:45:16 +13:00
bool QUntypedBindable_hasBinding(const QUntypedBindable* self) {
2024-10-20 18:21:03 +13:00
return self->hasBinding();
}
2025-02-01 13:45:16 +13:00
QMetaType* QUntypedBindable_metaType(const QUntypedBindable* self) {
2024-10-20 18:21:03 +13:00
return new QMetaType(self->metaType());
}
2025-02-01 13:45:16 +13:00
QUntypedPropertyBinding* QUntypedBindable_makeBinding1(const QUntypedBindable* self, QPropertyBindingSourceLocation* location) {
2024-10-20 18:21:03 +13:00
return new QUntypedPropertyBinding(self->makeBinding(*location));
}
2025-02-01 13:45:16 +13:00
void QUntypedBindable_delete(QUntypedBindable* self) {
delete self;
2024-10-20 18:21:03 +13:00
}