2024-08-25 16:08:24 +12:00
|
|
|
#include <QOperatingSystemVersion>
|
|
|
|
#include <QString>
|
2024-08-29 19:01:51 +12:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
|
|
|
#include "qoperatingsystemversion.h"
|
|
|
|
#include "gen_qoperatingsystemversion.h"
|
2024-09-15 10:29:05 +12:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 16:08:24 +12:00
|
|
|
|
2024-09-18 12:12:02 +12:00
|
|
|
QOperatingSystemVersion* QOperatingSystemVersion_new(int osType, int vmajor) {
|
2024-08-29 19:01:51 +12:00
|
|
|
return new QOperatingSystemVersion(static_cast<QOperatingSystemVersion::OSType>(osType), static_cast<int>(vmajor));
|
|
|
|
}
|
|
|
|
|
2024-09-18 12:12:02 +12:00
|
|
|
QOperatingSystemVersion* QOperatingSystemVersion_new2(int osType, int vmajor, int vminor) {
|
2024-08-29 19:01:51 +12:00
|
|
|
return new QOperatingSystemVersion(static_cast<QOperatingSystemVersion::OSType>(osType), static_cast<int>(vmajor), static_cast<int>(vminor));
|
|
|
|
}
|
|
|
|
|
2024-09-18 12:12:02 +12:00
|
|
|
QOperatingSystemVersion* QOperatingSystemVersion_new3(int osType, int vmajor, int vminor, int vmicro) {
|
2024-08-29 19:01:51 +12:00
|
|
|
return new QOperatingSystemVersion(static_cast<QOperatingSystemVersion::OSType>(osType), static_cast<int>(vmajor), static_cast<int>(vminor), static_cast<int>(vmicro));
|
|
|
|
}
|
|
|
|
|
2024-08-25 16:08:24 +12:00
|
|
|
QOperatingSystemVersion* QOperatingSystemVersion_Current() {
|
2024-09-17 18:29:11 +12:00
|
|
|
return new QOperatingSystemVersion(QOperatingSystemVersion::current());
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2024-09-18 12:12:02 +12:00
|
|
|
int QOperatingSystemVersion_CurrentType() {
|
2024-09-15 10:29:05 +12:00
|
|
|
QOperatingSystemVersion::OSType _ret = QOperatingSystemVersion::currentType();
|
2024-09-18 12:12:02 +12:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 19:01:51 +12:00
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
int QOperatingSystemVersion_MajorVersion(const QOperatingSystemVersion* self) {
|
|
|
|
return self->majorVersion();
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
int QOperatingSystemVersion_MinorVersion(const QOperatingSystemVersion* self) {
|
|
|
|
return self->minorVersion();
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
int QOperatingSystemVersion_MicroVersion(const QOperatingSystemVersion* self) {
|
|
|
|
return self->microVersion();
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
int QOperatingSystemVersion_SegmentCount(const QOperatingSystemVersion* self) {
|
|
|
|
return self->segmentCount();
|
2024-08-29 19:01:51 +12:00
|
|
|
}
|
|
|
|
|
2024-09-18 12:12:02 +12:00
|
|
|
int QOperatingSystemVersion_Type(const QOperatingSystemVersion* self) {
|
2024-09-15 10:29:05 +12:00
|
|
|
QOperatingSystemVersion::OSType _ret = self->type();
|
2024-09-18 12:12:02 +12:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2024-09-15 10:29:05 +12:00
|
|
|
struct miqt_string* QOperatingSystemVersion_Name(const QOperatingSystemVersion* self) {
|
|
|
|
QString _ret = self->name();
|
2024-08-25 16:08:24 +12:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-15 10:29:05 +12:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
|
|
|
void QOperatingSystemVersion_Delete(QOperatingSystemVersion* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|