2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qstatemachine.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
2024-09-14 22:29:05 +00:00
|
|
|
"runtime"
|
2024-08-25 04:08:24 +00:00
|
|
|
"runtime/cgo"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
type QStateMachine__EventPriority int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QStateMachine__NormalPriority QStateMachine__EventPriority = 0
|
|
|
|
QStateMachine__HighPriority QStateMachine__EventPriority = 1
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type QStateMachine__Error int
|
|
|
|
|
|
|
|
const (
|
2024-09-20 07:13:26 +00:00
|
|
|
QStateMachine__NoError QStateMachine__Error = 0
|
|
|
|
QStateMachine__NoInitialStateError QStateMachine__Error = 1
|
|
|
|
QStateMachine__NoDefaultStateInHistoryStateError QStateMachine__Error = 2
|
|
|
|
QStateMachine__NoCommonAncestorForTransitionError QStateMachine__Error = 3
|
|
|
|
QStateMachine__StateMachineChildModeSetToParallelError QStateMachine__Error = 4
|
2024-09-04 06:54:22 +00:00
|
|
|
)
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
type QStateMachine struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QStateMachine
|
|
|
|
isSubclass bool
|
2024-08-25 04:08:24 +00:00
|
|
|
*QState
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) cPointer() *C.QStateMachine {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QStateMachine) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQStateMachine constructs the type using only CGO pointers.
|
2024-12-07 04:15:57 +00:00
|
|
|
func newQStateMachine(h *C.QStateMachine) *QStateMachine {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-12-07 04:15:57 +00:00
|
|
|
var outptr_QState *C.QState = nil
|
|
|
|
C.QStateMachine_virtbase(h, &outptr_QState)
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
return &QStateMachine{h: h,
|
2024-12-07 04:15:57 +00:00
|
|
|
QState: newQState(outptr_QState)}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQStateMachine constructs the type using only unsafe pointers.
|
2024-12-07 04:15:57 +00:00
|
|
|
func UnsafeNewQStateMachine(h unsafe.Pointer) *QStateMachine {
|
|
|
|
return newQStateMachine((*C.QStateMachine)(h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQStateMachine constructs a new QStateMachine object.
|
|
|
|
func NewQStateMachine() *QStateMachine {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQStateMachine(C.QStateMachine_new())
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQStateMachine2 constructs a new QStateMachine object.
|
2024-09-04 06:54:22 +00:00
|
|
|
func NewQStateMachine2(childMode QState__ChildMode) *QStateMachine {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQStateMachine(C.QStateMachine_new2((C.int)(childMode)))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQStateMachine3 constructs a new QStateMachine object.
|
|
|
|
func NewQStateMachine3(parent *QObject) *QStateMachine {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQStateMachine(C.QStateMachine_new3(parent.cPointer()))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQStateMachine4 constructs a new QStateMachine object.
|
2024-09-04 06:54:22 +00:00
|
|
|
func NewQStateMachine4(childMode QState__ChildMode, parent *QObject) *QStateMachine {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQStateMachine(C.QStateMachine_new4((C.int)(childMode), parent.cPointer()))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) MetaObject() *QMetaObject {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMetaObject(C.QStateMachine_MetaObject(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QStateMachine) Metacast(param1 string) unsafe.Pointer {
|
|
|
|
param1_Cstring := C.CString(param1)
|
|
|
|
defer C.free(unsafe.Pointer(param1_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
return (unsafe.Pointer)(C.QStateMachine_Metacast(this.h, param1_Cstring))
|
2024-09-20 22:32:57 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QStateMachine_Tr(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QStateMachine_Tr(s_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QStateMachine_TrUtf8(s string) string {
|
|
|
|
s_Cstring := C.CString(s)
|
|
|
|
defer C.free(unsafe.Pointer(s_Cstring))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QStateMachine_TrUtf8(s_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) AddState(state *QAbstractState) {
|
|
|
|
C.QStateMachine_AddState(this.h, state.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) RemoveState(state *QAbstractState) {
|
|
|
|
C.QStateMachine_RemoveState(this.h, state.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QStateMachine) Error() QStateMachine__Error {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QStateMachine__Error)(C.QStateMachine_Error(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QStateMachine) ErrorString() string {
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QStateMachine_ErrorString(this.h)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) ClearError() {
|
|
|
|
C.QStateMachine_ClearError(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) IsRunning() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QStateMachine_IsRunning(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) IsAnimated() bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QStateMachine_IsAnimated(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) SetAnimated(enabled bool) {
|
|
|
|
C.QStateMachine_SetAnimated(this.h, (C.bool)(enabled))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) AddDefaultAnimation(animation *QAbstractAnimation) {
|
|
|
|
C.QStateMachine_AddDefaultAnimation(this.h, animation.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) DefaultAnimations() []*QAbstractAnimation {
|
2024-11-04 07:18:27 +00:00
|
|
|
var _ma C.struct_miqt_array = C.QStateMachine_DefaultAnimations(this.h)
|
2024-09-14 22:29:05 +00:00
|
|
|
_ret := make([]*QAbstractAnimation, int(_ma.len))
|
2024-09-17 07:30:27 +00:00
|
|
|
_outCast := (*[0xffff]*C.QAbstractAnimation)(unsafe.Pointer(_ma.data)) // hey ya
|
2024-09-14 22:29:05 +00:00
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-12-07 04:15:57 +00:00
|
|
|
_ret[i] = newQAbstractAnimation(_outCast[i])
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) RemoveDefaultAnimation(animation *QAbstractAnimation) {
|
|
|
|
C.QStateMachine_RemoveDefaultAnimation(this.h, animation.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QStateMachine) GlobalRestorePolicy() QState__RestorePolicy {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (QState__RestorePolicy)(C.QStateMachine_GlobalRestorePolicy(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QStateMachine) SetGlobalRestorePolicy(restorePolicy QState__RestorePolicy) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QStateMachine_SetGlobalRestorePolicy(this.h, (C.int)(restorePolicy))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) PostEvent(event *QEvent) {
|
|
|
|
C.QStateMachine_PostEvent(this.h, event.cPointer())
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QStateMachine) PostDelayedEvent(event *QEvent, delay int) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QStateMachine_PostDelayedEvent(this.h, event.cPointer(), (C.int)(delay)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) CancelDelayedEvent(id int) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QStateMachine_CancelDelayedEvent(this.h, (C.int)(id)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-17 09:48:26 +00:00
|
|
|
func (this *QStateMachine) Configuration() map[*QAbstractState]struct{} {
|
2024-11-04 07:18:27 +00:00
|
|
|
var _ma C.struct_miqt_array = C.QStateMachine_Configuration(this.h)
|
2024-09-17 09:48:26 +00:00
|
|
|
_ret := make(map[*QAbstractState]struct{}, int(_ma.len))
|
|
|
|
_outCast := (*[0xffff]*C.QAbstractState)(unsafe.Pointer(_ma.data)) // hey ya
|
|
|
|
for i := 0; i < int(_ma.len); i++ {
|
2024-12-07 04:15:57 +00:00
|
|
|
_element := newQAbstractState(_outCast[i])
|
2024-12-07 02:02:06 +00:00
|
|
|
|
2024-09-17 09:48:26 +00:00
|
|
|
_ret[_element] = struct{}{}
|
|
|
|
}
|
|
|
|
return _ret
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QStateMachine) EventFilter(watched *QObject, event *QEvent) bool {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (bool)(C.QStateMachine_EventFilter(this.h, watched.cPointer(), event.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) Start() {
|
|
|
|
C.QStateMachine_Start(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) Stop() {
|
|
|
|
C.QStateMachine_Stop(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) SetRunning(running bool) {
|
|
|
|
C.QStateMachine_SetRunning(this.h, (C.bool)(running))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) RunningChanged(running bool) {
|
|
|
|
C.QStateMachine_RunningChanged(this.h, (C.bool)(running))
|
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
func (this *QStateMachine) OnRunningChanged(slot func(running bool)) {
|
2024-10-13 06:06:06 +00:00
|
|
|
C.QStateMachine_connect_RunningChanged(this.h, C.intptr_t(cgo.NewHandle(slot)))
|
2024-09-14 22:29:05 +00:00
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
//export miqt_exec_callback_QStateMachine_RunningChanged
|
2024-10-13 06:06:06 +00:00
|
|
|
func miqt_exec_callback_QStateMachine_RunningChanged(cb C.intptr_t, running C.bool) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(running bool))
|
2024-09-14 22:29:05 +00:00
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-09-17 07:30:27 +00:00
|
|
|
slotval1 := (bool)(running)
|
2024-09-14 22:29:05 +00:00
|
|
|
|
|
|
|
gofunc(slotval1)
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QStateMachine_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))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QStateMachine_Tr2(s_Cstring, c_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QStateMachine_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))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QStateMachine_Tr3(s_Cstring, c_Cstring, (C.int)(n))
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QStateMachine_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))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QStateMachine_TrUtf82(s_Cstring, c_Cstring)
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func QStateMachine_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))
|
2024-10-18 23:53:33 +00:00
|
|
|
var _ms C.struct_miqt_string = C.QStateMachine_TrUtf83(s_Cstring, c_Cstring, (C.int)(n))
|
|
|
|
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
|
|
|
|
C.free(unsafe.Pointer(_ms.data))
|
2024-09-14 22:29:05 +00:00
|
|
|
return _ret
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QStateMachine) PostEvent2(event *QEvent, priority QStateMachine__EventPriority) {
|
2024-09-18 00:12:02 +00:00
|
|
|
C.QStateMachine_PostEvent2(this.h, event.cPointer(), (C.int)(priority))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
func (this *QStateMachine) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool {
|
|
|
|
|
|
|
|
return (bool)(C.QStateMachine_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer()))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QStateMachine) OnEventFilter(slot func(super func(watched *QObject, event *QEvent) bool, watched *QObject, event *QEvent) bool) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QStateMachine_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QStateMachine_EventFilter
|
|
|
|
func miqt_exec_callback_QStateMachine_EventFilter(self *C.QStateMachine, 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
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQObject(watched)
|
|
|
|
|
|
|
|
slotval2 := newQEvent(event)
|
2024-11-19 06:29:06 +00:00
|
|
|
|
|
|
|
virtualReturn := gofunc((&QStateMachine{h: self}).callVirtualBase_EventFilter, slotval1, slotval2)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) callVirtualBase_OnEntry(event *QEvent) {
|
|
|
|
|
|
|
|
C.QStateMachine_virtualbase_OnEntry(unsafe.Pointer(this.h), event.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QStateMachine) OnOnEntry(slot func(super func(event *QEvent), event *QEvent)) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QStateMachine_override_virtual_OnEntry(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QStateMachine_OnEntry
|
|
|
|
func miqt_exec_callback_QStateMachine_OnEntry(self *C.QStateMachine, 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
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQEvent(event)
|
2024-11-19 06:29:06 +00:00
|
|
|
|
|
|
|
gofunc((&QStateMachine{h: self}).callVirtualBase_OnEntry, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) callVirtualBase_OnExit(event *QEvent) {
|
|
|
|
|
|
|
|
C.QStateMachine_virtualbase_OnExit(unsafe.Pointer(this.h), event.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QStateMachine) OnOnExit(slot func(super func(event *QEvent), event *QEvent)) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QStateMachine_override_virtual_OnExit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QStateMachine_OnExit
|
|
|
|
func miqt_exec_callback_QStateMachine_OnExit(self *C.QStateMachine, 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
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQEvent(event)
|
2024-11-19 06:29:06 +00:00
|
|
|
|
|
|
|
gofunc((&QStateMachine{h: self}).callVirtualBase_OnExit, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) callVirtualBase_BeginSelectTransitions(event *QEvent) {
|
|
|
|
|
|
|
|
C.QStateMachine_virtualbase_BeginSelectTransitions(unsafe.Pointer(this.h), event.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QStateMachine) OnBeginSelectTransitions(slot func(super func(event *QEvent), event *QEvent)) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QStateMachine_override_virtual_BeginSelectTransitions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QStateMachine_BeginSelectTransitions
|
|
|
|
func miqt_exec_callback_QStateMachine_BeginSelectTransitions(self *C.QStateMachine, 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
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQEvent(event)
|
2024-11-19 06:29:06 +00:00
|
|
|
|
|
|
|
gofunc((&QStateMachine{h: self}).callVirtualBase_BeginSelectTransitions, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) callVirtualBase_EndSelectTransitions(event *QEvent) {
|
|
|
|
|
|
|
|
C.QStateMachine_virtualbase_EndSelectTransitions(unsafe.Pointer(this.h), event.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QStateMachine) OnEndSelectTransitions(slot func(super func(event *QEvent), event *QEvent)) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QStateMachine_override_virtual_EndSelectTransitions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QStateMachine_EndSelectTransitions
|
|
|
|
func miqt_exec_callback_QStateMachine_EndSelectTransitions(self *C.QStateMachine, 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
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQEvent(event)
|
2024-11-19 06:29:06 +00:00
|
|
|
|
|
|
|
gofunc((&QStateMachine{h: self}).callVirtualBase_EndSelectTransitions, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) callVirtualBase_BeginMicrostep(event *QEvent) {
|
|
|
|
|
|
|
|
C.QStateMachine_virtualbase_BeginMicrostep(unsafe.Pointer(this.h), event.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QStateMachine) OnBeginMicrostep(slot func(super func(event *QEvent), event *QEvent)) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QStateMachine_override_virtual_BeginMicrostep(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QStateMachine_BeginMicrostep
|
|
|
|
func miqt_exec_callback_QStateMachine_BeginMicrostep(self *C.QStateMachine, 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
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQEvent(event)
|
2024-11-19 06:29:06 +00:00
|
|
|
|
|
|
|
gofunc((&QStateMachine{h: self}).callVirtualBase_BeginMicrostep, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) callVirtualBase_EndMicrostep(event *QEvent) {
|
|
|
|
|
|
|
|
C.QStateMachine_virtualbase_EndMicrostep(unsafe.Pointer(this.h), event.cPointer())
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QStateMachine) OnEndMicrostep(slot func(super func(event *QEvent), event *QEvent)) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QStateMachine_override_virtual_EndMicrostep(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QStateMachine_EndMicrostep
|
|
|
|
func miqt_exec_callback_QStateMachine_EndMicrostep(self *C.QStateMachine, 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
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQEvent(event)
|
2024-11-19 06:29:06 +00:00
|
|
|
|
|
|
|
gofunc((&QStateMachine{h: self}).callVirtualBase_EndMicrostep, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine) callVirtualBase_Event(e *QEvent) bool {
|
|
|
|
|
|
|
|
return (bool)(C.QStateMachine_virtualbase_Event(unsafe.Pointer(this.h), e.cPointer()))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QStateMachine) OnEvent(slot func(super func(e *QEvent) bool, e *QEvent) bool) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QStateMachine_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QStateMachine_Event
|
|
|
|
func miqt_exec_callback_QStateMachine_Event(self *C.QStateMachine, cb C.intptr_t, e *C.QEvent) C.bool {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(e *QEvent) bool, e *QEvent) bool)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQEvent(e)
|
2024-11-19 06:29:06 +00:00
|
|
|
|
|
|
|
virtualReturn := gofunc((&QStateMachine{h: self}).callVirtualBase_Event, slotval1)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QStateMachine) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QStateMachine_Delete(this.h, C.bool(this.isSubclass))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-08-29 07:01:51 +00:00
|
|
|
|
2024-09-14 22:29:05 +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 *QStateMachine) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QStateMachine) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
type QStateMachine__SignalEvent struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QStateMachine__SignalEvent
|
|
|
|
isSubclass bool
|
2024-08-29 07:01:51 +00:00
|
|
|
*QEvent
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine__SignalEvent) cPointer() *C.QStateMachine__SignalEvent {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QStateMachine__SignalEvent) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQStateMachine__SignalEvent constructs the type using only CGO pointers.
|
2024-12-07 04:15:57 +00:00
|
|
|
func newQStateMachine__SignalEvent(h *C.QStateMachine__SignalEvent) *QStateMachine__SignalEvent {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-12-07 04:15:57 +00:00
|
|
|
var outptr_QEvent *C.QEvent = nil
|
|
|
|
C.QStateMachine__SignalEvent_virtbase(h, &outptr_QEvent)
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
return &QStateMachine__SignalEvent{h: h,
|
2024-12-07 04:15:57 +00:00
|
|
|
QEvent: newQEvent(outptr_QEvent)}
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQStateMachine__SignalEvent constructs the type using only unsafe pointers.
|
2024-12-07 04:15:57 +00:00
|
|
|
func UnsafeNewQStateMachine__SignalEvent(h unsafe.Pointer) *QStateMachine__SignalEvent {
|
|
|
|
return newQStateMachine__SignalEvent((*C.QStateMachine__SignalEvent)(h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQStateMachine__SignalEvent constructs a new QStateMachine::SignalEvent object.
|
|
|
|
func NewQStateMachine__SignalEvent(param1 *QStateMachine__SignalEvent) *QStateMachine__SignalEvent {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQStateMachine__SignalEvent(C.QStateMachine__SignalEvent_new(param1.cPointer()))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine__SignalEvent) Sender() *QObject {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQObject(C.QStateMachine__SignalEvent_Sender(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine__SignalEvent) SignalIndex() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QStateMachine__SignalEvent_SignalIndex(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QStateMachine__SignalEvent) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QStateMachine__SignalEvent_Delete(this.h, C.bool(this.isSubclass))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +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 *QStateMachine__SignalEvent) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QStateMachine__SignalEvent) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
type QStateMachine__WrappedEvent struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QStateMachine__WrappedEvent
|
|
|
|
isSubclass bool
|
2024-08-29 07:01:51 +00:00
|
|
|
*QEvent
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine__WrappedEvent) cPointer() *C.QStateMachine__WrappedEvent {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QStateMachine__WrappedEvent) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQStateMachine__WrappedEvent constructs the type using only CGO pointers.
|
2024-12-07 04:15:57 +00:00
|
|
|
func newQStateMachine__WrappedEvent(h *C.QStateMachine__WrappedEvent) *QStateMachine__WrappedEvent {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-12-07 04:15:57 +00:00
|
|
|
var outptr_QEvent *C.QEvent = nil
|
|
|
|
C.QStateMachine__WrappedEvent_virtbase(h, &outptr_QEvent)
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
return &QStateMachine__WrappedEvent{h: h,
|
2024-12-07 04:15:57 +00:00
|
|
|
QEvent: newQEvent(outptr_QEvent)}
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQStateMachine__WrappedEvent constructs the type using only unsafe pointers.
|
2024-12-07 04:15:57 +00:00
|
|
|
func UnsafeNewQStateMachine__WrappedEvent(h unsafe.Pointer) *QStateMachine__WrappedEvent {
|
|
|
|
return newQStateMachine__WrappedEvent((*C.QStateMachine__WrappedEvent)(h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQStateMachine__WrappedEvent constructs a new QStateMachine::WrappedEvent object.
|
|
|
|
func NewQStateMachine__WrappedEvent(object *QObject, event *QEvent) *QStateMachine__WrappedEvent {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQStateMachine__WrappedEvent(C.QStateMachine__WrappedEvent_new(object.cPointer(), event.cPointer()))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQStateMachine__WrappedEvent2 constructs a new QStateMachine::WrappedEvent object.
|
|
|
|
func NewQStateMachine__WrappedEvent2(param1 *QStateMachine__WrappedEvent) *QStateMachine__WrappedEvent {
|
2024-11-19 06:29:06 +00:00
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQStateMachine__WrappedEvent(C.QStateMachine__WrappedEvent_new2(param1.cPointer()))
|
2024-11-19 06:29:06 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine__WrappedEvent) Object() *QObject {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQObject(C.QStateMachine__WrappedEvent_Object(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QStateMachine__WrappedEvent) Event() *QEvent {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQEvent(C.QStateMachine__WrappedEvent_Event(this.h))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-29 07:01:51 +00:00
|
|
|
func (this *QStateMachine__WrappedEvent) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QStateMachine__WrappedEvent_Delete(this.h, C.bool(this.isSubclass))
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +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 *QStateMachine__WrappedEvent) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QStateMachine__WrappedEvent) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|