2024-08-25 04:08:24 +00:00
|
|
|
#include <QOperatingSystemVersion>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qoperatingsystemversion.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qoperatingsystemversion.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QOperatingSystemVersion_new(int osType, int vmajor, QOperatingSystemVersion** outptr_QOperatingSystemVersion) {
|
|
|
|
QOperatingSystemVersion* ret = new QOperatingSystemVersion(static_cast<QOperatingSystemVersion::OSType>(osType), static_cast<int>(vmajor));
|
|
|
|
*outptr_QOperatingSystemVersion = ret;
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QOperatingSystemVersion_new2(int osType, int vmajor, int vminor, QOperatingSystemVersion** outptr_QOperatingSystemVersion) {
|
|
|
|
QOperatingSystemVersion* ret = new QOperatingSystemVersion(static_cast<QOperatingSystemVersion::OSType>(osType), static_cast<int>(vmajor), static_cast<int>(vminor));
|
|
|
|
*outptr_QOperatingSystemVersion = ret;
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QOperatingSystemVersion_new3(int osType, int vmajor, int vminor, int vmicro, QOperatingSystemVersion** outptr_QOperatingSystemVersion) {
|
|
|
|
QOperatingSystemVersion* ret = new QOperatingSystemVersion(static_cast<QOperatingSystemVersion::OSType>(osType), static_cast<int>(vmajor), static_cast<int>(vminor), static_cast<int>(vmicro));
|
|
|
|
*outptr_QOperatingSystemVersion = ret;
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
QOperatingSystemVersion* QOperatingSystemVersion_Current() {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QOperatingSystemVersion(QOperatingSystemVersion::current());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QOperatingSystemVersion_CurrentType() {
|
2024-09-14 22:29:05 +00:00
|
|
|
QOperatingSystemVersion::OSType _ret = QOperatingSystemVersion::currentType();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QOperatingSystemVersion_MajorVersion(const QOperatingSystemVersion* self) {
|
|
|
|
return self->majorVersion();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QOperatingSystemVersion_MinorVersion(const QOperatingSystemVersion* self) {
|
|
|
|
return self->minorVersion();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QOperatingSystemVersion_MicroVersion(const QOperatingSystemVersion* self) {
|
|
|
|
return self->microVersion();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QOperatingSystemVersion_SegmentCount(const QOperatingSystemVersion* self) {
|
|
|
|
return self->segmentCount();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QOperatingSystemVersion_Type(const QOperatingSystemVersion* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QOperatingSystemVersion::OSType _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-10-18 23:53:33 +00:00
|
|
|
struct miqt_string QOperatingSystemVersion_Name(const QOperatingSystemVersion* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QString _ret = self->name();
|
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();
|
2024-10-18 23:53:33 +00:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QOperatingSystemVersion_Delete(QOperatingSystemVersion* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<QOperatingSystemVersion*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|