#include #define WORKAROUND_INNER_CLASS_DEFINITION_QAbstractEventDispatcher__TimerInfo #include #include #include #include #include #include #include #include #include #include #include #include "gen_qabstracteventdispatcher.h" #ifndef _Bool #define _Bool bool #endif #include "_cgo_export.h" void QAbstractEventDispatcher_virtbase(QAbstractEventDispatcher* src, QObject** outptr_QObject) { *outptr_QObject = static_cast(src); } QMetaObject* QAbstractEventDispatcher_MetaObject(const QAbstractEventDispatcher* self) { return (QMetaObject*) self->metaObject(); } void* QAbstractEventDispatcher_Metacast(QAbstractEventDispatcher* self, const char* param1) { return self->qt_metacast(param1); } struct miqt_string QAbstractEventDispatcher_Tr(const char* s) { QString _ret = QAbstractEventDispatcher::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(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } QAbstractEventDispatcher* QAbstractEventDispatcher_Instance() { return QAbstractEventDispatcher::instance(); } bool QAbstractEventDispatcher_ProcessEvents(QAbstractEventDispatcher* self, int flags) { return self->processEvents(static_cast(flags)); } void QAbstractEventDispatcher_RegisterSocketNotifier(QAbstractEventDispatcher* self, QSocketNotifier* notifier) { self->registerSocketNotifier(notifier); } void QAbstractEventDispatcher_UnregisterSocketNotifier(QAbstractEventDispatcher* self, QSocketNotifier* notifier) { self->unregisterSocketNotifier(notifier); } int QAbstractEventDispatcher_RegisterTimer(QAbstractEventDispatcher* self, long long interval, int timerType, QObject* object) { return self->registerTimer(static_cast(interval), static_cast(timerType), object); } void QAbstractEventDispatcher_RegisterTimer2(QAbstractEventDispatcher* self, int timerId, long long interval, int timerType, QObject* object) { self->registerTimer(static_cast(timerId), static_cast(interval), static_cast(timerType), object); } bool QAbstractEventDispatcher_UnregisterTimer(QAbstractEventDispatcher* self, int timerId) { return self->unregisterTimer(static_cast(timerId)); } bool QAbstractEventDispatcher_UnregisterTimers(QAbstractEventDispatcher* self, QObject* object) { return self->unregisterTimers(object); } struct miqt_array /* of QAbstractEventDispatcher__TimerInfo* */ QAbstractEventDispatcher_RegisteredTimers(const QAbstractEventDispatcher* self, QObject* object) { QList _ret = self->registeredTimers(object); // Convert QList<> from C++ memory to manually-managed C memory QAbstractEventDispatcher__TimerInfo** _arr = static_cast(malloc(sizeof(QAbstractEventDispatcher__TimerInfo*) * _ret.length())); for (size_t i = 0, e = _ret.length(); i < e; ++i) { _arr[i] = new QAbstractEventDispatcher::TimerInfo(_ret[i]); } struct miqt_array _out; _out.len = _ret.length(); _out.data = static_cast(_arr); return _out; } int QAbstractEventDispatcher_RemainingTime(QAbstractEventDispatcher* self, int timerId) { return self->remainingTime(static_cast(timerId)); } void QAbstractEventDispatcher_WakeUp(QAbstractEventDispatcher* self) { self->wakeUp(); } void QAbstractEventDispatcher_Interrupt(QAbstractEventDispatcher* self) { self->interrupt(); } void QAbstractEventDispatcher_StartingUp(QAbstractEventDispatcher* self) { self->startingUp(); } void QAbstractEventDispatcher_ClosingDown(QAbstractEventDispatcher* self) { self->closingDown(); } void QAbstractEventDispatcher_InstallNativeEventFilter(QAbstractEventDispatcher* self, QAbstractNativeEventFilter* filterObj) { self->installNativeEventFilter(filterObj); } void QAbstractEventDispatcher_RemoveNativeEventFilter(QAbstractEventDispatcher* self, QAbstractNativeEventFilter* filterObj) { self->removeNativeEventFilter(filterObj); } bool QAbstractEventDispatcher_FilterNativeEvent(QAbstractEventDispatcher* self, struct miqt_string eventType, void* message, intptr_t* result) { QByteArray eventType_QByteArray(eventType.data, eventType.len); return self->filterNativeEvent(eventType_QByteArray, message, (qintptr*)(result)); } void QAbstractEventDispatcher_AboutToBlock(QAbstractEventDispatcher* self) { self->aboutToBlock(); } void QAbstractEventDispatcher_connect_AboutToBlock(QAbstractEventDispatcher* self, intptr_t slot) { QAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::aboutToBlock), self, [=]() { miqt_exec_callback_QAbstractEventDispatcher_AboutToBlock(slot); }); } void QAbstractEventDispatcher_Awake(QAbstractEventDispatcher* self) { self->awake(); } void QAbstractEventDispatcher_connect_Awake(QAbstractEventDispatcher* self, intptr_t slot) { QAbstractEventDispatcher::connect(self, static_cast(&QAbstractEventDispatcher::awake), self, [=]() { miqt_exec_callback_QAbstractEventDispatcher_Awake(slot); }); } struct miqt_string QAbstractEventDispatcher_Tr2(const char* s, const char* c) { QString _ret = QAbstractEventDispatcher::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(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } struct miqt_string QAbstractEventDispatcher_Tr3(const char* s, const char* c, int n) { QString _ret = QAbstractEventDispatcher::tr(s, c, static_cast(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(malloc(_ms.len)); memcpy(_ms.data, _b.data(), _ms.len); return _ms; } QAbstractEventDispatcher* QAbstractEventDispatcher_Instance1(QThread* thread) { return QAbstractEventDispatcher::instance(thread); } void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } } QAbstractEventDispatcher__TimerInfo* QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t) { return new QAbstractEventDispatcher::TimerInfo(static_cast(id), static_cast(i), static_cast(t)); } void QAbstractEventDispatcher__TimerInfo_Delete(QAbstractEventDispatcher__TimerInfo* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } }