miqt/qt6/gen_qaccessiblebridge.go

404 lines
14 KiB
Go
Raw Normal View History

2024-10-20 05:21:03 +00:00
package qt6
/*
#include "gen_qaccessiblebridge.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"runtime/cgo"
2024-10-20 05:21:03 +00:00
"unsafe"
)
type QAccessibleBridge struct {
2024-11-19 06:29:06 +00:00
h *C.QAccessibleBridge
isSubclass bool
2024-10-20 05:21:03 +00:00
}
func (this *QAccessibleBridge) cPointer() *C.QAccessibleBridge {
if this == nil {
return nil
}
return this.h
}
func (this *QAccessibleBridge) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQAccessibleBridge constructs the type using only CGO pointers.
2024-10-20 05:21:03 +00:00
func newQAccessibleBridge(h *C.QAccessibleBridge) *QAccessibleBridge {
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
2024-10-20 05:21:03 +00:00
return &QAccessibleBridge{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQAccessibleBridge constructs the type using only unsafe pointers.
2024-10-20 05:21:03 +00:00
func UnsafeNewQAccessibleBridge(h unsafe.Pointer) *QAccessibleBridge {
2024-12-07 04:15:57 +00:00
return newQAccessibleBridge((*C.QAccessibleBridge)(h))
2024-10-20 05:21:03 +00:00
}
func (this *QAccessibleBridge) SetRootObject(rootObject *QAccessibleInterface) {
C.QAccessibleBridge_SetRootObject(this.h, rootObject.cPointer())
}
func (this *QAccessibleBridge) NotifyAccessibilityUpdate(event *QAccessibleEvent) {
C.QAccessibleBridge_NotifyAccessibilityUpdate(this.h, event.cPointer())
}
func (this *QAccessibleBridge) OperatorAssign(param1 *QAccessibleBridge) {
C.QAccessibleBridge_OperatorAssign(this.h, param1.cPointer())
}
// Delete this object from C++ memory.
func (this *QAccessibleBridge) Delete() {
2024-11-19 06:29:06 +00:00
C.QAccessibleBridge_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 *QAccessibleBridge) GoGC() {
runtime.SetFinalizer(this, func(this *QAccessibleBridge) {
this.Delete()
runtime.KeepAlive(this.h)
})
}
type QAccessibleBridgePlugin struct {
2024-11-19 06:29:06 +00:00
h *C.QAccessibleBridgePlugin
isSubclass bool
2024-10-20 05:21:03 +00:00
*QObject
}
func (this *QAccessibleBridgePlugin) cPointer() *C.QAccessibleBridgePlugin {
if this == nil {
return nil
}
return this.h
}
func (this *QAccessibleBridgePlugin) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQAccessibleBridgePlugin constructs the type using only CGO pointers.
2024-12-07 04:15:57 +00:00
func newQAccessibleBridgePlugin(h *C.QAccessibleBridgePlugin) *QAccessibleBridgePlugin {
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.QAccessibleBridgePlugin_virtbase(h, &outptr_QObject)
2024-11-19 06:29:06 +00:00
return &QAccessibleBridgePlugin{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
// UnsafeNewQAccessibleBridgePlugin constructs the type using only unsafe pointers.
2024-12-07 04:15:57 +00:00
func UnsafeNewQAccessibleBridgePlugin(h unsafe.Pointer) *QAccessibleBridgePlugin {
return newQAccessibleBridgePlugin((*C.QAccessibleBridgePlugin)(h))
2024-10-20 05:21:03 +00:00
}
// NewQAccessibleBridgePlugin constructs a new QAccessibleBridgePlugin object.
func NewQAccessibleBridgePlugin() *QAccessibleBridgePlugin {
2024-12-07 04:15:57 +00:00
ret := newQAccessibleBridgePlugin(C.QAccessibleBridgePlugin_new())
ret.isSubclass = true
return ret
}
// NewQAccessibleBridgePlugin2 constructs a new QAccessibleBridgePlugin object.
func NewQAccessibleBridgePlugin2(parent *QObject) *QAccessibleBridgePlugin {
2024-12-07 04:15:57 +00:00
ret := newQAccessibleBridgePlugin(C.QAccessibleBridgePlugin_new2(parent.cPointer()))
ret.isSubclass = true
return ret
}
2024-10-20 05:21:03 +00:00
func (this *QAccessibleBridgePlugin) MetaObject() *QMetaObject {
return newQMetaObject(C.QAccessibleBridgePlugin_MetaObject(this.h))
2024-10-20 05:21:03 +00:00
}
func (this *QAccessibleBridgePlugin) Metacast(param1 string) unsafe.Pointer {
param1_Cstring := C.CString(param1)
defer C.free(unsafe.Pointer(param1_Cstring))
return (unsafe.Pointer)(C.QAccessibleBridgePlugin_Metacast(this.h, param1_Cstring))
}
func QAccessibleBridgePlugin_Tr(s string) string {
s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
var _ms C.struct_miqt_string = C.QAccessibleBridgePlugin_Tr(s_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QAccessibleBridgePlugin) Create(key string) *QAccessibleBridge {
key_ms := C.struct_miqt_string{}
key_ms.data = C.CString(key)
key_ms.len = C.size_t(len(key))
defer C.free(unsafe.Pointer(key_ms.data))
return newQAccessibleBridge(C.QAccessibleBridgePlugin_Create(this.h, key_ms))
2024-10-20 05:21:03 +00:00
}
func QAccessibleBridgePlugin_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.QAccessibleBridgePlugin_Tr2(s_Cstring, c_Cstring)
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func QAccessibleBridgePlugin_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.QAccessibleBridgePlugin_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
}
func (this *QAccessibleBridgePlugin) OnCreate(slot func(key string) *QAccessibleBridge) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
C.QAccessibleBridgePlugin_override_virtual_Create(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QAccessibleBridgePlugin_Create
func miqt_exec_callback_QAccessibleBridgePlugin_Create(self *C.QAccessibleBridgePlugin, cb C.intptr_t, key C.struct_miqt_string) *C.QAccessibleBridge {
gofunc, ok := cgo.Handle(cb).Value().(func(key string) *QAccessibleBridge)
if !ok {
panic("miqt: callback of non-callback type (heap corruption?)")
}
// Convert all CABI parameters to Go parameters
var key_ms C.struct_miqt_string = key
key_ret := C.GoStringN(key_ms.data, C.int(int64(key_ms.len)))
C.free(unsafe.Pointer(key_ms.data))
slotval1 := key_ret
virtualReturn := gofunc(slotval1)
return virtualReturn.cPointer()
}
func (this *QAccessibleBridgePlugin) callVirtualBase_Event(event *QEvent) bool {
return (bool)(C.QAccessibleBridgePlugin_virtualbase_Event(unsafe.Pointer(this.h), event.cPointer()))
}
func (this *QAccessibleBridgePlugin) 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")
}
C.QAccessibleBridgePlugin_override_virtual_Event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QAccessibleBridgePlugin_Event
func miqt_exec_callback_QAccessibleBridgePlugin_Event(self *C.QAccessibleBridgePlugin, 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)
virtualReturn := gofunc((&QAccessibleBridgePlugin{h: self}).callVirtualBase_Event, slotval1)
return (C.bool)(virtualReturn)
}
func (this *QAccessibleBridgePlugin) callVirtualBase_EventFilter(watched *QObject, event *QEvent) bool {
return (bool)(C.QAccessibleBridgePlugin_virtualbase_EventFilter(unsafe.Pointer(this.h), watched.cPointer(), event.cPointer()))
}
func (this *QAccessibleBridgePlugin) 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")
}
C.QAccessibleBridgePlugin_override_virtual_EventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QAccessibleBridgePlugin_EventFilter
func miqt_exec_callback_QAccessibleBridgePlugin_EventFilter(self *C.QAccessibleBridgePlugin, 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)
virtualReturn := gofunc((&QAccessibleBridgePlugin{h: self}).callVirtualBase_EventFilter, slotval1, slotval2)
return (C.bool)(virtualReturn)
}
func (this *QAccessibleBridgePlugin) callVirtualBase_TimerEvent(event *QTimerEvent) {
C.QAccessibleBridgePlugin_virtualbase_TimerEvent(unsafe.Pointer(this.h), event.cPointer())
}
func (this *QAccessibleBridgePlugin) OnTimerEvent(slot func(super func(event *QTimerEvent), event *QTimerEvent)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
C.QAccessibleBridgePlugin_override_virtual_TimerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QAccessibleBridgePlugin_TimerEvent
func miqt_exec_callback_QAccessibleBridgePlugin_TimerEvent(self *C.QAccessibleBridgePlugin, 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)
gofunc((&QAccessibleBridgePlugin{h: self}).callVirtualBase_TimerEvent, slotval1)
}
func (this *QAccessibleBridgePlugin) callVirtualBase_ChildEvent(event *QChildEvent) {
C.QAccessibleBridgePlugin_virtualbase_ChildEvent(unsafe.Pointer(this.h), event.cPointer())
}
func (this *QAccessibleBridgePlugin) OnChildEvent(slot func(super func(event *QChildEvent), event *QChildEvent)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
C.QAccessibleBridgePlugin_override_virtual_ChildEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QAccessibleBridgePlugin_ChildEvent
func miqt_exec_callback_QAccessibleBridgePlugin_ChildEvent(self *C.QAccessibleBridgePlugin, 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)
gofunc((&QAccessibleBridgePlugin{h: self}).callVirtualBase_ChildEvent, slotval1)
}
func (this *QAccessibleBridgePlugin) callVirtualBase_CustomEvent(event *QEvent) {
C.QAccessibleBridgePlugin_virtualbase_CustomEvent(unsafe.Pointer(this.h), event.cPointer())
}
func (this *QAccessibleBridgePlugin) OnCustomEvent(slot func(super func(event *QEvent), event *QEvent)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
C.QAccessibleBridgePlugin_override_virtual_CustomEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QAccessibleBridgePlugin_CustomEvent
func miqt_exec_callback_QAccessibleBridgePlugin_CustomEvent(self *C.QAccessibleBridgePlugin, 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)
gofunc((&QAccessibleBridgePlugin{h: self}).callVirtualBase_CustomEvent, slotval1)
}
func (this *QAccessibleBridgePlugin) callVirtualBase_ConnectNotify(signal *QMetaMethod) {
C.QAccessibleBridgePlugin_virtualbase_ConnectNotify(unsafe.Pointer(this.h), signal.cPointer())
}
func (this *QAccessibleBridgePlugin) OnConnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
C.QAccessibleBridgePlugin_override_virtual_ConnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QAccessibleBridgePlugin_ConnectNotify
func miqt_exec_callback_QAccessibleBridgePlugin_ConnectNotify(self *C.QAccessibleBridgePlugin, 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)
gofunc((&QAccessibleBridgePlugin{h: self}).callVirtualBase_ConnectNotify, slotval1)
}
func (this *QAccessibleBridgePlugin) callVirtualBase_DisconnectNotify(signal *QMetaMethod) {
C.QAccessibleBridgePlugin_virtualbase_DisconnectNotify(unsafe.Pointer(this.h), signal.cPointer())
}
func (this *QAccessibleBridgePlugin) OnDisconnectNotify(slot func(super func(signal *QMetaMethod), signal *QMetaMethod)) {
if !this.isSubclass {
panic("miqt: can only override virtual methods for directly constructed types")
}
C.QAccessibleBridgePlugin_override_virtual_DisconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot)))
}
//export miqt_exec_callback_QAccessibleBridgePlugin_DisconnectNotify
func miqt_exec_callback_QAccessibleBridgePlugin_DisconnectNotify(self *C.QAccessibleBridgePlugin, 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)
gofunc((&QAccessibleBridgePlugin{h: self}).callVirtualBase_DisconnectNotify, slotval1)
}
2024-10-20 05:21:03 +00:00
// Delete this object from C++ memory.
func (this *QAccessibleBridgePlugin) Delete() {
2024-11-19 06:29:06 +00:00
C.QAccessibleBridgePlugin_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 *QAccessibleBridgePlugin) GoGC() {
runtime.SetFinalizer(this, func(this *QAccessibleBridgePlugin) {
this.Delete()
runtime.KeepAlive(this.h)
})
}