miqt/qt6/gen_qpropertyprivate.go

109 lines
2.6 KiB
Go
Raw Permalink Normal View History

2024-10-20 05:21:03 +00:00
package qt6
/*
#include "gen_qpropertyprivate.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QUntypedPropertyData struct {
2024-11-19 06:29:06 +00:00
h *C.QUntypedPropertyData
isSubclass bool
2024-10-20 05:21:03 +00:00
}
func (this *QUntypedPropertyData) cPointer() *C.QUntypedPropertyData {
if this == nil {
return nil
}
return this.h
}
func (this *QUntypedPropertyData) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQUntypedPropertyData constructs the type using only CGO pointers.
2024-10-20 05:21:03 +00:00
func newQUntypedPropertyData(h *C.QUntypedPropertyData) *QUntypedPropertyData {
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
2024-10-20 05:21:03 +00:00
return &QUntypedPropertyData{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQUntypedPropertyData constructs the type using only unsafe pointers.
2024-10-20 05:21:03 +00:00
func UnsafeNewQUntypedPropertyData(h unsafe.Pointer) *QUntypedPropertyData {
2024-12-07 04:15:57 +00:00
return newQUntypedPropertyData((*C.QUntypedPropertyData)(h))
2024-10-20 05:21:03 +00:00
}
// Delete this object from C++ memory.
func (this *QUntypedPropertyData) Delete() {
2024-11-19 06:29:06 +00:00
C.QUntypedPropertyData_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 *QUntypedPropertyData) GoGC() {
runtime.SetFinalizer(this, func(this *QUntypedPropertyData) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QPropertyProxyBindingData struct {
2024-11-19 06:29:06 +00:00
h *C.QPropertyProxyBindingData
isSubclass bool
2024-10-20 05:21:03 +00:00
}
func (this *QPropertyProxyBindingData) cPointer() *C.QPropertyProxyBindingData {
if this == nil {
return nil
}
return this.h
}
func (this *QPropertyProxyBindingData) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQPropertyProxyBindingData constructs the type using only CGO pointers.
2024-10-20 05:21:03 +00:00
func newQPropertyProxyBindingData(h *C.QPropertyProxyBindingData) *QPropertyProxyBindingData {
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
2024-10-20 05:21:03 +00:00
return &QPropertyProxyBindingData{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQPropertyProxyBindingData constructs the type using only unsafe pointers.
2024-10-20 05:21:03 +00:00
func UnsafeNewQPropertyProxyBindingData(h unsafe.Pointer) *QPropertyProxyBindingData {
2024-12-07 04:15:57 +00:00
return newQPropertyProxyBindingData((*C.QPropertyProxyBindingData)(h))
2024-10-20 05:21:03 +00:00
}
// Delete this object from C++ memory.
func (this *QPropertyProxyBindingData) Delete() {
2024-11-19 06:29:06 +00:00
C.QPropertyProxyBindingData_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 *QPropertyProxyBindingData) GoGC() {
runtime.SetFinalizer(this, func(this *QPropertyProxyBindingData) {
this.Delete()
runtime.KeepAlive(this.h)
})
}