miqt/qt6/gen_qoperatingsystemversion.go

302 lines
11 KiB
Go
Raw Normal View History

2024-10-20 05:21:03 +00:00
package qt6
/*
#include "gen_qoperatingsystemversion.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QOperatingSystemVersionBase__OSType int
const (
QOperatingSystemVersionBase__Unknown QOperatingSystemVersionBase__OSType = 0
QOperatingSystemVersionBase__Windows QOperatingSystemVersionBase__OSType = 1
QOperatingSystemVersionBase__MacOS QOperatingSystemVersionBase__OSType = 2
QOperatingSystemVersionBase__IOS QOperatingSystemVersionBase__OSType = 3
QOperatingSystemVersionBase__TvOS QOperatingSystemVersionBase__OSType = 4
QOperatingSystemVersionBase__WatchOS QOperatingSystemVersionBase__OSType = 5
QOperatingSystemVersionBase__Android QOperatingSystemVersionBase__OSType = 6
)
type QOperatingSystemVersion__OSType int
const (
QOperatingSystemVersion__Unknown QOperatingSystemVersion__OSType = 0
QOperatingSystemVersion__Windows QOperatingSystemVersion__OSType = 1
QOperatingSystemVersion__MacOS QOperatingSystemVersion__OSType = 2
QOperatingSystemVersion__IOS QOperatingSystemVersion__OSType = 3
QOperatingSystemVersion__TvOS QOperatingSystemVersion__OSType = 4
QOperatingSystemVersion__WatchOS QOperatingSystemVersion__OSType = 5
QOperatingSystemVersion__Android QOperatingSystemVersion__OSType = 6
)
type QOperatingSystemVersionBase struct {
2024-11-19 06:29:06 +00:00
h *C.QOperatingSystemVersionBase
isSubclass bool
2024-10-20 05:21:03 +00:00
}
func (this *QOperatingSystemVersionBase) cPointer() *C.QOperatingSystemVersionBase {
if this == nil {
return nil
}
return this.h
}
func (this *QOperatingSystemVersionBase) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQOperatingSystemVersionBase constructs the type using only CGO pointers.
2024-10-20 05:21:03 +00:00
func newQOperatingSystemVersionBase(h *C.QOperatingSystemVersionBase) *QOperatingSystemVersionBase {
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
2024-10-20 05:21:03 +00:00
return &QOperatingSystemVersionBase{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQOperatingSystemVersionBase constructs the type using only unsafe pointers.
2024-10-20 05:21:03 +00:00
func UnsafeNewQOperatingSystemVersionBase(h unsafe.Pointer) *QOperatingSystemVersionBase {
2024-12-07 04:15:57 +00:00
return newQOperatingSystemVersionBase((*C.QOperatingSystemVersionBase)(h))
2024-10-20 05:21:03 +00:00
}
// NewQOperatingSystemVersionBase constructs a new QOperatingSystemVersionBase object.
func NewQOperatingSystemVersionBase(osType QOperatingSystemVersionBase__OSType, vmajor int) *QOperatingSystemVersionBase {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQOperatingSystemVersionBase(C.QOperatingSystemVersionBase_new((C.int)(osType), (C.int)(vmajor)))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQOperatingSystemVersionBase2 constructs a new QOperatingSystemVersionBase object.
func NewQOperatingSystemVersionBase2(param1 *QOperatingSystemVersionBase) *QOperatingSystemVersionBase {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQOperatingSystemVersionBase(C.QOperatingSystemVersionBase_new2(param1.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQOperatingSystemVersionBase3 constructs a new QOperatingSystemVersionBase object.
func NewQOperatingSystemVersionBase3(osType QOperatingSystemVersionBase__OSType, vmajor int, vminor int) *QOperatingSystemVersionBase {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQOperatingSystemVersionBase(C.QOperatingSystemVersionBase_new3((C.int)(osType), (C.int)(vmajor), (C.int)(vminor)))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQOperatingSystemVersionBase4 constructs a new QOperatingSystemVersionBase object.
func NewQOperatingSystemVersionBase4(osType QOperatingSystemVersionBase__OSType, vmajor int, vminor int, vmicro int) *QOperatingSystemVersionBase {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQOperatingSystemVersionBase(C.QOperatingSystemVersionBase_new4((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), (C.int)(vmicro)))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
func QOperatingSystemVersionBase_Current() *QOperatingSystemVersionBase {
_goptr := newQOperatingSystemVersionBase(C.QOperatingSystemVersionBase_Current())
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func QOperatingSystemVersionBase_Name(osversion QOperatingSystemVersionBase) string {
var _ms C.struct_miqt_string = C.QOperatingSystemVersionBase_Name(osversion.cPointer())
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QOperatingSystemVersionBase_CurrentType() QOperatingSystemVersionBase__OSType {
return (QOperatingSystemVersionBase__OSType)(C.QOperatingSystemVersionBase_CurrentType())
}
func (this *QOperatingSystemVersionBase) Version() *QVersionNumber {
_goptr := newQVersionNumber(C.QOperatingSystemVersionBase_Version(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QOperatingSystemVersionBase) MajorVersion() int {
return (int)(C.QOperatingSystemVersionBase_MajorVersion(this.h))
}
func (this *QOperatingSystemVersionBase) MinorVersion() int {
return (int)(C.QOperatingSystemVersionBase_MinorVersion(this.h))
}
func (this *QOperatingSystemVersionBase) MicroVersion() int {
return (int)(C.QOperatingSystemVersionBase_MicroVersion(this.h))
}
func (this *QOperatingSystemVersionBase) SegmentCount() int {
return (int)(C.QOperatingSystemVersionBase_SegmentCount(this.h))
}
func (this *QOperatingSystemVersionBase) Type() QOperatingSystemVersionBase__OSType {
return (QOperatingSystemVersionBase__OSType)(C.QOperatingSystemVersionBase_Type(this.h))
}
func (this *QOperatingSystemVersionBase) Name2() string {
var _ms C.struct_miqt_string = C.QOperatingSystemVersionBase_Name2(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
// Delete this object from C++ memory.
func (this *QOperatingSystemVersionBase) Delete() {
2024-11-19 06:29:06 +00:00
C.QOperatingSystemVersionBase_Delete(this.h, C.bool(this.isSubclass))
2024-10-20 05:21:03 +00:00
}
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
// from C++ memory once it is unreachable from Go memory.
func (this *QOperatingSystemVersionBase) GoGC() {
runtime.SetFinalizer(this, func(this *QOperatingSystemVersionBase) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QOperatingSystemVersion struct {
2024-11-19 06:29:06 +00:00
h *C.QOperatingSystemVersion
isSubclass bool
2024-10-20 05:21:03 +00:00
*QOperatingSystemVersionBase
}
func (this *QOperatingSystemVersion) cPointer() *C.QOperatingSystemVersion {
if this == nil {
return nil
}
return this.h
}
func (this *QOperatingSystemVersion) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQOperatingSystemVersion constructs the type using only CGO pointers.
2024-12-07 04:15:57 +00:00
func newQOperatingSystemVersion(h *C.QOperatingSystemVersion) *QOperatingSystemVersion {
2024-10-20 05:21:03 +00:00
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil
C.QOperatingSystemVersion_virtbase(h, &outptr_QOperatingSystemVersionBase)
2024-11-19 06:29:06 +00:00
return &QOperatingSystemVersion{h: h,
2024-12-07 04:15:57 +00:00
QOperatingSystemVersionBase: newQOperatingSystemVersionBase(outptr_QOperatingSystemVersionBase)}
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQOperatingSystemVersion constructs the type using only unsafe pointers.
2024-12-07 04:15:57 +00:00
func UnsafeNewQOperatingSystemVersion(h unsafe.Pointer) *QOperatingSystemVersion {
return newQOperatingSystemVersion((*C.QOperatingSystemVersion)(h))
2024-10-20 05:21:03 +00:00
}
// NewQOperatingSystemVersion constructs a new QOperatingSystemVersion object.
func NewQOperatingSystemVersion(osversion *QOperatingSystemVersionBase) *QOperatingSystemVersion {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQOperatingSystemVersion(C.QOperatingSystemVersion_new(osversion.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQOperatingSystemVersion2 constructs a new QOperatingSystemVersion object.
func NewQOperatingSystemVersion2(osType QOperatingSystemVersion__OSType, vmajor int) *QOperatingSystemVersion {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQOperatingSystemVersion(C.QOperatingSystemVersion_new2((C.int)(osType), (C.int)(vmajor)))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQOperatingSystemVersion3 constructs a new QOperatingSystemVersion object.
func NewQOperatingSystemVersion3(param1 *QOperatingSystemVersion) *QOperatingSystemVersion {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQOperatingSystemVersion(C.QOperatingSystemVersion_new3(param1.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQOperatingSystemVersion4 constructs a new QOperatingSystemVersion object.
func NewQOperatingSystemVersion4(osType QOperatingSystemVersion__OSType, vmajor int, vminor int) *QOperatingSystemVersion {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQOperatingSystemVersion(C.QOperatingSystemVersion_new4((C.int)(osType), (C.int)(vmajor), (C.int)(vminor)))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQOperatingSystemVersion5 constructs a new QOperatingSystemVersion object.
func NewQOperatingSystemVersion5(osType QOperatingSystemVersion__OSType, vmajor int, vminor int, vmicro int) *QOperatingSystemVersion {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQOperatingSystemVersion(C.QOperatingSystemVersion_new5((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), (C.int)(vmicro)))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
func QOperatingSystemVersion_Current() *QOperatingSystemVersion {
2024-12-07 04:15:57 +00:00
_goptr := newQOperatingSystemVersion(C.QOperatingSystemVersion_Current())
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func QOperatingSystemVersion_CurrentType() QOperatingSystemVersion__OSType {
return (QOperatingSystemVersion__OSType)(C.QOperatingSystemVersion_CurrentType())
}
func (this *QOperatingSystemVersion) Version() *QVersionNumber {
_goptr := newQVersionNumber(C.QOperatingSystemVersion_Version(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QOperatingSystemVersion) MajorVersion() int {
return (int)(C.QOperatingSystemVersion_MajorVersion(this.h))
}
func (this *QOperatingSystemVersion) MinorVersion() int {
return (int)(C.QOperatingSystemVersion_MinorVersion(this.h))
}
func (this *QOperatingSystemVersion) MicroVersion() int {
return (int)(C.QOperatingSystemVersion_MicroVersion(this.h))
}
func (this *QOperatingSystemVersion) SegmentCount() int {
return (int)(C.QOperatingSystemVersion_SegmentCount(this.h))
}
func (this *QOperatingSystemVersion) Type() QOperatingSystemVersion__OSType {
return (QOperatingSystemVersion__OSType)(C.QOperatingSystemVersion_Type(this.h))
}
func (this *QOperatingSystemVersion) Name() string {
var _ms C.struct_miqt_string = C.QOperatingSystemVersion_Name(this.h)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
// Delete this object from C++ memory.
func (this *QOperatingSystemVersion) Delete() {
2024-11-19 06:29:06 +00:00
C.QOperatingSystemVersion_Delete(this.h, C.bool(this.isSubclass))
2024-10-20 05:21:03 +00:00
}
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
// from C++ memory once it is unreachable from Go memory.
func (this *QOperatingSystemVersion) GoGC() {
runtime.SetFinalizer(this, func(this *QOperatingSystemVersion) {
this.Delete()
runtime.KeepAlive(this.h)
})
}