#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "gen_qsystemtrayicon.h" #ifndef _Bool #define _Bool bool #endif #include "_cgo_export.h" class MiqtVirtualQSystemTrayIcon : public virtual QSystemTrayIcon { public: MiqtVirtualQSystemTrayIcon(): QSystemTrayIcon() {}; MiqtVirtualQSystemTrayIcon(const QIcon& icon): QSystemTrayIcon(icon) {}; MiqtVirtualQSystemTrayIcon(QObject* parent): QSystemTrayIcon(parent) {}; MiqtVirtualQSystemTrayIcon(const QIcon& icon, QObject* parent): QSystemTrayIcon(icon, parent) {}; virtual ~MiqtVirtualQSystemTrayIcon() = default; // cgo.Handle value for overwritten implementation intptr_t handle__Event = 0; // Subclass to allow providing a Go implementation virtual bool event(QEvent* event) override { if (handle__Event == 0) { return QSystemTrayIcon::event(event); } QEvent* sigval1 = event; bool callback_return_value = miqt_exec_callback_QSystemTrayIcon_Event(this, handle__Event, sigval1); return callback_return_value; } // Wrapper to allow calling protected method bool virtualbase_Event(QEvent* event) { return QSystemTrayIcon::event(event); } // cgo.Handle value for overwritten implementation intptr_t handle__EventFilter = 0; // Subclass to allow providing a Go implementation virtual bool eventFilter(QObject* watched, QEvent* event) override { if (handle__EventFilter == 0) { return QSystemTrayIcon::eventFilter(watched, event); } QObject* sigval1 = watched; QEvent* sigval2 = event; bool callback_return_value = miqt_exec_callback_QSystemTrayIcon_EventFilter(this, handle__EventFilter, sigval1, sigval2); return callback_return_value; } // Wrapper to allow calling protected method bool virtualbase_EventFilter(QObject* watched, QEvent* event) { return QSystemTrayIcon::eventFilter(watched, event); } // cgo.Handle value for overwritten implementation intptr_t handle__TimerEvent = 0; // Subclass to allow providing a Go implementation virtual void timerEvent(QTimerEvent* event) override { if (handle__TimerEvent == 0) { QSystemTrayIcon::timerEvent(event); return; } QTimerEvent* sigval1 = event; miqt_exec_callback_QSystemTrayIcon_TimerEvent(this, handle__TimerEvent, sigval1); } // Wrapper to allow calling protected method void virtualbase_TimerEvent(QTimerEvent* event) { QSystemTrayIcon::timerEvent(event); } // cgo.Handle value for overwritten implementation intptr_t handle__ChildEvent = 0; // Subclass to allow providing a Go implementation virtual void childEvent(QChildEvent* event) override { if (handle__ChildEvent == 0) { QSystemTrayIcon::childEvent(event); return; } QChildEvent* sigval1 = event; miqt_exec_callback_QSystemTrayIcon_ChildEvent(this, handle__ChildEvent, sigval1); } // Wrapper to allow calling protected method void virtualbase_ChildEvent(QChildEvent* event) { QSystemTrayIcon::childEvent(event); } // cgo.Handle value for overwritten implementation intptr_t handle__CustomEvent = 0; // Subclass to allow providing a Go implementation virtual void customEvent(QEvent* event) override { if (handle__CustomEvent == 0) { QSystemTrayIcon::customEvent(event); return; } QEvent* sigval1 = event; miqt_exec_callback_QSystemTrayIcon_CustomEvent(this, handle__CustomEvent, sigval1); } // Wrapper to allow calling protected method void virtualbase_CustomEvent(QEvent* event) { QSystemTrayIcon::customEvent(event); } // cgo.Handle value for overwritten implementation intptr_t handle__ConnectNotify = 0; // Subclass to allow providing a Go implementation virtual void connectNotify(const QMetaMethod& signal) override { if (handle__ConnectNotify == 0) { QSystemTrayIcon::connectNotify(signal); return; } const QMetaMethod& signal_ret = signal; // Cast returned reference into pointer QMetaMethod* sigval1 = const_cast(&signal_ret); miqt_exec_callback_QSystemTrayIcon_ConnectNotify(this, handle__ConnectNotify, sigval1); } // Wrapper to allow calling protected method void virtualbase_ConnectNotify(QMetaMethod* signal) { QSystemTrayIcon::connectNotify(*signal); } // cgo.Handle value for overwritten implementation intptr_t handle__DisconnectNotify = 0; // Subclass to allow providing a Go implementation virtual void disconnectNotify(const QMetaMethod& signal) override { if (handle__DisconnectNotify == 0) { QSystemTrayIcon::disconnectNotify(signal); return; } const QMetaMethod& signal_ret = signal; // Cast returned reference into pointer QMetaMethod* sigval1 = const_cast(&signal_ret); miqt_exec_callback_QSystemTrayIcon_DisconnectNotify(this, handle__DisconnectNotify, sigval1); } // Wrapper to allow calling protected method void virtualbase_DisconnectNotify(QMetaMethod* signal) { QSystemTrayIcon::disconnectNotify(*signal); } }; QSystemTrayIcon* QSystemTrayIcon_new() { return new MiqtVirtualQSystemTrayIcon(); } QSystemTrayIcon* QSystemTrayIcon_new2(QIcon* icon) { return new MiqtVirtualQSystemTrayIcon(*icon); } QSystemTrayIcon* QSystemTrayIcon_new3(QObject* parent) { return new MiqtVirtualQSystemTrayIcon(parent); } QSystemTrayIcon* QSystemTrayIcon_new4(QIcon* icon, QObject* parent) { return new MiqtVirtualQSystemTrayIcon(*icon, parent); } void QSystemTrayIcon_virtbase(QSystemTrayIcon* src, QObject** outptr_QObject) { *outptr_QObject = static_cast(src); } QMetaObject* QSystemTrayIcon_MetaObject(const QSystemTrayIcon* self) { return (QMetaObject*) self->metaObject(); } void* QSystemTrayIcon_Metacast(QSystemTrayIcon* self, const char* param1) { return self->qt_metacast(param1); } struct miqt_string QSystemTrayIcon_Tr(const char* s) { QString _ret = QSystemTrayIcon::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; } struct miqt_string QSystemTrayIcon_TrUtf8(const char* s) { QString _ret = QSystemTrayIcon::trUtf8(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; } void QSystemTrayIcon_SetContextMenu(QSystemTrayIcon* self, QMenu* menu) { self->setContextMenu(menu); } QMenu* QSystemTrayIcon_ContextMenu(const QSystemTrayIcon* self) { return self->contextMenu(); } QIcon* QSystemTrayIcon_Icon(const QSystemTrayIcon* self) { return new QIcon(self->icon()); } void QSystemTrayIcon_SetIcon(QSystemTrayIcon* self, QIcon* icon) { self->setIcon(*icon); } struct miqt_string QSystemTrayIcon_ToolTip(const QSystemTrayIcon* self) { QString _ret = self->toolTip(); // 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; } void QSystemTrayIcon_SetToolTip(QSystemTrayIcon* self, struct miqt_string tip) { QString tip_QString = QString::fromUtf8(tip.data, tip.len); self->setToolTip(tip_QString); } bool QSystemTrayIcon_IsSystemTrayAvailable() { return QSystemTrayIcon::isSystemTrayAvailable(); } bool QSystemTrayIcon_SupportsMessages() { return QSystemTrayIcon::supportsMessages(); } QRect* QSystemTrayIcon_Geometry(const QSystemTrayIcon* self) { return new QRect(self->geometry()); } bool QSystemTrayIcon_IsVisible(const QSystemTrayIcon* self) { return self->isVisible(); } void QSystemTrayIcon_SetVisible(QSystemTrayIcon* self, bool visible) { self->setVisible(visible); } void QSystemTrayIcon_Show(QSystemTrayIcon* self) { self->show(); } void QSystemTrayIcon_Hide(QSystemTrayIcon* self) { self->hide(); } void QSystemTrayIcon_ShowMessage(QSystemTrayIcon* self, struct miqt_string title, struct miqt_string msg, QIcon* icon) { QString title_QString = QString::fromUtf8(title.data, title.len); QString msg_QString = QString::fromUtf8(msg.data, msg.len); self->showMessage(title_QString, msg_QString, *icon); } void QSystemTrayIcon_ShowMessage2(QSystemTrayIcon* self, struct miqt_string title, struct miqt_string msg) { QString title_QString = QString::fromUtf8(title.data, title.len); QString msg_QString = QString::fromUtf8(msg.data, msg.len); self->showMessage(title_QString, msg_QString); } void QSystemTrayIcon_Activated(QSystemTrayIcon* self, int reason) { self->activated(static_cast(reason)); } void QSystemTrayIcon_connect_Activated(QSystemTrayIcon* self, intptr_t slot) { MiqtVirtualQSystemTrayIcon::connect(self, static_cast(&QSystemTrayIcon::activated), self, [=](QSystemTrayIcon::ActivationReason reason) { QSystemTrayIcon::ActivationReason reason_ret = reason; int sigval1 = static_cast(reason_ret); miqt_exec_callback_QSystemTrayIcon_Activated(slot, sigval1); }); } void QSystemTrayIcon_MessageClicked(QSystemTrayIcon* self) { self->messageClicked(); } void QSystemTrayIcon_connect_MessageClicked(QSystemTrayIcon* self, intptr_t slot) { MiqtVirtualQSystemTrayIcon::connect(self, static_cast(&QSystemTrayIcon::messageClicked), self, [=]() { miqt_exec_callback_QSystemTrayIcon_MessageClicked(slot); }); } struct miqt_string QSystemTrayIcon_Tr2(const char* s, const char* c) { QString _ret = QSystemTrayIcon::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 QSystemTrayIcon_Tr3(const char* s, const char* c, int n) { QString _ret = QSystemTrayIcon::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; } struct miqt_string QSystemTrayIcon_TrUtf82(const char* s, const char* c) { QString _ret = QSystemTrayIcon::trUtf8(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 QSystemTrayIcon_TrUtf83(const char* s, const char* c, int n) { QString _ret = QSystemTrayIcon::trUtf8(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; } void QSystemTrayIcon_ShowMessage4(QSystemTrayIcon* self, struct miqt_string title, struct miqt_string msg, QIcon* icon, int msecs) { QString title_QString = QString::fromUtf8(title.data, title.len); QString msg_QString = QString::fromUtf8(msg.data, msg.len); self->showMessage(title_QString, msg_QString, *icon, static_cast(msecs)); } void QSystemTrayIcon_ShowMessage3(QSystemTrayIcon* self, struct miqt_string title, struct miqt_string msg, int icon) { QString title_QString = QString::fromUtf8(title.data, title.len); QString msg_QString = QString::fromUtf8(msg.data, msg.len); self->showMessage(title_QString, msg_QString, static_cast(icon)); } void QSystemTrayIcon_ShowMessage42(QSystemTrayIcon* self, struct miqt_string title, struct miqt_string msg, int icon, int msecs) { QString title_QString = QString::fromUtf8(title.data, title.len); QString msg_QString = QString::fromUtf8(msg.data, msg.len); self->showMessage(title_QString, msg_QString, static_cast(icon), static_cast(msecs)); } void QSystemTrayIcon_override_virtual_Event(void* self, intptr_t slot) { dynamic_cast( (QSystemTrayIcon*)(self) )->handle__Event = slot; } bool QSystemTrayIcon_virtualbase_Event(void* self, QEvent* event) { return ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_Event(event); } void QSystemTrayIcon_override_virtual_EventFilter(void* self, intptr_t slot) { dynamic_cast( (QSystemTrayIcon*)(self) )->handle__EventFilter = slot; } bool QSystemTrayIcon_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) { return ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_EventFilter(watched, event); } void QSystemTrayIcon_override_virtual_TimerEvent(void* self, intptr_t slot) { dynamic_cast( (QSystemTrayIcon*)(self) )->handle__TimerEvent = slot; } void QSystemTrayIcon_virtualbase_TimerEvent(void* self, QTimerEvent* event) { ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_TimerEvent(event); } void QSystemTrayIcon_override_virtual_ChildEvent(void* self, intptr_t slot) { dynamic_cast( (QSystemTrayIcon*)(self) )->handle__ChildEvent = slot; } void QSystemTrayIcon_virtualbase_ChildEvent(void* self, QChildEvent* event) { ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_ChildEvent(event); } void QSystemTrayIcon_override_virtual_CustomEvent(void* self, intptr_t slot) { dynamic_cast( (QSystemTrayIcon*)(self) )->handle__CustomEvent = slot; } void QSystemTrayIcon_virtualbase_CustomEvent(void* self, QEvent* event) { ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_CustomEvent(event); } void QSystemTrayIcon_override_virtual_ConnectNotify(void* self, intptr_t slot) { dynamic_cast( (QSystemTrayIcon*)(self) )->handle__ConnectNotify = slot; } void QSystemTrayIcon_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) { ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_ConnectNotify(signal); } void QSystemTrayIcon_override_virtual_DisconnectNotify(void* self, intptr_t slot) { dynamic_cast( (QSystemTrayIcon*)(self) )->handle__DisconnectNotify = slot; } void QSystemTrayIcon_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) { ( (MiqtVirtualQSystemTrayIcon*)(self) )->virtualbase_DisconnectNotify(signal); } void QSystemTrayIcon_Delete(QSystemTrayIcon* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); } else { delete self; } }