Fcitx
|
An input context represents a client of Fcitx. More...
#include <fcitx/inputcontext.h>
Public Member Functions | |
InputContext (InputContextManager &manager, const std::string &program={}) | |
InputContext (InputContext &&other)=delete | |
virtual const char * | frontend () const =0 |
Returns the underlying implementation of Input Context. | |
std::string_view | frontendName () const |
Return the frontend name. More... | |
const ICUUID & | uuid () const |
Returns the uuid of this input context. | |
const std::string & | program () const |
Returns the program name of input context. More... | |
std::string | display () const |
Returns the display server of the client. More... | |
const Rect & | cursorRect () const |
Returns the cursor position of the client. | |
double | scaleFactor () const |
Return the client scale factor. | |
void | focusIn () |
Called When input context gains the input focus. | |
void | focusOut () |
Called when input context losts the input focus. | |
void | setFocusGroup (FocusGroup *group) |
Set the focus group of this input context. More... | |
FocusGroup * | focusGroup () const |
Returns the current focus group of input context. | |
FCITXCORE_DEPRECATED void | reset (ResetReason reason) |
Called when input context state need to be reset. | |
void | reset () |
Called when input context state need to be reset. More... | |
void | setCapabilityFlags (CapabilityFlags flags) |
Update the capability flags of the input context. More... | |
CapabilityFlags | capabilityFlags () const |
Returns the current capability flags. More... | |
void | setEnablePreedit (bool enable) |
Override the preedit hint from client. | |
bool | isPreeditEnabled () const |
Check if preedit is manually disabled. | |
void | setCursorRect (Rect rect) |
Update the current cursor rect of the input context. | |
void | setCursorRect (Rect rect, double scale) |
Update the client rect with scale factor. | |
bool | keyEvent (KeyEvent &event) |
Send a key event to current input context. | |
bool | hasFocus () const |
Returns whether the input context holds the input focus. More... | |
void | invokeAction (InvokeActionEvent &event) |
Invoke an action on the preedit. | |
SurroundingText & | surroundingText () |
Returns the mutable surrounding text of the input context. More... | |
const SurroundingText & | surroundingText () const |
Returns the immutable surrounding text of the input context. | |
void | updateSurroundingText () |
Notifies the surrounding text modification from the client. | |
void | commitString (const std::string &text) |
Commit a string to the client. | |
void | deleteSurroundingText (int offset, unsigned int size) |
Ask client to delete a range of surrounding text. | |
void | forwardKey (const Key &rawKey, bool isRelease=false, int time=0) |
Send a key event to client. | |
void | updatePreedit () |
Notifies client about changes in clientPreedit. More... | |
void | updateUserInterface (UserInterfaceComponent component, bool immediate=false) |
Notifies UI about changes in user interface. More... | |
void | setBlockEventToClient (bool block) |
Prevent event deliver to input context, and re-send the event later. More... | |
bool | hasPendingEvents () const |
bool | hasPendingEventsStrictOrder () const |
Has pending event that need to use key order fix. More... | |
InputContextProperty * | property (const std::string &name) |
Returns the input context property by name. | |
InputContextProperty * | property (const InputContextPropertyFactory *factory) |
Returns the input context property by factory. | |
InputPanel & | inputPanel () |
Returns the associated input panel. | |
const InputPanel & | inputPanel () const |
Returns the associated input panel. More... | |
StatusArea & | statusArea () |
Returns the associated StatusArea. | |
const StatusArea & | statusArea () const |
Returns the associated StatusArea. More... | |
template<typename T > | |
T * | propertyAs (const std::string &name) |
Helper function to return the input context property in specific type. More... | |
template<typename T > | |
T::PropertyType * | propertyFor (const T *factory) |
Helper function to return the input context property in specific type by given factory. More... | |
void | updateProperty (const std::string &name) |
Notifies the change of a given input context property. More... | |
void | updateProperty (const InputContextPropertyFactory *factory) |
Notifies the change of a given input context property by its factory. More... | |
![]() | |
TrackableObject (const TrackableObject &)=delete | |
TrackableObjectReference< InputContext > | watch () |
TrackableObjectReference< const InputContext > | watch () const |
Protected Member Functions | |
virtual void | commitStringImpl (const std::string &text)=0 |
Send the committed string to client. More... | |
virtual void | deleteSurroundingTextImpl (int offset, unsigned int size)=0 |
Send the delete Surrounding Text request to client. More... | |
virtual void | forwardKeyImpl (const ForwardKeyEvent &key)=0 |
Send the forwarded key to client. More... | |
virtual void | updatePreeditImpl ()=0 |
Send the preedit update to the client. More... | |
virtual void | updateClientSideUIImpl () |
Send the UI update to client. More... | |
void | destroy () |
Notifies the destruction of the input context. More... | |
void | created () |
Notifies the creation of input context. More... | |
Friends | |
class | InputContextManagerPrivate |
class | FocusGroup |
class | UserInterfaceManager |
class | UserInterfaceManagerPrivate |
An input context represents a client of Fcitx.
It can be a Window, or a text field depending on the application.
Definition at line 49 of file inputcontext.h.