예제 #1
0
void ToggleFullWidthState(void* arg)
{
    FcitxFullWidthChar* fwchar = (FcitxFullWidthChar*)arg;
    FcitxProfile* profile = FcitxInstanceGetProfile(fwchar->owner);
    profile->bUseFullWidthChar = !profile->bUseFullWidthChar;
    FcitxProfileSave(profile);
    FcitxInstanceResetInput(fwchar->owner);
}
예제 #2
0
파일: ui.c 프로젝트: hiroshiyui/fcitx
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);
}
예제 #3
0
파일: ui.c 프로젝트: pkg-ime/fcitx
FCITX_EXPORT_API
void FcitxUIOnInputFocus(FcitxInstance* instance)
{
    if (UI_FUNC_IS_VALID(OnInputFocus))
        instance->ui->ui->OnInputFocus(instance->ui->addonInstance);

    FcitxInstanceProcessInputFocusHook(instance);

    FcitxInstanceResetInput(instance);
    if (instance->config->firstAsInactive) {
        if (FcitxInstanceGetCurrentState(instance) == IS_ACTIVE)
            FcitxInstanceSwitchIM(instance, instance->lastIMIndex);
        else if (FcitxInstanceGetCurrentState(instance) == IS_ENG) {
            if (instance->iIMIndex != 0)
                instance->lastIMIndex = instance->iIMIndex;
            FcitxInstanceSwitchIMInternal(instance, 0, false);
        }
    }

    FcitxUICloseInputWindow(instance);
}
예제 #4
0
파일: ui.c 프로젝트: 13572293130/fcitx
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);
}