2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qdir.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QDir__Filter int
|
|
|
|
|
|
|
|
const (
|
|
|
|
QDir__Filter__Dirs QDir__Filter = 1
|
|
|
|
QDir__Filter__Files QDir__Filter = 2
|
|
|
|
QDir__Filter__Drives QDir__Filter = 4
|
|
|
|
QDir__Filter__NoSymLinks QDir__Filter = 8
|
|
|
|
QDir__Filter__AllEntries QDir__Filter = 7
|
|
|
|
QDir__Filter__TypeMask QDir__Filter = 15
|
|
|
|
QDir__Filter__Readable QDir__Filter = 16
|
|
|
|
QDir__Filter__Writable QDir__Filter = 32
|
|
|
|
QDir__Filter__Executable QDir__Filter = 64
|
|
|
|
QDir__Filter__PermissionMask QDir__Filter = 112
|
|
|
|
QDir__Filter__Modified QDir__Filter = 128
|
|
|
|
QDir__Filter__Hidden QDir__Filter = 256
|
|
|
|
QDir__Filter__System QDir__Filter = 512
|
|
|
|
QDir__Filter__AccessMask QDir__Filter = 1008
|
|
|
|
QDir__Filter__AllDirs QDir__Filter = 1024
|
|
|
|
QDir__Filter__CaseSensitive QDir__Filter = 2048
|
|
|
|
QDir__Filter__NoDot QDir__Filter = 8192
|
|
|
|
QDir__Filter__NoDotDot QDir__Filter = 16384
|
|
|
|
QDir__Filter__NoDotAndDotDot QDir__Filter = 24576
|
|
|
|
QDir__Filter__NoFilter QDir__Filter = -1
|
|
|
|
)
|
|
|
|
|
|
|
|
type QDir__SortFlag int
|
|
|
|
|
|
|
|
const (
|
|
|
|
QDir__SortFlag__Name QDir__SortFlag = 0
|
|
|
|
QDir__SortFlag__Time QDir__SortFlag = 1
|
|
|
|
QDir__SortFlag__Size QDir__SortFlag = 2
|
|
|
|
QDir__SortFlag__Unsorted QDir__SortFlag = 3
|
|
|
|
QDir__SortFlag__SortByMask QDir__SortFlag = 3
|
|
|
|
QDir__SortFlag__DirsFirst QDir__SortFlag = 4
|
|
|
|
QDir__SortFlag__Reversed QDir__SortFlag = 8
|
|
|
|
QDir__SortFlag__IgnoreCase QDir__SortFlag = 16
|
|
|
|
QDir__SortFlag__DirsLast QDir__SortFlag = 32
|
|
|
|
QDir__SortFlag__LocaleAware QDir__SortFlag = 64
|
|
|
|
QDir__SortFlag__Type QDir__SortFlag = 128
|
|
|
|
QDir__SortFlag__NoSort QDir__SortFlag = -1
|
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QDir struct {
|
|
|
|
h *C.QDir
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) cPointer() *C.QDir {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQDir(h *C.QDir) *QDir {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QDir{h: h}
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQDir_U(h unsafe.Pointer) *QDir {
|
|
|
|
return newQDir((*C.QDir)(h))
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDir constructs a new QDir object.
|
|
|
|
func NewQDir(param1 *QDir) *QDir {
|
|
|
|
ret := C.QDir_new(param1.cPointer())
|
|
|
|
return newQDir(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDir2 constructs a new QDir object.
|
|
|
|
func NewQDir2() *QDir {
|
|
|
|
ret := C.QDir_new2()
|
|
|
|
return newQDir(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDir3 constructs a new QDir object.
|
2024-08-29 07:01:51 +00:00
|
|
|
func NewQDir3(path string, nameFilter string) *QDir {
|
2024-09-14 22:29:05 +00:00
|
|
|
path_ms := miqt_strdupg(path)
|
|
|
|
defer C.free(path_ms)
|
|
|
|
nameFilter_ms := miqt_strdupg(nameFilter)
|
|
|
|
defer C.free(nameFilter_ms)
|
|
|
|
ret := C.QDir_new3((*C.struct_miqt_string)(path_ms), (*C.struct_miqt_string)(nameFilter_ms))
|
2024-08-29 07:01:51 +00:00
|
|
|
return newQDir(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDir4 constructs a new QDir object.
|
|
|
|
func NewQDir4(path string) *QDir {
|
2024-09-14 22:29:05 +00:00
|
|
|
path_ms := miqt_strdupg(path)
|
|
|
|
defer C.free(path_ms)
|
|
|
|
ret := C.QDir_new4((*C.struct_miqt_string)(path_ms))
|
2024-08-29 07:01:51 +00:00
|
|
|
return newQDir(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDir5 constructs a new QDir object.
|
|
|
|
func NewQDir5(path string, nameFilter string, sort int) *QDir {
|
2024-09-14 22:29:05 +00:00
|
|
|
path_ms := miqt_strdupg(path)
|
|
|
|
defer C.free(path_ms)
|
|
|
|
nameFilter_ms := miqt_strdupg(nameFilter)
|
|
|
|
defer C.free(nameFilter_ms)
|
2024-09-18 00:12:02 +00:00
|
|
|
ret := C.QDir_new5((*C.struct_miqt_string)(path_ms), (*C.struct_miqt_string)(nameFilter_ms), sort)
|
2024-08-29 07:01:51 +00:00
|
|
|
return newQDir(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQDir6 constructs a new QDir object.
|
|
|
|
func NewQDir6(path string, nameFilter string, sort int, filter int) *QDir {
|
2024-09-14 22:29:05 +00:00
|
|
|
path_ms := miqt_strdupg(path)
|
|
|
|
defer C.free(path_ms)
|
|
|
|
nameFilter_ms := miqt_strdupg(nameFilter)
|
|
|
|
defer C.free(nameFilter_ms)
|
2024-09-18 00:12:02 +00:00
|
|
|
ret := C.QDir_new6((*C.struct_miqt_string)(path_ms), (*C.struct_miqt_string)(nameFilter_ms), sort, filter)
|
2024-08-25 04:08:24 +00:00
|
|
|
return newQDir(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) OperatorAssign(param1 *QDir) {
|
|
|
|
C.QDir_OperatorAssign(this.h, param1.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) OperatorAssignWithPath(path string) {
|
2024-09-14 22:29:05 +00:00
|
|
|
path_ms := miqt_strdupg(path)
|
|
|
|
defer C.free(path_ms)
|
|
|
|
C.QDir_OperatorAssignWithPath(this.h, (*C.struct_miqt_string)(path_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) Swap(other *QDir) {
|
|
|
|
C.QDir_Swap(this.h, other.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) SetPath(path string) {
|
2024-09-14 22:29:05 +00:00
|
|
|
path_ms := miqt_strdupg(path)
|
|
|
|
defer C.free(path_ms)
|
|
|
|
C.QDir_SetPath(this.h, (*C.struct_miqt_string)(path_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) Path() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QDir_Path(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) AbsolutePath() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QDir_AbsolutePath(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) CanonicalPath() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QDir_CanonicalPath(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_AddResourceSearchPath(path string) {
|
2024-09-14 22:29:05 +00:00
|
|
|
path_ms := miqt_strdupg(path)
|
|
|
|
defer C.free(path_ms)
|
|
|
|
C.QDir_AddResourceSearchPath((*C.struct_miqt_string)(path_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_SetSearchPaths(prefix string, searchPaths []string) {
|
2024-09-14 22:29:05 +00:00
|
|
|
prefix_ms := miqt_strdupg(prefix)
|
|
|
|
defer C.free(prefix_ms)
|
2024-09-17 07:30:27 +00:00
|
|
|
// For the C ABI, malloc a C array of raw pointers
|
2024-09-14 22:29:05 +00:00
|
|
|
searchPaths_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(searchPaths))))
|
2024-08-25 04:08:24 +00:00
|
|
|
defer C.free(unsafe.Pointer(searchPaths_CArray))
|
|
|
|
for i := range searchPaths {
|
2024-09-17 07:30:27 +00:00
|
|
|
searchPaths_i_ms := miqt_strdupg(searchPaths[i])
|
|
|
|
defer C.free(searchPaths_i_ms)
|
|
|
|
searchPaths_CArray[i] = (*C.struct_miqt_string)(searchPaths_i_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
searchPaths_ma := &C.struct_miqt_array{len: C.size_t(len(searchPaths)), data: unsafe.Pointer(searchPaths_CArray)}
|
|
|
|
defer runtime.KeepAlive(unsafe.Pointer(searchPaths_ma))
|
|
|
|
C.QDir_SetSearchPaths((*C.struct_miqt_string)(prefix_ms), searchPaths_ma)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_AddSearchPath(prefix string, path string) {
|
2024-09-14 22:29:05 +00:00
|
|
|
prefix_ms := miqt_strdupg(prefix)
|
|
|
|
defer C.free(prefix_ms)
|
|
|
|
path_ms := miqt_strdupg(path)
|
|
|
|
defer C.free(path_ms)
|
|
|
|
C.QDir_AddSearchPath((*C.struct_miqt_string)(prefix_ms), (*C.struct_miqt_string)(path_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_SearchPaths(prefix string) []string {
|
2024-09-14 22:29:05 +00:00
|
|
|
prefix_ms := miqt_strdupg(prefix)
|
|
|
|
defer C.free(prefix_ms)
|
|
|
|
var _ma *C.struct_miqt_array = C.QDir_SearchPaths((*C.struct_miqt_string)(prefix_ms))
|
|
|
|
_ret := make([]string, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]*C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +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))
|
|
|
|
_ret[i] = _lv_ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) DirName() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QDir_DirName(this.h)
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) FilePath(fileName string) string {
|
2024-09-14 22:29:05 +00:00
|
|
|
fileName_ms := miqt_strdupg(fileName)
|
|
|
|
defer C.free(fileName_ms)
|
|
|
|
var _ms *C.struct_miqt_string = C.QDir_FilePath(this.h, (*C.struct_miqt_string)(fileName_ms))
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) AbsoluteFilePath(fileName string) string {
|
2024-09-14 22:29:05 +00:00
|
|
|
fileName_ms := miqt_strdupg(fileName)
|
|
|
|
defer C.free(fileName_ms)
|
|
|
|
var _ms *C.struct_miqt_string = C.QDir_AbsoluteFilePath(this.h, (*C.struct_miqt_string)(fileName_ms))
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) RelativeFilePath(fileName string) string {
|
2024-09-14 22:29:05 +00:00
|
|
|
fileName_ms := miqt_strdupg(fileName)
|
|
|
|
defer C.free(fileName_ms)
|
|
|
|
var _ms *C.struct_miqt_string = C.QDir_RelativeFilePath(this.h, (*C.struct_miqt_string)(fileName_ms))
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_ToNativeSeparators(pathName string) string {
|
2024-09-14 22:29:05 +00:00
|
|
|
pathName_ms := miqt_strdupg(pathName)
|
|
|
|
defer C.free(pathName_ms)
|
|
|
|
var _ms *C.struct_miqt_string = C.QDir_ToNativeSeparators((*C.struct_miqt_string)(pathName_ms))
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_FromNativeSeparators(pathName string) string {
|
2024-09-14 22:29:05 +00:00
|
|
|
pathName_ms := miqt_strdupg(pathName)
|
|
|
|
defer C.free(pathName_ms)
|
|
|
|
var _ms *C.struct_miqt_string = C.QDir_FromNativeSeparators((*C.struct_miqt_string)(pathName_ms))
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) Cd(dirName string) bool {
|
2024-09-14 22:29:05 +00:00
|
|
|
dirName_ms := miqt_strdupg(dirName)
|
|
|
|
defer C.free(dirName_ms)
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_Cd(this.h, (*C.struct_miqt_string)(dirName_ms)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) CdUp() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_CdUp(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) NameFilters() []string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QDir_NameFilters(this.h)
|
|
|
|
_ret := make([]string, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]*C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +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))
|
|
|
|
_ret[i] = _lv_ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) SetNameFilters(nameFilters []string) {
|
2024-09-17 07:30:27 +00:00
|
|
|
// For the C ABI, malloc a C array of raw pointers
|
2024-09-14 22:29:05 +00:00
|
|
|
nameFilters_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(nameFilters))))
|
2024-08-25 04:08:24 +00:00
|
|
|
defer C.free(unsafe.Pointer(nameFilters_CArray))
|
|
|
|
for i := range nameFilters {
|
2024-09-17 07:30:27 +00:00
|
|
|
nameFilters_i_ms := miqt_strdupg(nameFilters[i])
|
|
|
|
defer C.free(nameFilters_i_ms)
|
|
|
|
nameFilters_CArray[i] = (*C.struct_miqt_string)(nameFilters_i_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
nameFilters_ma := &C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)}
|
|
|
|
defer runtime.KeepAlive(unsafe.Pointer(nameFilters_ma))
|
|
|
|
C.QDir_SetNameFilters(this.h, nameFilters_ma)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QDir) Filter() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QDir_Filter(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) SetFilter(filter int) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QDir_SetFilter(this.h, filter)
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) Sorting() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QDir_Sorting(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) SetSorting(sort int) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QDir_SetSorting(this.h, sort)
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QDir) Count() uint {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (uint)(C.QDir_Count(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QDir) IsEmpty() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_IsEmpty(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QDir) OperatorSubscript(param1 int) string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QDir_OperatorSubscript(this.h, (C.int)(param1))
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_NameFiltersFromString(nameFilter string) []string {
|
2024-09-14 22:29:05 +00:00
|
|
|
nameFilter_ms := miqt_strdupg(nameFilter)
|
|
|
|
defer C.free(nameFilter_ms)
|
|
|
|
var _ma *C.struct_miqt_array = C.QDir_NameFiltersFromString((*C.struct_miqt_string)(nameFilter_ms))
|
|
|
|
_ret := make([]string, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]*C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +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))
|
|
|
|
_ret[i] = _lv_ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QDir) EntryList() []string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QDir_EntryList(this.h)
|
|
|
|
_ret := make([]string, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]*C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +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))
|
|
|
|
_ret[i] = _lv_ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) EntryListWithNameFilters(nameFilters []string) []string {
|
2024-09-17 07:30:27 +00:00
|
|
|
// For the C ABI, malloc a C array of raw pointers
|
2024-09-14 22:29:05 +00:00
|
|
|
nameFilters_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(nameFilters))))
|
2024-08-29 07:01:51 +00:00
|
|
|
defer C.free(unsafe.Pointer(nameFilters_CArray))
|
|
|
|
for i := range nameFilters {
|
2024-09-17 07:30:27 +00:00
|
|
|
nameFilters_i_ms := miqt_strdupg(nameFilters[i])
|
|
|
|
defer C.free(nameFilters_i_ms)
|
|
|
|
nameFilters_CArray[i] = (*C.struct_miqt_string)(nameFilters_i_ms)
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
nameFilters_ma := &C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)}
|
|
|
|
defer runtime.KeepAlive(unsafe.Pointer(nameFilters_ma))
|
|
|
|
var _ma *C.struct_miqt_array = C.QDir_EntryListWithNameFilters(this.h, nameFilters_ma)
|
|
|
|
_ret := make([]string, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]*C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +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))
|
|
|
|
_ret[i] = _lv_ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) EntryInfoList() []QFileInfo {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QDir_EntryInfoList(this.h)
|
|
|
|
_ret := make([]QFileInfo, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QFileInfo)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
_lv_ret := _outCast[i]
|
|
|
|
_lv_goptr := newQFileInfo(_lv_ret)
|
|
|
|
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
_ret[i] = *_lv_goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) EntryInfoListWithNameFilters(nameFilters []string) []QFileInfo {
|
2024-09-17 07:30:27 +00:00
|
|
|
// For the C ABI, malloc a C array of raw pointers
|
2024-09-14 22:29:05 +00:00
|
|
|
nameFilters_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(nameFilters))))
|
2024-08-29 07:01:51 +00:00
|
|
|
defer C.free(unsafe.Pointer(nameFilters_CArray))
|
|
|
|
for i := range nameFilters {
|
2024-09-17 07:30:27 +00:00
|
|
|
nameFilters_i_ms := miqt_strdupg(nameFilters[i])
|
|
|
|
defer C.free(nameFilters_i_ms)
|
|
|
|
nameFilters_CArray[i] = (*C.struct_miqt_string)(nameFilters_i_ms)
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
nameFilters_ma := &C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)}
|
|
|
|
defer runtime.KeepAlive(unsafe.Pointer(nameFilters_ma))
|
|
|
|
var _ma *C.struct_miqt_array = C.QDir_EntryInfoListWithNameFilters(this.h, nameFilters_ma)
|
|
|
|
_ret := make([]QFileInfo, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QFileInfo)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
_lv_ret := _outCast[i]
|
|
|
|
_lv_goptr := newQFileInfo(_lv_ret)
|
|
|
|
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
_ret[i] = *_lv_goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QDir) Mkdir(dirName string) bool {
|
2024-09-14 22:29:05 +00:00
|
|
|
dirName_ms := miqt_strdupg(dirName)
|
|
|
|
defer C.free(dirName_ms)
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_Mkdir(this.h, (*C.struct_miqt_string)(dirName_ms)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) Rmdir(dirName string) bool {
|
2024-09-14 22:29:05 +00:00
|
|
|
dirName_ms := miqt_strdupg(dirName)
|
|
|
|
defer C.free(dirName_ms)
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_Rmdir(this.h, (*C.struct_miqt_string)(dirName_ms)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) Mkpath(dirPath string) bool {
|
2024-09-14 22:29:05 +00:00
|
|
|
dirPath_ms := miqt_strdupg(dirPath)
|
|
|
|
defer C.free(dirPath_ms)
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_Mkpath(this.h, (*C.struct_miqt_string)(dirPath_ms)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) Rmpath(dirPath string) bool {
|
2024-09-14 22:29:05 +00:00
|
|
|
dirPath_ms := miqt_strdupg(dirPath)
|
|
|
|
defer C.free(dirPath_ms)
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_Rmpath(this.h, (*C.struct_miqt_string)(dirPath_ms)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) RemoveRecursively() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_RemoveRecursively(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) IsReadable() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_IsReadable(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) Exists() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_Exists(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) IsRoot() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_IsRoot(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_IsRelativePath(path string) bool {
|
2024-09-14 22:29:05 +00:00
|
|
|
path_ms := miqt_strdupg(path)
|
|
|
|
defer C.free(path_ms)
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_IsRelativePath((*C.struct_miqt_string)(path_ms)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_IsAbsolutePath(path string) bool {
|
2024-09-14 22:29:05 +00:00
|
|
|
path_ms := miqt_strdupg(path)
|
|
|
|
defer C.free(path_ms)
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_IsAbsolutePath((*C.struct_miqt_string)(path_ms)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) IsRelative() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_IsRelative(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) IsAbsolute() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_IsAbsolute(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) MakeAbsolute() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_MakeAbsolute(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) OperatorEqual(dir *QDir) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_OperatorEqual(this.h, dir.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) OperatorNotEqual(dir *QDir) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_OperatorNotEqual(this.h, dir.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) Remove(fileName string) bool {
|
2024-09-14 22:29:05 +00:00
|
|
|
fileName_ms := miqt_strdupg(fileName)
|
|
|
|
defer C.free(fileName_ms)
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_Remove(this.h, (*C.struct_miqt_string)(fileName_ms)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) Rename(oldName string, newName string) bool {
|
2024-09-14 22:29:05 +00:00
|
|
|
oldName_ms := miqt_strdupg(oldName)
|
|
|
|
defer C.free(oldName_ms)
|
|
|
|
newName_ms := miqt_strdupg(newName)
|
|
|
|
defer C.free(newName_ms)
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_Rename(this.h, (*C.struct_miqt_string)(oldName_ms), (*C.struct_miqt_string)(newName_ms)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) ExistsWithName(name string) bool {
|
2024-09-14 22:29:05 +00:00
|
|
|
name_ms := miqt_strdupg(name)
|
|
|
|
defer C.free(name_ms)
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_ExistsWithName(this.h, (*C.struct_miqt_string)(name_ms)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_Drives() []QFileInfo {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QDir_Drives()
|
|
|
|
_ret := make([]QFileInfo, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QFileInfo)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
_lv_ret := _outCast[i]
|
|
|
|
_lv_goptr := newQFileInfo(_lv_ret)
|
|
|
|
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
_ret[i] = *_lv_goptr
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_ListSeparator() *QChar {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDir_ListSeparator()
|
|
|
|
_goptr := newQChar(_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
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_Separator() *QChar {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDir_Separator()
|
|
|
|
_goptr := newQChar(_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
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_SetCurrent(path string) bool {
|
2024-09-14 22:29:05 +00:00
|
|
|
path_ms := miqt_strdupg(path)
|
|
|
|
defer C.free(path_ms)
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_SetCurrent((*C.struct_miqt_string)(path_ms)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_Current() *QDir {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDir_Current()
|
|
|
|
_goptr := newQDir(_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
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_CurrentPath() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QDir_CurrentPath()
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_Home() *QDir {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDir_Home()
|
|
|
|
_goptr := newQDir(_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
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_HomePath() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QDir_HomePath()
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_Root() *QDir {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDir_Root()
|
|
|
|
_goptr := newQDir(_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
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_RootPath() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QDir_RootPath()
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_Temp() *QDir {
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := C.QDir_Temp()
|
|
|
|
_goptr := newQDir(_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
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_TempPath() string {
|
2024-09-14 22:29:05 +00:00
|
|
|
var _ms *C.struct_miqt_string = C.QDir_TempPath()
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_Match(filters []string, fileName string) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
// For the C ABI, malloc a C array of raw pointers
|
2024-09-14 22:29:05 +00:00
|
|
|
filters_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(filters))))
|
2024-08-25 04:08:24 +00:00
|
|
|
defer C.free(unsafe.Pointer(filters_CArray))
|
|
|
|
for i := range filters {
|
2024-09-17 07:30:27 +00:00
|
|
|
filters_i_ms := miqt_strdupg(filters[i])
|
|
|
|
defer C.free(filters_i_ms)
|
|
|
|
filters_CArray[i] = (*C.struct_miqt_string)(filters_i_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
filters_ma := &C.struct_miqt_array{len: C.size_t(len(filters)), data: unsafe.Pointer(filters_CArray)}
|
|
|
|
defer runtime.KeepAlive(unsafe.Pointer(filters_ma))
|
|
|
|
fileName_ms := miqt_strdupg(fileName)
|
|
|
|
defer C.free(fileName_ms)
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_Match(filters_ma, (*C.struct_miqt_string)(fileName_ms)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_Match2(filter string, fileName string) bool {
|
2024-09-14 22:29:05 +00:00
|
|
|
filter_ms := miqt_strdupg(filter)
|
|
|
|
defer C.free(filter_ms)
|
|
|
|
fileName_ms := miqt_strdupg(fileName)
|
|
|
|
defer C.free(fileName_ms)
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QDir_Match2((*C.struct_miqt_string)(filter_ms), (*C.struct_miqt_string)(fileName_ms)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QDir_CleanPath(path string) string {
|
2024-09-14 22:29:05 +00:00
|
|
|
path_ms := miqt_strdupg(path)
|
|
|
|
defer C.free(path_ms)
|
|
|
|
var _ms *C.struct_miqt_string = C.QDir_CleanPath((*C.struct_miqt_string)(path_ms))
|
|
|
|
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) Refresh() {
|
|
|
|
C.QDir_Refresh(this.h)
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QDir) IsEmpty1(filters int) bool {
|
2024-09-18 00:12:02 +00:00
|
|
|
return (bool)(C.QDir_IsEmpty1(this.h, filters))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) EntryList1(filters int) []string {
|
2024-09-18 00:12:02 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QDir_EntryList1(this.h, filters)
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := make([]string, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]*C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +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))
|
|
|
|
_ret[i] = _lv_ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) EntryList2(filters int, sort int) []string {
|
2024-09-18 00:12:02 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QDir_EntryList2(this.h, filters, sort)
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := make([]string, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]*C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +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))
|
|
|
|
_ret[i] = _lv_ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) EntryList22(nameFilters []string, filters int) []string {
|
2024-09-17 07:30:27 +00:00
|
|
|
// For the C ABI, malloc a C array of raw pointers
|
2024-09-14 22:29:05 +00:00
|
|
|
nameFilters_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(nameFilters))))
|
2024-08-29 07:01:51 +00:00
|
|
|
defer C.free(unsafe.Pointer(nameFilters_CArray))
|
|
|
|
for i := range nameFilters {
|
2024-09-17 07:30:27 +00:00
|
|
|
nameFilters_i_ms := miqt_strdupg(nameFilters[i])
|
|
|
|
defer C.free(nameFilters_i_ms)
|
|
|
|
nameFilters_CArray[i] = (*C.struct_miqt_string)(nameFilters_i_ms)
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
nameFilters_ma := &C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)}
|
|
|
|
defer runtime.KeepAlive(unsafe.Pointer(nameFilters_ma))
|
2024-09-18 00:12:02 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QDir_EntryList22(this.h, nameFilters_ma, filters)
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := make([]string, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]*C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +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))
|
|
|
|
_ret[i] = _lv_ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) EntryList3(nameFilters []string, filters int, sort int) []string {
|
2024-09-17 07:30:27 +00:00
|
|
|
// For the C ABI, malloc a C array of raw pointers
|
2024-09-14 22:29:05 +00:00
|
|
|
nameFilters_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(nameFilters))))
|
2024-08-29 07:01:51 +00:00
|
|
|
defer C.free(unsafe.Pointer(nameFilters_CArray))
|
|
|
|
for i := range nameFilters {
|
2024-09-17 07:30:27 +00:00
|
|
|
nameFilters_i_ms := miqt_strdupg(nameFilters[i])
|
|
|
|
defer C.free(nameFilters_i_ms)
|
|
|
|
nameFilters_CArray[i] = (*C.struct_miqt_string)(nameFilters_i_ms)
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
nameFilters_ma := &C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)}
|
|
|
|
defer runtime.KeepAlive(unsafe.Pointer(nameFilters_ma))
|
2024-09-18 00:12:02 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QDir_EntryList3(this.h, nameFilters_ma, filters, sort)
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := make([]string, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]*C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
|
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +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))
|
|
|
|
_ret[i] = _lv_ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) EntryInfoList1(filters int) []QFileInfo {
|
2024-09-18 00:12:02 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QDir_EntryInfoList1(this.h, filters)
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := make([]QFileInfo, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QFileInfo)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
_lv_ret := _outCast[i]
|
|
|
|
_lv_goptr := newQFileInfo(_lv_ret)
|
|
|
|
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
_ret[i] = *_lv_goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) EntryInfoList2(filters int, sort int) []QFileInfo {
|
2024-09-18 00:12:02 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QDir_EntryInfoList2(this.h, filters, sort)
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := make([]QFileInfo, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QFileInfo)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
_lv_ret := _outCast[i]
|
|
|
|
_lv_goptr := newQFileInfo(_lv_ret)
|
|
|
|
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
_ret[i] = *_lv_goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) EntryInfoList22(nameFilters []string, filters int) []QFileInfo {
|
2024-09-17 07:30:27 +00:00
|
|
|
// For the C ABI, malloc a C array of raw pointers
|
2024-09-14 22:29:05 +00:00
|
|
|
nameFilters_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(nameFilters))))
|
2024-08-29 07:01:51 +00:00
|
|
|
defer C.free(unsafe.Pointer(nameFilters_CArray))
|
|
|
|
for i := range nameFilters {
|
2024-09-17 07:30:27 +00:00
|
|
|
nameFilters_i_ms := miqt_strdupg(nameFilters[i])
|
|
|
|
defer C.free(nameFilters_i_ms)
|
|
|
|
nameFilters_CArray[i] = (*C.struct_miqt_string)(nameFilters_i_ms)
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
nameFilters_ma := &C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)}
|
|
|
|
defer runtime.KeepAlive(unsafe.Pointer(nameFilters_ma))
|
2024-09-18 00:12:02 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QDir_EntryInfoList22(this.h, nameFilters_ma, filters)
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := make([]QFileInfo, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QFileInfo)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
_lv_ret := _outCast[i]
|
|
|
|
_lv_goptr := newQFileInfo(_lv_ret)
|
|
|
|
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
_ret[i] = *_lv_goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QDir) EntryInfoList3(nameFilters []string, filters int, sort int) []QFileInfo {
|
2024-09-17 07:30:27 +00:00
|
|
|
// For the C ABI, malloc a C array of raw pointers
|
2024-09-14 22:29:05 +00:00
|
|
|
nameFilters_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(nameFilters))))
|
2024-08-29 07:01:51 +00:00
|
|
|
defer C.free(unsafe.Pointer(nameFilters_CArray))
|
|
|
|
for i := range nameFilters {
|
2024-09-17 07:30:27 +00:00
|
|
|
nameFilters_i_ms := miqt_strdupg(nameFilters[i])
|
|
|
|
defer C.free(nameFilters_i_ms)
|
|
|
|
nameFilters_CArray[i] = (*C.struct_miqt_string)(nameFilters_i_ms)
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
nameFilters_ma := &C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)}
|
|
|
|
defer runtime.KeepAlive(unsafe.Pointer(nameFilters_ma))
|
2024-09-18 00:12:02 +00:00
|
|
|
var _ma *C.struct_miqt_array = C.QDir_EntryInfoList3(this.h, nameFilters_ma, filters, sort)
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := make([]QFileInfo, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QFileInfo)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-09-17 07:30:27 +00:00
|
|
|
_lv_ret := _outCast[i]
|
|
|
|
_lv_goptr := newQFileInfo(_lv_ret)
|
|
|
|
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
_ret[i] = *_lv_goptr
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.free(unsafe.Pointer(_ma))
|
|
|
|
return _ret
|
2024-08-29 07:01:51 +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 *QDir) Delete() {
|
|
|
|
C.QDir_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 *QDir) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QDir) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|