FCITX_EXPORT_API void FcitxUIOnTriggerOn(FcitxInstance* instance) { if (UI_FUNC_IS_VALID(OnTriggerOn)) instance->ui->ui->OnTriggerOn(instance->ui->addonInstance); FcitxInstanceProcessTriggerOnHook(instance); instance->timeStart = time(NULL); FcitxInstanceShowInputSpeed(instance); }
FCITX_EXPORT_API void FcitxUIOnInputFocus(FcitxInstance* instance) { if (UI_FUNC_IS_VALID(OnInputFocus)) instance->ui->ui->OnInputFocus(instance->ui->addonInstance); FcitxInstanceProcessInputFocusHook(instance); FcitxInstanceResetInput(instance); boolean changed = FcitxInstanceUpdateCurrentIM(instance, false); if (instance->config->bShowInputWindowWhenFocusIn && changed) FcitxInstanceShowInputSpeed(instance); else FcitxUICloseInputWindow(instance); }
FCITX_EXPORT_API void FcitxUIOnInputFocus(FcitxInstance* instance) { if (UI_FUNC_IS_VALID(OnInputFocus)) instance->ui->ui->OnInputFocus(instance->ui->addonInstance); FcitxInstanceProcessInputFocusHook(instance); FcitxInstanceResetInput(instance); boolean changed; if (instance->lastIC == instance->CurrentIC && instance->delayedIM) { FcitxInstanceSwitchIMByName(instance, instance->delayedIM); changed = true; } else { changed = FcitxInstanceUpdateCurrentIM(instance, false, false); } if (instance->config->bShowInputWindowWhenFocusIn && changed) FcitxInstanceShowInputSpeed(instance); else FcitxUICloseInputWindow(instance); }