miqt/qt6/spatialaudio/gen_qaudioengine.go

484 lines
16 KiB
Go
Raw Normal View History

2024-11-04 23:15:32 +13:00
package spatialaudio
/*
#include "gen_qaudioengine.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt6"
"github.com/mappu/miqt/qt6/multimedia"
"runtime"
"runtime/cgo"
"unsafe"
)
type QAudioEngine__OutputMode int
const (
QAudioEngine__Surround QAudioEngine__OutputMode = 0
QAudioEngine__Stereo QAudioEngine__OutputMode = 1
QAudioEngine__Headphone QAudioEngine__OutputMode = 2
)
type QAudioEngine struct {
h *C.QAudioEngine
2024-11-04 23:15:32 +13:00
*qt6.QObject
}
func (this *QAudioEngine) cPointer() *C.QAudioEngine {
if this == nil {
return nil
}
return this.h
}
func (this *QAudioEngine) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 19:29:06 +13:00
// newQAudioEngine constructs the type using only CGO pointers.
2024-12-07 17:15:57 +13:00
func newQAudioEngine(h *C.QAudioEngine) *QAudioEngine {
2024-11-04 23:15:32 +13:00
if h == nil {
return nil
}
2024-12-07 17:15:57 +13:00
var outptr_QObject *C.QObject = nil
C.QAudioEngine_virtbase(h, &outptr_QObject)
2024-11-19 19:29:06 +13:00
return &QAudioEngine{h: h,
2024-12-07 17:15:57 +13:00
QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))}
2024-11-04 23:15:32 +13:00
}
2024-11-19 19:29:06 +13:00
// UnsafeNewQAudioEngine constructs the type using only unsafe pointers.
2024-12-07 17:15:57 +13:00
func UnsafeNewQAudioEngine(h unsafe.Pointer) *QAudioEngine {
return newQAudioEngine((*C.QAudioEngine)(h))
2024-11-04 23:15:32 +13:00
}
// NewQAudioEngine constructs a new QAudioEngine object.
func NewQAudioEngine() *QAudioEngine {
2024-11-19 19:29:06 +13:00
return newQAudioEngine(C.QAudioEngine_new())
2024-11-04 23:15:32 +13:00
}
// NewQAudioEngine2 constructs a new QAudioEngine object.
func NewQAudioEngine2(parent *qt6.QObject) *QAudioEngine {
2024-11-19 19:29:06 +13:00
return newQAudioEngine(C.QAudioEngine_new2((*C.QObject)(parent.UnsafePointer())))
2024-11-04 23:15:32 +13:00
}
// NewQAudioEngine3 constructs a new QAudioEngine object.
func NewQAudioEngine3(sampleRate int) *QAudioEngine {
2024-11-19 19:29:06 +13:00
return newQAudioEngine(C.QAudioEngine_new3((C.int)(sampleRate)))
2024-11-04 23:15:32 +13:00
}
// NewQAudioEngine4 constructs a new QAudioEngine object.
func NewQAudioEngine4(sampleRate int, parent *qt6.QObject) *QAudioEngine {
2024-11-19 19:29:06 +13:00
return newQAudioEngine(C.QAudioEngine_new4((C.int)(sampleRate), (*C.QObject)(parent.UnsafePointer())))
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) MetaObject() *qt6.QMetaObject {
2025-02-01 13:45:16 +13:00
return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QAudioEngine_metaObject(this.h)))
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
2025-02-01 13:45:16 +13:00
return (unsafe.Pointer)(C.QAudioEngine_metacast(this.h, param1_Cstring))
2024-11-04 23:15:32 +13:00
}
func QAudioEngine_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QAudioEngine_tr(s_Cstring)
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QAudioEngine) SetOutputMode(mode QAudioEngine__OutputMode) {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_setOutputMode(this.h, (C.int)(mode))
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) OutputMode() QAudioEngine__OutputMode {
2025-02-01 13:45:16 +13:00
return (QAudioEngine__OutputMode)(C.QAudioEngine_outputMode(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) SampleRate() int {
2025-02-01 13:45:16 +13:00
return (int)(C.QAudioEngine_sampleRate(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) SetOutputDevice(device *multimedia.QAudioDevice) {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_setOutputDevice(this.h, (*C.QAudioDevice)(device.UnsafePointer()))
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) OutputDevice() *multimedia.QAudioDevice {
2025-02-01 13:45:16 +13:00
_goptr := multimedia.UnsafeNewQAudioDevice(unsafe.Pointer(C.QAudioEngine_outputDevice(this.h)))
2024-11-04 23:15:32 +13:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QAudioEngine) SetMasterVolume(volume float32) {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_setMasterVolume(this.h, (C.float)(volume))
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) MasterVolume() float32 {
2025-02-01 13:45:16 +13:00
return (float32)(C.QAudioEngine_masterVolume(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) SetPaused(paused bool) {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_setPaused(this.h, (C.bool)(paused))
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) Paused() bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QAudioEngine_paused(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) SetRoomEffectsEnabled(enabled bool) {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_setRoomEffectsEnabled(this.h, (C.bool)(enabled))
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) RoomEffectsEnabled() bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QAudioEngine_roomEffectsEnabled(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) SetDistanceScale(scale float32) {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_setDistanceScale(this.h, (C.float)(scale))
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) DistanceScale() float32 {
2025-02-01 13:45:16 +13:00
return (float32)(C.QAudioEngine_distanceScale(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) OutputModeChanged() {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_outputModeChanged(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) OnOutputModeChanged(slot func()) {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_connect_outputModeChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QAudioEngine_outputModeChanged
func miqt_exec_callback_QAudioEngine_outputModeChanged(cb C.intptr_t) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func())
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
gofunc()
}
func (this *QAudioEngine) OutputDeviceChanged() {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_outputDeviceChanged(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) OnOutputDeviceChanged(slot func()) {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_connect_outputDeviceChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QAudioEngine_outputDeviceChanged
func miqt_exec_callback_QAudioEngine_outputDeviceChanged(cb C.intptr_t) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func())
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
gofunc()
}
func (this *QAudioEngine) MasterVolumeChanged() {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_masterVolumeChanged(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) OnMasterVolumeChanged(slot func()) {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_connect_masterVolumeChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QAudioEngine_masterVolumeChanged
func miqt_exec_callback_QAudioEngine_masterVolumeChanged(cb C.intptr_t) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func())
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
gofunc()
}
func (this *QAudioEngine) PausedChanged() {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_pausedChanged(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) OnPausedChanged(slot func()) {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_connect_pausedChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QAudioEngine_pausedChanged
func miqt_exec_callback_QAudioEngine_pausedChanged(cb C.intptr_t) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func())
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
gofunc()
}
func (this *QAudioEngine) DistanceScaleChanged() {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_distanceScaleChanged(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) OnDistanceScaleChanged(slot func()) {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_connect_distanceScaleChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
2024-11-04 23:15:32 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QAudioEngine_distanceScaleChanged
func miqt_exec_callback_QAudioEngine_distanceScaleChanged(cb C.intptr_t) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func())
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
gofunc()
}
func (this *QAudioEngine) Start() {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_start(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) Stop() {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_stop(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) Pause() {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_pause(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QAudioEngine) Resume() {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_resume(this.h)
2024-11-04 23:15:32 +13:00
}
func QAudioEngine_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))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QAudioEngine_tr2(s_Cstring, c_Cstring)
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QAudioEngine_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))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QAudioEngine_tr3(s_Cstring, c_Cstring, (C.int)(n))
2024-11-04 23:15:32 +13:00
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
2024-11-19 19:29:06 +13:00
func (this *QAudioEngine) callVirtualBase_Event(event *qt6.QEvent) bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QAudioEngine_virtualbase_event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())))
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
func (this *QAudioEngine) Onevent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) {
ok := C.QAudioEngine_override_virtual_event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QAudioEngine_event
func miqt_exec_callback_QAudioEngine_event(self *C.QAudioEngine, cb C.intptr_t, event *C.QEvent) C.bool {
2024-11-19 19:29:06 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event))
virtualReturn := gofunc((&QAudioEngine{h: self}).callVirtualBase_Event, slotval1)
return (C.bool)(virtualReturn)
}
func (this *QAudioEngine) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QAudioEngine_virtualbase_eventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer())))
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
func (this *QAudioEngine) OneventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) {
ok := C.QAudioEngine_override_virtual_eventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QAudioEngine_eventFilter
func miqt_exec_callback_QAudioEngine_eventFilter(self *C.QAudioEngine, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool {
2024-11-19 19:29:06 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched))
2024-11-19 19:29:06 +13:00
slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event))
virtualReturn := gofunc((&QAudioEngine{h: self}).callVirtualBase_EventFilter, slotval1, slotval2)
return (C.bool)(virtualReturn)
}
func (this *QAudioEngine) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_virtualbase_timerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer()))
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
func (this *QAudioEngine) OntimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) {
ok := C.QAudioEngine_override_virtual_timerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QAudioEngine_timerEvent
func miqt_exec_callback_QAudioEngine_timerEvent(self *C.QAudioEngine, cb C.intptr_t, event *C.QTimerEvent) {
2024-11-19 19:29:06 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
2024-12-07 17:15:57 +13:00
slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event))
2024-11-19 19:29:06 +13:00
gofunc((&QAudioEngine{h: self}).callVirtualBase_TimerEvent, slotval1)
}
func (this *QAudioEngine) callVirtualBase_ChildEvent(event *qt6.QChildEvent) {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_virtualbase_childEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer()))
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
func (this *QAudioEngine) OnchildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) {
ok := C.QAudioEngine_override_virtual_childEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QAudioEngine_childEvent
func miqt_exec_callback_QAudioEngine_childEvent(self *C.QAudioEngine, cb C.intptr_t, event *C.QChildEvent) {
2024-11-19 19:29:06 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
2024-12-07 17:15:57 +13:00
slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event))
2024-11-19 19:29:06 +13:00
gofunc((&QAudioEngine{h: self}).callVirtualBase_ChildEvent, slotval1)
}
func (this *QAudioEngine) callVirtualBase_CustomEvent(event *qt6.QEvent) {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_virtualbase_customEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
func (this *QAudioEngine) OncustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) {
ok := C.QAudioEngine_override_virtual_customEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QAudioEngine_customEvent
func miqt_exec_callback_QAudioEngine_customEvent(self *C.QAudioEngine, cb C.intptr_t, event *C.QEvent) {
2024-11-19 19:29:06 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event))
gofunc((&QAudioEngine{h: self}).callVirtualBase_CustomEvent, slotval1)
}
func (this *QAudioEngine) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_virtualbase_connectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
func (this *QAudioEngine) OnconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) {
ok := C.QAudioEngine_override_virtual_connectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QAudioEngine_connectNotify
func miqt_exec_callback_QAudioEngine_connectNotify(self *C.QAudioEngine, cb C.intptr_t, signal *C.QMetaMethod) {
2024-11-19 19:29:06 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal))
gofunc((&QAudioEngine{h: self}).callVirtualBase_ConnectNotify, slotval1)
}
func (this *QAudioEngine) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_virtualbase_disconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
func (this *QAudioEngine) OndisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) {
ok := C.QAudioEngine_override_virtual_disconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
if !ok {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 19:29:06 +13:00
}
2025-02-01 13:45:16 +13:00
//export miqt_exec_callback_QAudioEngine_disconnectNotify
func miqt_exec_callback_QAudioEngine_disconnectNotify(self *C.QAudioEngine, cb C.intptr_t, signal *C.QMetaMethod) {
2024-11-19 19:29:06 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal))
gofunc((&QAudioEngine{h: self}).callVirtualBase_DisconnectNotify, slotval1)
}
2024-11-04 23:15:32 +13:00
// Delete this object from C++ memory.
func (this *QAudioEngine) Delete() {
2025-02-01 13:45:16 +13:00
C.QAudioEngine_delete(this.h)
2024-11-04 23:15:32 +13: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 *QAudioEngine) GoGC() {
runtime.SetFinalizer(this, func(this *QAudioEngine) {
this.Delete()
runtime.KeepAlive(this.h)
})
}