miqt/qt/multimedia/gen_qmediabindableinterface.go

62 lines
1.3 KiB
Go

package multimedia
/*
#include "gen_qmediabindableinterface.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QMediaBindableInterface struct {
h *C.QMediaBindableInterface
}
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)
}
func newQMediaBindableInterface(h *C.QMediaBindableInterface) *QMediaBindableInterface {
if h == nil {
return nil
}
return &QMediaBindableInterface{h: h}
}
func UnsafeNewQMediaBindableInterface(h unsafe.Pointer) *QMediaBindableInterface {
return newQMediaBindableInterface((*C.QMediaBindableInterface)(h))
}
func (this *QMediaBindableInterface) MediaObject() *QMediaObject {
return UnsafeNewQMediaObject(unsafe.Pointer(C.QMediaBindableInterface_MediaObject(this.h)))
}
// Delete this object from C++ memory.
func (this *QMediaBindableInterface) Delete() {
C.QMediaBindableInterface_Delete(this.h)
}
// 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)
})
}