miqt/qt6/gen_qtestsupport_widgets.go

163 lines
6.7 KiB
Go
Raw Permalink Normal View History

2024-10-20 05:21:03 +00:00
package qt6
/*
#include "gen_qtestsupport_widgets.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 QTest__QTouchEventWidgetSequence struct {
h *C.QTest__QTouchEventWidgetSequence
isSubclass bool
*QTest__QTouchEventSequence
}
func (this *QTest__QTouchEventWidgetSequence) cPointer() *C.QTest__QTouchEventWidgetSequence {
if this == nil {
return nil
}
return this.h
}
func (this *QTest__QTouchEventWidgetSequence) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
// newQTest__QTouchEventWidgetSequence constructs the type using only CGO pointers.
2024-12-07 04:15:57 +00:00
func newQTest__QTouchEventWidgetSequence(h *C.QTest__QTouchEventWidgetSequence) *QTest__QTouchEventWidgetSequence {
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
var outptr_QTest__QTouchEventSequence *C.QTest__QTouchEventSequence = nil
C.QTest__QTouchEventWidgetSequence_virtbase(h, &outptr_QTest__QTouchEventSequence)
return &QTest__QTouchEventWidgetSequence{h: h,
2024-12-07 04:15:57 +00:00
QTest__QTouchEventSequence: newQTest__QTouchEventSequence(outptr_QTest__QTouchEventSequence)}
}
// UnsafeNewQTest__QTouchEventWidgetSequence constructs the type using only unsafe pointers.
2024-12-07 04:15:57 +00:00
func UnsafeNewQTest__QTouchEventWidgetSequence(h unsafe.Pointer) *QTest__QTouchEventWidgetSequence {
return newQTest__QTouchEventWidgetSequence((*C.QTest__QTouchEventWidgetSequence)(h))
}
// NewQTest__QTouchEventWidgetSequence constructs a new QTest::QTouchEventWidgetSequence object.
func NewQTest__QTouchEventWidgetSequence(param1 *QTest__QTouchEventWidgetSequence) *QTest__QTouchEventWidgetSequence {
2024-12-07 04:15:57 +00:00
ret := newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_new(param1.cPointer()))
ret.isSubclass = true
return ret
}
func (this *QTest__QTouchEventWidgetSequence) Press(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence {
2024-12-07 04:15:57 +00:00
return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Press(this.h, (C.int)(touchId), pt.cPointer()))
}
func (this *QTest__QTouchEventWidgetSequence) Move(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence {
2024-12-07 04:15:57 +00:00
return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Move(this.h, (C.int)(touchId), pt.cPointer()))
}
func (this *QTest__QTouchEventWidgetSequence) Release(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence {
2024-12-07 04:15:57 +00:00
return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Release(this.h, (C.int)(touchId), pt.cPointer()))
}
func (this *QTest__QTouchEventWidgetSequence) Stationary(touchId int) *QTest__QTouchEventWidgetSequence {
2024-12-07 04:15:57 +00:00
return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Stationary(this.h, (C.int)(touchId)))
}
func (this *QTest__QTouchEventWidgetSequence) Commit(processEvents bool) bool {
return (bool)(C.QTest__QTouchEventWidgetSequence_Commit(this.h, (C.bool)(processEvents)))
}
func (this *QTest__QTouchEventWidgetSequence) Press3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence {
2024-12-07 04:15:57 +00:00
return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Press3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer()))
}
func (this *QTest__QTouchEventWidgetSequence) Move3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence {
2024-12-07 04:15:57 +00:00
return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Move3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer()))
}
func (this *QTest__QTouchEventWidgetSequence) Release3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence {
2024-12-07 04:15:57 +00:00
return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Release3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer()))
}
func (this *QTest__QTouchEventWidgetSequence) callVirtualBase_Stationary(touchId int) *QTest__QTouchEventWidgetSequence {
2024-12-07 04:15:57 +00:00
return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_virtualbase_Stationary(unsafe.Pointer(this.h), (C.int)(touchId)))
}
func (this *QTest__QTouchEventWidgetSequence) OnStationary(slot func(super func(touchId int) *QTest__QTouchEventWidgetSequence, touchId int) *QTest__QTouchEventWidgetSequence) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
C.QTest__QTouchEventWidgetSequence_override_virtual_Stationary(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QTest__QTouchEventWidgetSequence_Stationary
func miqt_exec_callback_QTest__QTouchEventWidgetSequence_Stationary(self *C.QTest__QTouchEventWidgetSequence, cb C.intptr_t, touchId C.int) *C.QTest__QTouchEventWidgetSequence {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(touchId int) *QTest__QTouchEventWidgetSequence, touchId int) *QTest__QTouchEventWidgetSequence)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (int)(touchId)
virtualReturn := gofunc((&QTest__QTouchEventWidgetSequence{h: self}).callVirtualBase_Stationary, slotval1)
return virtualReturn.cPointer()
}
func (this *QTest__QTouchEventWidgetSequence) callVirtualBase_Commit(processEvents bool) bool {
return (bool)(C.QTest__QTouchEventWidgetSequence_virtualbase_Commit(unsafe.Pointer(this.h), (C.bool)(processEvents)))
}
func (this *QTest__QTouchEventWidgetSequence) OnCommit(slot func(super func(processEvents bool) bool, processEvents bool) bool) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
C.QTest__QTouchEventWidgetSequence_override_virtual_Commit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QTest__QTouchEventWidgetSequence_Commit
func miqt_exec_callback_QTest__QTouchEventWidgetSequence_Commit(self *C.QTest__QTouchEventWidgetSequence, cb C.intptr_t, processEvents C.bool) C.bool {
gofunc, ok := cgo.Handle(cb).Value().(func(super func(processEvents bool) bool, processEvents bool) bool)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
slotval1 := (bool)(processEvents)
virtualReturn := gofunc((&QTest__QTouchEventWidgetSequence{h: self}).callVirtualBase_Commit, slotval1)
return (C.bool)(virtualReturn)
}
// Delete this object from C++ memory.
func (this *QTest__QTouchEventWidgetSequence) Delete() {
C.QTest__QTouchEventWidgetSequence_Delete(this.h, C.bool(this.isSubclass))
}
// 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 *QTest__QTouchEventWidgetSequence) GoGC() {
runtime.SetFinalizer(this, func(this *QTest__QTouchEventWidgetSequence) {
this.Delete()
runtime.KeepAlive(this.h)
})
}