cutego/gui/qinputmethod.go

240 lines
6.6 KiB
Go
Raw Normal View History

2015-10-24 18:18:24 +03:00
package gui
//#include "qinputmethod.h"
import "C"
import (
"github.com/therecipe/qt"
"github.com/therecipe/qt/core"
"unsafe"
)
type QInputMethod struct {
core.QObject
}
2015-11-09 20:23:42 +03:00
type QInputMethod_ITF interface {
core.QObject_ITF
QInputMethod_PTR() *QInputMethod
2015-10-24 18:18:24 +03:00
}
2015-11-09 20:23:42 +03:00
func PointerFromQInputMethod(ptr QInputMethod_ITF) unsafe.Pointer {
2015-10-24 18:18:24 +03:00
if ptr != nil {
2015-11-09 20:23:42 +03:00
return ptr.QInputMethod_PTR().Pointer()
2015-10-24 18:18:24 +03:00
}
return nil
}
2015-11-09 20:23:42 +03:00
func NewQInputMethodFromPointer(ptr unsafe.Pointer) *QInputMethod {
2015-10-24 18:18:24 +03:00
var n = new(QInputMethod)
n.SetPointer(ptr)
2015-11-19 21:29:30 +03:00
if n.ObjectName() == "" {
2015-10-24 18:18:24 +03:00
n.SetObjectName("QInputMethod_" + qt.RandomIdentifier())
}
return n
}
2015-11-09 20:23:42 +03:00
func (ptr *QInputMethod) QInputMethod_PTR() *QInputMethod {
2015-10-24 18:18:24 +03:00
return ptr
}
//QInputMethod::Action
2015-11-09 20:23:42 +03:00
type QInputMethod__Action int64
2015-10-24 18:18:24 +03:00
2015-11-09 20:23:42 +03:00
const (
2015-10-24 18:18:24 +03:00
QInputMethod__Click = QInputMethod__Action(0)
QInputMethod__ContextMenu = QInputMethod__Action(1)
)
func (ptr *QInputMethod) InputDirection() core.Qt__LayoutDirection {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return core.Qt__LayoutDirection(C.QInputMethod_InputDirection(ptr.Pointer()))
2015-10-24 18:18:24 +03:00
}
return 0
}
func (ptr *QInputMethod) IsAnimating() bool {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return C.QInputMethod_IsAnimating(ptr.Pointer()) != 0
2015-10-24 18:18:24 +03:00
}
return false
}
func (ptr *QInputMethod) IsVisible() bool {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
return C.QInputMethod_IsVisible(ptr.Pointer()) != 0
2015-10-24 18:18:24 +03:00
}
return false
}
func (ptr *QInputMethod) ConnectAnimatingChanged(f func()) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_ConnectAnimatingChanged(ptr.Pointer())
2015-10-24 18:18:24 +03:00
qt.ConnectSignal(ptr.ObjectName(), "animatingChanged", f)
}
}
func (ptr *QInputMethod) DisconnectAnimatingChanged() {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_DisconnectAnimatingChanged(ptr.Pointer())
2015-10-24 18:18:24 +03:00
qt.DisconnectSignal(ptr.ObjectName(), "animatingChanged")
}
}
//export callbackQInputMethodAnimatingChanged
func callbackQInputMethodAnimatingChanged(ptrName *C.char) {
qt.GetSignal(C.GoString(ptrName), "animatingChanged").(func())()
}
func (ptr *QInputMethod) Commit() {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_Commit(ptr.Pointer())
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QInputMethod) ConnectCursorRectangleChanged(f func()) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_ConnectCursorRectangleChanged(ptr.Pointer())
2015-10-24 18:18:24 +03:00
qt.ConnectSignal(ptr.ObjectName(), "cursorRectangleChanged", f)
}
}
func (ptr *QInputMethod) DisconnectCursorRectangleChanged() {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_DisconnectCursorRectangleChanged(ptr.Pointer())
2015-10-24 18:18:24 +03:00
qt.DisconnectSignal(ptr.ObjectName(), "cursorRectangleChanged")
}
}
//export callbackQInputMethodCursorRectangleChanged
func callbackQInputMethodCursorRectangleChanged(ptrName *C.char) {
qt.GetSignal(C.GoString(ptrName), "cursorRectangleChanged").(func())()
}
func (ptr *QInputMethod) Hide() {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_Hide(ptr.Pointer())
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QInputMethod) ConnectInputDirectionChanged(f func(newDirection core.Qt__LayoutDirection)) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_ConnectInputDirectionChanged(ptr.Pointer())
2015-10-24 18:18:24 +03:00
qt.ConnectSignal(ptr.ObjectName(), "inputDirectionChanged", f)
}
}
func (ptr *QInputMethod) DisconnectInputDirectionChanged() {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_DisconnectInputDirectionChanged(ptr.Pointer())
2015-10-24 18:18:24 +03:00
qt.DisconnectSignal(ptr.ObjectName(), "inputDirectionChanged")
}
}
//export callbackQInputMethodInputDirectionChanged
func callbackQInputMethodInputDirectionChanged(ptrName *C.char, newDirection C.int) {
qt.GetSignal(C.GoString(ptrName), "inputDirectionChanged").(func(core.Qt__LayoutDirection))(core.Qt__LayoutDirection(newDirection))
}
func (ptr *QInputMethod) InvokeAction(a QInputMethod__Action, cursorPosition int) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_InvokeAction(ptr.Pointer(), C.int(a), C.int(cursorPosition))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QInputMethod) ConnectKeyboardRectangleChanged(f func()) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_ConnectKeyboardRectangleChanged(ptr.Pointer())
2015-10-24 18:18:24 +03:00
qt.ConnectSignal(ptr.ObjectName(), "keyboardRectangleChanged", f)
}
}
func (ptr *QInputMethod) DisconnectKeyboardRectangleChanged() {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_DisconnectKeyboardRectangleChanged(ptr.Pointer())
2015-10-24 18:18:24 +03:00
qt.DisconnectSignal(ptr.ObjectName(), "keyboardRectangleChanged")
}
}
//export callbackQInputMethodKeyboardRectangleChanged
func callbackQInputMethodKeyboardRectangleChanged(ptrName *C.char) {
qt.GetSignal(C.GoString(ptrName), "keyboardRectangleChanged").(func())()
}
func (ptr *QInputMethod) ConnectLocaleChanged(f func()) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_ConnectLocaleChanged(ptr.Pointer())
2015-10-24 18:18:24 +03:00
qt.ConnectSignal(ptr.ObjectName(), "localeChanged", f)
}
}
func (ptr *QInputMethod) DisconnectLocaleChanged() {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_DisconnectLocaleChanged(ptr.Pointer())
2015-10-24 18:18:24 +03:00
qt.DisconnectSignal(ptr.ObjectName(), "localeChanged")
}
}
//export callbackQInputMethodLocaleChanged
func callbackQInputMethodLocaleChanged(ptrName *C.char) {
qt.GetSignal(C.GoString(ptrName), "localeChanged").(func())()
}
2015-11-09 20:23:42 +03:00
func QInputMethod_QueryFocusObject(query core.Qt__InputMethodQuery, argument core.QVariant_ITF) *core.QVariant {
return core.NewQVariantFromPointer(C.QInputMethod_QInputMethod_QueryFocusObject(C.int(query), core.PointerFromQVariant(argument)))
2015-10-24 18:18:24 +03:00
}
func (ptr *QInputMethod) Reset() {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_Reset(ptr.Pointer())
2015-10-24 18:18:24 +03:00
}
}
2015-11-09 20:23:42 +03:00
func (ptr *QInputMethod) SetInputItemRectangle(rect core.QRectF_ITF) {
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_SetInputItemRectangle(ptr.Pointer(), core.PointerFromQRectF(rect))
2015-10-24 18:18:24 +03:00
}
}
2015-11-09 20:23:42 +03:00
func (ptr *QInputMethod) SetInputItemTransform(transform QTransform_ITF) {
2015-10-24 18:18:24 +03:00
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_SetInputItemTransform(ptr.Pointer(), PointerFromQTransform(transform))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QInputMethod) SetVisible(visible bool) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_SetVisible(ptr.Pointer(), C.int(qt.GoBoolToInt(visible)))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QInputMethod) Show() {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_Show(ptr.Pointer())
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QInputMethod) Update(queries core.Qt__InputMethodQuery) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_Update(ptr.Pointer(), C.int(queries))
2015-10-24 18:18:24 +03:00
}
}
func (ptr *QInputMethod) ConnectVisibleChanged(f func()) {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_ConnectVisibleChanged(ptr.Pointer())
2015-10-24 18:18:24 +03:00
qt.ConnectSignal(ptr.ObjectName(), "visibleChanged", f)
}
}
func (ptr *QInputMethod) DisconnectVisibleChanged() {
if ptr.Pointer() != nil {
2015-11-09 20:23:42 +03:00
C.QInputMethod_DisconnectVisibleChanged(ptr.Pointer())
2015-10-24 18:18:24 +03:00
qt.DisconnectSignal(ptr.ObjectName(), "visibleChanged")
}
}
//export callbackQInputMethodVisibleChanged
func callbackQInputMethodVisibleChanged(ptrName *C.char) {
qt.GetSignal(C.GoString(ptrName), "visibleChanged").(func())()
}