2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qanimationgroup.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
2024-09-14 22:29:05 +00:00
|
|
|
"runtime"
|
2024-11-23 06:34:52 +00:00
|
|
|
"runtime/cgo"
|
2024-08-25 04:08:24 +00:00
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QAnimationGroup struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QAnimationGroup
|
|
|
|
isSubclass bool
|
2024-08-25 04:08:24 +00:00
|
|
|
*QAbstractAnimation
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAnimationGroup) cPointer() *C.QAnimationGroup {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
2024-10-16 05:07:56 +00:00
|
|
|
func (this *QAnimationGroup) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQAnimationGroup constructs the type using only CGO pointers.
|
2024-12-07 04:15:57 +00:00
|
|
|
func newQAnimationGroup(h *C.QAnimationGroup) *QAnimationGroup {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-12-07 04:15:57 +00:00
|
|
|
var outptr_QAbstractAnimation *C.QAbstractAnimation = nil
|
|
|
|
C.QAnimationGroup_virtbase(h, &outptr_QAbstractAnimation)
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
return &QAnimationGroup{h: h,
|
2024-12-07 04:15:57 +00:00
|
|
|
QAbstractAnimation: newQAbstractAnimation(outptr_QAbstractAnimation)}
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQAnimationGroup constructs the type using only unsafe pointers.
|
2024-12-07 04:15:57 +00:00
|
|
|
func UnsafeNewQAnimationGroup(h unsafe.Pointer) *QAnimationGroup {
|
|
|
|
return newQAnimationGroup((*C.QAnimationGroup)(h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-11-23 06:34:52 +00:00
|
|
|
// NewQAnimationGroup constructs a new QAnimationGroup object.
|
|
|
|
func NewQAnimationGroup() *QAnimationGroup {
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQAnimationGroup(C.QAnimationGroup_new())
|
2024-11-23 06:34:52 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQAnimationGroup2 constructs a new QAnimationGroup object.
|
|
|
|
func NewQAnimationGroup2(parent *QObject) *QAnimationGroup {
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
ret := newQAnimationGroup(C.QAnimationGroup_new2(parent.cPointer()))
|
2024-11-23 06:34:52 +00:00
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QAnimationGroup) MetaObject() *QMetaObject {
|
2024-12-07 02:02:06 +00:00
|
|
|
return newQMetaObject(C.QAnimationGroup_MetaObject(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
func (this *QAnimationGroup) 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.QAnimationGroup_Metacast(this.h, param1_Cstring))
|
2024-09-20 22:32:57 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func QAnimationGroup_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.QAnimationGroup_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 QAnimationGroup_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.QAnimationGroup_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 *QAnimationGroup) AnimationAt(index int) *QAbstractAnimation {
|
2024-12-07 04:15:57 +00:00
|
|
|
return newQAbstractAnimation(C.QAnimationGroup_AnimationAt(this.h, (C.int)(index)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAnimationGroup) AnimationCount() int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QAnimationGroup_AnimationCount(this.h))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAnimationGroup) IndexOfAnimation(animation *QAbstractAnimation) int {
|
2024-09-17 07:30:27 +00:00
|
|
|
return (int)(C.QAnimationGroup_IndexOfAnimation(this.h, animation.cPointer()))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAnimationGroup) AddAnimation(animation *QAbstractAnimation) {
|
|
|
|
C.QAnimationGroup_AddAnimation(this.h, animation.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAnimationGroup) InsertAnimation(index int, animation *QAbstractAnimation) {
|
|
|
|
C.QAnimationGroup_InsertAnimation(this.h, (C.int)(index), animation.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAnimationGroup) RemoveAnimation(animation *QAbstractAnimation) {
|
|
|
|
C.QAnimationGroup_RemoveAnimation(this.h, animation.cPointer())
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAnimationGroup) TakeAnimation(index int) *QAbstractAnimation {
|
2024-12-07 04:15:57 +00:00
|
|
|
return newQAbstractAnimation(C.QAnimationGroup_TakeAnimation(this.h, (C.int)(index)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAnimationGroup) Clear() {
|
|
|
|
C.QAnimationGroup_Clear(this.h)
|
|
|
|
}
|
|
|
|
|
|
|
|
func QAnimationGroup_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.QAnimationGroup_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 QAnimationGroup_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.QAnimationGroup_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 QAnimationGroup_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.QAnimationGroup_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 QAnimationGroup_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.QAnimationGroup_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-11-23 06:34:52 +00:00
|
|
|
func (this *QAnimationGroup) callVirtualBase_Event(event *QEvent) bool {
|
|
|
|
|
|
|
|
return (bool)(C.QAnimationGroup_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer()))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QAnimationGroup) OnEvent(slot func(super func(event *QEvent) bool, 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-23 06:34:52 +00:00
|
|
|
C.QAnimationGroup_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QAnimationGroup_Event
|
|
|
|
func miqt_exec_callback_QAnimationGroup_Event(self *C.QAnimationGroup, 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
|
2024-12-07 02:02:06 +00:00
|
|
|
slotval1 := newQEvent(event)
|
2024-11-23 06:34:52 +00:00
|
|
|
|
|
|
|
virtualReturn := gofunc((&QAnimationGroup{h: self}).callVirtualBase_Event, slotval1)
|
|
|
|
|
|
|
|
return (C.bool)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QAnimationGroup) OnDuration(slot func() int) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-23 06:34:52 +00:00
|
|
|
C.QAnimationGroup_override_virtual_Duration(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QAnimationGroup_Duration
|
|
|
|
func miqt_exec_callback_QAnimationGroup_Duration(self *C.QAnimationGroup, cb C.intptr_t) C.int {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func() int)
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
virtualReturn := gofunc()
|
|
|
|
|
|
|
|
return (C.int)(virtualReturn)
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QAnimationGroup) OnUpdateCurrentTime(slot func(currentTime int)) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-23 06:34:52 +00:00
|
|
|
C.QAnimationGroup_override_virtual_UpdateCurrentTime(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QAnimationGroup_UpdateCurrentTime
|
|
|
|
func miqt_exec_callback_QAnimationGroup_UpdateCurrentTime(self *C.QAnimationGroup, cb C.intptr_t, currentTime C.int) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(currentTime int))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (int)(currentTime)
|
|
|
|
|
|
|
|
gofunc(slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAnimationGroup) callVirtualBase_UpdateState(newState QAbstractAnimation__State, oldState QAbstractAnimation__State) {
|
|
|
|
|
|
|
|
C.QAnimationGroup_virtualbase_UpdateState(unsafe.Pointer(this.h), (C.int)(newState), (C.int)(oldState))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QAnimationGroup) OnUpdateState(slot func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State)) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-23 06:34:52 +00:00
|
|
|
C.QAnimationGroup_override_virtual_UpdateState(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QAnimationGroup_UpdateState
|
|
|
|
func miqt_exec_callback_QAnimationGroup_UpdateState(self *C.QAnimationGroup, cb C.intptr_t, newState C.int, oldState C.int) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(newState QAbstractAnimation__State, oldState QAbstractAnimation__State), newState QAbstractAnimation__State, oldState QAbstractAnimation__State))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (QAbstractAnimation__State)(newState)
|
|
|
|
|
|
|
|
slotval2 := (QAbstractAnimation__State)(oldState)
|
|
|
|
|
|
|
|
gofunc((&QAnimationGroup{h: self}).callVirtualBase_UpdateState, slotval1, slotval2)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAnimationGroup) callVirtualBase_UpdateDirection(direction QAbstractAnimation__Direction) {
|
|
|
|
|
|
|
|
C.QAnimationGroup_virtualbase_UpdateDirection(unsafe.Pointer(this.h), (C.int)(direction))
|
|
|
|
|
|
|
|
}
|
|
|
|
func (this *QAnimationGroup) OnUpdateDirection(slot func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction)) {
|
2024-12-07 01:43:28 +00:00
|
|
|
if !this.isSubclass {
|
|
|
|
panic("miqt: can only override virtual methods for directly constructed types")
|
|
|
|
}
|
2024-11-23 06:34:52 +00:00
|
|
|
C.QAnimationGroup_override_virtual_UpdateDirection(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
|
|
|
|
}
|
|
|
|
|
|
|
|
//export miqt_exec_callback_QAnimationGroup_UpdateDirection
|
|
|
|
func miqt_exec_callback_QAnimationGroup_UpdateDirection(self *C.QAnimationGroup, cb C.intptr_t, direction C.int) {
|
|
|
|
gofunc, ok := cgo.Handle(cb).Value().(func(super func(direction QAbstractAnimation__Direction), direction QAbstractAnimation__Direction))
|
|
|
|
if !ok {
|
|
|
|
panic("miqt: callback of non-callback type (heap corruption?)")
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convert all CABI parameters to Go parameters
|
|
|
|
slotval1 := (QAbstractAnimation__Direction)(direction)
|
|
|
|
|
|
|
|
gofunc((&QAnimationGroup{h: self}).callVirtualBase_UpdateDirection, slotval1)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
// Delete this object from C++ memory.
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QAnimationGroup) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QAnimationGroup_Delete(this.h, C.bool(this.isSubclass))
|
2024-08-25 04:08:24 +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 *QAnimationGroup) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QAnimationGroup) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|