wgui_ems.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:317k
源码类别:
MTK
开发平台:
C/C++
- inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_NORWEGIAN_STRING_ID);
- break;
- case INPUT_MODE_SMART_LOWERCASE_NORWEGIAN:
- inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_norwegian_STRING_ID);
- break;
- #endif /* defined(__MMI_T9_NORWEGIAN__) || defined(__MMI_ZI_NORWEGIAN__) */
- //Norwegian end
- //PMT NO_AR_SL_DU END 20050909
- //PMT START SWEDISH 20050916
- #if defined(__MMI_T9_SWEDISH__) || defined(__MMI_ZI_SWEDISH__) || defined(__MMI_CSTAR_SWEDISH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_SWEDISH:
- inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_SWEDISH_STRING_ID);
- break;
- case INPUT_MODE_SMART_LOWERCASE_SWEDISH:
- inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_swedish_STRING_ID);
- break;
- #endif /* defined(__MMI_T9_SWEDISH__) || defined(__MMI_ZI_SWEDISH__) */
- /* PMT END SWEDISH 20050916 */
- /* PMT START CR_ROM_SLO 20050923 */
- #if defined(__MMI_T9_CROATIAN__) || defined(__MMI_ZI_CROATIAN__) || defined(__MMI_CSTAR_CROATIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_CROATIAN:
- inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_CROATIAN_STRING_ID);
- break;
- case INPUT_MODE_SMART_LOWERCASE_CROATIAN:
- inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_croatian_STRING_ID);
- break;
- #endif /* defined(__MMI_T9_CROATIAN__) || defined(__MMI_ZI_CROATIAN__) */
- /* PMT START LANGUAGE 20060104 */
- #if defined(__MMI_ZI_ROMANIAN__) || defined(__MMI_T9_ROMANIAN__) || defined(__MMI_CSTAR_ROMANIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- /* PMT END LANGUAGE 20060104 */
- case INPUT_MODE_SMART_UPPERCASE_ROMANIAN:
- inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_ROMANIAN_STRING_ID);
- break;
- case INPUT_MODE_SMART_LOWERCASE_ROMANIAN:
- inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_romanian_STRING_ID);
- break;
- #endif /* defined(__MMI_ZI_ROMANIAN__) || defined(__MMI_T9_ROMANIAN__) */
- #if defined(__MMI_T9_SLOVENIAN__) || defined(__MMI_ZI_SLOVENIAN__) || defined(__MMI_CSTAR_SLOVENIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_SLOVENIAN:
- inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_SLOVENIAN_STRING_ID);
- break;
- case INPUT_MODE_SMART_LOWERCASE_SLOVENIAN:
- inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_slovenian_STRING_ID);
- break;
- #endif /* defined(__MMI_T9_SLOVENIAN__) || defined(__MMI_ZI_SLOVENIAN__) */
- /* PMT END CR_ROM_SLO 20050923 */
- /* PMT START GR_HE_CZ_FI_DA_HU 20051007 */
- #if defined(__MMI_T9_GREEK__) || defined(__MMI_ZI_GREEK__) || defined(__MMI_CSTAR_GREEK__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_GREEK:
- inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_GREEK_STRING_ID);
- break;
- case INPUT_MODE_SMART_LOWERCASE_GREEK:
- inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_greek_STRING_ID);
- break;
- #endif /* defined(__MMI_T9_GREEK__) || defined(__MMI_ZI_GREEK__) */
- //PMT END GR_HE_CZ_FI_DA_HU 20051007
- //MTK end
- }
- gui_set_font(f);
- gui_set_text_color(c);
- gui_reset_text_clip();
- x = 1;
- #if defined(__MMI_T9__) || defined(__MMI_ITAP__) || defined(__MMI_KA__)|| defined(__MMI_CSTAR__) //KP Jerry add "__MMI_CSTAR__" on 2007-3-8
- if (wgui_EMS_inputbox_information_icon == NULL)
- {
- /* MTK Elvis for R2L characters */
- if (!r2lMMIFlag)
- {
- x = 2;
- }
- else
- {
- x = UI_device_width - 2;
- }
- /* MTK end */
- }
- else
- {
- /* MTK Elvis for R2L characters */
- gui_measure_image(wgui_EMS_inputbox_information_icon, &width, &height);
- if (!r2lMMIFlag)
- {
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_show_transparent_image(
- x,
- wgui_EMS_inputbox_information_bar_y + 1,
- wgui_EMS_inputbox_information_icon,
- 0);
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- gui_show_transparent_image(
- x,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - height) / 2,
- wgui_EMS_inputbox_information_icon,
- 0);
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- x = width + 2;
- }
- else
- {
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_show_transparent_image(
- UI_device_width - 1 - width,
- wgui_EMS_inputbox_information_bar_y + 1,
- wgui_EMS_inputbox_information_icon,
- 0);
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- gui_show_transparent_image(
- UI_device_width - 1 - width,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - height) / 2,
- wgui_EMS_inputbox_information_icon,
- 0);
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- x = UI_device_width - 2 - width;
- }
- /* MTK end */
- }
- #elif defined(__MMI_ZI__)
- if (wgui_EMS_inputbox_information_icon == NULL)
- {
- /* MTK Elvis for R2L characters */
- if (!r2lMMIFlag)
- {
- x = 2;
- }
- else
- {
- x = UI_device_width - 2;
- }
- /* MTK end */
- }
- else
- {
- /* MTK Elvis for R2L characters */
- gui_measure_image(get_image(WGUI_INPUT_INFORMATION_ICON1), &width, &height);
- if (!r2lMMIFlag)
- {
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_show_transparent_image(
- x,
- wgui_EMS_inputbox_information_bar_y + 1,
- get_image(WGUI_INPUT_INFORMATION_ICON1),
- 0);
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- gui_show_transparent_image(
- x,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - height) / 2,
- get_image(WGUI_INPUT_INFORMATION_ICON1),
- 0);
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- x = width + 2;
- }
- else
- {
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_show_transparent_image(
- UI_device_width - 1 - width,
- wgui_EMS_inputbox_information_bar_y + 1,
- get_image(WGUI_INPUT_INFORMATION_ICON1),
- 0);
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- gui_show_transparent_image(
- UI_device_width - 1 - width,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - height) / 2,
- get_image(WGUI_INPUT_INFORMATION_ICON1),
- 0);
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- x = UI_device_width - 2 - width;
- }
- /* MTK end */
- }
- #else
- if (wgui_EMS_inputbox_information_icon == NULL)
- {
- /* MTK Elvis for R2L characters */
- if (!r2lMMIFlag)
- {
- x = 2;
- }
- else
- {
- x = UI_device_width - 2;
- }
- /* MTK end */
- }
- else
- {
- /* MTK Elvis for R2L characters */
- gui_measure_image(wgui_EMS_inputbox_information_icon, &width, &height);
- if (!r2lMMIFlag)
- {
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_show_transparent_image(
- x,
- wgui_EMS_inputbox_information_bar_y + 1,
- wgui_EMS_inputbox_information_icon,
- 0);
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- gui_show_transparent_image(
- x,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - height) / 2,
- wgui_EMS_inputbox_information_icon,
- 0);
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- x = width + 2;
- }
- else
- {
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_show_transparent_image(
- UI_device_width - 1 - width,
- wgui_EMS_inputbox_information_bar_y + 1,
- wgui_EMS_inputbox_information_icon,
- 0);
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- gui_show_transparent_image(
- UI_device_width - 1 - width,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - height) / 2,
- wgui_EMS_inputbox_information_icon,
- 0);
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- x = UI_device_width - 2 - width;
- }
- /* MTK end */
- }
- #endif
- #if defined(__MMI_TOUCH_SCREEN__)
- /* 3 is from display icon shift position by adjusting x value
- * 4 is draw rectangle width in touch screen case
- *
- */
- wgui_information_bar_input_mode_display_width = width + 7;
- wgui_information_bar_input_mode_display_height = height;
- gui_measure_string(inputmode_string, &width, &height);
- #ifdef __MMI_T9__
- /* T9 chinese input mode uses icon instead of inputmode_string and
- * no need to adjust x value ,so previous +7 ,now -7
- */
- if(width == 0)
- {
- wgui_information_bar_input_mode_display_width -= 7;
- }
- #endif
- rect_height = gui_get_character_height();
- //KP Jerry add for avoid rect_height over the infomation_bar_height on 2007-4-16 start
- if(rect_height > wgui_inputbox_information_bar_height - 2)
- {
- rect_height = wgui_inputbox_information_bar_height - 2;
- }
- //KP Jerry add for avoid rect_height over the infomation_bar_height on 2007-4-16 end
- wgui_information_bar_input_mode_display_width += width;
- if(rect_height > wgui_information_bar_input_mode_display_height)
- {
- wgui_information_bar_input_mode_display_height = rect_height;
- }
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- switch (MMI_current_input_mode)
- {
- case INPUT_MODE_MULTITAP_UPPERCASE_ABC:
- case INPUT_MODE_MULTITAP_LOWERCASE_ABC:
- /* PMT dara added for Multitap thai */
- #if defined(__MMI_MULTITAP_THAI__)
- case INPUT_MODE_MULTITAP_THAI:
- #endif
- /* MTk Terry for Spanish French German Italian Russian Turkish Portuguese Indonesian Malay Vietnamese */
- #if defined(__MMI_MULTITAP_SPANISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_SPANISH:
- case INPUT_MODE_MULTITAP_LOWERCASE_SPANISH:
- #endif /* defined(__MMI_MULTITAP_SPANISH__) */
- /* PMT VIKASG START 20050729 */
- #if defined(__MMI_MULTITAP_DANISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_DANISH:
- case INPUT_MODE_MULTITAP_LOWERCASE_DANISH:
- #endif /* defined(__MMI_MULTITAP_DANISH__) */
- //PMT VIKASG END 20050729
- //PMT CZ_PO_TU START 20050812
- #if defined(__MMI_MULTITAP_POLISH__) /* Polish-Vikas */
- case INPUT_MODE_MULTITAP_UPPERCASE_POLISH:
- case INPUT_MODE_MULTITAP_LOWERCASE_POLISH:
- #endif /* defined(__MMI_MULTITAP_POLISH__) */
- /* PMT CZ_PO_TU END 20050812 */
- #if defined(__MMI_MULTITAP_FRENCH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_FRENCH:
- case INPUT_MODE_MULTITAP_LOWERCASE_FRENCH:
- #endif /* defined(__MMI_MULTITAP_FRENCH__) */
- #if defined(__MMI_MULTITAP_GERMAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_GERMAN:
- case INPUT_MODE_MULTITAP_LOWERCASE_GERMAN:
- #endif /* defined(__MMI_MULTITAP_GERMAN__) */
- #if defined(__MMI_MULTITAP_ITALIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_ITALIAN:
- case INPUT_MODE_MULTITAP_LOWERCASE_ITALIAN:
- #endif /* defined(__MMI_MULTITAP_ITALIAN__) */
- #if defined(__MMI_MULTITAP_RUSSIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_RUSSIAN:
- case INPUT_MODE_MULTITAP_LOWERCASE_RUSSIAN:
- #endif /* defined(__MMI_MULTITAP_RUSSIAN__) */
- /* PMT BULGARIAN START 20051201 */
- #if defined(__MMI_MULTITAP_BULGARIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_BULGARIAN:
- case INPUT_MODE_MULTITAP_LOWERCASE_BULGARIAN:
- #endif /* defined(__MMI_MULTITAP_BULGARIAN__) */
- /* PMT BULGARIAN END 20051201 */
- #if defined(__MMI_MULTITAP_TURKISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_TURKISH:
- case INPUT_MODE_MULTITAP_LOWERCASE_TURKISH:
- #endif /* defined(__MMI_MULTITAP_TURKISH__) */
- #if defined(__MMI_MULTITAP_PORTUGUESE__)
- case INPUT_MODE_MULTITAP_UPPERCASE_PORTUGUESE:
- case INPUT_MODE_MULTITAP_LOWERCASE_PORTUGUESE:
- #endif /* defined(__MMI_MULTITAP_PORTUGUESE__) */
- #if defined(__MMI_MULTITAP_HINDI__)
- case INPUT_MODE_MULTITAP_HINDI:
- #endif
- /* PMT RAKESH START 20061006 */
- #if defined(__MMI_MULTITAP_MARATHI__)
- case INPUT_MODE_MULTITAP_MARATHI:
- #endif
- /* PMT RAKESH END 20061006 */
- #if defined(__MMI_MULTITAP_INDONESIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_INDONESIAN:
- case INPUT_MODE_MULTITAP_LOWERCASE_INDONESIAN:
- #endif /* defined(__MMI_MULTITAP_INDONESIAN__) */
- /* PMT CZ_PO_TU START 20050812 */
- #if defined(__MMI_MULTITAP_CZECH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_CZECH:
- case INPUT_MODE_MULTITAP_LOWERCASE_CZECH:
- #endif /* defined(__MMI_MULTITAP_CZECH__) */
- /* PMT CZ_PO_TU END 20050812 */
- #if defined(__MMI_MULTITAP_MALAY__)
- case INPUT_MODE_MULTITAP_UPPERCASE_MALAY:
- case INPUT_MODE_MULTITAP_LOWERCASE_MALAY:
- #endif /* defined(__MMI_MULTITAP_MALAY__) */
- #if defined(__MMI_MULTITAP_VIETNAMESE__)
- case INPUT_MODE_MULTITAP_UPPERCASE_VIETNAMESE:
- case INPUT_MODE_MULTITAP_LOWERCASE_VIETNAMESE:
- #endif /* defined(__MMI_MULTITAP_VIETNAMESE__) */
- /* PMT START HU_FI 20050825 */
- #if defined(__MMI_MULTITAP_FINNISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_FINNISH:
- case INPUT_MODE_MULTITAP_LOWERCASE_FINNISH:
- #endif /* defined(__MMI_MULTITAP_FINNISH__) */
- #if defined(__MMI_MULTITAP_HUNGARIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_HUNGARIAN:
- case INPUT_MODE_MULTITAP_LOWERCASE_HUNGARIAN:
- #endif /* defined(__MMI_MULTITAP_HUNGARIAN__) */
- //PMT END HU_FI 20050825
- //MTK end
- /* PMT START GR_HE_CZ_FI_DA_HU 20051007 */
- #if defined(__MMI_MULTITAP_HEBREW__)
- case INPUT_MODE_MULTITAP_HEBREW:
- #endif
- //PMT END GR_HE_CZ_FI_DA_HU 20051007
- //PMT NO_AR_SL_DU START 20050909
- #if defined(__MMI_MULTITAP_SLOVAK__)
- case INPUT_MODE_MULTITAP_UPPERCASE_SLOVAK:
- case INPUT_MODE_MULTITAP_LOWERCASE_SLOVAK:
- #endif /* defined(__MMI_MULTITAP_SLOVAK__) */
- #if defined(__MMI_MULTITAP_DUTCH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_DUTCH:
- case INPUT_MODE_MULTITAP_LOWERCASE_DUTCH:
- #endif /* defined(__MMI_MULTITAP_DUTCH__) */
- //MTK end
- //Norwegian start
- #if defined(__MMI_MULTITAP_NORWEGIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_NORWEGIAN:
- case INPUT_MODE_MULTITAP_LOWERCASE_NORWEGIAN:
- #endif /* defined(__MMI_MULTITAP_NORWEGIAN__) */
- /* Norwegian end */
- #if defined(__MMI_MULTITAP_ARABIC__)
- case INPUT_MODE_MULTITAP_ARABIC:
- #endif
- /* PMT START PERSIAN */
- #if defined(__MMI_MULTITAP_PERSIAN__)
- case INPUT_MODE_MULTITAP_PERSIAN:
- #endif
- //PMT END PERSIAN
- //PMT NO_AR_SL_DU END 20050909
- //PMT START SWEDISH 20050916
- #if defined(__MMI_MULTITAP_SWEDISH__)
- case INPUT_MODE_MULTITAP_UPPERCASE_SWEDISH:
- case INPUT_MODE_MULTITAP_LOWERCASE_SWEDISH:
- #endif /* defined(__MMI_MULTITAP_SWEDISH__) */
- //PMT END SWEDISH 20050916
- //PMT START CR_ROM_SLO 20050923
- #if defined(__MMI_MULTITAP_CROATIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_CROATIAN:
- case INPUT_MODE_MULTITAP_LOWERCASE_CROATIAN:
- #endif /* defined(__MMI_MULTITAP_CROATIAN__) */
- #if defined(__MMI_MULTITAP_ROMANIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_ROMANIAN:
- case INPUT_MODE_MULTITAP_LOWERCASE_ROMANIAN:
- #endif /* defined(__MMI_MULTITAP_ROMANIAN__) */
- #if defined(__MMI_MULTITAP_SLOVENIAN__)
- case INPUT_MODE_MULTITAP_UPPERCASE_SLOVENIAN:
- case INPUT_MODE_MULTITAP_LOWERCASE_SLOVENIAN:
- #endif /* defined(__MMI_MULTITAP_SLOVENIAN__) */
- //PMT END CR_ROM_SLO 20050923
- //PMT START GR_HE_CZ_FI_DA_HU 20051007
- #if defined(__MMI_MULTITAP_GREEK__)
- case INPUT_MODE_MULTITAP_UPPERCASE_GREEK:
- case INPUT_MODE_MULTITAP_LOWERCASE_GREEK:
- #endif /* defined(__MMI_MULTITAP_GREEK__) */
- /* PMT END GR_HE_CZ_FI_DA_HU 20051007 */
- case INPUT_MODE_123:
- /* START PMT VIJAY 20050725 ......removed additional 3 pixels for hindi string */
- if (MMI_current_input_mode == INPUT_MODE_MULTITAP_HINDI)
- {
- gui_move_text_cursor(wgui_EMS_inputbox_information_bar_x + x, wgui_EMS_inputbox_information_bar_y);
- }
- /* PMT RAKESH START 20061006 */
- else if (MMI_current_input_mode == INPUT_MODE_MULTITAP_MARATHI)
- {
- gui_move_text_cursor(wgui_EMS_inputbox_information_bar_x + x, wgui_EMS_inputbox_information_bar_y + 1);
- }
- /* PMT RAKESH END 20061006 */
- else
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_move_text_cursor(wgui_EMS_inputbox_information_bar_x + x, wgui_EMS_inputbox_information_bar_y + 3);
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- {
- gui_draw_filled_area(
- wgui_EMS_inputbox_information_bar_x + x + 2,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - rect_height) / 2 - 1,
- wgui_EMS_inputbox_information_bar_x + x + 4 + width,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height + rect_height) / 2,
- &information_bar_BG_filler);
- gui_move_text_cursor(
- wgui_EMS_inputbox_information_bar_x + x + 3,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - height) / 2);
- }
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- /* END VIJAY PMT 20050725 */
- gui_print_text(inputmode_string);
- break;
- #if defined (__MMI_T9__) || defined(__MMI_ITAP__) || defined(__MMI_KA__)|| defined(__MMI_CSTAR__) //KP Jerry add "__MMI_CSTAR__" on 2007-3-8
- case INPUT_MODE_SMART_UPPERCASE_ABC:
- case INPUT_MODE_SMART_LOWERCASE_ABC:
- /* MTK Terry for Spanish French German Italian */
- #if defined(__MMI_T9_SPANISH__) || defined(__MMI_CSTAR_SPANISH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_SPANISH:
- case INPUT_MODE_SMART_LOWERCASE_SPANISH:
- #endif /* defined(__MMI_T9_SPANISH__) */
- /* PMT VIKASG START 20050729 */
- #if defined(__MMI_T9_DANISH__) || defined(__MMI_CSTAR_DANISH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_DANISH:
- case INPUT_MODE_SMART_LOWERCASE_DANISH:
- #endif /* defined(__MMI_T9_DANISH__) */
- //PMT VIKASG END 20050729
- //PMT CZ_PO_TU START 20050812
- #if defined(__MMI_T9_POLISH__) || defined(__MMI_CSTAR_POLISH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_POLISH:
- case INPUT_MODE_SMART_LOWERCASE_POLISH:
- #endif /* defined(__MMI_T9_POLISH__) */
- /* PMT CZ_PO_TU END 20050812 */
- #if defined(__MMI_T9_FRENCH__) || defined(__MMI_CSTAR_FRENCH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_FRENCH:
- case INPUT_MODE_SMART_LOWERCASE_FRENCH:
- #endif /* defined(__MMI_T9_FRENCH__) */
- #if defined(__MMI_T9_GERMAN__) || defined(__MMI_CSTAR_GERMAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_GERMAN:
- case INPUT_MODE_SMART_LOWERCASE_GERMAN:
- #endif /* defined(__MMI_T9_GERMAN__) */
- #if defined(__MMI_T9_ITALIAN__) || defined(__MMI_CSTAR_ITALIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_ITALIAN:
- case INPUT_MODE_SMART_LOWERCASE_ITALIAN:
- #endif /* defined(__MMI_T9_ITALIAN__) */
- /* PMT BHASKAR START 20052907 */
- #if defined(__MMI_T9_VIETNAMESE__) || defined(__MMI_CSTAR_VIETNAMESE__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_VIETNAMESE:
- case INPUT_MODE_SMART_LOWERCASE_VIETNAMESE:
- #endif /* defined(__MMI_T9_VIETNAMESE__) */
- // PMT BHASKAR END 20052907
- //PMT CZ_PO_TU START 20050812
- #if defined(__MMI_T9_TURKISH__) || defined(__MMI_CSTAR_TURKISH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_TURKISH:
- case INPUT_MODE_SMART_LOWERCASE_TURKISH:
- #endif /* defined(__MMI_T9_TURKISH__) */
- //PMT CZ_PO_TU END 20050812
- //PMT Gurdev Start 20050729
- #if defined(__MMI_T9_INDONESIAN__) || defined(__MMI_CSTAR_INDONESIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_INDONESIAN:
- case INPUT_MODE_SMART_LOWERCASE_INDONESIAN:
- #endif /* defined(__MMI_T9_INDONESIAN__) */
- //PMT Gurdev End 20050729
- //PMT CZ_PO_TU START 20050812
- #if defined(__MMI_T9_CZECH__) || defined(__MMI_CSTAR_CZECH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_CZECH:
- case INPUT_MODE_SMART_LOWERCASE_CZECH:
- #endif /* defined(__MMI_T9_CZECH__) */
- //PMT CZ_PO_TU END 20050812
- //MTK end
- //PMT dara added for T9 thai
- #if defined(__MMI_T9_THAI__) || defined(__MMI_CSTAR_THAI__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_THAI:
- #endif
- //PMT End
- //START PMT VANDANA 20051506
- #if defined(__MMI_T9_RUSSIAN__) || defined(__MMI_CSTAR_RUSSIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_RUSSIAN:
- case INPUT_MODE_SMART_LOWERCASE_RUSSIAN:
- #endif /* defined(__MMI_T9_RUSSIAN__) */
- /* END PMT */
- /* PMT BULGARIAN START 20051201 */
- #if defined(__MMI_T9_BULGARIAN__) || defined(__MMI_CSTAR_BULGARIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_BULGARIAN:
- case INPUT_MODE_SMART_LOWERCASE_BULGARIAN:
- #endif /* defined(__MMI_T9_BULGARIAN__) */
- //PMT BULGARIAN END 20051201
- //PMT SHARIQ START 20050729
- #if defined(__MMI_T9_PORTUGUESE__) || defined(__MMI_CSTAR_PORTUGUESE__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_PORTUGUESE:
- case INPUT_MODE_SMART_LOWERCASE_PORTUGUESE:
- #endif /* defined(__MMI_T9_PORTUGUESE__) */
- //PMT SHARIQ END 20050729
- //PMT START HU_FI 20050825
- #if defined(__MMI_T9_FINNISH__) || defined(__MMI_CSTAR_FINNISH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_FINNISH:
- case INPUT_MODE_SMART_LOWERCASE_FINNISH:
- #endif /* defined(__MMI_T9_FINNISH__) */
- #if defined(__MMI_T9_HUNGARIAN__) || defined(__MMI_CSTAR_HUNGARIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_HUNGARIAN:
- case INPUT_MODE_SMART_LOWERCASE_HUNGARIAN:
- #endif /* defined(__MMI_T9_HUNGARIAN__) */
- /* PMT END HU_FI 20050825 */
- /* PMT NO_AR_SL_DU START 20050909 */
- #if defined(__MMI_T9_ARABIC__) || defined(__MMI_CSTAR_ARABIC__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_ARABIC:
- #endif
- /* PMT VIKAS GUPTA START 20051129 */
- #if defined(__MMI_T9_HINDI__) || defined(__MMI_CSTAR_HINDI__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_HINDI:
- #endif
- //PMT VIKAS GUPTA END 20051129
- //Norwegian start
- #if defined(__MMI_T9_NORWEGIAN__) || defined(__MMI_CSTAR_NORWEGIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_NORWEGIAN:
- case INPUT_MODE_SMART_LOWERCASE_NORWEGIAN:
- #endif /* defined(__MMI_T9_NORWEGIAN__) */
- //Norwegian end
- //START DUTCH_T9 20051021
- #if defined(__MMI_T9_DUTCH__) || defined(__MMI_CSTAR_DUTCH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_DUTCH:
- case INPUT_MODE_SMART_LOWERCASE_DUTCH:
- #endif /* defined(__MMI_T9_DUTCH__) */
- //END DUTCH_T9 20051021
- //PMT LANGUAGE START 20051221
- #if defined(__MMI_T9_SLOVENIAN__) || defined(__MMI_CSTAR_SLOVENIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_SLOVENIAN:
- case INPUT_MODE_SMART_LOWERCASE_SLOVENIAN:
- #endif /* defined(__MMI_T9_SLOVENIAN__) */
- #if defined(__MMI_T9_SWEDISH__) || defined(__MMI_CSTAR_SWEDISH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_SWEDISH:
- case INPUT_MODE_SMART_LOWERCASE_SWEDISH:
- #endif /* defined(__MMI_T9_SWEDISH__) */
- #if defined(__MMI_T9_GREEK__) || defined(__MMI_CSTAR_GREEK__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_GREEK:
- case INPUT_MODE_SMART_LOWERCASE_GREEK:
- #endif /* defined(__MMI_T9_GREEK__) */
- #if defined(__MMI_T9_HEBREW__) || defined(__MMI_CSTAR_HEBREW__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_HEBREW:
- #endif
- //PMT LANGUAGE END 20051221
- //PMT NO_AR_SL_DU END 20050909
- //PMT START LANGUAGE 20060104
- #if defined(__MMI_T9_MALAY__) || defined(__MMI_CSTAR_MALAY__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_MALAY:
- case INPUT_MODE_SMART_LOWERCASE_MALAY:
- #endif /* defined(__MMI_T9_MALAY__) */
- #if defined(__MMI_T9_CROATIAN__) || defined(__MMI_CSTAR_CROATIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_CROATIAN:
- case INPUT_MODE_SMART_LOWERCASE_CROATIAN:
- #endif /* defined(__MMI_T9_CROATIAN__) */
- #if defined(__MMI_T9_SLOVAK__) || defined(__MMI_CSTAR_SLOVAK__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_SLOVAK:
- case INPUT_MODE_SMART_LOWERCASE_SLOVAK:
- #endif /* defined(__MMI_T9_SLOVAK__) */
- #if defined(__MMI_T9_ROMANIAN__) || defined(__MMI_CSTAR_ROMANIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
- case INPUT_MODE_SMART_UPPERCASE_ROMANIAN:
- case INPUT_MODE_SMART_LOWERCASE_ROMANIAN:
- #endif /* defined(__MMI_T9_ROMANIAN__) */
- //PMT END LANGUAGE 20060104
- //PMT VIKAS GUPTA START 20051129
- if (MMI_current_input_mode == INPUT_MODE_SMART_HINDI)
- {
- gui_move_text_cursor(wgui_EMS_inputbox_information_bar_x + x, wgui_EMS_inputbox_information_bar_y);
- }
- /* PMT RAKESH START 20061006 */
- else if (MMI_current_input_mode == INPUT_MODE_MULTITAP_MARATHI)
- {
- gui_move_text_cursor(wgui_EMS_inputbox_information_bar_x + x, wgui_EMS_inputbox_information_bar_y + 1);
- }
- /* PMT RAKESH START 20061006 */
- else
- /* PMT VIKAS GUPTA END 20051129 */
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_move_text_cursor(wgui_EMS_inputbox_information_bar_x + x, wgui_EMS_inputbox_information_bar_y + 3);
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- gui_move_text_cursor(
- wgui_EMS_inputbox_information_bar_x + x,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - height) / 2);
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- gui_print_text(inputmode_string);
- break;
- #elif defined(__MMI_ZI__)
- case INPUT_MODE_SMART_UPPERCASE_ABC:
- case INPUT_MODE_SMART_LOWERCASE_ABC:
- /* MTK Terry for Russian Spanish French German Italian Turkish Portuguese Indonesian Malay Vietnamese */
- #if defined(__MMI_ZI_EU_SPANISH__) || defined(__MMI_ZI_SA_SPANISH__)
- case INPUT_MODE_SMART_UPPERCASE_SPANISH:
- case INPUT_MODE_SMART_LOWERCASE_SPANISH:
- #endif /* defined(__MMI_ZI_EU_SPANISH__) || defined(__MMI_ZI_SA_SPANISH__) */
- /* PMT VIKASG START 20050729 */
- #if defined(__MMI_ZI_DANISH__)
- case INPUT_MODE_SMART_UPPERCASE_DANISH:
- case INPUT_MODE_SMART_LOWERCASE_DANISH:
- #endif /* defined(__MMI_ZI_DANISH__) */
- //PMT VIKASG END 20050729
- //PMT CZ_PO_TU START 20050812
- #if defined(__MMI_ZI_POLISH__)
- case INPUT_MODE_SMART_UPPERCASE_POLISH:
- case INPUT_MODE_SMART_LOWERCASE_POLISH:
- #endif /* defined(__MMI_ZI_POLISH__) */
- //PMT CZ_PO_TU END 20050812
- //PMT VIKAS GUPTA START PO_NO_ZI 20050930
- #if defined(__MMI_ZI_NORWEGIAN__)
- case INPUT_MODE_SMART_UPPERCASE_NORWEGIAN:
- case INPUT_MODE_SMART_LOWERCASE_NORWEGIAN:
- #endif /* defined(__MMI_ZI_NORWEGIAN__) */
- /* PMT VIKAS GUPTA END PO_NO_ZI 20050930 */
- #if defined(__MMI_ZI_CA_FRENCH__) || defined(__MMI_ZI_EU_FRENCH__)
- case INPUT_MODE_SMART_UPPERCASE_FRENCH:
- case INPUT_MODE_SMART_LOWERCASE_FRENCH:
- #endif /* defined(__MMI_ZI_CA_FRENCH__) || defined(__MMI_ZI_EU_FRENCH__) */
- #if defined(__MMI_ZI_GERMAN__)
- case INPUT_MODE_SMART_UPPERCASE_GERMAN:
- case INPUT_MODE_SMART_LOWERCASE_GERMAN:
- #endif /* defined(__MMI_ZI_GERMAN__) */
- #if defined(__MMI_ZI_ITALIAN__)
- case INPUT_MODE_SMART_UPPERCASE_ITALIAN:
- case INPUT_MODE_SMART_LOWERCASE_ITALIAN:
- #endif /* defined(__MMI_ZI_ITALIAN__) */
- #if defined(__MMI_ZI_RUSSIAN__) || defined(__MMI_ZI_RECOMMENDED_SIZE_RUSSIAN__)
- case INPUT_MODE_SMART_UPPERCASE_RUSSIAN:
- case INPUT_MODE_SMART_LOWERCASE_RUSSIAN:
- #endif /* defined(__MMI_ZI_RUSSIAN__) || defined(__MMI_ZI_RECOMMENDED_SIZE_RUSSIAN__) */
- /* PMT BULGARIAN START 20051201 */
- #if defined(__MMI_ZI_BULGARIAN__)
- case INPUT_MODE_SMART_UPPERCASE_BULGARIAN:
- case INPUT_MODE_SMART_LOWERCASE_BULGARIAN:
- #endif /* defined(__MMI_ZI_BULGARIAN__) */
- /* PMT BULGARIAN END 20051201 */
- #if defined(__MMI_ZI_TURKISH__)
- case INPUT_MODE_SMART_UPPERCASE_TURKISH:
- case INPUT_MODE_SMART_LOWERCASE_TURKISH:
- #endif /* defined(__MMI_ZI_TURKISH__) */
- #if defined(__MMI_ZI_EU_PORTUGUESE__) || defined(__MMI_ZI_SA_PORTUGUESE__) || defined(__MMI_ZI_BZ_PORTUGUESE__)
- case INPUT_MODE_SMART_UPPERCASE_PORTUGUESE:
- case INPUT_MODE_SMART_LOWERCASE_PORTUGUESE:
- #endif /* defined(__MMI_ZI_EU_PORTUGUESE__) || defined(__MMI_ZI_SA_PORTUGUESE__) || defined(__MMI_ZI_BZ_PORTUGUESE__) */
- #if defined(__MMI_ZI_INDONESIAN__)
- case INPUT_MODE_SMART_UPPERCASE_INDONESIAN:
- case INPUT_MODE_SMART_LOWERCASE_INDONESIAN:
- #endif /* defined(__MMI_ZI_INDONESIAN__) */
- /* PMT CZ_PO_TU START 20050812 */
- #if defined(__MMI_ZI_CZECH__)
- case INPUT_MODE_SMART_UPPERCASE_CZECH:
- case INPUT_MODE_SMART_LOWERCASE_CZECH:
- #endif /* defined(__MMI_ZI_CZECH__) */
- /* PMT CZ_PO_TU END 20050812 */
- #if defined(__MMI_ZI_MALAY__)
- case INPUT_MODE_SMART_UPPERCASE_MALAY:
- case INPUT_MODE_SMART_LOWERCASE_MALAY:
- #endif /* defined(__MMI_ZI_MALAY__) */
- #if defined(__MMI_ZI_VIETNAMESE__)
- case INPUT_MODE_SMART_UPPERCASE_VIETNAMESE:
- case INPUT_MODE_SMART_LOWERCASE_VIETNAMESE:
- #endif /* defined(__MMI_ZI_VIETNAMESE__) */
- /* PMT NO_AR_SL_DU START 20050909 */
- #if defined(__MMI_ZI_SLOVAK__)
- case INPUT_MODE_SMART_UPPERCASE_SLOVAK:
- case INPUT_MODE_SMART_LOWERCASE_SLOVAK:
- #endif /* defined(__MMI_ZI_SLOVAK__) */
- #if defined(__MMI_ZI_DUTCH__)
- case INPUT_MODE_SMART_UPPERCASE_DUTCH:
- case INPUT_MODE_SMART_LOWERCASE_DUTCH:
- #endif /* defined(__MMI_ZI_DUTCH__) */
- //PMT NO_AR_SL_DU END 20050909
- //PMT START SWEDISH 20050916
- #if defined(__MMI_ZI_SWEDISH__)
- case INPUT_MODE_SMART_UPPERCASE_SWEDISH:
- case INPUT_MODE_SMART_LOWERCASE_SWEDISH:
- #endif /* defined(__MMI_ZI_SWEDISH__) */
- /* PMT END SWEDISH 20050916 */
- /* PMT START CR_ROM_SLO 20050923 */
- #if defined(__MMI_ZI_CROATIAN__)
- case INPUT_MODE_SMART_UPPERCASE_CROATIAN:
- case INPUT_MODE_SMART_LOWERCASE_CROATIAN:
- #endif /* defined(__MMI_ZI_CROATIAN__) */
- #if defined(__MMI_ZI_ROMANIAN__)
- case INPUT_MODE_SMART_UPPERCASE_ROMANIAN:
- case INPUT_MODE_SMART_LOWERCASE_ROMANIAN:
- #endif /* defined(__MMI_ZI_ROMANIAN__) */
- #if defined(__MMI_ZI_SLOVENIAN__)
- case INPUT_MODE_SMART_UPPERCASE_SLOVENIAN:
- case INPUT_MODE_SMART_LOWERCASE_SLOVENIAN:
- #endif /* defined(__MMI_ZI_SLOVENIAN__) */
- //PMT END CR_ROM_SLO 20050923
- //PMT START GR_HE_CZ_FI_DA_HU 20051007
- #if defined(__MMI_ZI_GREEK__)
- case INPUT_MODE_SMART_UPPERCASE_GREEK:
- case INPUT_MODE_SMART_LOWERCASE_GREEK:
- #endif /* defined(__MMI_ZI_GREEK__) */
- #if defined(__MMI_ZI_FINNISH__)
- case INPUT_MODE_SMART_UPPERCASE_FINNISH:
- case INPUT_MODE_SMART_LOWERCASE_FINNISH:
- #endif /* defined(__MMI_ZI_FINNISH__) */
- #if defined(__MMI_ZI_HUNGARIAN__)
- case INPUT_MODE_SMART_UPPERCASE_HUNGARIAN:
- case INPUT_MODE_SMART_LOWERCASE_HUNGARIAN:
- #endif /* defined(__MMI_ZI_HUNGARIAN__) */
- //PMT END GR_HE_CZ_FI_DA_HU 20051007
- //MTK end
- case INPUT_MODE_SMART_THAI:
- /* MTK Elvis for R2L characters */
- case INPUT_MODE_SMART_ARABIC:
- /* PMT START PERSIAN */
- case INPUT_MODE_SMART_PERSIAN:
- /* PMT END PERSIAN */
- /* PMT VIKAS GUPTA START 20051129 */
- case INPUT_MODE_SMART_HINDI:
- //PMT VIKAS GUPTA END 20051129
- //PMT START GR_HE_CZ_FI_DA_HU 20051007
- case INPUT_MODE_SMART_HEBREW:
- //PMT END GR_HE_CZ_FI_DA_HU 20051007
- //MTK end
- if (wgui_EMS_inputbox_information_icon == NULL)
- {
- /* MTK Elvis for R2L characters */
- if (!r2lMMIFlag)
- {
- x += width + 2;
- }
- else
- {
- x -= (width + 2);
- }
- /* MTK end */
- }
- else
- {
- /* MTK Elvis for R2L characters */
- gui_measure_image(wgui_EMS_inputbox_information_icon, &width, &height);
- if (!r2lMMIFlag)
- {
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_show_transparent_image(
- x,
- wgui_EMS_inputbox_information_bar_y + 1,
- wgui_EMS_inputbox_information_icon,
- 0);
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- gui_show_transparent_image(
- x,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - height) / 2,
- wgui_EMS_inputbox_information_icon,
- 0);
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- x += width + 2;
- }
- else
- {
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_show_transparent_image(
- x - width,
- wgui_EMS_inputbox_information_bar_y + 1,
- wgui_EMS_inputbox_information_icon,
- 0);
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- gui_show_transparent_image(
- x - width,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - height) / 2,
- wgui_EMS_inputbox_information_icon,
- 0);
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- x -= (width + 2);
- }
- /* MTK end */
- }
- /* PMT VIKAS GUPTA START 20051129 */
- if (MMI_current_input_mode == INPUT_MODE_SMART_HINDI)
- {
- gui_move_text_cursor(wgui_EMS_inputbox_information_bar_x + x, wgui_EMS_inputbox_information_bar_y);
- }
- /* PMT RAKESH START 20061006 */
- else if (MMI_current_input_mode == INPUT_MODE_MULTITAP_MARATHI)
- {
- gui_move_text_cursor(wgui_EMS_inputbox_information_bar_x + x, wgui_EMS_inputbox_information_bar_y + 1);
- }
- /* PMT RAKESH END 20061006 */
- else
- /* PMT VIKAS GUPTA END 20051129 */
- {
- gui_move_text_cursor(wgui_EMS_inputbox_information_bar_x + x, wgui_EMS_inputbox_information_bar_y + 3);
- }
- gui_print_text(inputmode_string);
- break;
- case INPUT_MODE_TR_MULTITAP_BOPOMO:
- case INPUT_MODE_SM_MULTITAP_PINYIN:
- case INPUT_MODE_SM_STROKE:
- case INPUT_MODE_TR_STROKE:
- if (wgui_EMS_inputbox_information_icon == NULL)
- {
- /* MTK Elvis for R2L characters */
- if (!r2lMMIFlag)
- {
- x += width + 2;
- }
- else
- {
- x -= (width + 2);
- }
- /* MTK end */
- }
- else
- {
- /* MTK Elvis for R2L characters */
- gui_measure_image(wgui_EMS_inputbox_information_icon, &width, &height);
- #if defined(__MMI_TOUCH_SCREEN__)
- wgui_information_bar_input_mode_display_width += width;
- #endif
- if (!r2lMMIFlag)
- {
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_show_transparent_image(
- x,
- wgui_EMS_inputbox_information_bar_y + 1,
- wgui_EMS_inputbox_information_icon,
- 0);
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- gui_draw_filled_area(
- x,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - rect_height) / 2 - 1,
- x + 4 + width,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height + rect_height) / 2,
- &information_bar_BG_filler);
- gui_show_transparent_image(
- x + 2,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - height) / 2 + 1,
- wgui_EMS_inputbox_information_icon,
- 0);
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- x += width + 2;
- }
- else
- {
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_show_transparent_image(
- x - width,
- wgui_EMS_inputbox_information_bar_y + 1,
- wgui_EMS_inputbox_information_icon,
- 0);
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- gui_draw_filled_area(
- x - width,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - rect_height) / 2 - 1,
- x + 4 + width,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height + rect_height) / 2,
- &information_bar_BG_filler);
- gui_show_transparent_image(
- x - width + 2,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - height) / 2 + 1,
- wgui_EMS_inputbox_information_icon,
- 0);
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- x -= (width + 2);
- }
- /* MTK end */
- }
- break;
- case INPUT_MODE_TR_BOPOMO:
- case INPUT_MODE_SM_PINYIN:
- gui_measure_image(get_image(WGUI_ZI_EZITEXT_LOGO), &width, &height);
- #if defined(__MMI_TOUCH_SCREEN__)
- wgui_information_bar_input_mode_display_width += width;
- #endif
- /* MTK Elvis for R2L characters */
- if (!r2lMMIFlag)
- {
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_show_transparent_image(
- x,
- wgui_EMS_inputbox_information_bar_y + 1,
- get_image(WGUI_ZI_EZITEXT_LOGO),
- 0);
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- gui_show_transparent_image(
- x,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - height) / 2,
- get_image(WGUI_ZI_EZITEXT_LOGO),
- 0);
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- x += width + 2;
- }
- else
- {
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_show_transparent_image(
- x - width,
- wgui_EMS_inputbox_information_bar_y + 1,
- get_image(WGUI_ZI_EZITEXT_LOGO),
- 0);
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- gui_show_transparent_image(
- x - width,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - height) / 2,
- get_image(WGUI_ZI_EZITEXT_LOGO),
- 0);
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- x -= (width + 2);
- }
- /* MTK end */
- if (wgui_EMS_inputbox_information_icon == NULL)
- {
- /* MTK Elvis for R2L characters */
- if (!r2lMMIFlag)
- {
- x += width + 2;
- }
- else
- {
- x -= (width + 2);
- }
- /* MTK end */
- }
- else
- {
- /* MTK Elvis for R2L characters */
- gui_measure_image(wgui_EMS_inputbox_information_icon, &width, &height);
- #if defined(__MMI_TOUCH_SCREEN__)
- wgui_information_bar_input_mode_display_width += width;
- #endif
- if (!r2lMMIFlag)
- {
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_show_transparent_image(
- x,
- wgui_EMS_inputbox_information_bar_y + 1,
- wgui_EMS_inputbox_information_icon,
- 0);
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- gui_draw_filled_area(
- x,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - rect_height) / 2 - 1,
- x + 4 + width,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height + rect_height) / 2,
- &information_bar_BG_filler);
- gui_show_transparent_image(
- x,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - height) / 2 + 1,
- wgui_EMS_inputbox_information_icon,
- 0);
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- x += width + 2;
- }
- else
- {
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_show_transparent_image(
- x - width,
- wgui_EMS_inputbox_information_bar_y + 1,
- wgui_EMS_inputbox_information_icon,
- 0);
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- gui_draw_filled_area(
- x - width,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - rect_height) / 2 - 1,
- x + 4 + width,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height + rect_height) / 2,
- &information_bar_BG_filler);
- gui_show_transparent_image(
- x - width,
- wgui_EMS_inputbox_information_bar_y + (wgui_inputbox_information_bar_height - height) / 2 + 1,
- wgui_EMS_inputbox_information_icon,
- 0);
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- x -= (width + 2);
- }
- /* MTK end */
- }
- break;
- #endif
- }
- }
- /* MTK end */
- /*****************************************************************************
- * FUNCTION
- * wgui_EMS_redraw_remaining_characters_display
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_EMS_redraw_remaining_characters_display(void)
- {
- #ifndef __MMI_HIDE_EMS_REMAINING_CHAR__
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- color c;
- /* MTK Elvis for R2L characters */
- S32 x1;
- S32 x2;
- S32 y1 = wgui_EMS_inputbox_information_bar_y;
- S32 y2 = wgui_EMS_inputbox_information_bar_y + wgui_EMS_inputbox_information_bar_height - 1;
- /* MTK end */
- #if !defined(__MMI_TOUCH_SCREEN__)
- stFontAttribute *f = &MMI_small_font;
- S32 w, n, max_n;
- #else /* !defined(__MMI_TOUCH_SCREEN__) */
- stFontAttribute *f = &MMI_medium_font;
- S32 w, h, n, max_n;
- #endif /* !defined(__MMI_TOUCH_SCREEN__) */
- UI_character_type str[32];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* MTK Elvis for R2L characters */
- if (!r2lMMIFlag)
- {
- x1 = wgui_EMS_inputbox_information_bar_x + (wgui_EMS_inputbox_information_bar_width >> 1);
- x2 = wgui_EMS_inputbox_information_bar_x + wgui_EMS_inputbox_information_bar_width - 1;
- }
- else
- {
- x1 = wgui_EMS_inputbox_information_bar_x;
- x2 = wgui_EMS_inputbox_information_bar_x + (wgui_EMS_inputbox_information_bar_width / 2) - 1;
- }
- /* MTK end */
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_lock_double_buffer();
- #endif
- #if(UI_DISABLE_EMS_INPUT_BOX)
- #ifdef __UCS2_ENCODING
- n = (MMI_multiline_inputbox.text_length >> 1) - 1;
- if (MMI_multiline_inputbox.UCS2_count > 0)
- {
- max_n = 268;
- }
- else
- {
- max_n = 612;
- }
- #endif /* __UCS2_ENCODING */
- #ifdef __ASCII
- n = MMI_multiline_inputbox.text_length - 1;
- if (MMI_multiline_inputbox.UCS2_count > 0)
- {
- max_n = 268;
- }
- else
- {
- max_n = 612;
- }
- #endif /* __ASCII */
- #else /* (UI_DISABLE_EMS_INPUT_BOX) */
- /* reassign MMI_EMS_inputbox.available_length because it might be one byte difference per segment for EMS 5.1 */
- gui_EMS_change_DCS(&MMI_EMS_inputbox);
- n = MMI_EMS_inputbox.available_length - EMS_get_remaining_length(MMI_EMS_inputbox.data);
- if (MMI_EMS_inputbox.UCS2_count > 0)
- {
- n = MMI_EMS_inputbox.available_length - (EMS_get_remaining_length(MMI_EMS_inputbox.data) >> 1);
- }
- else if (MMI_EMS_inputbox.GSM_ext_count > 0)
- {
- n = MMI_EMS_inputbox.available_length - EMS_get_remaining_length(MMI_EMS_inputbox.data);
- }
- max_n = MMI_EMS_inputbox.available_length;
- #endif /* (UI_DISABLE_EMS_INPUT_BOX) */
- wgui_EMS_input_information_background(x1, y1, x2, y2);
- gui_reset_text_clip();
- gui_sprintf(str, "%d/%d", n, max_n);
- c = *current_MMI_theme->remaining_length_text_color;
- gui_set_font(f);
- gui_set_text_color(c);
- gui_set_text_clip(0, 0, UI_device_width - 1, UI_device_height - 1);
- #if !defined(__MMI_TOUCH_SCREEN__)
- w = gui_get_string_width(str);
- #else
- gui_measure_string(str, &w, &h);
- #endif
- /* MTK Elvis for R2L characters */
- if (!r2lMMIFlag)
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_move_text_cursor(x2 - 2 - w, y1 + 2);
- #else
- gui_move_text_cursor(x2 - 2 - w, y1 + (wgui_inputbox_information_bar_height - h) / 2);
- #endif
- else
- #if !defined(__MMI_TOUCH_SCREEN__)
- gui_move_text_cursor(x1 + 2 + w, y1 + 2);
- #else
- gui_move_text_cursor(x1 + 2 + w, y1 + (wgui_inputbox_information_bar_height - h) / 2);
- #endif
- /* MTK end */
- gui_print_text(str);
- #if(UI_DOUBLE_BUFFER_SUPPORT)
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(x1, y1, x2, y2);
- #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */
- #endif /* __MMI_HIDE_EMS_REMAINING_CHAR__ */
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_EMS_redraw_input_information_bar
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_EMS_redraw_input_information_bar(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 x1 = wgui_EMS_inputbox_information_bar_x;
- S32 y1 = wgui_EMS_inputbox_information_bar_y;
- S32 x2 = wgui_EMS_inputbox_information_bar_x + wgui_EMS_inputbox_information_bar_width - 1;
- S32 y2 = wgui_EMS_inputbox_information_bar_y + wgui_EMS_inputbox_information_bar_height - 1;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_lock_double_buffer();
- wgui_EMS_input_information_background(x1, y1, x2, y2);
- wgui_EMS_show_input_mode();
- wgui_EMS_redraw_remaining_characters_display();
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(x1, y1, x2, y2);
- }
- extern S16 MMI_current_input_type;
- #if(EMS_USE_STUB_MENU)
- /*****************************************************************************
- * FUNCTION
- * EntryEMSEditOptionsMenu
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryEMSEditOptionsMenu(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- }
- #endif /* (EMS_USE_STUB_MENU) */
- /*****************************************************************************
- * FUNCTION
- * wgui_EMS_inputbox_insert_symbol
- * DESCRIPTION
- *
- * PARAMETERS
- * symbol [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_EMS_inputbox_insert_symbol(UI_character_type symbol)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(!UI_DISABLE_EMS_INPUT_BOX)
- EMS_inputbox_direct_input(symbol);
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * temp_ems_insert_character
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void temp_ems_insert_character(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_character_type symbol = 0xabc;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(!UI_DISABLE_EMS_INPUT_BOX)
- EMS_inputbox_direct_input(symbol);
- #endif
- }
- #if(UI_DISABLE_EMS_INPUT_BOX)
- /*****************************************************************************
- * FUNCTION
- * EMS_inputbox_insert_predefined_picture
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * RETURNS
- *
- *****************************************************************************/
- EMSTATUS EMS_inputbox_insert_predefined_picture(S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(index);
- return (0);
- }
- #endif /* (UI_DISABLE_EMS_INPUT_BOX) */
- /*****************************************************************************
- * FUNCTION
- * AppendEMSString
- * DESCRIPTION
- *
- * PARAMETERS
- * input_type [IN]
- * data [?]
- * s [?]
- * dcs [IN]
- * history_buffer [?]
- * RETURNS
- *
- *****************************************************************************/
- U8 AppendEMSString(S16 input_type, EMSData *data, U8 *s, U8 dcs, U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 l, box_height;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- l = gui_strlen((UI_string_type) s);
- box_height = MMI_content_height - MMI_multitap_height - 10;
- gui_create_EMS_input_box(&MMI_EMS_inputbox, 0, (MMI_title_y + MMI_title_height) + 12, UI_device_width, box_height);
- gui_set_EMS_input_box_data(&MMI_EMS_inputbox, data);
- EMSSetDCS(MMI_EMS_inputbox.data, dcs);
- if (AddString(MMI_EMS_inputbox.data, s, (U16) l, NULL) == EMS_OK)
- {
- return 1;
- }
- else
- {
- return 0;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * move_EMS_inputbox
- * DESCRIPTION
- *
- * PARAMETERS
- * x [IN]
- * y [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void move_EMS_inputbox(S32 x, S32 y)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_move_EMS_input_box(&MMI_EMS_inputbox, x, y);
- }
- /*****************************************************************************
- * FUNCTION
- * resize_EMS_inputbox
- * DESCRIPTION
- *
- * PARAMETERS
- * width [IN]
- * height [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void resize_EMS_inputbox(S32 width, S32 height)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_resize_EMS_input_box(&MMI_EMS_inputbox, width, height);
- }
- extern U8 category28_RSK_label_clear;
- /*****************************************************************************
- * FUNCTION
- * wgui_set_EMS_inputbox_RSK
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_set_EMS_inputbox_RSK(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- category28_RSK_label_clear = 0;
- #if defined(__MMI_WITH_C_KEY__)
- SetKeyHandler(handle_category28_right_softkey_down, KEY_CLEAR, KEY_EVENT_DOWN);
- SetKeyHandler(handle_category28_right_softkey_long_press, KEY_CLEAR, KEY_LONG_PRESS);
- set_right_softkey_function(handle_category28_right_softkey_up, KEY_EVENT_UP);
- #else /* defined(__MMI_WITH_C_KEY__) */
- set_right_softkey_function(handle_category28_right_softkey_down, KEY_EVENT_DOWN);
- set_right_softkey_function(handle_category28_right_softkey_long_press, KEY_LONG_PRESS);
- #endif /* defined(__MMI_WITH_C_KEY__) */
- register_EMS_inputbox_input_callback(handle_category28_input);
- handle_category28_input();
- if (gui_EMS_inputbox_empty(&MMI_EMS_inputbox))
- {
- #if defined(__MMI_WITH_C_KEY__)
- SetKeyHandler(handle_category28_right_softkey_up, KEY_CLEAR, KEY_EVENT_UP);
- #else
- set_right_softkey_function(handle_category28_right_softkey_up, KEY_EVENT_UP);
- #endif
- }
- }
- #if(ENABLE_EMS_TEST_DEMO)
- /* Removed by Leo useless code..... */
- /*****************************************************************************
- * FUNCTION
- * RedrawCategory29Screen
- * DESCRIPTION
- * Redraws the MT EMS/SMS screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawCategory29Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- clear_screen();
- show_title_status_icon();
- draw_title();
- show_softkey_background();
- show_left_softkey();
- show_right_softkey();
- #if(UI_DISABLE_EMS_INPUT_BOX)
- show_multiline_inputbox();
- #else
- show_EMS_inputbox();
- #endif
- gdi_layer_unlock_frame_buffer();
- gdi_layer_blt_previous(0, 0, UI_device_width - 1, UI_device_height - 1);
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory29Screen
- * DESCRIPTION
- * Displays the MT EMS/SMS screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * data [IN] EMSData (Pre-allocated and initialized)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory29Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- EMSData *data,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S16 input_type = 0;
- #if(UI_DISABLE_EMS_INPUT_BOX)
- S32 length;
- S32 i, j, h, fh;
- UI_UNUSED_PARAMETER(history_buffer);
- #else /* (UI_DISABLE_EMS_INPUT_BOX) */
- U8 h;
- #endif /* (UI_DISABLE_EMS_INPUT_BOX) */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EMS_inputbox_has_changed = 0;
- #ifdef __MMI_MESSAGES_EMS__
- initialize_EMS_objects();
- #endif
- MMI_menu_shortcut_number = -1;
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- MMI_title_string = (UI_string_type) get_string(title);
- MMI_title_icon = (PU8) get_image(title_icon);
- #if(UI_DISABLE_EMS_INPUT_BOX)
- length = (data->textBufferSize >> 1);
- if (length == 0)
- {
- UI_string_type s = (UI_string_type) "EMS Data not initialized";
- S32 l = gui_strlen((UI_string_type) s);
- temp_EMS_buffer = (UI_string_type) gui_malloc(l * sizeof(UI_character_type));
- gui_strcpy((UI_string_type) temp_EMS_buffer, (UI_string_type) s);
- length = l + 1;
- i = l;
- }
- else
- {
- temp_EMS_buffer = (UI_string_type) gui_malloc(length * sizeof(UI_character_type));
- i = j = 0;
- while (j < data->textLength)
- {
- if ((data->textBuffer[j] == ' ') && (data->textBuffer[j + 1] == ' '))
- {
- temp_EMS_buffer[i] = ' ';
- break;
- }
- else
- {
- temp_EMS_buffer[i] = data->textBuffer[j + 1];
- }
- i++;
- j += 2;
- }
- }
- temp_EMS_data = data;
- create_multiline_inputbox_set_buffer(temp_EMS_buffer, length, i, 0);
- register_multiline_inputbox_keys();
- register_hide_multitap(category5_hide_multitap);
- move_multiline_inputbox(0, (MMI_title_y + MMI_title_height) + 2);
- h = MMI_content_height - MMI_multitap_height - 8;
- gui_set_font(MMI_multiline_inputbox.text_font);
- fh = gui_get_character_height();
- h = ((h / fh) * fh) + 8;
- resize_multiline_inputbox(MMI_multiline_inputbox.width, h);
- set_multiline_inputbox_mask(0);
- #else /* (UI_DISABLE_EMS_INPUT_BOX) */
- #if((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_EMS_INPUTBOX_FRAME_SKIPPING))
- wgui_EMS_inputbox_frame_counter = 0;
- #endif
- h = set_EMS_inputbox_category_history(MMI_CATEGORY29_ID, history_buffer, (S16*) & input_type);
- gui_create_EMS_input_box(
- &MMI_EMS_inputbox,
- 0,
- (MMI_title_y + MMI_title_height),
- MMI_content_width,
- MMI_content_height + 2);
- MMI_EMS_inputbox.flags |= UI_EMS_INPUT_BOX_VIEW_MODE;
- if (!h)
- {
- gui_set_EMS_input_box_data(&MMI_EMS_inputbox, data);
- ResetCurrentPosition(MMI_EMS_inputbox.data);
- }
- register_EMS_inputbox_viewer_keys();
- #endif /* (UI_DISABLE_EMS_INPUT_BOX) */
- ExitCategoryFunction = ExitCategory29Screen;
- dm_setup_category_functions(dm_redraw_category_screen, GetCategory29History, GetCategory29HistorySize);
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY29_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- }
- /*****************************************************************************
- * FUNCTION
- * CloseCategory29Screen
- * DESCRIPTION
- * Releases data used by the MT EMS/SMS screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void CloseCategory29Screen(void)
- {
- #if(UI_DISABLE_EMS_INPUT_BOX)
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 length;
- S32 i, j;
- U8 *buffer;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- length = MMI_multiline_inputbox.text_length;
- buffer = (U8*) gui_malloc((length << 1) + 2);
- i = j = 0;
- ResetCurrentPosition(temp_EMS_data);
- while (i < length)
- {
- buffer[j++] = 0;
- buffer[j++] = (U8) temp_EMS_buffer[i++];
- }
- buffer[j++] = 0;
- buffer[j++] = ' ';
- AddString(temp_EMS_data, buffer, (U16) length, NULL);
- gui_free(buffer);
- gui_free(temp_EMS_buffer);
- #endif /* (UI_DISABLE_EMS_INPUT_BOX) */
- }
- /*****************************************************************************
- * FUNCTION
- * ExitCategory29Screen
- * DESCRIPTION
- * Exits the MT EMS/SMS screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory29Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(!UI_DISABLE_EMS_INPUT_BOX)
- reset_EMS_inputbox();
- #endif
- #ifdef __MMI_MESSAGES_EMS__
- close_EMS_objects();
- #endif
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = MMI_dummy_function;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory29HistorySize
- * DESCRIPTION
- * Gets the history buffer size for the MT EMS/SMS screen
- * PARAMETERS
- * void
- * RETURNS
- * size in U8s of the history buffer
- *****************************************************************************/
- S32 GetCategory29HistorySize(void)
- {
- #if(UI_DISABLE_EMS_INPUT_BOX)
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (0);
- #else /* (UI_DISABLE_EMS_INPUT_BOX) */
- return (sizeof(EMS_inputbox_category_history));
- #endif /* (UI_DISABLE_EMS_INPUT_BOX) */
- }
- /*****************************************************************************
- * FUNCTION
- * GetCategory29History
- * DESCRIPTION
- * Gets the history buffer for the MT EMS/SMS screen
- * PARAMETERS
- * history_buffer [IN] Is the buffer into which the history data is stored (pre-allocated)
- * RETURNS
- * pointer to the history buffer
- *****************************************************************************/
- U8 *GetCategory29History(U8 *history_buffer)
- {
- #if(UI_DISABLE_EMS_INPUT_BOX)
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (history_buffer);
- #else /* (UI_DISABLE_EMS_INPUT_BOX) */
- get_EMS_inputbox_category_history(MMI_CATEGORY28_ID, history_buffer, MMI_current_input_type);
- return (history_buffer);
- #endif /* (UI_DISABLE_EMS_INPUT_BOX) */
- }
- #endif /* (ENABLE_EMS_TEST_DEMO) */
- /* If EMS_VIEWER_HEADER_HEIGHT_AUTO is 1, then EMS_VIEWER_HEADER_HEIGHT defines
- the maximum possible height for the header. Otherwise, it defines the fixed
- height of the header */
- #define EMS_VIEWER_HEADER_HEIGHT 48
- #define EMS_VIEWER_HEADER_HEIGHT_AUTO 1
- /* If 1, uses multiline input box to display the header (word wrapping, no truncation),
- else uses normal text output (no word wrapping, truncation for lines longer than screen width) */
- #define EMS_VIEWER_HEADER_MULTILINE_INPUTBOX 0
- UI_filled_area EMS_viewer_header_background_filler = {UI_FILLED_AREA_TYPE_COLOR,
- UI_NULL_IMAGE,
- NULL,
- {180, 220, 220, 100},
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- {0, 0, 0, 0},
- 0
- };
- #if(EMS_VIEWER_HEADER_MULTILINE_INPUTBOX)
- multi_line_input_box EMS_viewer_header_inputbox;
- UI_multi_line_input_box_theme EMS_viewer_header_theme = { &EMS_viewer_header_background_filler,
- &EMS_viewer_header_background_filler,
- &EMS_viewer_header_background_filler,
- {0, 0, 0, 100},
- {0, 0, 0, 100},
- {128, 128, 128, 100},
- {0, 0, 0, 100},
- {255, 255, 255, 100},
- {51, 88, 171, 100},
- {255, 0, 0, 100},
- &MMI_default_font,
- 1,
- 0,
- '*',
- 1
- };
- /* EMS header implementation using multi-line input box */
- /*****************************************************************************
- * FUNCTION
- * create_EMS_viewer_header
- * DESCRIPTION
- *
- * PARAMETERS
- * message [?]
- * RETURNS
- * void
- *****************************************************************************/
- void create_EMS_viewer_header(U8 *message)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 l, ll;
- #if(EMS_VIEWER_HEADER_HEIGHT_AUTO)
- S32 fh, n_lines, h;
- #endif
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- l = gui_strlen((UI_string_type) message);
- ll = (l + 1) * ENCODING_LENGTH;
- gui_create_multi_line_input_box_set_buffer(
- &EMS_viewer_header_inputbox,
- 0,
- 0,
- MMI_EMS_inputbox.width - MMI_EMS_inputbox.vbar.width,
- EMS_VIEWER_HEADER_HEIGHT,
- (UI_string_type) message,
- ll,
- ll,
- 0);
- gui_set_multi_line_input_box_theme(&EMS_viewer_header_inputbox, &EMS_viewer_header_theme);
- EMS_viewer_header_inputbox.flags |=
- (UI_MULTI_LINE_INPUT_BOX_USE_PRESET_CLIPPING | UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR |
- UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW);
- #if(EMS_VIEWER_HEADER_HEIGHT_AUTO)
- gui_set_font(EMS_viewer_header_inputbox.text_font);
- fh = gui_get_character_height();
- EMS_viewer_header_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- gui_show_multi_line_input_box(&EMS_viewer_header_inputbox);
- EMS_viewer_header_inputbox.flags &= ~UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- n_lines = EMS_viewer_header_inputbox.n_lines;
- if (n_lines > 3)
- {
- n_lines = 3;
- }
- h = n_lines * fh + 6;
- if (h > EMS_VIEWER_HEADER_HEIGHT)
- {
- h = EMS_VIEWER_HEADER_HEIGHT;
- }
- gui_resize_multi_line_input_box(&EMS_viewer_header_inputbox, EMS_viewer_header_inputbox.width, h);
- #endif /* (EMS_VIEWER_HEADER_HEIGHT_AUTO) */
- }
- /*****************************************************************************
- * FUNCTION
- * EMS_viewer_show_header
- * DESCRIPTION
- *
- * PARAMETERS
- * x1 [IN]
- * y1 [IN]
- * x2 [IN]
- * y2 [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_viewer_show_header(S32 x1, S32 y1, S32 x2, S32 y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 ex1, ey1, ex2, ey2;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ex1 = MMI_EMS_inputbox.x + 1;
- ex2 = ex1 + MMI_EMS_inputbox.width - 2;
- ey1 = MMI_EMS_inputbox.y + 1;
- ey2 = ey1 + MMI_EMS_inputbox.height - 2;
- gui_set_text_clip(ex1, ey1, ex2, ey2);
- gui_set_clip(ex1, ey1, ex2, ey2);
- gui_move_multi_line_input_box(&EMS_viewer_header_inputbox, x1, y1);
- gui_show_multi_line_input_box(&EMS_viewer_header_inputbox);
- }
- /*****************************************************************************
- * FUNCTION
- * EMS_viewer_measure_header
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- S32 EMS_viewer_measure_header(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (EMS_viewer_header_inputbox.height);
- }
- #else /* (EMS_VIEWER_HEADER_MULTILINE_INPUTBOX) */
- /* EMS header implementation using normal text output */
- /* Requires message to contain line breaks where ever necessary */
- #define EMS_VIEWER_HEADER_MAX_LINES 4
- #define EMS_VIEWER_HEADER_MAX_LINE_LENGTH 32*ENCODING_LENGTH
- U8 EMS_header_text_strings[EMS_VIEWER_HEADER_MAX_LINES][EMS_VIEWER_HEADER_MAX_LINE_LENGTH];
- S32 EMS_header_text_string_heights[EMS_VIEWER_HEADER_MAX_LINES];
- S32 EMS_header_height = 0;
- S32 EMS_header_n_lines = 0;
- #if(0)
- /* Assumes the following format:
- <line1>n
- <line2>n
- ....
- Long lines are truncated by ... */
- void create_EMS_viewer_header(U8* message)
- { byte done=0;
- byte inner_done;
- S32 i,j;
- UI_buffer_type text=message;
- UI_buffer_type out_text;
- S32 sw,sh;
- UI_character_type c;
- pixtel_UI_set_font(&MMI_default_font);
- EMS_header_n_lines=0;
- EMS_header_height=0;
- i=0;
- while(!done)
- { if(EMS_header_n_lines>=EMS_VIEWER_HEADER_MAX_LINES) break;
- inner_done=0;
- j=0;
- out_text=(UI_buffer_type)EMS_header_text_strings[EMS_header_n_lines];
- EMS_header_text_strings[EMS_header_n_lines][0]=' ';
- EMS_header_text_strings[EMS_header_n_lines][1]=0;
- while(!inner_done)
- { if(j>=(EMS_VIEWER_HEADER_MAX_LINE_LENGTH-ENCODING_LENGTH)) break;
- UI_STRING_GET_NEXT_CHARACTER(text,c);
- if(UI_STRING_LINE_BREAK_CHARACTER(c))
- { inner_done=1;
- break;
- }
- if(UI_STRING_END_OF_STRING_CHARACTER(c))
- { inner_done=1;
- done=1;
- break;
- }
- UI_STRING_INSERT_CHARACTER(out_text,c);
- j+=ENCODING_LENGTH;
- }
- UI_STRING_INSERT_CHARACTER(out_text,' ');
- while(!inner_done)
- { UI_STRING_GET_NEXT_CHARACTER(text,c);
- if(UI_STRING_LINE_BREAK_CHARACTER(c))
- { inner_done=1;
- break;
- }
- if(UI_STRING_END_OF_STRING_CHARACTER(c))
- { inner_done=1;
- done=1;
- break;
- }
- }
- pixtel_UI_measure_string((UI_string_type)EMS_header_text_strings[EMS_header_n_lines],&sw,&sh);
- sh+=1;
- EMS_header_text_string_heights[EMS_header_n_lines]=sh;
- EMS_header_height+=sh;
- EMS_header_n_lines++;
- }
- if(EMS_header_height>0) EMS_header_height+=2;
- }
- #else /* (0) */
- /* Returns true when end of string is reached */
- /* loads n delimited strings */
- /*****************************************************************************
- * FUNCTION
- * load_EMS_viewer_header_string
- * DESCRIPTION
- *
- * PARAMETERS
- * src [IN]
- * dst [IN]
- * max_dst_length [IN]
- * RETURNS
- *
- *****************************************************************************/
- U8 load_EMS_viewer_header_string(U8 **src, U8 **dst, S32 max_dst_length)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UI_buffer_type text = *src;
- UI_buffer_type out_text = *dst;
- U8 inner_done = 0;
- S32 j = 0;
- U8 done = 0;
- UI_character_type c;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- while (!inner_done)
- {
- if (j >= (max_dst_length - ENCODING_LENGTH))
- {
- break;
- }
- UI_STRING_GET_NEXT_CHARACTER(text, c);
- if (UI_STRING_LINE_BREAK_CHARACTER(c))
- {
- inner_done = 1;
- break;
- }
- if (UI_STRING_END_OF_STRING_CHARACTER(c))
- {
- inner_done = 1;
- done = 1;
- break;
- }
- UI_STRING_INSERT_CHARACTER(out_text, c);
- j += ENCODING_LENGTH;
- }
- UI_STRING_INSERT_CHARACTER(out_text, ' ');
- while (!inner_done)
- {
- UI_STRING_GET_NEXT_CHARACTER(text, c);
- if (UI_STRING_LINE_BREAK_CHARACTER(c))
- {
- inner_done = 1;
- break;
- }
- if (UI_STRING_END_OF_STRING_CHARACTER(c))
- {
- inner_done = 1;
- done = 1;
- break;
- }
- }
- *src = text;
- *dst = out_text;
- return (done);
- }
- #define UI_EMS_HEADER_NUMBER_OF_BREAK_CHARACTERS (1)
- UI_character_type EMS_header_break_characters[] = { ' '
- };
- #define UI_EMS_HEADER_BREAK_CHARACTER(c,flag)
- { S32 _ii_;
- flag=0;
- for(_ii_=0;_ii_<UI_EMS_HEADER_NUMBER_OF_BREAK_CHARACTERS;_ii_++)
- { if((UI_character_type)c==(UI_character_type)EMS_header_break_characters[_ii_])
- { flag=1;
- break;
- }
- }
- }
- /* Assumes the following format:
- From:n
- Name/numbern
- Daten
- Timen
- Attempts to combine first two lines */
- /*****************************************************************************
- * FUNCTION
- * create_EMS_viewer_header
- * DESCRIPTION
- *
- * PARAMETERS
- * message [?]
- * RETURNS
- * void
- *****************************************************************************/
- void create_EMS_viewer_header(U8 *message)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 done = 0;
- U8 inner_done;
- S32 j;
- UI_buffer_type text = message;
- UI_buffer_type out_text;
- S32 sw, sh, break_count;
- UI_character_type c;
- S32 l1_w, l1_h, l2_w, l2_h;
- U8 temp_string[EMS_VIEWER_HEADER_MAX_LINE_LENGTH];
- /* U8 space_string[]={' ',0,' ',0}; */
- /* U8 blank_string[]={' ',0}; */
- S32 character_width, character_height;
- S32 box_width = (MMI_EMS_inputbox.width - MMI_EMS_inputbox.vbar.width - 2);
- UI_buffer_type temp_text1, temp_text2;
- U8 break_flag;
- U16 from_len = 0;
- U16 name_number_len = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_set_font(&MMI_default_font);
- EMS_header_n_lines = 0;
- EMS_header_height = 0;
- out_text = (UI_buffer_type) EMS_header_text_strings[EMS_header_n_lines];
- /* "From:" */
- done = load_EMS_viewer_header_string(&text, &out_text, EMS_VIEWER_HEADER_MAX_LINE_LENGTH);
- gui_measure_string((UI_string_type) EMS_header_text_strings[EMS_header_n_lines], &l1_w, &l1_h);
- l1_h++;
- EMS_header_height += l1_h;
- EMS_header_text_string_heights[EMS_header_n_lines] = l1_h;
- from_len = pfnUnicodeStrlen((S8*) EMS_header_text_strings[EMS_header_n_lines]);
- /* "Name/number" */
- if (!done)
- {
- out_text = (UI_buffer_type) temp_string;
- done = load_EMS_viewer_header_string(&text, &out_text, EMS_VIEWER_HEADER_MAX_LINE_LENGTH);
- gui_measure_string((UI_string_type) temp_string, &l2_w, &l2_h);
- name_number_len = pfnUnicodeStrlen((S8*) temp_string);
- if (((l1_w + l2_w) < box_width) &&
- ((from_len + name_number_len) < EMS_VIEWER_HEADER_MAX_LINE_LENGTH / ENCODING_LENGTH))
- {
- gui_strcat((UI_string_type) EMS_header_text_strings[EMS_header_n_lines], (UI_string_type) temp_string);
- gui_measure_string((UI_string_type) EMS_header_text_strings[EMS_header_n_lines], &sw, &sh);
- sh++;
- EMS_header_height -= l1_h;
- EMS_header_height += sh;
- EMS_header_text_string_heights[EMS_header_n_lines] = sh;
- EMS_header_n_lines++;
- }
- else if ((l2_w <= box_width) && (name_number_len < EMS_VIEWER_HEADER_MAX_LINE_LENGTH / ENCODING_LENGTH))
- {
- EMS_header_n_lines++;
- gui_strcpy((UI_string_type) EMS_header_text_strings[EMS_header_n_lines], (UI_string_type) temp_string);
- gui_measure_string((UI_string_type) EMS_header_text_strings[EMS_header_n_lines], &sw, &sh);
- sh++;
- EMS_header_height += sh;
- EMS_header_text_string_heights[EMS_header_n_lines] = sh;
- EMS_header_n_lines++;
- }
- else /* break "Name/number" into two lines */
- {
- out_text = (UI_buffer_type) temp_string;
- break_count = 0;
- inner_done = 0;
- sw = l1_w;
- j = 0;
- while (!inner_done)
- {
- UI_STRING_GET_NEXT_CHARACTER(out_text, c);
- if (UI_STRING_END_OF_STRING_CHARACTER(c))
- {
- break_count = j;
- inner_done = 1;
- done = 1;
- break;
- }
- UI_EMS_HEADER_BREAK_CHARACTER(c, break_flag);
- if (break_flag)
- {
- break_count = j + 1;
- }
- gui_measure_character(c, &character_width, &character_height);
- character_width += 1;
- if ((sw + character_width) > box_width)
- {
- inner_done = 1;
- break;
- }
- sw += character_width;
- j++;
- }
- if (break_count == 0)
- {
- break_count = j;
- }
- temp_text1 = (UI_buffer_type) EMS_header_text_strings[EMS_header_n_lines + 1];
- temp_text2 = (UI_buffer_type) temp_string;
- for (j = 0; j < break_count; j++)
- {
- UI_STRING_GET_NEXT_CHARACTER(temp_text2, c);
- UI_STRING_INSERT_CHARACTER(temp_text1, c);
- }
- UI_STRING_INSERT_CHARACTER(temp_text1, ' ');
- gui_strcat(
- (UI_string_type) EMS_header_text_strings[EMS_header_n_lines],
- (UI_string_type) EMS_header_text_strings[EMS_header_n_lines + 1]);
- inner_done = 0;
- temp_text1 = (UI_buffer_type) EMS_header_text_strings[EMS_header_n_lines + 1];
- while (!inner_done)
- {
- UI_STRING_GET_NEXT_CHARACTER(temp_text2, c);
- if (UI_STRING_END_OF_STRING_CHARACTER(c))
- {
- inner_done = 1;
- break;
- }
- if (UI_STRING_LINE_BREAK_CHARACTER(c))
- {
- inner_done = 1;
- break;
- }
- UI_STRING_INSERT_CHARACTER(temp_text1, c);
- }
- UI_STRING_INSERT_CHARACTER(temp_text1, ' ');
- gui_measure_string((UI_string_type) EMS_header_text_strings[EMS_header_n_lines], &sw, &sh);
- sh++;
- EMS_header_text_string_heights[EMS_header_n_lines] = sh;
- EMS_header_height -= l1_h;
- EMS_header_height += sh;
- gui_measure_string((UI_string_type) EMS_header_text_strings[EMS_header_n_lines + 1], &sw, &sh);
- sh++;
- EMS_header_text_string_heights[EMS_header_n_lines + 1] = sh;
- EMS_header_height += sh;
- EMS_header_n_lines += 2;
- }
- }
- else
- {
- EMS_header_n_lines++;
- }
- if (!done)
- {
- out_text = (UI_buffer_type) EMS_header_text_strings[EMS_header_n_lines];
- done = load_EMS_viewer_header_string(&text, &out_text, EMS_VIEWER_HEADER_MAX_LINE_LENGTH);
- gui_measure_string((UI_string_type) EMS_header_text_strings[EMS_header_n_lines], &sw, &sh);
- sh++;
- EMS_header_height += sh;
- EMS_header_text_string_heights[EMS_header_n_lines] = sh;
- EMS_header_n_lines++;
- }
- if (!done)
- {
- out_text = (UI_buffer_type) EMS_header_text_strings[EMS_header_n_lines];
- done = load_EMS_viewer_header_string(&text, &out_text, EMS_VIEWER_HEADER_MAX_LINE_LENGTH);
- gui_measure_string((UI_string_type) EMS_header_text_strings[EMS_header_n_lines], &sw, &sh);
- sh++;
- EMS_header_height += sh;
- EMS_header_text_string_heights[EMS_header_n_lines] = sh;
- EMS_header_n_lines++;
- }
- if (EMS_header_height > 0)
- {
- EMS_header_height += 2;
- }
- }
- #endif /* (0) */
- /*****************************************************************************
- * FUNCTION
- * EMS_viewer_show_header
- * DESCRIPTION
- *
- * PARAMETERS
- * x1 [IN]
- * y1 [IN]
- * x2 [IN]
- * y2 [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_viewer_show_header(S32 x1, S32 y1, S32 x2, S32 y2)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 ex1, ey1, ex2, ey2, x, y, xwidth, i;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (EMS_header_height <= 0)
- {
- return;
- }
- ex1 = MMI_EMS_inputbox.x + 1;
- ex2 = ex1 + MMI_EMS_inputbox.width - 5;
- ey1 = MMI_EMS_inputbox.y + 1;
- ey2 = ey1 + MMI_EMS_inputbox.height - 2;
- gui_set_text_clip(ex1, ey1, ex2, ey2);
- gui_set_clip(ex1, ey1, ex2, ey2);
- gui_set_font(&MMI_default_font);
- gui_set_text_color(*current_MMI_theme->UI_black_color);
- gui_draw_filled_area(ex1, y1, ex2, y2, &EMS_viewer_header_background_filler);
- /* MTK Elvis for R2L characters */
- if (r2lMMIFlag)
- {
- x = UI_device_width - 3;
- }
- else
- {
- x = ex1 + 1;
- }
- /* MTK end */
- y = y1 + 2;
- xwidth = (ex2 - ex1 - 3);
- for (i = 0; i < EMS_header_n_lines; i++)
- {
- gui_print_truncated_text(x, y, xwidth, (UI_string_type) EMS_header_text_strings[i]);
- y += EMS_header_text_string_heights[i];
- }
- }
- /*****************************************************************************
- * FUNCTION
- * EMS_viewer_measure_header
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- S32 EMS_viewer_measure_header(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (EMS_header_height);
- }
- #endif /* (EMS_VIEWER_HEADER_MULTILINE_INPUTBOX) */
- #if(ENABLE_EMS_TEST_DEMO)
- #define EMS_TEST_DEMO_SCREEN_ID (MAIN_MENU_BASE+80)
- #define EMS_OBJECT_LIST_TEST_SCREEN_ID (MAIN_MENU_BASE+81)
- EMSData EMS_demo_EMS_data;
- S32 EMS_demo_object_index;
- S32 EMS_demo_n_objects;
- void EMS_demo_exit_category28(void);
- void EMS_demo_exit_category29(void);
- void EMS_demo_exit_object_list(void);
- void EMS_demo_enter_object_list(void);
- void EMS_demo_exit_object_list2(void);
- void EMS_demo_enter_object_list2(void);
- /*****************************************************************************
- * FUNCTION
- * EMS_demo_close_category28
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_demo_close_category28(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- CloseCategory28Screen();
- GoBackHistory();
- }
- #define EMS_GSM_ASCII_TEST 0
- #define EMS_OBJECT_VIEWER_TEST 0
- /*****************************************************************************
- * FUNCTION
- * EMS_demo_category28
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_demo_category28(void)
- {
- #if(EMS_GSM_ASCII_TEST)
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 s[2] = {0, 0};
- S32 i;
- #endif /* (EMS_GSM_ASCII_TEST) */
- U8 *guiBuffer;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ExecuteCurrExitHandler();
- guiBuffer = GetCurrGuiBuffer(EMS_TEST_DEMO_SCREEN_ID);
- if (guiBuffer == NULL)
- {
- InitializeEMSData(&EMS_demo_EMS_data, SMSAL_DEFAULT_DCS);
- }
- #if(EMS_GSM_ASCII_TEST)
- for (i = 0; i < 128; i++)
- {
- s[0] = (U8) i;
- AddString(&EMS_demo_EMS_data, s, 1, NULL);
- }
- ResetCurrentPosition(&EMS_demo_EMS_data);
- EMS_ConvertGSM7BitDefaultEncodingToAscii(&EMS_demo_EMS_data);
- EMS_ConvertAsciiEncodingToGSM7BitDefault(&EMS_demo_EMS_data);
- EMS_ConvertGSM7BitDefaultEncodingToAscii(&EMS_demo_EMS_data);
- #endif /* (EMS_GSM_ASCII_TEST) */
- ShowCategory28Screen(0, 0, STR_GLOBAL_OK, 0, STR_GLOBAL_BACK, 0, &EMS_demo_EMS_data, guiBuffer);
- SetCategory28RightSoftkeyFunction(EMS_demo_close_category28, KEY_EVENT_UP);
- // SetKeyHandler(EntryInputMethodScreen,KEY_STAR,KEY_EVENT_UP);
- // RegisterInputMethodScreenCloseFunction(GoBackHistory);
- SetExitHandler(EMS_TEST_DEMO_SCREEN_ID, EMS_demo_exit_category28);
- #if(EMS_OBJECT_VIEWER_TEST)
- SetLeftSoftkeyFunction(EMS_demo_enter_object_list2, KEY_EVENT_UP);
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * EMS_demo_exit_category28
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_demo_exit_category28(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- history h;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- h.scrnID = EMS_TEST_DEMO_SCREEN_ID;
- h.entryFuncPtr = EMS_demo_category28;
- GetCategoryHistory(h.guiBuffer);
- AddHistory(h);
- }
- #define EMS_DEMO_HIDE_PREDEFINED_OBJECTS 1
- EMSObject *EMS_demo_object_list;
- /*****************************************************************************
- * FUNCTION
- * EMS_demo_enter_object_list
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_demo_enter_object_list(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ExecuteCurrExitHandler();
- guiBuffer = GetCurrGuiBuffer(EMS_OBJECT_LIST_TEST_SCREEN_ID);
- EMS_demo_object_index = 0;
- EMS_demo_n_objects = 0;
- #if(EMS_DEMO_HIDE_PREDEFINED_OBJECTS)
- CreateCategory143ObjectList(&EMS_demo_EMS_data, &EMS_demo_object_list);
- #else
- EMS_demo_object_list = EMS_demo_EMS_data.listHead;
- #endif
- ShowCategory143Screen(
- 0,
- 0,
- 0,
- 0,
- STR_GLOBAL_BACK,
- 0,
- EMS_demo_object_list,
- &EMS_demo_n_objects,
- &EMS_demo_object_index,
- guiBuffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetExitHandler(EMS_OBJECT_LIST_TEST_SCREEN_ID, EMS_demo_exit_object_list);
- }
- /*****************************************************************************
- * FUNCTION
- * EMS_demo_exit_object_list
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_demo_exit_object_list(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- history h;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if(EMS_DEMO_HIDE_PREDEFINED_OBJECTS)
- FreeCategory143ObjectList(&EMS_demo_object_list);
- #endif
- h.scrnID = EMS_OBJECT_LIST_TEST_SCREEN_ID;
- h.entryFuncPtr = EMS_demo_enter_object_list;
- GetCategoryHistory(h.guiBuffer);
- AddHistory(h);
- }
- U16 EMS_demo_object_list2[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, };
- U8 *EMS_demo_object_list3[10];
- /*****************************************************************************
- * FUNCTION
- * EMS_demo_object_list2_loader
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * RETURNS
- *
- *****************************************************************************/
- U8 *EMS_demo_object_list2_loader(S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (EMS_predefined_pictures[index]);
- }
- /*****************************************************************************
- * FUNCTION
- * EMS_demo_enter_object_list2
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_demo_enter_object_list2(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ExecuteCurrExitHandler();
- guiBuffer = GetCurrGuiBuffer(EMS_OBJECT_LIST_TEST_SCREEN_ID);
- EMS_demo_object_index = 0;
- EMS_demo_n_objects = 10;
- RegisterCategory144ObjectLoader(EMS_demo_object_list2_loader);
- ShowCategory144Screen(
- 0,
- 0,
- STR_GLOBAL_OK,
- 0,
- STR_GLOBAL_BACK,
- 0,
- /* EMS_PREDEFINED_PICTURE */ 0,
- EMS_demo_n_objects,
- NULL,
- EMS_demo_object_list2,
- EMS_demo_object_list3,
- &EMS_demo_object_index,
- guiBuffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetExitHandler(EMS_OBJECT_LIST_TEST_SCREEN_ID, EMS_demo_exit_object_list2);
- }
- /*****************************************************************************
- * FUNCTION
- * EMS_demo_exit_object_list2
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_demo_exit_object_list2(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- history h;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- h.scrnID = EMS_OBJECT_LIST_TEST_SCREEN_ID;
- h.entryFuncPtr = EMS_demo_enter_object_list2;
- GetCategoryHistory(h.guiBuffer);
- AddHistory(h);
- }
- /* Cat29 Demo Entry and Exit functions */
- S8 EMS_demo_test_string[] =
- {
- 'S', 0, 'a', 0, 'm', 0, 'p', 0, 'l', 0, 'e', 0, ' ', 0, 'S', 0, 'M', 0, 'S', 0, ' ', 0, 't', 0, 'e', 0, 's', 0, 't',
- 0, ' ', 0, 'm', 0, 'e', 0, 's', 0, 's', 0, 'a', 0, 'g', 0, 'e', 0, '.', 0, ' ', 0, '1', 0, '2', 0, '3', 0, '4',
- 0, ' ', 0, '5', 0, '6', 0, '7', 0, '8', 0, ' ', 0, '9', 0, '0', 0, '1', 0, '2', 0, ' ', 0, 'A', 0, 'B', 0, 'C',
- 0, 'D', 0, ' ', 0, 'e', 0, 'f', 0, 'g', 0, 'h', 0, ' ', 0, 'I', 0, 'J', 0, 'K', 0, 'L', 0, ' ', 0, 'm', 0, 'n',
- 0, 'o', 0, 'p', 0, ' ', 0, 'Q', 0, 'R', 0, 'S', 0, 'T', 0, ' ', 0, 'u', 0, 'v', 0, 'w', 0, 'x', 0, ' ', 0, 'Y',
- 0, 'Z', 0, ' ', 0
- };
- /*****************************************************************************
- * FUNCTION
- * EMS_demo_close_category29
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_demo_close_category29(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- CloseCategory29Screen();
- GoBackHistory();
- }
- /*****************************************************************************
- * FUNCTION
- * EMS_demo_category29
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_demo_category29(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ExecuteCurrExitHandler();
- guiBuffer = GetCurrGuiBuffer(EMS_TEST_DEMO_SCREEN_ID);
- InitializeEMSData(&EMS_demo_EMS_data, SMSAL_DEFAULT_DCS);
- AddString(&EMS_demo_EMS_data, (U8*) EMS_demo_test_string, sizeof(EMS_demo_test_string) / 2, NULL);
- ShowCategory29Screen(0, 0, 0, 0, STR_GLOBAL_BACK, 0, &EMS_demo_EMS_data, guiBuffer);
- SetRightSoftkeyFunction(EMS_demo_close_category29, KEY_EVENT_UP);
- SetExitHandler(EMS_TEST_DEMO_SCREEN_ID, EMS_demo_exit_category29);
- }
- /*****************************************************************************
- * FUNCTION
- * EMS_demo_exit_category29
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_demo_exit_category29(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- history h;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- h.scrnID = EMS_TEST_DEMO_SCREEN_ID;
- h.entryFuncPtr = EMS_demo_category29;
- h.inputBuffer[0] = ' ';
- GetCategoryHistory(h.guiBuffer);
- AddHistory(h);
- }
- S8 EMS_demo_header_string[] =
- { 'S', 0, 'a', 0, 'm', 0, 'p', 0, 'l', 0, 'e', 0, ' ', 0, 'h', 0, 'e', 0, 'a', 0, 'd', 0, 'e', 0, 'r', 0, 'n', 0,
- 'm', 0, 'e', 0, 's', 0, 's', 0, 'a', 0, 'g', 0, 'e', 0, ' ', 0, 's', 0, 't', 0, 'r', 0, 'i', 0, 'n', 0, 'g', 0, 'n', 0, '1', 0, '2', 0,
- '3', 0, '4', 0, '5', 0, '6', 0, ' ', 0
- };
- S8 EMS_demo_header_ASCII_string[] = "From: nABCDE FGHIJKLMNOPn03/04/2003n08:24:35n";
- U8 EMS_demo_header_temp_string[1024];
- void EMS_demo_exit_category39(void);
- /*****************************************************************************
- * FUNCTION
- * EMS_demo_close_category39
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_demo_close_category39(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- CloseCategory39Screen();
- GoBackHistory();
- }
- /*****************************************************************************
- * FUNCTION
- * EMS_demo_category39
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_demo_category39(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ExecuteCurrExitHandler();
- guiBuffer = GetCurrGuiBuffer(EMS_TEST_DEMO_SCREEN_ID);
- InitializeEMSData(&EMS_demo_EMS_data, SMSAL_DEFAULT_DCS);
- AddString(&EMS_demo_EMS_data, (U8*) EMS_demo_test_string, sizeof(EMS_demo_test_string) / 2, NULL);
- AnsiiToUnicodeString(EMS_demo_header_temp_string, EMS_demo_header_ASCII_string);
- ShowCategory39Screen(0, 0, 0, 0, STR_GLOBAL_BACK, 0, &EMS_demo_EMS_data, EMS_demo_header_temp_string, guiBuffer);
- SetRightSoftkeyFunction(EMS_demo_close_category39, KEY_EVENT_UP);
- SetExitHandler(EMS_TEST_DEMO_SCREEN_ID, EMS_demo_exit_category39);
- }
- /*****************************************************************************
- * FUNCTION
- * EMS_demo_exit_category39
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_demo_exit_category39(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- history h;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- h.scrnID = EMS_TEST_DEMO_SCREEN_ID;
- h.entryFuncPtr = EMS_demo_category39;
- h.inputBuffer[0] = ' ';
- GetCategoryHistory(h.guiBuffer);
- AddHistory(h);
- }
- #endif /* (ENABLE_EMS_TEST_DEMO) */
- #endif /* (!UI_DISABLE_EMS_CATEGORY_SCREENS) */
- /*****************************************************************************
- * FUNCTION
- * is_EMS_inputbox_in_view_mode
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- MMI_BOOL is_EMS_inputbox_in_view_mode(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (MMI_EMS_inputbox.flags & UI_EMS_INPUT_BOX_VIEW_MODE)
- {
- return MMI_TRUE;
- }
- else
- {
- return MMI_FALSE;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * wgui_EMS_set_text_format
- * DESCRIPTION
- *
- * PARAMETERS
- * text_format [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void wgui_EMS_set_text_format(EMSTextFormat text_format)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- wgui_EMS_text_format = text_format;
- }