miqt/qt/multimedia/gen_qcameracapturedestinationcontrol.go

171 lines
6.1 KiB
Go
Raw Normal View History

2024-11-04 23:15:32 +13:00
package multimedia
/*
#include "gen_qcameracapturedestinationcontrol.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt"
"runtime"
"runtime/cgo"
"unsafe"
)
type QCameraCaptureDestinationControl struct {
h *C.QCameraCaptureDestinationControl
2024-11-04 23:15:32 +13:00
*QMediaControl
}
func (this *QCameraCaptureDestinationControl) cPointer() *C.QCameraCaptureDestinationControl {
if this == nil {
return nil
}
return this.h
}
func (this *QCameraCaptureDestinationControl) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 19:29:06 +13:00
// newQCameraCaptureDestinationControl constructs the type using only CGO pointers.
2024-12-07 17:15:57 +13:00
func newQCameraCaptureDestinationControl(h *C.QCameraCaptureDestinationControl) *QCameraCaptureDestinationControl {
2024-11-04 23:15:32 +13:00
if h == nil {
return nil
}
2024-12-07 17:15:57 +13:00
var outptr_QMediaControl *C.QMediaControl = nil
C.QCameraCaptureDestinationControl_virtbase(h, &outptr_QMediaControl)
2024-11-19 19:29:06 +13:00
return &QCameraCaptureDestinationControl{h: h,
2024-12-07 17:15:57 +13:00
QMediaControl: newQMediaControl(outptr_QMediaControl)}
2024-11-04 23:15:32 +13:00
}
2024-11-19 19:29:06 +13:00
// UnsafeNewQCameraCaptureDestinationControl constructs the type using only unsafe pointers.
2024-12-07 17:15:57 +13:00
func UnsafeNewQCameraCaptureDestinationControl(h unsafe.Pointer) *QCameraCaptureDestinationControl {
return newQCameraCaptureDestinationControl((*C.QCameraCaptureDestinationControl)(h))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraCaptureDestinationControl) MetaObject() *qt.QMetaObject {
2025-02-01 13:45:16 +13:00
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QCameraCaptureDestinationControl_metaObject(this.h)))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraCaptureDestinationControl) 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.QCameraCaptureDestinationControl_metacast(this.h, param1_Cstring))
2024-11-04 23:15:32 +13:00
}
func QCameraCaptureDestinationControl_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.QCameraCaptureDestinationControl_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 QCameraCaptureDestinationControl_TrUtf8(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.QCameraCaptureDestinationControl_trUtf8(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 *QCameraCaptureDestinationControl) IsCaptureDestinationSupported(destination QCameraImageCapture__CaptureDestination) bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QCameraCaptureDestinationControl_isCaptureDestinationSupported(this.h, (C.int)(destination)))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraCaptureDestinationControl) CaptureDestination() QCameraImageCapture__CaptureDestination {
2025-02-01 13:45:16 +13:00
return (QCameraImageCapture__CaptureDestination)(C.QCameraCaptureDestinationControl_captureDestination(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraCaptureDestinationControl) SetCaptureDestination(destination QCameraImageCapture__CaptureDestination) {
2025-02-01 13:45:16 +13:00
C.QCameraCaptureDestinationControl_setCaptureDestination(this.h, (C.int)(destination))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraCaptureDestinationControl) CaptureDestinationChanged(destination QCameraImageCapture__CaptureDestination) {
2025-02-01 13:45:16 +13:00
C.QCameraCaptureDestinationControl_captureDestinationChanged(this.h, (C.int)(destination))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraCaptureDestinationControl) OnCaptureDestinationChanged(slot func(destination QCameraImageCapture__CaptureDestination)) {
2025-02-01 13:45:16 +13:00
C.QCameraCaptureDestinationControl_connect_captureDestinationChanged(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_QCameraCaptureDestinationControl_captureDestinationChanged
func miqt_exec_callback_QCameraCaptureDestinationControl_captureDestinationChanged(cb C.intptr_t, destination C.int) {
2024-11-04 23:15:32 +13:00
gofunc, ok := cgo.Handle(cb).Value().(func(destination QCameraImageCapture__CaptureDestination))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (QCameraImageCapture__CaptureDestination)(destination)
gofunc(slotval1)
}
func QCameraCaptureDestinationControl_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.QCameraCaptureDestinationControl_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 QCameraCaptureDestinationControl_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.QCameraCaptureDestinationControl_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
}
func QCameraCaptureDestinationControl_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))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QCameraCaptureDestinationControl_trUtf82(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 QCameraCaptureDestinationControl_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))
2025-02-01 13:45:16 +13:00
var _ms C.struct_miqt_string = C.QCameraCaptureDestinationControl_trUtf83(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
}
// Delete this object from C++ memory.
func (this *QCameraCaptureDestinationControl) Delete() {
2025-02-01 13:45:16 +13:00
C.QCameraCaptureDestinationControl_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 *QCameraCaptureDestinationControl) GoGC() {
runtime.SetFinalizer(this, func(this *QCameraCaptureDestinationControl) {
this.Delete()
runtime.KeepAlive(this.h)
})
}