wgui_inline_edit.c
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:887k
源码类别:

MTK

开发平台:

C/C++

  1.     /*----------------------------------------------------------------*/
  2.     /*----------------------------------------------------------------*/
  3.     /* Code Body                                                      */
  4.     /*----------------------------------------------------------------*/
  5. #if(UI_BLINKING_CURSOR_SUPPORT)
  6.     StopMyTimer(BLINKING_CURSOR);
  7. #endif 
  8.     wgui_inline_edit_arrow_key_flag = CATEGORY57_NO_KEY_FLAG;
  9.     gui_set_fixed_list_menu_current_theme(&MMI_fixed_list_menu);
  10.     current_wgui_inline_item = NULL;
  11.     wgui_n_inline_items = 0;
  12.     wgui_inline_item_highlighted_index = -1;
  13.     wgui_inline_list_menu_changed = 0;
  14.     wgui_inline_list_menu_disable_done = 0;
  15.     wgui_inline_edit_DONE_function = NULL;
  16.     wgui_inline_edit_BACK_function = NULL;
  17.     complete_inline_item_edit = UI_dummy_function;
  18.     category_inline_edit_menuitem_flags();
  19.     clear_inline_item_keys();
  20.     wgui_text_menuitem_reset_scrolling();
  21.     reset_pop_up_descriptions();
  22.     redraw_current_inline_item = UI_dummy_function;
  23. #ifdef __MMI_TOUCH_SCREEN__
  24.     wgui_current_inline_item_pen_function = UI_dummy_inline_item_pen_function;
  25. #endif 
  26.     ClearHighlightHandler();
  27.     reset_softkeys();
  28.     reset_menu_shortcut_handler();
  29.     reset_fixed_list();
  30.     ExitCategoryFunction = MMI_dummy_function;
  31.     RedrawCategoryFunction = MMI_dummy_function;
  32.     GetCategoryHistory = dummy_get_history;
  33.     GetCategoryHistorySize = dummy_get_history_size;
  34.     inline_edit_current_highlight_handler = MMI_dummy_highlight_handler;
  35.     MMI_fixed_icontext_menuitem.text_font = cat57_f1;
  36.     MMI_fixed_text_menuitem.text_font = cat57_f2;
  37. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  38.     gui_unblock_list_effect();
  39. #endif 
  40. #ifdef __MMI_UI_TRANSPARENT_EFFECT__
  41.     enable_fixed_icontext_menuitem_transparent_effect();
  42. #endif 
  43.     inline_item_changed_handler = NULL;
  44. }
  45. /*****************************************************************************
  46.  * FUNCTION
  47.  *  Category157ChangeItemText
  48.  * DESCRIPTION
  49.  *  
  50.  * PARAMETERS
  51.  *  index       [IN]        
  52.  *  text        [?]         
  53.  * RETURNS
  54.  *  void
  55.  *****************************************************************************/
  56. void Category157ChangeItemText(S32 index, U8 *text)
  57. {
  58.     /*----------------------------------------------------------------*/
  59.     /* Local Variables                                                */
  60.     /*----------------------------------------------------------------*/
  61.     /*----------------------------------------------------------------*/
  62.     /* Code Body                                                      */
  63.     /*----------------------------------------------------------------*/
  64.     MMI_fixed_icontext_menuitems[index].item_text = (UI_string_type) text;
  65. }
  66. /*****************************************************************************
  67.  * FUNCTION
  68.  *  Category157ChangeItemIcon
  69.  * DESCRIPTION
  70.  *  
  71.  * PARAMETERS
  72.  *  index           [IN]        
  73.  *  image_ID        [IN]        
  74.  * RETURNS
  75.  *  void
  76.  *****************************************************************************/
  77. void Category157ChangeItemIcon(S32 index, U16 image_ID)
  78. {
  79.     /*----------------------------------------------------------------*/
  80.     /* Local Variables                                                */
  81.     /*----------------------------------------------------------------*/
  82.     /*----------------------------------------------------------------*/
  83.     /* Code Body                                                      */
  84.     /*----------------------------------------------------------------*/
  85.     MMI_fixed_icontext_menuitems[index].item_icon = (PU8) get_image(image_ID);
  86. }
  87. /*****************************************************************************
  88.  * FUNCTION
  89.  *  GetCategory157DataSize
  90.  * DESCRIPTION
  91.  *  
  92.  * PARAMETERS
  93.  *  void
  94.  * RETURNS
  95.  *  
  96.  *****************************************************************************/
  97. S32 GetCategory157DataSize(void)
  98. {
  99.     /*----------------------------------------------------------------*/
  100.     /* Local Variables                                                */
  101.     /*----------------------------------------------------------------*/
  102.     /*----------------------------------------------------------------*/
  103.     /* Code Body                                                      */
  104.     /*----------------------------------------------------------------*/
  105.     return (wgui_get_inline_data_size());
  106. }
  107. /*****************************************************************************
  108.  * FUNCTION
  109.  *  GetCategory157Data
  110.  * DESCRIPTION
  111.  *  
  112.  * PARAMETERS
  113.  *  data        [?]     
  114.  * RETURNS
  115.  *  
  116.  *****************************************************************************/
  117. U8 *GetCategory157Data(U8 *data)
  118. {
  119.     /*----------------------------------------------------------------*/
  120.     /* Local Variables                                                */
  121.     /*----------------------------------------------------------------*/
  122.     /*----------------------------------------------------------------*/
  123.     /* Code Body                                                      */
  124.     /*----------------------------------------------------------------*/
  125.     return (wgui_get_inline_data(data));
  126. }
  127. /*****************************************************************************
  128.  * FUNCTION
  129.  *  SetCategory157Data
  130.  * DESCRIPTION
  131.  *  
  132.  * PARAMETERS
  133.  *  list_of_items       [?]         
  134.  *  number_of_items     [IN]        
  135.  *  data                [?]         
  136.  * RETURNS
  137.  *  void
  138.  *****************************************************************************/
  139. void SetCategory157Data(InlineItem *list_of_items, S32 number_of_items, U8 *data)
  140. {
  141.     /*----------------------------------------------------------------*/
  142.     /* Local Variables                                                */
  143.     /*----------------------------------------------------------------*/
  144.     /*----------------------------------------------------------------*/
  145.     /* Code Body                                                      */
  146.     /*----------------------------------------------------------------*/
  147.     wgui_set_inline_data(list_of_items, number_of_items, data);
  148. }
  149. #if defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__)
  150. /******************************************************************************************/
  151. /******************************************************************************************/
  152. /******************************************************************************************/
  153. U8 inline_multi_line_edit_changed = 0;
  154. UI_string_type inscreen_text_box_title;
  155. U8 inscreen_multi_line_change_flag = 0;
  156. extern void GoBackHistory(void);
  157. /*****************************************************************************
  158.  * FUNCTION
  159.  *  SetInlineItemMultiLineEdit
  160.  * DESCRIPTION
  161.  *  
  162.  * PARAMETERS
  163.  *  item            [?]         
  164.  *  buffer          [?]         
  165.  *  title           [?]         
  166.  *  buffer_size     [IN]        
  167.  *  input_type      [IN]        
  168.  * RETURNS
  169.  *  void
  170.  *****************************************************************************/
  171. void SetInlineItemMultiLineEdit(InlineItem *item, U8 *buffer, U8 *title, S32 buffer_size, S16 input_type)
  172. {
  173.     /*----------------------------------------------------------------*/
  174.     /* Local Variables                                                */
  175.     /*----------------------------------------------------------------*/
  176.     wgui_inline_item_text_edit *i;
  177.     UI_buffer_type mask_buffer;
  178.     S16 t = input_type & INPUT_TYPE_MASK;
  179.     /*----------------------------------------------------------------*/
  180.     /* Code Body                                                      */
  181.     /*----------------------------------------------------------------*/
  182.     inscreen_text_box_title = (UI_string_type) title;
  183.     if (n_inline_text_edit_items >= MAX_INLINE_TEXT_EDIT_ITEMS)
  184.     {
  185.         return;
  186.     }
  187.     item->item = (void*)&wgui_inline_text_edit_items[n_inline_text_edit_items];
  188.     item->flags = INLINE_ITEM_TYPE_MULTI_LINE_EDIT;
  189.     mask_buffer = inline_text_edit_mask_buffers[n_inline_text_edit_items];
  190.     n_inline_text_edit_items++;
  191.     i = (wgui_inline_item_text_edit*) item->item;
  192.     i->max_lines = 0;
  193.     i->title = 0;
  194.     i->title_icon = 0;
  195.     i->buffer = buffer;
  196.     i->buffer_size = buffer_size;
  197.     i->flags = 0;
  198.     i->input_type = input_type;
  199.     item->text_p = i->buffer;
  200.     item->handler = handle_inline_multi_line_edit;
  201.     i->edit_complete_callback = UI_dummy_edit_complete_handler;
  202.     i->custom_setup_function = NULL;
  203.     i->validation_callback = UI_dummy_validation_function;
  204.     if ((t == INPUT_TYPE_NUMERIC_PASSWORD) || (t == INPUT_TYPE_ALPHANUMERIC_PASSWORD) ||
  205.         (t == INPUT_TYPE_SAT_NUMERIC_PASSWORD))
  206.     {
  207.         inline_edit_prepare_mask_buffer(buffer, mask_buffer);
  208.         i->mask_buffer = mask_buffer;
  209.         item->text_p = mask_buffer;
  210.     }
  211.     i->UCS2_count = -1;
  212.     MMI_multi_line_inputbox_present = 1;
  213. }
  214. /*****************************************************************************
  215.  * FUNCTION
  216.  *  SetInlineMultiLineEditCustomFunction
  217.  * DESCRIPTION
  218.  *  
  219.  * PARAMETERS
  220.  *  item        [?]         
  221.  *  f           [IN]        
  222.  * RETURNS
  223.  *  void
  224.  *****************************************************************************/
  225. void SetInlineMultiLineEditCustomFunction(InlineItem *item, void (*f) (void))
  226. {
  227.     /*----------------------------------------------------------------*/
  228.     /* Local Variables                                                */
  229.     /*----------------------------------------------------------------*/
  230.     wgui_inline_item_text_edit *i = (wgui_inline_item_text_edit*) item->item;
  231.     /*----------------------------------------------------------------*/
  232.     /* Code Body                                                      */
  233.     /*----------------------------------------------------------------*/
  234.     i->custom_setup_function = f;
  235. }
  236. /*****************************************************************************
  237.  * FUNCTION
  238.  *  handle_inline_multi_line_edit
  239.  * DESCRIPTION
  240.  *  
  241.  * PARAMETERS
  242.  *  x                   [IN]        
  243.  *  y                   [IN]        
  244.  *  width               [IN]        
  245.  *  height              [IN]        
  246.  *  key_code            [IN]        
  247.  *  key_event           [IN]        
  248.  *  text_p              [IN]        
  249.  *  item                [?]         
  250.  *  flags               [IN]        
  251.  *  history_buffer      [?]         
  252.  * RETURNS
  253.  *  void
  254.  *****************************************************************************/
  255. void handle_inline_multi_line_edit(
  256.         S32 x,
  257.         S32 y,
  258.         S32 width,
  259.         S32 height,
  260.         S32 key_code,
  261.         S32 key_event,
  262.         U8 **text_p,
  263.         void *item,
  264.         U32 flags,
  265.         U8 *history_buffer)
  266. {
  267.     /*----------------------------------------------------------------*/
  268.     /* Local Variables                                                */
  269.     /*----------------------------------------------------------------*/
  270.     S32 input_type;
  271.     wgui_inline_item_text_edit *i = (wgui_inline_item_text_edit*) item;
  272.     S32 inputbox_x = x;
  273.     S32 inputbox_y = y;
  274.     S32 inputbox_width = width + 2;
  275. #if !defined(__MMI_TOUCH_SCREEN__)
  276.     S32 inputbox_height = MMI_content_height - (MMI_fixed_list_menu.n_items) * MMI_ICONTEXT_MENUITEM_HEIGHT - INFORMATION_BAR_HEIGHT - 2;       /* Height Changed According to Menu Item Number. */
  277. #else 
  278.     S32 inputbox_height = MMI_content_height - MMI_MULTITAP_HEIGHT - INFORMATION_BAR_HEIGHT - 7;        /* Height Changed According to Menu Item Number. */
  279. #endif 
  280.     /*----------------------------------------------------------------*/
  281.     /* Code Body                                                      */
  282.     /*----------------------------------------------------------------*/
  283.     MMI_multi_line_inputbox_present = 1;
  284.     wgui_current_inline_item_type = INLINE_ITEM_TYPE_MULTI_LINE_EDIT;   /* Should Be Present. */
  285.     UI_UNUSED_PARAMETER(key_code);
  286.     UI_UNUSED_PARAMETER(key_event);
  287.     UI_UNUSED_PARAMETER(flags);
  288.     gdi_layer_lock_frame_buffer();
  289.     wgui_text_menuitem_reset_scrolling();
  290.     if (i->flags & INLINE_ITEM_CHANGED)
  291.     {
  292.         inline_multi_line_edit_changed = 1;
  293.     }
  294.     else
  295.     {
  296.         inline_multi_line_edit_changed = 0;
  297.     }
  298.     wgui_current_inline_item_type = INLINE_ITEM_TYPE_MULTI_LINE_EDIT;
  299.     current_wgui_inline_text_edit_item = i;
  300.     current_wgui_inline_text_edit_text_p = text_p;
  301.     input_type = i->input_type;
  302.     if (!(flags & INLINE_ITEM_OPEN))
  303.     {
  304.         gui_strcpy((UI_string_type) wgui_inline_full_screen_text_edit_buffer, (UI_string_type) i->buffer);
  305.         history_buffer = NULL;
  306.     }
  307.     i->flags &= ~INLINE_ITEM_OPEN;
  308.     register_hide_multitap(category5_hide_multitap);
  309.     wgui_inputbox_validation_callback = i->validation_callback;
  310.     wgui_multiline_setup_inputbox(
  311.         inputbox_x,
  312.         inputbox_y,
  313.         inputbox_width,
  314.         inputbox_height,
  315.         wgui_inline_full_screen_text_edit_buffer,
  316.         i->buffer_size,
  317.         INLINE_MULTI_LINE_EDIT_HISTORY_ID,
  318.         inline_text_edit_RSK_label_string,
  319.         inline_text_edit_RSK_label_icon,
  320.         (S16) input_type,
  321.         history_buffer,
  322.         1);
  323. #ifdef __MMI_WALLPAPER_ON_BOTTOM__
  324.     MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_TRANSPARENT_BACKGROUND;
  325.     dm_get_scr_bg_image(
  326.         &inline_edit_scr_bg_ID,
  327.         &inline_edit_scr_bg_filename,
  328.         &inline_edit_scr_bg_x,
  329.         &inline_edit_scr_bg_y,
  330.         &inline_edit_scr_bg_opacity);
  331.     dm_set_scr_bg_image(inline_edit_scr_bg_ID, inline_edit_scr_bg_filename, inline_edit_scr_bg_x, inline_edit_scr_bg_y, current_MMI_theme->bg_opacity_low); /* 100605 editor opacity Calvin */
  332. #endif /* __MMI_WALLPAPER_ON_BOTTOM__ */ 
  333. #if defined(__MMI_MULTITAP_FOR_STAR_AND_POUND__)
  334.     set_left_softkey_label((UI_string_type) get_string(STR_GLOBAL_OPTIONS));
  335.     set_left_softkey_icon(NULL);
  336.     SetLeftSoftkeyFunction(EntryInLineMultilineEditorOption, KEY_EVENT_UP);
  337. #endif /* defined(__MMI_MULTITAP_FOR_STAR_AND_POUND__) */ 
  338.     redraw_right_softkey();
  339.     redraw_left_softkey();
  340.     register_left_softkey_handler();
  341.     register_right_softkey_handler();
  342.     register_multiline_inputbox_input_callback(wgui_inline_edit_handle_multiline_inputbox_input);
  343.     wgui_inputbox_RSK_function = wgui_inline_edit_BACK_function;
  344.     redraw_current_inline_item = show_multiline_inputbox;
  345.     if (i->custom_setup_function != NULL)
  346.     {
  347.         i->custom_setup_function();
  348.     }
  349.     gdi_layer_unlock_frame_buffer();
  350.     show_multiline_inputbox();
  351.     complete_inline_item_edit = handle_inline_multi_line_edit_complete;
  352. }
  353. /*****************************************************************************
  354.  * FUNCTION
  355.  *  handle_inline_multi_line_edit_complete
  356.  * DESCRIPTION
  357.  *  
  358.  * PARAMETERS
  359.  *  void
  360.  * RETURNS
  361.  *  void
  362.  *****************************************************************************/
  363. void handle_inline_multi_line_edit_complete(void)
  364. {
  365.     /*----------------------------------------------------------------*/
  366.     /* Local Variables                                                */
  367.     /*----------------------------------------------------------------*/
  368.     S32 input_type;
  369.     /*----------------------------------------------------------------*/
  370.     /* Code Body                                                      */
  371.     /*----------------------------------------------------------------*/
  372.     handle_inline_full_screen_edit_close();
  373.     input_type = current_wgui_inline_text_edit_item->input_type & INPUT_TYPE_MASK;
  374.     current_wgui_inline_item->flags &= ~INLINE_ITEM_OPEN;
  375.     if (inline_full_screen_edit_changed)
  376.     {
  377.         wgui_inline_list_menu_changed = 1;
  378.     }
  379.     current_wgui_inline_text_edit_item->UCS2_count = MMI_multiline_inputbox.UCS2_count;
  380.     gui_strcpy(
  381.         (UI_string_type) current_wgui_inline_text_edit_item->buffer,
  382.         (UI_string_type) wgui_inline_full_screen_text_edit_buffer);
  383.     if ((input_type == INPUT_TYPE_NUMERIC_PASSWORD) || (input_type == INPUT_TYPE_ALPHANUMERIC_PASSWORD) ||
  384.         (input_type == INPUT_TYPE_SAT_NUMERIC_PASSWORD))
  385.     {
  386.         inline_edit_prepare_mask_buffer(
  387.             current_wgui_inline_text_edit_item->buffer,
  388.             current_wgui_inline_text_edit_item->mask_buffer);
  389.         *current_wgui_inline_text_edit_text_p = current_wgui_inline_text_edit_item->mask_buffer;
  390.     }
  391.     else
  392.     {
  393.         *current_wgui_inline_text_edit_text_p = current_wgui_inline_text_edit_item->buffer;
  394.     }
  395.     reset_softkeys();
  396.     reset_multitaps();
  397.     /* W06.05 Temp Solution Do not draw fixed list in category57 because of virtual keyboard */
  398. #if !defined(__MMI_TOUCH_SCREEN__)
  399.     wgui_close_inputbox();
  400. #endif 
  401.     clear_left_softkey();
  402.     clear_right_softkey();
  403.     register_left_softkey_handler();
  404.     register_right_softkey_handler();
  405.     wgui_inline_item_handled = 0;
  406.     current_wgui_inline_text_edit_item->edit_complete_callback(
  407.                                             current_wgui_inline_text_edit_item->buffer,
  408.                                             current_wgui_inline_text_edit_item->buffer_size);
  409.     inline_edit_current_highlight_handler(wgui_inline_item_highlighted_index);
  410.     redraw_current_inline_item = UI_dummy_function;
  411.     wgui_inputbox_UCS2_count_function = NULL;
  412.     wgui_inputbox_not_empty_callback = NULL;
  413.     wgui_inputbox_empty_callback = NULL;
  414.     wgui_inputbox_validation_callback = NULL;
  415.     inline_full_screen_edit_changed = 0;
  416.     complete_inline_item_edit = UI_dummy_function;
  417.     current_wgui_inline_text_edit_item->input_type = MMI_current_input_type;
  418.     StopMyTimer(BLINKING_CURSOR);
  419. }
  420. /*****************************************************************************
  421.  * FUNCTION
  422.  *  wgui_show_inline_inscreen_multi_line_edit
  423.  * DESCRIPTION
  424.  *  
  425.  * PARAMETERS
  426.  *  x1          [IN]        
  427.  *  y1          [IN]        
  428.  *  width       [IN]        
  429.  *  height      [IN]        
  430.  *  item        [?]         
  431.  * RETURNS
  432.  *  void
  433.  *****************************************************************************/
  434. void wgui_show_inline_inscreen_multi_line_edit(S32 x1, S32 y1, S32 width, S32 height, wgui_inline_item *item)
  435. {
  436.     /*----------------------------------------------------------------*/
  437.     /* Local Variables                                                */
  438.     /*----------------------------------------------------------------*/
  439.     U16 input_type;
  440.     wgui_inline_item_text_edit *i = (wgui_inline_item_text_edit*) item->item;
  441.     S32 inputbox_x = x1;
  442.     S32 inputbox_y = y1;
  443.     S32 inputbox_width = width;
  444. #if(INSCREEN_MUTLILINE_TITLE_ENABLE)
  445. #if !defined(__MMI_TOUCH_SCREEN__)
  446.     S32 inputbox_height =
  447.         MMI_content_height - (MMI_fixed_list_menu.n_items) * MMI_ICONTEXT_MENUITEM_HEIGHT - 2 - INFORMATION_BAR_HEIGHT;
  448. #else /* !defined(__MMI_TOUCH_SCREEN__) */ 
  449.     S32 inputbox_height = MMI_content_height - MMI_MULTITAP_HEIGHT - 7 - INFORMATION_BAR_HEIGHT;
  450. #endif /* !defined(__MMI_TOUCH_SCREEN__) */ 
  451. #else /* (INSCREEN_MUTLILINE_TITLE_ENABLE) */ 
  452. #if !defined(__MMI_TOUCH_SCREEN__)
  453.     S32 inputbox_height = MMI_content_height - (MMI_fixed_list_menu.n_items) * MMI_ICONTEXT_MENUITEM_HEIGHT - 2;
  454. #else 
  455.     S32 inputbox_height = MMI_content_height - MMI_MULTITAP_HEIGHT - 7;
  456. #endif 
  457. #endif /* (INSCREEN_MUTLILINE_TITLE_ENABLE) */ 
  458.     S32 fh;
  459.     S32 l;
  460.     /*----------------------------------------------------------------*/
  461.     /* Code Body                                                      */
  462.     /*----------------------------------------------------------------*/
  463.     input_type = i->input_type;
  464.     wgui_set_default_input_type(&input_type);
  465.     if (flag_use_current_input_type)
  466.     {
  467.         input_type = MMI_current_input_type;
  468.     }
  469.     switch (input_type & INPUT_TYPE_MASK)
  470.     {
  471.         case INPUT_TYPE_NUMERIC_CHANGEABLE:
  472.             MMI_current_input_mode = 2;
  473.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  474.             break;
  475.         case INPUT_TYPE_NUMERIC:
  476.             MMI_current_input_mode = 2;
  477.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  478.             break;
  479.         case INPUT_TYPE_DECIMAL_NUMERIC:
  480.             MMI_current_input_mode = 2;
  481.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  482.             break;
  483.         case INPUT_TYPE_KEYPAD_NUMERIC:
  484.             MMI_current_input_mode = 2;
  485.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  486.             break;
  487.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE:
  488.             MMI_current_input_mode = 0;
  489.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  490.             break;
  491.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE:
  492.             MMI_current_input_mode = 1;
  493.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  494.             break;
  495.     #ifdef __MMI_WCSS_INPUT_FORMAT_SUPPORT__
  496.         case INPUT_TYPE_ALPHABATIC_UPPERCASE:
  497.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_ABC_NO_NUMERIC;
  498.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  499.             break;
  500.         case INPUT_TYPE_ALPHABATIC_LOWERCASE:
  501.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_ABC_NO_NUMERIC;
  502.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  503.             break;
  504.         case INPUT_TYPE_NUMERIC_SYMBOL:
  505.             MMI_current_input_mode = INPUT_MODE_123_SYMBOLS;
  506.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  507.             break;
  508.     #endif /* __MMI_WCSS_INPUT_FORMAT_SUPPORT__ */ 
  509.         case INPUT_TYPE_ALPHANUMERIC_SENTENCECASE:
  510.             MMI_current_input_mode = 1;
  511.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  512.             break;
  513.         case INPUT_TYPE_NUMERIC_PASSWORD:
  514.             MMI_current_input_mode = 2;
  515.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  516.             break;
  517.         case INPUT_TYPE_SAT_NUMERIC_PASSWORD:
  518.             MMI_current_input_mode = 2;
  519.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  520.             break;
  521.         case INPUT_TYPE_ALPHANUMERIC_PASSWORD:
  522.             MMI_current_input_mode = 1;
  523.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  524.             break;
  525.         case INPUT_TYPE_PHONE_NUMBER:
  526.             MMI_current_input_mode = 2;
  527.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  528.             break;
  529.     #if defined (__MMI_MULTITAP_THAI__)
  530.         case INPUT_TYPE_ALPHANUMERIC_MULTITAP_THAI:
  531.             MMI_current_input_mode = INPUT_MODE_MULTITAP_THAI;
  532.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  533.             break;
  534.     #endif /* defined (__MMI_MULTITAP_THAI__) */ 
  535.     #if defined(__MMI_MULTITAP_SPANISH__)
  536.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_SPANISH:
  537.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_SPANISH;
  538.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  539.             break;
  540.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_SPANISH:
  541.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_SPANISH;
  542.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  543.             break;
  544.     #endif /* defined(__MMI_MULTITAP_SPANISH__) */ 
  545.     #if defined(__MMI_MULTITAP_DANISH__)
  546.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_DANISH:
  547.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_DANISH;
  548.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  549.             break;
  550.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_DANISH:
  551.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_DANISH;
  552.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  553.             break;
  554.     #endif /* defined(__MMI_MULTITAP_DANISH__) */ 
  555.     #if defined(__MMI_MULTITAP_POLISH__)
  556.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_POLISH:
  557.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_POLISH;
  558.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  559.             break;
  560.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_POLISH:
  561.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_POLISH;
  562.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  563.             break;
  564.     #endif /* defined(__MMI_MULTITAP_POLISH__) */ 
  565.     #if defined(__MMI_MULTITAP_FRENCH__)
  566.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_FRENCH:
  567.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_FRENCH;
  568.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  569.             break;
  570.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_FRENCH:
  571.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_FRENCH;
  572.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  573.             break;
  574.     #endif /* defined(__MMI_MULTITAP_FRENCH__) */ 
  575.     #if defined(__MMI_MULTITAP_GERMAN__)
  576.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_GERMAN:
  577.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_GERMAN;
  578.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  579.             break;
  580.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_GERMAN:
  581.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_GERMAN;
  582.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  583.             break;
  584.     #endif /* defined(__MMI_MULTITAP_GERMAN__) */ 
  585.     #if defined(__MMI_MULTITAP_ITALIAN__)
  586.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_ITALIAN:
  587.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_ITALIAN;
  588.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  589.             break;
  590.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_ITALIAN:
  591.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_ITALIAN;
  592.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  593.             break;
  594.     #endif /* defined(__MMI_MULTITAP_ITALIAN__) */ 
  595.     #if defined(__MMI_MULTITAP_RUSSIAN__)
  596.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_RUSSIAN:
  597.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_RUSSIAN;
  598.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  599.             break;
  600.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_RUSSIAN:
  601.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_RUSSIAN;
  602.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  603.             break;
  604.     #endif /* defined(__MMI_MULTITAP_RUSSIAN__) */ 
  605.     #if defined(__MMI_MULTITAP_BULGARIAN__)
  606.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_BULGARIAN:
  607.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_BULGARIAN;
  608.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  609.             break;
  610.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_BULGARIAN:
  611.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_BULGARIAN;
  612.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  613.             break;
  614.     #endif /* defined(__MMI_MULTITAP_BULGARIAN__) */ 
  615.     #if defined(__MMI_MULTITAP_TURKISH__)
  616.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_TURKISH:
  617.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_TURKISH;
  618.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  619.             break;
  620.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_TURKISH:
  621.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_TURKISH;
  622.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  623.             break;
  624.     #endif /* defined(__MMI_MULTITAP_TURKISH__) */ 
  625.     #if defined(__MMI_MULTITAP_PORTUGUESE__)
  626.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_PORTUGUESE:
  627.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_PORTUGUESE;
  628.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  629.             break;
  630.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_PORTUGUESE:
  631.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_PORTUGUESE;
  632.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  633.             break;
  634.     #endif /* defined(__MMI_MULTITAP_PORTUGUESE__) */ 
  635.     #if defined(__MMI_MULTITAP_INDONESIAN__)
  636.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_INDONESIAN:
  637.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_INDONESIAN;
  638.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  639.             break;
  640.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_INDONESIAN:
  641.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_INDONESIAN;
  642.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  643.             break;
  644.     #endif /* defined(__MMI_MULTITAP_INDONESIAN__) */ 
  645.     #if defined(__MMI_MULTITAP_CZECH__)
  646.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_CZECH:
  647.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_CZECH;
  648.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  649.             break;
  650.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_CZECH:
  651.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_CZECH;
  652.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  653.             break;
  654.     #endif /* defined(__MMI_MULTITAP_CZECH__) */ 
  655.     #if defined(__MMI_MULTITAP_MALAY__)
  656.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_MALAY:
  657.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_MALAY;
  658.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  659.             break;
  660.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_MALAY:
  661.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_MALAY;
  662.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  663.             break;
  664.     #endif /* defined(__MMI_MULTITAP_MALAY__) */ 
  665.     #if defined(__MMI_MULTITAP_VIETNAMESE__)
  666.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_VIETNAMESE:
  667.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_VIETNAMESE;
  668.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  669.             break;
  670.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_VIETNAMESE:
  671.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_VIETNAMESE;
  672.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  673.             break;
  674.     #endif /* defined(__MMI_MULTITAP_VIETNAMESE__) */ 
  675.     #if defined(__MMI_MULTITAP_FINNISH__)
  676.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_FINNISH:
  677.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_FINNISH;
  678.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  679.             break;
  680.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_FINNISH:
  681.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_FINNISH;
  682.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  683.             break;
  684.     #endif /* defined(__MMI_MULTITAP_FINNISH__) */ 
  685.     #if defined(__MMI_MULTITAP_HUNGARIAN__)
  686.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_HUNGARIAN:
  687.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_HUNGARIAN;
  688.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  689.             break;
  690.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_HUNGARIAN:
  691.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_HUNGARIAN;
  692.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  693.             break;
  694.     #endif /* defined(__MMI_MULTITAP_HUNGARIAN__) */ 
  695.     #if defined(__MMI_MULTITAP_HEBREW__)
  696.         case INPUT_TYPE_ALPHANUMERIC_HEBREW:
  697.             MMI_current_input_mode = INPUT_MODE_MULTITAP_HEBREW;
  698.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  699.             break;
  700.     #endif /* defined(__MMI_MULTITAP_HEBREW__) */ 
  701.     #if defined(__MMI_MULTITAP_SLOVAK__)
  702.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_SLOVAK:
  703.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_SLOVAK;
  704.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  705.             break;
  706.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_SLOVAK:
  707.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_SLOVAK;
  708.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  709.             break;
  710.     #endif /* defined(__MMI_MULTITAP_SLOVAK__) */ 
  711.     #if defined(__MMI_MULTITAP_DUTCH__)
  712.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_DUTCH:
  713.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_DUTCH;
  714.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  715.             break;
  716.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_DUTCH:
  717.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_DUTCH;
  718.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  719.             break;
  720.     #endif /* defined(__MMI_MULTITAP_DUTCH__) */ 
  721.     #if defined(__MMI_MULTITAP_ARABIC__)
  722.         case INPUT_TYPE_ALPHANUMERIC_ARABIC:
  723.             MMI_current_input_mode = INPUT_MODE_MULTITAP_ARABIC;
  724.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  725.             break;
  726.     #endif /* defined(__MMI_MULTITAP_ARABIC__) */ 
  727.     #if defined(__MMI_MULTITAP_NORWEGIAN__)
  728.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_NORWEGIAN:
  729.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_NORWEGIAN;
  730.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  731.             break;
  732.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_NORWEGIAN:
  733.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_NORWEGIAN;
  734.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  735.             break;
  736.     #endif /* defined(__MMI_MULTITAP_NORWEGIAN__) */ 
  737.     #if defined(__MMI_MULTITAP_SWEDISH__)
  738.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_SWEDISH:
  739.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_SWEDISH;
  740.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  741.             break;
  742.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_SWEDISH:
  743.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_SWEDISH;
  744.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  745.             break;
  746.     #endif /* defined(__MMI_MULTITAP_SWEDISH__) */ 
  747.     #if defined(__MMI_MULTITAP_CROATIAN__)
  748.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_CROATIAN:
  749.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_CROATIAN;
  750.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  751.             break;
  752.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_CROATIAN:
  753.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_CROATIAN;
  754.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  755.             break;
  756.     #endif /* defined(__MMI_MULTITAP_CROATIAN__) */ 
  757.     #if defined(__MMI_MULTITAP_ROMANIAN__)
  758.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_ROMANIAN:
  759.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_ROMANIAN;
  760.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  761.             break;
  762.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_ROMANIAN:
  763.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_ROMANIAN;
  764.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  765.             break;
  766.     #endif /* defined(__MMI_MULTITAP_ROMANIAN__) */ 
  767.     #if defined(__MMI_MULTITAP_SLOVENIAN__)
  768.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_SLOVENIAN:
  769.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_SLOVENIAN;
  770.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  771.             break;
  772.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_SLOVENIAN:
  773.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_SLOVENIAN;
  774.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  775.             break;
  776.     #endif /* defined(__MMI_MULTITAP_SLOVENIAN__) */ 
  777.     #if defined(__MMI_MULTITAP_GREEK__)
  778.         case INPUT_TYPE_ALPHANUMERIC_UPPERCASE_GREEK:
  779.             MMI_current_input_mode = INPUT_MODE_MULTITAP_UPPERCASE_GREEK;
  780.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  781.             break;
  782.         case INPUT_TYPE_ALPHANUMERIC_LOWERCASE_GREEK:
  783.             MMI_current_input_mode = INPUT_MODE_MULTITAP_LOWERCASE_GREEK;
  784.             wgui_inputbox_information_icon = get_image(WGUI_INPUT_INFORMATION_ICON1);
  785.             break;
  786.     #endif /* defined(__MMI_MULTITAP_GREEK__) */ 
  787.     #if defined(__MMI_T9__) || defined(__MMI_ITAP__)|| defined(__MMI_CSTAR__)     //KP Jerry add "__MMI_CSTAR__" on 2007-3-8
  788.         case INPUT_TYPE_TR_MULTITAP_BOPOMO:
  789.             MMI_current_input_mode = INPUT_MODE_TR_MULTITAP_BOPOMO;
  790.             wgui_inputbox_information_icon = get_image(WGUI_IME_MULTITAP_BPMF_IMG);
  791.             break;
  792.         case INPUT_TYPE_SM_MULTITAP_PINYIN:
  793.             MMI_current_input_mode = INPUT_MODE_SM_MULTITAP_PINYIN;
  794.             wgui_inputbox_information_icon = get_image(WGUI_IME_MULTITAP_PINYIN_IMG);
  795.             break;
  796.         case INPUT_TYPE_TR_BOPOMO:
  797.             MMI_current_input_mode = INPUT_MODE_TR_BOPOMO;
  798.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_BPMF_IMG);
  799.             break;
  800.         case INPUT_TYPE_SM_PINYIN:
  801.             MMI_current_input_mode = INPUT_MODE_SM_PINYIN;
  802.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_PINYIN_IMG);
  803.             break;
  804.         case INPUT_TYPE_TR_STROKE:
  805.             MMI_current_input_mode = INPUT_MODE_TR_STROKE;
  806.             wgui_inputbox_information_icon = get_image(WGUI_IME_TR_STROKE_IMG);
  807.             break;
  808.         case INPUT_TYPE_SM_STROKE:
  809.             MMI_current_input_mode = INPUT_MODE_SM_STROKE;
  810.             wgui_inputbox_information_icon = get_image(WGUI_IME_SM_STROKE_IMG);
  811.             break;
  812.         case INPUT_TYPE_SMART_UPPERCASE_ABC:
  813.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_ABC;
  814.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  815.             break;
  816.         case INPUT_TYPE_SMART_LOWERCASE_ABC:
  817.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_ABC;
  818.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  819.             break;
  820.     #if defined(__MMI_T9_THAI__) || defined(__MMI_CSTAR_THAI__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  821.         case INPUT_TYPE_SMART_THAI:
  822.             MMI_current_input_mode = INPUT_MODE_SMART_THAI;
  823.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  824.             break;
  825.     #endif /* defined(__MMI_T9_THAI__) || defined(__MMI_CSTAR_THAI__) */  //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  826.     #if defined(__MMI_T9_SPANISH__) || defined(__MMI_CSTAR_SPANISH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  827.         case INPUT_TYPE_SMART_UPPERCASE_SPANISH:
  828.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_SPANISH;
  829.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  830.             break;
  831.         case INPUT_TYPE_SMART_LOWERCASE_SPANISH:
  832.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_SPANISH;
  833.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  834.             break;
  835.     #endif /* defined(__MMI_T9_SPANISH__) || defined(__MMI_CSTAR_SPANISH__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  836.     #if defined(__MMI_T9_DANISH__) || defined(__MMI_CSTAR_DANISH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  837.         case INPUT_TYPE_SMART_UPPERCASE_DANISH:
  838.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_DANISH;
  839.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  840.             break;
  841.         case INPUT_TYPE_SMART_LOWERCASE_DANISH:
  842.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_DANISH;
  843.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  844.             break;
  845.     #endif /* defined(__MMI_T9_DANISH__) || defined(__MMI_CSTAR_DANISH__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  846.     #if defined(__MMI_T9_POLISH__) || defined(__MMI_CSTAR_POLISH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  847.         case INPUT_TYPE_SMART_UPPERCASE_POLISH:
  848.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_POLISH;
  849.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  850.             break;
  851.         case INPUT_TYPE_SMART_LOWERCASE_POLISH:
  852.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_POLISH;
  853.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  854.             break;
  855.     #endif /* defined(__MMI_T9_POLISH__) || defined(__MMI_CSTAR_POLISH__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  856.     #if defined(__MMI_T9_FRENCH__) || defined(__MMI_CSTAR_FRENCH__)
  857.         case INPUT_TYPE_SMART_UPPERCASE_FRENCH:
  858.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_FRENCH;
  859.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  860.             break;
  861.         case INPUT_TYPE_SMART_LOWERCASE_FRENCH:
  862.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_FRENCH;
  863.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  864.             break;
  865.     #endif /* defined(__MMI_T9_FRENCH__) || defined(__MMI_CSTAR_FRENCH__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  866.     #if defined(__MMI_T9_GERMAN__) || defined(__MMI_CSTAR_GERMAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  867.         case INPUT_TYPE_SMART_UPPERCASE_GERMAN:
  868.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_GERMAN;
  869.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  870.             break;
  871.         case INPUT_TYPE_SMART_LOWERCASE_GERMAN:
  872.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_GERMAN;
  873.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  874.             break;
  875.     #endif /* defined(__MMI_T9_GERMAN__) || defined(__MMI_CSTAR_GERMAN__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  876.     #if defined(__MMI_T9_ITALIAN__) || defined(__MMI_CSTAR_ITALIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  877.         case INPUT_TYPE_SMART_UPPERCASE_ITALIAN:
  878.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_ITALIAN;
  879.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  880.             break;
  881.         case INPUT_TYPE_SMART_LOWERCASE_ITALIAN:
  882.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_ITALIAN;
  883.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  884.             break;
  885.     #endif /* defined(__MMI_T9_ITALIAN__) || defined(__MMI_CSTAR_ITALIAN__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  886.     #if defined(__MMI_T9_VIETNAMESE__) || defined(__MMI_CSTAR_VIETNAMESE__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  887.         case INPUT_TYPE_SMART_UPPERCASE_VIETNAMESE:
  888.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_VIETNAMESE;
  889.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  890.             break;
  891.         case INPUT_TYPE_SMART_LOWERCASE_VIETNAMESE:
  892.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_VIETNAMESE;
  893.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  894.             break;
  895.     #endif /* defined(__MMI_T9_VIETNAMESE__) || defined(__MMI_CSTAR_VIETNAMESE__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  896.     #if defined(__MMI_T9_INDONESIAN__) || defined(__MMI_CSTAR_INDONESIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  897.         case INPUT_TYPE_SMART_UPPERCASE_INDONESIAN:
  898.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_INDONESIAN;
  899.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  900.             break;
  901.         case INPUT_TYPE_SMART_LOWERCASE_INDONESIAN:
  902.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_INDONESIAN;
  903.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  904.             break;
  905.     #endif /* defined(__MMI_T9_INDONESIAN__) || defined(__MMI_CSTAR_INDONESIAN__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  906.     #if defined(__MMI_T9_PORTUGUESE__) || defined(__MMI_CSTAR_PORTUGUESE__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  907.         case INPUT_TYPE_SMART_UPPERCASE_PORTUGUESE:
  908.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_PORTUGUESE;
  909.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  910.             break;
  911.         case INPUT_TYPE_SMART_LOWERCASE_PORTUGUESE:
  912.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_PORTUGUESE;
  913.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  914.             break;
  915.     #endif /* defined(__MMI_T9_PORTUGUESE__) || defined(__MMI_CSTAR_PORTUGUESE__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  916.     #if defined(__MMI_T9_CZECH__) || defined(__MMI_CSTAR_CZECH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  917.         case INPUT_TYPE_SMART_UPPERCASE_CZECH:
  918.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_CZECH;
  919.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  920.             break;
  921.         case INPUT_TYPE_SMART_LOWERCASE_CZECH:
  922.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_CZECH;
  923.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  924.             break;
  925.     #endif /* defined(__MMI_T9_CZECH__) || defined(__MMI_CSTAR_CZECH__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  926.     #if defined(__MMI_T9_TURKISH__) || defined(__MMI_CSTAR_TURKISH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  927.         case INPUT_TYPE_SMART_UPPERCASE_TURKISH:
  928.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_TURKISH;
  929.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  930.             break;
  931.         case INPUT_TYPE_SMART_LOWERCASE_TURKISH:
  932.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_TURKISH;
  933.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  934.             break;
  935.     #endif /* defined(__MMI_T9_TURKISH__) || defined(__MMI_CSTAR_TURKISH__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  936.     #if defined(__MMI_T9_FINNISH__) || defined(__MMI_CSTAR_FINNISH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  937.         case INPUT_TYPE_SMART_UPPERCASE_FINNISH:
  938.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_FINNISH;
  939.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  940.             break;
  941.         case INPUT_TYPE_SMART_LOWERCASE_FINNISH:
  942.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_FINNISH;
  943.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  944.             break;
  945.     #endif /* defined(__MMI_T9_FINNISH__) || defined(__MMI_CSTAR_FINNISH__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  946.     #if defined(__MMI_T9_HUNGARIAN__) || defined(__MMI_CSTAR_HUNGARIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  947.         case INPUT_TYPE_SMART_UPPERCASE_HUNGARIAN:
  948.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_HUNGARIAN;
  949.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  950.             break;
  951.         case INPUT_TYPE_SMART_LOWERCASE_HUNGARIAN:
  952.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_HUNGARIAN;
  953.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  954.     #endif /* defined(__MMI_T9_HUNGARIAN__) || defined(__MMI_CSTAR_HUNGARIAN__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  955.     #if defined(__MMI_T9_ARABIC__) || defined(__MMI_CSTAR_ARABIC__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  956.         case INPUT_TYPE_SMART_ARABIC:
  957.             MMI_current_input_mode = INPUT_MODE_SMART_ARABIC;
  958.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  959.             break;
  960.     #endif /* defined(__MMI_T9_ARABIC__) || defined(__MMI_CSTAR_ARABIC__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  961.     #if defined(__MMI_T9_GREEK__) || defined(__MMI_CSTAR_GREEK__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  962.         case INPUT_TYPE_SMART_UPPERCASE_GREEK:
  963.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_GREEK;
  964.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  965.             break;
  966.         case INPUT_TYPE_SMART_LOWERCASE_GREEK:
  967.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_GREEK;
  968.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  969.             break;
  970.     #endif /* defined(__MMI_T9_GREEK__) || defined(__MMI_CSTAR_GREEK__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  971.     #if defined(__MMI_T9_HEBREW__) || defined(__MMI_CSTAR_HEBREW__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  972.         case INPUT_TYPE_SMART_HEBREW:
  973.             MMI_current_input_mode = INPUT_MODE_SMART_HEBREW;
  974.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  975.             break;
  976.     #endif /* defined(__MMI_T9_HEBREW__) || defined(__MMI_CSTAR_HEBREW__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  977.     #if defined(__MMI_T9_HINDI__) || defined(__MMI_CSTAR_HINDI__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  978.         case INPUT_TYPE_SMART_HINDI:
  979.             MMI_current_input_mode = INPUT_MODE_SMART_HINDI;
  980.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  981.             break;
  982.     #endif /* defined(__MMI_T9_HINDI__) || defined(__MMI_CSTAR_HINDI__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  983.     #if defined(__MMI_T9_NORWEGIAN__) || defined(__MMI_CSTAR_NORWEGIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  984.         case INPUT_TYPE_SMART_UPPERCASE_NORWEGIAN:
  985.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_NORWEGIAN;
  986.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  987.             break;
  988.         case INPUT_TYPE_SMART_LOWERCASE_NORWEGIAN:
  989.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_NORWEGIAN;
  990.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  991.             break;
  992.     #endif /* defined(__MMI_T9_NORWEGIAN__) || defined(__MMI_CSTAR_NORWEGIAN__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  993.     #if defined(__MMI_T9_DUTCH__) || defined(__MMI_CSTAR_DUTCH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  994.         case INPUT_TYPE_SMART_UPPERCASE_DUTCH:
  995.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_DUTCH;
  996.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  997.             break;
  998.         case INPUT_TYPE_SMART_LOWERCASE_DUTCH:
  999.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_DUTCH;
  1000.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  1001.             break;
  1002.     #endif /* defined(__MMI_T9_DUTCH__) || defined(__MMI_CSTAR_DUTCH__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  1003.     #if defined(__MMI_T9_BULGARIAN__) || defined(__MMI_CSTAR_BULGARIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  1004.         case INPUT_TYPE_SMART_UPPERCASE_BULGARIAN:
  1005.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_BULGARIAN;
  1006.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  1007.             break;
  1008.         case INPUT_TYPE_SMART_LOWERCASE_BULGARIAN:
  1009.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_BULGARIAN;
  1010.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  1011.             break;
  1012.     #endif /* defined(__MMI_T9_BULGARIAN__) || defined(__MMI_CSTAR_BULGARIAN__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  1013.     #if defined(__MMI_T9_SLOVENIAN__) || defined(__MMI_CSTAR_SLOVENIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  1014.         case INPUT_TYPE_SMART_UPPERCASE_SLOVENIAN:
  1015.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_SLOVENIAN;
  1016.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  1017.             break;
  1018.         case INPUT_TYPE_SMART_LOWERCASE_SLOVENIAN:
  1019.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_SLOVENIAN;
  1020.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  1021.             break;
  1022.     #endif /* defined(__MMI_T9_SLOVENIAN__) || defined(__MMI_CSTAR_SLOVENIAN__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  1023.     #if defined(__MMI_T9_SWEDISH__) || defined(__MMI_CSTAR_SWEDISH__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  1024.         case INPUT_TYPE_SMART_UPPERCASE_SWEDISH:
  1025.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_SWEDISH;
  1026.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  1027.             break;
  1028.         case INPUT_TYPE_SMART_LOWERCASE_SWEDISH:
  1029.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_SWEDISH;
  1030.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  1031.             break;
  1032.     #endif /* defined(__MMI_T9_SWEDISH__) || defined(__MMI_CSTAR_SWEDISH__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  1033.     #if defined(__MMI_T9_CROATIAN__) || defined(__MMI_CSTAR_CROATIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  1034.         case INPUT_TYPE_SMART_UPPERCASE_CROATIAN:
  1035.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_CROATIAN;
  1036.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  1037.             break;
  1038.         case INPUT_TYPE_SMART_LOWERCASE_CROATIAN:
  1039.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_CROATIAN;
  1040.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  1041.             break;
  1042.     #endif /* defined(__MMI_T9_CROATIAN__) || defined(__MMI_CSTAR_CROATIAN__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  1043.     #if defined(__MMI_T9_MALAY__) || defined(__MMI_CSTAR_MALAY__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  1044.         case INPUT_TYPE_SMART_UPPERCASE_MALAY:
  1045.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_MALAY;
  1046.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  1047.             break;
  1048.         case INPUT_TYPE_SMART_LOWERCASE_MALAY:
  1049.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_MALAY;
  1050.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  1051.             break;
  1052.     #endif /* defined(__MMI_T9_MALAY__) || defined(__MMI_CSTAR_MALAY__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  1053.     #if defined(__MMI_T9_SLOVAK__) || defined(__MMI_CSTAR_SLOVAK__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  1054.         case INPUT_TYPE_SMART_UPPERCASE_SLOVAK:
  1055.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_SLOVAK;
  1056.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  1057.             break;
  1058.         case INPUT_TYPE_SMART_LOWERCASE_SLOVAK:
  1059.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_SLOVAK;
  1060.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  1061.             break;
  1062.     #endif /* defined(__MMI_T9_SLOVAK__) || defined(__MMI_CSTAR_SLOVAK__) */ //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  1063.     #if defined(__MMI_T9_ROMANIAN__) || defined(__MMI_CSTAR_ROMANIAN__) //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-17
  1064.         case INPUT_TYPE_SMART_UPPERCASE_ROMANIAN:
  1065.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_ROMANIAN;
  1066.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  1067.             break;
  1068.         case INPUT_TYPE_SMART_LOWERCASE_ROMANIAN:
  1069.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_ROMANIAN;
  1070.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_ENGLISH_IMG);
  1071.             break;
  1072.     #endif /* defined(__MMI_T9_ROMANIAN__) */ 
  1073.             /* PMT END LANGUAGE 20060104 */
  1074.     #elif defined(__MMI_ZI__)
  1075.         case INPUT_TYPE_TR_MULTITAP_BOPOMO:
  1076.             MMI_current_input_mode = INPUT_MODE_TR_MULTITAP_BOPOMO;
  1077.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_BPMF_LOGO);
  1078.             break;
  1079.         case INPUT_TYPE_SM_MULTITAP_PINYIN:
  1080.             MMI_current_input_mode = INPUT_MODE_SM_MULTITAP_PINYIN;
  1081.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_PINYIN_LOGO);
  1082.             break;
  1083.         case INPUT_TYPE_TR_BOPOMO:
  1084.             MMI_current_input_mode = INPUT_MODE_TR_BOPOMO;
  1085.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_BPMF_LOGO);
  1086.             break;
  1087.         case INPUT_TYPE_SM_PINYIN:
  1088.             MMI_current_input_mode = INPUT_MODE_SM_PINYIN;
  1089.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_PINYIN_LOGO);
  1090.             break;
  1091.         case INPUT_TYPE_TR_STROKE:
  1092.             MMI_current_input_mode = INPUT_MODE_TR_STROKE;
  1093.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_TR_STROKE_LOGO);
  1094.             break;
  1095.         case INPUT_TYPE_SM_STROKE:
  1096.             MMI_current_input_mode = INPUT_MODE_SM_STROKE;
  1097.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_SM_STROKE_LOGO);
  1098.             break;
  1099.         case INPUT_TYPE_SMART_UPPERCASE_ABC:
  1100.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_ABC;
  1101.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1102.             break;
  1103.         case INPUT_TYPE_SMART_LOWERCASE_ABC:
  1104.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_ABC;
  1105.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1106.             break;
  1107.         case INPUT_TYPE_SMART_THAI:
  1108.             MMI_current_input_mode = INPUT_MODE_SMART_THAI;
  1109.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1110.             break;
  1111.     #if defined (__MMI_ZI_HEBREW__)
  1112.         case INPUT_TYPE_SMART_HEBREW:
  1113.             MMI_current_input_mode = INPUT_MODE_SMART_HEBREW;
  1114.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1115.             break;
  1116.     #endif /* defined (__MMI_ZI_HEBREW__) */ 
  1117.     #if defined(__MMI_ZI_EU_SPANISH__) || defined(__MMI_ZI_SA_SPANISH__)
  1118.         case INPUT_TYPE_SMART_UPPERCASE_SPANISH:
  1119.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_SPANISH;
  1120.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1121.             break;
  1122.         case INPUT_TYPE_SMART_LOWERCASE_SPANISH:
  1123.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_SPANISH;
  1124.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1125.             break;
  1126.     #endif /* defined(__MMI_ZI_EU_SPANISH__) || defined(__MMI_ZI_SA_SPANISH__) */ 
  1127.     #if defined(__MMI_ZI_DANISH__)
  1128.         case INPUT_TYPE_SMART_UPPERCASE_DANISH:
  1129.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_DANISH;
  1130.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1131.             break;
  1132.         case INPUT_TYPE_SMART_LOWERCASE_DANISH:
  1133.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_DANISH;
  1134.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1135.             break;
  1136.     #endif /* defined(__MMI_ZI_DANISH__) */ 
  1137.     #if defined(__MMI_ZI_POLISH__)
  1138.         case INPUT_TYPE_SMART_UPPERCASE_POLISH:
  1139.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_POLISH;
  1140.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1141.             break;
  1142.         case INPUT_TYPE_SMART_LOWERCASE_POLISH:
  1143.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_POLISH;
  1144.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1145.             break;
  1146.     #endif /* defined(__MMI_ZI_POLISH__) */ 
  1147.     #if defined(__MMI_ZI_NORWEGIAN__)
  1148.         case INPUT_TYPE_SMART_UPPERCASE_NORWEGIAN:
  1149.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_NORWEGIAN;
  1150.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1151.             break;
  1152.         case INPUT_TYPE_SMART_LOWERCASE_NORWEGIAN:
  1153.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_NORWEGIAN;
  1154.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1155.             break;
  1156.     #endif /* defined(__MMI_ZI_NORWEGIAN__) */ 
  1157.     #if defined(__MMI_ZI_CA_FRENCH__) || defined(__MMI_ZI_EU_FRENCH__)
  1158.         case INPUT_TYPE_SMART_UPPERCASE_FRENCH:
  1159.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_FRENCH;
  1160.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1161.             break;
  1162.         case INPUT_TYPE_SMART_LOWERCASE_FRENCH:
  1163.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_FRENCH;
  1164.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1165.             break;
  1166.     #endif /* defined(__MMI_ZI_CA_FRENCH__) || defined(__MMI_ZI_EU_FRENCH__) */ 
  1167.     #if defined(__MMI_ZI_GERMAN__)
  1168.         case INPUT_TYPE_SMART_UPPERCASE_GERMAN:
  1169.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_GERMAN;
  1170.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1171.             break;
  1172.         case INPUT_TYPE_SMART_LOWERCASE_GERMAN:
  1173.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_GERMAN;
  1174.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1175.             break;
  1176.     #endif /* defined(__MMI_ZI_GERMAN__) */ 
  1177.     #if defined(__MMI_ZI_ITALIAN__)
  1178.         case INPUT_TYPE_SMART_UPPERCASE_ITALIAN:
  1179.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_ITALIAN;
  1180.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1181.             break;
  1182.         case INPUT_TYPE_SMART_LOWERCASE_ITALIAN:
  1183.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_ITALIAN;
  1184.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1185.             break;
  1186.     #endif /* defined(__MMI_ZI_ITALIAN__) */ 
  1187.     #if defined(__MMI_ZI_RUSSIAN__) || defined(__MMI_ZI_RECOMMENDED_SIZE_RUSSIAN__)
  1188.         case INPUT_TYPE_SMART_UPPERCASE_RUSSIAN:
  1189.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_RUSSIAN;
  1190.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1191.             break;
  1192.         case INPUT_TYPE_SMART_LOWERCASE_RUSSIAN:
  1193.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_RUSSIAN;
  1194.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1195.             break;
  1196.     #endif /* defined(__MMI_ZI_RUSSIAN__) || defined(__MMI_ZI_RECOMMENDED_SIZE_RUSSIAN__) */ 
  1197.     #if defined(__MMI_ZI_BULGARIAN__)
  1198.         case INPUT_TYPE_SMART_UPPERCASE_BULGARIAN:
  1199.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_BULGARIAN;
  1200.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1201.             break;
  1202.         case INPUT_TYPE_SMART_LOWERCASE_BULGARIAN:
  1203.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_BULGARIAN;
  1204.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1205.             break;
  1206.     #endif /* defined(__MMI_ZI_BULGARIAN__) */ 
  1207.     #if defined(__MMI_ZI_TURKISH__)
  1208.         case INPUT_TYPE_SMART_UPPERCASE_TURKISH:
  1209.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_TURKISH;
  1210.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1211.             break;
  1212.         case INPUT_TYPE_SMART_LOWERCASE_TURKISH:
  1213.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_TURKISH;
  1214.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1215.             break;
  1216.     #endif /* defined(__MMI_ZI_TURKISH__) */ 
  1217.     #if defined(__MMI_ZI_EU_PORTUGUESE__) || defined(__MMI_ZI_SA_PORTUGUESE__) || defined(__MMI_ZI_BZ_PORTUGUESE__)
  1218.         case INPUT_TYPE_SMART_UPPERCASE_PORTUGUESE:
  1219.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_PORTUGUESE;
  1220.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1221.             break;
  1222.         case INPUT_TYPE_SMART_LOWERCASE_PORTUGUESE:
  1223.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_PORTUGUESE;
  1224.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1225.             break;
  1226.     #endif /* defined(__MMI_ZI_EU_PORTUGUESE__) || defined(__MMI_ZI_SA_PORTUGUESE__) || defined(__MMI_ZI_BZ_PORTUGUESE__) */ 
  1227.     #if defined(__MMI_ZI_INDONESIAN__)
  1228.         case INPUT_TYPE_SMART_UPPERCASE_INDONESIAN:
  1229.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_INDONESIAN;
  1230.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1231.             break;
  1232.         case INPUT_TYPE_SMART_LOWERCASE_INDONESIAN:
  1233.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_INDONESIAN;
  1234.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1235.             break;
  1236.     #endif /* defined(__MMI_ZI_INDONESIAN__) */ 
  1237.     #if defined(__MMI_ZI_MALAY__)
  1238.         case INPUT_TYPE_SMART_UPPERCASE_MALAY:
  1239.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_MALAY;
  1240.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1241.             break;
  1242.         case INPUT_TYPE_SMART_LOWERCASE_MALAY:
  1243.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_MALAY;
  1244.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1245.             break;
  1246.     #endif /* defined(__MMI_ZI_MALAY__) */ 
  1247.     #if defined(__MMI_ZI_VIETNAMESE__)
  1248.         case INPUT_TYPE_SMART_UPPERCASE_VIETNAMESE:
  1249.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_VIETNAMESE;
  1250.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1251.             break;
  1252.         case INPUT_TYPE_SMART_LOWERCASE_VIETNAMESE:
  1253.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_VIETNAMESE;
  1254.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1255.             break;
  1256.     #endif /* defined(__MMI_ZI_VIETNAMESE__) */ 
  1257.     #if defined(__MMI_ZI_SLOVAK__)
  1258.         case INPUT_TYPE_SMART_UPPERCASE_SLOVAK:
  1259.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_SLOVAK;
  1260.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1261.             break;
  1262.         case INPUT_TYPE_SMART_LOWERCASE_SLOVAK:
  1263.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_SLOVAK;
  1264.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1265.             break;
  1266.     #endif /* defined(__MMI_ZI_SLOVAK__) */ 
  1267.     #if defined(__MMI_ZI_DUTCH__)
  1268.         case INPUT_TYPE_SMART_UPPERCASE_DUTCH:
  1269.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_DUTCH;
  1270.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1271.             break;
  1272.         case INPUT_TYPE_SMART_LOWERCASE_DUTCH:
  1273.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_DUTCH;
  1274.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1275.             break;
  1276.     #endif /* defined(__MMI_ZI_DUTCH__) */ 
  1277.     #if defined(__MMI_ZI_SWEDISH__)
  1278.         case INPUT_TYPE_SMART_UPPERCASE_SWEDISH:
  1279.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_SWEDISH;
  1280.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1281.             break;
  1282.         case INPUT_TYPE_SMART_LOWERCASE_SWEDISH:
  1283.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_SWEDISH;
  1284.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1285.             break;
  1286.     #endif /* defined(__MMI_ZI_SWEDISH__) */ 
  1287.     #if defined(__MMI_ZI_CROATIAN__)
  1288.         case INPUT_TYPE_SMART_UPPERCASE_CROATIAN:
  1289.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_CROATIAN;
  1290.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1291.             break;
  1292.         case INPUT_TYPE_SMART_LOWERCASE_CROATIAN:
  1293.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_CROATIAN;
  1294.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1295.             break;
  1296.     #endif /* defined(__MMI_ZI_CROATIAN__) */ 
  1297.     #if defined(__MMI_ZI_ROMANIAN__)
  1298.         case INPUT_TYPE_SMART_UPPERCASE_ROMANIAN:
  1299.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_ROMANIAN;
  1300.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1301.             break;
  1302.         case INPUT_TYPE_SMART_LOWERCASE_ROMANIAN:
  1303.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_ROMANIAN;
  1304.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1305.             break;
  1306.     #endif /* defined(__MMI_ZI_ROMANIAN__) */ 
  1307.     #if defined(__MMI_ZI_SLOVENIAN__)
  1308.         case INPUT_TYPE_SMART_UPPERCASE_SLOVENIAN:
  1309.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_SLOVENIAN;
  1310.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1311.             break;
  1312.         case INPUT_TYPE_SMART_LOWERCASE_SLOVENIAN:
  1313.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_SLOVENIAN;
  1314.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1315.             break;
  1316.     #endif /* defined(__MMI_ZI_SLOVENIAN__) */ 
  1317.     #if defined(__MMI_ZI_GREEK__)
  1318.         case INPUT_TYPE_SMART_UPPERCASE_GREEK:
  1319.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_GREEK;
  1320.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1321.             break;
  1322.         case INPUT_TYPE_SMART_LOWERCASE_GREEK:
  1323.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_GREEK;
  1324.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1325.             break;
  1326.     #endif /* defined(__MMI_ZI_GREEK__) */ 
  1327.     #if defined(__MMI_ZI_FINNISH__)
  1328.         case INPUT_TYPE_SMART_UPPERCASE_FINNISH:
  1329.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_FINNISH;
  1330.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1331.             break;
  1332.         case INPUT_TYPE_SMART_LOWERCASE_FINNISH:
  1333.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_FINNISH;
  1334.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1335.             break;
  1336.     #endif /* defined(__MMI_ZI_FINNISH__) */ 
  1337.     #if defined(__MMI_ZI_CZECH__)
  1338.         case INPUT_TYPE_SMART_UPPERCASE_CZECH:
  1339.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_CZECH;
  1340.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1341.             break;
  1342.         case INPUT_TYPE_SMART_LOWERCASE_CZECH:
  1343.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_CZECH;
  1344.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1345.             break;
  1346.     #endif /* defined(__MMI_ZI_CZECH__) */ 
  1347.     #if defined(__MMI_ZI_HUNGARIAN__)
  1348.         case INPUT_TYPE_SMART_UPPERCASE_HUNGARIAN:
  1349.             MMI_current_input_mode = INPUT_MODE_SMART_UPPERCASE_HUNGARIAN;
  1350.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1351.             break;
  1352.         case INPUT_TYPE_SMART_LOWERCASE_HUNGARIAN:
  1353.             MMI_current_input_mode = INPUT_MODE_SMART_LOWERCASE_HUNGARIAN;
  1354.             wgui_inputbox_information_icon = get_image(WGUI_ZI_EZITEXT_LOGO);
  1355.             break;
  1356.     #endif /* defined(__MMI_ZI_HUNGARIAN__) */ 
  1357.     #elif defined(__MMI_KA__)
  1358.         case INPUT_TYPE_SM_PINYIN:
  1359.             MMI_current_input_mode = INPUT_MODE_SM_PINYIN;
  1360.             wgui_inputbox_information_icon = get_image(WGUI_IME_SMART_PINYIN_IMG);
  1361.             break;
  1362.         case INPUT_TYPE_SM_STROKE:
  1363.             MMI_current_input_mode = INPUT_MODE_SM_STROKE;
  1364.             wgui_inputbox_information_icon = get_image(WGUI_IME_SM_STROKE_IMG);
  1365.             break;
  1366.     #endif 
  1367.             /* MTK end */
  1368.         default:
  1369.             MMI_current_input_mode = 2;
  1370.             break;
  1371.     }
  1372.     MMI_current_input_type = input_type;
  1373.     flag_use_current_input_type = TRUE;
  1374.     // End Yogesh 20040812 */
  1375.     if (!(item->flags & INLINE_ITEM_OPEN))
  1376.     {
  1377.         gui_strcpy((UI_string_type) wgui_inline_full_screen_text_edit_buffer, (UI_string_type) i->buffer);
  1378.     }
  1379.     l = gui_strlen((UI_string_type) wgui_inline_full_screen_text_edit_buffer);
  1380.     create_multiline_inputbox_set_buffer((UI_string_type) wgui_inline_full_screen_text_edit_buffer, l, l, 0);
  1381.     gui_set_font(MMI_multiline_inputbox.text_font);
  1382.     fh = gui_get_character_height();
  1383.     inputbox_height = (inputbox_height / (fh + 1)) * (fh + 1);
  1384. #if(INSCREEN_MUTLILINE_TITLE_ENABLE)
  1385.     move_multiline_inputbox(inputbox_x, inputbox_y + INFORMATION_BAR_HEIGHT + 2);
  1386.     resize_multiline_inputbox(inputbox_width, inputbox_height + 4);
  1387.     wgui_inputbox_information_flag = 1;
  1388.     wgui_inputbox_information_bar_height = INFORMATION_BAR_HEIGHT;
  1389.     wgui_setup_input_information(
  1390.         inputbox_x + 2,
  1391.         inputbox_y + 1,
  1392.         inputbox_width - 5,
  1393.         wgui_inputbox_information_bar_height);
  1394. #else /* (INSCREEN_MUTLILINE_TITLE_ENABLE) */ 
  1395.     {
  1396.         S32 t_height = 0;
  1397.         move_multiline_inputbox(inputbox_x, inputbox_y);
  1398.         t_height = (fh + 1) - (INFORMATION_BAR_HEIGHT + 2);
  1399.         resize_multiline_inputbox(inputbox_width, inputbox_height + 4 - t_height);
  1400.     }
  1401. #endif /* (INSCREEN_MUTLILINE_TITLE_ENABLE) */ 
  1402.     MMI_multiline_inputbox.flags |=
  1403.         (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE |
  1404.          UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
  1405.     show_multiline_inputbox();
  1406. }
  1407. /*****************************************************************************
  1408.  * FUNCTION
  1409.  *  wgui_display_inscreen_text_box_input_method
  1410.  * DESCRIPTION
  1411.  *  
  1412.  * PARAMETERS
  1413.  *  x1      [IN]        
  1414.  *  y1      [IN]        
  1415.  *  x2      [IN]        
  1416.  *  y2      [IN]        
  1417.  * RETURNS
  1418.  *  void
  1419.  *****************************************************************************/
  1420. void wgui_display_inscreen_text_box_input_method(S32 x1, S32 y1, S32 x2, S32 y2)
  1421. {
  1422.     /*----------------------------------------------------------------*/
  1423.     /* Local Variables                                                */
  1424.     /*----------------------------------------------------------------*/
  1425.     S32 swidth, sheight, w;
  1426.     UI_string_type inputmode_string = (UI_string_type) "";
  1427.     stFontAttribute *f = &MMI_small_font;
  1428.     color c = *current_MMI_theme->shortcut_indicator_text_color;
  1429.     UI_filled_area *bg = current_MMI_theme->shortcut_indicator_background_filler;
  1430.     /*----------------------------------------------------------------*/
  1431.     /* Code Body                                                      */
  1432.     /*----------------------------------------------------------------*/
  1433.     switch (MMI_current_input_mode)
  1434.     {
  1435.         case 0:
  1436.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_ABC_STRING_ID);
  1437.             break;
  1438.         case 1:
  1439.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_abc_STRING_ID);
  1440.             break;
  1441.         case 2:
  1442.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_123_STRING_ID);
  1443.             break;
  1444.     }
  1445.     gui_set_font(f);
  1446.     gui_measure_string(inputmode_string, &swidth, &sheight);
  1447.     w = swidth + 6;
  1448.     if (w > UI_device_width)
  1449.     {
  1450.         w = UI_device_width;
  1451.     }
  1452.     x1 = x2 - w;
  1453.     x2 = x2;
  1454.     bg->flags &= ~UI_FILLED_AREA_BORDER;
  1455.     gdi_layer_set_clip(x1 + 2, y1 + 2, x2 - 2, y2 - 2);
  1456.     gui_draw_filled_area(x1, y1, x2, y2, bg);
  1457.     gui_set_text_color(c);
  1458.     if (r2lMMIFlag)
  1459.     {
  1460.         gui_move_text_cursor(x1 + 3 + swidth, y1 + ((y2 - y1 - sheight) >> 1));
  1461.     }
  1462.     else
  1463.     {
  1464.         gui_move_text_cursor(x1 + 3, y1 + ((y2 - y1 - sheight) >> 1));
  1465.     }
  1466.     gui_set_line_height(sheight);
  1467.     gui_print_text(inputmode_string);
  1468.     gdi_layer_blt_previous(x1, y1, x2, y2);
  1469. }
  1470. /*****************************************************************************
  1471.  * FUNCTION
  1472.  *  inline_multiline_edit_complete
  1473.  * DESCRIPTION
  1474.  *  
  1475.  * PARAMETERS
  1476.  *  void
  1477.  * RETURNS
  1478.  *  void
  1479.  *****************************************************************************/
  1480. void inline_multiline_edit_complete(void)
  1481. {
  1482.     /*----------------------------------------------------------------*/
  1483.     /* Local Variables                                                */
  1484.     /*----------------------------------------------------------------*/
  1485.     /*----------------------------------------------------------------*/
  1486.     /* Code Body                                                      */
  1487.     /*----------------------------------------------------------------*/
  1488.     inline_multiline_complete = 1;
  1489.     if (MMI_multi_line_inputbox_present)
  1490.     {
  1491.         handle_inline_multi_line_edit_complete();
  1492.     }
  1493.     MMI_multi_line_inputbox_present = 0;
  1494. }
  1495. extern void wgui_redraw_input_information_background(void);
  1496. /*****************************************************************************
  1497.  * FUNCTION
  1498.  *  gui_draw_inscreen_multi_line_input_box_title
  1499.  * DESCRIPTION
  1500.  *  
  1501.  * PARAMETERS
  1502.  *  x1      [IN]        
  1503.  *  y1      [IN]        
  1504.  *  x2      [IN]        
  1505.  *  y2      [IN]        
  1506.  * RETURNS
  1507.  *  void
  1508.  *****************************************************************************/
  1509. void gui_draw_inscreen_multi_line_input_box_title(S32 x1, S32 y1, S32 x2, S32 y2)
  1510. {
  1511. #if(INSCREEN_MULTILINE_SHOW_TITLE)
  1512.     /*----------------------------------------------------------------*/
  1513.     /* Local Variables                                                */
  1514.     /*----------------------------------------------------------------*/
  1515.     /*----------------------------------------------------------------*/
  1516.     /* Code Body                                                      */
  1517.     /*----------------------------------------------------------------*/
  1518.     if (wgui_inputbox_information_flag)
  1519.     {
  1520.         wgui_redraw_input_information_background();
  1521.     }
  1522. #else /* (INSCREEN_MULTILINE_SHOW_TITLE) */ 
  1523.     if (wgui_inputbox_information_flag)
  1524.     {
  1525.         wgui_redraw_input_information_bar();
  1526.     }
  1527. #endif /* (INSCREEN_MULTILINE_SHOW_TITLE) */ 
  1528. }
  1529. /*****************************************************************************
  1530.  * FUNCTION
  1531.  *  gui_break_inline_caption
  1532.  * DESCRIPTION
  1533.  *  
  1534.  * PARAMETERS
  1535.  *  buffer              [?]     
  1536.  *  charater_length     [?]     
  1537.  * RETURNS
  1538.  *  void
  1539.  *****************************************************************************/
  1540. void gui_break_inline_caption(U8 *buffer, U8 *charater_length)
  1541. {
  1542.     /*----------------------------------------------------------------*/
  1543.     /* Local Variables                                                */
  1544.     /*----------------------------------------------------------------*/
  1545.     UI_buffer_type current_text_p = buffer;
  1546.     S32 current_line_width = 0, menu_item_width;
  1547.     S32 menu_string_width = gui_get_string_width((UI_string_type) buffer);
  1548.     /*----------------------------------------------------------------*/
  1549.     /* Code Body                                                      */
  1550.     /*----------------------------------------------------------------*/
  1551.     menu_item_width = MMI_content_width - 20;
  1552.     if (menu_string_width > menu_item_width)
  1553.     {
  1554.         UI_character_type current_character = 0;
  1555.         S32 character_width, character_height;
  1556.         S8 text_gap = current_UI_theme->single_line_input_box_theme->text_gap;
  1557.         U8 current_line_character_counter = 0;
  1558.         while (current_line_width <= menu_item_width)
  1559.         {
  1560.             UI_STRING_GET_NEXT_CHARACTER(current_text_p, current_character);
  1561.             gui_measure_character(current_character, &character_width, &character_height);
  1562.             if (UI_STRING_END_OF_STRING_CHARACTER(current_character))
  1563.             {
  1564.                 break;
  1565.             }
  1566.             current_line_width += character_width + text_gap;
  1567.             current_line_character_counter++;
  1568.         }
  1569.         *charater_length = current_line_character_counter;
  1570.     }
  1571.     else
  1572.     {
  1573.         *charater_length = 0;
  1574.     }
  1575. }
  1576. /*****************************************************************************
  1577.  * FUNCTION
  1578.  *  wgui_show_inline_multi_line_rd_only
  1579.  * DESCRIPTION
  1580.  *  
  1581.  * PARAMETERS
  1582.  *  x1          [IN]        
  1583.  *  y1          [IN]        
  1584.  *  width       [IN]        
  1585.  *  height      [IN]        
  1586.  *  item        [?]         
  1587.  * RETURNS
  1588.  *  void
  1589.  *****************************************************************************/
  1590. void wgui_show_inline_multi_line_rd_only(S32 x1, S32 y1, S32 width, S32 height, wgui_inline_item *item)
  1591. {
  1592.     /*----------------------------------------------------------------*/
  1593.     /* Local Variables                                                */
  1594.     /*----------------------------------------------------------------*/
  1595.     wgui_inline_item_text_edit *i = (wgui_inline_item_text_edit*) item->item;
  1596.     S32 l;
  1597.     S32 inputbox_x = x1;
  1598.     S32 inputbox_y = y1;
  1599.     S32 inputbox_width = width;
  1600.     S32 inputbox_height = height * i->max_lines;
  1601.     /*----------------------------------------------------------------*/
  1602.     /* Code Body                                                      */
  1603.     /*----------------------------------------------------------------*/
  1604.     if (wgui_current_inline_item_type == INLINE_ITEM_TYPE_FULL_SCREEN_EDIT)
  1605.     {
  1606.         return;
  1607.     }
  1608.     l = gui_strlen((UI_string_type) i->buffer);
  1609.     create_multiline_inputbox_set_buffer((UI_string_type) i->buffer, l, l, 0);
  1610.     move_multiline_inputbox(inputbox_x, inputbox_y);
  1611.     MMI_multiline_inputbox.flags |=
  1612.         (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE |
  1613.          UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
  1614.     resize_multiline_inputbox(inputbox_width, inputbox_height);
  1615.     show_multiline_inputbox();
  1616. }
  1617. /*****************************************************************************
  1618.  * FUNCTION
  1619.  *  SetInlineMultiLineRdOnly
  1620.  * DESCRIPTION
  1621.  *  
  1622.  * PARAMETERS
  1623.  *  item            [?]         
  1624.  *  buffer          [?]         
  1625.  *  buffer_size     [IN]        
  1626.  *  input_type      [IN]        
  1627.  *  max_lines       [IN]        
  1628.  * RETURNS
  1629.  *  void
  1630.  *****************************************************************************/
  1631. void SetInlineMultiLineRdOnly(InlineItem *item, U8 *buffer, S32 buffer_size, U16 input_type, U8 max_lines)    /* input_type :- Other items are hilightable or not. */
  1632. {
  1633.     /*----------------------------------------------------------------*/
  1634.     /* Local Variables                                                */
  1635.     /*----------------------------------------------------------------*/
  1636.     wgui_inline_item_text_edit *i;
  1637.     /*----------------------------------------------------------------*/
  1638.     /* Code Body                                                      */
  1639.     /*----------------------------------------------------------------*/
  1640.     if (n_inline_text_edit_items >= MAX_INLINE_TEXT_EDIT_ITEMS)
  1641.     {
  1642.         return;
  1643.     }
  1644.     item->item = (void*)&wgui_inline_text_edit_items[n_inline_text_edit_items];
  1645.     item->flags = INLINE_ITEM_TYPE_MULTI_LINE_RD_ONLY;
  1646.     MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_VIEW_MODE;
  1647.     n_inline_text_edit_items++;
  1648.     i = (wgui_inline_item_text_edit*) item->item;
  1649.     i->max_lines = max_lines;
  1650.     i->title = 0;
  1651.     i->title_icon = 0;
  1652.     i->buffer = buffer;
  1653.     i->buffer_size = buffer_size;
  1654.     i->flags = 0;
  1655.     i->input_type = input_type;
  1656.     item->text_p = i->buffer;
  1657.     item->handler = handle_inline_multi_line_rd_only;
  1658.     i->edit_complete_callback = NULL;
  1659.     i->custom_setup_function = NULL;
  1660.     i->validation_callback = NULL;
  1661.     i->UCS2_count = -1;
  1662.     MMI_multi_line_inputbox_present = 2;
  1663. }
  1664. /*****************************************************************************
  1665.  * FUNCTION
  1666.  *  menu_item_inline_multiline_box
  1667.  * DESCRIPTION
  1668.  *  
  1669.  * PARAMETERS
  1670.  *  void
  1671.  * RETURNS
  1672.  *  
  1673.  *****************************************************************************/
  1674. S32 menu_item_inline_multiline_box()
  1675. {
  1676.     /*----------------------------------------------------------------*/
  1677.     /* Local Variables                                                */
  1678.     /*----------------------------------------------------------------*/
  1679.     /*----------------------------------------------------------------*/
  1680.     /* Code Body                                                      */
  1681.     /*----------------------------------------------------------------*/
  1682.     if ((wgui_inline_items[MMI_fixed_list_menu.n_items - 1].flags & 0xff) == INLINE_ITEM_TYPE_MULTI_LINE_RD_ONLY)
  1683.     {
  1684.         return 1;
  1685.     }
  1686.     else
  1687.     {
  1688.         return 0;
  1689.     }
  1690. }
  1691. /*****************************************************************************
  1692.  * FUNCTION
  1693.  *  redraw_multiline_rd_only
  1694.  * DESCRIPTION
  1695.  *  
  1696.  * PARAMETERS
  1697.  *  void
  1698.  * RETURNS
  1699.  *  void
  1700.  *****************************************************************************/
  1701. void redraw_multiline_rd_only(void)
  1702. {
  1703.     /*----------------------------------------------------------------*/
  1704.     /* Local Variables                                                */
  1705.     /*----------------------------------------------------------------*/
  1706.     /*----------------------------------------------------------------*/
  1707.     /* Code Body                                                      */
  1708.     /*----------------------------------------------------------------*/
  1709.     register_multiline_inputbox_viewer_keys();
  1710.     show_multiline_inputbox();
  1711. }
  1712. /*****************************************************************************
  1713.  * FUNCTION
  1714.  *  handle_multi_line_rd_only_close
  1715.  * DESCRIPTION
  1716.  *  
  1717.  * PARAMETERS
  1718.  *  void
  1719.  * RETURNS
  1720.  *  void
  1721.  *****************************************************************************/
  1722. void handle_multi_line_rd_only_close(void)
  1723. {
  1724.     /*----------------------------------------------------------------*/
  1725.     /* Local Variables                                                */
  1726.     /*----------------------------------------------------------------*/
  1727.     /*----------------------------------------------------------------*/
  1728.     /* Code Body                                                      */
  1729.     /*----------------------------------------------------------------*/
  1730.     reset_multiline_inputbox_vertical_scroll();
  1731.     reset_multiline_inputbox();
  1732. }
  1733. /*****************************************************************************
  1734.  * FUNCTION
  1735.  *  inscreen_multi_line_input_box_changed
  1736.  * DESCRIPTION
  1737.  *  
  1738.  * PARAMETERS
  1739.  *  void
  1740.  * RETURNS
  1741.  *  
  1742.  *****************************************************************************/
  1743. S32 inscreen_multi_line_input_box_changed()
  1744. {
  1745.     /*----------------------------------------------------------------*/
  1746.     /* Local Variables                                                */
  1747.     /*----------------------------------------------------------------*/
  1748.     /*----------------------------------------------------------------*/
  1749.     /* Code Body                                                      */
  1750.     /*----------------------------------------------------------------*/
  1751.     return inscreen_multi_line_change_flag;
  1752. }
  1753. /*****************************************************************************
  1754.  * FUNCTION
  1755.  *  set_inscreen_multi_line_input_box_changed
  1756.  * DESCRIPTION
  1757.  *  
  1758.  * PARAMETERS
  1759.  *  void
  1760.  * RETURNS
  1761.  *  void
  1762.  *****************************************************************************/
  1763. void set_inscreen_multi_line_input_box_changed()
  1764. {
  1765.     /*----------------------------------------------------------------*/
  1766.     /* Local Variables                                                */
  1767.     /*----------------------------------------------------------------*/
  1768.     /*----------------------------------------------------------------*/
  1769.     /* Code Body                                                      */
  1770.     /*----------------------------------------------------------------*/
  1771.     inscreen_multi_line_change_flag = 1;
  1772. }
  1773. /*****************************************************************************
  1774.  * FUNCTION
  1775.  *  reset_inscreen_multi_line_input_box_changed
  1776.  * DESCRIPTION
  1777.  *  
  1778.  * PARAMETERS
  1779.  *  void
  1780.  * RETURNS
  1781.  *  void
  1782.  *****************************************************************************/
  1783. void reset_inscreen_multi_line_input_box_changed()
  1784. {
  1785.     /*----------------------------------------------------------------*/
  1786.     /* Local Variables                                                */
  1787.     /*----------------------------------------------------------------*/
  1788.     /*----------------------------------------------------------------*/
  1789.     /* Code Body                                                      */
  1790.     /*----------------------------------------------------------------*/
  1791.     inscreen_multi_line_change_flag = 0;
  1792. }
  1793. /*****************************************************************************
  1794.  * FUNCTION
  1795.  *  SetInlineListMenuChanged
  1796.  * DESCRIPTION
  1797.  *  
  1798.  * PARAMETERS
  1799.  *  void
  1800.  * RETURNS
  1801.  *  void
  1802.  *****************************************************************************/
  1803. void SetInlineListMenuChanged(void)
  1804. {
  1805.     /*----------------------------------------------------------------*/
  1806.     /* Local Variables                                                */
  1807.     /*----------------------------------------------------------------*/
  1808.     /*----------------------------------------------------------------*/
  1809.     /* Code Body                                                      */
  1810.     /*----------------------------------------------------------------*/
  1811.     set_wgui_inline_list_menu_changed();
  1812. }
  1813. /*****************************************************************************
  1814.  * FUNCTION
  1815.  *  GetInlineListMenuChanged
  1816.  * DESCRIPTION
  1817.  *  
  1818.  * PARAMETERS
  1819.  *  void
  1820.  * RETURNS
  1821.  *  
  1822.  *****************************************************************************/
  1823. S32 GetInlineListMenuChanged(void)
  1824. {
  1825.     /*----------------------------------------------------------------*/
  1826.     /* Local Variables                                                */
  1827.     /*----------------------------------------------------------------*/
  1828.     /*----------------------------------------------------------------*/
  1829.     /* Code Body                                                      */
  1830.     /*----------------------------------------------------------------*/
  1831.     return wgui_inline_list_menu_changed;
  1832. }
  1833. /*****************************************************************************
  1834.  * FUNCTION
  1835.  *  handle_inline_multi_line_rd_only
  1836.  * DESCRIPTION
  1837.  *  
  1838.  * PARAMETERS
  1839.  *  x                   [IN]        
  1840.  *  y                   [IN]        
  1841.  *  width               [IN]        
  1842.  *  height              [IN]        
  1843.  *  key_code            [IN]        
  1844.  *  key_event           [IN]        
  1845.  *  text_p              [IN]        
  1846.  *  item                [?]         
  1847.  *  flags               [IN]        
  1848.  *  history_buffer      [?]         
  1849.  * RETURNS
  1850.  *  void
  1851.  *****************************************************************************/
  1852. void handle_inline_multi_line_rd_only(
  1853.         S32 x,
  1854.         S32 y,
  1855.         S32 width,
  1856.         S32 height,
  1857.         S32 key_code,
  1858.         S32 key_event,
  1859.         U8 **text_p,
  1860.         void *item,
  1861.         U32 flags,
  1862.         U8 *history_buffer)
  1863. {
  1864.     /*----------------------------------------------------------------*/
  1865.     /* Local Variables                                                */
  1866.     /*----------------------------------------------------------------*/
  1867.     wgui_inline_item_text_edit *i = (wgui_inline_item_text_edit*) item;
  1868.     S32 l = 0;
  1869.     S32 inputbox_x = x;
  1870.     S32 inputbox_y = y;
  1871.     S32 inputbox_width = width;
  1872.     S32 inputbox_height = height * (i->max_lines);
  1873.     /*----------------------------------------------------------------*/
  1874.     /* Code Body                                                      */
  1875.     /*----------------------------------------------------------------*/
  1876.     wgui_current_inline_item_type = INLINE_ITEM_TYPE_MULTI_LINE_RD_ONLY;
  1877.     l = gui_strlen((UI_string_type) i->buffer);
  1878.     if (history_buffer == NULL || inscreen_multi_line_input_box_changed())
  1879.     {
  1880.         create_multiline_inputbox_set_buffer((UI_string_type) i->buffer, l, l, 0);
  1881.         reset_inscreen_multi_line_input_box_changed();
  1882.     }
  1883.     else
  1884.     {
  1885.         create_multiline_inputbox_set_buffer_no_text_reset((UI_string_type) i->buffer, l, l, 0);
  1886.     }
  1887.     move_multiline_inputbox(inputbox_x, inputbox_y);
  1888.     MMI_multiline_inputbox.flags |=
  1889.         (UI_MULTI_LINE_INPUT_BOX_AUTO_VERTICAL_SCROLL | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE |
  1890.          UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR | UI_MULTI_LINE_INPUT_BOX_INSIDE_INLINE_MENU
  1891.          /* |UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW */ );
  1892.     resize_multiline_inputbox(inputbox_width, inputbox_height);
  1893.     register_multiline_inputbox_viewer_keys();
  1894.     show_multiline_inputbox();
  1895.     redraw_current_inline_item = redraw_multiline_rd_only;
  1896.     complete_inline_item_edit = handle_multi_line_rd_only_close;
  1897. }
  1898. #ifdef __MMI_TOUCH_SCREEN__
  1899. /*****************************************************************************
  1900.  * FUNCTION
  1901.  *  UI_dummy_inline_item_pen_function
  1902.  * DESCRIPTION
  1903.  *  
  1904.  * PARAMETERS
  1905.  *  pen_event       [IN]        
  1906.  *  x               [IN]        
  1907.  *  y               [IN]        
  1908.  *  item_event      [?]         
  1909.  * RETURNS
  1910.  *  
  1911.  *****************************************************************************/
  1912. BOOL UI_dummy_inline_item_pen_function(
  1913.         mmi_pen_event_type_enum pen_event,
  1914.         S16 x,
  1915.         S16 y,
  1916.         gui_inline_item_pen_enum *item_event)
  1917. {
  1918.     /*----------------------------------------------------------------*/
  1919.     /* Local Variables                                                */
  1920.     /*----------------------------------------------------------------*/
  1921.     /*----------------------------------------------------------------*/
  1922.     /* Code Body                                                      */
  1923.     /*----------------------------------------------------------------*/
  1924.     UI_UNUSED_PARAMETER(pen_event);
  1925.     UI_UNUSED_PARAMETER(x);
  1926.     UI_UNUSED_PARAMETER(y);
  1927.     *item_event = GUI_INLINE_ITEM_PEN_NONE;
  1928.     return MMI_FALSE;
  1929. }
  1930. /*****************************************************************************
  1931.  * FUNCTION
  1932.  *  gui_inline_handle_pen_event_by_item
  1933.  * DESCRIPTION
  1934.  *  
  1935.  * PARAMETERS
  1936.  *  m                   [?]         
  1937.  *  pen_event           [IN]        
  1938.  *  x                   [IN]        
  1939.  *  y                   [IN]        
  1940.  *  inline_event        [?]         
  1941.  * RETURNS
  1942.  *  
  1943.  *****************************************************************************/
  1944. static BOOL gui_inline_handle_pen_event_by_item(
  1945.                 fixed_list_menu *m,
  1946.                 mmi_pen_event_type_enum pen_event,
  1947.                 S16 x,
  1948.                 S16 y,
  1949.                 gui_inline_pen_enum *inline_event)
  1950. {
  1951.     /*----------------------------------------------------------------*/
  1952.     /* Local Variables                                                */
  1953.     /*----------------------------------------------------------------*/
  1954.     gui_inline_item_pen_enum item_event;
  1955.     BOOL ret;
  1956.     /*----------------------------------------------------------------*/
  1957.     /* Code Body                                                      */
  1958.     /*----------------------------------------------------------------*/
  1959.     UI_UNUSED_PARAMETER(m);
  1960.     *inline_event = GUI_INLINE_PEN_NONE;
  1961.     ret = wgui_current_inline_item_pen_function(pen_event, x, y, &item_event);
  1962.     if (ret)
  1963.     {
  1964.         if (item_event == GUI_INLINE_ITEM_PEN_NEED_REDRAW_MENU)
  1965.         {
  1966.             *inline_event = GUI_INLINE_PEN_NEED_REDRAW;
  1967.         }
  1968.         else if (item_event == GUI_INLINE_ITEM_PEN_NEED_REDRAW_ITEM)
  1969.         {
  1970.             redraw_current_inline_item();
  1971.         }
  1972.         else if (item_event == GUI_INLINE_ITEM_PEN_SELECTED)
  1973.         {
  1974.             *inline_event = GUI_INLINE_PEN_ITEM_SELECTED;
  1975.         }
  1976.     }
  1977.     return ret;
  1978. }
  1979. #ifdef __MMI_EDITOR_PEN_VK_UNFOLD__
  1980. extern BOOL gPenEditorHideToTray;
  1981. #endif
  1982. /*****************************************************************************
  1983.  * FUNCTION
  1984.  *  gui_inline_scroll_by_pen
  1985.  * DESCRIPTION
  1986.  *  
  1987.  * PARAMETERS
  1988.  *  m                   [?]         
  1989.  *  x                   [IN]        
  1990.  *  y                   [IN]        
  1991.  *  first_displayed     [IN]        
  1992.  *  inline_event        [?]         
  1993.  * RETURNS
  1994.  *  void
  1995.  *****************************************************************************/
  1996. static void gui_inline_scroll_by_pen(
  1997.                 fixed_list_menu *m,
  1998.                 S16 x,
  1999.                 S16 y,
  2000.                 S32 first_displayed,
  2001.                 gui_inline_pen_enum *inline_event)
  2002. {
  2003.     /*----------------------------------------------------------------*/
  2004.     /* Local Variables                                                */
  2005.     /*----------------------------------------------------------------*/
  2006.     S32 last_displayed;
  2007.     S32 iwidth, iheight;
  2008.     S32 total_height, i;
  2009.     MMI_BOOL history_stored;
  2010.     U8 gui_buffer[MAX_GUI_BUFFER];
  2011.     /*----------------------------------------------------------------*/
  2012.     /* Code Body                                                      */
  2013.     /*----------------------------------------------------------------*/
  2014.     if (first_displayed == m->first_displayed_item)
  2015.     {
  2016.         *inline_event = GUI_INLINE_PEN_NONE;
  2017.         return;
  2018.     }
  2019.     /* 
  2020.      * Sometimes the inline editor is scrolled (m->first_displayed is changed) but
  2021.      * the highlighted item (m->highlighted_item) stays unchanged.
  2022.      * 
  2023.      * In this case, we should keep the context of inline item unchanged 
  2024.      * (e.g. editor cursor & input method), and we put the information in gui_buffer[].
  2025.      *
  2026.      * Reference: wgui_get_inline_history(), wgui_inline_edit_get_current_item_history(), 
  2027.      * and wgui_current_history_buffer.
  2028.      */
  2029.     history_stored = MMI_TRUE;
  2030.     switch (wgui_current_inline_item_type)
  2031.     {
  2032.         case INLINE_ITEM_TYPE_TEXT_EDIT:
  2033.             inline_text_edit_get_history(gui_buffer, MMI_current_input_type);
  2034.             break;
  2035.         case INLINE_ITEM_TYPE_DATE:
  2036.             inline_date_edit_get_history(gui_buffer);
  2037.             break;
  2038.         case INLINE_ITEM_TYPE_TIME:
  2039.             inline_time_edit_get_history(gui_buffer);
  2040.             break;
  2041.         case INLINE_ITEM_TYPE_TIME_PERIOD:
  2042.             inline_time_period_edit_get_history(gui_buffer);
  2043.             break;
  2044.         case INLINE_ITEM_TYPE_IP4_EDIT:
  2045.             inline_IP4_edit_get_history(gui_buffer);
  2046.             break;
  2047.         case INLINE_ITEM_TYPE_DOW_SELECT:
  2048.             inline_DOW_select_get_history(gui_buffer);
  2049.             break;
  2050.         case INLINE_ITEM_TYPE_MULTI_LINE_EDIT:
  2051.             inline_multi_line_edit_get_history(gui_buffer, MMI_current_input_type);
  2052.             break;
  2053.         default:
  2054.             history_stored = MMI_FALSE;
  2055.     }
  2056.     /* Finalize current editing. */
  2057.     complete_inline_item_edit();
  2058.     /*
  2059.      * Note that m->first_displayed_item might be changed inside m->item_highlighted() 
  2060.      * (which is typically wgui_inline_edit_default_list_highlight_handler())
  2061.      * if INLINE_ITEM_FOLLOW_DOWN or INLINE_ITEM_FOLLOW_UP is set on the highlighed item. 
  2062.      * 
  2063.      * inline item handler is invoked from handle_inline_item_location() (typically from gui_show_fixed_list_menu())
  2064.      */
  2065.     *inline_event = GUI_INLINE_PEN_NONE;
  2066.     /* Scroll down */
  2067.     if (first_displayed > m->highlighted_item)
  2068.     {
  2069.         m->flags |= UI_LIST_MENU_FIRST_SHIFT_HIGHLIGHTED_ITEM;
  2070.         inline_fixed_list_goto_item(first_displayed, MMI_FALSE);
  2071.         m->flags &= ~UI_LIST_MENU_FIRST_SHIFT_HIGHLIGHTED_ITEM;
  2072.     }
  2073.     else
  2074.     {
  2075.         /* Compute last_displayed */
  2076.         last_displayed = m->n_items - 1;
  2077.         total_height = 0;
  2078.         for (i = first_displayed; i < m->n_items; i++)
  2079.         {
  2080.             m->item_measure_function(m->items[i], m->common_item_data, &iwidth, &iheight);
  2081.             total_height += iheight;
  2082.             if (total_height > m->height + 1)
  2083.             {
  2084.                 last_displayed = i - 1;
  2085.                 break;
  2086.             }
  2087.         }
  2088.         /* Scroll up */
  2089.         if (last_displayed < m->highlighted_item)
  2090.         {
  2091.             m->flags |= UI_LIST_MENU_LAST_SHIFT_HIGHLIGHTED_ITEM;
  2092.             inline_fixed_list_goto_item(last_displayed, MMI_TRUE);
  2093.             m->flags &= ~UI_LIST_MENU_LAST_SHIFT_HIGHLIGHTED_ITEM;
  2094.         }
  2095.         else
  2096.         {
  2097.             S32 old_first_displayed;
  2098.             old_first_displayed = m->first_displayed_item;
  2099.             if (history_stored)
  2100.             {
  2101.                 /* 
  2102.                  * Restore the context of the original highlighted item.
  2103.                  *
  2104.                  * Ex: Assume it is an inline text edit, we need to setup history
  2105.                  * buffer here; otherwise the virtual keyboard type is reset,
  2106.                  * and the list menu height might be changed.                     
  2107.                  *
  2108.                  * However, the current code logic assumes that menu height should
  2109.                  * stay unchanged after m->item_highlighted(). 
  2110.                  */
  2111.                 wgui_current_history_buffer = gui_buffer;
  2112. }
  2113.             m->item_unhighlighted(m->highlighted_item);
  2114.             m->first_displayed_item = first_displayed;
  2115.             m->last_displayed_item = last_displayed;
  2116.             m->item_highlighted(m->highlighted_item);
  2117.             /* 
  2118.              * m->item_highlighted() might change m->first_displayed_item again if 
  2119.              * a. INLINE_ITEM_FOLLOW_DOWN and INLINE_ITEM_FOLLOW_UP is set to highlighted item.
  2120.              * b. m->first_displayed_item is incremented to display inline caption item
  2121.              *
  2122.              * Usually we can test the scenario in MMI Todo screen.
  2123.              */
  2124.             if (m->first_displayed_item == old_first_displayed)
  2125.             {
  2126.                 /* 
  2127.                  * In this case, m->first_displayed_item != first_displayed 
  2128.                  * because there are other "restrictions" that set 
  2129.                  * m->first_displayed_item to the original value.
  2130.                  *
  2131.                  * It happens in many inline editor screens in MMI. 
  2132.                  */
  2133.                 if (first_displayed < m->first_displayed_item)
  2134.                 {
  2135.                     /*
  2136.                      * In this case, we want to scroll up the menu but fail to do so.
  2137.                      *
  2138.                      * For example, the last displayed item is currently highlighted, and 
  2139.                      * the item before the last displayed item is an inline caption.
  2140.                      * If we scroll up by one item, The inline caption is highlighted although
  2141.                      * it cannot be highlighted, and then highlight is set to the next 
  2142.                      * inline item, which is the original highlighted one. 
  2143.                      * As a result, the inline editor is not scrolled at all.
  2144.                      * 
  2145.                      * In order to solve this, we scroll "one" more inline item up.
  2146.                      */
  2147.                     m->flags |= UI_LIST_MENU_LAST_SHIFT_HIGHLIGHTED_ITEM;
  2148.                     inline_fixed_list_goto_item(last_displayed - 1, MMI_TRUE);
  2149.                     m->flags &= ~UI_LIST_MENU_LAST_SHIFT_HIGHLIGHTED_ITEM;
  2150.                 }
  2151.                 else
  2152.                 {
  2153.                     /* Similar to previous case */
  2154.                     m->flags |= UI_LIST_MENU_FIRST_SHIFT_HIGHLIGHTED_ITEM;
  2155.                     inline_fixed_list_goto_item(first_displayed + 1, MMI_FALSE);
  2156.                     m->flags &= ~UI_LIST_MENU_FIRST_SHIFT_HIGHLIGHTED_ITEM;
  2157.                 }
  2158.             }
  2159.             else
  2160.             {
  2161.                 gui_lock_double_buffer();
  2162.             #ifdef __MMI_EDITOR_PEN_VK_UNFOLD__
  2163.                 if(MMI_virtual_keyboard.lang_type == GUI_VIRTUAL_KEYBOARD_TRAY)
  2164.                 {
  2165.                     gPenEditorHideToTray = MMI_TRUE;
  2166.                 }
  2167.             #endif
  2168.                 redraw_fixed_list();
  2169.             #ifdef __MMI_EDITOR_PEN_VK_UNFOLD__
  2170.                 if(gPenEditorHideToTray)
  2171.                 {
  2172.                     gPenEditorHideToTray = MMI_FALSE;
  2173.                 }
  2174.             #endif
  2175.                 
  2176.                 redraw_current_inline_item();
  2177.                 /* 
  2178.                  * Redraw virtual keyboard. 
  2179.                  * There is a small gap (e.g. 2 pixels) between fixed list and virtual keyboard
  2180.                  * and some inline item draw outside the list, we need to clear the gap by
  2181.                  * redrawing virtual keyboard.
  2182.                  */
  2183.                 if (GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY != MMI_virtual_keyboard.lang_type)
  2184.                 {
  2185.                     mmi_pen_editor_clear_and_show_virtual_keyboard_area();
  2186.                 }
  2187.                 gui_unlock_double_buffer();
  2188.                 gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
  2189.             }
  2190.             if (history_stored)
  2191.             {
  2192.                 /* Failsafe step because 'gui_buffer' is local variable. 
  2193.                    and it's lifecyle is inside the current function */
  2194.                 wgui_current_history_buffer = NULL;
  2195.             }
  2196.         }
  2197.     }
  2198.     /* Because we do not always follow the value of 'first_displayed',
  2199.        we need to adjust scrollbar again. */
  2200.     gui_vertical_scrollbar_reconfigure_pen_value(&m->vbar, x, y);
  2201. }
  2202. /*****************************************************************************
  2203.  * FUNCTION
  2204.  *  gui_inline_translate_pen_event
  2205.  * DESCRIPTION
  2206.  *  
  2207.  * PARAMETERS
  2208.  *  m                   [?]         
  2209.  *  pen_event           [IN]        
  2210.  *  x                   [IN]        
  2211.  *  y                   [IN]        
  2212.  *  inline_event        [?]         
  2213.  * RETURNS
  2214.  *  
  2215.  *****************************************************************************/
  2216. BOOL gui_inline_translate_pen_event(
  2217.         fixed_list_menu *m,
  2218.         mmi_pen_event_type_enum pen_event,
  2219.         S16 x,
  2220.         S16 y,
  2221.         gui_inline_pen_enum *inline_event)
  2222. {
  2223.     /*----------------------------------------------------------------*/
  2224.     /* Local Variables                                                */
  2225.     /*----------------------------------------------------------------*/
  2226.     BOOL ret = MMI_TRUE;
  2227.     gui_scrollbar_pen_enum scrollbar_event;
  2228.     gui_pen_event_param_struct scrollbar_param;
  2229.     /*----------------------------------------------------------------*/
  2230.     /* Code Body                                                      */
  2231.     /*----------------------------------------------------------------*/
  2232.     *inline_event = GUI_INLINE_PEN_NONE;
  2233.     if (pen_event == MMI_PEN_EVENT_DOWN)
  2234.     {
  2235.         wgui_inline_pen_down_item_index = -1;
  2236.         if (PEN_CHECK_BOUND(x, y, m->x, m->y, m->width, m->height))
  2237.         {
  2238.             if (wgui_current_inline_item_type == INLINE_ITEM_TYPE_FULL_SCREEN_EDIT)
  2239.             {
  2240.                 /* Redirect pen events to editor */
  2241.                 wgui_inline_pen_handler_type = WGUI_INLINE_PEN_HANDLER_FULLSCREEN_EDITOR;
  2242.                 /* Handled by editor */
  2243.             }
  2244.             else if (!(m->flags & UI_LIST_MENU_DISABLE_SCROLLBAR) &&
  2245.                      gui_vertical_scrollbar_translate_pen_event(
  2246.                         &m->vbar,
  2247.                         pen_event,
  2248.                         x,
  2249.                         y,
  2250.                         &scrollbar_event,
  2251.                         &scrollbar_param))
  2252.             {
  2253.                 wgui_inline_pen_handler_type = WGUI_INLINE_PEN_HANDLER_SCROLLBAR;
  2254.                 if (scrollbar_event == GUI_SCROLLBAR_PEN_JUMP_TO_I)
  2255.                 {
  2256.                     gui_inline_scroll_by_pen(m, x, y, scrollbar_param._u.i, inline_event);
  2257.                 }
  2258.             }
  2259.             else
  2260.             {
  2261.                 S32 item_index;
  2262.                 BOOL is_pen_inside_menu;
  2263.                 is_pen_inside_menu = gui_fixed_list_menu_translate_pen_position(m, y, &item_index);
  2264.                 wgui_inline_pen_down_item_index = item_index;
  2265.             #ifdef __MMI_INSCREEN_MULTILINE_TEXTBOX__
  2266.                 /* Special case: inline multiline is larger than its corresponding menu item */
  2267.                 if (!is_pen_inside_menu &&
  2268.                     item_index == m->n_items - 1 &&
  2269.                     (wgui_inline_items[item_index].flags & 0xff) == INLINE_ITEM_TYPE_MULTI_LINE_EDIT ||
  2270.                     (wgui_inline_items[item_index].flags & 0xff) == INLINE_ITEM_TYPE_MULTI_LINE_RD_ONLY)
  2271.                 {
  2272.                     is_pen_inside_menu = MMI_TRUE;
  2273.                 }
  2274.             #endif /* __MMI_INSCREEN_MULTILINE_TEXTBOX__ */ 
  2275.                 if (!is_pen_inside_menu)
  2276.                 {
  2277.                     wgui_inline_pen_handler_type = WGUI_INLINE_PEN_HANDLER_NONE;
  2278.                 }
  2279.                 else if (item_index != m->highlighted_item)
  2280.                 {
  2281.                     if ((wgui_inline_items[item_index].flags & 0xff) == INLINE_ITEM_TYPE_CAPTION &&
  2282.                         item_index == MMI_fixed_list_menu.n_items - 1)
  2283.                     {
  2284.                         /* Clicking on the last item that is inline caption. We should not switch to it; otherwise, it goes to the first item */
  2285.                         wgui_inline_pen_handler_type = WGUI_INLINE_PEN_HANDLER_NONE;
  2286.                     }
  2287.                     else if ((wgui_inline_items[item_index].flags & 0xff) == INLINE_ITEM_TYPE_CAPTION &&
  2288.                              item_index == MMI_fixed_list_menu.n_items - 2 &&
  2289.                              (wgui_inline_items[item_index + 1].flags & INLINE_ITEM_DISABLED))
  2290.                     {
  2291.                         /* The last item is disabled. Clicking on the inline caption before it */
  2292.                         wgui_inline_pen_handler_type = WGUI_INLINE_PEN_HANDLER_NONE;
  2293.                     }
  2294.                     else if (!(wgui_inline_items[item_index].flags & INLINE_ITEM_DISABLED))
  2295.                     {
  2296.                         wgui_inline_pen_handler_type = WGUI_INLINE_PEN_HANDLER_SWITCH_ITEM;
  2297.                     }
  2298.                     else
  2299.                     {
  2300.                         wgui_inline_pen_handler_type = WGUI_INLINE_PEN_HANDLER_NONE;
  2301.                     }
  2302.                 }
  2303.                 else
  2304.                 {
  2305.                     /*
  2306.                      * Because the inline item (e.g. horizontal select) might be smaller than the menu item  
  2307.                      * * the pen handler might return MMI_FALSE.
  2308.                      * *
  2309.                      * * Note: It can be extended to handle SetInlineItemActivation() (for fullscreen editor), 
  2310.                      * * but we do not handle it deliberately.
  2311.                      */
  2312.                     if (gui_inline_handle_pen_event_by_item(m, pen_event, x, y, inline_event))
  2313.                     {
  2314.                         wgui_inline_pen_handler_type = WGUI_INLINE_PEN_HANDLER_CURRENT_ITEM;
  2315.                     }
  2316.                     else
  2317.                     {
  2318.                         /*
  2319.                          * After long press animation, invoke left softkey handler. 
  2320.                          * * Tricky: it only apply to certain inline item types.
  2321.                          */
  2322.                         S32 type = wgui_inline_items[wgui_inline_item_highlighted_index].flags & 0xff;
  2323.                         if (type == INLINE_ITEM_TYPE_FULL_SCREEN_EDIT ||
  2324.                             type == INLINE_ITEM_TYPE_DISPLAY_ONLY ||
  2325.                             type == INLINE_ITEM_IMAGE_TEXT_TYPE || type == INLINE_ITEM_TYPE_MULTI_LINE_RD_ONLY)
  2326.                         {
  2327.                             gui_wait_longpress_enum w;
  2328.                             w = gui_pen_wait_longpress(MMI_PEN_EVENT_DOWN, x, y);
  2329.                             if (w == GUI_WAIT_LONGPRESS_INVALID)
  2330.                             {
  2331.                                 wgui_inline_pen_handler_type = WGUI_INLINE_PEN_HANDLER_NONE;
  2332.                             }
  2333.                             else
  2334.                             {
  2335.                                 wgui_inline_pen_handler_type = WGUI_INLINE_PEN_HANDLER_WAIT_LONGPRESS;
  2336.                             }
  2337.                         }
  2338.                         else
  2339.                         {
  2340.                             wgui_inline_pen_handler_type = WGUI_INLINE_PEN_HANDLER_NONE;
  2341.                         }
  2342.                     }
  2343.                 }
  2344.             }
  2345.         }
  2346.         else
  2347.         {
  2348.             ret = MMI_FALSE;
  2349.         }
  2350.     }
  2351.     else
  2352.     {
  2353.         if (wgui_inline_pen_handler_type == WGUI_INLINE_PEN_HANDLER_SCROLLBAR)
  2354.         {
  2355.             gui_vertical_scrollbar_translate_pen_event(&m->vbar, pen_event, x, y, &scrollbar_event, &scrollbar_param);
  2356.             if (scrollbar_event == GUI_SCROLLBAR_PEN_JUMP_TO_I)
  2357.             {
  2358.                 gui_inline_scroll_by_pen(m, x, y, scrollbar_param._u.i, inline_event);
  2359.             }
  2360.         }
  2361.         else if (wgui_inline_pen_handler_type == WGUI_INLINE_PEN_HANDLER_WAIT_LONGPRESS)
  2362.         {
  2363.             gui_wait_longpress_enum w;
  2364.             w = gui_pen_wait_longpress(pen_event, x, y);
  2365.             if (w == GUI_WAIT_LONGPRESS_INVALID)
  2366.             {
  2367.                 wgui_inline_pen_handler_type = WGUI_INLINE_PEN_HANDLER_NONE;
  2368.             }
  2369.             else if (w == GUI_WAIT_LONGPRESS_READY)
  2370.             {
  2371.                 *inline_event = GUI_INLINE_PEN_ITEM_SELECTED;
  2372.                 /* ignore subsequent pen events */
  2373.                 wgui_inline_pen_handler_type = WGUI_INLINE_PEN_HANDLER_NONE;
  2374.             }
  2375.         }
  2376.         else if (wgui_inline_pen_handler_type == WGUI_INLINE_PEN_HANDLER_CURRENT_ITEM)
  2377.         {
  2378.             gui_inline_handle_pen_event_by_item(m, pen_event, x, y, inline_event);
  2379.         }
  2380.         else if (wgui_inline_pen_handler_type == WGUI_INLINE_PEN_HANDLER_FULLSCREEN_EDITOR)
  2381.         {
  2382.             /* Handled by editor */
  2383.         }
  2384.         else if (wgui_inline_pen_handler_type == WGUI_INLINE_PEN_HANDLER_SWITCH_ITEM)
  2385.         {
  2386.             if (pen_event == MMI_PEN_EVENT_UP)
  2387.             {
  2388.                 S32 item_index;
  2389.                 gui_fixed_list_menu_translate_pen_position(m, y, &item_index);
  2390.                 if (item_index == wgui_inline_pen_down_item_index)
  2391.                 {
  2392.                     complete_inline_item_edit();    /* Finalize current editing */
  2393.                     /* Automatically select the next item if it's inline caption item */
  2394.                     inline_fixed_list_goto_item(item_index, MMI_FALSE);
  2395.                 }
  2396.             }
  2397.         }
  2398.         else if (wgui_inline_pen_handler_type == WGUI_INLINE_PEN_HANDLER_NONE)
  2399.         {
  2400.             /* Do nothing */
  2401.         }
  2402.     }
  2403.     return ret;
  2404. }
  2405. #endif /* __MMI_TOUCH_SCREEN__ */ 
  2406. /*****************************************************************************
  2407.  * FUNCTION
  2408.  *  ShowCommonCategoryInlineEdit
  2409.  * DESCRIPTION
  2410.  *  
  2411.  * PARAMETERS
  2412.  *  title                   [IN]        
  2413.  *  title_icon              [IN]        
  2414.  *  left_softkey            [IN]        
  2415.  *  left_softkey_icon       [IN]        
  2416.  *  right_softkey           [IN]        
  2417.  *  right_softkey_icon      [IN]        
  2418.  *  number_of_items         [IN]        
  2419.  *  list_of_icons           [?]         
  2420.  *  list_of_items           [?]         
  2421.  *  highlighted_item        [IN]        
  2422.  *  history_buffer          [?]         
  2423.  *  highlight_handler       [IN]        
  2424.  *  unhighlight_handler     [IN]        
  2425.  *  history_id              [IN]        
  2426.  * RETURNS
  2427.  *  void
  2428.  *****************************************************************************/
  2429. void ShowCommonCategoryInlineEdit(
  2430.         UI_string_type title,
  2431.         U16 title_icon,
  2432.         U16 left_softkey,
  2433.         U16 left_softkey_icon,
  2434.         U16 right_softkey,
  2435.         U16 right_softkey_icon,
  2436.         S32 number_of_items,
  2437.         U16 *list_of_icons,
  2438.         InlineItem *list_of_items,
  2439.         S32 highlighted_item,
  2440.         U8 *history_buffer,
  2441.         void (*highlight_handler) (S32 item_index),
  2442.         void (*unhighlight_handler) (S32 item_index),
  2443.         U16 history_id)
  2444. {
  2445.     /*----------------------------------------------------------------*/
  2446.     /* Local Variables                                                */
  2447.     /*----------------------------------------------------------------*/
  2448.     U8 h_flag;
  2449.     S32 i;
  2450.     U16 inline_item_index = 0;
  2451.     UI_fixed_icontext_menuitem_theme *saved_themedata1 = current_fixed_icontext_menuitem_theme;
  2452.     UI_fixed_list_menu_theme *saved_themedata2 = current_fixed_list_menu_theme;
  2453.     /*----------------------------------------------------------------*/
  2454.     /* Code Body                                                      */
  2455.     /*----------------------------------------------------------------*/
  2456.     /* Backup font */
  2457.     cat57_f1 = MMI_fixed_icontext_menuitem.text_font;
  2458.     cat57_f2 = MMI_fixed_text_menuitem.text_font;
  2459. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  2460.     gui_block_list_effect();
  2461. #endif 
  2462.     MMI_menu_shortcut_number = -1;
  2463.     clear_category_screen_key_handlers();
  2464.     change_left_softkey(left_softkey, left_softkey_icon);
  2465.     change_right_softkey(right_softkey, right_softkey_icon);
  2466.     clear_left_softkey();
  2467.     clear_right_softkey();
  2468.     register_left_softkey_handler();
  2469.     register_right_softkey_handler();
  2470.     register_default_hide_softkeys();
  2471.     MMI_title_string = title;
  2472.     MMI_title_icon = (PU8) get_image(title_icon);
  2473.     current_fixed_icontext_menuitem_theme = &wgui_inline_fixed_icontext_menuitem_theme;
  2474.     current_fixed_list_menu_theme = &wgui_inline_fixed_list_menu_theme;
  2475.     gui_set_fixed_list_menu_current_theme(&MMI_fixed_list_menu);
  2476.     create_fixed_icontext_menuitems();
  2477.     associate_fixed_icontext_list();
  2478. #ifdef __MMI_TOUCH_SCREEN__
  2479.     /* Avoid menu position shifted when it is resized for differet virtual keyboard layout */
  2480.     MMI_fixed_list_menu.flags |= UI_LIST_MENU_ALIGN_TO_TOP;
  2481. #endif /* __MMI_TOUCH_SCREEN__ */ 
  2482. #ifdef __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__
  2483.     temp_inline_edit_normal_filler.border_color = current_fixed_icontext_menuitem_theme->focussed_filler->c;
  2484.     MMI_fixed_icontext_menuitem.selected_filler = &temp_inline_edit_normal_filler;
  2485. #endif /* __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__ */ 
  2486. #ifdef __MMI_UI_TRANSPARENT_EFFECT__
  2487.     disable_fixed_icontext_menuitem_transparent_effect();
  2488. #endif 
  2489.     if (list_of_icons == NULL)
  2490.     {
  2491.         /* without icons */
  2492.         for (i = 0; (i < number_of_items) && (i < MAX_INLINE_ITEMS); i++)
  2493.         {
  2494.             wgui_inline_items[i] = list_of_items[i];
  2495.             add_fixed_icontext_item((UI_string_type) wgui_inline_items[i].text_p, NULL);
  2496.             /* 112905 user inline select Start */
  2497.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_USER_DEFINED_SELECT)
  2498.             {
  2499.                 MMI_fixed_icontext_menuitems[i].ext_flags |= UI_MENUITEM_EXT_DISABLE_FOCUSSED_TEXT_DISPLAY;
  2500.             }
  2501.             /* 112905 user inline select End */
  2502.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_DOW_SELECT)
  2503.             {
  2504.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_INLINE_EDIT_OBJECT;
  2505.             }
  2506.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_COLOR_SELECT)
  2507.             {
  2508.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_INLINE_EDIT_OBJECT;
  2509.             }
  2510.             if (wgui_inline_items[i].flags & INLINE_ITEM_DISABLE_HIGHLIGHT)
  2511.             {
  2512.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_DISABLE_BACKGROUND_ALWAYS;
  2513.             }
  2514.             if ((wgui_inline_items[i].flags & INLINE_ITEM_BOUNDARY_MASK) == INLINE_ITEM_BOUNDARY_ALWAYS)
  2515.             {
  2516.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_INLINE_EDIT_OBJECT;
  2517.             }
  2518.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_IMAGE_TEXT_TYPE)
  2519.             {
  2520.                 if (wgui_inline_items[i].show_img_flag == TRUE)
  2521.                 {
  2522.                     MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_INLINE_EDIT_OBJECT;
  2523.                 }
  2524.             }
  2525.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_ATTACH_IMAGE)
  2526.             {
  2527.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_INLINE_EDIT_OBJECT;
  2528.             }
  2529.             if (wgui_inline_items[i].flags & INLINE_ITEM_DOTTED_UNDERLINE)
  2530.             {
  2531.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_DOTTED_UNDERLINE;
  2532.             }
  2533.             if (((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_MULTI_LINE_RD_ONLY) ||
  2534.                 ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_MULTI_LINE_EDIT))
  2535.             {
  2536.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_INLINE_EDIT_OBJECT;
  2537.             }
  2538.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_TIME_PERIOD)
  2539.             {
  2540.                 MMI_fixed_icontext_menuitems[i].ext_flags |= UI_MENUITEM_EXT_DISABLE_FOCUSSED_TEXT_DISPLAY;
  2541.             }
  2542.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_SELECT)
  2543.             {
  2544.                 if (wgui_inline_items[i].show_img_flag == TRUE)
  2545.                 {
  2546.                     MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_INLINE_EDIT_OBJECT;
  2547.                 }
  2548.                 /* flags must be enabled in all the cases so that inline select item will have
  2549.                    similar behaviour in each case. */
  2550.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_DISABLE_BACKGROUND_ALWAYS;
  2551.                 MMI_fixed_icontext_menuitems[i].ext_flags |= UI_MENUITEM_EXT_DISABLE_FOCUSSED_TEXT_DISPLAY;
  2552.             }
  2553.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_COLOR_SELECT)
  2554.             {
  2555.                 if (wgui_inline_items[i].show_img_flag == TRUE)
  2556.                 {
  2557.                     MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_INLINE_EDIT_OBJECT;
  2558.                 }
  2559.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_DISABLE_BACKGROUND_ALWAYS;
  2560.                 MMI_fixed_icontext_menuitems[i].ext_flags |= UI_MENUITEM_EXT_DISABLE_FOCUSSED_TEXT_DISPLAY;
  2561.             }
  2562.         #ifdef __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__
  2563.             if ((((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_TEXT_EDIT)
  2564.                  || ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_FULL_SCREEN_EDIT)
  2565.                  || ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_DATE)
  2566.                  || ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_SELECT)
  2567.                  || ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_TIME)
  2568.                  || ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_TIME_PERIOD)
  2569.                  || ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_DOW_SELECT)
  2570.                  || ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_IP4_EDIT)
  2571.                  || ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_COLOR_SELECT))
  2572.                 && (IsInlineItemDefaultTextEnable()))
  2573.             {
  2574.                 MMI_fixed_icontext_menuitems[i].ext_flags |= UI_MENUITEM_EXT_SHOW_IN_ROUNDED_RECT;
  2575.             }
  2576.         #endif /* __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__ */ 
  2577.         }
  2578.     }
  2579.     else
  2580.     {
  2581.         /* with icons */
  2582.         for (i = 0; (i < number_of_items) && (i < MAX_INLINE_ITEMS); i++)
  2583.         {
  2584.             wgui_inline_items[i] = list_of_items[i];
  2585.             wgui_inline_items[i].side_img = get_image(list_of_icons[i]);
  2586.             add_fixed_icontext_item(
  2587.                 (UI_string_type) wgui_inline_items[i].text_p,
  2588.                 wgui_get_list_menu_icon_if_not_empty(inline_item_index, list_of_icons[i]));
  2589.             if (wgui_inline_items[i].side_img != NULL)
  2590.             {
  2591.                 inline_item_index++;
  2592.             }
  2593.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_USER_DEFINED_SELECT)
  2594.             {
  2595.                 MMI_fixed_icontext_menuitems[i].ext_flags |= UI_MENUITEM_EXT_DISABLE_FOCUSSED_TEXT_DISPLAY;
  2596.             }
  2597.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_DOW_SELECT)
  2598.             {
  2599.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_INLINE_EDIT_OBJECT;
  2600.             }
  2601.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_COLOR_SELECT)
  2602.             {
  2603.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_INLINE_EDIT_OBJECT;
  2604.             }
  2605.             if (wgui_inline_items[i].flags & INLINE_ITEM_DISABLE_HIGHLIGHT)
  2606.             {
  2607.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_DISABLE_BACKGROUND_ALWAYS;
  2608.             }
  2609.             if ((wgui_inline_items[i].flags & INLINE_ITEM_BOUNDARY_MASK) == INLINE_ITEM_BOUNDARY_ALWAYS)
  2610.             {
  2611.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_INLINE_EDIT_OBJECT;
  2612.             }
  2613.             if (((wgui_inline_items[i].flags & INLINE_ITEM_LEFT_ALIGN) == INLINE_ITEM_LEFT_ALIGN) &&
  2614.                 ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_CAPTION) &&
  2615.                 (get_image(list_of_icons[i]) == NULL))
  2616.             {
  2617.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_DISABLE_ICON;
  2618.             }
  2619.             if (wgui_inline_items[i].flags & INLINE_ITEM_DOTTED_UNDERLINE)
  2620.             {
  2621.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_DOTTED_UNDERLINE;
  2622.             }
  2623.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_IMAGE_TEXT_TYPE)
  2624.             {
  2625.                 if (wgui_inline_items[i].show_img_flag == TRUE)
  2626.                 {
  2627.                     MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_INLINE_EDIT_OBJECT;
  2628.                 }
  2629.             }
  2630.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_ATTACH_IMAGE)
  2631.             {
  2632.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_INLINE_EDIT_OBJECT;
  2633.             }
  2634.             if (((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_MULTI_LINE_RD_ONLY) ||
  2635.                 ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_MULTI_LINE_EDIT))
  2636.             {
  2637.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_INLINE_EDIT_OBJECT;
  2638.             }
  2639.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_TIME_PERIOD)
  2640.             {
  2641.                 MMI_fixed_icontext_menuitems[i].ext_flags |= UI_MENUITEM_EXT_DISABLE_FOCUSSED_TEXT_DISPLAY;
  2642.             }
  2643.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_SELECT)
  2644.             {
  2645.                 if (wgui_inline_items[i].show_img_flag == TRUE)
  2646.                 {
  2647.                     MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_INLINE_EDIT_OBJECT;
  2648.                 }
  2649.                 /* flags must be enabled in all the cases so that inline select item will have
  2650.                    similar behaviour in each case. */
  2651.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_DISABLE_BACKGROUND_ALWAYS;
  2652.                 MMI_fixed_icontext_menuitems[i].ext_flags |= UI_MENUITEM_EXT_DISABLE_FOCUSSED_TEXT_DISPLAY;
  2653.             }
  2654.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_COLOR_SELECT)
  2655.             {
  2656.                 if (wgui_inline_items[i].show_img_flag == TRUE)
  2657.                 {
  2658.                     MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_INLINE_EDIT_OBJECT;
  2659.                 }
  2660.                 MMI_fixed_icontext_menuitems[i].flags |= UI_MENUITEM_DISABLE_BACKGROUND_ALWAYS;
  2661.                 MMI_fixed_icontext_menuitems[i].ext_flags |= UI_MENUITEM_EXT_DISABLE_FOCUSSED_TEXT_DISPLAY;
  2662.             }
  2663.         #ifdef __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__
  2664.             if ((((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_TEXT_EDIT)
  2665.                  || ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_FULL_SCREEN_EDIT)
  2666.                  || ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_DATE)
  2667.                  || ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_SELECT)
  2668.                  || ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_TIME)
  2669.                  || ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_TIME_PERIOD)
  2670.                  || ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_DOW_SELECT)
  2671.                  || ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_IP4_EDIT)
  2672.                  || ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_COLOR_SELECT))
  2673.                 && (IsInlineItemDefaultTextEnable()))
  2674.             {
  2675.                 MMI_fixed_icontext_menuitems[i].ext_flags |= UI_MENUITEM_EXT_SHOW_IN_ROUNDED_RECT;
  2676.             }
  2677.         #endif /* __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__ */ 
  2678.         }
  2679.     }
  2680.     wgui_setup_inline_edit_themes();
  2681.     wgui_n_inline_items = number_of_items;
  2682.     register_inline_fixed_list_keys();
  2683.     resize_fixed_icontext_menuitems(0, MMI_MENUITEM_HEIGHT);
  2684.     if (list_of_icons == NULL)
  2685.     {
  2686.         set_fixed_icontext_positions(2, 0, 1, 0);
  2687.     }
  2688.     else
  2689.     {
  2690.         set_fixed_icontext_positions(MMI_INLINE_EDIT_MENUITEM_HEIGHT + 2, 0, 1, 0);
  2691.     }
  2692.     /* Inline screens use Pop up description components to get x,y,width,height   */
  2693. #if(UI_ENABLE_POP_UP_DESCRIPTIONS)
  2694.     gui_display_pop_up_description = handle_inline_item_location;
  2695. #ifdef __MMI_UI_HINTS_IN_MENUITEM__
  2696.     gui_get_current_pop_up_description_string = UI_dummy_get_current_pop_up_description_string;
  2697. #endif 
  2698. #endif /* (UI_ENABLE_POP_UP_DESCRIPTIONS) */ 
  2699.     register_fixed_list_highlight_handler(highlight_handler);
  2700.     register_fixed_list_unhighlight_handler(unhighlight_handler);
  2701.     inline_edit_current_highlight_handler = highlight_handler;
  2702.     /* Override default font */
  2703.     MMI_fixed_icontext_menuitem.text_font = &MMI_medium_font;
  2704.     MMI_fixed_text_menuitem.text_font = &MMI_medium_font;
  2705.     MMI_disable_title_shortcut_display = 1;
  2706.     MMI_current_menu_type = LIST_MENU;
  2707.     h_flag = set_list_menu_category_history(history_id, history_buffer);
  2708.     if (h_flag)
  2709.     {
  2710.         U32 *flags;
  2711.         S32 s = sizeof(list_menu_category_history);
  2712.         s = (s + 3) / 4;
  2713.         s *= 4;
  2714.         flags = (U32*) (history_buffer + s);
  2715.         wgui_inline_list_menu_changed = (U8) * flags;
  2716.         wgui_current_history_buffer = (U8*) (history_buffer + s + sizeof(U32));
  2717.         fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
  2718.     #if defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__)
  2719.         for (i = 0; (i < number_of_items) && (i < MAX_INLINE_ITEMS); i++)
  2720.         {
  2721.             if ((wgui_inline_items[i].flags & 0xff) == INLINE_ITEM_TYPE_MULTI_LINE_EDIT)
  2722.             {
  2723.                 wgui_inline_items[i].flags |= INLINE_ITEM_OPEN;
  2724.             }
  2725.         }
  2726.     #endif /* defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__) */ 
  2727.     }
  2728.     else
  2729.     {
  2730.         wgui_current_history_buffer = NULL;
  2731.         inline_image_text_edit_flag = 0;
  2732.         fixed_list_goto_item_no_redraw(highlighted_item);
  2733.     }
  2734.     current_fixed_icontext_menuitem_theme = saved_themedata1;
  2735.     current_fixed_list_menu_theme = saved_themedata2;
  2736. }
  2737. /*****************************************************************************
  2738.  * FUNCTION
  2739.  *  RegisterInlineItemChangedNotification
  2740.  * DESCRIPTION
  2741.  *  Register inline item changed notification callback
  2742.  * PARAMETERS
  2743.  *  callback        [IN]        Callback function to application
  2744.  * RETURNS
  2745.  *  void
  2746.  *****************************************************************************/
  2747. void RegisterInlineItemChangedNotification(void (*callback) (U16 index))
  2748. {
  2749.     /*----------------------------------------------------------------*/
  2750.     /* Local Variables                                                */
  2751.     /*----------------------------------------------------------------*/
  2752.     /*----------------------------------------------------------------*/
  2753.     /* Code Body                                                      */
  2754.     /*----------------------------------------------------------------*/
  2755.     inline_item_changed_handler = callback;
  2756. }
  2757. /*****************************************************************************
  2758.  * FUNCTION
  2759.  *  ResetInlineItemChangedNotification
  2760.  * DESCRIPTION
  2761.  *  Reset inline item changed notification callback
  2762.  * PARAMETERS
  2763.  *  void
  2764.  * RETURNS
  2765.  *  void
  2766.  *****************************************************************************/
  2767. void ResetInlineItemChangedNotification(void)
  2768. {
  2769.     /*----------------------------------------------------------------*/
  2770.     /* Local Variables                                                */
  2771.     /*----------------------------------------------------------------*/
  2772.     /*----------------------------------------------------------------*/
  2773.     /* Code Body                                                      */
  2774.     /*----------------------------------------------------------------*/
  2775.     inline_item_changed_handler = NULL;
  2776. }
  2777. #endif /* defined(__MMI_INSCREEN_MULTILINE_TEXTBOX__) */ 
  2778. #ifdef __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__
  2779. /*****************************************************************************
  2780.  * FUNCTION
  2781.  *  inline_item_default_text_show_background
  2782.  * DESCRIPTION
  2783.  *  show the background of the inline menu item in case of
  2784.  *  default text effect.
  2785.  * PARAMETERS
  2786.  *  x1      [IN]        Start x position
  2787.  *  y1      [IN]        Start y position
  2788.  *  x2      [IN]        End x position
  2789.  *  y2      [IN]        End y position
  2790.  * RETURNS
  2791.  *  void
  2792.  *****************************************************************************/
  2793. void inline_item_default_text_show_background(S32 x1, S32 y1, S32 x2, S32 y2)
  2794. {
  2795.     /*----------------------------------------------------------------*/
  2796.     /* Local Variables                                                */
  2797.     /*----------------------------------------------------------------*/
  2798.     /*----------------------------------------------------------------*/
  2799.     /* Code Body                                                      */
  2800.     /*----------------------------------------------------------------*/
  2801.     gdi_layer_push_clip();
  2802.     gui_set_clip(x1, y1, x2, y2);
  2803.     gui_draw_filled_area(x1, y1, x2, y2, &temp_inline_edit_normal_filler);
  2804.     gui_pop_clip();
  2805. }
  2806. /*****************************************************************************
  2807.  * FUNCTION
  2808.  *  inline_text_edit_show_background
  2809.  * DESCRIPTION
  2810.  *  show the border of the inline text edit menu item with 3D
  2811.  *  effect.
  2812.  * PARAMETERS
  2813.  *  b       [IN]        
  2814.  * RETURNS
  2815.  *  void
  2816.  *****************************************************************************/
  2817. void inline_text_edit_show_background(single_line_input_box *b)
  2818. {
  2819.     /*----------------------------------------------------------------*/
  2820.     /* Local Variables                                                */
  2821.     /*----------------------------------------------------------------*/
  2822.     S32 x1, y1, x2, y2;
  2823.     color border_color1, border_color2;
  2824.     /*----------------------------------------------------------------*/
  2825.     /* Code Body                                                      */
  2826.     /*----------------------------------------------------------------*/
  2827.     border_color1 = gui_blend_two_color(b->normal_filler->c, gui_color(255, 255, 255), 60, 100 - 60);
  2828.     border_color2 = gui_blend_two_color(b->normal_filler->c, gui_color(0, 0, 0), 75, 100 - 75);
  2829.     gdi_layer_reset_clip();
  2830.     x1 = b->x - 2;
  2831.     y1 = b->y - 2;
  2832.     x2 = b->x + b->width + 1;
  2833.     y2 = b->y + b->height + 1;
  2834.     /* draw the whitish rectangle */
  2835.     gui_draw_rectangle(x1, y1, x2 - 1, y2 - 1, border_color1);
  2836.     /* draw the top left dark border */
  2837.     gui_draw_horizontal_line(x1 + 1, x2 - 2, y1 + 1, border_color2);
  2838.     gui_draw_vertical_line(y1 + 1, y2 - 2, x1 + 1, border_color2);
  2839.     /* draw the bottom right highlight color border */
  2840.     gui_draw_horizontal_line(x1 + 1, x2, y2, b->normal_filler->c);
  2841.     gui_draw_vertical_line(y1 + 1, y2, x2, b->normal_filler->c);
  2842. }
  2843. #endif /* __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__ */ 
  2844. /*****************************************************************************
  2845.  * FUNCTION
  2846.  *  wgui_inline_edit_get_current_item_history
  2847.  * DESCRIPTION
  2848.  *  
  2849.  * PARAMETERS
  2850.  *  history_buffer      [?]     
  2851.  * RETURNS
  2852.  *  
  2853.  *****************************************************************************/
  2854. U8 *wgui_inline_edit_get_current_item_history(U8 *history_buffer)
  2855. {
  2856.     /*----------------------------------------------------------------*/
  2857.     /* Local Variables                                                */
  2858.     /*----------------------------------------------------------------*/
  2859.     /*----------------------------------------------------------------*/
  2860.     /* Code Body                                                      */
  2861.     /*----------------------------------------------------------------*/
  2862.     switch (wgui_current_inline_item_type)
  2863.     {
  2864.         case INLINE_ITEM_TYPE_TEXT_EDIT:
  2865.             inline_text_edit_get_history((U8*) (history_buffer), MMI_current_input_type);
  2866.             break;
  2867.         case INLINE_ITEM_TYPE_FULL_SCREEN_EDIT:
  2868.             inline_full_screen_edit_get_history((U8*) (history_buffer), MMI_current_input_type);
  2869.             break;
  2870.         case INLINE_ITEM_TYPE_DATE:
  2871.             inline_date_edit_get_history((U8*) (history_buffer));
  2872.             break;
  2873.         case INLINE_ITEM_TYPE_TIME:
  2874.             inline_time_edit_get_history((U8*) (history_buffer));
  2875.             break;
  2876.         case INLINE_ITEM_TYPE_TIME_PERIOD:
  2877.             inline_time_period_edit_get_history((U8*) (history_buffer));
  2878.             break;
  2879.         case INLINE_ITEM_TYPE_IP4_EDIT:
  2880.             inline_IP4_edit_get_history((U8*) (history_buffer));
  2881.             break;
  2882.         case INLINE_ITEM_TYPE_DOW_SELECT:
  2883.             inline_DOW_select_get_history((U8*) (history_buffer));
  2884.             break;
  2885.         case INLINE_ITEM_TYPE_MULTI_LINE_EDIT:
  2886.             inline_multi_line_edit_get_history((U8*) (history_buffer), MMI_current_input_type);
  2887.             break;
  2888.     }
  2889.     wgui_current_history_buffer = history_buffer;
  2890.     return (history_buffer);
  2891. }