miqt/qt6/gen_qbindingstorage.go

129 lines
2.8 KiB
Go
Raw Normal View History

2024-10-20 05:21:03 +00:00
package qt6
/*
#include "gen_qbindingstorage.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QBindingStatus struct {
2024-11-19 06:29:06 +00:00
h *C.QBindingStatus
isSubclass bool
2024-10-20 05:21:03 +00:00
}
func (this *QBindingStatus) cPointer() *C.QBindingStatus {
if this == nil {
return nil
}
return this.h
}
func (this *QBindingStatus) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQBindingStatus constructs the type using only CGO pointers.
2024-10-20 05:21:03 +00:00
func newQBindingStatus(h *C.QBindingStatus) *QBindingStatus {
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
2024-10-20 05:21:03 +00:00
return &QBindingStatus{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQBindingStatus constructs the type using only unsafe pointers.
2024-10-20 05:21:03 +00:00
func UnsafeNewQBindingStatus(h unsafe.Pointer) *QBindingStatus {
2024-12-07 04:15:57 +00:00
return newQBindingStatus((*C.QBindingStatus)(h))
2024-10-20 05:21:03 +00:00
}
// Delete this object from C++ memory.
func (this *QBindingStatus) Delete() {
2024-11-19 06:29:06 +00:00
C.QBindingStatus_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 *QBindingStatus) GoGC() {
runtime.SetFinalizer(this, func(this *QBindingStatus) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QBindingStorage struct {
2024-11-19 06:29:06 +00:00
h *C.QBindingStorage
isSubclass bool
2024-10-20 05:21:03 +00:00
}
func (this *QBindingStorage) cPointer() *C.QBindingStorage {
if this == nil {
return nil
}
return this.h
}
func (this *QBindingStorage) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQBindingStorage constructs the type using only CGO pointers.
2024-10-20 05:21:03 +00:00
func newQBindingStorage(h *C.QBindingStorage) *QBindingStorage {
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
2024-10-20 05:21:03 +00:00
return &QBindingStorage{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQBindingStorage constructs the type using only unsafe pointers.
2024-10-20 05:21:03 +00:00
func UnsafeNewQBindingStorage(h unsafe.Pointer) *QBindingStorage {
2024-12-07 04:15:57 +00:00
return newQBindingStorage((*C.QBindingStorage)(h))
2024-10-20 05:21:03 +00:00
}
// NewQBindingStorage constructs a new QBindingStorage object.
func NewQBindingStorage() *QBindingStorage {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQBindingStorage(C.QBindingStorage_new())
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
func (this *QBindingStorage) IsEmpty() bool {
return (bool)(C.QBindingStorage_IsEmpty(this.h))
}
func (this *QBindingStorage) IsValid() bool {
return (bool)(C.QBindingStorage_IsValid(this.h))
}
func (this *QBindingStorage) RegisterDependency(data *QUntypedPropertyData) {
C.QBindingStorage_RegisterDependency(this.h, data.cPointer())
}
// Delete this object from C++ memory.
func (this *QBindingStorage) Delete() {
2024-11-19 06:29:06 +00:00
C.QBindingStorage_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 *QBindingStorage) GoGC() {
runtime.SetFinalizer(this, func(this *QBindingStorage) {
this.Delete()
runtime.KeepAlive(this.h)
})
}