2024-08-25 04:08:24 +00:00
|
|
|
#include <QMetaObject>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QObject>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QSocketDescriptor>
|
|
|
|
#include <QSocketNotifier>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
|
|
|
#include "qsocketnotifier.h"
|
|
|
|
#include "gen_qsocketnotifier.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QSocketNotifier* QSocketNotifier_new(intptr_t socket, int param2) {
|
2024-09-18 01:43:25 +00:00
|
|
|
return new QSocketNotifier(static_cast<qintptr>(socket), static_cast<QSocketNotifier::Type>(param2));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QSocketNotifier* QSocketNotifier_new2(intptr_t socket, int param2, QObject* parent) {
|
2024-09-18 01:43:25 +00:00
|
|
|
return new QSocketNotifier(static_cast<qintptr>(socket), static_cast<QSocketNotifier::Type>(param2), parent);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QSocketNotifier_MetaObject(const QSocketNotifier* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
void* QSocketNotifier_Metacast(QSocketNotifier* self, const char* param1) {
|
|
|
|
return self->qt_metacast(param1);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QSocketNotifier_Tr(const char* s) {
|
|
|
|
QString _ret = QSocketNotifier::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* QSocketNotifier_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QSocketNotifier::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
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
intptr_t QSocketNotifier_Socket(const QSocketNotifier* self) {
|
|
|
|
qintptr _ret = self->socket();
|
|
|
|
return static_cast<intptr_t>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QSocketNotifier_Type(const QSocketNotifier* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QSocketNotifier::Type _ret = self->type();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QSocketNotifier_IsEnabled(const QSocketNotifier* self) {
|
|
|
|
return self->isEnabled();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QSocketNotifier_SetEnabled(QSocketNotifier* self, bool enabled) {
|
|
|
|
self->setEnabled(enabled);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QSocketNotifier_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QSocketNotifier::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* QSocketNotifier_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QSocketNotifier::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* QSocketNotifier_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QSocketNotifier::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* QSocketNotifier_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QSocketNotifier::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
|
|
|
}
|
|
|
|
|
|
|
|
void QSocketNotifier_Delete(QSocketNotifier* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QSocketDescriptor* QSocketDescriptor_new() {
|
|
|
|
return new QSocketDescriptor();
|
|
|
|
}
|
|
|
|
|
|
|
|
QSocketDescriptor* QSocketDescriptor_new2(QSocketDescriptor* param1) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QSocketDescriptor(*param1);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QSocketDescriptor* QSocketDescriptor_new3(int descriptor) {
|
2024-09-01 06:50:19 +00:00
|
|
|
#ifdef Q_OS_LINUX
|
2024-08-29 07:01:51 +00:00
|
|
|
return new QSocketDescriptor(static_cast<QSocketDescriptor::DescriptorType>(descriptor));
|
2024-09-01 06:50:19 +00:00
|
|
|
#else
|
|
|
|
return nullptr;
|
|
|
|
#endif
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QSocketDescriptor_IsValid(const QSocketDescriptor* self) {
|
|
|
|
return self->isValid();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QSocketDescriptor_Delete(QSocketDescriptor* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|