2024-10-20 05:21:03 +00:00
|
|
|
package qt6
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qshareddata.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QSharedData struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QSharedData
|
|
|
|
isSubclass bool
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSharedData) cPointer() *C.QSharedData {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QSharedData) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQSharedData constructs the type using only CGO pointers.
|
2024-10-20 05:21:03 +00:00
|
|
|
func newQSharedData(h *C.QSharedData) *QSharedData {
|
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return &QSharedData{h: h}
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQSharedData constructs the type using only unsafe pointers.
|
2024-10-20 05:21:03 +00:00
|
|
|
func UnsafeNewQSharedData(h unsafe.Pointer) *QSharedData {
|
2024-11-19 06:29:06 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return &QSharedData{h: (*C.QSharedData)(h)}
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQSharedData constructs a new QSharedData object.
|
|
|
|
func NewQSharedData() *QSharedData {
|
2024-11-19 06:29:06 +00:00
|
|
|
var outptr_QSharedData *C.QSharedData = nil
|
|
|
|
|
|
|
|
C.QSharedData_new(&outptr_QSharedData)
|
|
|
|
ret := newQSharedData(outptr_QSharedData)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQSharedData2 constructs a new QSharedData object.
|
|
|
|
func NewQSharedData2(param1 *QSharedData) *QSharedData {
|
2024-11-19 06:29:06 +00:00
|
|
|
var outptr_QSharedData *C.QSharedData = nil
|
|
|
|
|
|
|
|
C.QSharedData_new2(param1.cPointer(), &outptr_QSharedData)
|
|
|
|
ret := newQSharedData(outptr_QSharedData)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Delete this object from C++ memory.
|
|
|
|
func (this *QSharedData) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QSharedData_Delete(this.h, C.bool(this.isSubclass))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
|
|
|
// from C++ memory once it is unreachable from Go memory.
|
|
|
|
func (this *QSharedData) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QSharedData) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
type QAdoptSharedDataTag struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QAdoptSharedDataTag
|
|
|
|
isSubclass bool
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAdoptSharedDataTag) cPointer() *C.QAdoptSharedDataTag {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAdoptSharedDataTag) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQAdoptSharedDataTag constructs the type using only CGO pointers.
|
2024-10-20 05:21:03 +00:00
|
|
|
func newQAdoptSharedDataTag(h *C.QAdoptSharedDataTag) *QAdoptSharedDataTag {
|
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return &QAdoptSharedDataTag{h: h}
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQAdoptSharedDataTag constructs the type using only unsafe pointers.
|
2024-10-20 05:21:03 +00:00
|
|
|
func UnsafeNewQAdoptSharedDataTag(h unsafe.Pointer) *QAdoptSharedDataTag {
|
2024-11-19 06:29:06 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return &QAdoptSharedDataTag{h: (*C.QAdoptSharedDataTag)(h)}
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQAdoptSharedDataTag constructs a new QAdoptSharedDataTag object.
|
|
|
|
func NewQAdoptSharedDataTag() *QAdoptSharedDataTag {
|
2024-11-19 06:29:06 +00:00
|
|
|
var outptr_QAdoptSharedDataTag *C.QAdoptSharedDataTag = nil
|
|
|
|
|
|
|
|
C.QAdoptSharedDataTag_new(&outptr_QAdoptSharedDataTag)
|
|
|
|
ret := newQAdoptSharedDataTag(outptr_QAdoptSharedDataTag)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Delete this object from C++ memory.
|
|
|
|
func (this *QAdoptSharedDataTag) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QAdoptSharedDataTag_Delete(this.h, C.bool(this.isSubclass))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// GoGC adds a Go Finalizer to this pointer, so that it will be deleted
|
|
|
|
// from C++ memory once it is unreachable from Go memory.
|
|
|
|
func (this *QAdoptSharedDataTag) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QAdoptSharedDataTag) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|