Fcitx
Public Member Functions | Friends | List of all members
fcitx::InputContextManager Class Reference

Public Member Functions

InputContextfindByUUID (ICUUID uuid)
 Find the input context by UUID. More...
 
void setPropertyPropagatePolicy (PropertyPropagatePolicy policy)
 Set the property propgate policy. More...
 
Instanceinstance ()
 
bool registerProperty (const std::string &name, InputContextPropertyFactory *factory)
 Register a named property for input context. More...
 
bool foreach (const InputContextVisitor &visitor)
 
bool foreachFocused (const InputContextVisitor &visitor)
 
bool foreachGroup (const FocusGroupVisitor &visitor)
 
InputContextlastFocusedInputContext ()
 Get the last focused input context. More...
 
InputContextmostRecentInputContext ()
 Get the last used input context. More...
 
InputContextdummyInputContext () const
 Return a dummy input context registered with this input method manager. More...
 
void setPreeditEnabledByDefault (bool enable)
 
bool isPreeditEnabledByDefault () const
 

Friends

class InputContext
 
class FocusGroup
 
class Instance
 
class InputContextPropertyFactory
 

Detailed Description

Definition at line 27 of file inputcontextmanager.h.

Member Function Documentation

◆ dummyInputContext()

InputContext * fcitx::InputContextManager::dummyInputContext ( ) const

Return a dummy input context registered with this input method manager.

The value is useful for a place holder in certain cases, e.g. get some value from action.

Returns
fcitx::InputContext*
Since
5.0.24

Definition at line 458 of file inputcontextmanager.cpp.

◆ findByUUID()

InputContext * fcitx::InputContextManager::findByUUID ( ICUUID  uuid)

Find the input context by UUID.

This is useful when you want to pass a token from another process to identify the input context.

Parameters
uuidUUID of input context.
Returns
pointer to input context or null if nothing is found.
See also
InputContext::uuid

Definition at line 246 of file inputcontextmanager.cpp.

◆ lastFocusedInputContext()

InputContext * fcitx::InputContextManager::lastFocusedInputContext ( )

Get the last focused input context.

This is useful for certain UI to get the most recently used input context.

Returns
pointer of the last focused input context or null if there is no focus.

Definition at line 438 of file inputcontextmanager.cpp.

◆ mostRecentInputContext()

InputContext * fcitx::InputContextManager::mostRecentInputContext ( )

Get the last used input context.

This is useful for certain UI to get the most recently used input context.

Certain UI implementation may cause focus out in the application, this is a way for them to get the input context being used.

When PropertyPropagatePolicy is All, if there is no other recently focused input context it will return a dummy input context. It is useful to use this dummy IC to propagate data to other input context, e.g. change current input method.

Returns
fcitx::InputContext*

Definition at line 444 of file inputcontextmanager.cpp.

◆ registerProperty()

bool fcitx::InputContextManager::registerProperty ( const std::string &  name,
InputContextPropertyFactory factory 
)

Register a named property for input context.

This is used to store the per-input context state.

Parameters
nameunique name of input context.
factoryfactory
Returns
registration successful or not.

Definition at line 282 of file inputcontextmanager.cpp.

◆ setPropertyPropagatePolicy()

void fcitx::InputContextManager::setPropertyPropagatePolicy ( PropertyPropagatePolicy  policy)

Set the property propgate policy.

The policy can be either All, Program or No, to define whether a certain state need to be copied to another input context.

Parameters
policypolicy
See also
GlobalConfig::shareInputState

Definition at line 293 of file inputcontextmanager.cpp.


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