miqt/qt6/gen_qstringbuilder.go

62 lines
1.3 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
}
2024-12-07 04:15:57 +00:00
2024-10-20 05:21:03 +00:00
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-12-07 04:15:57 +00:00
return newQAbstractConcatenable((*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)
})
}