miqt/qt6/gen_qstringbuilder.go

65 lines
1.4 KiB
Go
Raw Normal View History

2024-10-20 05:21:03 +00:00
package qt6
/*
#include "gen_qstringbuilder.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QAbstractConcatenable struct {
2024-11-19 06:29:06 +00:00
h *C.QAbstractConcatenable
isSubclass bool
2024-10-20 05:21:03 +00:00
}
func (this *QAbstractConcatenable) cPointer() *C.QAbstractConcatenable {
if this == nil {
return nil
}
return this.h
}
func (this *QAbstractConcatenable) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQAbstractConcatenable constructs the type using only CGO pointers.
2024-10-20 05:21:03 +00:00
func newQAbstractConcatenable(h *C.QAbstractConcatenable) *QAbstractConcatenable {
if h == nil {
return nil
}
return &QAbstractConcatenable{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQAbstractConcatenable constructs the type using only unsafe pointers.
2024-10-20 05:21:03 +00:00
func UnsafeNewQAbstractConcatenable(h unsafe.Pointer) *QAbstractConcatenable {
2024-11-19 06:29:06 +00:00
if h == nil {
return nil
}
return &QAbstractConcatenable{h: (*C.QAbstractConcatenable)(h)}
2024-10-20 05:21:03 +00:00
}
// Delete this object from C++ memory.
func (this *QAbstractConcatenable) Delete() {
2024-11-19 06:29:06 +00:00
C.QAbstractConcatenable_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 *QAbstractConcatenable) GoGC() {
runtime.SetFinalizer(this, func(this *QAbstractConcatenable) {
this.Delete()
runtime.KeepAlive(this.h)
})
}