2024-11-04 23:15:32 +13:00
|
|
|
package multimedia
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qcamerazoomcontrol.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/mappu/miqt/qt"
|
|
|
|
"runtime"
|
|
|
|
"runtime/cgo"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QCameraZoomControl struct {
|
2025-01-18 17:57:48 +13:00
|
|
|
h *C.QCameraZoomControl
|
2024-11-04 23:15:32 +13:00
|
|
|
*QMediaControl
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraZoomControl) cPointer() *C.QCameraZoomControl {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraZoomControl) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 19:29:06 +13:00
|
|
|
// newQCameraZoomControl constructs the type using only CGO pointers.
|
2024-12-07 17:15:57 +13:00
|
|
|
func newQCameraZoomControl(h *C.QCameraZoomControl) *QCameraZoomControl {
|
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.QCameraZoomControl_virtbase(h, &outptr_QMediaControl)
|
|
|
|
|
2024-11-19 19:29:06 +13:00
|
|
|
return &QCameraZoomControl{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
|
|
|
// UnsafeNewQCameraZoomControl constructs the type using only unsafe pointers.
|
2024-12-07 17:15:57 +13:00
|
|
|
func UnsafeNewQCameraZoomControl(h unsafe.Pointer) *QCameraZoomControl {
|
|
|
|
return newQCameraZoomControl((*C.QCameraZoomControl)(h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraZoomControl) MetaObject() *qt.QMetaObject {
|
2025-02-01 13:45:16 +13:00
|
|
|
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QCameraZoomControl_metaObject(this.h)))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraZoomControl) 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.QCameraZoomControl_metacast(this.h, param1_Cstring))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func QCameraZoomControl_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.QCameraZoomControl_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 QCameraZoomControl_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.QCameraZoomControl_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 *QCameraZoomControl) MaximumOpticalZoom() float64 {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (float64)(C.QCameraZoomControl_maximumOpticalZoom(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraZoomControl) MaximumDigitalZoom() float64 {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (float64)(C.QCameraZoomControl_maximumDigitalZoom(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraZoomControl) RequestedOpticalZoom() float64 {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (float64)(C.QCameraZoomControl_requestedOpticalZoom(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraZoomControl) RequestedDigitalZoom() float64 {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (float64)(C.QCameraZoomControl_requestedDigitalZoom(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraZoomControl) CurrentOpticalZoom() float64 {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (float64)(C.QCameraZoomControl_currentOpticalZoom(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraZoomControl) CurrentDigitalZoom() float64 {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (float64)(C.QCameraZoomControl_currentDigitalZoom(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraZoomControl) ZoomTo(optical float64, digital float64) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QCameraZoomControl_zoomTo(this.h, (C.double)(optical), (C.double)(digital))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraZoomControl) MaximumOpticalZoomChanged(param1 float64) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QCameraZoomControl_maximumOpticalZoomChanged(this.h, (C.double)(param1))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QCameraZoomControl) OnMaximumOpticalZoomChanged(slot func(param1 float64)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QCameraZoomControl_connect_maximumOpticalZoomChanged(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_QCameraZoomControl_maximumOpticalZoomChanged
|
|
|
|
func miqt_exec_callback_QCameraZoomControl_maximumOpticalZoomChanged(cb C.intptr_t, param1 C.double) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(param1 float64))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (float64)(param1)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraZoomControl) MaximumDigitalZoomChanged(param1 float64) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QCameraZoomControl_maximumDigitalZoomChanged(this.h, (C.double)(param1))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QCameraZoomControl) OnMaximumDigitalZoomChanged(slot func(param1 float64)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QCameraZoomControl_connect_maximumDigitalZoomChanged(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_QCameraZoomControl_maximumDigitalZoomChanged
|
|
|
|
func miqt_exec_callback_QCameraZoomControl_maximumDigitalZoomChanged(cb C.intptr_t, param1 C.double) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(param1 float64))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (float64)(param1)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraZoomControl) RequestedOpticalZoomChanged(opticalZoom float64) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QCameraZoomControl_requestedOpticalZoomChanged(this.h, (C.double)(opticalZoom))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QCameraZoomControl) OnRequestedOpticalZoomChanged(slot func(opticalZoom float64)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QCameraZoomControl_connect_requestedOpticalZoomChanged(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_QCameraZoomControl_requestedOpticalZoomChanged
|
|
|
|
func miqt_exec_callback_QCameraZoomControl_requestedOpticalZoomChanged(cb C.intptr_t, opticalZoom C.double) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(opticalZoom float64))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (float64)(opticalZoom)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraZoomControl) RequestedDigitalZoomChanged(digitalZoom float64) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QCameraZoomControl_requestedDigitalZoomChanged(this.h, (C.double)(digitalZoom))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QCameraZoomControl) OnRequestedDigitalZoomChanged(slot func(digitalZoom float64)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QCameraZoomControl_connect_requestedDigitalZoomChanged(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_QCameraZoomControl_requestedDigitalZoomChanged
|
|
|
|
func miqt_exec_callback_QCameraZoomControl_requestedDigitalZoomChanged(cb C.intptr_t, digitalZoom C.double) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(digitalZoom float64))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (float64)(digitalZoom)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraZoomControl) CurrentOpticalZoomChanged(opticalZoom float64) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QCameraZoomControl_currentOpticalZoomChanged(this.h, (C.double)(opticalZoom))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QCameraZoomControl) OnCurrentOpticalZoomChanged(slot func(opticalZoom float64)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QCameraZoomControl_connect_currentOpticalZoomChanged(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_QCameraZoomControl_currentOpticalZoomChanged
|
|
|
|
func miqt_exec_callback_QCameraZoomControl_currentOpticalZoomChanged(cb C.intptr_t, opticalZoom C.double) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(opticalZoom float64))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (float64)(opticalZoom)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QCameraZoomControl) CurrentDigitalZoomChanged(digitalZoom float64) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QCameraZoomControl_currentDigitalZoomChanged(this.h, (C.double)(digitalZoom))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QCameraZoomControl) OnCurrentDigitalZoomChanged(slot func(digitalZoom float64)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QCameraZoomControl_connect_currentDigitalZoomChanged(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_QCameraZoomControl_currentDigitalZoomChanged
|
|
|
|
func miqt_exec_callback_QCameraZoomControl_currentDigitalZoomChanged(cb C.intptr_t, digitalZoom C.double) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(digitalZoom float64))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (float64)(digitalZoom)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QCameraZoomControl_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.QCameraZoomControl_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 QCameraZoomControl_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.QCameraZoomControl_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 QCameraZoomControl_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.QCameraZoomControl_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 QCameraZoomControl_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.QCameraZoomControl_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 *QCameraZoomControl) Delete() {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QCameraZoomControl_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 *QCameraZoomControl) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QCameraZoomControl) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|