static void AutoEngGetSpellHint(FcitxAutoEngState *autoEngState) { FcitxCandidateWordList *candList; if (autoEngState->config.disableSpell) return; candList = InvokeVaArgs(autoEngState->owner, FCITX_SPELL, GET_CANDWORDS, NULL, autoEngState->buf, NULL, (void*)(long)autoEngState->config.maxHintLength, "en", "cus", AutoEngGetCandWordCb, autoEngState); if (candList) { FcitxInputState *input = FcitxInstanceGetInputState(autoEngState->owner); FcitxCandidateWordList *iList = FcitxInputStateGetCandidateList(input); FcitxCandidateWordSetChooseAndModifier( iList, DIGIT_STR_CHOOSE, cmodtable[autoEngState->config.chooseModifier]); FcitxCandidateWordMerge(iList, candList, -1); FcitxCandidateWordFreeList(candList); } }
static void AutoEngGetSpellHint(FcitxAutoEngState *autoEngState) { FcitxCandidateWordList *candList; if (autoEngState->config.disableSpell) return; candList = FcitxSpellGetCandWords(autoEngState->owner, NULL, autoEngState->buf, NULL, autoEngState->config.maxHintLength, "en", "cus", AutoEngGetCandWordCb, autoEngState); if (candList) { FcitxInputState *input = FcitxInstanceGetInputState(autoEngState->owner); FcitxCandidateWordList *iList = FcitxInputStateGetCandidateList(input); FcitxCandidateWordSetOverrideDefaultHighlight(iList, false); FcitxCandidateWordSetChooseAndModifier( iList, DIGIT_STR_CHOOSE, cmodtable[autoEngState->config.chooseModifier]); FcitxCandidateWordMerge(iList, candList, -1); FcitxCandidateWordFreeList(candList); } }