void toggle_im_enabled() { // dbg("toggle_im_enabled\n"); check_CS(); if (current_CS->in_method < 0 || current_CS->in_method > MAX_GTAB_NUM_KEY) p_err("err found"); if (current_CS->im_state != GCIN_STATE_DISABLED) { if (current_CS->im_state == GCIN_STATE_ENG_FULL) { current_CS->im_state = GCIN_STATE_CHINESE; disp_im_half_full(); return; } if (current_method_type() == method_type_TSIN) { #if USE_TSIN flush_tsin_buffer(); #endif } else { output_gbuf(); reset_gtab_all(); } hide_in_win(current_CS); #if 0 hide_win_status(); #endif current_CS->im_state = GCIN_STATE_DISABLED; update_win_kbm(); #if TRAY_ENABLED disp_tray_icon(); #endif } else { if (!current_method_type()) init_gtab(current_CS->in_method); init_state_chinese(current_CS); reset_current_in_win_xy(); #if 1 show_in_win(current_CS); update_in_win_pos(); #else update_in_win_pos(); show_in_win(current_CS); #endif update_win_kbm(); #if TRAY_ENABLED disp_tray_icon(); #endif } }
void toggle_half_full_char() { #if WIN32 if (test_mode) return; #endif check_CS(); if (!hime_shift_space_eng_full) { current_CS->b_half_full_char = 0; tss.tsin_half_full=0; disp_im_half_full(); return; } // dbg("toggle_half_full_char\n"); if (current_method_type() == method_type_TSIN && current_CS->im_state == HIME_STATE_CHINESE) { tsin_toggle_half_full(); } else { if (current_CS->im_state == HIME_STATE_ENG_FULL) { current_CS->im_state = HIME_STATE_DISABLED; hide_in_win(current_CS); } else if (current_CS->im_state == HIME_STATE_DISABLED) { toggle_im_enabled(); current_CS->im_state = HIME_STATE_ENG_FULL; } else if (current_CS->im_state == HIME_STATE_CHINESE) { current_CS->b_half_full_char = !current_CS->b_half_full_char; } // dbg("current_CS->in_method %d\n", current_CS->in_method); disp_im_half_full(); } save_CS_current_to_temp(); // dbg("half full toggle\n"); }
// <Shift><Space> is pressed void toggle_half_full_char() { check_CS(); if (!hime_shift_space_eng_full) { current_CS->b_half_full_char = 0; tss.tsin_half_full=0; disp_im_half_full(); return; } // dbg("toggle_half_full_char\n"); if (current_method_type() == method_type_TSIN && current_CS->im_state == HIME_STATE_CHINESE) { tsin_toggle_half_full(); } else { switch (current_CS->im_state) { case HIME_STATE_ENG_FULL: current_CS->im_state = HIME_STATE_DISABLED; hide_in_win(current_CS); break; case HIME_STATE_DISABLED: toggle_im_enabled(); current_CS->im_state = HIME_STATE_ENG_FULL; break; case HIME_STATE_CHINESE: current_CS->b_half_full_char = !current_CS->b_half_full_char; break; } // dbg("current_CS->in_method %d\n", current_CS->in_method); disp_im_half_full(); } save_CS_current_to_temp(); // dbg("half full toggle\n"); }
void toggle_im_enabled() { // dbg("toggle_im_enabled\n"); check_CS(); if (current_CS->in_method < 0) p_err("err found"); if (current_CS->im_state != HIME_STATE_DISABLED) { if (current_CS->im_state == HIME_STATE_ENG_FULL) { current_CS->im_state = HIME_STATE_CHINESE; disp_im_half_full(); save_CS_current_to_temp(); return; } if (current_method_type() == method_type_TSIN) { #if USE_TSIN flush_tsin_buffer(); #endif } else if (current_method_type () == method_type_MODULE) { module_cb ()->module_flush_input (); } else { output_gbuf(); reset_gtab_all(); } hide_in_win(current_CS); #if 0 hide_win_status(); #endif current_CS->im_state = HIME_STATE_DISABLED; update_win_kbm(); #if TRAY_ENABLED disp_tray_icon(); #endif } else { if (!current_method_type()) init_gtab(current_CS->in_method); init_state_chinese(current_CS); reset_current_in_win_xy(); #if 1 show_in_win(current_CS); update_in_win_pos(); #else update_in_win_pos(); show_in_win(current_CS); #endif update_win_kbm(); #if TRAY_ENABLED disp_tray_icon(); #endif } save_CS_current_to_temp(); }