miqt/qt6/gen_qgesture.go

1287 lines
38 KiB
Go
Raw Permalink Normal View History

2024-10-20 05:21:03 +00:00
package qt6
/*
#include "gen_qgesture.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
2024-11-19 06:29:06 +00:00
"runtime/cgo"
2024-10-20 05:21:03 +00:00
"unsafe"
)
type QGesture__GestureCancelPolicy int
const (
QGesture__CancelNone QGesture__GestureCancelPolicy = 0
QGesture__CancelAllInContext QGesture__GestureCancelPolicy = 1
)
type QPinchGesture__ChangeFlag int
const (
QPinchGesture__ScaleFactorChanged QPinchGesture__ChangeFlag = 1
QPinchGesture__RotationAngleChanged QPinchGesture__ChangeFlag = 2
QPinchGesture__CenterPointChanged QPinchGesture__ChangeFlag = 4
)
type QSwipeGesture__SwipeDirection int
const (
QSwipeGesture__NoDirection QSwipeGesture__SwipeDirection = 0
QSwipeGesture__Left QSwipeGesture__SwipeDirection = 1
QSwipeGesture__Right QSwipeGesture__SwipeDirection = 2
QSwipeGesture__Up QSwipeGesture__SwipeDirection = 3
QSwipeGesture__Down QSwipeGesture__SwipeDirection = 4
)
type QGesture struct {
2024-11-19 06:29:06 +00:00
h *C.QGesture
isSubclass bool
2024-10-20 05:21:03 +00:00
*QObject
}
func (this *QGesture) cPointer() *C.QGesture {
if this == nil {
return nil
}
return this.h
}
func (this *QGesture) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQGesture constructs the type using only CGO pointers.
2024-12-07 04:15:57 +00:00
func newQGesture(h *C.QGesture) *QGesture {
2024-10-20 05:21:03 +00:00
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
var outptr_QObject *C.QObject = nil
C.QGesture_virtbase(h, &outptr_QObject)
2024-11-19 06:29:06 +00:00
return &QGesture{h: h,
2024-12-07 04:15:57 +00:00
QObject: newQObject(outptr_QObject)}
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQGesture constructs the type using only unsafe pointers.
2024-12-07 04:15:57 +00:00
func UnsafeNewQGesture(h unsafe.Pointer) *QGesture {
return newQGesture((*C.QGesture)(h))
2024-10-20 05:21:03 +00:00
}
// NewQGesture constructs a new QGesture object.
func NewQGesture() *QGesture {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQGesture(C.QGesture_new())
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQGesture2 constructs a new QGesture object.
func NewQGesture2(parent *QObject) *QGesture {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQGesture(C.QGesture_new2(parent.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
func (this *QGesture) MetaObject() *QMetaObject {
return newQMetaObject(C.QGesture_MetaObject(this.h))
2024-10-20 05:21:03 +00:00
}
func (this *QGesture) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
return (unsafe.Pointer)(C.QGesture_Metacast(this.h, param1_Cstring))
}
func QGesture_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QGesture_Tr(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QGesture) GestureType() GestureType {
return (GestureType)(C.QGesture_GestureType(this.h))
}
func (this *QGesture) State() GestureState {
return (GestureState)(C.QGesture_State(this.h))
}
func (this *QGesture) HotSpot() *QPointF {
_goptr := newQPointF(C.QGesture_HotSpot(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QGesture) SetHotSpot(value *QPointF) {
C.QGesture_SetHotSpot(this.h, value.cPointer())
}
func (this *QGesture) HasHotSpot() bool {
return (bool)(C.QGesture_HasHotSpot(this.h))
}
func (this *QGesture) UnsetHotSpot() {
C.QGesture_UnsetHotSpot(this.h)
}
func (this *QGesture) SetGestureCancelPolicy(policy QGesture__GestureCancelPolicy) {
C.QGesture_SetGestureCancelPolicy(this.h, (C.int)(policy))
}
func (this *QGesture) GestureCancelPolicy() QGesture__GestureCancelPolicy {
return (QGesture__GestureCancelPolicy)(C.QGesture_GestureCancelPolicy(this.h))
}
func QGesture_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.QGesture_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QGesture_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.QGesture_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
}
2024-11-19 06:29:06 +00:00
func (this *QGesture) callVirtualBase_Event(event *QEvent) bool {
return (bool)(C.QGesture_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer()))
}
func (this *QGesture) OnEvent(slot func(super func(event *QEvent) bool, event *QEvent) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QGesture_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QGesture_Event
func miqt_exec_callback_QGesture_Event(self *C.QGesture, cb C.intptr_t, event *C.QEvent) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent) bool, event *QEvent) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := newQEvent(event)
2024-11-19 06:29:06 +00:00
virtualReturn := gofunc((&QGesture{h: self}).callVirtualBase_Event, slotval1)
return (C.bool)(virtualReturn)
}
func (this *QGesture) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool {
return (bool)(C.QGesture_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer()))
}
func (this *QGesture) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QGesture_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QGesture_EventFilter
func miqt_exec_callback_QGesture_EventFilter(self *C.QGesture, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := newQObject(watched)
slotval2 := newQEvent(event)
2024-11-19 06:29:06 +00:00
virtualReturn := gofunc((&QGesture{h: self}).callVirtualBase_EventFilter, slotval1, slotval2)
return (C.bool)(virtualReturn)
}
func (this *QGesture) callVirtualBase_TimerEvent(event *QTimerEvent) {
C.QGesture_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer())
}
func (this *QGesture) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QGesture_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QGesture_TimerEvent
func miqt_exec_callback_QGesture_TimerEvent(self *C.QGesture, cb C.intptr_t, event *C.QTimerEvent) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QTimerEvent), event *QTimerEvent))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
2024-12-07 04:15:57 +00:00
slotval1 := newQTimerEvent(event)
2024-11-19 06:29:06 +00:00
gofunc((&QGesture{h: self}).callVirtualBase_TimerEvent, slotval1)
}
func (this *QGesture) callVirtualBase_ChildEvent(event *QChildEvent) {
C.QGesture_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer())
}
func (this *QGesture) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QGesture_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QGesture_ChildEvent
func miqt_exec_callback_QGesture_ChildEvent(self *C.QGesture, cb C.intptr_t, event *C.QChildEvent) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QChildEvent), event *QChildEvent))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
2024-12-07 04:15:57 +00:00
slotval1 := newQChildEvent(event)
2024-11-19 06:29:06 +00:00
gofunc((&QGesture{h: self}).callVirtualBase_ChildEvent, slotval1)
}
func (this *QGesture) callVirtualBase_CustomEvent(event *QEvent) {
C.QGesture_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer())
}
func (this *QGesture) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QGesture_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QGesture_CustomEvent
func miqt_exec_callback_QGesture_CustomEvent(self *C.QGesture, cb C.intptr_t, event *C.QEvent) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *QEvent), event *QEvent))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := newQEvent(event)
2024-11-19 06:29:06 +00:00
gofunc((&QGesture{h: self}).callVirtualBase_CustomEvent, slotval1)
}
func (this *QGesture) callVirtualBase_ConnectNotify(signal *QMetaMethod) {
C.QGesture_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer())
}
func (this *QGesture) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QGesture_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QGesture_ConnectNotify
func miqt_exec_callback_QGesture_ConnectNotify(self *C.QGesture, cb C.intptr_t, signal *C.QMetaMethod) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := newQMetaMethod(signal)
2024-11-19 06:29:06 +00:00
gofunc((&QGesture{h: self}).callVirtualBase_ConnectNotify, slotval1)
}
func (this *QGesture) callVirtualBase_DisconnectNotify(signal *QMetaMethod) {
C.QGesture_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer())
}
func (this *QGesture) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QGesture_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QGesture_DisconnectNotify
func miqt_exec_callback_QGesture_DisconnectNotify(self *C.QGesture, cb C.intptr_t, signal *C.QMetaMethod) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *QMetaMethod), signal *QMetaMethod))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := newQMetaMethod(signal)
2024-11-19 06:29:06 +00:00
gofunc((&QGesture{h: self}).callVirtualBase_DisconnectNotify, slotval1)
}
2024-10-20 05:21:03 +00:00
// Delete this object from C++ memory.
func (this *QGesture) Delete() {
2024-11-19 06:29:06 +00:00
C.QGesture_Delete(this.h, C.bool(this.isSubclass))
2024-10-20 05:21:03 +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 *QGesture) GoGC() {
runtime.SetFinalizer(this, func(this *QGesture) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QPanGesture struct {
2024-11-19 06:29:06 +00:00
h *C.QPanGesture
isSubclass bool
2024-10-20 05:21:03 +00:00
*QGesture
}
func (this *QPanGesture) cPointer() *C.QPanGesture {
if this == nil {
return nil
}
return this.h
}
func (this *QPanGesture) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQPanGesture constructs the type using only CGO pointers.
2024-12-07 04:15:57 +00:00
func newQPanGesture(h *C.QPanGesture) *QPanGesture {
2024-10-20 05:21:03 +00:00
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
var outptr_QGesture *C.QGesture = nil
C.QPanGesture_virtbase(h, &outptr_QGesture)
2024-11-19 06:29:06 +00:00
return &QPanGesture{h: h,
2024-12-07 04:15:57 +00:00
QGesture: newQGesture(outptr_QGesture)}
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQPanGesture constructs the type using only unsafe pointers.
2024-12-07 04:15:57 +00:00
func UnsafeNewQPanGesture(h unsafe.Pointer) *QPanGesture {
return newQPanGesture((*C.QPanGesture)(h))
2024-10-20 05:21:03 +00:00
}
// NewQPanGesture constructs a new QPanGesture object.
func NewQPanGesture() *QPanGesture {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQPanGesture(C.QPanGesture_new())
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQPanGesture2 constructs a new QPanGesture object.
func NewQPanGesture2(parent *QObject) *QPanGesture {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQPanGesture(C.QPanGesture_new2(parent.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
func (this *QPanGesture) MetaObject() *QMetaObject {
return newQMetaObject(C.QPanGesture_MetaObject(this.h))
2024-10-20 05:21:03 +00:00
}
func (this *QPanGesture) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
return (unsafe.Pointer)(C.QPanGesture_Metacast(this.h, param1_Cstring))
}
func QPanGesture_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QPanGesture_Tr(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QPanGesture) LastOffset() *QPointF {
_goptr := newQPointF(C.QPanGesture_LastOffset(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QPanGesture) Offset() *QPointF {
_goptr := newQPointF(C.QPanGesture_Offset(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QPanGesture) Delta() *QPointF {
_goptr := newQPointF(C.QPanGesture_Delta(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QPanGesture) Acceleration() float64 {
return (float64)(C.QPanGesture_Acceleration(this.h))
}
func (this *QPanGesture) SetLastOffset(value *QPointF) {
C.QPanGesture_SetLastOffset(this.h, value.cPointer())
}
func (this *QPanGesture) SetOffset(value *QPointF) {
C.QPanGesture_SetOffset(this.h, value.cPointer())
}
func (this *QPanGesture) SetAcceleration(value float64) {
C.QPanGesture_SetAcceleration(this.h, (C.double)(value))
}
func QPanGesture_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.QPanGesture_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QPanGesture_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.QPanGesture_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
}
// Delete this object from C++ memory.
func (this *QPanGesture) Delete() {
2024-11-19 06:29:06 +00:00
C.QPanGesture_Delete(this.h, C.bool(this.isSubclass))
2024-10-20 05:21:03 +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 *QPanGesture) GoGC() {
runtime.SetFinalizer(this, func(this *QPanGesture) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QPinchGesture struct {
2024-11-19 06:29:06 +00:00
h *C.QPinchGesture
isSubclass bool
2024-10-20 05:21:03 +00:00
*QGesture
}
func (this *QPinchGesture) cPointer() *C.QPinchGesture {
if this == nil {
return nil
}
return this.h
}
func (this *QPinchGesture) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQPinchGesture constructs the type using only CGO pointers.
2024-12-07 04:15:57 +00:00
func newQPinchGesture(h *C.QPinchGesture) *QPinchGesture {
2024-10-20 05:21:03 +00:00
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
var outptr_QGesture *C.QGesture = nil
C.QPinchGesture_virtbase(h, &outptr_QGesture)
2024-11-19 06:29:06 +00:00
return &QPinchGesture{h: h,
2024-12-07 04:15:57 +00:00
QGesture: newQGesture(outptr_QGesture)}
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQPinchGesture constructs the type using only unsafe pointers.
2024-12-07 04:15:57 +00:00
func UnsafeNewQPinchGesture(h unsafe.Pointer) *QPinchGesture {
return newQPinchGesture((*C.QPinchGesture)(h))
2024-10-20 05:21:03 +00:00
}
// NewQPinchGesture constructs a new QPinchGesture object.
func NewQPinchGesture() *QPinchGesture {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQPinchGesture(C.QPinchGesture_new())
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQPinchGesture2 constructs a new QPinchGesture object.
func NewQPinchGesture2(parent *QObject) *QPinchGesture {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQPinchGesture(C.QPinchGesture_new2(parent.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
func (this *QPinchGesture) MetaObject() *QMetaObject {
return newQMetaObject(C.QPinchGesture_MetaObject(this.h))
2024-10-20 05:21:03 +00:00
}
func (this *QPinchGesture) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
return (unsafe.Pointer)(C.QPinchGesture_Metacast(this.h, param1_Cstring))
}
func QPinchGesture_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QPinchGesture_Tr(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QPinchGesture) TotalChangeFlags() QPinchGesture__ChangeFlag {
return (QPinchGesture__ChangeFlag)(C.QPinchGesture_TotalChangeFlags(this.h))
}
func (this *QPinchGesture) SetTotalChangeFlags(value QPinchGesture__ChangeFlag) {
C.QPinchGesture_SetTotalChangeFlags(this.h, (C.int)(value))
}
func (this *QPinchGesture) ChangeFlags() QPinchGesture__ChangeFlag {
return (QPinchGesture__ChangeFlag)(C.QPinchGesture_ChangeFlags(this.h))
}
func (this *QPinchGesture) SetChangeFlags(value QPinchGesture__ChangeFlag) {
C.QPinchGesture_SetChangeFlags(this.h, (C.int)(value))
}
func (this *QPinchGesture) StartCenterPoint() *QPointF {
_goptr := newQPointF(C.QPinchGesture_StartCenterPoint(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QPinchGesture) LastCenterPoint() *QPointF {
_goptr := newQPointF(C.QPinchGesture_LastCenterPoint(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QPinchGesture) CenterPoint() *QPointF {
_goptr := newQPointF(C.QPinchGesture_CenterPoint(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QPinchGesture) SetStartCenterPoint(value *QPointF) {
C.QPinchGesture_SetStartCenterPoint(this.h, value.cPointer())
}
func (this *QPinchGesture) SetLastCenterPoint(value *QPointF) {
C.QPinchGesture_SetLastCenterPoint(this.h, value.cPointer())
}
func (this *QPinchGesture) SetCenterPoint(value *QPointF) {
C.QPinchGesture_SetCenterPoint(this.h, value.cPointer())
}
func (this *QPinchGesture) TotalScaleFactor() float64 {
return (float64)(C.QPinchGesture_TotalScaleFactor(this.h))
}
func (this *QPinchGesture) LastScaleFactor() float64 {
return (float64)(C.QPinchGesture_LastScaleFactor(this.h))
}
func (this *QPinchGesture) ScaleFactor() float64 {
return (float64)(C.QPinchGesture_ScaleFactor(this.h))
}
func (this *QPinchGesture) SetTotalScaleFactor(value float64) {
C.QPinchGesture_SetTotalScaleFactor(this.h, (C.double)(value))
}
func (this *QPinchGesture) SetLastScaleFactor(value float64) {
C.QPinchGesture_SetLastScaleFactor(this.h, (C.double)(value))
}
func (this *QPinchGesture) SetScaleFactor(value float64) {
C.QPinchGesture_SetScaleFactor(this.h, (C.double)(value))
}
func (this *QPinchGesture) TotalRotationAngle() float64 {
return (float64)(C.QPinchGesture_TotalRotationAngle(this.h))
}
func (this *QPinchGesture) LastRotationAngle() float64 {
return (float64)(C.QPinchGesture_LastRotationAngle(this.h))
}
func (this *QPinchGesture) RotationAngle() float64 {
return (float64)(C.QPinchGesture_RotationAngle(this.h))
}
func (this *QPinchGesture) SetTotalRotationAngle(value float64) {
C.QPinchGesture_SetTotalRotationAngle(this.h, (C.double)(value))
}
func (this *QPinchGesture) SetLastRotationAngle(value float64) {
C.QPinchGesture_SetLastRotationAngle(this.h, (C.double)(value))
}
func (this *QPinchGesture) SetRotationAngle(value float64) {
C.QPinchGesture_SetRotationAngle(this.h, (C.double)(value))
}
func QPinchGesture_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.QPinchGesture_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QPinchGesture_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.QPinchGesture_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
}
// Delete this object from C++ memory.
func (this *QPinchGesture) Delete() {
2024-11-19 06:29:06 +00:00
C.QPinchGesture_Delete(this.h, C.bool(this.isSubclass))
2024-10-20 05:21:03 +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 *QPinchGesture) GoGC() {
runtime.SetFinalizer(this, func(this *QPinchGesture) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QSwipeGesture struct {
2024-11-19 06:29:06 +00:00
h *C.QSwipeGesture
isSubclass bool
2024-10-20 05:21:03 +00:00
*QGesture
}
func (this *QSwipeGesture) cPointer() *C.QSwipeGesture {
if this == nil {
return nil
}
return this.h
}
func (this *QSwipeGesture) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQSwipeGesture constructs the type using only CGO pointers.
2024-12-07 04:15:57 +00:00
func newQSwipeGesture(h *C.QSwipeGesture) *QSwipeGesture {
2024-10-20 05:21:03 +00:00
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
var outptr_QGesture *C.QGesture = nil
C.QSwipeGesture_virtbase(h, &outptr_QGesture)
2024-11-19 06:29:06 +00:00
return &QSwipeGesture{h: h,
2024-12-07 04:15:57 +00:00
QGesture: newQGesture(outptr_QGesture)}
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQSwipeGesture constructs the type using only unsafe pointers.
2024-12-07 04:15:57 +00:00
func UnsafeNewQSwipeGesture(h unsafe.Pointer) *QSwipeGesture {
return newQSwipeGesture((*C.QSwipeGesture)(h))
2024-10-20 05:21:03 +00:00
}
// NewQSwipeGesture constructs a new QSwipeGesture object.
func NewQSwipeGesture() *QSwipeGesture {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQSwipeGesture(C.QSwipeGesture_new())
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQSwipeGesture2 constructs a new QSwipeGesture object.
func NewQSwipeGesture2(parent *QObject) *QSwipeGesture {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQSwipeGesture(C.QSwipeGesture_new2(parent.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
func (this *QSwipeGesture) MetaObject() *QMetaObject {
return newQMetaObject(C.QSwipeGesture_MetaObject(this.h))
2024-10-20 05:21:03 +00:00
}
func (this *QSwipeGesture) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
return (unsafe.Pointer)(C.QSwipeGesture_Metacast(this.h, param1_Cstring))
}
func QSwipeGesture_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QSwipeGesture_Tr(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QSwipeGesture) HorizontalDirection() QSwipeGesture__SwipeDirection {
return (QSwipeGesture__SwipeDirection)(C.QSwipeGesture_HorizontalDirection(this.h))
}
func (this *QSwipeGesture) VerticalDirection() QSwipeGesture__SwipeDirection {
return (QSwipeGesture__SwipeDirection)(C.QSwipeGesture_VerticalDirection(this.h))
}
func (this *QSwipeGesture) SwipeAngle() float64 {
return (float64)(C.QSwipeGesture_SwipeAngle(this.h))
}
func (this *QSwipeGesture) SetSwipeAngle(value float64) {
C.QSwipeGesture_SetSwipeAngle(this.h, (C.double)(value))
}
func QSwipeGesture_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.QSwipeGesture_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QSwipeGesture_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.QSwipeGesture_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
}
// Delete this object from C++ memory.
func (this *QSwipeGesture) Delete() {
2024-11-19 06:29:06 +00:00
C.QSwipeGesture_Delete(this.h, C.bool(this.isSubclass))
2024-10-20 05:21:03 +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 *QSwipeGesture) GoGC() {
runtime.SetFinalizer(this, func(this *QSwipeGesture) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QTapGesture struct {
2024-11-19 06:29:06 +00:00
h *C.QTapGesture
isSubclass bool
2024-10-20 05:21:03 +00:00
*QGesture
}
func (this *QTapGesture) cPointer() *C.QTapGesture {
if this == nil {
return nil
}
return this.h
}
func (this *QTapGesture) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQTapGesture constructs the type using only CGO pointers.
2024-12-07 04:15:57 +00:00
func newQTapGesture(h *C.QTapGesture) *QTapGesture {
2024-10-20 05:21:03 +00:00
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
var outptr_QGesture *C.QGesture = nil
C.QTapGesture_virtbase(h, &outptr_QGesture)
2024-11-19 06:29:06 +00:00
return &QTapGesture{h: h,
2024-12-07 04:15:57 +00:00
QGesture: newQGesture(outptr_QGesture)}
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQTapGesture constructs the type using only unsafe pointers.
2024-12-07 04:15:57 +00:00
func UnsafeNewQTapGesture(h unsafe.Pointer) *QTapGesture {
return newQTapGesture((*C.QTapGesture)(h))
2024-10-20 05:21:03 +00:00
}
// NewQTapGesture constructs a new QTapGesture object.
func NewQTapGesture() *QTapGesture {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQTapGesture(C.QTapGesture_new())
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQTapGesture2 constructs a new QTapGesture object.
func NewQTapGesture2(parent *QObject) *QTapGesture {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQTapGesture(C.QTapGesture_new2(parent.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
func (this *QTapGesture) MetaObject() *QMetaObject {
return newQMetaObject(C.QTapGesture_MetaObject(this.h))
2024-10-20 05:21:03 +00:00
}
func (this *QTapGesture) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
return (unsafe.Pointer)(C.QTapGesture_Metacast(this.h, param1_Cstring))
}
func QTapGesture_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QTapGesture_Tr(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QTapGesture) Position() *QPointF {
_goptr := newQPointF(C.QTapGesture_Position(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QTapGesture) SetPosition(pos *QPointF) {
C.QTapGesture_SetPosition(this.h, pos.cPointer())
}
func QTapGesture_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.QTapGesture_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QTapGesture_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.QTapGesture_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
}
// Delete this object from C++ memory.
func (this *QTapGesture) Delete() {
2024-11-19 06:29:06 +00:00
C.QTapGesture_Delete(this.h, C.bool(this.isSubclass))
2024-10-20 05:21:03 +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 *QTapGesture) GoGC() {
runtime.SetFinalizer(this, func(this *QTapGesture) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QTapAndHoldGesture struct {
2024-11-19 06:29:06 +00:00
h *C.QTapAndHoldGesture
isSubclass bool
2024-10-20 05:21:03 +00:00
*QGesture
}
func (this *QTapAndHoldGesture) cPointer() *C.QTapAndHoldGesture {
if this == nil {
return nil
}
return this.h
}
func (this *QTapAndHoldGesture) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQTapAndHoldGesture constructs the type using only CGO pointers.
2024-12-07 04:15:57 +00:00
func newQTapAndHoldGesture(h *C.QTapAndHoldGesture) *QTapAndHoldGesture {
2024-10-20 05:21:03 +00:00
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
var outptr_QGesture *C.QGesture = nil
C.QTapAndHoldGesture_virtbase(h, &outptr_QGesture)
2024-11-19 06:29:06 +00:00
return &QTapAndHoldGesture{h: h,
2024-12-07 04:15:57 +00:00
QGesture: newQGesture(outptr_QGesture)}
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQTapAndHoldGesture constructs the type using only unsafe pointers.
2024-12-07 04:15:57 +00:00
func UnsafeNewQTapAndHoldGesture(h unsafe.Pointer) *QTapAndHoldGesture {
return newQTapAndHoldGesture((*C.QTapAndHoldGesture)(h))
2024-10-20 05:21:03 +00:00
}
// NewQTapAndHoldGesture constructs a new QTapAndHoldGesture object.
func NewQTapAndHoldGesture() *QTapAndHoldGesture {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQTapAndHoldGesture(C.QTapAndHoldGesture_new())
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQTapAndHoldGesture2 constructs a new QTapAndHoldGesture object.
func NewQTapAndHoldGesture2(parent *QObject) *QTapAndHoldGesture {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQTapAndHoldGesture(C.QTapAndHoldGesture_new2(parent.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
func (this *QTapAndHoldGesture) MetaObject() *QMetaObject {
return newQMetaObject(C.QTapAndHoldGesture_MetaObject(this.h))
2024-10-20 05:21:03 +00:00
}
func (this *QTapAndHoldGesture) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
return (unsafe.Pointer)(C.QTapAndHoldGesture_Metacast(this.h, param1_Cstring))
}
func QTapAndHoldGesture_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QTapAndHoldGesture_Tr(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QTapAndHoldGesture) Position() *QPointF {
_goptr := newQPointF(C.QTapAndHoldGesture_Position(this.h))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QTapAndHoldGesture) SetPosition(pos *QPointF) {
C.QTapAndHoldGesture_SetPosition(this.h, pos.cPointer())
}
func QTapAndHoldGesture_SetTimeout(msecs int) {
C.QTapAndHoldGesture_SetTimeout((C.int)(msecs))
}
func QTapAndHoldGesture_Timeout() int {
return (int)(C.QTapAndHoldGesture_Timeout())
}
func QTapAndHoldGesture_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.QTapAndHoldGesture_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QTapAndHoldGesture_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.QTapAndHoldGesture_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
}
// Delete this object from C++ memory.
func (this *QTapAndHoldGesture) Delete() {
2024-11-19 06:29:06 +00:00
C.QTapAndHoldGesture_Delete(this.h, C.bool(this.isSubclass))
2024-10-20 05:21:03 +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 *QTapAndHoldGesture) GoGC() {
runtime.SetFinalizer(this, func(this *QTapAndHoldGesture) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QGestureEvent struct {
2024-11-19 06:29:06 +00:00
h *C.QGestureEvent
isSubclass bool
2024-10-20 05:21:03 +00:00
*QEvent
}
func (this *QGestureEvent) cPointer() *C.QGestureEvent {
if this == nil {
return nil
}
return this.h
}
func (this *QGestureEvent) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQGestureEvent constructs the type using only CGO pointers.
2024-12-07 04:15:57 +00:00
func newQGestureEvent(h *C.QGestureEvent) *QGestureEvent {
2024-10-20 05:21:03 +00:00
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
var outptr_QEvent *C.QEvent = nil
C.QGestureEvent_virtbase(h, &outptr_QEvent)
2024-11-19 06:29:06 +00:00
return &QGestureEvent{h: h,
2024-12-07 04:15:57 +00:00
QEvent: newQEvent(outptr_QEvent)}
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQGestureEvent constructs the type using only unsafe pointers.
2024-12-07 04:15:57 +00:00
func UnsafeNewQGestureEvent(h unsafe.Pointer) *QGestureEvent {
return newQGestureEvent((*C.QGestureEvent)(h))
2024-10-20 05:21:03 +00:00
}
// NewQGestureEvent constructs a new QGestureEvent object.
func NewQGestureEvent(gestures []*QGesture) *QGestureEvent {
gestures_CArray := (*[0xffff]*C.QGesture)(C.malloc(C.size_t(8 * len(gestures))))
defer C.free(unsafe.Pointer(gestures_CArray))
for i := range gestures {
gestures_CArray[i] = gestures[i].cPointer()
}
gestures_ma := C.struct_miqt_array{len: C.size_t(len(gestures)), data: unsafe.Pointer(gestures_CArray)}
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQGestureEvent(C.QGestureEvent_new(gestures_ma))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQGestureEvent2 constructs a new QGestureEvent object.
func NewQGestureEvent2(param1 *QGestureEvent) *QGestureEvent {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQGestureEvent(C.QGestureEvent_new2(param1.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
func (this *QGestureEvent) Gestures() []*QGesture {
var _ma C.struct_miqt_array = C.QGestureEvent_Gestures(this.h)
2024-10-20 05:21:03 +00:00
_ret := make([]*QGesture, int(_ma.len))
_outCast := (*[0xffff]*C.QGesture)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
2024-12-07 04:15:57 +00:00
_ret[i] = newQGesture(_outCast[i])
2024-10-20 05:21:03 +00:00
}
return _ret
}
func (this *QGestureEvent) Gesture(typeVal GestureType) *QGesture {
2024-12-07 04:15:57 +00:00
return newQGesture(C.QGestureEvent_Gesture(this.h, (C.int)(typeVal)))
2024-10-20 05:21:03 +00:00
}
func (this *QGestureEvent) ActiveGestures() []*QGesture {
var _ma C.struct_miqt_array = C.QGestureEvent_ActiveGestures(this.h)
2024-10-20 05:21:03 +00:00
_ret := make([]*QGesture, int(_ma.len))
_outCast := (*[0xffff]*C.QGesture)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
2024-12-07 04:15:57 +00:00
_ret[i] = newQGesture(_outCast[i])
2024-10-20 05:21:03 +00:00
}
return _ret
}
func (this *QGestureEvent) CanceledGestures() []*QGesture {
var _ma C.struct_miqt_array = C.QGestureEvent_CanceledGestures(this.h)
2024-10-20 05:21:03 +00:00
_ret := make([]*QGesture, int(_ma.len))
_outCast := (*[0xffff]*C.QGesture)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
2024-12-07 04:15:57 +00:00
_ret[i] = newQGesture(_outCast[i])
2024-10-20 05:21:03 +00:00
}
return _ret
}
func (this *QGestureEvent) SetAccepted(param1 *QGesture, param2 bool) {
C.QGestureEvent_SetAccepted(this.h, param1.cPointer(), (C.bool)(param2))
}
func (this *QGestureEvent) Accept(param1 *QGesture) {
C.QGestureEvent_Accept(this.h, param1.cPointer())
}
func (this *QGestureEvent) Ignore(param1 *QGesture) {
C.QGestureEvent_Ignore(this.h, param1.cPointer())
}
func (this *QGestureEvent) IsAccepted(param1 *QGesture) bool {
return (bool)(C.QGestureEvent_IsAccepted(this.h, param1.cPointer()))
}
func (this *QGestureEvent) SetAccepted2(param1 GestureType, param2 bool) {
C.QGestureEvent_SetAccepted2(this.h, (C.int)(param1), (C.bool)(param2))
}
func (this *QGestureEvent) AcceptWithQtGestureType(param1 GestureType) {
C.QGestureEvent_AcceptWithQtGestureType(this.h, (C.int)(param1))
}
func (this *QGestureEvent) IgnoreWithQtGestureType(param1 GestureType) {
C.QGestureEvent_IgnoreWithQtGestureType(this.h, (C.int)(param1))
}
func (this *QGestureEvent) IsAcceptedWithQtGestureType(param1 GestureType) bool {
return (bool)(C.QGestureEvent_IsAcceptedWithQtGestureType(this.h, (C.int)(param1)))
}
func (this *QGestureEvent) SetWidget(widget *QWidget) {
C.QGestureEvent_SetWidget(this.h, widget.cPointer())
}
func (this *QGestureEvent) Widget() *QWidget {
2024-12-07 04:15:57 +00:00
return newQWidget(C.QGestureEvent_Widget(this.h))
2024-10-20 05:21:03 +00:00
}
func (this *QGestureEvent) MapToGraphicsScene(gesturePoint *QPointF) *QPointF {
_goptr := newQPointF(C.QGestureEvent_MapToGraphicsScene(this.h, gesturePoint.cPointer()))
2024-10-20 05:21:03 +00:00
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
2024-11-19 06:29:06 +00:00
func (this *QGestureEvent) callVirtualBase_SetAccepted(accepted bool) {
C.QGestureEvent_virtualbase_SetAccepted(unsafe.Pointer(this.h), (C.bool)(accepted))
}
func (this *QGestureEvent) OnSetAccepted(slot func(super func(accepted bool), accepted bool)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QGestureEvent_override_virtual_SetAccepted(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QGestureEvent_SetAccepted
func miqt_exec_callback_QGestureEvent_SetAccepted(self *C.QGestureEvent, cb C.intptr_t, accepted C.bool) {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(accepted bool), accepted bool))
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (bool)(accepted)
gofunc((&QGestureEvent{h: self}).callVirtualBase_SetAccepted, slotval1)
}
func (this *QGestureEvent) callVirtualBase_Clone() *QEvent {
return newQEvent(C.QGestureEvent_virtualbase_Clone(unsafe.Pointer(this.h)))
2024-11-19 06:29:06 +00:00
}
func (this *QGestureEvent) OnClone(slot func(super func() *QEvent) *QEvent) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
2024-11-19 06:29:06 +00:00
C.QGestureEvent_override_virtual_Clone(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QGestureEvent_Clone
func miqt_exec_callback_QGestureEvent_Clone(self *C.QGestureEvent, cb C.intptr_t) *C.QEvent {
gofunc, ok := cgo.Handle(cb).Value().(func(super func() *QEvent) *QEvent)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
virtualReturn := gofunc((&QGestureEvent{h: self}).callVirtualBase_Clone)
return virtualReturn.cPointer()
}
2024-10-20 05:21:03 +00:00
// Delete this object from C++ memory.
func (this *QGestureEvent) Delete() {
2024-11-19 06:29:06 +00:00
C.QGestureEvent_Delete(this.h, C.bool(this.isSubclass))
2024-10-20 05:21:03 +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 *QGestureEvent) GoGC() {
runtime.SetFinalizer(this, func(this *QGestureEvent) {
this.Delete()
runtime.KeepAlive(this.h)
})
}