mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58:37 +00:00
158 lines
3.6 KiB
C++
158 lines
3.6 KiB
C++
#include <QByteArray>
|
|
#include <QChildEvent>
|
|
#include <QDynamicPropertyChangeEvent>
|
|
#include <QEvent>
|
|
#include <QObject>
|
|
#include <QTimerEvent>
|
|
#include <qcoreevent.h>
|
|
#include "gen_qcoreevent.h"
|
|
|
|
#ifndef _Bool
|
|
#define _Bool bool
|
|
#endif
|
|
#include "_cgo_export.h"
|
|
|
|
QEvent* QEvent_new(int typeVal) {
|
|
return new QEvent(static_cast<QEvent::Type>(typeVal));
|
|
}
|
|
|
|
QEvent* QEvent_new2(QEvent* other) {
|
|
return new QEvent(*other);
|
|
}
|
|
|
|
void QEvent_OperatorAssign(QEvent* self, QEvent* other) {
|
|
self->operator=(*other);
|
|
}
|
|
|
|
int QEvent_Type(const QEvent* self) {
|
|
QEvent::Type _ret = self->type();
|
|
return static_cast<int>(_ret);
|
|
}
|
|
|
|
bool QEvent_Spontaneous(const QEvent* self) {
|
|
return self->spontaneous();
|
|
}
|
|
|
|
void QEvent_SetAccepted(QEvent* self, bool accepted) {
|
|
self->setAccepted(accepted);
|
|
}
|
|
|
|
bool QEvent_IsAccepted(const QEvent* self) {
|
|
return self->isAccepted();
|
|
}
|
|
|
|
void QEvent_Accept(QEvent* self) {
|
|
self->accept();
|
|
}
|
|
|
|
void QEvent_Ignore(QEvent* self) {
|
|
self->ignore();
|
|
}
|
|
|
|
int QEvent_RegisterEventType() {
|
|
return QEvent::registerEventType();
|
|
}
|
|
|
|
int QEvent_RegisterEventType1(int hint) {
|
|
return QEvent::registerEventType(static_cast<int>(hint));
|
|
}
|
|
|
|
void QEvent_Delete(QEvent* self, bool isSubclass) {
|
|
if (isSubclass) {
|
|
delete dynamic_cast<QEvent*>( self );
|
|
} else {
|
|
delete self;
|
|
}
|
|
}
|
|
|
|
QTimerEvent* QTimerEvent_new(int timerId) {
|
|
return new QTimerEvent(static_cast<int>(timerId));
|
|
}
|
|
|
|
QTimerEvent* QTimerEvent_new2(QTimerEvent* param1) {
|
|
return new QTimerEvent(*param1);
|
|
}
|
|
|
|
void QTimerEvent_virtbase(QTimerEvent* src, QEvent** outptr_QEvent) {
|
|
*outptr_QEvent = static_cast<QEvent*>(src);
|
|
}
|
|
|
|
int QTimerEvent_TimerId(const QTimerEvent* self) {
|
|
return self->timerId();
|
|
}
|
|
|
|
void QTimerEvent_Delete(QTimerEvent* self, bool isSubclass) {
|
|
if (isSubclass) {
|
|
delete dynamic_cast<QTimerEvent*>( self );
|
|
} else {
|
|
delete self;
|
|
}
|
|
}
|
|
|
|
QChildEvent* QChildEvent_new(int typeVal, QObject* child) {
|
|
return new QChildEvent(static_cast<QEvent::Type>(typeVal), child);
|
|
}
|
|
|
|
QChildEvent* QChildEvent_new2(QChildEvent* param1) {
|
|
return new QChildEvent(*param1);
|
|
}
|
|
|
|
void QChildEvent_virtbase(QChildEvent* src, QEvent** outptr_QEvent) {
|
|
*outptr_QEvent = static_cast<QEvent*>(src);
|
|
}
|
|
|
|
QObject* QChildEvent_Child(const QChildEvent* self) {
|
|
return self->child();
|
|
}
|
|
|
|
bool QChildEvent_Added(const QChildEvent* self) {
|
|
return self->added();
|
|
}
|
|
|
|
bool QChildEvent_Polished(const QChildEvent* self) {
|
|
return self->polished();
|
|
}
|
|
|
|
bool QChildEvent_Removed(const QChildEvent* self) {
|
|
return self->removed();
|
|
}
|
|
|
|
void QChildEvent_Delete(QChildEvent* self, bool isSubclass) {
|
|
if (isSubclass) {
|
|
delete dynamic_cast<QChildEvent*>( self );
|
|
} else {
|
|
delete self;
|
|
}
|
|
}
|
|
|
|
QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_new(struct miqt_string name) {
|
|
QByteArray name_QByteArray(name.data, name.len);
|
|
return new QDynamicPropertyChangeEvent(name_QByteArray);
|
|
}
|
|
|
|
QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_new2(QDynamicPropertyChangeEvent* param1) {
|
|
return new QDynamicPropertyChangeEvent(*param1);
|
|
}
|
|
|
|
void QDynamicPropertyChangeEvent_virtbase(QDynamicPropertyChangeEvent* src, QEvent** outptr_QEvent) {
|
|
*outptr_QEvent = static_cast<QEvent*>(src);
|
|
}
|
|
|
|
struct miqt_string QDynamicPropertyChangeEvent_PropertyName(const QDynamicPropertyChangeEvent* 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 QDynamicPropertyChangeEvent_Delete(QDynamicPropertyChangeEvent* self, bool isSubclass) {
|
|
if (isSubclass) {
|
|
delete dynamic_cast<QDynamicPropertyChangeEvent*>( self );
|
|
} else {
|
|
delete self;
|
|
}
|
|
}
|
|
|