2024-11-04 10:15:32 +00:00
|
|
|
package multimedia
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qmediabindableinterface.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QMediaBindableInterface struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QMediaBindableInterface
|
|
|
|
isSubclass bool
|
2024-11-04 10:15:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMediaBindableInterface) cPointer() *C.QMediaBindableInterface {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMediaBindableInterface) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQMediaBindableInterface constructs the type using only CGO pointers.
|
2024-11-04 10:15:32 +00:00
|
|
|
func newQMediaBindableInterface(h *C.QMediaBindableInterface) *QMediaBindableInterface {
|
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return &QMediaBindableInterface{h: h}
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQMediaBindableInterface constructs the type using only unsafe pointers.
|
2024-11-04 10:15:32 +00:00
|
|
|
func UnsafeNewQMediaBindableInterface(h unsafe.Pointer) *QMediaBindableInterface {
|
2024-11-19 06:29:06 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return &QMediaBindableInterface{h: (*C.QMediaBindableInterface)(h)}
|
2024-11-04 10:15:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QMediaBindableInterface) MediaObject() *QMediaObject {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMediaObject(C.QMediaBindableInterface_MediaObject(this.h), nil)
|
2024-11-04 10:15:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Delete this object from C++ memory.
|
|
|
|
func (this *QMediaBindableInterface) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QMediaBindableInterface_Delete(this.h, C.bool(this.isSubclass))
|
2024-11-04 10:15:32 +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 *QMediaBindableInterface) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QMediaBindableInterface) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|