miqt/qt6/multimedia/gen_qmediacapturesession.go

466 lines
16 KiB
Go
Raw Normal View History

2024-11-04 23:15:32 +13:00
package multimedia
/*
#include "gen_qmediacapturesession.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt6"
"runtime"
"runtime/cgo"
"unsafe"
)
type QMediaCaptureSession struct {
h *C.QMediaCaptureSession
2024-11-04 23:15:32 +13:00
*qt6.QObject
}
func (this *QMediaCaptureSession) cPointer() *C.QMediaCaptureSession {
if this == nil {
return nil
}
return this.h
}
func (this *QMediaCaptureSession) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 19:29:06 +13:00
// newQMediaCaptureSession constructs the type using only CGO pointers.
2024-12-07 17:15:57 +13:00
func newQMediaCaptureSession(h *C.QMediaCaptureSession) *QMediaCaptureSession {
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.QMediaCaptureSession_virtbase(h, &outptr_QObject)
2024-11-19 19:29:06 +13:00
return &QMediaCaptureSession{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
// UnsafeNewQMediaCaptureSession constructs the type using only unsafe pointers.
2024-12-07 17:15:57 +13:00
func UnsafeNewQMediaCaptureSession(h unsafe.Pointer) *QMediaCaptureSession {
return newQMediaCaptureSession((*C.QMediaCaptureSession)(h))
2024-11-04 23:15:32 +13:00
}
// NewQMediaCaptureSession constructs a new QMediaCaptureSession object.
func NewQMediaCaptureSession() *QMediaCaptureSession {
2024-11-19 19:29:06 +13:00
return newQMediaCaptureSession(C.QMediaCaptureSession_new())
2024-11-04 23:15:32 +13:00
}
// NewQMediaCaptureSession2 constructs a new QMediaCaptureSession object.
func NewQMediaCaptureSession2(parent *qt6.QObject) *QMediaCaptureSession {
2024-11-19 19:29:06 +13:00
return newQMediaCaptureSession(C.QMediaCaptureSession_new2((*C.QObject)(parent.UnsafePointer())))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) MetaObject() *qt6.QMetaObject {
2025-02-01 13:45:16 +13:00
return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QMediaCaptureSession_metaObject(this.h)))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) 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.QMediaCaptureSession_metacast(this.h, param1_Cstring))
2024-11-04 23:15:32 +13:00
}
func QMediaCaptureSession_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.QMediaCaptureSession_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 *QMediaCaptureSession) AudioInput() *QAudioInput {
2025-02-01 13:45:16 +13:00
return newQAudioInput(C.QMediaCaptureSession_audioInput(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) SetAudioInput(input *QAudioInput) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_setAudioInput(this.h, input.cPointer())
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) Camera() *QCamera {
2025-02-01 13:45:16 +13:00
return newQCamera(C.QMediaCaptureSession_camera(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) SetCamera(camera *QCamera) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_setCamera(this.h, camera.cPointer())
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) ImageCapture() *QImageCapture {
2025-02-01 13:45:16 +13:00
return newQImageCapture(C.QMediaCaptureSession_imageCapture(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) SetImageCapture(imageCapture *QImageCapture) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_setImageCapture(this.h, imageCapture.cPointer())
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) Recorder() *QMediaRecorder {
2025-02-01 13:45:16 +13:00
return newQMediaRecorder(C.QMediaCaptureSession_recorder(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) SetRecorder(recorder *QMediaRecorder) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_setRecorder(this.h, recorder.cPointer())
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) SetVideoOutput(output *qt6.QObject) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_setVideoOutput(this.h, (*C.QObject)(output.UnsafePointer()))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) VideoOutput() *qt6.QObject {
2025-02-01 13:45:16 +13:00
return qt6.UnsafeNewQObject(unsafe.Pointer(C.QMediaCaptureSession_videoOutput(this.h)))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) SetVideoSink(sink *QVideoSink) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_setVideoSink(this.h, sink.cPointer())
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) VideoSink() *QVideoSink {
2025-02-01 13:45:16 +13:00
return newQVideoSink(C.QMediaCaptureSession_videoSink(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) SetAudioOutput(output *QAudioOutput) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_setAudioOutput(this.h, output.cPointer())
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) AudioOutput() *QAudioOutput {
2025-02-01 13:45:16 +13:00
return newQAudioOutput(C.QMediaCaptureSession_audioOutput(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) AudioInputChanged() {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_audioInputChanged(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) OnAudioInputChanged(slot func()) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_connect_audioInputChanged(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_QMediaCaptureSession_audioInputChanged
func miqt_exec_callback_QMediaCaptureSession_audioInputChanged(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 *QMediaCaptureSession) CameraChanged() {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_cameraChanged(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) OnCameraChanged(slot func()) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_connect_cameraChanged(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_QMediaCaptureSession_cameraChanged
func miqt_exec_callback_QMediaCaptureSession_cameraChanged(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 *QMediaCaptureSession) ImageCaptureChanged() {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_imageCaptureChanged(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) OnImageCaptureChanged(slot func()) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_connect_imageCaptureChanged(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_QMediaCaptureSession_imageCaptureChanged
func miqt_exec_callback_QMediaCaptureSession_imageCaptureChanged(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 *QMediaCaptureSession) RecorderChanged() {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_recorderChanged(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) OnRecorderChanged(slot func()) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_connect_recorderChanged(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_QMediaCaptureSession_recorderChanged
func miqt_exec_callback_QMediaCaptureSession_recorderChanged(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 *QMediaCaptureSession) VideoOutputChanged() {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_videoOutputChanged(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) OnVideoOutputChanged(slot func()) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_connect_videoOutputChanged(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_QMediaCaptureSession_videoOutputChanged
func miqt_exec_callback_QMediaCaptureSession_videoOutputChanged(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 *QMediaCaptureSession) AudioOutputChanged() {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_audioOutputChanged(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QMediaCaptureSession) OnAudioOutputChanged(slot func()) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_connect_audioOutputChanged(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_QMediaCaptureSession_audioOutputChanged
func miqt_exec_callback_QMediaCaptureSession_audioOutputChanged(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 QMediaCaptureSession_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.QMediaCaptureSession_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 QMediaCaptureSession_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.QMediaCaptureSession_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 *QMediaCaptureSession) callVirtualBase_Event(event *qt6.QEvent) bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QMediaCaptureSession_virtualbase_event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())))
2024-11-19 19:29:06 +13:00
}
func (this *QMediaCaptureSession) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) {
2025-02-01 13:45:16 +13:00
ok := C.QMediaCaptureSession_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_QMediaCaptureSession_event
func miqt_exec_callback_QMediaCaptureSession_event(self *C.QMediaCaptureSession, 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((&QMediaCaptureSession{h: self}).callVirtualBase_Event, slotval1)
return (C.bool)(virtualReturn)
}
func (this *QMediaCaptureSession) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QMediaCaptureSession_virtualbase_eventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer())))
2024-11-19 19:29:06 +13:00
}
func (this *QMediaCaptureSession) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) {
2025-02-01 13:45:16 +13:00
ok := C.QMediaCaptureSession_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_QMediaCaptureSession_eventFilter
func miqt_exec_callback_QMediaCaptureSession_eventFilter(self *C.QMediaCaptureSession, 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((&QMediaCaptureSession{h: self}).callVirtualBase_EventFilter, slotval1, slotval2)
return (C.bool)(virtualReturn)
}
func (this *QMediaCaptureSession) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_virtualbase_timerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer()))
2024-11-19 19:29:06 +13:00
}
func (this *QMediaCaptureSession) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) {
2025-02-01 13:45:16 +13:00
ok := C.QMediaCaptureSession_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_QMediaCaptureSession_timerEvent
func miqt_exec_callback_QMediaCaptureSession_timerEvent(self *C.QMediaCaptureSession, 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((&QMediaCaptureSession{h: self}).callVirtualBase_TimerEvent, slotval1)
}
func (this *QMediaCaptureSession) callVirtualBase_ChildEvent(event *qt6.QChildEvent) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_virtualbase_childEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer()))
2024-11-19 19:29:06 +13:00
}
func (this *QMediaCaptureSession) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) {
2025-02-01 13:45:16 +13:00
ok := C.QMediaCaptureSession_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_QMediaCaptureSession_childEvent
func miqt_exec_callback_QMediaCaptureSession_childEvent(self *C.QMediaCaptureSession, 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((&QMediaCaptureSession{h: self}).callVirtualBase_ChildEvent, slotval1)
}
func (this *QMediaCaptureSession) callVirtualBase_CustomEvent(event *qt6.QEvent) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_virtualbase_customEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))
2024-11-19 19:29:06 +13:00
}
func (this *QMediaCaptureSession) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) {
2025-02-01 13:45:16 +13:00
ok := C.QMediaCaptureSession_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_QMediaCaptureSession_customEvent
func miqt_exec_callback_QMediaCaptureSession_customEvent(self *C.QMediaCaptureSession, 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((&QMediaCaptureSession{h: self}).callVirtualBase_CustomEvent, slotval1)
}
func (this *QMediaCaptureSession) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_virtualbase_connectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))
2024-11-19 19:29:06 +13:00
}
func (this *QMediaCaptureSession) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) {
2025-02-01 13:45:16 +13:00
ok := C.QMediaCaptureSession_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_QMediaCaptureSession_connectNotify
func miqt_exec_callback_QMediaCaptureSession_connectNotify(self *C.QMediaCaptureSession, 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((&QMediaCaptureSession{h: self}).callVirtualBase_ConnectNotify, slotval1)
}
func (this *QMediaCaptureSession) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_virtualbase_disconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))
2024-11-19 19:29:06 +13:00
}
func (this *QMediaCaptureSession) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) {
2025-02-01 13:45:16 +13:00
ok := C.QMediaCaptureSession_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_QMediaCaptureSession_disconnectNotify
func miqt_exec_callback_QMediaCaptureSession_disconnectNotify(self *C.QMediaCaptureSession, 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((&QMediaCaptureSession{h: self}).callVirtualBase_DisconnectNotify, slotval1)
}
2024-11-04 23:15:32 +13:00
// Delete this object from C++ memory.
func (this *QMediaCaptureSession) Delete() {
2025-02-01 13:45:16 +13:00
C.QMediaCaptureSession_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 *QMediaCaptureSession) GoGC() {
runtime.SetFinalizer(this, func(this *QMediaCaptureSession) {
this.Delete()
runtime.KeepAlive(this.h)
})
}