Fcitx
|
Public Member Functions | |
virtual std::vector< InputMethodEntry > | listInputMethods () |
List the input methods provided by this engine. More... | |
virtual void | keyEvent (const InputMethodEntry &entry, KeyEvent &keyEvent)=0 |
Main function where the input method handles a key event. More... | |
virtual void | activate (const InputMethodEntry &entry, InputContextEvent &event) |
Called when the input context is switched to this input method. More... | |
virtual void | deactivate (const InputMethodEntry &entry, InputContextEvent &event) |
Called when input context switch its input method. More... | |
virtual void | reset (const InputMethodEntry &entry, InputContextEvent &event) |
Being called when the input context need to reset it state. More... | |
virtual void | filterKey (const InputMethodEntry &entry, KeyEvent &event) |
If a key event is not handled by all other handler, it will be passed to this function. More... | |
virtual FCITXCORE_DEPRECATED void | updateSurroundingText (const InputMethodEntry &) |
virtual std::string | subMode (const InputMethodEntry &entry, InputContext &inputContext) |
Return a localized name for the sub mode of input method. More... | |
virtual std::string | overrideIcon (const InputMethodEntry &) |
Return an alternative icon for entry. More... | |
virtual const Configuration * | getConfigForInputMethod (const InputMethodEntry &entry) const |
Return the configuration for this input method entry. More... | |
virtual void | setConfigForInputMethod (const InputMethodEntry &entry, const RawConfig &config) |
Update the configuration for this input method entry. More... | |
std::string | subModeIcon (const InputMethodEntry &entry, InputContext &ic) |
Return the icon name for the sub mode. More... | |
std::string | subModeLabel (const InputMethodEntry &entry, InputContext &ic) |
Return the label for the sub mode. More... | |
void | invokeAction (const InputMethodEntry &entry, InvokeActionEvent &event) |
Process InvokeActionEvent. More... | |
void | virtualKeyboardEvent (const InputMethodEntry &entry, VirtualKeyboardEvent &VirtualKeyboardEvent) |
Process virtual keyboard event. More... | |
Public Member Functions inherited from fcitx::AddonInstance | |
virtual void | reloadConfig () |
Reload configuration from disk. | |
virtual void | save () |
Save any relevant data. Usually, it will be invoked when fcitx exits. | |
virtual const Configuration * | getConfig () const |
Get the configuration. | |
virtual void | setConfig (const RawConfig &) |
Set configuration from Raw Config. | |
virtual const Configuration * | getSubConfig (const std::string &) const |
virtual void | setSubConfig (const std::string &, const RawConfig &) |
template<typename Signature , typename... Args> | |
std::function< Signature >::result_type | callWithSignature (const std::string &name, Args &&...args) |
template<typename MetaSignatureString , typename... Args> | |
AddonFunctionSignatureReturnType< MetaSignatureString > | callWithMetaString (Args &&...args) |
template<typename MetaType , typename... Args> | |
AddonFunctionSignatureReturnType< typename MetaType::Name > | call (Args &&...args) |
Call an exported function for this addon. | |
void | registerCallback (const std::string &name, AddonFunctionAdaptorBase *adaptor) |
const AddonInfo * | addonInfo () const |
bool | canRestart () const |
Check if this addon can safely restart. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from fcitx::AddonInstance | |
void | setCanRestart (bool canRestart) |
Set if this addon can safely restart. More... | |
Definition at line 17 of file inputmethodengine.h.
|
inlinevirtual |
Called when the input context is switched to this input method.
entry | input method entry |
event | event |
Definition at line 43 of file inputmethodengine.h.
|
inlinevirtual |
Called when input context switch its input method.
By default it will call reset.
entry | input method entry |
event | event |
Definition at line 57 of file inputmethodengine.h.
|
inlinevirtual |
If a key event is not handled by all other handler, it will be passed to this function.
This is useful for input method to block all the keys that it doesn't want to handle.
entry | input method entry |
event | key event |
Definition at line 85 of file inputmethodengine.h.
|
inlinevirtual |
Return the configuration for this input method entry.
The entry need to have Configurable=True By default it will return the addon's config.
entry | input method entry |
Definition at line 127 of file inputmethodengine.h.
void fcitx::InputMethodEngine::invokeAction | ( | const InputMethodEntry & | entry, |
InvokeActionEvent & | event | ||
) |
Process InvokeActionEvent.
entry | input method entry |
event | Invoke action event |
Definition at line 56 of file inputmethodengine.cpp.
|
pure virtual |
Main function where the input method handles a key event.
entry | input method entry |
event | key event |
|
inlinevirtual |
List the input methods provided by this engine.
If OnDemand=True, the input method will be provided by configuration file instead. Additional input method may be provided by configuration file.
Definition at line 27 of file inputmethodengine.h.
|
inlinevirtual |
Return an alternative icon for entry.
entry | input method entry |
Definition at line 115 of file inputmethodengine.h.
|
inlinevirtual |
Being called when the input context need to reset it state.
reset will only be called if ic is focused
entry | input method entry |
event | event |
Definition at line 69 of file inputmethodengine.h.
|
inlinevirtual |
Update the configuration for this input method entry.
The entry need to have Configurable=True By default it will set the addon's config.
entry | input method entry |
Definition at line 140 of file inputmethodengine.h.
|
inlinevirtual |
Return a localized name for the sub mode of input method.
entry | input method entry |
inputContext | input context |
Definition at line 100 of file inputmethodengine.h.
std::string fcitx::InputMethodEngine::subModeIcon | ( | const InputMethodEntry & | entry, |
InputContext & | ic | ||
) |
Return the icon name for the sub mode.
Prefer subclass this method from InputMethodEngineV2 over overrideIcon.
entry | input method entry |
ic | input context |
Definition at line 14 of file inputmethodengine.cpp.
std::string fcitx::InputMethodEngine::subModeLabel | ( | const InputMethodEntry & | entry, |
InputContext & | ic | ||
) |
Return the label for the sub mode.
entry | input method entry |
ic | input context |
Definition at line 22 of file inputmethodengine.cpp.
void fcitx::InputMethodEngine::virtualKeyboardEvent | ( | const InputMethodEntry & | entry, |
VirtualKeyboardEvent & | VirtualKeyboardEvent | ||
) |
Process virtual keyboard event.
entry | input method entry |
event | virtual keyboard event |
Definition at line 30 of file inputmethodengine.cpp.