2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qmimedata.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
2024-11-19 06:29:06 +00:00
|
|
|
"runtime/cgo"
|
2024-08-25 04:08:24 +00:00
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QMimeData struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QMimeData
|
|
|
|
isSubclass bool
|
2024-08-25 04:08:24 +00:00
|
|
|
*QObject
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) cPointer() *C.QMimeData {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QMimeData) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQMimeData constructs the type using only CGO pointers.
|
|
|
|
func newQMimeData(h *C.QMimeData, h_QObject *C.QObject) *QMimeData {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
return &QMimeData{h: h,
|
|
|
|
QObject: newQObject(h_QObject)}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQMimeData constructs the type using only unsafe pointers.
|
|
|
|
func UnsafeNewQMimeData(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMimeData {
|
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return &QMimeData{h: (*C.QMimeData)(h),
|
|
|
|
QObject: UnsafeNewQObject(h_QObject)}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQMimeData constructs a new QMimeData object.
|
|
|
|
func NewQMimeData() *QMimeData {
|
2024-11-19 06:29:06 +00:00
|
|
|
var outptr_QMimeData *C.QMimeData = nil
|
|
|
|
var outptr_QObject *C.QObject = nil
|
|
|
|
|
|
|
|
C.QMimeData_new(&outptr_QMimeData, &outptr_QObject)
|
|
|
|
ret := newQMimeData(outptr_QMimeData, outptr_QObject)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) MetaObject() *QMetaObject {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMetaObject(C.QMimeData_MetaObject(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QMimeData) Metacast(param1 string) unsafe.Pointer {
|
|
|
|
param1_Cstring := C.CString(param1)
|
|
|
|
defer C.free(unsafe.Pointer(param1_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
return (unsafe.Pointer)(C.QMimeData_Metacast(this.h, param1_Cstring))
|
2024-09-20 22:32:57 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QMimeData_Tr(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QMimeData_Tr(s_Cstring)
|
|
|
|
_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 QMimeData_TrUtf8(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QMimeData_TrUtf8(s_Cstring)
|
|
|
|
_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 (this *QMimeData) Urls() []QUrl {
|
2024-11-04 07:18:27 +00:00
|
|
|
var _ma C.struct_miqt_array = C.QMimeData_Urls(this.h)
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := make([]QUrl, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QUrl)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-12-07 02:02:06 +00:00
|
|
|
_lv_goptr := newQUrl(_outCast[i])
|
2024-09-17 07:30:27 +00:00
|
|
|
_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
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) SetUrls(urls []QUrl) {
|
2024-09-01 05:51:28 +00:00
|
|
|
urls_CArray := (*[0xffff]*C.QUrl)(C.malloc(C.size_t(8 * len(urls))))
|
2024-08-25 04:08:24 +00:00
|
|
|
defer C.free(unsafe.Pointer(urls_CArray))
|
|
|
|
for i := range urls {
|
|
|
|
urls_CArray[i] = urls[i].cPointer()
|
|
|
|
}
|
2024-11-04 07:18:27 +00:00
|
|
|
urls_ma := C.struct_miqt_array{len: C.size_t(len(urls)), data: unsafe.Pointer(urls_CArray)}
|
2024-09-14 22:29:05 +00:00
|
|
|
C.QMimeData_SetUrls(this.h, urls_ma)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) HasUrls() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QMimeData_HasUrls(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) Text() string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QMimeData_Text(this.h)
|
|
|
|
_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 (this *QMimeData) SetText(text string) {
|
2024-10-18 23:53:33 +00:00
|
|
|
text_ms := C.struct_miqt_string{}
|
|
|
|
text_ms.data = C.CString(text)
|
|
|
|
text_ms.len = C.size_t(len(text))
|
|
|
|
defer C.free(unsafe.Pointer(text_ms.data))
|
|
|
|
C.QMimeData_SetText(this.h, text_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) HasText() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QMimeData_HasText(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) Html() string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QMimeData_Html(this.h)
|
|
|
|
_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 (this *QMimeData) SetHtml(html string) {
|
2024-10-18 23:53:33 +00:00
|
|
|
html_ms := C.struct_miqt_string{}
|
|
|
|
html_ms.data = C.CString(html)
|
|
|
|
html_ms.len = C.size_t(len(html))
|
|
|
|
defer C.free(unsafe.Pointer(html_ms.data))
|
|
|
|
C.QMimeData_SetHtml(this.h, html_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) HasHtml() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QMimeData_HasHtml(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) ImageData() *QVariant {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQVariant(C.QMimeData_ImageData(this.h))
|
2024-09-14 22:29:05 +00:00
|
|
|
_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 (this *QMimeData) SetImageData(image *QVariant) {
|
|
|
|
C.QMimeData_SetImageData(this.h, image.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) HasImage() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QMimeData_HasImage(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) ColorData() *QVariant {
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQVariant(C.QMimeData_ColorData(this.h))
|
2024-09-14 22:29:05 +00:00
|
|
|
_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 (this *QMimeData) SetColorData(color *QVariant) {
|
|
|
|
C.QMimeData_SetColorData(this.h, color.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) HasColor() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QMimeData_HasColor(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func (this *QMimeData) Data(mimetype string) []byte {
|
|
|
|
mimetype_ms := C.struct_miqt_string{}
|
|
|
|
mimetype_ms.data = C.CString(mimetype)
|
|
|
|
mimetype_ms.len = C.size_t(len(mimetype))
|
|
|
|
defer C.free(unsafe.Pointer(mimetype_ms.data))
|
|
|
|
var _bytearray C.struct_miqt_string = C.QMimeData_Data(this.h, mimetype_ms)
|
|
|
|
_ret := C.GoBytes(unsafe.Pointer(_bytearray.data), C.int(int64(_bytearray.len)))
|
|
|
|
C.free(unsafe.Pointer(_bytearray.data))
|
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
func (this *QMimeData) SetData(mimetype string, data []byte) {
|
|
|
|
mimetype_ms := C.struct_miqt_string{}
|
|
|
|
mimetype_ms.data = C.CString(mimetype)
|
|
|
|
mimetype_ms.len = C.size_t(len(mimetype))
|
|
|
|
defer C.free(unsafe.Pointer(mimetype_ms.data))
|
|
|
|
data_alias := C.struct_miqt_string{}
|
|
|
|
data_alias.data = (*C.char)(unsafe.Pointer(&data[0]))
|
|
|
|
data_alias.len = C.size_t(len(data))
|
|
|
|
C.QMimeData_SetData(this.h, mimetype_ms, data_alias)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) RemoveFormat(mimetype string) {
|
2024-10-18 23:53:33 +00:00
|
|
|
mimetype_ms := C.struct_miqt_string{}
|
|
|
|
mimetype_ms.data = C.CString(mimetype)
|
|
|
|
mimetype_ms.len = C.size_t(len(mimetype))
|
|
|
|
defer C.free(unsafe.Pointer(mimetype_ms.data))
|
|
|
|
C.QMimeData_RemoveFormat(this.h, mimetype_ms)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) HasFormat(mimetype string) bool {
|
2024-10-18 23:53:33 +00:00
|
|
|
mimetype_ms := C.struct_miqt_string{}
|
|
|
|
mimetype_ms.data = C.CString(mimetype)
|
|
|
|
mimetype_ms.len = C.size_t(len(mimetype))
|
|
|
|
defer C.free(unsafe.Pointer(mimetype_ms.data))
|
|
|
|
return (bool)(C.QMimeData_HasFormat(this.h, mimetype_ms))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) Formats() []string {
|
2024-11-04 07:18:27 +00:00
|
|
|
var _ma C.struct_miqt_array = C.QMimeData_Formats(this.h)
|
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
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) Clear() {
|
|
|
|
C.QMimeData_Clear(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QMimeData_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))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QMimeData_Tr2(s_Cstring, c_Cstring)
|
|
|
|
_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 QMimeData_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))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QMimeData_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
|
|
|
_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 QMimeData_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))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QMimeData_TrUtf82(s_Cstring, c_Cstring)
|
|
|
|
_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 QMimeData_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))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QMimeData_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
|
|
|
_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
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
func (this *QMimeData) callVirtualBase_HasFormat(mimetype string) bool {
|
|
|
|
mimetype_ms := C.struct_miqt_string{}
|
|
|
|
mimetype_ms.data = C.CString(mimetype)
|
|
|
|
mimetype_ms.len = C.size_t(len(mimetype))
|
|
|
|
defer C.free(unsafe.Pointer(mimetype_ms.data))
|
|
|
|
|
|
|
|
return (bool)(C.QMimeData_virtualbase_HasFormat(unsafe.Pointer(this.h), mimetype_ms))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QMimeData) OnHasFormat(slot func(super func(mimetype string) bool, mimetype string) bool) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QMimeData_override_virtual_HasFormat(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QMimeData_HasFormat
|
|
|
|
func miqt_exec_callback_QMimeData_HasFormat(self *C.QMimeData, cb C.intptr_t, mimetype C.struct_miqt_string) C.bool {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(mimetype string) bool, mimetype string) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
var mimetype_ms C.struct_miqt_string = mimetype
|
|
|
|
mimetype_ret := C.GoStringN(mimetype_ms.data, C.int(int64(mimetype_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(mimetype_ms.data))
|
|
|
|
slotval1 := mimetype_ret
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QMimeData{h: self}).callVirtualBase_HasFormat, slotval1)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) callVirtualBase_Formats() []string {
|
|
|
|
|
|
|
|
var _ma C.struct_miqt_array = C.QMimeData_virtualbase_Formats(unsafe.Pointer(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++ {
|
|
|
|
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))
|
|
|
|
_ret[i] = _lv_ret
|
|
|
|
}
|
|
|
|
return _ret
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QMimeData) OnFormats(slot func(super func() []string) []string) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QMimeData_override_virtual_Formats(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QMimeData_Formats
|
|
|
|
func miqt_exec_callback_QMimeData_Formats(self *C.QMimeData, cb C.intptr_t) C.struct_miqt_array {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QMimeData{h: self}).callVirtualBase_Formats)
|
|
|
|
virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn))))
|
|
|
|
defer C.free(unsafe.Pointer(virtualReturn_CArray))
|
|
|
|
for i := range virtualReturn {
|
|
|
|
virtualReturn_i_ms := C.struct_miqt_string{}
|
|
|
|
virtualReturn_i_ms.data = C.CString(virtualReturn[i])
|
|
|
|
virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i]))
|
|
|
|
defer C.free(unsafe.Pointer(virtualReturn_i_ms.data))
|
|
|
|
virtualReturn_CArray[i] = virtualReturn_i_ms
|
|
|
|
}
|
|
|
|
virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)}
|
|
|
|
|
|
|
|
return virtualReturn_ma
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) callVirtualBase_RetrieveData(mimetype string, preferredType QVariant__Type) *QVariant {
|
|
|
|
mimetype_ms := C.struct_miqt_string{}
|
|
|
|
mimetype_ms.data = C.CString(mimetype)
|
|
|
|
mimetype_ms.len = C.size_t(len(mimetype))
|
|
|
|
defer C.free(unsafe.Pointer(mimetype_ms.data))
|
|
|
|
|
2024-12-07 02:02:06 +00:00
|
|
|
_goptr := newQVariant(C.QMimeData_virtualbase_RetrieveData(unsafe.Pointer(this.h), mimetype_ms, (C.int)(preferredType)))
|
2024-11-19 06:29:06 +00:00
|
|
|
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
return _goptr
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QMimeData) OnRetrieveData(slot func(super func(mimetype string, preferredType QVariant__Type) *QVariant, mimetype string, preferredType QVariant__Type) *QVariant) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QMimeData_override_virtual_RetrieveData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QMimeData_RetrieveData
|
|
|
|
func miqt_exec_callback_QMimeData_RetrieveData(self *C.QMimeData, cb C.intptr_t, mimetype C.struct_miqt_string, preferredType C.int) *C.QVariant {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(mimetype string, preferredType QVariant__Type) *QVariant, mimetype string, preferredType QVariant__Type) *QVariant)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
var mimetype_ms C.struct_miqt_string = mimetype
|
|
|
|
mimetype_ret := C.GoStringN(mimetype_ms.data, C.int(int64(mimetype_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(mimetype_ms.data))
|
|
|
|
slotval1 := mimetype_ret
|
|
|
|
slotval2 := (QVariant__Type)(preferredType)
|
|
|
|
|
|
|
|
virtualReturn := gofunc((&QMimeData{h: self}).callVirtualBase_RetrieveData, slotval1, slotval2)
|
|
|
|
|
|
|
|
return virtualReturn.cPointer()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) callVirtualBase_Event(event *QEvent) bool {
|
|
|
|
|
|
|
|
return (bool)(C.QMimeData_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer()))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QMimeData) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QMimeData_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QMimeData_Event
|
|
|
|
func miqt_exec_callback_QMimeData_Event(self *C.QMimeData, cb C.intptr_t, event *C.QEvent) C.bool {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQEvent(event)
|
2024-11-19 06:29:06 +00:00
|
|
|
|
|
|
|
virtualReturn := gofunc((&QMimeData{h: self}).callVirtualBase_Event, slotval1)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool {
|
|
|
|
|
|
|
|
return (bool)(C.QMimeData_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer()))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QMimeData) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QMimeData_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QMimeData_EventFilter
|
|
|
|
func miqt_exec_callback_QMimeData_EventFilter(self *C.QMimeData, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQObject(watched)
|
|
|
|
|
|
|
|
slotval2 := newQEvent(event)
|
2024-11-19 06:29:06 +00:00
|
|
|
|
|
|
|
virtualReturn := gofunc((&QMimeData{h: self}).callVirtualBase_EventFilter, slotval1, slotval2)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) callVirtualBase_TimerEvent(event *QTimerEvent) {
|
|
|
|
|
|
|
|
C.QMimeData_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QMimeData) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QMimeData_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QMimeData_TimerEvent
|
|
|
|
func miqt_exec_callback_QMimeData_TimerEvent(self *C.QMimeData, cb C.intptr_t, event *C.QTimerEvent) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQTimerEvent(event, nil)
|
2024-11-19 06:29:06 +00:00
|
|
|
|
|
|
|
gofunc((&QMimeData{h: self}).callVirtualBase_TimerEvent, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) callVirtualBase_ChildEvent(event *QChildEvent) {
|
|
|
|
|
|
|
|
C.QMimeData_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QMimeData) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QMimeData_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QMimeData_ChildEvent
|
|
|
|
func miqt_exec_callback_QMimeData_ChildEvent(self *C.QMimeData, cb C.intptr_t, event *C.QChildEvent) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQChildEvent(event, nil)
|
2024-11-19 06:29:06 +00:00
|
|
|
|
|
|
|
gofunc((&QMimeData{h: self}).callVirtualBase_ChildEvent, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) callVirtualBase_CustomEvent(event *QEvent) {
|
|
|
|
|
|
|
|
C.QMimeData_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QMimeData) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QMimeData_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QMimeData_CustomEvent
|
|
|
|
func miqt_exec_callback_QMimeData_CustomEvent(self *C.QMimeData, cb C.intptr_t, event *C.QEvent) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQEvent(event)
|
2024-11-19 06:29:06 +00:00
|
|
|
|
|
|
|
gofunc((&QMimeData{h: self}).callVirtualBase_CustomEvent, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) callVirtualBase_ConnectNotify(signal *QMetaMethod) {
|
|
|
|
|
|
|
|
C.QMimeData_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QMimeData) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QMimeData_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QMimeData_ConnectNotify
|
|
|
|
func miqt_exec_callback_QMimeData_ConnectNotify(self *C.QMimeData, cb C.intptr_t, signal *C.QMetaMethod) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQMetaMethod(signal)
|
2024-11-19 06:29:06 +00:00
|
|
|
|
|
|
|
gofunc((&QMimeData{h: self}).callVirtualBase_ConnectNotify, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMimeData) callVirtualBase_DisconnectNotify(signal *QMetaMethod) {
|
|
|
|
|
|
|
|
C.QMimeData_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QMimeData) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QMimeData_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QMimeData_DisconnectNotify
|
|
|
|
func miqt_exec_callback_QMimeData_DisconnectNotify(self *C.QMimeData, cb C.intptr_t, signal *C.QMetaMethod) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQMetaMethod(signal)
|
2024-11-19 06:29:06 +00:00
|
|
|
|
|
|
|
gofunc((&QMimeData{h: self}).callVirtualBase_DisconnectNotify, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QMimeData) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QMimeData_Delete(this.h, C.bool(this.isSubclass))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
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 *QMimeData) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QMimeData) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|