|
Wui_ems_categories.c处理
void change_EMS_inputbox_mode(U8 mode);
这个函数主要是将输入法模式改过来。
然后在每一次切换输入法之后把*键的功能改为切换输入法。
void change_EMS_inputbox_mode(U8 mode)
{
/*----------------------------------------------------------------*/
/* Local Variables??????????????????????????????????????????????? */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body???????????????????????????????? ?????????????????????*/
/*----------------------------------------------------------------*/
/* PMT dara added for Multitap thai */
#if defined(__MMI_MULTITAP_THAI__)
SetKeyHandler(handle_category28_change_input_mode, KEY_POUND, KEY_EVENT_DOWN);
#endif
switch (mode)
{
case INPUT_MODE_MULTITAP_UPPERCASE_ABC:
change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_ABC);
register_EMS_multitap_function();
#ifdef __MMI_GUOBI__
//*键切换输入法
SetKeyHandler(mmi_pen_editor_switch_input_method, KEY_STAR, KEY_EVENT_DOWN);
#endif
break;
case INPUT_MODE_MULTITAP_LOWERCASE_ABC:
change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_ABC);
register_EMS_multitap_function();
#ifdef __MMI_GUOBI__
//*键切换输入法
SetKeyHandler(mmi_pen_editor_switch_input_method, KEY_STAR, KEY_EVENT_DOWN);
#endif
break;
…………………………..
case INPUT_MODE_123:
change_multitap_mode(INPUT_MODE_123);
clear_multitap_key_handlers();
register_MMI_key_input_handler();
register_key_down_handler(EMS_inputbox_handle_key_down);
register_keyboard_input_handler(EMS_inputbox_numeric_keyboard_input_handler);
wgui_set_EMS_inputbox_RSK();
register_EMS_inputbox_keys();
if ((MMI_current_input_type & INPUT_TYPE_MASK) == INPUT_TYPE_NUMERIC_CHANGEABLE)
{
SetKeyHandler(wgui_EMS_inputbox_handle_symbol_picker_star_key, KEY_STAR, KEY_EVENT_DOWN);
}
#ifdef __MMI_GUOBI__
SetKeyHandler(mmi_pen_editor_switch_input_method, KEY_STAR, KEY_EVENT_DOWN);
#endif
break;
….
#ifdef __MMI_GUOBI__
case INPUT_MODE_SM_PINYIN:
case INPUT_MODE_SM_STROKE:
case INPUT_MODE_SMART_UPPERCASE_ABC:
case INPUT_MODE_SMART_LOWERCASE_ABC:
输入法模式切换
这里面会把上下左右设置EMS处理
*键处理
#endif
void handle_category28_change_input_mode(void)函数
这个函数主要是改变输入法的图标
只要把获取中文输入法图标里面
#if defined(__MMI_SHURU__) || defined(__MMI_ITAP__) || defined(__MMI_KA__)
加上|| defined(__MMI_GUOBI__)就可以了。
同时在Wui_ems_categories.c,
还有:
#if defined(__MMI_SHURU__) || defined(__MMI_ZI__) || defined(__MMI_KA__) || defined(__MMI_ITAP__)
void wgui_EMS_inputbox_change_input_mode_smart_ABC(void)
………….
void wgui_EMS_inputbox_change_input_mode_smart_abc(void)
…………
void wgui_EMS_inputbox_change_input_mode_tr_bpmf(void)
…………
我们在前面同样加上|| defined(__MMI_GUOBI__)
void ShowCategory28Screen(
U16 title,
U16 title_icon,
U16 left_softkey,
U16 left_softkey_icon,
U16 right_softkey,
U16 right_softkey_icon,
EMSData *data,
U8 *history_buffer)
函数里面加入对GBInputMethodEnterCategory28函数的调用,如:
#ifdef __MMI_SHURU__
InuptMethodEnterCategory28();
#elif defined(__MMI_ZI__) && defined(__MMI_MESSAGES_EMS__)
ZiInuptMethodEnterCategory28();
#elif defined(__MMI_KA__)
KonkaInuptMethodEnterCategory28();
#elif defined(__MMI_ITAP__) //已经处理过了
/* under construction !*/
/* under construction !*/
#elif defined(__MMI_GUOBI__) //OK
GBInputMethodEnterCategory28();
#endif
在wgui_categories_inputs.c文件里面有很多
#ifdef __MMI_SHURU__
InuptMethodExitCategory5();
#elif defined __MMI_ZI__
ZiInuptMethodExitCategory5();
#elif defined __MMI_KA__
KonkaInuptMethodExitCategory5();
#elif defined __MMI_ITAP__ //handled
/* under construction !*/
/* under construction !*/
#elif defined(__MMI_GUOBI__) //ExitCategory5();
GBInputMethodExitCategory5();
#endif
类似的程序段,对于这些都依葫芦画瓢就可以了。
还有很多的
#if defined(__MMI_SHURU__) || defined(__MMI_ZI__) || defined(__MMI_ITAP__) ….
对于这些都到后面加上||defined(__MMI_GUOBI__)好了。具体可以参照附件中的wgui_categories_inputs.c文件.
|
|