📄 wgui_categories_inputs.c
字号:
#if defined __MMI_LANG_HINDI__ && defined __MMI_LANG_ARABIC__
extern S32 HINDI_PRESENT;
extern S32 ARABIC_PRESENT;
#endif
//END PMTFARHAD 20050224
void change_input_mode(void)
{
U8 i;
U8 input_method_exit_flag = FALSE;
/* Begin AP input mode set */
if (MMI_AP_set_input_mode_set)
{
i=0;
while (MMI_AP_required_input_mode_set[i] != MMI_current_input_mode &&
MMI_AP_required_input_mode_set[i] != -1)
{
i++;
}
#if defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__)
do
{
if (MMI_AP_required_input_mode_set[i] == -1 || //cannot be found
MMI_AP_required_input_mode_set[i + 1] == -1) //cyclic to the first one
{
i = 0;
if(test_change_input_mode() == 0)
{
wgui_change_to_english_only_mode(i);
}
else
{
MMI_current_input_mode = (U8)MMI_AP_required_input_mode_set[wgui_ap_inputset_set_current_or_find_next_loaded_input_mode(0)];
}
input_method_exit_flag = TRUE;
}
else
{
#if defined (__MMI_LANG_HINDI__ ) && defined (__MMI_LANG_ARABIC__)
if((HINDI_PRESENT) && (MMI_AP_required_input_mode_set[i + 1]==INPUT_MODE_SMART_ARABIC))
{
if(test_change_input_mode() == 0)
{
wgui_change_to_english_only_mode(i + 2);
}
else
{
MMI_current_input_mode = (U8)MMI_AP_required_input_mode_set[wgui_ap_inputset_set_current_or_find_next_loaded_input_mode(i+2)];
}
}
else if((ARABIC_PRESENT) && (MMI_AP_required_input_mode_set[i + 1]==INPUT_MODE_MULTITAP_HINDI))
{
if(test_change_input_mode() == 0)
{
wgui_change_to_english_only_mode(i + 2);
}
else
{
MMI_current_input_mode = (U8)MMI_AP_required_input_mode_set[wgui_ap_inputset_set_current_or_find_next_loaded_input_mode(i+2)];
}
}
else
#endif
{
if(test_change_input_mode() == 0)
{
wgui_change_to_english_only_mode(i + 1);
}
else
{
MMI_current_input_mode = (U8)MMI_AP_required_input_mode_set[wgui_ap_inputset_set_current_or_find_next_loaded_input_mode(i+1)];
}
}
}
i++;
}
while (MMI_current_input_mode == INPUT_MODE_MULTITAP_UPPERCASE_ABC_NO_NUMERIC ||
MMI_current_input_mode == INPUT_MODE_MULTITAP_LOWERCASE_ABC_NO_NUMERIC ||
MMI_current_input_mode == INPUT_MODE_123_SYMBOLS);
#else //#if defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__)
if (MMI_AP_required_input_mode_set[i] == -1 || //cannot be found
MMI_AP_required_input_mode_set[i + 1] == -1) //cyclic to the first one
{
i = 0;
if(test_change_input_mode() == 0)
{
wgui_change_to_english_only_mode(i);
}
else
{
MMI_current_input_mode = (U8)MMI_AP_required_input_mode_set[wgui_ap_inputset_set_current_or_find_next_loaded_input_mode(0)];
}
input_method_exit_flag = TRUE;
}
else //next one
{
#if defined (__MMI_LANG_HINDI__ ) && defined (__MMI_LANG_ARABIC__)
if ((HINDI_PRESENT) && (MMI_AP_required_input_mode_set[i + 1] == INPUT_MODE_SMART_ARABIC))
{
if (test_change_input_mode() == 0)
{
wgui_change_to_english_only_mode(i + 2);
}
else
{
MMI_current_input_mode = (U8)MMI_AP_required_input_mode_set[wgui_ap_inputset_set_current_or_find_next_loaded_input_mode(i+2)];
}
}
else if ((ARABIC_PRESENT) && (MMI_AP_required_input_mode_set[i + 1]==INPUT_MODE_MULTITAP_HINDI))
{
if (test_change_input_mode() == 0)
{
wgui_change_to_english_only_mode(i+2);
}
else
{
MMI_current_input_mode = (U8)MMI_AP_required_input_mode_set[wgui_ap_inputset_set_current_or_find_next_loaded_input_mode(i+2)];
}
}
else
#endif
{
if(test_change_input_mode() == 0)
{
wgui_change_to_english_only_mode(i + 1);
}
else
{
MMI_current_input_mode = (U8)MMI_AP_required_input_mode_set[wgui_ap_inputset_set_current_or_find_next_loaded_input_mode(i+1)];
}
}
}
#endif /* __MMI_WCSS_INPUT_FORMAT_SUPPORT__ */
}
else //else of if(MMI_AP_set_input_mode_set)
{
/* End AP input mode set */
if(MMI_allow_only_english_input_modes)
{
i=0;
while(MMI_english_input_mode_set[i] != MMI_current_input_mode && MMI_english_input_mode_set[i] != 0xff)
{
i++;
}
#if defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__)
do
{
if(MMI_english_input_mode_set[i]==0xff) //cannot be found
{
i = 0;
MMI_current_input_mode = MMI_english_input_mode_set[0];
}
else if(MMI_english_input_mode_set[i+1]==0xff)
{
i=0;
MMI_current_input_mode = MMI_english_input_mode_set[0];
#ifndef __MMI_KA__//because KA doesnot support smart English input modes
input_method_exit_flag = TRUE;
#endif
}
else
MMI_current_input_mode = MMI_english_input_mode_set[i+1];
i++;
}while(MMI_current_input_mode== INPUT_MODE_MULTITAP_UPPERCASE_ABC_NO_NUMERIC ||
MMI_current_input_mode== INPUT_MODE_MULTITAP_LOWERCASE_ABC_NO_NUMERIC||
MMI_current_input_mode== INPUT_MODE_123_SYMBOLS);
#else /* __MMI_WCSS_INPUT_FORMAT_SUPPORT__ */
if(MMI_english_input_mode_set[i]==0xff) //cannot be found
MMI_current_input_mode = MMI_english_input_mode_set[0];
else if(MMI_english_input_mode_set[i+1]==0xff) // cyclic to the first one
{
MMI_current_input_mode = MMI_english_input_mode_set[0];
#ifndef __MMI_KA__//because KA doesnot support smart English input modes
input_method_exit_flag = TRUE;
#endif
}
else //next one
MMI_current_input_mode = MMI_english_input_mode_set[i+1];
#endif /* __MMI_WCSS_INPUT_FORMAT_SUPPORT__ */
}
else
{
if(test_change_input_mode()==1)
{
i=0;
while(MMI_all_input_mode_set[i] != MMI_current_input_mode && MMI_all_input_mode_set[i] != 0xff)
{
i++;
}
#if defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__)
do
{
if(MMI_all_input_mode_set[i]==0xff)
{
i = 0;
MMI_current_input_mode = MMI_all_input_mode_set[0];
//PMT VIKAS GUPTA START 20051129
input_method_exit_flag = TRUE;
//PMT VIKAS GUPTA END 20051129
}
if(MMI_all_input_mode_set[i+1]==0xff)
{
i = 0;
MMI_current_input_mode = MMI_all_input_mode_set[0];
input_method_exit_flag = TRUE;
}
else
//STRAT FARHAD PIXTELMTK 20050217
{
#if defined (__MMI_LANG_HINDI__ )&& defined (__MMI_LANG_ARABIC__)
//START PMTFARHAD 20050224
if((HINDI_PRESENT)&&(MMI_all_input_mode_set[i+1]==INPUT_MODE_SMART_ARABIC))
//MMI_current_input_mode=INPUT_MODE_MULTITAP_HINDI;
MMI_current_input_mode=MMI_all_input_mode_set[i+2];
else if((ARABIC_PRESENT)&&(MMI_all_input_mode_set[i+1]==INPUT_MODE_MULTITAP_HINDI))
//MMI_current_input_mode=INPUT_MODE_MULTITAP_UPPERCASE_ABC;
MMI_current_input_mode=MMI_all_input_mode_set[i+2];
//END PMTFARHAD 20050224
else
#endif
MMI_current_input_mode = MMI_all_input_mode_set[i+1];
}
//END FARHAD PIXTELMTK 20050217
i++;
}while(MMI_current_input_mode== INPUT_MODE_MULTITAP_UPPERCASE_ABC_NO_NUMERIC ||
MMI_current_input_mode== INPUT_MODE_MULTITAP_LOWERCASE_ABC_NO_NUMERIC||
MMI_current_input_mode== INPUT_MODE_123_SYMBOLS);
#else
if(MMI_all_input_mode_set[i]==0xff) //cannot be found
{
MMI_current_input_mode = MMI_all_input_mode_set[0];
//PMT VIKAS GUPTA START 20051129
input_method_exit_flag = TRUE;
//PMT VIKAS GUPTA END 20051129
}
else if(MMI_all_input_mode_set[i+1]==0xff) // cyclic to the first one
{
MMI_current_input_mode = MMI_all_input_mode_set[0];
input_method_exit_flag = TRUE;
}
else
//STRAT FARHAD PIXTELMTK 20050217 //next one
{
#if defined (__MMI_LANG_HINDI__ )&& defined (__MMI_LANG_ARABIC__)
//START PMTFARHAD 20050224
if((HINDI_PRESENT)&&(MMI_all_input_mode_set[i+1]==INPUT_MODE_SMART_ARABIC))
//MMI_current_input_mode=INPUT_MODE_MULTITAP_HINDI;
MMI_current_input_mode=MMI_all_input_mode_set[i+2];
else if((ARABIC_PRESENT)&&(MMI_all_input_mode_set[i+1]==INPUT_MODE_MULTITAP_HINDI))
//MMI_current_input_mode=INPUT_MODE_MULTITAP_UPPERCASE_ABC;
MMI_current_input_mode=MMI_all_input_mode_set[i+2];
//END PMTFARHAD 20050224
else
#endif
MMI_current_input_mode = MMI_all_input_mode_set[i+1];
}
//END FARHAD PIXTELMTK 20050217
#endif /* __MMI_WCSS_INPUT_FORMAT_SUPPORT__ */
}
else
{
i=0;
while(MMI_english_input_mode_set[i] != MMI_current_input_mode && MMI_english_input_mode_set[i] != 0xff)
{
i++;
}
#if defined(__MMI_WCSS_INPUT_FORMAT_SUPPORT__)
do
{
if(MMI_english_input_mode_set[i]==0xff) //cannot be found
{
i = 0;
MMI_current_input_mode = MMI_english_input_mode_set[0];
input_method_exit_flag = TRUE;
}
if(MMI_english_input_mode_set[i+1]==0xff)
{
i=0;
MMI_current_input_mode = MMI_english_input_mode_set[0];
#ifndef __MMI_KA__//because KA doesnot support smart English input modes
input_method_exit_flag = TRUE;
#endif
}
else
//STRAT FARHAD PIXTELMTK 20050217
{
#if defined (__MMI_LANG_HINDI__ )&& defined (__MMI_LANG_ARABIC__)
//START PMTFARHAD 20050224
if((HINDI_PRESENT)&&(MMI_all_input_mode_set[i+1]==INPUT_MODE_SMART_ARABIC))
//MMI_current_input_mode=INPUT_MODE_MULTITAP_HINDI;
MMI_current_input_mode=MMI_all_input_mode_set[i+2];
else if((ARABIC_PRESENT)&&(MMI_all_input_mode_set[i+1]==INPUT_MODE_MULTITAP_HINDI))
//MMI_current_input_mode=INPUT_MODE_MULTITAP_UPPERCASE_ABC;
MMI_current_input_mode=MMI_all_input_mode_set[i+2];
//END PMTFARHAD 20050224
else
#endif
MMI_current_input_mode = MMI_english_input_mode_set[i+1];
}
//END FARHAD PIXTELMTK 20050217
i++;
}while(MMI_current_input_mode== INPUT_MODE_MULTITAP_UPPERCASE_ABC_NO_NUMERIC ||
MMI_current_input_mode== INPUT_MODE_MULTITAP_LOWERCASE_ABC_NO_NUMERIC||
MMI_current_input_mode== INPUT_MODE_123_SYMBOLS);
#else
if(MMI_english_input_mode_set[i]==0xff) //cannot be found
{
MMI_current_input_mode = MMI_english_input_mode_set[0];
input_method_exit_flag = TRUE;
}
else if(MMI_english_input_mode_set[i+1]==0xff) // cyclic to the first one
{
MMI_current_input_mode = MMI_english_input_mode_set[0];
#ifndef __MMI_KA__//because KA doesnot support smart English input modes
input_method_exit_flag = TRUE;
#endif
}
else
//STRAT FARHAD PIXTELMTK 20050217 //next one
{
#if defined __MMI_LANG_HINDI__ && defined __MMI_LANG_ARABIC__
//START PMTFARHAD 20050224
if((HINDI_PRESENT)&&(MMI_all_input_mode_set[i+1]==INPUT_MODE_SMART_ARABIC))
//MMI_current_input_mode=INPUT_MODE_MULTITAP_HINDI;
MMI_current_input_mode=MMI_all_input_mode_set[i+2];
else if((ARABIC_PRESENT)&&(MMI_all_input_mode_set[i+1]==INPUT_MODE_MULTITAP_HINDI))
//MMI_current_input_mode=INPUT_MODE_MULTITAP_UPPERCASE_ABC;
MMI_current_input_mode=MMI_all_input_mode_set[i+2];
//END PMTFARHAD 20050224
else
#endif
MMI_current_input_mode = MMI_english_input_mode_set[i+1];
}
//END FARHAD PIXTELMTK 20050217
#endif /* __MMI_WCSS_INPUT_FORMAT_SUPPORT__ */
}
}
/* Begin AP input mode set */
}
/* End AP input mode set */
/* W06.10 Fix RSK Display Issue*/
#if !defined(__MMI_TOUCH_SCREEN__)
//START VIJAY PMT 20050728
#if defined(__MMI_MULTITAP_HINDI__)
//PMT START MAUI_00223197
if(MMI_current_input_mode == INPUT_MODE_MULTITAP_HINDI || input_method_exit_flag == TRUE)
//PMT END MAUI_00223197
{
#else
if(MMI_current_input_mode == INPUT_MODE_MULTITAP_UPPERCASE_ABC && input_method_exit_flag == TRUE)
{
#endif
//END VIJAY PMT 20050728
#ifdef __MMI_T9__
T9InputMethodExit();
#elif defined(__MMI_ZI__)
ZiInputMethodExit();
#elif defined(__MMI_KA__)
KonkaInputMethodExit();
#elif defined(__MMI_ITAP__)
ItapInputMethodExit();
#elif defined(__MMI_GB__) // change to MULTITAP close the candidate windows
GBInputMethodExit();
#endif
}
#endif
/* W06.10 Fix E-Dict Null Pointer Function Issue*/
if (wgui_check_pound_key_buffer_flush)
{
if(wgui_check_pound_key_buffer_flush())
{
multiline_inputbox_delete_all_characters();
}
}
inputbox_change_mode();
//MTK Elvis
set_MMI_current_input_type();
//MTK end
}
/*----------------------------------------------------------------------------
Function: change_singleline_input_mode
Description: Changes the current input mode (cyclic "ABC"->"abc"->"123"->"ABC")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -