miqt/qt/multimedia/gen_qmediacontrol.go

139 lines
3.8 KiB
Go

package multimedia
/*
#include "gen_qmediacontrol.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt"
"runtime"
"unsafe"
)
type QMediaControl struct {
h *C.QMediaControl
isSubclass bool
*qt.QObject
}
func (this *QMediaControl) cPointer() *C.QMediaControl {
if this == nil {
return nil
}
return this.h
}
func (this *QMediaControl) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQMediaControl constructs the type using only CGO pointers.
func newQMediaControl(h *C.QMediaControl) *QMediaControl {
if h == nil {
return nil
}
var outptr_QObject *C.QObject = nil
C.QMediaControl_virtbase(h, &outptr_QObject)
return &QMediaControl{h: h,
QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))}
}
// UnsafeNewQMediaControl constructs the type using only unsafe pointers.
func UnsafeNewQMediaControl(h unsafe.Pointer) *QMediaControl {
return newQMediaControl((*C.QMediaControl)(h))
}
func (this *QMediaControl) MetaObject() *qt.QMetaObject {
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QMediaControl_MetaObject(this.h)))
}
func (this *QMediaControl) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
return (unsafe.Pointer)(C.QMediaControl_Metacast(this.h, param1_Cstring))
}
func QMediaControl_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QMediaControl_Tr(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QMediaControl_TrUtf8(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QMediaControl_TrUtf8(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QMediaControl_Tr2(s string, c string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
var _ms C.struct_miqt_string = C.QMediaControl_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QMediaControl_Tr3(s string, c string, n int) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
var _ms C.struct_miqt_string = C.QMediaControl_Tr3(s_Cstring, c_Cstring, (C.int)(n))
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QMediaControl_TrUtf82(s string, c string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
var _ms C.struct_miqt_string = C.QMediaControl_TrUtf82(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QMediaControl_TrUtf83(s string, c string, n int) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
c_Cstring := C.CString(c)
defer C.free(unsafe.Pointer(c_Cstring))
var _ms C.struct_miqt_string = C.QMediaControl_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
// Delete this object from C++ memory.
func (this *QMediaControl) Delete() {
C.QMediaControl_Delete(this.h, C.bool(this.isSubclass))
}
// 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 *QMediaControl) GoGC() {
runtime.SetFinalizer(this, func(this *QMediaControl) {
this.Delete()
runtime.KeepAlive(this.h)
})
}