2024-08-25 04:08:24 +00:00
|
|
|
package qt
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qaccessiblewidget.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QAccessibleWidget struct {
|
|
|
|
h *C.QAccessibleWidget
|
|
|
|
*QAccessibleObject
|
|
|
|
*QAccessibleActionInterface
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAccessibleWidget) cPointer() *C.QAccessibleWidget {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQAccessibleWidget(h *C.QAccessibleWidget) *QAccessibleWidget {
|
2024-09-01 02:23:55 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
2024-08-25 04:08:24 +00:00
|
|
|
return &QAccessibleWidget{h: h, QAccessibleObject: newQAccessibleObject_U(unsafe.Pointer(h)), QAccessibleActionInterface: newQAccessibleActionInterface_U(unsafe.Pointer(h))}
|
|
|
|
}
|
|
|
|
|
|
|
|
func newQAccessibleWidget_U(h unsafe.Pointer) *QAccessibleWidget {
|
|
|
|
return newQAccessibleWidget((*C.QAccessibleWidget)(h))
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
// NewQAccessibleWidget constructs a new QAccessibleWidget object.
|
|
|
|
func NewQAccessibleWidget(o *QWidget) *QAccessibleWidget {
|
|
|
|
ret := C.QAccessibleWidget_new(o.cPointer())
|
|
|
|
return newQAccessibleWidget(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQAccessibleWidget2 constructs a new QAccessibleWidget object.
|
2024-09-04 06:54:22 +00:00
|
|
|
func NewQAccessibleWidget2(o *QWidget, r QAccessible__Role) *QAccessibleWidget {
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.QAccessibleWidget_new2(o.cPointer(), (C.uintptr_t)(r))
|
|
|
|
return newQAccessibleWidget(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewQAccessibleWidget3 constructs a new QAccessibleWidget object.
|
2024-09-04 06:54:22 +00:00
|
|
|
func NewQAccessibleWidget3(o *QWidget, r QAccessible__Role, name string) *QAccessibleWidget {
|
2024-08-29 07:01:51 +00:00
|
|
|
name_Cstring := C.CString(name)
|
|
|
|
defer C.free(unsafe.Pointer(name_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
ret := C.QAccessibleWidget_new3(o.cPointer(), (C.uintptr_t)(r), name_Cstring, C.size_t(len(name)))
|
2024-08-29 07:01:51 +00:00
|
|
|
return newQAccessibleWidget(ret)
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QAccessibleWidget) IsValid() bool {
|
|
|
|
ret := C.QAccessibleWidget_IsValid(this.h)
|
|
|
|
return (bool)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAccessibleWidget) Window() *QWindow {
|
|
|
|
ret := C.QAccessibleWidget_Window(this.h)
|
|
|
|
return newQWindow_U(unsafe.Pointer(ret))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAccessibleWidget) ChildCount() int {
|
|
|
|
ret := C.QAccessibleWidget_ChildCount(this.h)
|
|
|
|
return (int)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAccessibleWidget) IndexOfChild(child *QAccessibleInterface) int {
|
|
|
|
ret := C.QAccessibleWidget_IndexOfChild(this.h, child.cPointer())
|
|
|
|
return (int)(ret)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAccessibleWidget) FocusChild() *QAccessibleInterface {
|
|
|
|
ret := C.QAccessibleWidget_FocusChild(this.h)
|
|
|
|
return newQAccessibleInterface_U(unsafe.Pointer(ret))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAccessibleWidget) Rect() *QRect {
|
|
|
|
ret := C.QAccessibleWidget_Rect(this.h)
|
|
|
|
// Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
ret1 := newQRect(ret)
|
|
|
|
runtime.SetFinalizer(ret1, func(ret2 *QRect) {
|
|
|
|
ret2.Delete()
|
|
|
|
runtime.KeepAlive(ret2.h)
|
|
|
|
})
|
|
|
|
return ret1
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAccessibleWidget) Parent() *QAccessibleInterface {
|
|
|
|
ret := C.QAccessibleWidget_Parent(this.h)
|
|
|
|
return newQAccessibleInterface_U(unsafe.Pointer(ret))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAccessibleWidget) Child(index int) *QAccessibleInterface {
|
|
|
|
ret := C.QAccessibleWidget_Child(this.h, (C.int)(index))
|
|
|
|
return newQAccessibleInterface_U(unsafe.Pointer(ret))
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAccessibleWidget) Text(t QAccessible__Text) string {
|
2024-08-29 07:01:51 +00:00
|
|
|
var _out *C.char = nil
|
|
|
|
var _out_Strlen C.int = 0
|
|
|
|
C.QAccessibleWidget_Text(this.h, (C.uintptr_t)(t), &_out, &_out_Strlen)
|
|
|
|
ret := C.GoStringN(_out, _out_Strlen)
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
2024-09-04 06:54:22 +00:00
|
|
|
func (this *QAccessibleWidget) Role() QAccessible__Role {
|
2024-08-29 07:01:51 +00:00
|
|
|
ret := C.QAccessibleWidget_Role(this.h)
|
2024-09-04 06:54:22 +00:00
|
|
|
return (QAccessible__Role)(ret)
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAccessibleWidget) State() *QAccessible__State {
|
|
|
|
ret := C.QAccessibleWidget_State(this.h)
|
|
|
|
// Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
ret1 := newQAccessible__State(ret)
|
|
|
|
runtime.SetFinalizer(ret1, func(ret2 *QAccessible__State) {
|
|
|
|
ret2.Delete()
|
|
|
|
runtime.KeepAlive(ret2.h)
|
|
|
|
})
|
|
|
|
return ret1
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
func (this *QAccessibleWidget) ForegroundColor() *QColor {
|
|
|
|
ret := C.QAccessibleWidget_ForegroundColor(this.h)
|
|
|
|
// Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
ret1 := newQColor(ret)
|
|
|
|
runtime.SetFinalizer(ret1, func(ret2 *QColor) {
|
|
|
|
ret2.Delete()
|
|
|
|
runtime.KeepAlive(ret2.h)
|
|
|
|
})
|
|
|
|
return ret1
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAccessibleWidget) BackgroundColor() *QColor {
|
|
|
|
ret := C.QAccessibleWidget_BackgroundColor(this.h)
|
|
|
|
// Qt uses pass-by-value semantics for this type. Mimic with finalizer
|
|
|
|
ret1 := newQColor(ret)
|
|
|
|
runtime.SetFinalizer(ret1, func(ret2 *QColor) {
|
|
|
|
ret2.Delete()
|
|
|
|
runtime.KeepAlive(ret2.h)
|
|
|
|
})
|
|
|
|
return ret1
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAccessibleWidget) ActionNames() []string {
|
|
|
|
var _out **C.char = nil
|
|
|
|
var _out_Lengths *C.int = nil
|
|
|
|
var _out_len C.size_t = 0
|
|
|
|
C.QAccessibleWidget_ActionNames(this.h, &_out, &_out_Lengths, &_out_len)
|
|
|
|
ret := make([]string, int(_out_len))
|
|
|
|
_outCast := (*[0xffff]*C.char)(unsafe.Pointer(_out)) // hey ya
|
|
|
|
_out_LengthsCast := (*[0xffff]C.int)(unsafe.Pointer(_out_Lengths))
|
|
|
|
for i := 0; i < int(_out_len); i++ {
|
|
|
|
ret[i] = C.GoStringN(_outCast[i], _out_LengthsCast[i])
|
|
|
|
}
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAccessibleWidget) DoAction(actionName string) {
|
|
|
|
actionName_Cstring := C.CString(actionName)
|
|
|
|
defer C.free(unsafe.Pointer(actionName_Cstring))
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QAccessibleWidget_DoAction(this.h, actionName_Cstring, C.size_t(len(actionName)))
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QAccessibleWidget) KeyBindingsForAction(actionName string) []string {
|
|
|
|
actionName_Cstring := C.CString(actionName)
|
|
|
|
defer C.free(unsafe.Pointer(actionName_Cstring))
|
|
|
|
var _out **C.char = nil
|
|
|
|
var _out_Lengths *C.int = nil
|
|
|
|
var _out_len C.size_t = 0
|
2024-09-01 06:50:42 +00:00
|
|
|
C.QAccessibleWidget_KeyBindingsForAction(this.h, actionName_Cstring, C.size_t(len(actionName)), &_out, &_out_Lengths, &_out_len)
|
2024-08-25 04:08:24 +00:00
|
|
|
ret := make([]string, int(_out_len))
|
|
|
|
_outCast := (*[0xffff]*C.char)(unsafe.Pointer(_out)) // hey ya
|
|
|
|
_out_LengthsCast := (*[0xffff]C.int)(unsafe.Pointer(_out_Lengths))
|
|
|
|
for i := 0; i < int(_out_len); i++ {
|
|
|
|
ret[i] = C.GoStringN(_outCast[i], _out_LengthsCast[i])
|
|
|
|
}
|
|
|
|
C.free(unsafe.Pointer(_out))
|
|
|
|
return ret
|
|
|
|
}
|