package qt /* #include "gen_qfiledialog.h" #include */ import "C" import ( "runtime" "runtime/cgo" "unsafe" ) type QFileDialog__ViewMode int const ( QFileDialog__ViewMode__Detail QFileDialog__ViewMode = 0 QFileDialog__ViewMode__List QFileDialog__ViewMode = 1 ) type QFileDialog__FileMode int const ( QFileDialog__FileMode__AnyFile QFileDialog__FileMode = 0 QFileDialog__FileMode__ExistingFile QFileDialog__FileMode = 1 QFileDialog__FileMode__Directory QFileDialog__FileMode = 2 QFileDialog__FileMode__ExistingFiles QFileDialog__FileMode = 3 QFileDialog__FileMode__DirectoryOnly QFileDialog__FileMode = 4 ) type QFileDialog__AcceptMode int const ( QFileDialog__AcceptMode__AcceptOpen QFileDialog__AcceptMode = 0 QFileDialog__AcceptMode__AcceptSave QFileDialog__AcceptMode = 1 ) type QFileDialog__DialogLabel int const ( QFileDialog__DialogLabel__LookIn QFileDialog__DialogLabel = 0 QFileDialog__DialogLabel__FileName QFileDialog__DialogLabel = 1 QFileDialog__DialogLabel__FileType QFileDialog__DialogLabel = 2 QFileDialog__DialogLabel__Accept QFileDialog__DialogLabel = 3 QFileDialog__DialogLabel__Reject QFileDialog__DialogLabel = 4 ) type QFileDialog__Option int const ( QFileDialog__Option__ShowDirsOnly QFileDialog__Option = 1 QFileDialog__Option__DontResolveSymlinks QFileDialog__Option = 2 QFileDialog__Option__DontConfirmOverwrite QFileDialog__Option = 4 QFileDialog__Option__DontUseSheet QFileDialog__Option = 8 QFileDialog__Option__DontUseNativeDialog QFileDialog__Option = 16 QFileDialog__Option__ReadOnly QFileDialog__Option = 32 QFileDialog__Option__HideNameFilterDetails QFileDialog__Option = 64 QFileDialog__Option__DontUseCustomDirectoryIcons QFileDialog__Option = 128 ) type QFileDialog struct { h *C.QFileDialog *QDialog } func (this *QFileDialog) cPointer() *C.QFileDialog { if this == nil { return nil } return this.h } func newQFileDialog(h *C.QFileDialog) *QFileDialog { if h == nil { return nil } return &QFileDialog{h: h, QDialog: newQDialog_U(unsafe.Pointer(h))} } func newQFileDialog_U(h unsafe.Pointer) *QFileDialog { return newQFileDialog((*C.QFileDialog)(h)) } // NewQFileDialog constructs a new QFileDialog object. func NewQFileDialog(parent *QWidget, f int) *QFileDialog { ret := C.QFileDialog_new(parent.cPointer(), (C.int)(f)) return newQFileDialog(ret) } // NewQFileDialog2 constructs a new QFileDialog object. func NewQFileDialog2() *QFileDialog { ret := C.QFileDialog_new2() return newQFileDialog(ret) } // NewQFileDialog3 constructs a new QFileDialog object. func NewQFileDialog3(parent *QWidget) *QFileDialog { ret := C.QFileDialog_new3(parent.cPointer()) return newQFileDialog(ret) } // NewQFileDialog4 constructs a new QFileDialog object. func NewQFileDialog4(parent *QWidget, caption string) *QFileDialog { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) ret := C.QFileDialog_new4(parent.cPointer(), (*C.struct_miqt_string)(caption_ms)) return newQFileDialog(ret) } // NewQFileDialog5 constructs a new QFileDialog object. func NewQFileDialog5(parent *QWidget, caption string, directory string) *QFileDialog { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) directory_ms := miqt_strdupg(directory) defer C.free(directory_ms) ret := C.QFileDialog_new5(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), (*C.struct_miqt_string)(directory_ms)) return newQFileDialog(ret) } // NewQFileDialog6 constructs a new QFileDialog object. func NewQFileDialog6(parent *QWidget, caption string, directory string, filter string) *QFileDialog { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) directory_ms := miqt_strdupg(directory) defer C.free(directory_ms) filter_ms := miqt_strdupg(filter) defer C.free(filter_ms) ret := C.QFileDialog_new6(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), (*C.struct_miqt_string)(directory_ms), (*C.struct_miqt_string)(filter_ms)) return newQFileDialog(ret) } func (this *QFileDialog) MetaObject() *QMetaObject { _ret := C.QFileDialog_MetaObject(this.h) return newQMetaObject_U(unsafe.Pointer(_ret)) } func QFileDialog_Tr(s string) string { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) var _ms *C.struct_miqt_string = C.QFileDialog_Tr(s_Cstring) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_TrUtf8(s string) string { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) var _ms *C.struct_miqt_string = C.QFileDialog_TrUtf8(s_Cstring) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func (this *QFileDialog) SetDirectory(directory string) { directory_ms := miqt_strdupg(directory) defer C.free(directory_ms) C.QFileDialog_SetDirectory(this.h, (*C.struct_miqt_string)(directory_ms)) } func (this *QFileDialog) SetDirectoryWithDirectory(directory *QDir) { C.QFileDialog_SetDirectoryWithDirectory(this.h, directory.cPointer()) } func (this *QFileDialog) Directory() *QDir { _ret := C.QFileDialog_Directory(this.h) _goptr := newQDir(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QFileDialog) SetDirectoryUrl(directory *QUrl) { C.QFileDialog_SetDirectoryUrl(this.h, directory.cPointer()) } func (this *QFileDialog) DirectoryUrl() *QUrl { _ret := C.QFileDialog_DirectoryUrl(this.h) _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QFileDialog) SelectFile(filename string) { filename_ms := miqt_strdupg(filename) defer C.free(filename_ms) C.QFileDialog_SelectFile(this.h, (*C.struct_miqt_string)(filename_ms)) } func (this *QFileDialog) SelectedFiles() []string { var _ma *C.struct_miqt_array = C.QFileDialog_SelectedFiles(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++ { _ret[i] = C.GoStringN(&_outCast[i].data, C.int(int64(_outCast[i].len))) C.free(unsafe.Pointer(_outCast[i])) // free the inner miqt_string* } C.free(unsafe.Pointer(_ma)) return _ret } func (this *QFileDialog) SelectUrl(url *QUrl) { C.QFileDialog_SelectUrl(this.h, url.cPointer()) } func (this *QFileDialog) SelectedUrls() []QUrl { var _ma *C.struct_miqt_array = C.QFileDialog_SelectedUrls(this.h) _ret := make([]QUrl, int(_ma.len)) _outCast := (*[0xffff]*C.QUrl)(unsafe.Pointer(_ma.data)) // mrs jackson for i := 0; i < int(_ma.len); i++ { _ret[i] = *newQUrl(_outCast[i]) } C.free(unsafe.Pointer(_ma)) return _ret } func (this *QFileDialog) SetNameFilterDetailsVisible(enabled bool) { C.QFileDialog_SetNameFilterDetailsVisible(this.h, (C.bool)(enabled)) } func (this *QFileDialog) IsNameFilterDetailsVisible() bool { _ret := C.QFileDialog_IsNameFilterDetailsVisible(this.h) return (bool)(_ret) } func (this *QFileDialog) SetNameFilter(filter string) { filter_ms := miqt_strdupg(filter) defer C.free(filter_ms) C.QFileDialog_SetNameFilter(this.h, (*C.struct_miqt_string)(filter_ms)) } func (this *QFileDialog) SetNameFilters(filters []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths filters_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(filters)))) defer C.free(unsafe.Pointer(filters_CArray)) for i := range filters { single_ms := miqt_strdupg(filters[i]) defer C.free(single_ms) filters_CArray[i] = (*C.struct_miqt_string)(single_ms) } filters_ma := &C.struct_miqt_array{len: C.size_t(len(filters)), data: unsafe.Pointer(filters_CArray)} defer runtime.KeepAlive(unsafe.Pointer(filters_ma)) C.QFileDialog_SetNameFilters(this.h, filters_ma) } func (this *QFileDialog) NameFilters() []string { var _ma *C.struct_miqt_array = C.QFileDialog_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++ { _ret[i] = C.GoStringN(&_outCast[i].data, C.int(int64(_outCast[i].len))) C.free(unsafe.Pointer(_outCast[i])) // free the inner miqt_string* } C.free(unsafe.Pointer(_ma)) return _ret } func (this *QFileDialog) SelectNameFilter(filter string) { filter_ms := miqt_strdupg(filter) defer C.free(filter_ms) C.QFileDialog_SelectNameFilter(this.h, (*C.struct_miqt_string)(filter_ms)) } func (this *QFileDialog) SelectedMimeTypeFilter() string { var _ms *C.struct_miqt_string = C.QFileDialog_SelectedMimeTypeFilter(this.h) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func (this *QFileDialog) SelectedNameFilter() string { var _ms *C.struct_miqt_string = C.QFileDialog_SelectedNameFilter(this.h) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func (this *QFileDialog) SetMimeTypeFilters(filters []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths filters_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(filters)))) defer C.free(unsafe.Pointer(filters_CArray)) for i := range filters { single_ms := miqt_strdupg(filters[i]) defer C.free(single_ms) filters_CArray[i] = (*C.struct_miqt_string)(single_ms) } filters_ma := &C.struct_miqt_array{len: C.size_t(len(filters)), data: unsafe.Pointer(filters_CArray)} defer runtime.KeepAlive(unsafe.Pointer(filters_ma)) C.QFileDialog_SetMimeTypeFilters(this.h, filters_ma) } func (this *QFileDialog) MimeTypeFilters() []string { var _ma *C.struct_miqt_array = C.QFileDialog_MimeTypeFilters(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++ { _ret[i] = C.GoStringN(&_outCast[i].data, C.int(int64(_outCast[i].len))) C.free(unsafe.Pointer(_outCast[i])) // free the inner miqt_string* } C.free(unsafe.Pointer(_ma)) return _ret } func (this *QFileDialog) SelectMimeTypeFilter(filter string) { filter_ms := miqt_strdupg(filter) defer C.free(filter_ms) C.QFileDialog_SelectMimeTypeFilter(this.h, (*C.struct_miqt_string)(filter_ms)) } func (this *QFileDialog) Filter() int { _ret := C.QFileDialog_Filter(this.h) return (int)(_ret) } func (this *QFileDialog) SetFilter(filters int) { C.QFileDialog_SetFilter(this.h, (C.int)(filters)) } func (this *QFileDialog) SetViewMode(mode QFileDialog__ViewMode) { C.QFileDialog_SetViewMode(this.h, (C.uintptr_t)(mode)) } func (this *QFileDialog) ViewMode() QFileDialog__ViewMode { _ret := C.QFileDialog_ViewMode(this.h) return (QFileDialog__ViewMode)(_ret) } func (this *QFileDialog) SetFileMode(mode QFileDialog__FileMode) { C.QFileDialog_SetFileMode(this.h, (C.uintptr_t)(mode)) } func (this *QFileDialog) FileMode() QFileDialog__FileMode { _ret := C.QFileDialog_FileMode(this.h) return (QFileDialog__FileMode)(_ret) } func (this *QFileDialog) SetAcceptMode(mode QFileDialog__AcceptMode) { C.QFileDialog_SetAcceptMode(this.h, (C.uintptr_t)(mode)) } func (this *QFileDialog) AcceptMode() QFileDialog__AcceptMode { _ret := C.QFileDialog_AcceptMode(this.h) return (QFileDialog__AcceptMode)(_ret) } func (this *QFileDialog) SetReadOnly(enabled bool) { C.QFileDialog_SetReadOnly(this.h, (C.bool)(enabled)) } func (this *QFileDialog) IsReadOnly() bool { _ret := C.QFileDialog_IsReadOnly(this.h) return (bool)(_ret) } func (this *QFileDialog) SetResolveSymlinks(enabled bool) { C.QFileDialog_SetResolveSymlinks(this.h, (C.bool)(enabled)) } func (this *QFileDialog) ResolveSymlinks() bool { _ret := C.QFileDialog_ResolveSymlinks(this.h) return (bool)(_ret) } func (this *QFileDialog) SetSidebarUrls(urls []QUrl) { // For the C ABI, malloc a C array of raw pointers urls_CArray := (*[0xffff]*C.QUrl)(C.malloc(C.size_t(8 * len(urls)))) defer C.free(unsafe.Pointer(urls_CArray)) for i := range urls { urls_CArray[i] = urls[i].cPointer() } urls_ma := &C.struct_miqt_array{len: C.size_t(len(urls)), data: unsafe.Pointer(urls_CArray)} defer runtime.KeepAlive(unsafe.Pointer(urls_ma)) C.QFileDialog_SetSidebarUrls(this.h, urls_ma) } func (this *QFileDialog) SidebarUrls() []QUrl { var _ma *C.struct_miqt_array = C.QFileDialog_SidebarUrls(this.h) _ret := make([]QUrl, int(_ma.len)) _outCast := (*[0xffff]*C.QUrl)(unsafe.Pointer(_ma.data)) // mrs jackson for i := 0; i < int(_ma.len); i++ { _ret[i] = *newQUrl(_outCast[i]) } C.free(unsafe.Pointer(_ma)) return _ret } func (this *QFileDialog) SaveState() *QByteArray { _ret := C.QFileDialog_SaveState(this.h) _goptr := newQByteArray(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QFileDialog) RestoreState(state *QByteArray) bool { _ret := C.QFileDialog_RestoreState(this.h, state.cPointer()) return (bool)(_ret) } func (this *QFileDialog) SetConfirmOverwrite(enabled bool) { C.QFileDialog_SetConfirmOverwrite(this.h, (C.bool)(enabled)) } func (this *QFileDialog) ConfirmOverwrite() bool { _ret := C.QFileDialog_ConfirmOverwrite(this.h) return (bool)(_ret) } func (this *QFileDialog) SetDefaultSuffix(suffix string) { suffix_ms := miqt_strdupg(suffix) defer C.free(suffix_ms) C.QFileDialog_SetDefaultSuffix(this.h, (*C.struct_miqt_string)(suffix_ms)) } func (this *QFileDialog) DefaultSuffix() string { var _ms *C.struct_miqt_string = C.QFileDialog_DefaultSuffix(this.h) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func (this *QFileDialog) SetHistory(paths []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths paths_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(paths)))) defer C.free(unsafe.Pointer(paths_CArray)) for i := range paths { single_ms := miqt_strdupg(paths[i]) defer C.free(single_ms) paths_CArray[i] = (*C.struct_miqt_string)(single_ms) } paths_ma := &C.struct_miqt_array{len: C.size_t(len(paths)), data: unsafe.Pointer(paths_CArray)} defer runtime.KeepAlive(unsafe.Pointer(paths_ma)) C.QFileDialog_SetHistory(this.h, paths_ma) } func (this *QFileDialog) History() []string { var _ma *C.struct_miqt_array = C.QFileDialog_History(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++ { _ret[i] = C.GoStringN(&_outCast[i].data, C.int(int64(_outCast[i].len))) C.free(unsafe.Pointer(_outCast[i])) // free the inner miqt_string* } C.free(unsafe.Pointer(_ma)) return _ret } func (this *QFileDialog) SetItemDelegate(delegate *QAbstractItemDelegate) { C.QFileDialog_SetItemDelegate(this.h, delegate.cPointer()) } func (this *QFileDialog) ItemDelegate() *QAbstractItemDelegate { _ret := C.QFileDialog_ItemDelegate(this.h) return newQAbstractItemDelegate_U(unsafe.Pointer(_ret)) } func (this *QFileDialog) SetIconProvider(provider *QFileIconProvider) { C.QFileDialog_SetIconProvider(this.h, provider.cPointer()) } func (this *QFileDialog) IconProvider() *QFileIconProvider { _ret := C.QFileDialog_IconProvider(this.h) return newQFileIconProvider_U(unsafe.Pointer(_ret)) } func (this *QFileDialog) SetLabelText(label QFileDialog__DialogLabel, text string) { text_ms := miqt_strdupg(text) defer C.free(text_ms) C.QFileDialog_SetLabelText(this.h, (C.uintptr_t)(label), (*C.struct_miqt_string)(text_ms)) } func (this *QFileDialog) LabelText(label QFileDialog__DialogLabel) string { var _ms *C.struct_miqt_string = C.QFileDialog_LabelText(this.h, (C.uintptr_t)(label)) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func (this *QFileDialog) SetSupportedSchemes(schemes []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths schemes_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(schemes)))) defer C.free(unsafe.Pointer(schemes_CArray)) for i := range schemes { single_ms := miqt_strdupg(schemes[i]) defer C.free(single_ms) schemes_CArray[i] = (*C.struct_miqt_string)(single_ms) } schemes_ma := &C.struct_miqt_array{len: C.size_t(len(schemes)), data: unsafe.Pointer(schemes_CArray)} defer runtime.KeepAlive(unsafe.Pointer(schemes_ma)) C.QFileDialog_SetSupportedSchemes(this.h, schemes_ma) } func (this *QFileDialog) SupportedSchemes() []string { var _ma *C.struct_miqt_array = C.QFileDialog_SupportedSchemes(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++ { _ret[i] = C.GoStringN(&_outCast[i].data, C.int(int64(_outCast[i].len))) C.free(unsafe.Pointer(_outCast[i])) // free the inner miqt_string* } C.free(unsafe.Pointer(_ma)) return _ret } func (this *QFileDialog) SetProxyModel(model *QAbstractProxyModel) { C.QFileDialog_SetProxyModel(this.h, model.cPointer()) } func (this *QFileDialog) ProxyModel() *QAbstractProxyModel { _ret := C.QFileDialog_ProxyModel(this.h) return newQAbstractProxyModel_U(unsafe.Pointer(_ret)) } func (this *QFileDialog) SetOption(option QFileDialog__Option) { C.QFileDialog_SetOption(this.h, (C.uintptr_t)(option)) } func (this *QFileDialog) TestOption(option QFileDialog__Option) bool { _ret := C.QFileDialog_TestOption(this.h, (C.uintptr_t)(option)) return (bool)(_ret) } func (this *QFileDialog) SetOptions(options int) { C.QFileDialog_SetOptions(this.h, (C.int)(options)) } func (this *QFileDialog) Options() int { _ret := C.QFileDialog_Options(this.h) return (int)(_ret) } func (this *QFileDialog) SetVisible(visible bool) { C.QFileDialog_SetVisible(this.h, (C.bool)(visible)) } func (this *QFileDialog) FileSelected(file string) { file_ms := miqt_strdupg(file) defer C.free(file_ms) C.QFileDialog_FileSelected(this.h, (*C.struct_miqt_string)(file_ms)) } func (this *QFileDialog) OnFileSelected(slot func(file string)) { C.QFileDialog_connect_FileSelected(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot)))) } //export miqt_exec_callback_QFileDialog_FileSelected func miqt_exec_callback_QFileDialog_FileSelected(cb *C.void, file *C.struct_miqt_string) { gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(file string)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters var file_ms *C.struct_miqt_string = file file_ret := C.GoStringN(&file_ms.data, C.int(int64(file_ms.len))) C.free(unsafe.Pointer(file_ms)) slotval1 := file_ret gofunc(slotval1) } func (this *QFileDialog) FilesSelected(files []string) { // For the C ABI, malloc two C arrays; raw char* pointers and their lengths files_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(files)))) defer C.free(unsafe.Pointer(files_CArray)) for i := range files { single_ms := miqt_strdupg(files[i]) defer C.free(single_ms) files_CArray[i] = (*C.struct_miqt_string)(single_ms) } files_ma := &C.struct_miqt_array{len: C.size_t(len(files)), data: unsafe.Pointer(files_CArray)} defer runtime.KeepAlive(unsafe.Pointer(files_ma)) C.QFileDialog_FilesSelected(this.h, files_ma) } func (this *QFileDialog) OnFilesSelected(slot func(files []string)) { C.QFileDialog_connect_FilesSelected(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot)))) } //export miqt_exec_callback_QFileDialog_FilesSelected func miqt_exec_callback_QFileDialog_FilesSelected(cb *C.void, files *C.struct_miqt_array) { gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(files []string)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters var files_ma *C.struct_miqt_array = files files_ret := make([]string, int(files_ma.len)) _outCast := (*[0xffff]*C.struct_miqt_string)(unsafe.Pointer(files_ma.data)) // hey ya for i := 0; i < int(files_ma.len); i++ { files_ret[i] = C.GoStringN(&_outCast[i].data, C.int(int64(_outCast[i].len))) C.free(unsafe.Pointer(_outCast[i])) // free the inner miqt_string* } C.free(unsafe.Pointer(files_ma)) slotval1 := files_ret gofunc(slotval1) } func (this *QFileDialog) CurrentChanged(path string) { path_ms := miqt_strdupg(path) defer C.free(path_ms) C.QFileDialog_CurrentChanged(this.h, (*C.struct_miqt_string)(path_ms)) } func (this *QFileDialog) OnCurrentChanged(slot func(path string)) { C.QFileDialog_connect_CurrentChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot)))) } //export miqt_exec_callback_QFileDialog_CurrentChanged func miqt_exec_callback_QFileDialog_CurrentChanged(cb *C.void, path *C.struct_miqt_string) { gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(path string)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters var path_ms *C.struct_miqt_string = path path_ret := C.GoStringN(&path_ms.data, C.int(int64(path_ms.len))) C.free(unsafe.Pointer(path_ms)) slotval1 := path_ret gofunc(slotval1) } func (this *QFileDialog) DirectoryEntered(directory string) { directory_ms := miqt_strdupg(directory) defer C.free(directory_ms) C.QFileDialog_DirectoryEntered(this.h, (*C.struct_miqt_string)(directory_ms)) } func (this *QFileDialog) OnDirectoryEntered(slot func(directory string)) { C.QFileDialog_connect_DirectoryEntered(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot)))) } //export miqt_exec_callback_QFileDialog_DirectoryEntered func miqt_exec_callback_QFileDialog_DirectoryEntered(cb *C.void, directory *C.struct_miqt_string) { gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(directory string)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters var directory_ms *C.struct_miqt_string = directory directory_ret := C.GoStringN(&directory_ms.data, C.int(int64(directory_ms.len))) C.free(unsafe.Pointer(directory_ms)) slotval1 := directory_ret gofunc(slotval1) } func (this *QFileDialog) UrlSelected(url *QUrl) { C.QFileDialog_UrlSelected(this.h, url.cPointer()) } func (this *QFileDialog) OnUrlSelected(slot func(url *QUrl)) { C.QFileDialog_connect_UrlSelected(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot)))) } //export miqt_exec_callback_QFileDialog_UrlSelected func miqt_exec_callback_QFileDialog_UrlSelected(cb *C.void, url *C.QUrl) { gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(url *QUrl)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters url_ret := url slotval1 := newQUrl_U(unsafe.Pointer(url_ret)) gofunc(slotval1) } func (this *QFileDialog) UrlsSelected(urls []QUrl) { // For the C ABI, malloc a C array of raw pointers urls_CArray := (*[0xffff]*C.QUrl)(C.malloc(C.size_t(8 * len(urls)))) defer C.free(unsafe.Pointer(urls_CArray)) for i := range urls { urls_CArray[i] = urls[i].cPointer() } urls_ma := &C.struct_miqt_array{len: C.size_t(len(urls)), data: unsafe.Pointer(urls_CArray)} defer runtime.KeepAlive(unsafe.Pointer(urls_ma)) C.QFileDialog_UrlsSelected(this.h, urls_ma) } func (this *QFileDialog) OnUrlsSelected(slot func(urls []QUrl)) { C.QFileDialog_connect_UrlsSelected(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot)))) } //export miqt_exec_callback_QFileDialog_UrlsSelected func miqt_exec_callback_QFileDialog_UrlsSelected(cb *C.void, urls *C.struct_miqt_array) { gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(urls []QUrl)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters var urls_ma *C.struct_miqt_array = urls urls_ret := make([]QUrl, int(urls_ma.len)) _outCast := (*[0xffff]*C.QUrl)(unsafe.Pointer(urls_ma.data)) // mrs jackson for i := 0; i < int(urls_ma.len); i++ { urls_ret[i] = *newQUrl(_outCast[i]) } C.free(unsafe.Pointer(urls_ma)) slotval1 := urls_ret gofunc(slotval1) } func (this *QFileDialog) CurrentUrlChanged(url *QUrl) { C.QFileDialog_CurrentUrlChanged(this.h, url.cPointer()) } func (this *QFileDialog) OnCurrentUrlChanged(slot func(url *QUrl)) { C.QFileDialog_connect_CurrentUrlChanged(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot)))) } //export miqt_exec_callback_QFileDialog_CurrentUrlChanged func miqt_exec_callback_QFileDialog_CurrentUrlChanged(cb *C.void, url *C.QUrl) { gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(url *QUrl)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters url_ret := url slotval1 := newQUrl_U(unsafe.Pointer(url_ret)) gofunc(slotval1) } func (this *QFileDialog) DirectoryUrlEntered(directory *QUrl) { C.QFileDialog_DirectoryUrlEntered(this.h, directory.cPointer()) } func (this *QFileDialog) OnDirectoryUrlEntered(slot func(directory *QUrl)) { C.QFileDialog_connect_DirectoryUrlEntered(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot)))) } //export miqt_exec_callback_QFileDialog_DirectoryUrlEntered func miqt_exec_callback_QFileDialog_DirectoryUrlEntered(cb *C.void, directory *C.QUrl) { gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(directory *QUrl)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters directory_ret := directory slotval1 := newQUrl_U(unsafe.Pointer(directory_ret)) gofunc(slotval1) } func (this *QFileDialog) FilterSelected(filter string) { filter_ms := miqt_strdupg(filter) defer C.free(filter_ms) C.QFileDialog_FilterSelected(this.h, (*C.struct_miqt_string)(filter_ms)) } func (this *QFileDialog) OnFilterSelected(slot func(filter string)) { C.QFileDialog_connect_FilterSelected(this.h, unsafe.Pointer(uintptr(cgo.NewHandle(slot)))) } //export miqt_exec_callback_QFileDialog_FilterSelected func miqt_exec_callback_QFileDialog_FilterSelected(cb *C.void, filter *C.struct_miqt_string) { gofunc, ok := (cgo.Handle(uintptr(unsafe.Pointer(cb))).Value()).(func(filter string)) if !ok { panic("miqt: callback of non-callback type (heap corruption?)") } // Convert all CABI parameters to Go parameters var filter_ms *C.struct_miqt_string = filter filter_ret := C.GoStringN(&filter_ms.data, C.int(int64(filter_ms.len))) C.free(unsafe.Pointer(filter_ms)) slotval1 := filter_ret gofunc(slotval1) } func QFileDialog_GetOpenFileName() string { var _ms *C.struct_miqt_string = C.QFileDialog_GetOpenFileName() _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_GetOpenFileUrl() *QUrl { _ret := C.QFileDialog_GetOpenFileUrl() _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QFileDialog_GetSaveFileName() string { var _ms *C.struct_miqt_string = C.QFileDialog_GetSaveFileName() _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_GetSaveFileUrl() *QUrl { _ret := C.QFileDialog_GetSaveFileUrl() _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QFileDialog_GetExistingDirectory() string { var _ms *C.struct_miqt_string = C.QFileDialog_GetExistingDirectory() _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_GetExistingDirectoryUrl() *QUrl { _ret := C.QFileDialog_GetExistingDirectoryUrl() _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QFileDialog_GetOpenFileNames() []string { var _ma *C.struct_miqt_array = C.QFileDialog_GetOpenFileNames() _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++ { _ret[i] = C.GoStringN(&_outCast[i].data, C.int(int64(_outCast[i].len))) C.free(unsafe.Pointer(_outCast[i])) // free the inner miqt_string* } C.free(unsafe.Pointer(_ma)) return _ret } func QFileDialog_GetOpenFileUrls() []QUrl { var _ma *C.struct_miqt_array = C.QFileDialog_GetOpenFileUrls() _ret := make([]QUrl, int(_ma.len)) _outCast := (*[0xffff]*C.QUrl)(unsafe.Pointer(_ma.data)) // mrs jackson for i := 0; i < int(_ma.len); i++ { _ret[i] = *newQUrl(_outCast[i]) } C.free(unsafe.Pointer(_ma)) return _ret } func QFileDialog_SaveFileContent(fileContent *QByteArray) { C.QFileDialog_SaveFileContent(fileContent.cPointer()) } func QFileDialog_Tr2(s string, c string) string { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) c_Cstring := C.CString(c) defer C.free(unsafe.Pointer(c_Cstring)) var _ms *C.struct_miqt_string = C.QFileDialog_Tr2(s_Cstring, c_Cstring) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_Tr3(s string, c string, n int) string { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) c_Cstring := C.CString(c) defer C.free(unsafe.Pointer(c_Cstring)) var _ms *C.struct_miqt_string = C.QFileDialog_Tr3(s_Cstring, c_Cstring, (C.int)(n)) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_TrUtf82(s string, c string) string { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) c_Cstring := C.CString(c) defer C.free(unsafe.Pointer(c_Cstring)) var _ms *C.struct_miqt_string = C.QFileDialog_TrUtf82(s_Cstring, c_Cstring) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_TrUtf83(s string, c string, n int) string { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) c_Cstring := C.CString(c) defer C.free(unsafe.Pointer(c_Cstring)) var _ms *C.struct_miqt_string = C.QFileDialog_TrUtf83(s_Cstring, c_Cstring, (C.int)(n)) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func (this *QFileDialog) SetOption2(option QFileDialog__Option, on bool) { C.QFileDialog_SetOption2(this.h, (C.uintptr_t)(option), (C.bool)(on)) } func QFileDialog_GetOpenFileName1(parent *QWidget) string { var _ms *C.struct_miqt_string = C.QFileDialog_GetOpenFileName1(parent.cPointer()) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_GetOpenFileName2(parent *QWidget, caption string) string { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) var _ms *C.struct_miqt_string = C.QFileDialog_GetOpenFileName2(parent.cPointer(), (*C.struct_miqt_string)(caption_ms)) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_GetOpenFileName3(parent *QWidget, caption string, dir string) string { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) dir_ms := miqt_strdupg(dir) defer C.free(dir_ms) var _ms *C.struct_miqt_string = C.QFileDialog_GetOpenFileName3(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), (*C.struct_miqt_string)(dir_ms)) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_GetOpenFileName4(parent *QWidget, caption string, dir string, filter string) string { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) dir_ms := miqt_strdupg(dir) defer C.free(dir_ms) filter_ms := miqt_strdupg(filter) defer C.free(filter_ms) var _ms *C.struct_miqt_string = C.QFileDialog_GetOpenFileName4(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), (*C.struct_miqt_string)(dir_ms), (*C.struct_miqt_string)(filter_ms)) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_GetOpenFileUrl1(parent *QWidget) *QUrl { _ret := C.QFileDialog_GetOpenFileUrl1(parent.cPointer()) _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QFileDialog_GetOpenFileUrl2(parent *QWidget, caption string) *QUrl { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) _ret := C.QFileDialog_GetOpenFileUrl2(parent.cPointer(), (*C.struct_miqt_string)(caption_ms)) _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QFileDialog_GetOpenFileUrl3(parent *QWidget, caption string, dir *QUrl) *QUrl { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) _ret := C.QFileDialog_GetOpenFileUrl3(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), dir.cPointer()) _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QFileDialog_GetOpenFileUrl4(parent *QWidget, caption string, dir *QUrl, filter string) *QUrl { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) filter_ms := miqt_strdupg(filter) defer C.free(filter_ms) _ret := C.QFileDialog_GetOpenFileUrl4(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), dir.cPointer(), (*C.struct_miqt_string)(filter_ms)) _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QFileDialog_GetSaveFileName1(parent *QWidget) string { var _ms *C.struct_miqt_string = C.QFileDialog_GetSaveFileName1(parent.cPointer()) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_GetSaveFileName2(parent *QWidget, caption string) string { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) var _ms *C.struct_miqt_string = C.QFileDialog_GetSaveFileName2(parent.cPointer(), (*C.struct_miqt_string)(caption_ms)) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_GetSaveFileName3(parent *QWidget, caption string, dir string) string { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) dir_ms := miqt_strdupg(dir) defer C.free(dir_ms) var _ms *C.struct_miqt_string = C.QFileDialog_GetSaveFileName3(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), (*C.struct_miqt_string)(dir_ms)) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_GetSaveFileName4(parent *QWidget, caption string, dir string, filter string) string { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) dir_ms := miqt_strdupg(dir) defer C.free(dir_ms) filter_ms := miqt_strdupg(filter) defer C.free(filter_ms) var _ms *C.struct_miqt_string = C.QFileDialog_GetSaveFileName4(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), (*C.struct_miqt_string)(dir_ms), (*C.struct_miqt_string)(filter_ms)) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_GetSaveFileUrl1(parent *QWidget) *QUrl { _ret := C.QFileDialog_GetSaveFileUrl1(parent.cPointer()) _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QFileDialog_GetSaveFileUrl2(parent *QWidget, caption string) *QUrl { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) _ret := C.QFileDialog_GetSaveFileUrl2(parent.cPointer(), (*C.struct_miqt_string)(caption_ms)) _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QFileDialog_GetSaveFileUrl3(parent *QWidget, caption string, dir *QUrl) *QUrl { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) _ret := C.QFileDialog_GetSaveFileUrl3(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), dir.cPointer()) _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QFileDialog_GetSaveFileUrl4(parent *QWidget, caption string, dir *QUrl, filter string) *QUrl { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) filter_ms := miqt_strdupg(filter) defer C.free(filter_ms) _ret := C.QFileDialog_GetSaveFileUrl4(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), dir.cPointer(), (*C.struct_miqt_string)(filter_ms)) _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QFileDialog_GetExistingDirectory1(parent *QWidget) string { var _ms *C.struct_miqt_string = C.QFileDialog_GetExistingDirectory1(parent.cPointer()) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_GetExistingDirectory2(parent *QWidget, caption string) string { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) var _ms *C.struct_miqt_string = C.QFileDialog_GetExistingDirectory2(parent.cPointer(), (*C.struct_miqt_string)(caption_ms)) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_GetExistingDirectory3(parent *QWidget, caption string, dir string) string { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) dir_ms := miqt_strdupg(dir) defer C.free(dir_ms) var _ms *C.struct_miqt_string = C.QFileDialog_GetExistingDirectory3(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), (*C.struct_miqt_string)(dir_ms)) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_GetExistingDirectory4(parent *QWidget, caption string, dir string, options int) string { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) dir_ms := miqt_strdupg(dir) defer C.free(dir_ms) var _ms *C.struct_miqt_string = C.QFileDialog_GetExistingDirectory4(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), (*C.struct_miqt_string)(dir_ms), (C.int)(options)) _ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len))) C.free(unsafe.Pointer(_ms)) return _ret } func QFileDialog_GetExistingDirectoryUrl1(parent *QWidget) *QUrl { _ret := C.QFileDialog_GetExistingDirectoryUrl1(parent.cPointer()) _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QFileDialog_GetExistingDirectoryUrl2(parent *QWidget, caption string) *QUrl { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) _ret := C.QFileDialog_GetExistingDirectoryUrl2(parent.cPointer(), (*C.struct_miqt_string)(caption_ms)) _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QFileDialog_GetExistingDirectoryUrl3(parent *QWidget, caption string, dir *QUrl) *QUrl { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) _ret := C.QFileDialog_GetExistingDirectoryUrl3(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), dir.cPointer()) _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QFileDialog_GetExistingDirectoryUrl4(parent *QWidget, caption string, dir *QUrl, options int) *QUrl { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) _ret := C.QFileDialog_GetExistingDirectoryUrl4(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), dir.cPointer(), (C.int)(options)) _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QFileDialog_GetExistingDirectoryUrl5(parent *QWidget, caption string, dir *QUrl, options int, supportedSchemes []string) *QUrl { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) // For the C ABI, malloc two C arrays; raw char* pointers and their lengths supportedSchemes_CArray := (*[0xffff]*C.struct_miqt_string)(C.malloc(C.size_t(8 * len(supportedSchemes)))) defer C.free(unsafe.Pointer(supportedSchemes_CArray)) for i := range supportedSchemes { single_ms := miqt_strdupg(supportedSchemes[i]) defer C.free(single_ms) supportedSchemes_CArray[i] = (*C.struct_miqt_string)(single_ms) } supportedSchemes_ma := &C.struct_miqt_array{len: C.size_t(len(supportedSchemes)), data: unsafe.Pointer(supportedSchemes_CArray)} defer runtime.KeepAlive(unsafe.Pointer(supportedSchemes_ma)) _ret := C.QFileDialog_GetExistingDirectoryUrl5(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), dir.cPointer(), (C.int)(options), supportedSchemes_ma) _goptr := newQUrl(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QFileDialog_GetOpenFileNames1(parent *QWidget) []string { var _ma *C.struct_miqt_array = C.QFileDialog_GetOpenFileNames1(parent.cPointer()) _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++ { _ret[i] = C.GoStringN(&_outCast[i].data, C.int(int64(_outCast[i].len))) C.free(unsafe.Pointer(_outCast[i])) // free the inner miqt_string* } C.free(unsafe.Pointer(_ma)) return _ret } func QFileDialog_GetOpenFileNames2(parent *QWidget, caption string) []string { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) var _ma *C.struct_miqt_array = C.QFileDialog_GetOpenFileNames2(parent.cPointer(), (*C.struct_miqt_string)(caption_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++ { _ret[i] = C.GoStringN(&_outCast[i].data, C.int(int64(_outCast[i].len))) C.free(unsafe.Pointer(_outCast[i])) // free the inner miqt_string* } C.free(unsafe.Pointer(_ma)) return _ret } func QFileDialog_GetOpenFileNames3(parent *QWidget, caption string, dir string) []string { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) dir_ms := miqt_strdupg(dir) defer C.free(dir_ms) var _ma *C.struct_miqt_array = C.QFileDialog_GetOpenFileNames3(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), (*C.struct_miqt_string)(dir_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++ { _ret[i] = C.GoStringN(&_outCast[i].data, C.int(int64(_outCast[i].len))) C.free(unsafe.Pointer(_outCast[i])) // free the inner miqt_string* } C.free(unsafe.Pointer(_ma)) return _ret } func QFileDialog_GetOpenFileNames4(parent *QWidget, caption string, dir string, filter string) []string { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) dir_ms := miqt_strdupg(dir) defer C.free(dir_ms) filter_ms := miqt_strdupg(filter) defer C.free(filter_ms) var _ma *C.struct_miqt_array = C.QFileDialog_GetOpenFileNames4(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), (*C.struct_miqt_string)(dir_ms), (*C.struct_miqt_string)(filter_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++ { _ret[i] = C.GoStringN(&_outCast[i].data, C.int(int64(_outCast[i].len))) C.free(unsafe.Pointer(_outCast[i])) // free the inner miqt_string* } C.free(unsafe.Pointer(_ma)) return _ret } func QFileDialog_GetOpenFileUrls1(parent *QWidget) []QUrl { var _ma *C.struct_miqt_array = C.QFileDialog_GetOpenFileUrls1(parent.cPointer()) _ret := make([]QUrl, int(_ma.len)) _outCast := (*[0xffff]*C.QUrl)(unsafe.Pointer(_ma.data)) // mrs jackson for i := 0; i < int(_ma.len); i++ { _ret[i] = *newQUrl(_outCast[i]) } C.free(unsafe.Pointer(_ma)) return _ret } func QFileDialog_GetOpenFileUrls2(parent *QWidget, caption string) []QUrl { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) var _ma *C.struct_miqt_array = C.QFileDialog_GetOpenFileUrls2(parent.cPointer(), (*C.struct_miqt_string)(caption_ms)) _ret := make([]QUrl, int(_ma.len)) _outCast := (*[0xffff]*C.QUrl)(unsafe.Pointer(_ma.data)) // mrs jackson for i := 0; i < int(_ma.len); i++ { _ret[i] = *newQUrl(_outCast[i]) } C.free(unsafe.Pointer(_ma)) return _ret } func QFileDialog_GetOpenFileUrls3(parent *QWidget, caption string, dir *QUrl) []QUrl { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) var _ma *C.struct_miqt_array = C.QFileDialog_GetOpenFileUrls3(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), dir.cPointer()) _ret := make([]QUrl, int(_ma.len)) _outCast := (*[0xffff]*C.QUrl)(unsafe.Pointer(_ma.data)) // mrs jackson for i := 0; i < int(_ma.len); i++ { _ret[i] = *newQUrl(_outCast[i]) } C.free(unsafe.Pointer(_ma)) return _ret } func QFileDialog_GetOpenFileUrls4(parent *QWidget, caption string, dir *QUrl, filter string) []QUrl { caption_ms := miqt_strdupg(caption) defer C.free(caption_ms) filter_ms := miqt_strdupg(filter) defer C.free(filter_ms) var _ma *C.struct_miqt_array = C.QFileDialog_GetOpenFileUrls4(parent.cPointer(), (*C.struct_miqt_string)(caption_ms), dir.cPointer(), (*C.struct_miqt_string)(filter_ms)) _ret := make([]QUrl, int(_ma.len)) _outCast := (*[0xffff]*C.QUrl)(unsafe.Pointer(_ma.data)) // mrs jackson for i := 0; i < int(_ma.len); i++ { _ret[i] = *newQUrl(_outCast[i]) } C.free(unsafe.Pointer(_ma)) return _ret } func QFileDialog_SaveFileContent2(fileContent *QByteArray, fileNameHint string) { fileNameHint_ms := miqt_strdupg(fileNameHint) defer C.free(fileNameHint_ms) C.QFileDialog_SaveFileContent2(fileContent.cPointer(), (*C.struct_miqt_string)(fileNameHint_ms)) } // Delete this object from C++ memory. func (this *QFileDialog) Delete() { C.QFileDialog_Delete(this.h) } // 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 *QFileDialog) GoGC() { runtime.SetFinalizer(this, func(this *QFileDialog) { this.Delete() runtime.KeepAlive(this.h) }) }