miqt/qt6/gen_qproperty.cpp

225 lines
6.4 KiB
C++
Raw Permalink Normal View History

2024-10-20 05:21:03 +00: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"
#ifndef _Bool
#define _Bool bool
#endif
2024-10-20 05:21:03 +00:00
#include "_cgo_export.h"
2024-12-07 04:15:57 +00:00
QPropertyBindingSourceLocation* QPropertyBindingSourceLocation_new() {
return new QPropertyBindingSourceLocation();
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QPropertyBindingSourceLocation* QPropertyBindingSourceLocation_new2(QPropertyBindingSourceLocation* param1) {
return new QPropertyBindingSourceLocation(*param1);
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
void QPropertyBindingSourceLocation_Delete(QPropertyBindingSourceLocation* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QPropertyBindingSourceLocation*>( self );
} else {
delete self;
}
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QPropertyBindingError* QPropertyBindingError_new() {
return new QPropertyBindingError();
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QPropertyBindingError* QPropertyBindingError_new2(int typeVal) {
return new QPropertyBindingError(static_cast<QPropertyBindingError::Type>(typeVal));
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QPropertyBindingError* QPropertyBindingError_new3(QPropertyBindingError* other) {
return new QPropertyBindingError(*other);
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QPropertyBindingError* QPropertyBindingError_new4(int typeVal, struct miqt_string description) {
2024-10-20 05:21:03 +00:00
QString description_QString = QString::fromUtf8(description.data, description.len);
2024-12-07 04:15:57 +00:00
return new QPropertyBindingError(static_cast<QPropertyBindingError::Type>(typeVal), description_QString);
2024-10-20 05:21:03 +00:00
}
void QPropertyBindingError_OperatorAssign(QPropertyBindingError* self, QPropertyBindingError* other) {
self->operator=(*other);
}
bool QPropertyBindingError_HasError(const QPropertyBindingError* self) {
return self->hasError();
}
int QPropertyBindingError_Type(const QPropertyBindingError* self) {
QPropertyBindingError::Type _ret = self->type();
return static_cast<int>(_ret);
}
struct miqt_string QPropertyBindingError_Description(const QPropertyBindingError* self) {
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;
}
2024-11-19 06:29:06 +00:00
void QPropertyBindingError_Delete(QPropertyBindingError* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QPropertyBindingError*>( self );
} else {
delete self;
}
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QUntypedPropertyBinding* QUntypedPropertyBinding_new() {
return new QUntypedPropertyBinding();
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QUntypedPropertyBinding* QUntypedPropertyBinding_new2(QUntypedPropertyBinding* other) {
return new QUntypedPropertyBinding(*other);
2024-10-20 05:21:03 +00:00
}
void QUntypedPropertyBinding_OperatorAssign(QUntypedPropertyBinding* self, QUntypedPropertyBinding* other) {
self->operator=(*other);
}
bool QUntypedPropertyBinding_IsNull(const QUntypedPropertyBinding* self) {
return self->isNull();
}
QPropertyBindingError* QUntypedPropertyBinding_Error(const QUntypedPropertyBinding* self) {
return new QPropertyBindingError(self->error());
}
QMetaType* QUntypedPropertyBinding_ValueMetaType(const QUntypedPropertyBinding* self) {
return new QMetaType(self->valueMetaType());
}
2024-11-19 06:29:06 +00:00
void QUntypedPropertyBinding_Delete(QUntypedPropertyBinding* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QUntypedPropertyBinding*>( self );
} else {
delete self;
}
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QPropertyObserverBase* QPropertyObserverBase_new() {
return new QPropertyObserverBase();
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QPropertyObserverBase* QPropertyObserverBase_new2(QPropertyObserverBase* param1) {
return new QPropertyObserverBase(*param1);
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
void QPropertyObserverBase_Delete(QPropertyObserverBase* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QPropertyObserverBase*>( self );
} else {
delete self;
}
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QPropertyObserver* QPropertyObserver_new() {
return new QPropertyObserver();
}
void QPropertyObserver_virtbase(QPropertyObserver* src, QPropertyObserverBase** outptr_QPropertyObserverBase) {
*outptr_QPropertyObserverBase = static_cast<QPropertyObserverBase*>(src);
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
void QPropertyObserver_Delete(QPropertyObserver* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QPropertyObserver*>( self );
} else {
delete self;
}
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QPropertyNotifier* QPropertyNotifier_new() {
return new QPropertyNotifier();
}
void QPropertyNotifier_virtbase(QPropertyNotifier* src, QPropertyObserver** outptr_QPropertyObserver) {
*outptr_QPropertyObserver = static_cast<QPropertyObserver*>(src);
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
void QPropertyNotifier_Delete(QPropertyNotifier* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QPropertyNotifier*>( self );
} else {
delete self;
}
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QUntypedBindable* QUntypedBindable_new() {
return new QUntypedBindable();
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QUntypedBindable* QUntypedBindable_new2(QUntypedBindable* param1) {
return new QUntypedBindable(*param1);
2024-10-20 05:21:03 +00:00
}
bool QUntypedBindable_IsValid(const QUntypedBindable* self) {
return self->isValid();
}
bool QUntypedBindable_IsBindable(const QUntypedBindable* self) {
return self->isBindable();
}
bool QUntypedBindable_IsReadOnly(const QUntypedBindable* self) {
return self->isReadOnly();
}
QUntypedPropertyBinding* QUntypedBindable_MakeBinding(const QUntypedBindable* self) {
return new QUntypedPropertyBinding(self->makeBinding());
}
QUntypedPropertyBinding* QUntypedBindable_TakeBinding(QUntypedBindable* self) {
return new QUntypedPropertyBinding(self->takeBinding());
}
void QUntypedBindable_Observe(const QUntypedBindable* self, QPropertyObserver* observer) {
self->observe(observer);
}
QUntypedPropertyBinding* QUntypedBindable_Binding(const QUntypedBindable* self) {
return new QUntypedPropertyBinding(self->binding());
}
bool QUntypedBindable_SetBinding(QUntypedBindable* self, QUntypedPropertyBinding* binding) {
return self->setBinding(*binding);
}
bool QUntypedBindable_HasBinding(const QUntypedBindable* self) {
return self->hasBinding();
}
QMetaType* QUntypedBindable_MetaType(const QUntypedBindable* self) {
return new QMetaType(self->metaType());
}
QUntypedPropertyBinding* QUntypedBindable_MakeBinding1(const QUntypedBindable* self, QPropertyBindingSourceLocation* location) {
return new QUntypedPropertyBinding(self->makeBinding(*location));
}
2024-11-19 06:29:06 +00:00
void QUntypedBindable_Delete(QUntypedBindable* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QUntypedBindable*>( self );
} else {
delete self;
}
2024-10-20 05:21:03 +00:00
}