miqt/qt/multimedia/gen_qcamerafocus.go

421 lines
13 KiB
Go
Raw Normal View History

2024-11-04 23:15:32 +13:00
package multimedia
/*
#include "gen_qcamerafocus.h"
#include <stdlib.h>
*/
import "C"
import (
"github.com/mappu/miqt/qt"
"runtime"
"runtime/cgo"
"unsafe"
)
type QCameraFocusZone__FocusZoneStatus int
const (
QCameraFocusZone__Invalid QCameraFocusZone__FocusZoneStatus = 0
QCameraFocusZone__Unused QCameraFocusZone__FocusZoneStatus = 1
QCameraFocusZone__Selected QCameraFocusZone__FocusZoneStatus = 2
QCameraFocusZone__Focused QCameraFocusZone__FocusZoneStatus = 3
)
type QCameraFocus__FocusMode int
const (
QCameraFocus__ManualFocus QCameraFocus__FocusMode = 1
QCameraFocus__HyperfocalFocus QCameraFocus__FocusMode = 2
QCameraFocus__InfinityFocus QCameraFocus__FocusMode = 4
QCameraFocus__AutoFocus QCameraFocus__FocusMode = 8
QCameraFocus__ContinuousFocus QCameraFocus__FocusMode = 16
QCameraFocus__MacroFocus QCameraFocus__FocusMode = 32
)
type QCameraFocus__FocusPointMode int
const (
QCameraFocus__FocusPointAuto QCameraFocus__FocusPointMode = 0
QCameraFocus__FocusPointCenter QCameraFocus__FocusPointMode = 1
QCameraFocus__FocusPointFaceDetection QCameraFocus__FocusPointMode = 2
QCameraFocus__FocusPointCustom QCameraFocus__FocusPointMode = 3
)
type QCameraFocusZone struct {
h *C.QCameraFocusZone
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocusZone) cPointer() *C.QCameraFocusZone {
if this == nil {
return nil
}
return this.h
}
func (this *QCameraFocusZone) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 19:29:06 +13:00
// newQCameraFocusZone constructs the type using only CGO pointers.
2024-11-04 23:15:32 +13:00
func newQCameraFocusZone(h *C.QCameraFocusZone) *QCameraFocusZone {
if h == nil {
return nil
}
2024-12-07 17:15:57 +13:00
2024-11-04 23:15:32 +13:00
return &QCameraFocusZone{h: h}
}
2024-11-19 19:29:06 +13:00
// UnsafeNewQCameraFocusZone constructs the type using only unsafe pointers.
2024-11-04 23:15:32 +13:00
func UnsafeNewQCameraFocusZone(h unsafe.Pointer) *QCameraFocusZone {
2024-12-07 17:15:57 +13:00
return newQCameraFocusZone((*C.QCameraFocusZone)(h))
2024-11-04 23:15:32 +13:00
}
// NewQCameraFocusZone constructs a new QCameraFocusZone object.
func NewQCameraFocusZone() *QCameraFocusZone {
2024-11-19 19:29:06 +13:00
return newQCameraFocusZone(C.QCameraFocusZone_new())
2024-11-04 23:15:32 +13:00
}
// NewQCameraFocusZone2 constructs a new QCameraFocusZone object.
func NewQCameraFocusZone2(area *qt.QRectF) *QCameraFocusZone {
2024-11-19 19:29:06 +13:00
return newQCameraFocusZone(C.QCameraFocusZone_new2((*C.QRectF)(area.UnsafePointer())))
2024-11-04 23:15:32 +13:00
}
// NewQCameraFocusZone3 constructs a new QCameraFocusZone object.
func NewQCameraFocusZone3(other *QCameraFocusZone) *QCameraFocusZone {
2024-11-19 19:29:06 +13:00
return newQCameraFocusZone(C.QCameraFocusZone_new3(other.cPointer()))
2024-11-04 23:15:32 +13:00
}
// NewQCameraFocusZone4 constructs a new QCameraFocusZone object.
func NewQCameraFocusZone4(area *qt.QRectF, status QCameraFocusZone__FocusZoneStatus) *QCameraFocusZone {
2024-11-19 19:29:06 +13:00
return newQCameraFocusZone(C.QCameraFocusZone_new4((*C.QRectF)(area.UnsafePointer()), (C.int)(status)))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocusZone) OperatorAssign(other *QCameraFocusZone) {
2025-02-01 13:45:16 +13:00
C.QCameraFocusZone_operatorAssign(this.h, other.cPointer())
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocusZone) OperatorEqual(other *QCameraFocusZone) bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QCameraFocusZone_operatorEqual(this.h, other.cPointer()))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocusZone) OperatorNotEqual(other *QCameraFocusZone) bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QCameraFocusZone_operatorNotEqual(this.h, other.cPointer()))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocusZone) IsValid() bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QCameraFocusZone_isValid(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocusZone) Area() *qt.QRectF {
2025-02-01 13:45:16 +13:00
_goptr := qt.UnsafeNewQRectF(unsafe.Pointer(C.QCameraFocusZone_area(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 *QCameraFocusZone) Status() QCameraFocusZone__FocusZoneStatus {
2025-02-01 13:45:16 +13:00
return (QCameraFocusZone__FocusZoneStatus)(C.QCameraFocusZone_status(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocusZone) SetStatus(status QCameraFocusZone__FocusZoneStatus) {
2025-02-01 13:45:16 +13:00
C.QCameraFocusZone_setStatus(this.h, (C.int)(status))
2024-11-04 23:15:32 +13:00
}
// Delete this object from C++ memory.
func (this *QCameraFocusZone) Delete() {
2025-02-01 13:45:16 +13:00
C.QCameraFocusZone_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 *QCameraFocusZone) GoGC() {
runtime.SetFinalizer(this, func(this *QCameraFocusZone) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QCameraFocus struct {
h *C.QCameraFocus
2024-11-04 23:15:32 +13:00
*qt.QObject
}
func (this *QCameraFocus) cPointer() *C.QCameraFocus {
if this == nil {
return nil
}
return this.h
}
func (this *QCameraFocus) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 19:29:06 +13:00
// newQCameraFocus constructs the type using only CGO pointers.
2024-12-07 17:15:57 +13:00
func newQCameraFocus(h *C.QCameraFocus) *QCameraFocus {
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.QCameraFocus_virtbase(h, &outptr_QObject)
2024-11-19 19:29:06 +13:00
return &QCameraFocus{h: h,
2024-12-07 17:15:57 +13:00
QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))}
2024-11-04 23:15:32 +13:00
}
2024-11-19 19:29:06 +13:00
// UnsafeNewQCameraFocus constructs the type using only unsafe pointers.
2024-12-07 17:15:57 +13:00
func UnsafeNewQCameraFocus(h unsafe.Pointer) *QCameraFocus {
return newQCameraFocus((*C.QCameraFocus)(h))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) MetaObject() *qt.QMetaObject {
2025-02-01 13:45:16 +13:00
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QCameraFocus_metaObject(this.h)))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) 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.QCameraFocus_metacast(this.h, param1_Cstring))
2024-11-04 23:15:32 +13:00
}
func QCameraFocus_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.QCameraFocus_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 QCameraFocus_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.QCameraFocus_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 *QCameraFocus) IsAvailable() bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QCameraFocus_isAvailable(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) FocusMode() QCameraFocus__FocusMode {
2025-02-01 13:45:16 +13:00
return (QCameraFocus__FocusMode)(C.QCameraFocus_focusMode(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) SetFocusMode(mode QCameraFocus__FocusMode) {
2025-02-01 13:45:16 +13:00
C.QCameraFocus_setFocusMode(this.h, (C.int)(mode))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) IsFocusModeSupported(mode QCameraFocus__FocusMode) bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QCameraFocus_isFocusModeSupported(this.h, (C.int)(mode)))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) FocusPointMode() QCameraFocus__FocusPointMode {
2025-02-01 13:45:16 +13:00
return (QCameraFocus__FocusPointMode)(C.QCameraFocus_focusPointMode(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) SetFocusPointMode(mode QCameraFocus__FocusPointMode) {
2025-02-01 13:45:16 +13:00
C.QCameraFocus_setFocusPointMode(this.h, (C.int)(mode))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) IsFocusPointModeSupported(param1 QCameraFocus__FocusPointMode) bool {
2025-02-01 13:45:16 +13:00
return (bool)(C.QCameraFocus_isFocusPointModeSupported(this.h, (C.int)(param1)))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) CustomFocusPoint() *qt.QPointF {
2025-02-01 13:45:16 +13:00
_goptr := qt.UnsafeNewQPointF(unsafe.Pointer(C.QCameraFocus_customFocusPoint(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 *QCameraFocus) SetCustomFocusPoint(point *qt.QPointF) {
2025-02-01 13:45:16 +13:00
C.QCameraFocus_setCustomFocusPoint(this.h, (*C.QPointF)(point.UnsafePointer()))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) FocusZones() []QCameraFocusZone {
2025-02-01 13:45:16 +13:00
var _ma C.struct_miqt_array = C.QCameraFocus_focusZones(this.h)
2024-11-04 23:15:32 +13:00
_ret := make([]QCameraFocusZone, int(_ma.len))
_outCast := (*[0xffff]*C.QCameraFocusZone)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
_lv_goptr := newQCameraFocusZone(_outCast[i])
2024-11-04 23:15:32 +13:00
_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
_ret[i] = *_lv_goptr
}
return _ret
}
func (this *QCameraFocus) MaximumOpticalZoom() float64 {
2025-02-01 13:45:16 +13:00
return (float64)(C.QCameraFocus_maximumOpticalZoom(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) MaximumDigitalZoom() float64 {
2025-02-01 13:45:16 +13:00
return (float64)(C.QCameraFocus_maximumDigitalZoom(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) OpticalZoom() float64 {
2025-02-01 13:45:16 +13:00
return (float64)(C.QCameraFocus_opticalZoom(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) DigitalZoom() float64 {
2025-02-01 13:45:16 +13:00
return (float64)(C.QCameraFocus_digitalZoom(this.h))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) ZoomTo(opticalZoom float64, digitalZoom float64) {
2025-02-01 13:45:16 +13:00
C.QCameraFocus_zoomTo(this.h, (C.double)(opticalZoom), (C.double)(digitalZoom))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) OpticalZoomChanged(param1 float64) {
2025-02-01 13:45:16 +13:00
C.QCameraFocus_opticalZoomChanged(this.h, (C.double)(param1))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) OnOpticalZoomChanged(slot func(param1 float64)) {
2025-02-01 13:45:16 +13:00
C.QCameraFocus_connect_opticalZoomChanged(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_QCameraFocus_opticalZoomChanged
func miqt_exec_callback_QCameraFocus_opticalZoomChanged(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 *QCameraFocus) DigitalZoomChanged(param1 float64) {
2025-02-01 13:45:16 +13:00
C.QCameraFocus_digitalZoomChanged(this.h, (C.double)(param1))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) OnDigitalZoomChanged(slot func(param1 float64)) {
2025-02-01 13:45:16 +13:00
C.QCameraFocus_connect_digitalZoomChanged(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_QCameraFocus_digitalZoomChanged
func miqt_exec_callback_QCameraFocus_digitalZoomChanged(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 *QCameraFocus) FocusZonesChanged() {
2025-02-01 13:45:16 +13:00
C.QCameraFocus_focusZonesChanged(this.h)
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) OnFocusZonesChanged(slot func()) {
2025-02-01 13:45:16 +13:00
C.QCameraFocus_connect_focusZonesChanged(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_QCameraFocus_focusZonesChanged
func miqt_exec_callback_QCameraFocus_focusZonesChanged(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 *QCameraFocus) MaximumOpticalZoomChanged(param1 float64) {
2025-02-01 13:45:16 +13:00
C.QCameraFocus_maximumOpticalZoomChanged(this.h, (C.double)(param1))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) OnMaximumOpticalZoomChanged(slot func(param1 float64)) {
2025-02-01 13:45:16 +13:00
C.QCameraFocus_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_QCameraFocus_maximumOpticalZoomChanged
func miqt_exec_callback_QCameraFocus_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 *QCameraFocus) MaximumDigitalZoomChanged(param1 float64) {
2025-02-01 13:45:16 +13:00
C.QCameraFocus_maximumDigitalZoomChanged(this.h, (C.double)(param1))
2024-11-04 23:15:32 +13:00
}
func (this *QCameraFocus) OnMaximumDigitalZoomChanged(slot func(param1 float64)) {
2025-02-01 13:45:16 +13:00
C.QCameraFocus_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_QCameraFocus_maximumDigitalZoomChanged
func miqt_exec_callback_QCameraFocus_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 QCameraFocus_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.QCameraFocus_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 QCameraFocus_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.QCameraFocus_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 QCameraFocus_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.QCameraFocus_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 QCameraFocus_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.QCameraFocus_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
}