cutego/gui/qinputmethod.go

326 lines
8.7 KiB
Go
Raw Normal View History

2015-10-24 18:18:24 +03:00
package gui
//#include "gui.h"
2015-10-24 18:18:24 +03:00
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)
for len(n.ObjectName()) < len("QInputMethod_") {
n.SetObjectName("QInputMethod_" + qt.Identifier())
2015-10-24 18:18:24 +03:00
}
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 {
defer qt.Recovering("QInputMethod::inputDirection")
2015-10-24 18:18:24 +03:00
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 {
defer qt.Recovering("QInputMethod::isAnimating")
2015-10-24 18:18:24 +03:00
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 {
defer qt.Recovering("QInputMethod::isVisible")
2015-10-24 18:18:24 +03:00
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()) {
defer qt.Recovering("connect QInputMethod::animatingChanged")
2015-10-24 18:18:24 +03:00
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() {
defer qt.Recovering("disconnect QInputMethod::animatingChanged")
2015-10-24 18:18:24 +03:00
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) {
defer qt.Recovering("callback QInputMethod::animatingChanged")
var signal = qt.GetSignal(C.GoString(ptrName), "animatingChanged")
if signal != nil {
signal.(func())()
}
2015-10-24 18:18:24 +03:00
}
func (ptr *QInputMethod) Commit() {
defer qt.Recovering("QInputMethod::commit")
2015-10-24 18:18:24 +03:00
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()) {
defer qt.Recovering("connect QInputMethod::cursorRectangleChanged")
2015-10-24 18:18:24 +03:00
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() {
defer qt.Recovering("disconnect QInputMethod::cursorRectangleChanged")
2015-10-24 18:18:24 +03:00
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) {
defer qt.Recovering("callback QInputMethod::cursorRectangleChanged")
var signal = qt.GetSignal(C.GoString(ptrName), "cursorRectangleChanged")
if signal != nil {
signal.(func())()
}
2015-10-24 18:18:24 +03:00
}
func (ptr *QInputMethod) Hide() {
defer qt.Recovering("QInputMethod::hide")
2015-10-24 18:18:24 +03:00
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)) {
defer qt.Recovering("connect QInputMethod::inputDirectionChanged")
2015-10-24 18:18:24 +03:00
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() {
defer qt.Recovering("disconnect QInputMethod::inputDirectionChanged")
2015-10-24 18:18:24 +03:00
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) {
defer qt.Recovering("callback QInputMethod::inputDirectionChanged")
var signal = qt.GetSignal(C.GoString(ptrName), "inputDirectionChanged")
if signal != nil {
signal.(func(core.Qt__LayoutDirection))(core.Qt__LayoutDirection(newDirection))
}
2015-10-24 18:18:24 +03:00
}
func (ptr *QInputMethod) InvokeAction(a QInputMethod__Action, cursorPosition int) {
defer qt.Recovering("QInputMethod::invokeAction")
2015-10-24 18:18:24 +03:00
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()) {
defer qt.Recovering("connect QInputMethod::keyboardRectangleChanged")
2015-10-24 18:18:24 +03:00
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() {
defer qt.Recovering("disconnect QInputMethod::keyboardRectangleChanged")
2015-10-24 18:18:24 +03:00
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) {
defer qt.Recovering("callback QInputMethod::keyboardRectangleChanged")
var signal = qt.GetSignal(C.GoString(ptrName), "keyboardRectangleChanged")
if signal != nil {
signal.(func())()
}
2015-10-24 18:18:24 +03:00
}
func (ptr *QInputMethod) ConnectLocaleChanged(f func()) {
defer qt.Recovering("connect QInputMethod::localeChanged")
2015-10-24 18:18:24 +03:00
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() {
defer qt.Recovering("disconnect QInputMethod::localeChanged")
2015-10-24 18:18:24 +03:00
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) {
defer qt.Recovering("callback QInputMethod::localeChanged")
var signal = qt.GetSignal(C.GoString(ptrName), "localeChanged")
if signal != nil {
signal.(func())()
}
2015-10-24 18:18:24 +03:00
}
2015-11-09 20:23:42 +03:00
func QInputMethod_QueryFocusObject(query core.Qt__InputMethodQuery, argument core.QVariant_ITF) *core.QVariant {
defer qt.Recovering("QInputMethod::queryFocusObject")
2015-11-09 20:23:42 +03:00
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() {
defer qt.Recovering("QInputMethod::reset")
2015-10-24 18:18:24 +03:00
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) {
defer qt.Recovering("QInputMethod::setInputItemRectangle")
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) {
defer qt.Recovering("QInputMethod::setInputItemTransform")
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) {
defer qt.Recovering("QInputMethod::setVisible")
2015-10-24 18:18:24 +03:00
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() {
defer qt.Recovering("QInputMethod::show")
2015-10-24 18:18:24 +03:00
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) {
defer qt.Recovering("QInputMethod::update")
2015-10-24 18:18:24 +03:00
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()) {
defer qt.Recovering("connect QInputMethod::visibleChanged")
2015-10-24 18:18:24 +03:00
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() {
defer qt.Recovering("disconnect QInputMethod::visibleChanged")
2015-10-24 18:18:24 +03:00
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) {
defer qt.Recovering("callback QInputMethod::visibleChanged")
var signal = qt.GetSignal(C.GoString(ptrName), "visibleChanged")
if signal != nil {
signal.(func())()
}
2015-10-24 18:18:24 +03:00
}