2024-11-04 23:15:32 +13:00
|
|
|
package multimedia
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qvideowindowcontrol.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/mappu/miqt/qt"
|
|
|
|
"runtime"
|
|
|
|
"runtime/cgo"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QVideoWindowControl struct {
|
2025-01-18 17:57:48 +13:00
|
|
|
h *C.QVideoWindowControl
|
2024-11-04 23:15:32 +13:00
|
|
|
*QMediaControl
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) cPointer() *C.QVideoWindowControl {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 19:29:06 +13:00
|
|
|
// newQVideoWindowControl constructs the type using only CGO pointers.
|
2024-12-07 17:15:57 +13:00
|
|
|
func newQVideoWindowControl(h *C.QVideoWindowControl) *QVideoWindowControl {
|
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.QVideoWindowControl_virtbase(h, &outptr_QMediaControl)
|
|
|
|
|
2024-11-19 19:29:06 +13:00
|
|
|
return &QVideoWindowControl{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
|
|
|
// UnsafeNewQVideoWindowControl constructs the type using only unsafe pointers.
|
2024-12-07 17:15:57 +13:00
|
|
|
func UnsafeNewQVideoWindowControl(h unsafe.Pointer) *QVideoWindowControl {
|
|
|
|
return newQVideoWindowControl((*C.QVideoWindowControl)(h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) MetaObject() *qt.QMetaObject {
|
2025-02-01 13:45:16 +13:00
|
|
|
return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QVideoWindowControl_metaObject(this.h)))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) 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.QVideoWindowControl_metacast(this.h, param1_Cstring))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func QVideoWindowControl_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.QVideoWindowControl_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 QVideoWindowControl_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.QVideoWindowControl_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 *QVideoWindowControl) WinId() uintptr {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (uintptr)(C.QVideoWindowControl_winId(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) SetWinId(id uintptr) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_setWinId(this.h, (C.uintptr_t)(id))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) DisplayRect() *qt.QRect {
|
2025-02-01 13:45:16 +13:00
|
|
|
_goptr := qt.UnsafeNewQRect(unsafe.Pointer(C.QVideoWindowControl_displayRect(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 *QVideoWindowControl) SetDisplayRect(rect *qt.QRect) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_setDisplayRect(this.h, (*C.QRect)(rect.UnsafePointer()))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) IsFullScreen() bool {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (bool)(C.QVideoWindowControl_isFullScreen(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) SetFullScreen(fullScreen bool) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_setFullScreen(this.h, (C.bool)(fullScreen))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) Repaint() {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_repaint(this.h)
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) NativeSize() *qt.QSize {
|
2025-02-01 13:45:16 +13:00
|
|
|
_goptr := qt.UnsafeNewQSize(unsafe.Pointer(C.QVideoWindowControl_nativeSize(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 *QVideoWindowControl) AspectRatioMode() qt.AspectRatioMode {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (qt.AspectRatioMode)(C.QVideoWindowControl_aspectRatioMode(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) SetAspectRatioMode(mode qt.AspectRatioMode) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_setAspectRatioMode(this.h, (C.int)(mode))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) Brightness() int {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (int)(C.QVideoWindowControl_brightness(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) SetBrightness(brightness int) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_setBrightness(this.h, (C.int)(brightness))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) Contrast() int {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (int)(C.QVideoWindowControl_contrast(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) SetContrast(contrast int) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_setContrast(this.h, (C.int)(contrast))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) Hue() int {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (int)(C.QVideoWindowControl_hue(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) SetHue(hue int) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_setHue(this.h, (C.int)(hue))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) Saturation() int {
|
2025-02-01 13:45:16 +13:00
|
|
|
return (int)(C.QVideoWindowControl_saturation(this.h))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) SetSaturation(saturation int) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_setSaturation(this.h, (C.int)(saturation))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) FullScreenChanged(fullScreen bool) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_fullScreenChanged(this.h, (C.bool)(fullScreen))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QVideoWindowControl) OnFullScreenChanged(slot func(fullScreen bool)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_connect_fullScreenChanged(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_QVideoWindowControl_fullScreenChanged
|
|
|
|
func miqt_exec_callback_QVideoWindowControl_fullScreenChanged(cb C.intptr_t, fullScreen C.bool) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(fullScreen bool))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (bool)(fullScreen)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) BrightnessChanged(brightness int) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_brightnessChanged(this.h, (C.int)(brightness))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QVideoWindowControl) OnBrightnessChanged(slot func(brightness int)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_connect_brightnessChanged(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_QVideoWindowControl_brightnessChanged
|
|
|
|
func miqt_exec_callback_QVideoWindowControl_brightnessChanged(cb C.intptr_t, brightness C.int) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(brightness int))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (int)(brightness)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) ContrastChanged(contrast int) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_contrastChanged(this.h, (C.int)(contrast))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QVideoWindowControl) OnContrastChanged(slot func(contrast int)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_connect_contrastChanged(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_QVideoWindowControl_contrastChanged
|
|
|
|
func miqt_exec_callback_QVideoWindowControl_contrastChanged(cb C.intptr_t, contrast C.int) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(contrast int))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (int)(contrast)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) HueChanged(hue int) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_hueChanged(this.h, (C.int)(hue))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QVideoWindowControl) OnHueChanged(slot func(hue int)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_connect_hueChanged(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_QVideoWindowControl_hueChanged
|
|
|
|
func miqt_exec_callback_QVideoWindowControl_hueChanged(cb C.intptr_t, hue C.int) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(hue int))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (int)(hue)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) SaturationChanged(saturation int) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_saturationChanged(this.h, (C.int)(saturation))
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QVideoWindowControl) OnSaturationChanged(slot func(saturation int)) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_connect_saturationChanged(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_QVideoWindowControl_saturationChanged
|
|
|
|
func miqt_exec_callback_QVideoWindowControl_saturationChanged(cb C.intptr_t, saturation C.int) {
|
2024-11-04 23:15:32 +13:00
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(saturation int))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (int)(saturation)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QVideoWindowControl) NativeSizeChanged() {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_nativeSizeChanged(this.h)
|
2024-11-04 23:15:32 +13:00
|
|
|
}
|
|
|
|
func (this *QVideoWindowControl) OnNativeSizeChanged(slot func()) {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_connect_nativeSizeChanged(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_QVideoWindowControl_nativeSizeChanged
|
|
|
|
func miqt_exec_callback_QVideoWindowControl_nativeSizeChanged(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 QVideoWindowControl_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.QVideoWindowControl_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 QVideoWindowControl_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.QVideoWindowControl_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 QVideoWindowControl_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.QVideoWindowControl_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 QVideoWindowControl_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.QVideoWindowControl_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 *QVideoWindowControl) Delete() {
|
2025-02-01 13:45:16 +13:00
|
|
|
C.QVideoWindowControl_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 *QVideoWindowControl) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QVideoWindowControl) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|