2024-11-04 10:15:32 +00:00
|
|
|
package multimedia
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qcameraflashcontrol.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/mappu/miqt/qt"
|
|
|
|
"runtime"
|
|
|
|
"runtime/cgo"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QCameraFlashControl struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QCameraFlashControl
|
|
|
|
isSubclass bool
|
2024-11-04 10:15:32 +00:00
|
|
|
*QMediaControl
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraFlashControl) cPointer() *C.QCameraFlashControl {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraFlashControl) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQCameraFlashControl constructs the type using only CGO pointers.
|
2024-12-07 04:15:57 +00:00
|
|
|
func newQCameraFlashControl(h *C.QCameraFlashControl) *QCameraFlashControl {
|
2024-11-04 10:15:32 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-12-07 04:15:57 +00:00
|
|
|
var outptr_QMediaControl *C.QMediaControl = nil
|
|
|
|
C.QCameraFlashControl_virtbase(h, &outptr_QMediaControl)
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
return &QCameraFlashControl{h: h,
|
2024-12-07 04:15:57 +00:00
|
|
|
QMediaControl: newQMediaControl(outptr_QMediaControl)}
|
2024-11-04 10:15:32 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQCameraFlashControl constructs the type using only unsafe pointers.
|
2024-12-07 04:15:57 +00:00
|
|
|
func UnsafeNewQCameraFlashControl(h unsafe.Pointer) *QCameraFlashControl {
|
|
|
|
return newQCameraFlashControl((*C.QCameraFlashControl)(h))
|
2024-11-04 10:15:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraFlashControl) MetaObject() *qt.QMetaObject {
|
|
|
|
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QCameraFlashControl_MetaObject(this.h)))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraFlashControl) Metacast(param1 string) unsafe.Pointer {
|
|
|
|
param1_Cstring := C.CString(param1)
|
|
|
|
defer C.free(unsafe.Pointer(param1_Cstring))
|
|
|
|
return (unsafe.Pointer)(C.QCameraFlashControl_Metacast(this.h, param1_Cstring))
|
|
|
|
}
|
|
|
|
|
|
|
|
func QCameraFlashControl_Tr(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
|
|
|
var _ms C.struct_miqt_string = C.QCameraFlashControl_Tr(s_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QCameraFlashControl_TrUtf8(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
|
|
|
var _ms C.struct_miqt_string = C.QCameraFlashControl_TrUtf8(s_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraFlashControl) FlashMode() QCameraExposure__FlashMode {
|
|
|
|
return (QCameraExposure__FlashMode)(C.QCameraFlashControl_FlashMode(this.h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraFlashControl) SetFlashMode(mode QCameraExposure__FlashMode) {
|
|
|
|
C.QCameraFlashControl_SetFlashMode(this.h, (C.int)(mode))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraFlashControl) IsFlashModeSupported(mode QCameraExposure__FlashMode) bool {
|
|
|
|
return (bool)(C.QCameraFlashControl_IsFlashModeSupported(this.h, (C.int)(mode)))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraFlashControl) IsFlashReady() bool {
|
|
|
|
return (bool)(C.QCameraFlashControl_IsFlashReady(this.h))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraFlashControl) FlashReady(param1 bool) {
|
|
|
|
C.QCameraFlashControl_FlashReady(this.h, (C.bool)(param1))
|
|
|
|
}
|
|
|
|
func (this *QCameraFlashControl) OnFlashReady(slot func(param1 bool)) {
|
|
|
|
C.QCameraFlashControl_connect_FlashReady(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QCameraFlashControl_FlashReady
|
|
|
|
func miqt_exec_callback_QCameraFlashControl_FlashReady(cb C.intptr_t, param1 C.bool) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(param1 bool))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (bool)(param1)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QCameraFlashControl_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.QCameraFlashControl_Tr2(s_Cstring, c_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QCameraFlashControl_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.QCameraFlashControl_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 QCameraFlashControl_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.QCameraFlashControl_TrUtf82(s_Cstring, c_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func QCameraFlashControl_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.QCameraFlashControl_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 *QCameraFlashControl) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QCameraFlashControl_Delete(this.h, C.bool(this.isSubclass))
|
2024-11-04 10:15:32 +00: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 *QCameraFlashControl) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QCameraFlashControl) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|