miqt/qt6/gen_qaccessiblewidget.go

213 lines
6.9 KiB
Go
Raw Normal View History

2024-10-20 05:21:03 +00:00
package qt6
/*
#include "gen_qaccessiblewidget.h"
#include <stdlib.h>
*/
import "C"
import (
"unsafe"
)
type QAccessibleWidget struct {
2024-11-19 06:29:06 +00:00
h *C.QAccessibleWidget
isSubclass bool
2024-10-20 05:21:03 +00:00
*QAccessibleObject
*QAccessibleActionInterface
}
func (this *QAccessibleWidget) cPointer() *C.QAccessibleWidget {
if this == nil {
return nil
}
return this.h
}
func (this *QAccessibleWidget) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQAccessibleWidget constructs the type using only CGO pointers.
2024-12-07 04:15:57 +00:00
func newQAccessibleWidget(h *C.QAccessibleWidget) *QAccessibleWidget {
2024-10-20 05:21:03 +00:00
if h == nil {
return nil
}
2024-12-07 04:15:57 +00:00
var outptr_QAccessibleObject *C.QAccessibleObject = nil
var outptr_QAccessibleActionInterface *C.QAccessibleActionInterface = nil
C.QAccessibleWidget_virtbase(h, &outptr_QAccessibleObject, &outptr_QAccessibleActionInterface)
2024-11-19 06:29:06 +00:00
return &QAccessibleWidget{h: h,
2024-12-07 04:15:57 +00:00
QAccessibleObject: newQAccessibleObject(outptr_QAccessibleObject),
QAccessibleActionInterface: newQAccessibleActionInterface(outptr_QAccessibleActionInterface)}
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQAccessibleWidget constructs the type using only unsafe pointers.
2024-12-07 04:15:57 +00:00
func UnsafeNewQAccessibleWidget(h unsafe.Pointer) *QAccessibleWidget {
return newQAccessibleWidget((*C.QAccessibleWidget)(h))
2024-10-20 05:21:03 +00:00
}
// NewQAccessibleWidget constructs a new QAccessibleWidget object.
func NewQAccessibleWidget(o *QWidget) *QAccessibleWidget {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQAccessibleWidget(C.QAccessibleWidget_new(o.cPointer()))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQAccessibleWidget2 constructs a new QAccessibleWidget object.
func NewQAccessibleWidget2(o *QWidget, r QAccessible__Role) *QAccessibleWidget {
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQAccessibleWidget(C.QAccessibleWidget_new2(o.cPointer(), (C.int)(r)))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
// NewQAccessibleWidget3 constructs a new QAccessibleWidget object.
func NewQAccessibleWidget3(o *QWidget, r QAccessible__Role, name string) *QAccessibleWidget {
name_ms := C.struct_miqt_string{}
name_ms.data = C.CString(name)
name_ms.len = C.size_t(len(name))
defer C.free(unsafe.Pointer(name_ms.data))
2024-11-19 06:29:06 +00:00
2024-12-07 04:15:57 +00:00
ret := newQAccessibleWidget(C.QAccessibleWidget_new3(o.cPointer(), (C.int)(r), name_ms))
2024-11-19 06:29:06 +00:00
ret.isSubclass = true
return ret
2024-10-20 05:21:03 +00:00
}
func (this *QAccessibleWidget) IsValid() bool {
return (bool)(C.QAccessibleWidget_IsValid(this.h))
}
func (this *QAccessibleWidget) Window() *QWindow {
2024-12-07 04:15:57 +00:00
return newQWindow(C.QAccessibleWidget_Window(this.h))
2024-10-20 05:21:03 +00:00
}
func (this *QAccessibleWidget) ChildCount() int {
return (int)(C.QAccessibleWidget_ChildCount(this.h))
}
func (this *QAccessibleWidget) IndexOfChild(child *QAccessibleInterface) int {
return (int)(C.QAccessibleWidget_IndexOfChild(this.h, child.cPointer()))
}
2024-11-19 06:29:06 +00:00
func (this *QAccessibleWidget) Relations(match QAccessible__RelationFlag) []struct {
First *QAccessibleInterface
Second QAccessible__RelationFlag
} {
2024-11-19 06:29:06 +00:00
var _ma C.struct_miqt_array = C.QAccessibleWidget_Relations(this.h, (C.int)(match))
_ret := make([]struct {
First *QAccessibleInterface
Second QAccessible__RelationFlag
}, int(_ma.len))
_outCast := (*[0xffff]C.struct_miqt_map)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
var _lv_mm C.struct_miqt_map = _outCast[i]
_lv_First_CArray := (*[0xffff]*C.QAccessibleInterface)(unsafe.Pointer(_lv_mm.keys))
_lv_Second_CArray := (*[0xffff]C.int)(unsafe.Pointer(_lv_mm.values))
_lv_entry_First := newQAccessibleInterface(_lv_First_CArray[0])
_lv_entry_Second := (QAccessible__RelationFlag)(_lv_Second_CArray[0])
_ret[i] = struct {
First *QAccessibleInterface
Second QAccessible__RelationFlag
}{First: _lv_entry_First, Second: _lv_entry_Second}
}
return _ret
}
2024-10-20 05:21:03 +00:00
func (this *QAccessibleWidget) FocusChild() *QAccessibleInterface {
return newQAccessibleInterface(C.QAccessibleWidget_FocusChild(this.h))
2024-10-20 05:21:03 +00:00
}
func (this *QAccessibleWidget) Rect() *QRect {
_goptr := newQRect(C.QAccessibleWidget_Rect(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 *QAccessibleWidget) Parent() *QAccessibleInterface {
return newQAccessibleInterface(C.QAccessibleWidget_Parent(this.h))
2024-10-20 05:21:03 +00:00
}
func (this *QAccessibleWidget) Child(index int) *QAccessibleInterface {
return newQAccessibleInterface(C.QAccessibleWidget_Child(this.h, (C.int)(index)))
2024-10-20 05:21:03 +00:00
}
func (this *QAccessibleWidget) Text(t QAccessible__Text) string {
var _ms C.struct_miqt_string = C.QAccessibleWidget_Text(this.h, (C.int)(t))
_ret := C.GoStringN(_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms.data))
return _ret
}
func (this *QAccessibleWidget) Role() QAccessible__Role {
return (QAccessible__Role)(C.QAccessibleWidget_Role(this.h))
}
func (this *QAccessibleWidget) State() *QAccessible__State {
_goptr := newQAccessible__State(C.QAccessibleWidget_State(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 *QAccessibleWidget) ForegroundColor() *QColor {
_goptr := newQColor(C.QAccessibleWidget_ForegroundColor(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 *QAccessibleWidget) BackgroundColor() *QColor {
_goptr := newQColor(C.QAccessibleWidget_BackgroundColor(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 *QAccessibleWidget) InterfaceCast(t QAccessible__InterfaceType) unsafe.Pointer {
return (unsafe.Pointer)(C.QAccessibleWidget_InterfaceCast(this.h, (C.int)(t)))
}
func (this *QAccessibleWidget) ActionNames() []string {
var _ma C.struct_miqt_array = C.QAccessibleWidget_ActionNames(this.h)
2024-10-20 05:21:03 +00:00
_ret := make([]string, int(_ma.len))
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
var _lv_ms C.struct_miqt_string = _outCast[i]
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
C.free(unsafe.Pointer(_lv_ms.data))
_ret[i] = _lv_ret
}
return _ret
}
func (this *QAccessibleWidget) DoAction(actionName string) {
actionName_ms := C.struct_miqt_string{}
actionName_ms.data = C.CString(actionName)
actionName_ms.len = C.size_t(len(actionName))
defer C.free(unsafe.Pointer(actionName_ms.data))
C.QAccessibleWidget_DoAction(this.h, actionName_ms)
}
func (this *QAccessibleWidget) KeyBindingsForAction(actionName string) []string {
actionName_ms := C.struct_miqt_string{}
actionName_ms.data = C.CString(actionName)
actionName_ms.len = C.size_t(len(actionName))
defer C.free(unsafe.Pointer(actionName_ms.data))
var _ma C.struct_miqt_array = C.QAccessibleWidget_KeyBindingsForAction(this.h, actionName_ms)
2024-10-20 05:21:03 +00:00
_ret := make([]string, int(_ma.len))
_outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya
for i := 0; i < int(_ma.len); i++ {
var _lv_ms C.struct_miqt_string = _outCast[i]
_lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len)))
C.free(unsafe.Pointer(_lv_ms.data))
_ret[i] = _lv_ret
}
return _ret
}