int hime_get_preedit(ClientState *cs, char *str, HIME_PREEDIT_ATTR attr[], int *cursor, int *comp_flag) { // dbg("hime_get_preedit %x\n", current_CS); if (!current_CS) { //empty: // dbg("empty\n"); str[0]=0; *cursor=0; return 0; } str[0]=0; *comp_flag=0; // cs->use_preedit = TRUE; switch(current_method_type()) { case method_type_PHO: return pho_get_preedit(str, attr, cursor, comp_flag); #if USE_TSIN case method_type_TSIN: return tsin_get_preedit(str, attr, cursor, comp_flag); #endif case method_type_MODULE: if (inmd[current_CS->in_method].mod_cb_funcs) return module_cb()->module_get_preedit(str, attr, cursor, comp_flag); default: return gtab_get_preedit(str, attr, cursor, comp_flag); // dbg("metho %d\n", current_CS->in_method); } return 0; }
int gcin_get_preedit(ClientState *cs, char *str, GCIN_PREEDIT_ATTR attr[], int *cursor, int *sub_comp_len) { // dbg("gcin_get_preedit %x\n", current_CS); if (!current_CS) { empty: // dbg("empty\n"); str[0]=0; *cursor=0; return 0; } str[0]=0; *sub_comp_len=0; // cs->use_preedit = TRUE; switch(current_method_type()) { case method_type_PHO: return pho_get_preedit(str, attr, cursor, sub_comp_len); case method_type_INT_CODE: return int_get_preedit(str, attr, cursor, sub_comp_len); #if USE_TSIN case method_type_TSIN: return tsin_get_preedit(str, attr, cursor, sub_comp_len); #endif #if USE_ANTHY case method_type_ANTHY: return anthy_get_preedit(str, attr, cursor); #endif default: return gtab_get_preedit(str, attr, cursor, sub_comp_len); // dbg("metho %d\n", current_CS->in_method); } return 0; }