2024-08-25 04:08:24 +00:00
|
|
|
#include <QIcon>
|
|
|
|
#include <QMenu>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QRect>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QSystemTrayIcon>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qsystemtrayicon.h"
|
|
|
|
#include "gen_qsystemtrayicon.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QSystemTrayIcon* QSystemTrayIcon_new() {
|
|
|
|
return new QSystemTrayIcon();
|
|
|
|
}
|
|
|
|
|
|
|
|
QSystemTrayIcon* QSystemTrayIcon_new2(QIcon* icon) {
|
|
|
|
return new QSystemTrayIcon(*icon);
|
|
|
|
}
|
|
|
|
|
|
|
|
QSystemTrayIcon* QSystemTrayIcon_new3(QObject* parent) {
|
|
|
|
return new QSystemTrayIcon(parent);
|
|
|
|
}
|
|
|
|
|
|
|
|
QSystemTrayIcon* QSystemTrayIcon_new4(QIcon* icon, QObject* parent) {
|
|
|
|
return new QSystemTrayIcon(*icon, parent);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QSystemTrayIcon_MetaObject(const QSystemTrayIcon* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QSystemTrayIcon_Tr(const char* s) {
|
|
|
|
QString _ret = QSystemTrayIcon::tr(s);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QSystemTrayIcon_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QSystemTrayIcon::trUtf8(s);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QSystemTrayIcon_SetContextMenu(QSystemTrayIcon* self, QMenu* menu) {
|
|
|
|
self->setContextMenu(menu);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMenu* QSystemTrayIcon_ContextMenu(const QSystemTrayIcon* self) {
|
|
|
|
return self->contextMenu();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QIcon* QSystemTrayIcon_Icon(const QSystemTrayIcon* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QIcon _ret = self->icon();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QIcon*>(new QIcon(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QSystemTrayIcon_SetIcon(QSystemTrayIcon* self, QIcon* icon) {
|
|
|
|
self->setIcon(*icon);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QSystemTrayIcon_ToolTip(const QSystemTrayIcon* self) {
|
|
|
|
QString _ret = self->toolTip();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QSystemTrayIcon_SetToolTip(QSystemTrayIcon* self, struct miqt_string* tip) {
|
|
|
|
QString tip_QString = QString::fromUtf8(&tip->data, tip->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setToolTip(tip_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QSystemTrayIcon_IsSystemTrayAvailable() {
|
|
|
|
return QSystemTrayIcon::isSystemTrayAvailable();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QSystemTrayIcon_SupportsMessages() {
|
|
|
|
return QSystemTrayIcon::supportsMessages();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QSystemTrayIcon_Geometry(const QSystemTrayIcon* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QRect _ret = self->geometry();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QRect*>(new QRect(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QSystemTrayIcon_IsVisible(const QSystemTrayIcon* self) {
|
|
|
|
return self->isVisible();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QSystemTrayIcon_SetVisible(QSystemTrayIcon* self, bool visible) {
|
|
|
|
self->setVisible(visible);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QSystemTrayIcon_Show(QSystemTrayIcon* self) {
|
|
|
|
self->show();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QSystemTrayIcon_Hide(QSystemTrayIcon* self) {
|
|
|
|
self->hide();
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
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);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->showMessage(title_QString, msg_QString, *icon);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
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);
|
2024-08-29 07:01:51 +00:00
|
|
|
self->showMessage(title_QString, msg_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QSystemTrayIcon_Activated(QSystemTrayIcon* self, uintptr_t reason) {
|
|
|
|
self->activated(static_cast<QSystemTrayIcon::ActivationReason>(reason));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QSystemTrayIcon_connect_Activated(QSystemTrayIcon* self, void* slot) {
|
|
|
|
QSystemTrayIcon::connect(self, static_cast<void (QSystemTrayIcon::*)(QSystemTrayIcon::ActivationReason)>(&QSystemTrayIcon::activated), self, [=](QSystemTrayIcon::ActivationReason reason) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QSystemTrayIcon::ActivationReason reason_ret = reason;
|
|
|
|
uintptr_t sigval1 = static_cast<uintptr_t>(reason_ret);
|
|
|
|
miqt_exec_callback_QSystemTrayIcon_Activated(slot, sigval1);
|
2024-08-29 07:01:51 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QSystemTrayIcon_MessageClicked(QSystemTrayIcon* self) {
|
|
|
|
self->messageClicked();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QSystemTrayIcon_connect_MessageClicked(QSystemTrayIcon* self, void* slot) {
|
|
|
|
QSystemTrayIcon::connect(self, static_cast<void (QSystemTrayIcon::*)()>(&QSystemTrayIcon::messageClicked), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QSystemTrayIcon_MessageClicked(slot);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QSystemTrayIcon_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QSystemTrayIcon::tr(s, c);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QSystemTrayIcon_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QSystemTrayIcon::tr(s, c, static_cast<int>(n));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QSystemTrayIcon_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QSystemTrayIcon::trUtf8(s, c);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QSystemTrayIcon_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QSystemTrayIcon::trUtf8(s, c, static_cast<int>(n));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
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);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->showMessage(title_QString, msg_QString, *icon, static_cast<int>(msecs));
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QSystemTrayIcon_ShowMessage3(QSystemTrayIcon* self, struct miqt_string* title, struct miqt_string* msg, uintptr_t icon) {
|
|
|
|
QString title_QString = QString::fromUtf8(&title->data, title->len);
|
|
|
|
QString msg_QString = QString::fromUtf8(&msg->data, msg->len);
|
2024-08-29 07:01:51 +00:00
|
|
|
self->showMessage(title_QString, msg_QString, static_cast<QSystemTrayIcon::MessageIcon>(icon));
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QSystemTrayIcon_ShowMessage42(QSystemTrayIcon* self, struct miqt_string* title, struct miqt_string* msg, uintptr_t icon, int msecs) {
|
|
|
|
QString title_QString = QString::fromUtf8(&title->data, title->len);
|
|
|
|
QString msg_QString = QString::fromUtf8(&msg->data, msg->len);
|
2024-08-29 07:01:51 +00:00
|
|
|
self->showMessage(title_QString, msg_QString, static_cast<QSystemTrayIcon::MessageIcon>(icon), static_cast<int>(msecs));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QSystemTrayIcon_Delete(QSystemTrayIcon* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|