KWaylandServer::TextInputV2Interface

Search for usage in LXR

KWaylandServer::TextInputV2Interface Class Reference

#include <textinput_v2_interface.h>

Inheritance diagram for KWaylandServer::TextInputV2Interface:

Public Types

enum  UpdateReason : uint32_t { StateChange = 0, StateFull = 1, StateReset = 2, StateEnter = 3 }
 

Signals

void contentTypeChanged ()
 
void cursorRectangleChanged (const QRect &rect)
 
void enabledChanged ()
 
void preferredLanguageChanged (const QString &language)
 
void requestHideInputPanel ()
 
void requestShowInputPanel ()
 
void stateUpdated (uint32_t serial, UpdateReason reason)
 
void surroundingTextChanged ()
 

Public Member Functions

void commitString (const QString &text)
 
TextInputContentHints contentHints () const
 
TextInputContentPurpose contentPurpose () const
 
QRect cursorRectangle () const
 
void deleteSurroundingText (quint32 beforeLength, quint32 afterLength)
 
bool isEnabled () const
 
void keysymPressed (quint32 keysym, quint32 modifiers=0)
 
void keysymReleased (quint32 keysym, quint32 modifiers=0)
 
void preEdit (const QString &text, const QString &commitText)
 
QString preferredLanguage () const
 
 Q_ENUM (UpdateReason)
 
void setCursorPosition (qint32 index, qint32 anchor)
 
void setInputPanelState (bool visible, const QRect &overlappedSurfaceArea)
 
void setLanguage (const QString &languageTag)
 
void setModifiersMap (const QByteArray &modifiersMap)
 
void setPreEditCursor (qint32 index)
 
void setTextDirection (Qt::LayoutDirection direction)
 
QPointer< SurfaceInterfacesurface () const
 
QString surroundingText () const
 
qint32 surroundingTextCursorPosition () const
 
qint32 surroundingTextSelectionAnchor () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- Properties inherited from QObject
 objectName
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Detailed Description

Represents a generic Resource for a text input object.

This class does not directly correspond to a Wayland resource, but is a generic contract for any interface which implements a text input, e.g. the unstable wl_text_input interface.

It does not expose the actual interface to cover up the fact that the interface is unstable and might change. If one needs to know the actual used protocol, use the method interfaceVersion.

A TextInputV2Interface gets created by the TextInputManagerV2Interface. The individual instances are not exposed directly. The SeatInterface provides access to the currently active TextInputV2Interface. This is evaluated automatically based on which SurfaceInterface has keyboard focus.

See also
TextInputManagerV2Interface
SeatInterface

Definition at line 60 of file textinput_v2_interface.h.

Member Function Documentation

void KWaylandServer::TextInputV2Interface::commitString ( const QString text)

Notify when text should be inserted into the editor widget.

The text to commit could be either just a single character after a key press or the result of some composing (preEdit). It could be also an empty text when some text should be removed (see deleteSurroundingText) or when the input cursor should be moved (see cursorPosition).

Any previously set composing text should be removed.

Parameters
textThe utf8-encoded text to be inserted into the editor widget
See also
preEdit
deleteSurroundingText

Definition at line 447 of file textinput_v2_interface.cpp.

TextInputContentHints KWaylandServer::TextInputV2Interface::contentHints ( ) const
See also
contentTypeChanged

Definition at line 417 of file textinput_v2_interface.cpp.

TextInputContentPurpose KWaylandServer::TextInputV2Interface::contentPurpose ( ) const
See also
contentTypeChanged

Definition at line 422 of file textinput_v2_interface.cpp.

void KWaylandServer::TextInputV2Interface::contentTypeChanged ( )
signal

Emitted when the contentPurpose and/or contentHints changes.

See also
contentPurpose
contentHints
QRect KWaylandServer::TextInputV2Interface::cursorRectangle ( ) const
See also
cursorRectangleChanged

Definition at line 518 of file textinput_v2_interface.cpp.

void KWaylandServer::TextInputV2Interface::cursorRectangleChanged ( const QRect rect)
signal
See also
cursorRectangle
void KWaylandServer::TextInputV2Interface::deleteSurroundingText ( quint32  beforeLength,
quint32  afterLength 
)

Notify when the text around the current cursor position should be deleted.

The Client processes this event together with the commit string

Parameters
beforeLengthlength of text before current cursor position.
afterLengthlength of text after current cursor position.
See also
commit

Definition at line 462 of file textinput_v2_interface.cpp.

void KWaylandServer::TextInputV2Interface::enabledChanged ( )
signal

Emitted whenever this TextInputV2Interface gets enabled or disabled for a SurfaceInterface.

See also
isEnabled
surface
bool KWaylandServer::TextInputV2Interface::isEnabled ( ) const
Returns
Whether the TextInputV2Interface is currently enabled for a SurfaceInterface.
See also
surface
enabledChanged

Definition at line 523 of file textinput_v2_interface.cpp.

void KWaylandServer::TextInputV2Interface::preEdit ( const QString text,
const QString commitText 
)

Notify when a new composing text (pre-edit) should be set around the current cursor position.

Any previously set composing text should be removed.

The commitText can be used to replace the preedit text on reset (for example on unfocus).

Parameters
textThe new utf8-encoded pre-edit text
commitTextUtf8-encoded text to replace preedit text on reset
See also
commit
preEditCursor

Definition at line 442 of file textinput_v2_interface.cpp.

QString KWaylandServer::TextInputV2Interface::preferredLanguage ( ) const

The preferred language as a RFC-3066 format language tag.

This can be used by the server to show a language specific virtual keyboard layout.

See also
preferredLanguageChanged

Definition at line 412 of file textinput_v2_interface.cpp.

void KWaylandServer::TextInputV2Interface::preferredLanguageChanged ( const QString language)
signal

Emitted whenever the preferred language changes.

See also
preferredLanguage
void KWaylandServer::TextInputV2Interface::requestHideInputPanel ( )
signal

Requests input panels (virtual keyboard) to hide.

See also
requestShowInputPanel
void KWaylandServer::TextInputV2Interface::requestShowInputPanel ( )
signal

Requests input panels (virtual keyboard) to show.

See also
requestHideInputPanel
void KWaylandServer::TextInputV2Interface::setCursorPosition ( qint32  index,
qint32  anchor 
)

Notify when the cursor index or anchor position should be modified.

The Client applies this together with the commit string.

Definition at line 467 of file textinput_v2_interface.cpp.

void KWaylandServer::TextInputV2Interface::setInputPanelState ( bool  visible,
const QRect overlappedSurfaceArea 
)

Informs the client about changes in the visibility of the input panel (virtual keyboard).

The overlappedSurfaceArea defines the area overlapped by the input panel (virtual keyboard) on the SurfaceInterface having the text focus in surface local coordinates.

Parameters
visibleWhether the input panel is currently visible
overlappedSurfaceAreaThe overlapping area in surface local coordinates

Definition at line 482 of file textinput_v2_interface.cpp.

void KWaylandServer::TextInputV2Interface::setLanguage ( const QString languageTag)

Sets the language of the input text.

The languageTag is a RFC-3066 format language tag.

Definition at line 493 of file textinput_v2_interface.cpp.

void KWaylandServer::TextInputV2Interface::setModifiersMap ( const QByteArray modifiersMap)

Sets the modifiers map to use when modifiers are included in a key event.

Definition at line 503 of file textinput_v2_interface.cpp.

void KWaylandServer::TextInputV2Interface::setPreEditCursor ( qint32  index)

Sets the cursor position inside the composing text (as byte offset) relative to the start of the composing text.

When index is a negative number no cursor is shown.

The Client applies the index together with preEdit.

Parameters
indexThe cursor position relative to the start of the composing text
See also
preEdit

Definition at line 477 of file textinput_v2_interface.cpp.

void KWaylandServer::TextInputV2Interface::setTextDirection ( Qt::LayoutDirection  direction)

Sets the text direction of input text.

Definition at line 472 of file textinput_v2_interface.cpp.

void KWaylandServer::TextInputV2Interface::stateUpdated ( uint32_t  serial,
UpdateReason  reason 
)
signal

Emitted whenever TextInputInterface should update the current state.

QPointer< SurfaceInterface > KWaylandServer::TextInputV2Interface::surface ( ) const
Returns
The surface the TextInputV2Interface is enabled on
See also
isEnabled
enabledChanged

Definition at line 513 of file textinput_v2_interface.cpp.

QString KWaylandServer::TextInputV2Interface::surroundingText ( ) const
Returns
The plain surrounding text around the input position.
See also
surroundingTextChanged
surroundingTextCursorPosition
surroundingTextSelectionAnchor

Definition at line 427 of file textinput_v2_interface.cpp.

void KWaylandServer::TextInputV2Interface::surroundingTextChanged ( )
signal
qint32 KWaylandServer::TextInputV2Interface::surroundingTextCursorPosition ( ) const
Returns
The byte offset of current cursor position within the surroundingText
See also
surroundingText
surroundingTextChanged

Definition at line 432 of file textinput_v2_interface.cpp.

qint32 KWaylandServer::TextInputV2Interface::surroundingTextSelectionAnchor ( ) const

The byte offset of the selection anchor within the surroundingText.

If there is no selected text this is the same as cursor.

Returns
The byte offset of the selection anchor
See also
surroundingText
surroundingTextChanged

Definition at line 437 of file textinput_v2_interface.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Oct 19 2021 23:10:30 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.