2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qlibraryinfo.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QLibraryInfo__LibraryLocation int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QLibraryInfo__PrefixPath QLibraryInfo__LibraryLocation = 0
|
|
|
|
QLibraryInfo__DocumentationPath QLibraryInfo__LibraryLocation = 1
|
|
|
|
QLibraryInfo__HeadersPath QLibraryInfo__LibraryLocation = 2
|
|
|
|
QLibraryInfo__LibrariesPath QLibraryInfo__LibraryLocation = 3
|
|
|
|
QLibraryInfo__LibraryExecutablesPath QLibraryInfo__LibraryLocation = 4
|
|
|
|
QLibraryInfo__BinariesPath QLibraryInfo__LibraryLocation = 5
|
|
|
|
QLibraryInfo__PluginsPath QLibraryInfo__LibraryLocation = 6
|
|
|
|
QLibraryInfo__ImportsPath QLibraryInfo__LibraryLocation = 7
|
|
|
|
QLibraryInfo__Qml2ImportsPath QLibraryInfo__LibraryLocation = 8
|
|
|
|
QLibraryInfo__ArchDataPath QLibraryInfo__LibraryLocation = 9
|
|
|
|
QLibraryInfo__DataPath QLibraryInfo__LibraryLocation = 10
|
|
|
|
QLibraryInfo__TranslationsPath QLibraryInfo__LibraryLocation = 11
|
|
|
|
QLibraryInfo__ExamplesPath QLibraryInfo__LibraryLocation = 12
|
|
|
|
QLibraryInfo__TestsPath QLibraryInfo__LibraryLocation = 13
|
|
|
|
QLibraryInfo__SettingsPath QLibraryInfo__LibraryLocation = 100
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QLibraryInfo struct {
|
|
|
|
h *C.QLibraryInfo
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QLibraryInfo) cPointer() *C.QLibraryInfo {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QLibraryInfo) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func newQLibraryInfo(h *C.QLibraryInfo) *QLibraryInfo {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QLibraryInfo{h: h}
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func UnsafeNewQLibraryInfo(h unsafe.Pointer) *QLibraryInfo {
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQLibraryInfo((*C.QLibraryInfo)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func QLibraryInfo_Licensee() string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QLibraryInfo_Licensee()
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QLibraryInfo_LicensedProducts() string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QLibraryInfo_LicensedProducts()
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QLibraryInfo_BuildDate() *QDate {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QLibraryInfo_BuildDate()
|
|
|
|
_goptr := newQDate(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func QLibraryInfo_Build() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QLibraryInfo_Build()
|
2024-10-18 23:53:33 +00:00
|
|
|
return C.GoString(_ret)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QLibraryInfo_IsDebugBuild() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QLibraryInfo_IsDebugBuild())
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QLibraryInfo_Version() *QVersionNumber {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QLibraryInfo_Version()
|
|
|
|
_goptr := newQVersionNumber(_ret)
|
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func QLibraryInfo_Location(param1 QLibraryInfo__LibraryLocation) string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QLibraryInfo_Location((C.int)(param1))
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QLibraryInfo_PlatformPluginArguments(platformName string) []string {
|
2024-10-18 23:53:33 +00:00
|
|
|
platformName_ms := C.struct_miqt_string{}
|
|
|
|
platformName_ms.data = C.CString(platformName)
|
|
|
|
platformName_ms.len = C.size_t(len(platformName))
|
|
|
|
defer C.free(unsafe.Pointer(platformName_ms.data))
|
2024-11-04 07:18:27 +00:00
|
|
|
var _ma C.struct_miqt_array = C.QLibraryInfo_PlatformPluginArguments(platformName_ms)
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := make([]string, int(_ma.len))
|
2024-10-18 23:53:33 +00:00
|
|
|
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _lv_ms C.struct_miqt_string = _outCast[i]
|
|
|
|
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_lv_ms.data))
|
2024-09-17 07:30:27 +00:00
|
|
|
_ret[i] = _lv_ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QLibraryInfo) Delete() {
|
|
|
|
C.QLibraryInfo_Delete(this.h)
|
|
|
|
}
|
2024-09-14 22:29:05 +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 *QLibraryInfo) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QLibraryInfo) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|