Fcitx
|
![]() |
Files | |
file | addonfactory.h |
Addon Factory class. | |
file | addoninstance.h |
Addon For fcitx. | |
file | addonmanager.h |
Addon Manager class. | |
file | event.h |
Input Method event for Fcitx. | |
file | icontheme.h |
XDG icon specification helper. | |
file | inputcontext.h |
Input Context for Fcitx. | |
file | inputcontextproperty.h |
Input Context Property for Fcitx. | |
file | inputmethodmanager.h |
Input Method Manager For fcitx. | |
file | inputpanel.h |
Class for input panel in UI. | |
file | menu.h |
Class for menu in UI. | |
file | statusarea.h |
Class for status area in UI. | |
file | surroundingtext.h |
Local cache for surrounding text. | |
file | text.h |
Formatted string commonly used in user interface. | |
file | userinterface.h |
Base class for User Interface addon. | |
file | userinterfacemanager.h |
Manager class for user interface. | |
Macros | |
#define | FCITX_ADDON_DECLARE_FUNCTION(NAME, FUNCTION, SIGNATURE...) |
#define | FCITX_ADDON_EXPORT_FUNCTION(CLASS, FUNCTION) |
#define | FCITX_ADDON_FACTORY(ClassName) |
#define | FCITX_ADDON_DEPENDENCY_LOADER(NAME, ADDONMANAGER) |
A convenient macro to obtain the addon pointer of another addon. More... | |
#define | FCITX_DEFINE_SIMPLE_EVENT(NAME, TYPE, ARGS...) |
Typedefs | |
typedef std::array< uint8_t, 16 > | fcitx::ICUUID |
typedef std::function< bool(InputContext *ic)> | fcitx::InputContextVisitor |
typedef T | fcitx::SimpleInputContextPropertyFactory< T >::PropertyType |
typedef Ret | fcitx::LambdaInputContextPropertyFactory< Ret >::PropertyType |
template<typename T > | |
using | fcitx::FactoryFor = LambdaInputContextPropertyFactory< T > |
Convinient short type alias for creating a LambdaInputContextPropertyFactory. More... | |
using | fcitx::CustomInputPanelCallback = std::function< void(InputContext *)> |
Enumerations | |
enum | ResetReason { FCITXCORE_DEPRECATED, FCITXCORE_DEPRECATED, FCITXCORE_DEPRECATED, Client } |
enum | fcitx::InputMethodSwitchedReason { fcitx::InputMethodSwitchedReason::Trigger, fcitx::InputMethodSwitchedReason::Deactivate, fcitx::InputMethodSwitchedReason::AltTrigger, fcitx::InputMethodSwitchedReason::Activate, fcitx::InputMethodSwitchedReason::Enumerate, fcitx::InputMethodSwitchedReason::GroupChange, fcitx::InputMethodSwitchedReason::CapabilityChanged, fcitx::InputMethodSwitchedReason::Other } |
The reason why input method is switched to another. More... | |
enum | InputMethodMode { PhysicalKeyboard, OnScreenKeyboard } |
enum | fcitx::EventType : uint32_t { EventTypeFlag = 0xfffff000, UserTypeFlag = 0xffff0000, InputContextEventFlag = 0x0001000, InputMethodEventFlag = 0x0002000, fcitx::EventType::InstanceEventFlag = 0x0003000, InputContextCreated = InputContextEventFlag | 0x1, InputContextDestroyed = InputContextEventFlag | 0x2, fcitx::EventType::InputContextFocusIn = InputContextEventFlag | 0x3, fcitx::EventType::InputContextFocusOut = InputContextEventFlag | 0x4, fcitx::EventType::InputContextKeyEvent = InputContextEventFlag | 0x5, fcitx::EventType::InputContextReset = InputContextEventFlag | 0x6, InputContextSurroundingTextUpdated = InputContextEventFlag | 0x7, InputContextCapabilityChanged = InputContextEventFlag | 0x8, InputContextCursorRectChanged = InputContextEventFlag | 0x9, InputContextCapabilityAboutToChange = InputContextEventFlag | 0xD, fcitx::EventType::InputContextSwitchInputMethod = InputContextEventFlag | 0xA, InputContextInputMethodActivated = InputContextEventFlag | 0xB, InputContextInputMethodDeactivated = InputContextEventFlag | 0xC, fcitx::EventType::InputContextInvokeAction = InputContextEventFlag | 0xE, InputContextVirtualKeyboardEvent = InputContextEventFlag | 0xF, InputContextForwardKey = InputMethodEventFlag | 0x1, InputContextCommitString = InputMethodEventFlag | 0x2, InputContextDeleteSurroundingText = InputMethodEventFlag | 0x3, InputContextUpdatePreedit = InputMethodEventFlag | 0x4, InputContextUpdateUI = InputMethodEventFlag | 0x5, fcitx::EventType::InputMethodGroupChanged = InstanceEventFlag | 0x1, fcitx::EventType::InputMethodGroupAboutToChange = InstanceEventFlag | 0x2, fcitx::EventType::UIChanged = InstanceEventFlag | 0x3, fcitx::EventType::CheckUpdate = InstanceEventFlag | 0x4, fcitx::EventType::FocusGroupFocusChanged = InstanceEventFlag | 0x5, fcitx::EventType::InputMethodModeChanged = InstanceEventFlag | 0x6, fcitx::EventType::GlobalConfigReloaded = InstanceEventFlag | 0x7, fcitx::EventType::VirtualKeyboardVisibilityChanged = InstanceEventFlag | 0x8 } |
Type of input method events. More... | |
enum | Action { LeftClick, RightClick } |
enum | fcitx::StatusGroup { fcitx::StatusGroup::BeforeInputMethod, fcitx::StatusGroup::InputMethod, fcitx::StatusGroup::AfterInputMethod } |
enum | fcitx::UserInterfaceComponent { fcitx::UserInterfaceComponent::InputPanel, fcitx::UserInterfaceComponent::StatusArea } |
Functions | |
virtual AddonInstance * | fcitx::AddonFactory::create (AddonManager *manager)=0 |
Create a addon instance for given addon manager. More... | |
virtual void | fcitx::AddonInstance::reloadConfig () |
Reload configuration from disk. | |
virtual void | fcitx::AddonInstance::save () |
Save any relevant data. Usually, it will be invoked when fcitx exits. | |
virtual const Configuration * | fcitx::AddonInstance::getConfig () const |
Get the configuration. | |
virtual void | fcitx::AddonInstance::setConfig (const RawConfig &) |
Set configuration from Raw Config. | |
virtual const Configuration * | fcitx::AddonInstance::getSubConfig (const std::string &) const |
virtual void | fcitx::AddonInstance::setSubConfig (const std::string &, const RawConfig &) |
template<typename Signature , typename... Args> | |
std::function< Signature >::result_type | fcitx::AddonInstance::callWithSignature (const std::string &name, Args &&...args) |
template<typename MetaSignatureString , typename... Args> | |
auto | fcitx::AddonInstance::callWithMetaString (Args &&...args) |
template<typename MetaType , typename... Args> | |
auto | fcitx::AddonInstance::call (Args &&...args) |
Call an exported function for this addon. | |
void | fcitx::AddonInstance::registerCallback (const std::string &name, AddonFunctionAdaptorBase *adaptor) |
const AddonInfo * | fcitx::AddonInstance::addonInfo () const |
fcitx::AddonManager::AddonManager () | |
Construct an addon manager. | |
fcitx::AddonManager::AddonManager (const std::string &addonConfigDir) | |
Create addon manager with given addon config dir. More... | |
virtual | fcitx::AddonManager::~AddonManager () |
Destruct and unload all addons. | |
void | fcitx::AddonManager::registerDefaultLoader (StaticAddonRegistry *registry) |
Register addon loader, including static and shared library loader. More... | |
void | fcitx::AddonManager::registerLoader (std::unique_ptr< AddonLoader > loader) |
Register new addon loader. More... | |
void | fcitx::AddonManager::unregisterLoader (const std::string &name) |
Unregister addon loader. More... | |
void | fcitx::AddonManager::load (const std::unordered_set< std::string > &enabled={}, const std::unordered_set< std::string > &disabled={}) |
Load addon based on given parameter. More... | |
void | fcitx::AddonManager::unload () |
Destruct all addon, all information is cleared to the initial state. More... | |
void | fcitx::AddonManager::saveAll () |
Save all addon configuration. More... | |
AddonInstance * | fcitx::AddonManager::addon (const std::string &name, bool load=false) |
Get the loaded addon instance. More... | |
const AddonInfo * | fcitx::AddonManager::addonInfo (const std::string &name) const |
Get addon information for given addon. More... | |
std::unordered_set< std::string > | fcitx::AddonManager::addonNames (AddonCategory category) |
Instance * | fcitx::AddonManager::instance () |
Return the fcitx instance when it is created by Fcitx. More... | |
EventLoop * | fcitx::AddonManager::eventLoop () |
Return the associated event loop. More... | |
void | fcitx::AddonManager::setEventLoop (EventLoop *eventLoop) |
Set event loop. More... | |
const SemanticVersion & | fcitx::AddonManager::version () const |
Return the version number of Fcitx5Core library. | |
bool | fcitx::AddonManager::checkUpdate () const |
Check directory for quick hint for whether update is required. More... | |
fcitx::Event::Event (EventType type) | |
EventType | fcitx::Event::type () const |
Type of event, can be used to decide event class. More... | |
void | fcitx::Event::accept () |
bool | fcitx::Event::accepted () const |
Return value used by Instance::postEvent. More... | |
virtual bool | fcitx::Event::filtered () const |
Whether a event is filtered by handler. More... | |
bool | fcitx::Event::isInputContextEvent () const |
A helper function to check if a event is input context event. More... | |
fcitx::InputContextEvent::InputContextEvent (InputContext *context, EventType type) | |
InputContext * | fcitx::InputContextEvent::inputContext () const |
fcitx::KeyEventBase::KeyEventBase (EventType type, InputContext *context, Key rawKey, bool isRelease=false, int time=0) | |
fcitx::KeyEventBase::KeyEventBase (const KeyEventBase &)=default | |
Key | fcitx::KeyEventBase::key () const |
Normalized key event. More... | |
void | fcitx::KeyEventBase::setKey (const Key &key) |
It will automatically be called if input method layout does not match the system keyboard layout. More... | |
void | fcitx::KeyEventBase::setRawKey (const Key &key) |
It is designed for faking the key event. More... | |
void | fcitx::KeyEventBase::setForward (bool forward) |
It is designed for overriding the key forward option. More... | |
Key | fcitx::KeyEventBase::origKey () const |
Key event regardless of keyboard layout conversion. More... | |
Key | fcitx::KeyEventBase::rawKey () const |
Key event after layout conversion. More... | |
bool | fcitx::KeyEventBase::isRelease () const |
int | fcitx::KeyEventBase::time () const |
bool | fcitx::KeyEventBase::forward () const |
If true, the key that produce character will commit a string. More... | |
fcitx::KeyEvent::KeyEvent (InputContext *context, Key rawKey, bool isRelease=false, int time=0) | |
void | fcitx::KeyEvent::filter () |
bool | fcitx::KeyEvent::filtered () const override |
Whether a event is filtered by handler. More... | |
void | fcitx::KeyEvent::filterAndAccept () |
fcitx::VirtualKeyboardEvent::VirtualKeyboardEvent (InputContext *context, bool isRelease, int time=0) | |
int | fcitx::VirtualKeyboardEvent::time () const |
void | fcitx::VirtualKeyboardEvent::setKey (Key key) |
const Key & | fcitx::VirtualKeyboardEvent::key () const |
void | fcitx::VirtualKeyboardEvent::setPosition (float x, float y) |
float | fcitx::VirtualKeyboardEvent::x () const |
float | fcitx::VirtualKeyboardEvent::y () const |
void | fcitx::VirtualKeyboardEvent::setLongPress (bool longPress) |
bool | fcitx::VirtualKeyboardEvent::isLongPress () const |
void | fcitx::VirtualKeyboardEvent::setUserAction (uint64_t actionId) |
uint64_t | fcitx::VirtualKeyboardEvent::userAction () const |
void | fcitx::VirtualKeyboardEvent::setText (std::string text) |
const std::string & | fcitx::VirtualKeyboardEvent::text () const |
std::unique_ptr< KeyEvent > | fcitx::VirtualKeyboardEvent::toKeyEvent () const |
fcitx::VirtualKeyboardEvent::FCITX_DECLARE_PRIVATE (VirtualKeyboardEvent) | |
fcitx::ForwardKeyEvent::ForwardKeyEvent (InputContext *context, Key rawKey, bool isRelease=false, int time=0) | |
fcitx::CommitStringEvent::CommitStringEvent (const std::string &text, InputContext *context) | |
const std::string & | fcitx::CommitStringEvent::text () const |
fcitx::InvokeActionEvent::InvokeActionEvent (Action action, int cursor, InputContext *context) | |
Action | fcitx::InvokeActionEvent::action () const |
int | fcitx::InvokeActionEvent::cursor () const |
void | fcitx::InvokeActionEvent::filter () |
bool | fcitx::InvokeActionEvent::filtered () const override |
Whether a event is filtered by handler. More... | |
fcitx::InputContextSwitchInputMethodEvent::InputContextSwitchInputMethodEvent (InputMethodSwitchedReason reason, const std::string &oldIM, InputContext *context) | |
InputMethodSwitchedReason | fcitx::InputContextSwitchInputMethodEvent::reason () const |
const std::string & | fcitx::InputContextSwitchInputMethodEvent::oldInputMethod () const |
FCITXCORE_DEPRECATED | fcitx::ResetEvent::ResetEvent (ResetReason reason, InputContext *context) |
fcitx::ResetEvent::ResetEvent (InputContext *context) | |
FCITXCORE_DEPRECATED ResetReason | fcitx::ResetEvent::reason () const |
fcitx::InputContextUpdateUIEvent::InputContextUpdateUIEvent (UserInterfaceComponent component, InputContext *context, bool immediate=false) | |
UserInterfaceComponent | fcitx::InputContextUpdateUIEvent::component () const |
bool | fcitx::InputContextUpdateUIEvent::immediate () const |
fcitx::InputMethodNotificationEvent::InputMethodNotificationEvent (EventType type, const std::string &name, InputContext *context) | |
const std::string & | fcitx::InputMethodNotificationEvent::name () const |
fcitx::InputMethodActivatedEvent::InputMethodActivatedEvent (const std::string &name, InputContext *context) | |
fcitx::InputMethodDeactivatedEvent::InputMethodDeactivatedEvent (const std::string &name, InputContext *context) | |
fcitx::InputContextCreatedEvent::InputContextCreatedEvent (InputContext *ic) | |
fcitx::InputContextDestroyedEvent::InputContextDestroyedEvent (InputContext *ic) | |
fcitx::FocusInEvent::FocusInEvent (InputContext *ic) | |
fcitx::FocusOutEvent::FocusOutEvent (InputContext *ic) | |
fcitx::SurroundingTextUpdatedEvent::SurroundingTextUpdatedEvent (InputContext *ic) | |
fcitx::CursorRectChangedEvent::CursorRectChangedEvent (InputContext *ic) | |
fcitx::UpdatePreeditEvent::UpdatePreeditEvent (InputContext *ic) | |
void | fcitx::CheckUpdateEvent::setHasUpdate () |
Make checking update short circuit. More... | |
bool | fcitx::CheckUpdateEvent::filtered () const override |
Whether a event is filtered by handler. More... | |
fcitx::FocusGroupFocusChangedEvent::FocusGroupFocusChangedEvent (FocusGroup *group, InputContext *oldFocus, InputContext *newFocus) | |
FocusGroup * | fcitx::FocusGroupFocusChangedEvent::group () const |
InputContext * | fcitx::FocusGroupFocusChangedEvent::oldFocus () const |
InputContext * | fcitx::FocusGroupFocusChangedEvent::newFocus () const |
fcitx::CapabilityEvent::CapabilityEvent (InputContext *ic, EventType type, CapabilityFlags oldFlags, CapabilityFlags newFlags) | |
auto | fcitx::CapabilityEvent::oldFlags () const |
auto | fcitx::CapabilityEvent::newFlags () const |
fcitx::CapabilityChangedEvent::CapabilityChangedEvent (InputContext *ic, CapabilityFlags oldFlags, CapabilityFlags newFlags) | |
fcitx::CapabilityAboutToChangeEvent::CapabilityAboutToChangeEvent (InputContext *ic, CapabilityFlags oldFlags, CapabilityFlags newFlags) | |
fcitx::FCITX_CONFIG_ENUM (IconThemeDirectoryType, Fixed, Scalable, Threshold) | |
fcitx::IconThemeDirectory::IconThemeDirectory (const RawConfig &config=RawConfig()) | |
fcitx::IconThemeDirectory::FCITX_DECLARE_VIRTUAL_DTOR_COPY_AND_MOVE (IconThemeDirectory) | |
fcitx::IconThemeDirectory::FCITX_DECLARE_READ_ONLY_PROPERTY (std::string, path) | |
fcitx::IconThemeDirectory::FCITX_DECLARE_READ_ONLY_PROPERTY (int, size) | |
fcitx::IconThemeDirectory::FCITX_DECLARE_READ_ONLY_PROPERTY (int, scale) | |
fcitx::IconThemeDirectory::FCITX_DECLARE_READ_ONLY_PROPERTY (std::string, context) | |
fcitx::IconThemeDirectory::FCITX_DECLARE_READ_ONLY_PROPERTY (IconThemeDirectoryType, type) | |
fcitx::IconThemeDirectory::FCITX_DECLARE_READ_ONLY_PROPERTY (int, maxSize) | |
fcitx::IconThemeDirectory::FCITX_DECLARE_READ_ONLY_PROPERTY (int, minSize) | |
fcitx::IconThemeDirectory::FCITX_DECLARE_READ_ONLY_PROPERTY (int, threshold) | |
bool | fcitx::IconThemeDirectory::matchesSize (int iconsize, int iconscale) const |
int | fcitx::IconThemeDirectory::sizeDistance (int iconsize, int iconscale) const |
fcitx::IconTheme::IconTheme (const char *name, const StandardPath &standardPath=StandardPath::global()) | |
fcitx::IconTheme::IconTheme (const std::string &name, const StandardPath &standardPath=StandardPath::global()) | |
fcitx::IconTheme::IconTheme (const StandardPath &standardPath=StandardPath::global()) | |
fcitx::IconTheme::FCITX_DECLARE_VIRTUAL_DTOR_MOVE (IconTheme) | |
std::string | fcitx::IconTheme::findIcon (const std::string &iconName, unsigned int desiredSize, int scale=1, const std::vector< std::string > &extensions={ ".svg", ".png", ".xpm"}) |
std::string | fcitx::IconTheme::findIcon (const std::string &iconName, unsigned int desiredSize, int scale=1, const std::vector< std::string > &extensions={ ".svg", ".png", ".xpm"}) const |
static std::string | fcitx::IconTheme::defaultIconThemeName () |
fcitx::IconTheme::FCITX_DECLARE_READ_ONLY_PROPERTY (std::string, internalName) | |
fcitx::IconTheme::FCITX_DECLARE_READ_ONLY_PROPERTY (I18NString, name) | |
fcitx::IconTheme::FCITX_DECLARE_READ_ONLY_PROPERTY (I18NString, comment) | |
fcitx::IconTheme::FCITX_DECLARE_READ_ONLY_PROPERTY (std::vector< IconTheme >, inherits) | |
fcitx::IconTheme::FCITX_DECLARE_READ_ONLY_PROPERTY (std::vector< IconThemeDirectory >, directories) | |
fcitx::IconTheme::FCITX_DECLARE_READ_ONLY_PROPERTY (std::vector< IconThemeDirectory >, scaledDirectories) | |
fcitx::IconTheme::FCITX_DECLARE_READ_ONLY_PROPERTY (std::string, example) | |
static std::string | fcitx::IconTheme::iconName (const std::string &icon, bool inFlatpak=isInFlatpak()) |
Rename fcitx-* icon to org.fcitx.Fcitx5.fcitx-* if in flatpak. | |
fcitx::InputContext::InputContext (InputContextManager &manager, const std::string &program={}) | |
fcitx::InputContext::InputContext (InputContext &&other)=delete | |
virtual const char * | fcitx::InputContext::frontend () const =0 |
Returns the underlying implementation of Input Context. | |
std::string_view | fcitx::InputContext::frontendName () const |
Return the frontend name. More... | |
const ICUUID & | fcitx::InputContext::uuid () const |
Returns the uuid of this input context. | |
const std::string & | fcitx::InputContext::program () const |
Returns the program name of input context. More... | |
std::string | fcitx::InputContext::display () const |
Returns the display server of the client. More... | |
const Rect & | fcitx::InputContext::cursorRect () const |
Returns the cursor position of the client. | |
double | fcitx::InputContext::scaleFactor () const |
Return the client scale factor. | |
void | fcitx::InputContext::focusIn () |
Called When input context gains the input focus. | |
void | fcitx::InputContext::focusOut () |
Called when input context losts the input focus. | |
void | fcitx::InputContext::setFocusGroup (FocusGroup *group) |
Set the focus group of this input context. More... | |
FocusGroup * | fcitx::InputContext::focusGroup () const |
Returns the current focus group of input context. | |
FCITXCORE_DEPRECATED void | fcitx::InputContext::reset (ResetReason reason) |
Called when input context state need to be reset. | |
void | fcitx::InputContext::reset () |
Called when input context state need to be reset. More... | |
void | fcitx::InputContext::setCapabilityFlags (CapabilityFlags flags) |
Update the capability flags of the input context. More... | |
CapabilityFlags | fcitx::InputContext::capabilityFlags () const |
Returns the current capability flags. More... | |
void | fcitx::InputContext::setEnablePreedit (bool enable) |
Override the preedit hint from client. | |
bool | fcitx::InputContext::isPreeditEnabled () const |
Check if preedit is manually disabled. | |
void | fcitx::InputContext::setCursorRect (Rect rect) |
Update the current cursor rect of the input context. | |
void | fcitx::InputContext::setCursorRect (Rect rect, double scale) |
Update the client rect with scale factor. | |
bool | fcitx::InputContext::keyEvent (KeyEvent &event) |
Send a key event to current input context. | |
bool | fcitx::InputContext::virtualKeyboardEvent (VirtualKeyboardEvent &event) |
Send a virtual keyboard event to current input context. More... | |
bool | fcitx::InputContext::hasFocus () const |
Returns whether the input context holds the input focus. More... | |
void | fcitx::InputContext::invokeAction (InvokeActionEvent &event) |
Invoke an action on the preedit. | |
SurroundingText & | fcitx::InputContext::surroundingText () |
Returns the mutable surrounding text of the input context. More... | |
const SurroundingText & | fcitx::InputContext::surroundingText () const |
Returns the immutable surrounding text of the input context. | |
void | fcitx::InputContext::updateSurroundingText () |
Notifies the surrounding text modification from the client. | |
void | fcitx::InputContext::commitString (const std::string &text) |
Commit a string to the client. | |
void | fcitx::InputContext::deleteSurroundingText (int offset, unsigned int size) |
Ask client to delete a range of surrounding text. | |
void | fcitx::InputContext::forwardKey (const Key &rawKey, bool isRelease=false, int time=0) |
Send a key event to client. | |
void | fcitx::InputContext::updatePreedit () |
Notifies client about changes in clientPreedit. More... | |
void | fcitx::InputContext::updateUserInterface (UserInterfaceComponent component, bool immediate=false) |
Notifies UI about changes in user interface. More... | |
void | fcitx::InputContext::setBlockEventToClient (bool block) |
Prevent event deliver to input context, and re-send the event later. More... | |
bool | fcitx::InputContext::hasPendingEvents () const |
bool | fcitx::InputContext::hasPendingEventsStrictOrder () const |
Has pending event that need to use key order fix. More... | |
InputContextProperty * | fcitx::InputContext::property (const std::string &name) |
Returns the input context property by name. | |
InputContextProperty * | fcitx::InputContext::property (const InputContextPropertyFactory *factory) |
Returns the input context property by factory. | |
InputPanel & | fcitx::InputContext::inputPanel () |
Returns the associated input panel. | |
const InputPanel & | fcitx::InputContext::inputPanel () const |
Returns the associated input panel. More... | |
StatusArea & | fcitx::InputContext::statusArea () |
Returns the associated StatusArea. | |
const StatusArea & | fcitx::InputContext::statusArea () const |
Returns the associated StatusArea. More... | |
template<typename T > | |
T * | fcitx::InputContext::propertyAs (const std::string &name) |
Helper function to return the input context property in specific type. More... | |
template<typename T > | |
T::PropertyType * | fcitx::InputContext::propertyFor (const T *factory) |
Helper function to return the input context property in specific type by given factory. More... | |
void | fcitx::InputContext::updateProperty (const std::string &name) |
Notifies the change of a given input context property. More... | |
void | fcitx::InputContext::updateProperty (const InputContextPropertyFactory *factory) |
Notifies the change of a given input context property by its factory. More... | |
bool | fcitx::InputContext::isVirtualKeyboardVisible () const |
void | fcitx::InputContext::showVirtualKeyboard () const |
void | fcitx::InputContext::hideVirtualKeyboard () const |
bool | fcitx::InputContext::clientControlVirtualkeyboardShow () const |
void | fcitx::InputContext::setClientControlVirtualkeyboardShow (bool show) |
bool | fcitx::InputContext::clientControlVirtualkeyboardHide () const |
void | fcitx::InputContext::setClientControlVirtualkeyboardHide (bool show) |
virtual void | fcitx::InputContext::commitStringImpl (const std::string &text)=0 |
Send the committed string to client. More... | |
virtual void | fcitx::InputContext::deleteSurroundingTextImpl (int offset, unsigned int size)=0 |
Send the delete Surrounding Text request to client. More... | |
virtual void | fcitx::InputContext::forwardKeyImpl (const ForwardKeyEvent &key)=0 |
Send the forwarded key to client. More... | |
virtual void | fcitx::InputContext::updatePreeditImpl ()=0 |
Send the preedit update to the client. More... | |
virtual void | fcitx::InputContext::updateClientSideUIImpl () |
Send the UI update to client. More... | |
void | fcitx::InputContext::destroy () |
Notifies the destruction of the input context. More... | |
void | fcitx::InputContext::created () |
Notifies the creation of input context. More... | |
fcitx::InputContextEventBlocker::InputContextEventBlocker (InputContext *inputContext) | |
virtual void | fcitx::InputContextProperty::copyTo (InputContextProperty *) |
copy state to another property. More... | |
virtual bool | fcitx::InputContextProperty::needCopy () const |
Quick check if there's need to copy over the state. | |
virtual InputContextProperty * | fcitx::InputContextPropertyFactory::create (InputContext &)=0 |
bool | fcitx::InputContextPropertyFactory::registered () const |
Return whether the factory is already registered with an InputContextManager. More... | |
void | fcitx::InputContextPropertyFactory::unregister () |
Unregister the factory from current InputContextManager. | |
InputContextProperty * | fcitx::SimpleInputContextPropertyFactory< T >::create (InputContext &) override |
fcitx::LambdaInputContextPropertyFactory< Ret >::LambdaInputContextPropertyFactory (std::function< Ret *(InputContext &)> f) | |
InputContextProperty * | fcitx::LambdaInputContextPropertyFactory< Ret >::create (InputContext &ic) override |
fcitx::InputMethodManager::InputMethodManager (AddonManager *addonManager) | |
void | fcitx::InputMethodManager::load (const std::function< void(InputMethodManager &)> &buildDefaultGroupCallback={}) |
Load the input method information from disk. More... | |
void | fcitx::InputMethodManager::reset (const std::function< void(InputMethodManager &)> &buildDefaultGroupCallback={}) |
Reset all the group information to initial state. | |
void | fcitx::InputMethodManager::refresh () |
Load new input method configuration file from disk. More... | |
void | fcitx::InputMethodManager::save () |
Save the input method information to disk. More... | |
std::vector< std::string > | fcitx::InputMethodManager::groups () const |
Return all the names of group by order. | |
int | fcitx::InputMethodManager::groupCount () const |
Return the number of groups. | |
void | fcitx::InputMethodManager::setCurrentGroup (const std::string &group) |
Set the name of current group, rest of the group order will be adjusted accordingly. More... | |
const InputMethodGroup & | fcitx::InputMethodManager::currentGroup () const |
Return the current group. | |
void | fcitx::InputMethodManager::enumerateGroup (bool forward) |
Simply enumerate input method groups. | |
void | fcitx::InputMethodManager::enumerateGroupTo (const std::string &groupName) |
enumerate group to a certain group. More... | |
void | fcitx::InputMethodManager::setDefaultInputMethod (const std::string &name) |
Set default input method for current group. More... | |
const InputMethodGroup * | fcitx::InputMethodManager::group (const std::string &name) const |
Return the input methdo group of given name. | |
void | fcitx::InputMethodManager::setGroup (InputMethodGroup newGroupInfo) |
Update the information of an existing group. More... | |
void | fcitx::InputMethodManager::addEmptyGroup (const std::string &name) |
Create a new empty group with given name. | |
void | fcitx::InputMethodManager::removeGroup (const std::string &name) |
Remove an existing group by name. | |
void | fcitx::InputMethodManager::setGroupOrder (const std::vector< std::string > &groups) |
Update the initial order of groups. More... | |
const InputMethodEntry * | fcitx::InputMethodManager::entry (const std::string &name) const |
Return a given input method entry by name. | |
bool | fcitx::InputMethodManager::foreachEntries (const std::function< bool(const InputMethodEntry &entry)> &callback) |
Enumerate all the input method entries. More... | |
bool | fcitx::InputMethodManager::checkUpdate () const |
Check if there is new entries could be loaded. More... | |
fcitx::InputMethodManager::FCITX_DECLARE_SIGNAL (InputMethodManager, CurrentGroupAboutToChange, void(const std::string &group)) | |
Emit the signal when current group is about to change. More... | |
fcitx::InputMethodManager::FCITX_DECLARE_SIGNAL (InputMethodManager, CurrentGroupChanged, void(const std::string &group)) | |
fcitx::InputMethodManager::FCITX_DECLARE_SIGNAL (InputMethodManager, GroupAdded, void(const std::string &group)) | |
Emit the signal when a new group is added. More... | |
fcitx::InputMethodManager::FCITX_DECLARE_SIGNAL (InputMethodManager, GroupRemoved, void(const std::string &group)) | |
Emit the signal when a group is removed. More... | |
fcitx::InputPanel::InputPanel (InputContext *ic) | |
Construct a Input Panel associated with given input context. | |
const Text & | fcitx::InputPanel::preedit () const |
void | fcitx::InputPanel::setPreedit (const Text &text) |
const Text & | fcitx::InputPanel::auxUp () const |
void | fcitx::InputPanel::setAuxUp (const Text &text) |
const Text & | fcitx::InputPanel::auxDown () const |
void | fcitx::InputPanel::setAuxDown (const Text &text) |
const Text & | fcitx::InputPanel::clientPreedit () const |
The preedit text embedded in client window. | |
void | fcitx::InputPanel::setClientPreedit (const Text &clientPreedit) |
std::shared_ptr< CandidateList > | fcitx::InputPanel::candidateList () const |
void | fcitx::InputPanel::setCandidateList (std::unique_ptr< CandidateList > candidate) |
const CustomInputPanelCallback & | fcitx::InputPanel::customInputPanelCallback () const |
Return the current input panel display callback. More... | |
void | fcitx::InputPanel::setCustomInputPanelCallback (CustomInputPanelCallback callback) |
Set a custom callback to display the input panel. More... | |
void | fcitx::InputPanel::reset () |
bool | fcitx::InputPanel::empty () const |
Whether input panel is totally empty. | |
void | fcitx::Menu::addAction (Action *action) |
void | fcitx::Menu::removeAction (Action *action) |
void | fcitx::Menu::insertAction (Action *before, Action *action) |
std::vector< Action * > | fcitx::Menu::actions () |
fcitx::Menu::FCITX_DECLARE_SIGNAL (Menu, Update, void()) | |
fcitx::StatusArea::StatusArea (InputContext *ic) | |
Construct status area for associated input context. | |
void | fcitx::StatusArea::addAction (StatusGroup group, Action *action) |
Add an action to given group. | |
void | fcitx::StatusArea::removeAction (Action *action) |
Remove an action from given group. | |
void | fcitx::StatusArea::clear () |
Clear all the actions, will be called when input context lost focus. | |
void | fcitx::StatusArea::clearGroup (StatusGroup group) |
Clear only given status group. | |
std::vector< Action * > | fcitx::StatusArea::actions (StatusGroup group) const |
Get the associated actions for group. | |
std::vector< Action * > | fcitx::StatusArea::allActions () const |
Get all the associated actions. | |
fcitx::SurroundingText::FCITX_DECLARE_VIRTUAL_DTOR_COPY_AND_MOVE (SurroundingText) | |
void | fcitx::SurroundingText::invalidate () |
Reset surrounding text to invalid state. | |
bool | fcitx::SurroundingText::isValid () const |
Return whether surrounding text is valid. | |
unsigned int | fcitx::SurroundingText::anchor () const |
offset of anchor in character. | |
unsigned int | fcitx::SurroundingText::cursor () const |
offset of anchor in character. | |
const std::string & | fcitx::SurroundingText::text () const |
std::string | fcitx::SurroundingText::selectedText () const |
void | fcitx::SurroundingText::setText (const std::string &text, unsigned int cursor, unsigned int anchor) |
Set current of surrounding text. More... | |
void | fcitx::SurroundingText::setCursor (unsigned int cursor, unsigned int anchor) |
Set current cursor and anchor of surrounding text. More... | |
void | fcitx::SurroundingText::deleteText (int offset, unsigned int size) |
Delete surrounding text with offset and size. More... | |
LogMessageBuilder & | fcitx::operator<< (LogMessageBuilder &log, const SurroundingText &surroundingText) |
fcitx::Text::Text (std::string text, TextFormatFlags flag=TextFormatFlag::NoFlag) | |
fcitx::Text::FCITX_DECLARE_VIRTUAL_DTOR_COPY_AND_MOVE (Text) | |
int | fcitx::Text::cursor () const |
Get cursor by byte. | |
void | fcitx::Text::setCursor (int pos=-1) |
Set cursor by byte. | |
void | fcitx::Text::clear () |
void | fcitx::Text::append (std::string str, TextFormatFlags flag=TextFormatFlag::NoFlag) |
const std::string & | fcitx::Text::stringAt (int idx) const |
TextFormatFlags | fcitx::Text::formatAt (int idx) const |
size_t | fcitx::Text::size () const |
bool | fcitx::Text::empty () const |
size_t | fcitx::Text::textLength () const |
std::string | fcitx::Text::toString () const |
std::string | fcitx::Text::toStringForCommit () const |
Text | fcitx::Text::normalize () const |
Remove empty string piece and merge the string with same format. More... | |
std::vector< Text > | fcitx::Text::splitByLine () const |
Split Text object into lines. More... | |
std::ostream & | fcitx::operator<< (std::ostream &os, const Text &text) |
virtual void | fcitx::UserInterface::update (UserInterfaceComponent component, InputContext *inputContext)=0 |
virtual bool | fcitx::UserInterface::available ()=0 |
virtual void | fcitx::UserInterface::suspend ()=0 |
virtual void | fcitx::UserInterface::resume ()=0 |
virtual bool | fcitx::VirtualKeyboardUserInterface::isVirtualKeyboardVisible () const =0 |
virtual void | fcitx::VirtualKeyboardUserInterface::showVirtualKeyboard ()=0 |
virtual void | fcitx::VirtualKeyboardUserInterface::hideVirtualKeyboard ()=0 |
fcitx::UserInterfaceManager::UserInterfaceManager (AddonManager *manager) | |
void | fcitx::UserInterfaceManager::load (const std::string &ui={}) |
Initialize the UI Addon. More... | |
bool | fcitx::UserInterfaceManager::registerAction (const std::string &name, Action *action) |
Register an named action. More... | |
bool | fcitx::UserInterfaceManager::registerAction (Action *action) |
Register an anonymous action. More... | |
void | fcitx::UserInterfaceManager::unregisterAction (Action *action) |
Unregister the action. | |
Action * | fcitx::UserInterfaceManager::lookupAction (const std::string &name) const |
Lookup an action by the name. More... | |
Action * | fcitx::UserInterfaceManager::lookupActionById (int id) const |
Lookup an action by id. More... | |
void | fcitx::UserInterfaceManager::update (UserInterfaceComponent component, InputContext *inputContext) |
Mark a user interface component to be updated for given input context. More... | |
void | fcitx::UserInterfaceManager::expire (InputContext *inputContext) |
Remove all pending updates for a given input context. | |
void | fcitx::UserInterfaceManager::flush () |
void | fcitx::UserInterfaceManager::updateAvailability () |
Invoke by user interface addon to notify if there is any avaiability change. | |
std::string | fcitx::UserInterfaceManager::currentUI () const |
Return the current active addon ui name. | |
bool | fcitx::UserInterfaceManager::isVirtualKeyboardVisible () const |
Return if virtual keyboard is visible. | |
void | fcitx::UserInterfaceManager::showVirtualKeyboard () const |
Show the virtual keyboard. More... | |
void | fcitx::UserInterfaceManager::hideVirtualKeyboard () const |
Hide the virtual keyboard. More... | |
void | fcitx::UserInterfaceManager::updateVirtualKeyboardVisibility () |
Invoke by user interface addon to notify if there is any virtual keyboard visibility change. More... | |
Variables | |
EventType | fcitx::Event::type_ |
bool | fcitx::Event::accepted_ = false |
InputContext * | fcitx::InputContextEvent::ic_ |
Key | fcitx::KeyEventBase::key_ |
Key | fcitx::KeyEventBase::origKey_ |
Key | fcitx::KeyEventBase::rawKey_ |
bool | fcitx::KeyEventBase::isRelease_ |
int | fcitx::KeyEventBase::time_ |
bool | fcitx::KeyEventBase::forward_ = false |
std::unique_ptr< VirtualKeyboardEventPrivate > | fcitx::VirtualKeyboardEvent::d_ptr |
std::string | fcitx::CommitStringEvent::text_ |
Action | fcitx::InvokeActionEvent::action_ |
int | fcitx::InvokeActionEvent::cursor_ |
bool | fcitx::InvokeActionEvent::filtered_ = false |
InputMethodSwitchedReason | fcitx::InputContextSwitchInputMethodEvent::reason_ |
std::string | fcitx::InputContextSwitchInputMethodEvent::oldInputMethod_ |
ResetReason | fcitx::ResetEvent::reason_ |
UserInterfaceComponent | fcitx::InputContextUpdateUIEvent::component_ |
bool | fcitx::InputContextUpdateUIEvent::immediate_ |
std::string | fcitx::InputMethodNotificationEvent::name_ |
const CapabilityFlags | fcitx::CapabilityEvent::oldFlags_ |
const CapabilityFlags | fcitx::CapabilityEvent::newFlags_ |
#define FCITX_ADDON_DECLARE_FUNCTION | ( | NAME, | |
FUNCTION, | |||
SIGNATURE... | |||
) |
Definition at line 131 of file addoninstance.h.
#define FCITX_ADDON_DEPENDENCY_LOADER | ( | NAME, | |
ADDONMANAGER | |||
) |
A convenient macro to obtain the addon pointer of another addon.
Definition at line 167 of file addoninstance.h.
#define FCITX_ADDON_EXPORT_FUNCTION | ( | CLASS, | |
FUNCTION | |||
) |
Definition at line 146 of file addoninstance.h.
#define FCITX_ADDON_FACTORY | ( | ClassName | ) |
Definition at line 157 of file addoninstance.h.
#define FCITX_DEFINE_SIMPLE_EVENT | ( | NAME, | |
TYPE, | |||
ARGS... | |||
) |
using fcitx::FactoryFor = typedef LambdaInputContextPropertyFactory<T> |
Convinient short type alias for creating a LambdaInputContextPropertyFactory.
Example usage: Define it as a field of AddonInstance.
Register the property to InputContextManager in constructor of AddonInstance.
The name of property need to be unique.
Get the property from input context within the addon.
The returned type will be casted automatically. Get property with factory is faster than get property with name.
Accessing the property outside the addon.
You may need to cast the type to access any private data within it.
Definition at line 138 of file inputcontextproperty.h.
|
strong |
Type of input method events.
Enumerator | |
---|---|
InstanceEventFlag | captured by everything |
InputContextFocusIn | FocusInEvent is generated when client gets focused.
|
InputContextFocusOut | when using lost focus this might be variance case to case. the default behavior is to commit the preedit, and resetIM. Controlled by [Output/DontCommitPreeditWhenUnfocus], this option will not work for application switch doesn't support async commit. So OnClose is called when preedit IS committed (not like CChangeByInactivate, this behavior cannot be overridden), it give im a chance to choose remember this word or not. Input method need to notice, that the commit is already DONE, do not do extra commit.
|
InputContextKeyEvent | Key event is generated when client press or release a key.
|
InputContextReset | ResetEvent is generated. |
InputContextSwitchInputMethod | when user switch to a different input method by hand such as ctrl+shift by default, or by ui, default behavior is reset IM. |
InputContextInvokeAction | InvokeAction event is generated when client click on the preedit. Not all client support this feature.
|
InputMethodGroupChanged | This is generated when input method group changed. This would also trigger InputContextSwitchInputMethod afterwards. |
InputMethodGroupAboutToChange | InputMethodGroupAboutToChangeEvent is generated when input method group is about to be changed.
|
UIChanged | UIChangedEvent is posted when the UI implementation is changed. |
CheckUpdate | CheckUpdateEvent is posted when the Instance is requested to check for newly installed addons and input methods. This can be used for addons to pick up new input methods if it provides input method at runtime. |
FocusGroupFocusChanged | FocusGroupFocusChanged is posted when a focus group changed its focused input context. This is a more fine grained control over focus in and focus out event. This is more useful for UI to keep track of what input context is being focused.
|
InputMethodModeChanged | Input method mode changed. |
GlobalConfigReloaded | Global config is reloaded. This only fires after fcitx has entered running state. The initial load will not trigger this event.
|
VirtualKeyboardVisibilityChanged | Virtual keyboard visibility changed.
|
|
strong |
The reason why input method is switched to another.
|
strong |
Enumerator | |
---|---|
BeforeInputMethod | Action shown before input method group. |
InputMethod | Group should be solely used by input method engine. It will be cleared automatically before InputMethodEngine::activate.
|
AfterInputMethod | Action shown after input method group. |
Definition at line 27 of file statusarea.h.
|
strong |
Enumerator | |
---|---|
InputPanel | Input Panel component.
|
StatusArea | Status Area component.
|
Definition at line 23 of file userinterface.h.
|
inline |
AddonInstance * fcitx::AddonManager::addon | ( | const std::string & | name, |
bool | load = false |
||
) |
Get the loaded addon instance.
name | name of addon. |
load | to force load the addon if possible. |
Definition at line 321 of file addonmanager.cpp.
const AddonInfo * fcitx::AddonManager::addonInfo | ( | const std::string & | name | ) | const |
Get addon information for given addon.
name | name of addon. |
Definition at line 335 of file addonmanager.cpp.
fcitx::AddonManager::AddonManager | ( | const std::string & | addonConfigDir | ) |
Create addon manager with given addon config dir.
By default, addonConfigDir is set to "addon". It can be a relative path to PkgData, or an absolute path. This function is only used by test.
addonConfigDir | directory name. |
Definition at line 217 of file addonmanager.cpp.
CapabilityFlags fcitx::InputContext::capabilityFlags | ( | ) | const |
Returns the current capability flags.
Definition at line 216 of file inputcontext.cpp.
bool fcitx::InputMethodManager::checkUpdate | ( | ) | const |
Check if there is new entries could be loaded.
Definition at line 465 of file inputmethodmanager.cpp.
bool fcitx::AddonManager::checkUpdate | ( | ) | const |
Check directory for quick hint for whether update is required.
Definition at line 383 of file addonmanager.cpp.
|
protectedpure virtual |
|
inlinevirtual |
copy state to another property.
Default implemenation is empty. This is triggered by InputContext::updateProperty.
Definition at line 48 of file inputcontextproperty.h.
|
pure virtual |
Create a addon instance for given addon manager.
This function is called by AddonManager
|
protected |
Notifies the creation of input context.
Need to be called at the end of the constructor.
Definition at line 74 of file inputcontext.cpp.
const CustomInputPanelCallback & fcitx::InputPanel::customInputPanelCallback | ( | ) | const |
Return the current input panel display callback.
Definition at line 81 of file inputpanel.cpp.
|
protectedpure virtual |
Send the delete Surrounding Text request to client.
offset | offset of deletion start, in UCS4 char. |
size | length of the deletion in UCS4 char. |
void fcitx::SurroundingText::deleteText | ( | int | offset, |
unsigned int | size | ||
) |
Delete surrounding text with offset and size.
This can be used to update the local state of surrounding text before client send it back.
offset | offset to cursor position. |
size | length of text to delete. |
Definition at line 99 of file surroundingtext.cpp.
|
protected |
Notifies the destruction of the input context.
Need to be called in the destructor.
Definition at line 81 of file inputcontext.cpp.
std::string fcitx::InputContext::display | ( | ) | const |
Returns the display server of the client.
In form of type:string, E.g. client from X11 server of :0 will become x11::0.
Definition at line 102 of file inputcontext.cpp.
void fcitx::InputMethodManager::enumerateGroupTo | ( | const std::string & | groupName | ) |
enumerate group to a certain group.
For example, current order is A,B,C,D, enumerateGroupTo(C) will make order to be C,D,A,B.
Definition at line 274 of file inputmethodmanager.cpp.
EventLoop * fcitx::AddonManager::eventLoop | ( | ) |
Return the associated event loop.
If AddonManager is created by Instance, it will return the event loop of associated instance.
Definition at line 373 of file addonmanager.cpp.
fcitx::InputMethodManager::FCITX_DECLARE_SIGNAL | ( | InputMethodManager | , |
CurrentGroupAboutToChange | , | ||
void(const std::string &group) | |||
) |
Emit the signal when current group is about to change.
fcitx::InputMethodManager::FCITX_DECLARE_SIGNAL | ( | InputMethodManager | , |
GroupAdded | , | ||
void(const std::string &group) | |||
) |
Emit the signal when a new group is added.
This will not be emitted when building the group.
fcitx::InputMethodManager::FCITX_DECLARE_SIGNAL | ( | InputMethodManager | , |
GroupRemoved | , | ||
void(const std::string &group) | |||
) |
Emit the signal when a group is removed.
This will not be emitted when building the group.
|
inlinevirtual |
Whether a event is filtered by handler.
If event is filtered, it will not send to another handler. For now only keyevent from input context can be filtered.
Reimplemented in fcitx::CheckUpdateEvent, fcitx::InvokeActionEvent, and fcitx::KeyEvent.
|
inlineoverridevirtual |
Whether a event is filtered by handler.
If event is filtered, it will not send to another handler. For now only keyevent from input context can be filtered.
Reimplemented from fcitx::Event.
|
inlineoverridevirtual |
Whether a event is filtered by handler.
If event is filtered, it will not send to another handler. For now only keyevent from input context can be filtered.
Reimplemented from fcitx::Event.
|
inlineoverridevirtual |
Whether a event is filtered by handler.
If event is filtered, it will not send to another handler. For now only keyevent from input context can be filtered.
Reimplemented from fcitx::Event.
bool fcitx::InputMethodManager::foreachEntries | ( | const std::function< bool(const InputMethodEntry &entry)> & | callback | ) |
Enumerate all the input method entries.
Definition at line 446 of file inputmethodmanager.cpp.
|
inline |
|
protectedpure virtual |
Send the forwarded key to client.
std::string_view fcitx::InputContext::frontendName | ( | ) | const |
Return the frontend name.
Helper function that simply calls InputContext::frontend, but returns a string_view.
Definition at line 79 of file inputcontext.cpp.
bool fcitx::InputContext::hasFocus | ( | ) | const |
Returns whether the input context holds the input focus.
Input context need to have focus.
Definition at line 291 of file inputcontext.cpp.
bool fcitx::InputContext::hasPendingEventsStrictOrder | ( | ) | const |
Has pending event that need to use key order fix.
If pending event only have preedit, then it's generally fine to not use key forward.
Definition at line 392 of file inputcontext.cpp.
void fcitx::UserInterfaceManager::hideVirtualKeyboard | ( | ) | const |
Hide the virtual keyboard.
This is a no-op if active addon is not a virtual keyboard addon.
Definition at line 332 of file userinterfacemanager.cpp.
const InputPanel & fcitx::InputContext::inputPanel | ( | ) | const |
Instance * fcitx::AddonManager::instance | ( | ) |
Return the fcitx instance when it is created by Fcitx.
Definition at line 357 of file addonmanager.cpp.
|
inline |
|
inline |
void fcitx::UserInterfaceManager::load | ( | const std::string & | ui = {} | ) |
Initialize the UI Addon.
If passed with a certain UI name, only that UI is treated as the usable UI.
Definition at line 142 of file userinterfacemanager.cpp.
void fcitx::InputMethodManager::load | ( | const std::function< void(InputMethodManager &)> & | buildDefaultGroupCallback = {} | ) |
Load the input method information from disk.
If it does not exist, use the callback to create the default setup.
Definition at line 217 of file inputmethodmanager.cpp.
void fcitx::AddonManager::load | ( | const std::unordered_set< std::string > & | enabled = {} , |
const std::unordered_set< std::string > & | disabled = {} |
||
) |
Load addon based on given parameter.
By default, addon is enable or disabled by config file, but enabled or disabled may be used to override it.
Usually this function should only be called once. You can pass –enable=... –disable= in fcitx's flag to set it. "enabled" will override "disabled" if they have same addon name in it.
A special name "all" can be used to enable or disable all addons.
enabled | set of additionally enabled addons. |
disabled | set of disabled addons |
Definition at line 245 of file addonmanager.cpp.
Action * fcitx::UserInterfaceManager::lookupAction | ( | const std::string & | name | ) | const |
Lookup an action by the name.
Return null if action is not found.
Definition at line 208 of file userinterfacemanager.cpp.
Action * fcitx::UserInterfaceManager::lookupActionById | ( | int | id | ) | const |
Lookup an action by id.
Return null if action is not found.
Definition at line 217 of file userinterfacemanager.cpp.
Text fcitx::Text::normalize | ( | ) | const |
|
inline |
Key event regardless of keyboard layout conversion.
const std::string & fcitx::InputContext::program | ( | ) | const |
Returns the program name of input context.
It can be empty depending on the application.
Definition at line 97 of file inputcontext.cpp.
|
inline |
Helper function to return the input context property in specific type.
T | type of the input context property. |
name | name of the input context property. |
Definition at line 264 of file inputcontext.h.
|
inline |
Helper function to return the input context property in specific type by given factory.
T | type of the input context property factory. |
name | name of the input context property. |
Definition at line 277 of file inputcontext.h.
|
inline |
void fcitx::InputMethodManager::refresh | ( | ) |
Load new input method configuration file from disk.
It only load "new" input method configuration, and it would not update the loaded data. Should only be used after load is called.
Definition at line 242 of file inputmethodmanager.cpp.
bool fcitx::UserInterfaceManager::registerAction | ( | const std::string & | name, |
Action * | action | ||
) |
Register an named action.
The action should have a meaningful unique name. A common use case for the name is to allow an input method to enable a feature exposed by other addons.
Definition at line 184 of file userinterfacemanager.cpp.
bool fcitx::UserInterfaceManager::registerAction | ( | Action * | action | ) |
Register an anonymous action.
Definition at line 169 of file userinterfacemanager.cpp.
void fcitx::AddonManager::registerDefaultLoader | ( | StaticAddonRegistry * | registry | ) |
Register addon loader, including static and shared library loader.
This function usually need to be called before any other function call to addon manager.
registry | static addon registry that can be used to set a list of built-in addons. |
Definition at line 238 of file addonmanager.cpp.
bool fcitx::InputContextPropertyFactory::registered | ( | ) | const |
Return whether the factory is already registered with an InputContextManager.
Definition at line 17 of file inputcontextproperty.cpp.
void fcitx::AddonManager::registerLoader | ( | std::unique_ptr< AddonLoader > | loader | ) |
Register new addon loader.
loader | addon loader instance. |
Definition at line 224 of file addonmanager.cpp.
void fcitx::InputContext::reset | ( | ) |
Called when input context state need to be reset.
Input context need to have focus.
Definition at line 353 of file inputcontext.cpp.
void fcitx::InputMethodManager::save | ( | ) |
Save the input method information to disk.
Commonly, the storage path will be ~/.config/fcitx5/profile.
Definition at line 412 of file inputmethodmanager.cpp.
void fcitx::AddonManager::saveAll | ( | ) |
Save all addon configuration.
Definition at line 307 of file addonmanager.cpp.
void fcitx::InputContext::setBlockEventToClient | ( | bool | block | ) |
Prevent event deliver to input context, and re-send the event later.
This should be only used by frontend to make sync and async event handled in the same order.
block | block state of input context. |
Definition at line 374 of file inputcontext.cpp.
void fcitx::InputContext::setCapabilityFlags | ( | CapabilityFlags | flags | ) |
Update the capability flags of the input context.
Definition at line 200 of file inputcontext.cpp.
void fcitx::InputMethodManager::setCurrentGroup | ( | const std::string & | group | ) |
Set the name of current group, rest of the group order will be adjusted accordingly.
Definition at line 259 of file inputmethodmanager.cpp.
void fcitx::SurroundingText::setCursor | ( | unsigned int | cursor, |
unsigned int | anchor | ||
) |
Set current cursor and anchor of surrounding text.
If cursor and anchor are out of range, it will be reset to invalid state. This function is useful to safe some bandwidth.
cursor | offset of cursor in character. |
anchor | offset of anchor in character. |
Definition at line 89 of file surroundingtext.cpp.
void fcitx::InputPanel::setCustomInputPanelCallback | ( | CustomInputPanelCallback | callback | ) |
Set a custom callback to display the input panel.
When this is set, Instance::updateUserInterface(UserInterfaceComponent::InputPanel) will trigger a call to the callback function instead. The capability flag ClientSideInputPanel will not be respected, but the clientPreedit will still be sent if InputContext::updatePreedit is called.
All the UI display batching logic still applies. The actual update that triggers this callback will be called as a deferred event after current event. If you need UI update right away (rare), you can still true as immediate to Instance::updateUserInterface.
callback | callback to display input panel. |
Definition at line 86 of file inputpanel.cpp.
void fcitx::InputMethodManager::setDefaultInputMethod | ( | const std::string & | name | ) |
Set default input method for current group.
Definition at line 311 of file inputmethodmanager.cpp.
void fcitx::AddonManager::setEventLoop | ( | EventLoop * | eventLoop | ) |
Set event loop.
It should be only used with stand alone AddonManager. E.g. write test or for some special purpose.
eventLoop | event loop. |
Definition at line 368 of file addonmanager.cpp.
void fcitx::InputContext::setFocusGroup | ( | FocusGroup * | group | ) |
Set the focus group of this input context.
group can be null if it does not belong to any group.
Definition at line 254 of file inputcontext.cpp.
|
inline |
void fcitx::InputMethodManager::setGroup | ( | InputMethodGroup | newGroupInfo | ) |
Update the information of an existing group.
The group info will be revalidated and filtered to the existing input methods.
Definition at line 323 of file inputmethodmanager.cpp.
void fcitx::InputMethodManager::setGroupOrder | ( | const std::vector< std::string > & | groups | ) |
Update the initial order of groups.
This function should be only used in the buildDefaultGroupCallback. Otherwise the group order can be only modified via setCurrentGroup.
groups | the order of groups. |
Definition at line 457 of file inputmethodmanager.cpp.
|
inline |
|
inline |
|
inline |
void fcitx::SurroundingText::setText | ( | const std::string & | text, |
unsigned int | cursor, | ||
unsigned int | anchor | ||
) |
Set current of surrounding text.
If cursor and anchor are out of range, it will be reset to invalid state.
text | text |
cursor | offset of cursor in character. |
anchor | offset of anchor in character. |
Definition at line 73 of file surroundingtext.cpp.
void fcitx::UserInterfaceManager::showVirtualKeyboard | ( | ) | const |
Show the virtual keyboard.
This is a no-op if active addon is not a virtual keyboard addon.
Definition at line 319 of file userinterfacemanager.cpp.
std::vector< Text > fcitx::Text::splitByLine | ( | ) | const |
const StatusArea & fcitx::InputContext::statusArea | ( | ) | const |
SurroundingText & fcitx::InputContext::surroundingText | ( | ) |
Returns the mutable surrounding text of the input context.
updateSurroundingText() need to be called after changes by frontend.
Definition at line 359 of file inputcontext.cpp.
|
inline |
void fcitx::AddonManager::unload | ( | ) |
Destruct all addon, all information is cleared to the initial state.
But depending on the addon it loads, it may have some leftover data in the memory.
Definition at line 290 of file addonmanager.cpp.
void fcitx::AddonManager::unregisterLoader | ( | const std::string & | name | ) |
Unregister addon loader.
name | name of addon type. |
Definition at line 233 of file addonmanager.cpp.
void fcitx::UserInterfaceManager::update | ( | UserInterfaceComponent | component, |
InputContext * | inputContext | ||
) |
Mark a user interface component to be updated for given input context.
The update will not happen immediately.
Definition at line 226 of file userinterfacemanager.cpp.
|
protectedvirtual |
Send the UI update to client.
Definition at line 472 of file inputcontext.cpp.
void fcitx::InputContext::updatePreedit | ( | ) |
Notifies client about changes in clientPreedit.
Definition at line 432 of file inputcontext.cpp.
|
protectedpure virtual |
Send the preedit update to the client.
void fcitx::InputContext::updateProperty | ( | const std::string & | name | ) |
Notifies the change of a given input context property.
name | name of the input context property. |
Definition at line 132 of file inputcontext.cpp.
void fcitx::InputContext::updateProperty | ( | const InputContextPropertyFactory * | factory | ) |
Notifies the change of a given input context property by its factory.
name | name of the input context property. |
Definition at line 141 of file inputcontext.cpp.
void fcitx::InputContext::updateUserInterface | ( | UserInterfaceComponent | component, |
bool | immediate = false |
||
) |
Notifies UI about changes in user interface.
component | The components of UI that need to be updated. |
immediate | immediately flush the update to UI. |
Definition at line 446 of file inputcontext.cpp.
void fcitx::UserInterfaceManager::updateVirtualKeyboardVisibility | ( | ) |
Invoke by user interface addon to notify if there is any virtual keyboard visibility change.
User interface addon must call this function to make user interface manager update its cached visibility.
Definition at line 345 of file userinterfacemanager.cpp.
bool fcitx::InputContext::virtualKeyboardEvent | ( | VirtualKeyboardEvent & | event | ) |
Send a virtual keyboard event to current input context.
event | virtual keyboard event |
Definition at line 328 of file inputcontext.cpp.