KWin
Loading...
Searching...
No Matches
Signals | Public Member Functions | Friends | List of all members
KWin::TextInputV3Interface Class Reference

Represents a generic Resource for a text input object.

More...

#include <textinput_v3.h>

Inheritance diagram for KWin::TextInputV3Interface:

Signals

void cursorRectangleChanged (const QRect &rect)
 
void contentTypeChanged ()
 
void surroundingTextChanged ()
 
void enabledChanged ()
 
void stateCommitted (quint32 serial)
 
void enableRequested ()
 

Public Member Functions

 ~TextInputV3Interface () override
 
QRect cursorRectangle () const
 
TextInputContentPurpose contentPurpose () const
 
TextInputContentHints contentHints () const
 
QString surroundingText () const
 
qint32 surroundingTextCursorPosition () const
 
qint32 surroundingTextSelectionAnchor () const
 
QPointer< SurfaceInterfacesurface () const
 
bool isEnabled () const
 
void deleteSurroundingText (quint32 beforeLength, quint32 afterLength)
 
void sendPreEditString (const QString &text, quint32 cursorBegin, quint32 cursorEnd)
 
void commitString (const QString &text)
 
void done ()
 
bool clientSupportsTextInput (ClientConnection *client) const
 

Friends

class TextInputManagerV3InterfacePrivate
 
class SeatInterface
 
class SeatInterfacePrivate
 
class TextInputV3InterfacePrivate
 

Detailed Description

Represents a generic Resource for a text input object.

See also
TextInputManagerV3Interface
SeatInterface

Definition at line 54 of file textinput_v3.h.

Constructor & Destructor Documentation

◆ ~TextInputV3Interface()

KWin::TextInputV3Interface::~TextInputV3Interface ( )
overridedefault

Member Function Documentation

◆ clientSupportsTextInput()

bool KWin::TextInputV3Interface::clientSupportsTextInput ( ClientConnection * client) const
Returns
whether client supports text-input-v3

Definition at line 489 of file textinput_v3.cpp.

◆ commitString()

void KWin::TextInputV3Interface::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 456 of file textinput_v3.cpp.

◆ contentHints()

TextInputContentHints KWin::TextInputV3Interface::contentHints ( ) const
See also
contentTypeChanged

Definition at line 421 of file textinput_v3.cpp.

◆ contentPurpose()

TextInputContentPurpose KWin::TextInputV3Interface::contentPurpose ( ) const
See also
contentTypeChanged

Definition at line 426 of file textinput_v3.cpp.

◆ contentTypeChanged

void KWin::TextInputV3Interface::contentTypeChanged ( )
signal

Emitted when the contentPurpose and/or contentHints changes.

See also
contentPurpose
contentHints

◆ cursorRectangle()

QRect KWin::TextInputV3Interface::cursorRectangle ( ) const
See also
cursorRectangleChanged

Definition at line 479 of file textinput_v3.cpp.

◆ cursorRectangleChanged

void KWin::TextInputV3Interface::cursorRectangleChanged ( const QRect & rect)
signal
See also
cursorRectangle

◆ deleteSurroundingText()

void KWin::TextInputV3Interface::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 446 of file textinput_v3.cpp.

◆ done()

void KWin::TextInputV3Interface::done ( )

Notify when changes and state requested by sendPreEditString, commitString and deleteSurroundingText should be applied.

Definition at line 461 of file textinput_v3.cpp.

◆ enabledChanged

void KWin::TextInputV3Interface::enabledChanged ( )
signal

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

See also
isEnabled
surface

◆ enableRequested

void KWin::TextInputV3Interface::enableRequested ( )
signal

Emitted whenever this TextInputV3Interface is already enabled, but received another enable from client.

See also
isEnabled
surface

◆ isEnabled()

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

Definition at line 484 of file textinput_v3.cpp.

◆ sendPreEditString()

void KWin::TextInputV3Interface::sendPreEditString ( const QString & text,
quint32 cursorBegin,
quint32 cursorEnd )

Send preEditString to the client

Parameters
textpre-edit string
cursorBegin
cursorEnd

Definition at line 451 of file textinput_v3.cpp.

◆ stateCommitted

void KWin::TextInputV3Interface::stateCommitted ( quint32 serial)
signal

Emitted when state should be committed

◆ surface()

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

Definition at line 466 of file textinput_v3.cpp.

◆ surroundingText()

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

Definition at line 431 of file textinput_v3.cpp.

◆ surroundingTextChanged

void KWin::TextInputV3Interface::surroundingTextChanged ( )
signal

◆ surroundingTextCursorPosition()

qint32 KWin::TextInputV3Interface::surroundingTextCursorPosition ( ) const
Returns
The byte offset of current cursor position within the surroundingText
See also
surroundingText
surroundingTextChanged

Definition at line 436 of file textinput_v3.cpp.

◆ surroundingTextSelectionAnchor()

qint32 KWin::TextInputV3Interface::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 441 of file textinput_v3.cpp.

Friends And Related Symbol Documentation

◆ SeatInterface

friend class SeatInterface
friend

Definition at line 200 of file textinput_v3.h.

◆ SeatInterfacePrivate

friend class SeatInterfacePrivate
friend

Definition at line 201 of file textinput_v3.h.

◆ TextInputManagerV3InterfacePrivate

Definition at line 199 of file textinput_v3.h.

◆ TextInputV3InterfacePrivate

friend class TextInputV3InterfacePrivate
friend

Definition at line 202 of file textinput_v3.h.


The documentation for this class was generated from the following files: