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

MTK

开发平台:

C/C++

  1. /* under construction !*/
  2. /* under construction !*/
  3. /* under construction !*/
  4. /* under construction !*/
  5. /* under construction !*/
  6. /* under construction !*/
  7. /* under construction !*/
  8. /* under construction !*/
  9. /* under construction !*/
  10. /* under construction !*/
  11. /* under construction !*/
  12. /* under construction !*/
  13. /* under construction !*/
  14. /* under construction !*/
  15. /* under construction !*/
  16. /* under construction !*/
  17. /* under construction !*/
  18. /* under construction !*/
  19. /* under construction !*/
  20. #else /* 0 */ 
  21.     /* Lock frame buffer to avoid partial screen update 
  22.        (e.g. softkey changed before list is redrawn) */
  23.     gdi_layer_lock_frame_buffer();
  24.     fixed_list_goto_next_item();
  25.     gdi_layer_unlock_frame_buffer();
  26.     gdi_layer_blt_previous(0, 0, UI_device_width - 1, UI_device_height - 1);
  27. #if defined(__MMI_TOUCH_SCREEN__)
  28.     /* W06.05 Do not draw fixed list in category57 because of virtual keyboard */
  29.     if (GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY != MMI_virtual_keyboard.lang_type)
  30.     {
  31.         mmi_pen_editor_clear_and_show_virtual_keyboard_area();
  32.     }
  33. #endif /* defined(__MMI_TOUCH_SCREEN__) */ 
  34. #endif /* 0 */ 
  35. }
  36. /*****************************************************************************
  37.  * FUNCTION
  38.  *  inline_fixed_list_goto_item
  39.  * DESCRIPTION
  40.  *  
  41.  * PARAMETERS
  42.  *  index           [IN]        
  43.  *  backward        [IN]        
  44.  * RETURNS
  45.  *  void
  46.  *****************************************************************************/
  47. void inline_fixed_list_goto_item(S32 index, BOOL backward)
  48. {
  49.     /*----------------------------------------------------------------*/
  50.     /* Local Variables                                                */
  51.     /*----------------------------------------------------------------*/
  52.     /*----------------------------------------------------------------*/
  53.     /* Code Body                                                      */
  54.     /*----------------------------------------------------------------*/
  55.     /* FIXME. register as complete_inline_item_edit()? */
  56.     if (!(MMI_multiline_inputbox.flags & UI_MULTI_LINE_INPUT_BOX_VIEW_MODE) &&
  57.         (MMI_multiline_inputbox.flags & UI_MULTI_LINE_INPUT_BOX_INSIDE_INLINE_MENU))
  58.     {
  59.         handle_inline_multi_line_edit_complete();
  60.     }
  61.     if (backward)
  62.     {
  63.         wgui_inline_edit_arrow_key_flag = CATEGORY57_UP_ARROW_KEY_FLAG;
  64.     }
  65.     else
  66.     {
  67.         wgui_inline_edit_arrow_key_flag = CATEGORY57_DOWN_ARROW_KEY_FLAG;
  68.     }
  69.     clear_inline_item_keys();
  70.     register_inline_fixed_list_keys();
  71. #if 0   /* defined(__MMI_TOUCH_SCREEN__) */
  72. /* under construction !*/
  73. /* under construction !*/
  74. /* under construction !*/
  75. /* under construction !*/
  76. /* under construction !*/
  77. /* under construction !*/
  78. /* under construction !*/
  79. /* under construction !*/
  80. /* under construction !*/
  81. /* under construction !*/
  82. /* under construction !*/
  83. /* under construction !*/
  84. /* under construction !*/
  85. /* under construction !*/
  86. /* under construction !*/
  87. /* under construction !*/
  88. /* under construction !*/
  89. /* under construction !*/
  90. /* under construction !*/
  91. /* under construction !*/
  92. /* under construction !*/
  93. /* under construction !*/
  94. /* under construction !*/
  95. /* under construction !*/
  96. /* under construction !*/
  97. /* under construction !*/
  98. /* under construction !*/
  99. /* under construction !*/
  100. /* under construction !*/
  101. /* under construction !*/
  102. /* under construction !*/
  103. /* under construction !*/
  104. #else /* 0 */ 
  105.     /* Lock frame buffer to avoid partial screen update 
  106.        (e.g. softkey changed before list is redrawn) */
  107.     gdi_layer_lock_frame_buffer();
  108.     fixed_list_goto_item(index);
  109.     gdi_layer_unlock_frame_buffer();
  110.     gdi_layer_blt_previous(0, 0, UI_device_width - 1, UI_device_height - 1);    
  111. #if defined(__MMI_TOUCH_SCREEN__)
  112.     /* W06.05 Do not draw fixed list in category57 because of virtual keyboard */
  113.     if (GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY != MMI_virtual_keyboard.lang_type)
  114.     {
  115.         mmi_pen_editor_clear_and_show_virtual_keyboard_area();
  116.     }
  117. #endif /* defined(__MMI_TOUCH_SCREEN__) */ 
  118. #endif /* 0 */ 
  119. }
  120. /*****************************************************************************
  121.  * FUNCTION
  122.  *  inline_fixed_list_key_handler
  123.  * DESCRIPTION
  124.  *  
  125.  * PARAMETERS
  126.  *  vkey_code       [IN]        
  127.  *  key_state       [IN]        
  128.  * RETURNS
  129.  *  void
  130.  *****************************************************************************/
  131. void inline_fixed_list_key_handler(S32 vkey_code, S32 key_state)
  132. {
  133. #if(MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32)
  134.     /*----------------------------------------------------------------*/
  135.     /* Local Variables                                                */
  136.     /*----------------------------------------------------------------*/
  137.     /*----------------------------------------------------------------*/
  138.     /* Code Body                                                      */
  139.     /*----------------------------------------------------------------*/
  140.     if (key_state)
  141.     {
  142.         switch (vkey_code)
  143.         {
  144.             case 37:
  145.                 break;
  146.             case 39:
  147.                 break;
  148.             case 38:
  149.                 inline_fixed_list_goto_previous_item();
  150.                 break;
  151.             case 40:
  152.                 inline_fixed_list_goto_next_item();
  153.                 break;
  154.             case 36:
  155.                 clear_inline_item_keys();
  156.                 fixed_list_goto_home();
  157.                 break;
  158.             case 35:
  159.                 clear_inline_item_keys();
  160.                 fixed_list_goto_end();
  161.                 break;
  162.             case 33:
  163.                 clear_inline_item_keys();
  164.                 fixed_list_goto_previous_page();
  165.                 break;
  166.             case 34:
  167.                 clear_inline_item_keys();
  168.                 fixed_list_goto_next_page();
  169.                 break;
  170.         }
  171.     }
  172. #else /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */ 
  173.     UI_UNUSED_PARAMETER(vkey_code);
  174.     UI_UNUSED_PARAMETER(key_state);
  175. #endif /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */ 
  176. }
  177. /*****************************************************************************
  178.  * FUNCTION
  179.  *  register_inline_fixed_list_keys
  180.  * DESCRIPTION
  181.  *  
  182.  * PARAMETERS
  183.  *  void
  184.  * RETURNS
  185.  *  void
  186.  *****************************************************************************/
  187. void register_inline_fixed_list_keys(void)
  188. {
  189.     /*----------------------------------------------------------------*/
  190.     /* Local Variables                                                */
  191.     /*----------------------------------------------------------------*/
  192.     /*----------------------------------------------------------------*/
  193.     /* Code Body                                                      */
  194.     /*----------------------------------------------------------------*/
  195.     register_keyboard_key_handler(inline_fixed_list_key_handler);
  196.     SetKeyHandler(inline_fixed_list_goto_previous_item, KEY_UP_ARROW, KEY_EVENT_DOWN);
  197.     SetKeyHandler(inline_fixed_list_goto_next_item, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
  198.     SetKeyHandler(inline_fixed_list_goto_previous_item, KEY_VOL_UP, KEY_EVENT_DOWN);
  199.     SetKeyHandler(inline_fixed_list_goto_next_item, KEY_VOL_DOWN, KEY_EVENT_DOWN);
  200. }
  201. /* Changes to allow Back/Done key and Clear key in case of Inline edit  */
  202. /* Max: add state to set RSK to "Clear" */
  203. /*****************************************************************************
  204.  * FUNCTION
  205.  *  wgui_inline_edit_get_RSK_string
  206.  * DESCRIPTION
  207.  *  
  208.  * PARAMETERS
  209.  *  void
  210.  * RETURNS
  211.  *  
  212.  *****************************************************************************/
  213. UI_string_type wgui_inline_edit_get_RSK_string(void)
  214. {
  215.     /*----------------------------------------------------------------*/
  216.     /* Local Variables                                                */
  217.     /*----------------------------------------------------------------*/
  218.     /*----------------------------------------------------------------*/
  219.     /* Code Body                                                      */
  220.     /*----------------------------------------------------------------*/
  221.     if (wgui_inline_list_menu_changed)
  222.     {
  223.         if (wgui_inline_list_menu_disable_done == 1)
  224.         {
  225.             return ((UI_string_type) get_string(STR_GLOBAL_BACK));
  226.         }
  227.         else if (wgui_inline_list_menu_disable_done == 2)
  228.         {
  229.             return ((UI_string_type) get_string(STR_GLOBAL_CLEAR));
  230.         }
  231.         else
  232.         {
  233.             return ((UI_string_type) get_string(WGUI_CATEGORY_DONE_STRING_ID));
  234.         }
  235.     }
  236.     else
  237.     {
  238.         return ((UI_string_type) get_string(STR_GLOBAL_BACK));
  239.     }
  240. }
  241. /*****************************************************************************
  242.  * FUNCTION
  243.  *  execute_wgui_inline_edit_DONE_function
  244.  * DESCRIPTION
  245.  *  
  246.  * PARAMETERS
  247.  *  void
  248.  * RETURNS
  249.  *  void
  250.  *****************************************************************************/
  251. void execute_wgui_inline_edit_DONE_function(void)
  252. {
  253.     /*----------------------------------------------------------------*/
  254.     /* Local Variables                                                */
  255.     /*----------------------------------------------------------------*/
  256.     /*----------------------------------------------------------------*/
  257.     /* Code Body                                                      */
  258.     /*----------------------------------------------------------------*/
  259.     complete_inline_item_edit();
  260.     MMI_multi_line_inputbox_present = 0;
  261.     if (wgui_inline_edit_DONE_function != NULL)
  262.     {
  263.         wgui_inline_edit_DONE_function();
  264.     }
  265. }
  266. /*****************************************************************************
  267.  * FUNCTION
  268.  *  execute_wgui_inline_edit_BACK_function
  269.  * DESCRIPTION
  270.  *  
  271.  * PARAMETERS
  272.  *  void
  273.  * RETURNS
  274.  *  void
  275.  *****************************************************************************/
  276. void execute_wgui_inline_edit_BACK_function(void)
  277. {
  278.     /*----------------------------------------------------------------*/
  279.     /* Local Variables                                                */
  280.     /*----------------------------------------------------------------*/
  281.     /*----------------------------------------------------------------*/
  282.     /* Code Body                                                      */
  283.     /*----------------------------------------------------------------*/
  284.     if (wgui_inline_edit_BACK_function != NULL)
  285.     {
  286.         MMI_multi_line_inputbox_present = 0;
  287.         wgui_inline_edit_BACK_function();
  288.     }
  289. }
  290. /*****************************************************************************
  291.  * FUNCTION
  292.  *  execute_wgui_inline_edit_RSK_function
  293.  * DESCRIPTION
  294.  *  
  295.  * PARAMETERS
  296.  *  void
  297.  * RETURNS
  298.  *  void
  299.  *****************************************************************************/
  300. void execute_wgui_inline_edit_RSK_function(void)
  301. {
  302.     /*----------------------------------------------------------------*/
  303.     /* Local Variables                                                */
  304.     /*----------------------------------------------------------------*/
  305.     /*----------------------------------------------------------------*/
  306.     /* Code Body                                                      */
  307.     /*----------------------------------------------------------------*/
  308.     if (wgui_inline_list_menu_changed)
  309.     {
  310.         if (wgui_inline_list_menu_disable_done)
  311.         {
  312.             execute_wgui_inline_edit_BACK_function();
  313.         }
  314.         else
  315.         {
  316.             execute_wgui_inline_edit_DONE_function();
  317.         }
  318.     }
  319.     else
  320.     {
  321.         execute_wgui_inline_edit_BACK_function();
  322.     }
  323. }
  324. /*****************************************************************************
  325.  * FUNCTION
  326.  *  execute_wgui_inline_edit_LSK_function
  327.  * DESCRIPTION
  328.  *  
  329.  * PARAMETERS
  330.  *  void
  331.  * RETURNS
  332.  *  void
  333.  *****************************************************************************/
  334. void execute_wgui_inline_edit_LSK_function(void)
  335. {
  336.     /*----------------------------------------------------------------*/
  337.     /* Local Variables                                                */
  338.     /*----------------------------------------------------------------*/
  339.     /*----------------------------------------------------------------*/
  340.     /* Code Body                                                      */
  341.     /*----------------------------------------------------------------*/
  342.     complete_inline_item_edit();
  343.     if (wgui_inline_edit_LSK_function != NULL)
  344.     {
  345.         wgui_inline_edit_LSK_function();
  346.     }
  347. }
  348. /*****************************************************************************
  349.  * FUNCTION
  350.  *  set_wgui_inline_list_menu_changed
  351.  * DESCRIPTION
  352.  *  
  353.  * PARAMETERS
  354.  *  void
  355.  * RETURNS
  356.  *  void
  357.  *****************************************************************************/
  358. void set_wgui_inline_list_menu_changed(void)
  359. {
  360.     /*----------------------------------------------------------------*/
  361.     /* Local Variables                                                */
  362.     /*----------------------------------------------------------------*/
  363.     /*----------------------------------------------------------------*/
  364.     /* Code Body                                                      */
  365.     /*----------------------------------------------------------------*/
  366.     /* MTK Leo start 20051001, for sending inline items' change notify to application */
  367.     if (inline_item_changed_handler != NULL)
  368.     {
  369.         inline_item_changed_handler((U16) wgui_inline_item_highlighted_index);
  370.     }
  371.     /* MTK Leo end */
  372.     if (wgui_inline_list_menu_disable_done)
  373.     {
  374.         return;
  375.     }
  376.     if (wgui_inline_list_menu_changed)
  377.     {
  378.         return;
  379.     }
  380.     wgui_inline_list_menu_changed = 1;
  381.     set_right_softkey_label(wgui_inline_edit_get_RSK_string());
  382.     set_right_softkey_icon(NULL);
  383.     register_right_softkey_handler();
  384.     set_right_softkey_function(execute_wgui_inline_edit_RSK_function, KEY_EVENT_UP);
  385.     redraw_right_softkey();
  386. }
  387. /*****************************************************************************
  388.  * FUNCTION
  389.  *  wgui_inline_edit_register_BACK_function
  390.  * DESCRIPTION
  391.  *  
  392.  * PARAMETERS
  393.  *  void
  394.  * RETURNS
  395.  *  void
  396.  *****************************************************************************/
  397. void wgui_inline_edit_register_BACK_function(void)
  398. {
  399.     /*----------------------------------------------------------------*/
  400.     /* Local Variables                                                */
  401.     /*----------------------------------------------------------------*/
  402.     /*----------------------------------------------------------------*/
  403.     /* Code Body                                                      */
  404.     /*----------------------------------------------------------------*/
  405.     set_right_softkey_function(execute_wgui_inline_edit_BACK_function, KEY_EVENT_UP);
  406. }
  407. /*****************************************************************************
  408.  * FUNCTION
  409.  *  wgui_inline_edit_register_ckey_BACK_function
  410.  * DESCRIPTION
  411.  *  
  412.  * PARAMETERS
  413.  *  void
  414.  * RETURNS
  415.  *  void
  416.  *****************************************************************************/
  417. void wgui_inline_edit_register_ckey_BACK_function(void)
  418. {
  419.     /*----------------------------------------------------------------*/
  420.     /* Local Variables                                                */
  421.     /*----------------------------------------------------------------*/
  422.     /*----------------------------------------------------------------*/
  423.     /* Code Body                                                      */
  424.     /*----------------------------------------------------------------*/
  425.     SetKeyHandler(execute_wgui_inline_edit_BACK_function, KEY_CLEAR, KEY_EVENT_UP);
  426. }
  427. /* PMT VIKAS START 20050707 */
  428. #ifdef __MMI_UI_DALMATIAN_SOFTKEYS__
  429. extern is_button_bar_shuffled;
  430. #endif 
  431. /* PMT VIKAS END 20050707 */
  432. /*****************************************************************************
  433.  * FUNCTION
  434.  *  wgui_inline_text_edit_set_RSK_BACK_function
  435.  * DESCRIPTION
  436.  *  
  437.  * PARAMETERS
  438.  *  void
  439.  * RETURNS
  440.  *  void
  441.  *****************************************************************************/
  442. void wgui_inline_text_edit_set_RSK_BACK_function(void)
  443. {   /* reset_right_softkey();           */
  444.     /*----------------------------------------------------------------*/
  445.     /* Local Variables                                                */
  446.     /*----------------------------------------------------------------*/
  447.     /*----------------------------------------------------------------*/
  448.     /* Code Body                                                      */
  449.     /*----------------------------------------------------------------*/
  450.     if (wgui_inline_list_menu_disable_done)
  451.     {
  452.     #if defined(__MMI_WITH_C_KEY__)
  453.         SetKeyHandler(UI_dummy_function, KEY_CLEAR, KEY_EVENT_DOWN);
  454.         SetKeyHandler(wgui_inline_edit_register_ckey_BACK_function, KEY_CLEAR, KEY_EVENT_UP);
  455.     #else /* defined(__MMI_WITH_C_KEY__) */ 
  456.         set_right_softkey_label((UI_string_type) get_string(STR_GLOBAL_BACK));
  457.         set_right_softkey_icon(NULL);
  458.         set_right_softkey_function(wgui_inline_edit_register_BACK_function, KEY_EVENT_UP);
  459.         set_right_softkey_function(UI_dummy_function, KEY_EVENT_DOWN);
  460.     #endif /* defined(__MMI_WITH_C_KEY__) */ 
  461.     }
  462.     else
  463.     {
  464.         reset_right_softkey();
  465.         set_right_softkey_label(NULL);
  466.         set_right_softkey_icon(NULL);
  467.         /* PMT VIKAS START 20050707 */
  468.     #ifdef __MMI_UI_DALMATIAN_SOFTKEYS__
  469.         is_button_bar_shuffled = 1;
  470.         gui_call_shuffle(); /* To shuffle the key as button up is not called. */
  471.     #endif /* __MMI_UI_DALMATIAN_SOFTKEYS__ */ 
  472.         /* PMT VIKAS END 20050707 */
  473.     }
  474.     redraw_right_softkey();
  475. }
  476. /* History IDs for inline items  */
  477. //#define INLINE_TEXT_EDIT_HISTORY_ID              1
  478. //#define INLINE_SELECT_HISTORY_ID              3
  479. //#define INLINE_USER_DEFINED_SELECT_HISTORY_ID    4
  480. //#define INLINE_DATE_HISTORY_ID                5
  481. //#define INLINE_TIME_HISTORY_ID                6
  482. //#define INLINE_DOW_SELECT_HISTORY_ID          7
  483. //#define INLINE_TIME_PERIOD_HISTORY_ID            8
  484. //#define INLINE_IP4_HISTORY_ID                 9
  485. //#define INLINE_FULL_SCREEN_EDIT_HISTORY_ID       10
  486. /*----------------------------------------------------------------------------
  487.    "Display only" inline item implementation
  488. ----------------------------------------------------------------------------*/
  489. /*****************************************************************************
  490.  * FUNCTION
  491.  *  handle_inline_display_only
  492.  * DESCRIPTION
  493.  *  
  494.  * PARAMETERS
  495.  *  x                   [IN]        
  496.  *  y                   [IN]        
  497.  *  width               [IN]        
  498.  *  height              [IN]        
  499.  *  key_code            [IN]        
  500.  *  key_event           [IN]        
  501.  *  text_p              [IN]        
  502.  *  item                [?]         
  503.  *  flags               [IN]        
  504.  *  history_buffer      [?]         
  505.  * RETURNS
  506.  *  void
  507.  *****************************************************************************/
  508. void handle_inline_display_only(
  509.         S32 x,
  510.         S32 y,
  511.         S32 width,
  512.         S32 height,
  513.         S32 key_code,
  514.         S32 key_event,
  515.         U8 **text_p,
  516.         void *item,
  517.         U32 flags,
  518.         U8 *history_buffer)
  519. {
  520.     /*----------------------------------------------------------------*/
  521.     /* Local Variables                                                */
  522.     /*----------------------------------------------------------------*/
  523.     /*----------------------------------------------------------------*/
  524.     /* Code Body                                                      */
  525.     /*----------------------------------------------------------------*/
  526.     UI_UNUSED_PARAMETER(x);
  527.     UI_UNUSED_PARAMETER(y);
  528.     UI_UNUSED_PARAMETER(height);
  529.     UI_UNUSED_PARAMETER(width);
  530.     UI_UNUSED_PARAMETER(key_code);
  531.     UI_UNUSED_PARAMETER(key_event);
  532.     UI_UNUSED_PARAMETER(text_p);
  533.     UI_UNUSED_PARAMETER(item);
  534.     UI_UNUSED_PARAMETER(flags);
  535. }
  536. /*****************************************************************************
  537.  * FUNCTION
  538.  *  SetInlineItemDisplayOnly
  539.  * DESCRIPTION
  540.  *  
  541.  * PARAMETERS
  542.  *  item        [?]     
  543.  *  text_p      [?]     
  544.  * RETURNS
  545.  *  void
  546.  *****************************************************************************/
  547. void SetInlineItemDisplayOnly(InlineItem *item, U8 *text_p)
  548. {
  549.     /*----------------------------------------------------------------*/
  550.     /* Local Variables                                                */
  551.     /*----------------------------------------------------------------*/
  552.     /*----------------------------------------------------------------*/
  553.     /* Code Body                                                      */
  554.     /*----------------------------------------------------------------*/
  555.     item->item = NULL;
  556.     item->text_p = text_p;
  557.     item->handler = handle_inline_display_only;
  558.     item->flags = INLINE_ITEM_TYPE_DISPLAY_ONLY;
  559. }
  560. /*****************************************************************************
  561.  * FUNCTION
  562.  *  ReConfigureInlineItemDisplayOnly
  563.  * DESCRIPTION
  564.  *  
  565.  * PARAMETERS
  566.  *  item        [?]     
  567.  *  text_p      [?]     
  568.  * RETURNS
  569.  *  void
  570.  *****************************************************************************/
  571. void ReConfigureInlineItemDisplayOnly(InlineItem *item, U8 *text_p)
  572. {
  573.     /*----------------------------------------------------------------*/
  574.     /* Local Variables                                                */
  575.     /*----------------------------------------------------------------*/
  576.     /*----------------------------------------------------------------*/
  577.     /* Code Body                                                      */
  578.     /*----------------------------------------------------------------*/
  579.     if ((item->flags & 0xff) != INLINE_ITEM_TYPE_DISPLAY_ONLY)
  580.     {
  581.         return;
  582.     }
  583.     item->text_p = text_p;
  584. }
  585. /*----------------------------------------------------------------------------
  586.    "Caption" inline item implementation
  587. ----------------------------------------------------------------------------*/
  588. /*****************************************************************************
  589.  * FUNCTION
  590.  *  handle_inline_caption
  591.  * DESCRIPTION
  592.  *  
  593.  * PARAMETERS
  594.  *  x                   [IN]        
  595.  *  y                   [IN]        
  596.  *  width               [IN]        
  597.  *  height              [IN]        
  598.  *  key_code            [IN]        
  599.  *  key_event           [IN]        
  600.  *  text_p              [IN]        
  601.  *  item                [?]         
  602.  *  flags               [IN]        
  603.  *  history_buffer      [?]         
  604.  * RETURNS
  605.  *  void
  606.  *****************************************************************************/
  607. void handle_inline_caption(
  608.         S32 x,
  609.         S32 y,
  610.         S32 width,
  611.         S32 height,
  612.         S32 key_code,
  613.         S32 key_event,
  614.         U8 **text_p,
  615.         void *item,
  616.         U32 flags,
  617.         U8 *history_buffer)
  618. {
  619.     /*----------------------------------------------------------------*/
  620.     /* Local Variables                                                */
  621.     /*----------------------------------------------------------------*/
  622.     /*----------------------------------------------------------------*/
  623.     /* Code Body                                                      */
  624.     /*----------------------------------------------------------------*/
  625.     UI_UNUSED_PARAMETER(x);
  626.     UI_UNUSED_PARAMETER(y);
  627.     UI_UNUSED_PARAMETER(height);
  628.     UI_UNUSED_PARAMETER(width);
  629.     UI_UNUSED_PARAMETER(key_code);
  630.     UI_UNUSED_PARAMETER(key_event);
  631.     UI_UNUSED_PARAMETER(text_p);
  632.     UI_UNUSED_PARAMETER(item);
  633.     UI_UNUSED_PARAMETER(flags);
  634. }
  635. /*****************************************************************************
  636.  * FUNCTION
  637.  *  SetInlineItemCaption
  638.  * DESCRIPTION
  639.  *  
  640.  * PARAMETERS
  641.  *  item        [?]     
  642.  *  text_p      [?]     
  643.  * RETURNS
  644.  *  void
  645.  *****************************************************************************/
  646. void SetInlineItemCaption(InlineItem *item, U8 *text_p)
  647. {
  648.     /*----------------------------------------------------------------*/
  649.     /* Local Variables                                                */
  650.     /*----------------------------------------------------------------*/
  651.     /*----------------------------------------------------------------*/
  652.     /* Code Body                                                      */
  653.     /*----------------------------------------------------------------*/
  654.     item->item = NULL;
  655.     item->text_p = text_p;
  656.     item->handler = handle_inline_caption;
  657.     item->flags = INLINE_ITEM_TYPE_CAPTION;
  658. }
  659. /*****************************************************************************
  660.  * FUNCTION
  661.  *  ReconfigureInlineItemCaption
  662.  * DESCRIPTION
  663.  *  
  664.  * PARAMETERS
  665.  *  item        [?]     
  666.  *  text_p      [?]     
  667.  * RETURNS
  668.  *  void
  669.  *****************************************************************************/
  670. void ReconfigureInlineItemCaption(InlineItem *item, U8 *text_p)
  671. {
  672.     /*----------------------------------------------------------------*/
  673.     /* Local Variables                                                */
  674.     /*----------------------------------------------------------------*/
  675.     /*----------------------------------------------------------------*/
  676.     /* Code Body                                                      */
  677.     /*----------------------------------------------------------------*/
  678.     if ((item->flags & 0xff) != INLINE_ITEM_TYPE_CAPTION)
  679.     {
  680.         return;
  681.     }
  682.     item->text_p = text_p;
  683. }
  684. /*----------------------------------------------------------------------------
  685.    Inline text edit (single line) implementation
  686. ----------------------------------------------------------------------------*/
  687. //#define MAX_INLINE_TEXT_EDIT_ITEMS                     10
  688. //#define MAX_INLINE_TEXT_EDIT_BUFFER_SIZE               88
  689. wgui_inline_item_text_edit wgui_inline_text_edit_items[MAX_INLINE_TEXT_EDIT_ITEMS];
  690. U8 wgui_inline_text_edit_buffer[MAX_INLINE_TEXT_EDIT_BUFFER_SIZE];
  691. U8 wgui_inline_full_screen_text_edit_buffer[MAX_INLINE_FULL_SCREEN_TEXT_EDIT_BUFFER_SIZE];
  692. wgui_inline_item_text_edit *current_wgui_inline_text_edit_item;
  693. U8 **current_wgui_inline_text_edit_text_p;
  694. single_line_input_box MMI_inline_singleline_inputbox;
  695. U8 inline_text_edit_mask_buffers[MAX_INLINE_TEXT_EDIT_ITEMS][MAX_INLINE_TEXT_EDIT_BUFFER_SIZE];
  696. UI_character_type inline_text_edit_mask_character = (UI_character_type) '*';
  697. U8 wgui_inline_singleline_inputbox_decimal_flag = 0;
  698. U8 wgui_inline_singleline_inputbox_decimal_input_mode_flag = 0;
  699. extern U8 MMI_current_input_mode;
  700. S32 wgui_inline_singleline_inputbox_buffer_size = 0;
  701. void (*inline_singleline_inputbox_input_callback) (void) = UI_dummy_function;
  702. void (*inline_singleline_inputbox_navigate_callback) (void) = UI_dummy_function;
  703. extern S32(*wgui_inputbox_UCS2_count_function) (void);
  704. #if((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING))
  705. S32 wgui_inline_singleline_inputbox_frame_counter = 0;
  706. #endif 
  707. UI_filled_area temp_inline_edit_background_filler = {UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_SINGLE_BORDER,
  708.     NULL,
  709.     NULL,
  710.     /* MTK Leo modify 0912 */
  711. #ifdef __MMI_DEFAULT_THEME_3__
  712.     {206, 206, 206, 100},
  713. #else 
  714.     {167, 232, 93, 100},
  715. #endif 
  716.     /* MTK Leo end */
  717.     {0, 0, 0, 0},
  718.     {0, 0, 0, 100},
  719.     {0, 0, 0, 0},
  720.     0
  721. };
  722. UI_filled_area temp_inline_edit_background_filler2 = {UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_SINGLE_BORDER,
  723.     NULL,
  724.     NULL,
  725.     {255, 255, 255, 100},
  726.     {0, 0, 0, 0},
  727.     {0, 0, 0, 100},
  728.     {0, 0, 0, 0},
  729.     0
  730. };
  731. UI_filled_area temp_inline_edit_background_filler3 = {UI_FILLED_AREA_TYPE_COLOR,
  732.     NULL,
  733.     NULL,
  734.     {167, 232, 93, 100},
  735.     {0, 0, 0, 0},
  736.     {0, 0, 0, 100},
  737.     {0, 0, 0, 0},
  738.     0
  739. };
  740. /* Filler used for focussed inputbox   with boundary  */
  741. UI_single_line_input_box_theme wgui_inline_singleline_inputbox_focussed_theme = { &temp_inline_edit_background_filler,
  742.     &temp_inline_edit_background_filler,
  743.     &temp_inline_edit_background_filler,
  744.     {0, 0, 0, 100},
  745.     {128, 128, 128, 100},
  746.     {0, 0, 0, 100},
  747.     {255, 255, 255, 100},
  748.     {51, 88, 171, 100},
  749.     {255, 0, 0, 100},
  750.     &MMI_default_font,
  751.     1,
  752.     UI_SINGLE_LINE_INPUT_BOX_CENTER_Y,
  753.     '*'
  754. };
  755. /* Filler used for unfocussed inputbox with boundary  */
  756. UI_single_line_input_box_theme wgui_inline_singleline_inputbox_unfocussed_theme =
  757.     { &temp_inline_edit_background_filler2,
  758.     &temp_inline_edit_background_filler2,
  759.     &temp_inline_edit_background_filler2,
  760.     {0, 0, 0, 100},
  761.     {128, 128, 128, 100},
  762.     {0, 0, 0, 100},
  763.     {255, 255, 255, 100},
  764.     {51, 88, 171, 100},
  765.     {255, 0, 0, 100},
  766.     &MMI_default_font,
  767.     1,
  768.     UI_SINGLE_LINE_INPUT_BOX_CENTER_Y,
  769.     '*'
  770. };
  771. /* Filler used for inputbox without boundary */
  772. UI_single_line_input_box_theme wgui_inline_singleline_inputbox_no_boundary_theme =
  773.     { &temp_inline_edit_background_filler3,
  774.     &temp_inline_edit_background_filler3,
  775.     &temp_inline_edit_background_filler3,
  776.     {0, 0, 0, 100},
  777.     {128, 128, 128, 100},
  778.     {0, 0, 0, 100},
  779.     {255, 255, 255, 100},
  780.     {51, 88, 171, 100},
  781.     {255, 0, 0, 100},
  782.     &MMI_default_font,
  783.     1,
  784.     UI_SINGLE_LINE_INPUT_BOX_CENTER_Y,
  785.     '*'
  786. };
  787. void (*inline_text_edit_RSK_function) (void) = NULL;
  788. U8 inline_text_edit_RSK_label_clear = 0;
  789. UI_string_type inline_text_edit_RSK_label_string;
  790. PU8 inline_text_edit_RSK_label_icon;
  791. #define WGUI_INLINE_TEXT_EDIT_MULTITAP_NONE     0
  792. #define WGUI_INLINE_TEXT_EDIT_MULTITAP_STAR     1
  793. #define WGUI_INLINE_TEXT_EDIT_MULTITAP_ANY      2
  794. /* MTK Elvis */
  795. #define WGUI_INLINE_TEXT_EDIT_MULTITAP_ZERO     3
  796. /* MTK end */
  797. U8 wgui_inline_text_edit_active_multitap = WGUI_INLINE_TEXT_EDIT_MULTITAP_NONE;
  798. UI_character_type wgui_inline_edit_phone_number_star_key_string[] = { '*', '+', 'p', 'w', '' };
  799. multitap_input wgui_inline_text_edit_multitap_star_key;
  800. /* MTK Elvis */
  801. UI_character_type wgui_inline_edit_phone_number_zero_key_string[] = { '+', 'p', 'w', '' };
  802. multitap_input wgui_inline_text_edit_multitap_zero_key;
  803. /* MTK end */
  804. extern void MMI_key_0_down(void);
  805. extern void MMI_key_0_up(void);
  806. /*****************************************************************************
  807.  * FUNCTION
  808.  *  inline_edit_prepare_mask_buffer
  809.  * DESCRIPTION
  810.  *  
  811.  * PARAMETERS
  812.  *  buffer1     [?]     
  813.  *  buffer2     [?]     
  814.  * RETURNS
  815.  *  void
  816.  *****************************************************************************/
  817. void inline_edit_prepare_mask_buffer(U8 *buffer1, U8 *buffer2)
  818. {
  819.     /*----------------------------------------------------------------*/
  820.     /* Local Variables                                                */
  821.     /*----------------------------------------------------------------*/
  822.     UI_character_type c = (UI_character_type) - 1;
  823.     U16 eos = '';
  824.     /*----------------------------------------------------------------*/
  825.     /* Code Body                                                      */
  826.     /*----------------------------------------------------------------*/
  827.     while (!UI_STRING_END_OF_STRING_CHARACTER(c))
  828.     {
  829.         UI_STRING_GET_NEXT_CHARACTER(buffer1, c);
  830.         if (UI_STRING_END_OF_STRING_CHARACTER(c))
  831.         {
  832.             UI_STRING_INSERT_CHARACTER(buffer2, eos);
  833.         }
  834.         else
  835.         {
  836.             UI_STRING_INSERT_CHARACTER(buffer2, inline_text_edit_mask_character);
  837.         }
  838.     }
  839. }
  840.  /*
  841.   * void UI_dummy_edit_complete_handler(U8 *buffer,S32 buffer_size)
  842.   * { UI_UNUSED_PARAMETER(buffer);
  843.   * UI_UNUSED_PARAMETER(buffer_size);
  844.   */
  845. /*****************************************************************************
  846.  * FUNCTION
  847.  *  create_inline_edit_singleline_inputbox_set_buffer
  848.  * DESCRIPTION
  849.  *  
  850.  * PARAMETERS
  851.  *  buffer              [IN]        
  852.  *  buffer_length       [IN]        
  853.  *  text_length         [IN]        
  854.  *  edit_position       [IN]        
  855.  * RETURNS
  856.  *  void
  857.  *****************************************************************************/
  858. void create_inline_edit_singleline_inputbox_set_buffer(
  859.         UI_string_type buffer,
  860.         S32 buffer_length,
  861.         S32 text_length,
  862.         S32 edit_position)
  863. {
  864.     /*----------------------------------------------------------------*/
  865.     /* Local Variables                                                */
  866.     /*----------------------------------------------------------------*/
  867.     UI_single_line_input_box_theme *t = current_single_line_input_box_theme;
  868.     /*----------------------------------------------------------------*/
  869.     /* Code Body                                                      */
  870.     /*----------------------------------------------------------------*/
  871.     current_single_line_input_box_theme = &wgui_inline_singleline_inputbox_focussed_theme;
  872.     inline_singleline_inputbox_input_callback = UI_dummy_function;
  873.     inline_singleline_inputbox_navigate_callback = UI_dummy_function;
  874. #ifdef __UCS2_ENCODING
  875.     gui_create_single_line_input_box_set_buffer(
  876.         &MMI_inline_singleline_inputbox,
  877.         MMI_singleline_inputbox_x,
  878.         MMI_singleline_inputbox_y,
  879.         MMI_singleline_inputbox_width,
  880.         MMI_singleline_inputbox_height,
  881.         buffer,
  882.         buffer_length * 2,
  883.         (text_length + 1) * 2,
  884.         edit_position);
  885. #endif /* __UCS2_ENCODING */ 
  886. #ifdef __ASCII
  887.     gui_create_single_line_input_box_set_buffer(
  888.         &MMI_inline_singleline_inputbox,
  889.         MMI_singleline_inputbox_x,
  890.         MMI_singleline_inputbox_y,
  891.         MMI_singleline_inputbox_width,
  892.         MMI_singleline_inputbox_height,
  893.         buffer,
  894.         buffer_length,
  895.         text_length + 1,
  896.         edit_position);
  897. #endif /* __ASCII */ 
  898.     current_single_line_input_box_theme = t;
  899. #if((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING))
  900.     wgui_inline_singleline_inputbox_frame_counter = 0;
  901. #endif 
  902. }
  903. /*****************************************************************************
  904.  * FUNCTION
  905.  *  show_inline_singleline_inputbox
  906.  * DESCRIPTION
  907.  *  
  908.  * PARAMETERS
  909.  *  void
  910.  * RETURNS
  911.  *  void
  912.  *****************************************************************************/
  913. void show_inline_singleline_inputbox(void)
  914. {
  915.     /*----------------------------------------------------------------*/
  916.     /* Local Variables                                                */
  917.     /*----------------------------------------------------------------*/
  918.     UI_single_line_input_box_theme *t = current_single_line_input_box_theme;
  919.     /*----------------------------------------------------------------*/
  920.     /* Code Body                                                      */
  921.     /*----------------------------------------------------------------*/
  922.     current_single_line_input_box_theme = &wgui_inline_singleline_inputbox_focussed_theme;
  923.     gui_set_single_line_input_box_current_theme(&MMI_inline_singleline_inputbox);
  924.     /* MTK Leo add, currency convertor & unit convertor input box, set font to medium font */
  925.     MMI_inline_singleline_inputbox.text_font = &MMI_medium_font;
  926.     /* MTK Leo end */
  927.     gui_show_single_line_input_box(&MMI_inline_singleline_inputbox);
  928.     gdi_layer_blt_previous(
  929.         MMI_inline_singleline_inputbox.x,
  930.         MMI_inline_singleline_inputbox.y,
  931.         MMI_inline_singleline_inputbox.x + MMI_inline_singleline_inputbox.width,
  932.         MMI_inline_singleline_inputbox.y + MMI_inline_singleline_inputbox.height);
  933.     current_single_line_input_box_theme = t;
  934. }
  935. #if((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING))
  936. /*****************************************************************************
  937.  * FUNCTION
  938.  *  wgui_inline_singleline_inputbox_end_frame
  939.  * DESCRIPTION
  940.  *  
  941.  * PARAMETERS
  942.  *  void
  943.  * RETURNS
  944.  *  void
  945.  *****************************************************************************/
  946. void wgui_inline_singleline_inputbox_end_frame(void)
  947. {
  948.     /*----------------------------------------------------------------*/
  949.     /* Local Variables                                                */
  950.     /*----------------------------------------------------------------*/
  951.     /*----------------------------------------------------------------*/
  952.     /* Code Body                                                      */
  953.     /*----------------------------------------------------------------*/
  954.     if (wgui_inline_singleline_inputbox_frame_counter >= 1)
  955.     {
  956.         gui_show_single_line_input_box(&MMI_inline_singleline_inputbox);
  957.         gdi_layer_blt_previous(
  958.             MMI_inline_singleline_inputbox.x,
  959.             MMI_inline_singleline_inputbox.y,
  960.             MMI_inline_singleline_inputbox.x + MMI_inline_singleline_inputbox.width,
  961.             MMI_inline_singleline_inputbox.y + MMI_inline_singleline_inputbox.height);
  962.         wgui_inline_singleline_inputbox_frame_counter = 0;
  963.         gui_start_timer(UI_FRAME_SKIP_TIMEOUT, wgui_inline_singleline_inputbox_end_frame);
  964.     }
  965. }
  966. #endif /* ((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING)) */ 
  967. /*****************************************************************************
  968.  * FUNCTION
  969.  *  redraw_inline_singleline_inputbox
  970.  * DESCRIPTION
  971.  *  
  972.  * PARAMETERS
  973.  *  void
  974.  * RETURNS
  975.  *  void
  976.  *****************************************************************************/
  977. void redraw_inline_singleline_inputbox(void)
  978. {
  979. #if((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING))
  980.     /*----------------------------------------------------------------*/
  981.     /* Local Variables                                                */
  982.     /*----------------------------------------------------------------*/
  983.     /*----------------------------------------------------------------*/
  984.     /* Code Body                                                      */
  985.     /*----------------------------------------------------------------*/
  986. #ifdef __MMI_POPUP_REACH_MAX_LENGTH_MSG__
  987.     if (GetExitScrnID() != POPUP_SCREENID)
  988.     {
  989. #endif /* __MMI_POPUP_REACH_MAX_LENGTH_MSG__ */ 
  990.         if (wgui_inline_singleline_inputbox_frame_counter > 0)
  991.         {
  992.             wgui_inline_singleline_inputbox_frame_counter++;
  993.         }
  994.         else
  995.         {
  996.             wgui_inline_singleline_inputbox_frame_counter = 1;
  997.             gui_start_timer(UI_FRAME_START_TIMEOUT, wgui_inline_singleline_inputbox_end_frame);
  998.         }
  999.     #ifdef __MMI_POPUP_REACH_MAX_LENGTH_MSG__
  1000.     }
  1001.     #endif 
  1002. #else /* ((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING)) */ 
  1003. #ifdef __MMI_POPUP_REACH_MAX_LENGTH_MSG__
  1004.     if (GetExitScrnID() != POPUP_SCREENID)
  1005.     {
  1006. #endif /* __MMI_POPUP_REACH_MAX_LENGTH_MSG__ */ 
  1007.         gui_show_single_line_input_box(&MMI_inline_singleline_inputbox);
  1008.     #ifdef __MMI_POPUP_REACH_MAX_LENGTH_MSG__
  1009.     }
  1010.     #endif 
  1011.     gdi_layer_blt_previous(
  1012.         MMI_inline_singleline_inputbox.x,
  1013.         MMI_inline_singleline_inputbox.y,
  1014.         MMI_inline_singleline_inputbox.x + MMI_inline_singleline_inputbox.width,
  1015.         MMI_inline_singleline_inputbox.y + MMI_inline_singleline_inputbox.height);
  1016. #endif /* ((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING)) */ 
  1017. }
  1018. /*****************************************************************************
  1019.  * FUNCTION
  1020.  *  clear_inline_singleline_inputbox_keys
  1021.  * DESCRIPTION
  1022.  *  
  1023.  * PARAMETERS
  1024.  *  void
  1025.  * RETURNS
  1026.  *  void
  1027.  *****************************************************************************/
  1028. void clear_inline_singleline_inputbox_keys(void)
  1029. {
  1030.     /*----------------------------------------------------------------*/
  1031.     /* Local Variables                                                */
  1032.     /*----------------------------------------------------------------*/
  1033.     /*----------------------------------------------------------------*/
  1034.     /* Code Body                                                      */
  1035.     /*----------------------------------------------------------------*/
  1036.     ClearInputEventHandler(MMI_DEVICE_KEY);
  1037.     clear_keyboard_key_handler();
  1038.     clear_multitap_key_handlers();
  1039.     clear_MMI_key_input_handler();
  1040.     clear_key_down_handler();
  1041.     clear_keyboard_input_handler();
  1042.     clear_inline_item_keys = UI_dummy_function;
  1043. }
  1044. void inline_edit_singleline_inputbox_multitap_input_no_draw(UI_character_type c);
  1045. void inline_edit_singleline_inputbox_multitap_input_complete_no_draw(void);
  1046. void inline_text_edit_handle_multitap_input_complete(S32 type);
  1047. /*****************************************************************************
  1048.  * FUNCTION
  1049.  *  reset_inline_singleline_inputbox
  1050.  * DESCRIPTION
  1051.  *  
  1052.  * PARAMETERS
  1053.  *  void
  1054.  * RETURNS
  1055.  *  void
  1056.  *****************************************************************************/
  1057. void reset_inline_singleline_inputbox(void)
  1058. {
  1059.     /*----------------------------------------------------------------*/
  1060.     /* Local Variables                                                */
  1061.     /*----------------------------------------------------------------*/
  1062.     /*----------------------------------------------------------------*/
  1063.     /* Code Body                                                      */
  1064.     /*----------------------------------------------------------------*/
  1065.     inline_text_edit_handle_multitap_input_complete(WGUI_INLINE_TEXT_EDIT_MULTITAP_ANY);
  1066.     set_multitap_functions(
  1067.         inline_edit_singleline_inputbox_multitap_input_no_draw,
  1068.         inline_edit_singleline_inputbox_multitap_input_complete_no_draw);
  1069. #if(UI_BLINKING_CURSOR_SUPPORT)
  1070.     //gui_cancel_timer(UI_inputbox_blink_cursor);
  1071.     //MTK Elvis
  1072.     StopMyTimer(BLINKING_CURSOR);
  1073.     /* MTK end */
  1074. #endif /* (UI_BLINKING_CURSOR_SUPPORT) */ 
  1075. #if((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING))
  1076.     gui_cancel_timer(wgui_inline_singleline_inputbox_end_frame);
  1077.     wgui_inline_singleline_inputbox_frame_counter = 0;
  1078. #endif /* ((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_INLINE_SINGLELINE_INPUTBOX_FRAME_SKIPPING)) */ 
  1079.     reset_multitaps();
  1080.     clear_inline_singleline_inputbox_keys();
  1081. }
  1082. /*****************************************************************************
  1083.  * FUNCTION
  1084.  *  inline_edit_singleline_inputbox_delete_character
  1085.  * DESCRIPTION
  1086.  *  
  1087.  * PARAMETERS
  1088.  *  void
  1089.  * RETURNS
  1090.  *  void
  1091.  *****************************************************************************/
  1092. void inline_edit_singleline_inputbox_delete_character(void)
  1093. {
  1094.     /*----------------------------------------------------------------*/
  1095.     /* Local Variables                                                */
  1096.     /*----------------------------------------------------------------*/
  1097.     /*----------------------------------------------------------------*/
  1098.     /* Code Body                                                      */
  1099.     /*----------------------------------------------------------------*/
  1100.     gui_single_line_input_box_delete_character(&MMI_inline_singleline_inputbox);
  1101.     wgui_inline_list_menu_changed = 1;
  1102.     redraw_inline_singleline_inputbox();
  1103.     inline_singleline_inputbox_input_callback();
  1104. }
  1105. /*****************************************************************************
  1106.  * FUNCTION
  1107.  *  inline_edit_singleline_inputbox_previous_character
  1108.  * DESCRIPTION
  1109.  *  
  1110.  * PARAMETERS
  1111.  *  void
  1112.  * RETURNS
  1113.  *  void
  1114.  *****************************************************************************/
  1115. void inline_edit_singleline_inputbox_previous_character(void)
  1116. {
  1117.     /*----------------------------------------------------------------*/
  1118.     /* Local Variables                                                */
  1119.     /*----------------------------------------------------------------*/
  1120.     /*----------------------------------------------------------------*/
  1121.     /* Code Body                                                      */
  1122.     /*----------------------------------------------------------------*/
  1123.     gui_single_line_input_box_previous(&MMI_inline_singleline_inputbox);
  1124.     redraw_inline_singleline_inputbox();
  1125.     inline_singleline_inputbox_navigate_callback();
  1126. }
  1127. /*****************************************************************************
  1128.  * FUNCTION
  1129.  *  inline_edit_singleline_inputbox_next_character
  1130.  * DESCRIPTION
  1131.  *  
  1132.  * PARAMETERS
  1133.  *  void
  1134.  * RETURNS
  1135.  *  void
  1136.  *****************************************************************************/
  1137. void inline_edit_singleline_inputbox_next_character(void)
  1138. {
  1139.     /*----------------------------------------------------------------*/
  1140.     /* Local Variables                                                */
  1141.     /*----------------------------------------------------------------*/
  1142.     /*----------------------------------------------------------------*/
  1143.     /* Code Body                                                      */
  1144.     /*----------------------------------------------------------------*/
  1145.     gui_single_line_input_box_next(&MMI_inline_singleline_inputbox);
  1146.     redraw_inline_singleline_inputbox();
  1147.     inline_singleline_inputbox_navigate_callback();
  1148. }
  1149. /*****************************************************************************
  1150.  * FUNCTION
  1151.  *  set_inline_edit_singleline_inputbox_mask
  1152.  * DESCRIPTION
  1153.  *  
  1154.  * PARAMETERS
  1155.  *  m       [IN]        
  1156.  * RETURNS
  1157.  *  void
  1158.  *****************************************************************************/
  1159. void set_inline_edit_singleline_inputbox_mask(U8 m)
  1160. {
  1161.     /*----------------------------------------------------------------*/
  1162.     /* Local Variables                                                */
  1163.     /*----------------------------------------------------------------*/
  1164.     /*----------------------------------------------------------------*/
  1165.     /* Code Body                                                      */
  1166.     /*----------------------------------------------------------------*/
  1167.     switch (m)
  1168.     {
  1169.         case 0:
  1170.             MMI_inline_singleline_inputbox.flags &= ~UI_SINGLE_LINE_INPUT_BOX_MASK_CHARACTERS;
  1171.             break;
  1172.         case 1:
  1173.             MMI_inline_singleline_inputbox.flags |= UI_SINGLE_LINE_INPUT_BOX_MASK_CHARACTERS;
  1174.             break;
  1175.     }
  1176. }
  1177. /*****************************************************************************
  1178.  * FUNCTION
  1179.  *  inline_edit_resize_singleline_inputbox
  1180.  * DESCRIPTION
  1181.  *  
  1182.  * PARAMETERS
  1183.  *  width       [IN]        
  1184.  *  height      [IN]        
  1185.  * RETURNS
  1186.  *  void
  1187.  *****************************************************************************/
  1188. void inline_edit_resize_singleline_inputbox(S32 width, S32 height)
  1189. {
  1190.     /*----------------------------------------------------------------*/
  1191.     /* Local Variables                                                */
  1192.     /*----------------------------------------------------------------*/
  1193.     /*----------------------------------------------------------------*/
  1194.     /* Code Body                                                      */
  1195.     /*----------------------------------------------------------------*/
  1196.     gui_resize_single_line_input_box(&MMI_inline_singleline_inputbox, width, height);
  1197. }
  1198. /*****************************************************************************
  1199.  * FUNCTION
  1200.  *  inline_edit_move_singleline_inputbox
  1201.  * DESCRIPTION
  1202.  *  
  1203.  * PARAMETERS
  1204.  *  x       [IN]        
  1205.  *  y       [IN]        
  1206.  * RETURNS
  1207.  *  void
  1208.  *****************************************************************************/
  1209. void inline_edit_move_singleline_inputbox(S32 x, S32 y)
  1210. {
  1211.     /*----------------------------------------------------------------*/
  1212.     /* Local Variables                                                */
  1213.     /*----------------------------------------------------------------*/
  1214.     /*----------------------------------------------------------------*/
  1215.     /* Code Body                                                      */
  1216.     /*----------------------------------------------------------------*/
  1217.     gui_move_single_line_input_box(&MMI_inline_singleline_inputbox, x, y);
  1218. }
  1219. /*****************************************************************************
  1220.  * FUNCTION
  1221.  *  inline_edit_register_singleline_inputbox_input_callback
  1222.  * DESCRIPTION
  1223.  *  
  1224.  * PARAMETERS
  1225.  *  f       [IN]        
  1226.  * RETURNS
  1227.  *  void
  1228.  *****************************************************************************/
  1229. void inline_edit_register_singleline_inputbox_input_callback(void (*f) (void))
  1230. {
  1231.     /*----------------------------------------------------------------*/
  1232.     /* Local Variables                                                */
  1233.     /*----------------------------------------------------------------*/
  1234.     /*----------------------------------------------------------------*/
  1235.     /* Code Body                                                      */
  1236.     /*----------------------------------------------------------------*/
  1237.     inline_singleline_inputbox_input_callback = f;
  1238. }
  1239. /*****************************************************************************
  1240.  * FUNCTION
  1241.  *  inline_edit_register_singleline_inputbox_navigate_callback
  1242.  * DESCRIPTION
  1243.  *  
  1244.  * PARAMETERS
  1245.  *  f       [IN]        
  1246.  * RETURNS
  1247.  *  void
  1248.  *****************************************************************************/
  1249. void inline_edit_register_singleline_inputbox_navigate_callback(void (*f) (void))
  1250. {
  1251.     /*----------------------------------------------------------------*/
  1252.     /* Local Variables                                                */
  1253.     /*----------------------------------------------------------------*/
  1254.     /*----------------------------------------------------------------*/
  1255.     /* Code Body                                                      */
  1256.     /*----------------------------------------------------------------*/
  1257.     inline_singleline_inputbox_navigate_callback = f;
  1258. }
  1259. /*****************************************************************************
  1260.  * FUNCTION
  1261.  *  inline_edit_singleline_inputbox_toggle_insert_mode
  1262.  * DESCRIPTION
  1263.  *  
  1264.  * PARAMETERS
  1265.  *  void
  1266.  * RETURNS
  1267.  *  void
  1268.  *****************************************************************************/
  1269. void inline_edit_singleline_inputbox_toggle_insert_mode(void)
  1270. {
  1271.     /*----------------------------------------------------------------*/
  1272.     /* Local Variables                                                */
  1273.     /*----------------------------------------------------------------*/
  1274.     /*----------------------------------------------------------------*/
  1275.     /* Code Body                                                      */
  1276.     /*----------------------------------------------------------------*/
  1277.     gui_single_line_input_box_toggle_insert_mode(&MMI_inline_singleline_inputbox);
  1278.     redraw_inline_singleline_inputbox();
  1279. }
  1280. /*****************************************************************************
  1281.  * FUNCTION
  1282.  *  inline_edit_singleline_inputbox_delete_all_characters
  1283.  * DESCRIPTION
  1284.  *  
  1285.  * PARAMETERS
  1286.  *  void
  1287.  * RETURNS
  1288.  *  void
  1289.  *****************************************************************************/
  1290. void inline_edit_singleline_inputbox_delete_all_characters(void)
  1291. {
  1292.     /*----------------------------------------------------------------*/
  1293.     /* Local Variables                                                */
  1294.     /*----------------------------------------------------------------*/
  1295.     /*----------------------------------------------------------------*/
  1296.     /* Code Body                                                      */
  1297.     /*----------------------------------------------------------------*/
  1298.     gui_single_line_input_box_delete_all(&MMI_inline_singleline_inputbox);
  1299.     wgui_inline_list_menu_changed = 1;
  1300.     redraw_inline_singleline_inputbox();
  1301.     inline_singleline_inputbox_input_callback();
  1302. }
  1303. /*****************************************************************************
  1304.  * FUNCTION
  1305.  *  inline_edit_singleline_inputbox_delete_current_character
  1306.  * DESCRIPTION
  1307.  *  
  1308.  * PARAMETERS
  1309.  *  void
  1310.  * RETURNS
  1311.  *  void
  1312.  *****************************************************************************/
  1313. void inline_edit_singleline_inputbox_delete_current_character(void)
  1314. {
  1315.     /*----------------------------------------------------------------*/
  1316.     /* Local Variables                                                */
  1317.     /*----------------------------------------------------------------*/
  1318.     /*----------------------------------------------------------------*/
  1319.     /* Code Body                                                      */
  1320.     /*----------------------------------------------------------------*/
  1321.     gui_single_line_input_box_delete_current_character(&MMI_inline_singleline_inputbox);
  1322.     wgui_inline_list_menu_changed = 1;
  1323.     redraw_inline_singleline_inputbox();
  1324.     inline_singleline_inputbox_input_callback();
  1325. }
  1326. /*****************************************************************************
  1327.  * FUNCTION
  1328.  *  inline_edit_singleline_inputbox_multitap_input
  1329.  * DESCRIPTION
  1330.  *  
  1331.  * PARAMETERS
  1332.  *  c       [IN]        
  1333.  * RETURNS
  1334.  *  void
  1335.  *****************************************************************************/
  1336. void inline_edit_singleline_inputbox_multitap_input(UI_character_type c)
  1337. {
  1338.     /*----------------------------------------------------------------*/
  1339.     /* Local Variables                                                */
  1340.     /*----------------------------------------------------------------*/
  1341.     single_line_input_box *b = &MMI_inline_singleline_inputbox;
  1342.     U32 flag = 0;
  1343.     /*----------------------------------------------------------------*/
  1344.     /* Code Body                                                      */
  1345.     /*----------------------------------------------------------------*/
  1346.     if( (c == '+') && (b->text[0] != '+') && b->current_text_p == b->text && ((b->last_position_p - b->text) >= (b->available_length)) )
  1347.     {
  1348.         b->available_length =
  1349.         (wgui_inline_singleline_inputbox_buffer_size + 1) * ENCODING_LENGTH;
  1350.         flag = 1;
  1351.     }    
  1352.     gui_single_line_input_box_insert_multitap_character(&MMI_inline_singleline_inputbox, c);
  1353.     if(flag)
  1354.     {
  1355.         switch (wgui_inline_text_edit_active_multitap)
  1356.         {
  1357.             case WGUI_INLINE_TEXT_EDIT_MULTITAP_STAR:
  1358.                 if (MMI_inline_singleline_inputbox.flags & UI_SINGLE_LINE_INPUT_BOX_STATE_MULTITAP)
  1359.                 {
  1360.                     gui_cancel_timer(inline_edit_phone_number_input_complete_multitap_star_key);
  1361.                     gui_multitap_input_complete(&wgui_inline_text_edit_multitap_star_key);
  1362.                 }
  1363.                 break;
  1364.             case WGUI_INLINE_TEXT_EDIT_MULTITAP_ZERO:
  1365.  
  1366.                 if (MMI_inline_singleline_inputbox.flags & UI_SINGLE_LINE_INPUT_BOX_STATE_MULTITAP)
  1367.                 {
  1368.                     gui_cancel_timer(inline_edit_phone_number_input_complete_multitap_zero_key);
  1369.                     gui_multitap_input_complete(&wgui_inline_text_edit_multitap_zero_key);
  1370.                 }
  1371.                 break;
  1372.         }
  1373.     }
  1374.     
  1375.     wgui_inline_list_menu_changed = 1;
  1376.     redraw_inline_singleline_inputbox();
  1377.     inline_singleline_inputbox_input_callback();
  1378. }
  1379. /*****************************************************************************
  1380.  * FUNCTION
  1381.  *  inline_edit_singleline_inputbox_multitap_input_complete
  1382.  * DESCRIPTION
  1383.  *  
  1384.  * PARAMETERS
  1385.  *  void
  1386.  * RETURNS
  1387.  *  void
  1388.  *****************************************************************************/
  1389. void inline_edit_singleline_inputbox_multitap_input_complete(void)
  1390. {
  1391.     /*----------------------------------------------------------------*/
  1392.     /* Local Variables                                                */
  1393.     /*----------------------------------------------------------------*/
  1394.     /*----------------------------------------------------------------*/
  1395.     /* Code Body                                                      */
  1396.     /*----------------------------------------------------------------*/
  1397.     gui_single_line_input_box_confirm_multitap_character(&MMI_inline_singleline_inputbox);
  1398.     wgui_inline_list_menu_changed = 1;
  1399.     redraw_inline_singleline_inputbox();
  1400.     inline_singleline_inputbox_input_callback();
  1401. }
  1402. /*****************************************************************************
  1403.  * FUNCTION
  1404.  *  inline_edit_singleline_inputbox_multitap_input_no_draw
  1405.  * DESCRIPTION
  1406.  *  
  1407.  * PARAMETERS
  1408.  *  c       [IN]        
  1409.  * RETURNS
  1410.  *  void
  1411.  *****************************************************************************/
  1412. void inline_edit_singleline_inputbox_multitap_input_no_draw(UI_character_type c)
  1413. {
  1414.     /*----------------------------------------------------------------*/
  1415.     /* Local Variables                                                */
  1416.     /*----------------------------------------------------------------*/
  1417.     /*----------------------------------------------------------------*/
  1418.     /* Code Body                                                      */
  1419.     /*----------------------------------------------------------------*/
  1420.     gui_single_line_input_box_insert_multitap_character(&MMI_inline_singleline_inputbox, c);
  1421.     wgui_inline_list_menu_changed = 1;
  1422.     inline_singleline_inputbox_input_callback();
  1423. }
  1424. /*****************************************************************************
  1425.  * FUNCTION
  1426.  *  inline_edit_singleline_inputbox_multitap_input_complete_no_draw
  1427.  * DESCRIPTION
  1428.  *  
  1429.  * PARAMETERS
  1430.  *  void
  1431.  * RETURNS
  1432.  *  void
  1433.  *****************************************************************************/
  1434. void inline_edit_singleline_inputbox_multitap_input_complete_no_draw(void)
  1435. {
  1436.     /*----------------------------------------------------------------*/
  1437.     /* Local Variables                                                */
  1438.     /*----------------------------------------------------------------*/
  1439.     /*----------------------------------------------------------------*/
  1440.     /* Code Body                                                      */
  1441.     /*----------------------------------------------------------------*/
  1442.     gui_single_line_input_box_confirm_multitap_character(&MMI_inline_singleline_inputbox);
  1443.     wgui_inline_list_menu_changed = 1;
  1444.     inline_singleline_inputbox_input_callback();
  1445. }
  1446. /*****************************************************************************
  1447.  * FUNCTION
  1448.  *  inline_edit_singleline_inputbox_direct_input
  1449.  * DESCRIPTION
  1450.  *  
  1451.  * PARAMETERS
  1452.  *  c       [IN]        
  1453.  * RETURNS
  1454.  *  void
  1455.  *****************************************************************************/
  1456. void inline_edit_singleline_inputbox_direct_input(UI_character_type c)
  1457. {
  1458.     /*----------------------------------------------------------------*/
  1459.     /* Local Variables                                                */
  1460.     /*----------------------------------------------------------------*/
  1461.     single_line_input_box *b = &MMI_inline_singleline_inputbox;
  1462.     /*----------------------------------------------------------------*/
  1463.     /* Code Body                                                      */
  1464.     /*----------------------------------------------------------------*/
  1465.     if( (c == '+') && (b->text[0] != '+') && b->current_text_p == b->text && ((b->last_position_p - b->text) >= (b->available_length)) )
  1466.     {
  1467.         b->available_length =
  1468.         (wgui_inline_singleline_inputbox_buffer_size + 1) * ENCODING_LENGTH;
  1469.     }  
  1470.     gui_single_line_input_box_insert_character(&MMI_inline_singleline_inputbox, c);
  1471.     wgui_inline_list_menu_changed = 1;
  1472.     redraw_inline_singleline_inputbox();
  1473.     inline_singleline_inputbox_input_callback();
  1474. }
  1475. /*****************************************************************************
  1476.  * FUNCTION
  1477.  *  inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler
  1478.  * DESCRIPTION
  1479.  *  
  1480.  * PARAMETERS
  1481.  *  keyc        [IN]        
  1482.  * RETURNS
  1483.  *  void
  1484.  *****************************************************************************/
  1485. void inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler(S32 keyc)
  1486. {
  1487.     /*----------------------------------------------------------------*/
  1488.     /* Local Variables                                                */
  1489.     /*----------------------------------------------------------------*/
  1490.     /*----------------------------------------------------------------*/
  1491.     /* Code Body                                                      */
  1492.     /*----------------------------------------------------------------*/
  1493.     if (keyc > 0x1f)
  1494.     {
  1495.         inline_edit_singleline_inputbox_direct_input((U8) keyc);
  1496.     }
  1497.     else if (keyc == 0x08)
  1498.     {
  1499.         inline_edit_singleline_inputbox_delete_character();
  1500.     }
  1501.     else if (keyc == 0x1b)
  1502.     {
  1503.         inline_edit_singleline_inputbox_delete_all_characters();
  1504.     }
  1505.     else if (keyc == 0x0d);
  1506. }
  1507. /*****************************************************************************
  1508.  * FUNCTION
  1509.  *  inline_edit_singleline_inputbox_numeric_keyboard_input_handler
  1510.  * DESCRIPTION
  1511.  *  
  1512.  * PARAMETERS
  1513.  *  keyc        [IN]        
  1514.  * RETURNS
  1515.  *  void
  1516.  *****************************************************************************/
  1517. void inline_edit_singleline_inputbox_numeric_keyboard_input_handler(S32 keyc)
  1518. {
  1519.     /*----------------------------------------------------------------*/
  1520.     /* Local Variables                                                */
  1521.     /*----------------------------------------------------------------*/
  1522.     /*----------------------------------------------------------------*/
  1523.     /* Code Body                                                      */
  1524.     /*----------------------------------------------------------------*/
  1525.     if (keyc >= '0' && keyc <= '9')
  1526.     {
  1527.         inline_edit_singleline_inputbox_direct_input((U8) keyc);
  1528.     }
  1529.     else if (keyc == 0x08)
  1530.     {
  1531.         inline_edit_singleline_inputbox_delete_character();
  1532.     }
  1533.     else if (keyc == 0x1b)
  1534.     {
  1535.         inline_edit_singleline_inputbox_delete_all_characters();
  1536.     }
  1537. }
  1538. /*****************************************************************************
  1539.  * FUNCTION
  1540.  *  inline_edit_singleline_inputbox_handle_key_down
  1541.  * DESCRIPTION
  1542.  *  
  1543.  * PARAMETERS
  1544.  *  k       [IN]        
  1545.  * RETURNS
  1546.  *  void
  1547.  *****************************************************************************/
  1548. void inline_edit_singleline_inputbox_handle_key_down(MMI_key_code_type k)
  1549. {
  1550.     /*----------------------------------------------------------------*/
  1551.     /* Local Variables                                                */
  1552.     /*----------------------------------------------------------------*/
  1553.     /*----------------------------------------------------------------*/
  1554.     /* Code Body                                                      */
  1555.     /*----------------------------------------------------------------*/
  1556.     wgui_inline_list_menu_changed = 1;
  1557.     inline_edit_singleline_inputbox_direct_input((UI_character_type) ('0' + k));
  1558. }
  1559. /*****************************************************************************
  1560.  * FUNCTION
  1561.  *  inline_edit_change_singleline_inputbox_mode
  1562.  * DESCRIPTION
  1563.  *  
  1564.  * PARAMETERS
  1565.  *  mode        [IN]        
  1566.  * RETURNS
  1567.  *  void
  1568.  *****************************************************************************/
  1569. void inline_edit_change_singleline_inputbox_mode(U8 mode)
  1570. {
  1571.     /*----------------------------------------------------------------*/
  1572.     /* Local Variables                                                */
  1573.     /*----------------------------------------------------------------*/
  1574.     /*----------------------------------------------------------------*/
  1575.     /* Code Body                                                      */
  1576.     /*----------------------------------------------------------------*/
  1577.     switch (mode)
  1578.     {
  1579.         case INPUT_MODE_MULTITAP_UPPERCASE_ABC:
  1580.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_ABC);
  1581.             register_multitap_no_draw_key_handlers();
  1582.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1583.             set_multitap_functions(
  1584.                 inline_edit_singleline_inputbox_multitap_input,
  1585.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1586.             break;
  1587.         case INPUT_MODE_MULTITAP_LOWERCASE_ABC:
  1588.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_ABC);
  1589.             register_multitap_no_draw_key_handlers();
  1590.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1591.             set_multitap_functions(
  1592.                 inline_edit_singleline_inputbox_multitap_input,
  1593.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1594.             break;
  1595.         case INPUT_MODE_123:
  1596.             change_multitap_mode(INPUT_MODE_123);
  1597.             clear_multitap_key_handlers();
  1598.             register_MMI_key_input_handler();
  1599.             register_key_down_handler(inline_edit_singleline_inputbox_handle_key_down);
  1600.             register_keyboard_input_handler(inline_edit_singleline_inputbox_numeric_keyboard_input_handler);
  1601.             break;
  1602.             /* PMT dara added for Multitap thai */
  1603.     #if defined (__MMI_MULTITAP_THAI__)
  1604.         case INPUT_MODE_MULTITAP_THAI:
  1605.             change_multitap_mode(INPUT_MODE_MULTITAP_THAI);
  1606.             //W05.36 Fix Vietnamese Tone Input Issue
  1607.             //change_inputbox_type_multitapthai(SINGLELINE_INPUTBOX);
  1608.             register_multitap_no_draw_key_handlers();
  1609.             register_MMI_key_input_extend_handler();    /* msz065_20050418 */
  1610.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1611.             set_multitap_functions(
  1612.                 inline_edit_singleline_inputbox_multitap_input,
  1613.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1614.             break;
  1615.     #endif /* defined (__MMI_MULTITAP_THAI__) */ 
  1616.             /* MTK Terry for Spanish French German Italian Russian Turkish Portuguese Indonesian Malay Vietnamese */
  1617.     #if defined(__MMI_MULTITAP_SPANISH__)
  1618.         case INPUT_MODE_MULTITAP_UPPERCASE_SPANISH:
  1619.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_SPANISH);
  1620.             register_multitap_no_draw_key_handlers();
  1621.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1622.             set_multitap_functions(
  1623.                 inline_edit_singleline_inputbox_multitap_input,
  1624.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1625.             break;
  1626.         case INPUT_MODE_MULTITAP_LOWERCASE_SPANISH:
  1627.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_SPANISH);
  1628.             register_multitap_no_draw_key_handlers();
  1629.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1630.             set_multitap_functions(
  1631.                 inline_edit_singleline_inputbox_multitap_input,
  1632.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1633.             break;
  1634.     #endif /* defined(__MMI_MULTITAP_SPANISH__) */ 
  1635.             /* PMT VIKASG START 20050729 */
  1636.     #if defined(__MMI_MULTITAP_DANISH__)
  1637.         case INPUT_MODE_MULTITAP_UPPERCASE_DANISH:
  1638.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_DANISH);
  1639.             register_multitap_no_draw_key_handlers();
  1640.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1641.             set_multitap_functions(
  1642.                 inline_edit_singleline_inputbox_multitap_input,
  1643.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1644.             break;
  1645.         case INPUT_MODE_MULTITAP_LOWERCASE_DANISH:
  1646.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_DANISH);
  1647.             register_multitap_no_draw_key_handlers();
  1648.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1649.             set_multitap_functions(
  1650.                 inline_edit_singleline_inputbox_multitap_input,
  1651.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1652.             break;
  1653.     #endif /* defined(__MMI_MULTITAP_DANISH__) */ 
  1654.             //PMT VIKASG END 20050729
  1655.             //PMT CZ_PO_TU START 20050812 
  1656.     #if defined(__MMI_MULTITAP_POLISH__)
  1657.         case INPUT_MODE_MULTITAP_UPPERCASE_POLISH:
  1658.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_POLISH);
  1659.             register_multitap_no_draw_key_handlers();
  1660.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1661.             set_multitap_functions(
  1662.                 inline_edit_singleline_inputbox_multitap_input,
  1663.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1664.             break;
  1665.         case INPUT_MODE_MULTITAP_LOWERCASE_POLISH:
  1666.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_POLISH);
  1667.             register_multitap_no_draw_key_handlers();
  1668.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1669.             set_multitap_functions(
  1670.                 inline_edit_singleline_inputbox_multitap_input,
  1671.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1672.             break;
  1673.     #endif /* defined(__MMI_MULTITAP_POLISH__) */ 
  1674.             /* PMT CZ_PO_TU END 20050812 */
  1675.     #if defined(__MMI_MULTITAP_FRENCH__)
  1676.         case INPUT_MODE_MULTITAP_UPPERCASE_FRENCH:
  1677.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_FRENCH);
  1678.             register_multitap_no_draw_key_handlers();
  1679.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1680.             set_multitap_functions(
  1681.                 inline_edit_singleline_inputbox_multitap_input,
  1682.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1683.             break;
  1684.         case INPUT_MODE_MULTITAP_LOWERCASE_FRENCH:
  1685.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_FRENCH);
  1686.             register_multitap_no_draw_key_handlers();
  1687.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1688.             set_multitap_functions(
  1689.                 inline_edit_singleline_inputbox_multitap_input,
  1690.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1691.             break;
  1692.     #endif /* defined(__MMI_MULTITAP_FRENCH__) */ 
  1693.     #if defined(__MMI_MULTITAP_GERMAN__)
  1694.         case INPUT_MODE_MULTITAP_UPPERCASE_GERMAN:
  1695.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_GERMAN);
  1696.             register_multitap_no_draw_key_handlers();
  1697.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1698.             set_multitap_functions(
  1699.                 inline_edit_singleline_inputbox_multitap_input,
  1700.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1701.             break;
  1702.         case INPUT_MODE_MULTITAP_LOWERCASE_GERMAN:
  1703.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_GERMAN);
  1704.             register_multitap_no_draw_key_handlers();
  1705.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1706.             set_multitap_functions(
  1707.                 inline_edit_singleline_inputbox_multitap_input,
  1708.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1709.             break;
  1710.     #endif /* defined(__MMI_MULTITAP_GERMAN__) */ 
  1711.     #if defined(__MMI_MULTITAP_ITALIAN__)
  1712.         case INPUT_MODE_MULTITAP_UPPERCASE_ITALIAN:
  1713.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_ITALIAN);
  1714.             register_multitap_no_draw_key_handlers();
  1715.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1716.             set_multitap_functions(
  1717.                 inline_edit_singleline_inputbox_multitap_input,
  1718.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1719.             break;
  1720.         case INPUT_MODE_MULTITAP_LOWERCASE_ITALIAN:
  1721.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_ITALIAN);
  1722.             register_multitap_no_draw_key_handlers();
  1723.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1724.             set_multitap_functions(
  1725.                 inline_edit_singleline_inputbox_multitap_input,
  1726.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1727.             break;
  1728.     #endif /* defined(__MMI_MULTITAP_ITALIAN__) */ 
  1729.     #if defined(__MMI_MULTITAP_RUSSIAN__)
  1730.         case INPUT_MODE_MULTITAP_UPPERCASE_RUSSIAN:
  1731.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_RUSSIAN);
  1732.             register_multitap_no_draw_key_handlers();
  1733.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1734.             set_multitap_functions(
  1735.                 inline_edit_singleline_inputbox_multitap_input,
  1736.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1737.             break;
  1738.         case INPUT_MODE_MULTITAP_LOWERCASE_RUSSIAN:
  1739.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_RUSSIAN);
  1740.             register_multitap_no_draw_key_handlers();
  1741.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1742.             set_multitap_functions(
  1743.                 inline_edit_singleline_inputbox_multitap_input,
  1744.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1745.             break;
  1746.     #endif /* defined(__MMI_MULTITAP_RUSSIAN__) */ 
  1747.             /* PMT BULGARIAN START 20051201 */
  1748.     #if defined(__MMI_MULTITAP_BULGARIAN__)
  1749.         case INPUT_MODE_MULTITAP_UPPERCASE_BULGARIAN:
  1750.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_BULGARIAN);
  1751.             register_multitap_no_draw_key_handlers();
  1752.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1753.             set_multitap_functions(
  1754.                 inline_edit_singleline_inputbox_multitap_input,
  1755.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1756.             break;
  1757.         case INPUT_MODE_MULTITAP_LOWERCASE_BULGARIAN:
  1758.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_BULGARIAN);
  1759.             register_multitap_no_draw_key_handlers();
  1760.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1761.             set_multitap_functions(
  1762.                 inline_edit_singleline_inputbox_multitap_input,
  1763.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1764.             break;
  1765.     #endif /* defined(__MMI_MULTITAP_BULGARIAN__) */ 
  1766.             /* PMT BULGARIAN END 20051201 */
  1767.     #if defined(__MMI_MULTITAP_TURKISH__)
  1768.         case INPUT_MODE_MULTITAP_UPPERCASE_TURKISH:
  1769.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_TURKISH);
  1770.             register_multitap_no_draw_key_handlers();
  1771.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1772.             set_multitap_functions(
  1773.                 inline_edit_singleline_inputbox_multitap_input,
  1774.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1775.             break;
  1776.         case INPUT_MODE_MULTITAP_LOWERCASE_TURKISH:
  1777.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_TURKISH);
  1778.             register_multitap_no_draw_key_handlers();
  1779.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1780.             set_multitap_functions(
  1781.                 inline_edit_singleline_inputbox_multitap_input,
  1782.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1783.             break;
  1784.     #endif /* defined(__MMI_MULTITAP_TURKISH__) */ 
  1785.     #if defined(__MMI_MULTITAP_PORTUGUESE__)
  1786.         case INPUT_MODE_MULTITAP_UPPERCASE_PORTUGUESE:
  1787.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_PORTUGUESE);
  1788.             register_multitap_no_draw_key_handlers();
  1789.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1790.             set_multitap_functions(
  1791.                 inline_edit_singleline_inputbox_multitap_input,
  1792.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1793.             break;
  1794.         case INPUT_MODE_MULTITAP_LOWERCASE_PORTUGUESE:
  1795.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_PORTUGUESE);
  1796.             register_multitap_no_draw_key_handlers();
  1797.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1798.             set_multitap_functions(
  1799.                 inline_edit_singleline_inputbox_multitap_input,
  1800.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1801.             break;
  1802.     #endif /* defined(__MMI_MULTITAP_PORTUGUESE__) */ 
  1803.     #if defined(__MMI_MULTITAP_INDONESIAN__)
  1804.         case INPUT_MODE_MULTITAP_UPPERCASE_INDONESIAN:
  1805.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_INDONESIAN);
  1806.             register_multitap_no_draw_key_handlers();
  1807.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1808.             set_multitap_functions(
  1809.                 inline_edit_singleline_inputbox_multitap_input,
  1810.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1811.             break;
  1812.         case INPUT_MODE_MULTITAP_LOWERCASE_INDONESIAN:
  1813.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_INDONESIAN);
  1814.             register_multitap_no_draw_key_handlers();
  1815.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1816.             set_multitap_functions(
  1817.                 inline_edit_singleline_inputbox_multitap_input,
  1818.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1819.             break;
  1820.     #endif /* defined(__MMI_MULTITAP_INDONESIAN__) */ 
  1821.             /* PMT CZ_PO_TU START 20050812 */
  1822.     #if defined(__MMI_MULTITAP_CZECH__)
  1823.         case INPUT_MODE_MULTITAP_UPPERCASE_CZECH:
  1824.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_CZECH);
  1825.             register_multitap_no_draw_key_handlers();
  1826.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1827.             set_multitap_functions(
  1828.                 inline_edit_singleline_inputbox_multitap_input,
  1829.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1830.             break;
  1831.         case INPUT_MODE_MULTITAP_LOWERCASE_CZECH:
  1832.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_CZECH);
  1833.             register_multitap_no_draw_key_handlers();
  1834.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1835.             set_multitap_functions(
  1836.                 inline_edit_singleline_inputbox_multitap_input,
  1837.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1838.             break;
  1839.     #endif /* defined(__MMI_MULTITAP_CZECH__) */ 
  1840.             /* PMT CZ_PO_TU END 20050812 */
  1841.     #if defined(__MMI_MULTITAP_MALAY__)
  1842.         case INPUT_MODE_MULTITAP_UPPERCASE_MALAY:
  1843.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_MALAY);
  1844.             register_multitap_no_draw_key_handlers();
  1845.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1846.             set_multitap_functions(
  1847.                 inline_edit_singleline_inputbox_multitap_input,
  1848.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1849.             break;
  1850.         case INPUT_MODE_MULTITAP_LOWERCASE_MALAY:
  1851.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_MALAY);
  1852.             register_multitap_no_draw_key_handlers();
  1853.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1854.             set_multitap_functions(
  1855.                 inline_edit_singleline_inputbox_multitap_input,
  1856.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1857.             break;
  1858.     #endif /* defined(__MMI_MULTITAP_MALAY__) */ 
  1859.     #if defined(__MMI_MULTITAP_VIETNAMESE__)
  1860.         case INPUT_MODE_MULTITAP_UPPERCASE_VIETNAMESE:
  1861.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_VIETNAMESE);
  1862.             register_multitap_no_draw_key_handlers();
  1863.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1864.             set_multitap_functions(
  1865.                 inline_edit_singleline_inputbox_multitap_input,
  1866.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1867.             break;
  1868.         case INPUT_MODE_MULTITAP_LOWERCASE_VIETNAMESE:
  1869.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_VIETNAMESE);
  1870.             register_multitap_no_draw_key_handlers();
  1871.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1872.             set_multitap_functions(
  1873.                 inline_edit_singleline_inputbox_multitap_input,
  1874.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1875.             break;
  1876.     #endif /* defined(__MMI_MULTITAP_VIETNAMESE__) */ 
  1877.             /* PMT START HU_FI 20050825 */
  1878.     #if defined(__MMI_MULTITAP_FINNISH__)
  1879.         case INPUT_MODE_MULTITAP_UPPERCASE_FINNISH:
  1880.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_FINNISH);
  1881.             register_multitap_no_draw_key_handlers();
  1882.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1883.             set_multitap_functions(
  1884.                 inline_edit_singleline_inputbox_multitap_input,
  1885.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1886.             break;
  1887.         case INPUT_MODE_MULTITAP_LOWERCASE_FINNISH:
  1888.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_FINNISH);
  1889.             register_multitap_no_draw_key_handlers();
  1890.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1891.             set_multitap_functions(
  1892.                 inline_edit_singleline_inputbox_multitap_input,
  1893.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1894.             break;
  1895.     #endif /* defined(__MMI_MULTITAP_FINNISH__) */ 
  1896.     #if defined(__MMI_MULTITAP_HUNGARIAN__)
  1897.         case INPUT_MODE_MULTITAP_UPPERCASE_HUNGARIAN:
  1898.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_HUNGARIAN);
  1899.             register_multitap_no_draw_key_handlers();
  1900.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1901.             set_multitap_functions(
  1902.                 inline_edit_singleline_inputbox_multitap_input,
  1903.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1904.             break;
  1905.         case INPUT_MODE_MULTITAP_LOWERCASE_HUNGARIAN:
  1906.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_HUNGARIAN);
  1907.             register_multitap_no_draw_key_handlers();
  1908.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1909.             set_multitap_functions(
  1910.                 inline_edit_singleline_inputbox_multitap_input,
  1911.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1912.             break;
  1913.     #endif /* defined(__MMI_MULTITAP_HUNGARIAN__) */ 
  1914.             /* PMT END HU_FI 20050825 */
  1915.             /* MTK end */
  1916.             /* PMT START GR_HE_CZ_FI_DA_HU 20051007 */
  1917.     #if defined(__MMI_MULTITAP_HEBREW__)
  1918.         case INPUT_MODE_MULTITAP_HEBREW:
  1919.             change_multitap_mode(INPUT_MODE_MULTITAP_HEBREW);
  1920.             register_multitap_no_draw_key_handlers();
  1921.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1922.             set_multitap_functions(
  1923.                 inline_edit_singleline_inputbox_multitap_input,
  1924.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1925.             break;
  1926.     #endif /* defined(__MMI_MULTITAP_HEBREW__) */ 
  1927.             //PMT END GR_HE_CZ_FI_DA_HU 20051007
  1928.             //PMT NO_AR_SL_DU START 20050909
  1929.     #if defined(__MMI_MULTITAP_SLOVAK__)
  1930.         case INPUT_MODE_MULTITAP_UPPERCASE_SLOVAK:
  1931.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_SLOVAK);
  1932.             register_multitap_no_draw_key_handlers();
  1933.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1934.             set_multitap_functions(
  1935.                 inline_edit_singleline_inputbox_multitap_input,
  1936.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1937.             break;
  1938.         case INPUT_MODE_MULTITAP_LOWERCASE_SLOVAK:
  1939.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_SLOVAK);
  1940.             register_multitap_no_draw_key_handlers();
  1941.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1942.             set_multitap_functions(
  1943.                 inline_edit_singleline_inputbox_multitap_input,
  1944.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1945.             break;
  1946.     #endif /* defined(__MMI_MULTITAP_SLOVAK__) */ 
  1947.     #if defined(__MMI_MULTITAP_DUTCH__)
  1948.         case INPUT_MODE_MULTITAP_UPPERCASE_DUTCH:
  1949.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_DUTCH);
  1950.             register_multitap_no_draw_key_handlers();
  1951.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1952.             set_multitap_functions(
  1953.                 inline_edit_singleline_inputbox_multitap_input,
  1954.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1955.             break;
  1956.         case INPUT_MODE_MULTITAP_LOWERCASE_DUTCH:
  1957.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_DUTCH);
  1958.             register_multitap_no_draw_key_handlers();
  1959.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1960.             set_multitap_functions(
  1961.                 inline_edit_singleline_inputbox_multitap_input,
  1962.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1963.             break;
  1964.     #endif /* defined(__MMI_MULTITAP_DUTCH__) */ 
  1965.     #if defined(__MMI_MULTITAP_ARABIC__)
  1966.         case INPUT_MODE_MULTITAP_ARABIC:
  1967.             change_multitap_mode(INPUT_MODE_MULTITAP_ARABIC);
  1968.             register_multitap_no_draw_key_handlers();
  1969.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1970.             set_multitap_functions(
  1971.                 inline_edit_singleline_inputbox_multitap_input,
  1972.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1973.             break;
  1974.     #endif /* defined(__MMI_MULTITAP_ARABIC__) */ 
  1975.             /* Norwegian start */
  1976.     #if defined(__MMI_MULTITAP_NORWEGIAN__)
  1977.         case INPUT_MODE_MULTITAP_UPPERCASE_NORWEGIAN:
  1978.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_NORWEGIAN);
  1979.             register_multitap_no_draw_key_handlers();
  1980.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1981.             set_multitap_functions(
  1982.                 inline_edit_singleline_inputbox_multitap_input,
  1983.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1984.             break;
  1985.         case INPUT_MODE_MULTITAP_LOWERCASE_NORWEGIAN:
  1986.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_NORWEGIAN);
  1987.             register_multitap_no_draw_key_handlers();
  1988.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  1989.             set_multitap_functions(
  1990.                 inline_edit_singleline_inputbox_multitap_input,
  1991.                 inline_edit_singleline_inputbox_multitap_input_complete);
  1992.             break;
  1993.     #endif /* defined(__MMI_MULTITAP_NORWEGIAN__) */ 
  1994.             //Norwegian end
  1995.             //PMT NO_AR_SL_DU END 20050909
  1996.             //PMT START SWEDISH 20050916
  1997.     #if defined(__MMI_MULTITAP_SWEDISH__)
  1998.         case INPUT_MODE_MULTITAP_UPPERCASE_SWEDISH:
  1999.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_SWEDISH);
  2000.             register_multitap_no_draw_key_handlers();
  2001.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  2002.             set_multitap_functions(
  2003.                 inline_edit_singleline_inputbox_multitap_input,
  2004.                 inline_edit_singleline_inputbox_multitap_input_complete);
  2005.             break;
  2006.         case INPUT_MODE_MULTITAP_LOWERCASE_SWEDISH:
  2007.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_SWEDISH);
  2008.             register_multitap_no_draw_key_handlers();
  2009.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  2010.             set_multitap_functions(
  2011.                 inline_edit_singleline_inputbox_multitap_input,
  2012.                 inline_edit_singleline_inputbox_multitap_input_complete);
  2013.             break;
  2014.     #endif /* defined(__MMI_MULTITAP_SWEDISH__) */ 
  2015.             //PMT END SWEDISH 20050916
  2016.             //PMT START CR_ROM_SLO 20050923
  2017.     #if defined(__MMI_MULTITAP_CROATIAN__)
  2018.         case INPUT_MODE_MULTITAP_UPPERCASE_CROATIAN:
  2019.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_CROATIAN);
  2020.             register_multitap_no_draw_key_handlers();
  2021.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  2022.             set_multitap_functions(
  2023.                 inline_edit_singleline_inputbox_multitap_input,
  2024.                 inline_edit_singleline_inputbox_multitap_input_complete);
  2025.             break;
  2026.         case INPUT_MODE_MULTITAP_LOWERCASE_CROATIAN:
  2027.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_CROATIAN);
  2028.             register_multitap_no_draw_key_handlers();
  2029.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  2030.             set_multitap_functions(
  2031.                 inline_edit_singleline_inputbox_multitap_input,
  2032.                 inline_edit_singleline_inputbox_multitap_input_complete);
  2033.             break;
  2034.     #endif /* defined(__MMI_MULTITAP_CROATIAN__) */ 
  2035.     #if defined(__MMI_MULTITAP_ROMANIAN__)
  2036.         case INPUT_MODE_MULTITAP_UPPERCASE_ROMANIAN:
  2037.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_ROMANIAN);
  2038.             register_multitap_no_draw_key_handlers();
  2039.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  2040.             set_multitap_functions(
  2041.                 inline_edit_singleline_inputbox_multitap_input,
  2042.                 inline_edit_singleline_inputbox_multitap_input_complete);
  2043.             break;
  2044.         case INPUT_MODE_MULTITAP_LOWERCASE_ROMANIAN:
  2045.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_ROMANIAN);
  2046.             register_multitap_no_draw_key_handlers();
  2047.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  2048.             set_multitap_functions(
  2049.                 inline_edit_singleline_inputbox_multitap_input,
  2050.                 inline_edit_singleline_inputbox_multitap_input_complete);
  2051.             break;
  2052.     #endif /* defined(__MMI_MULTITAP_ROMANIAN__) */ 
  2053.     #if defined(__MMI_MULTITAP_SLOVENIAN__)
  2054.         case INPUT_MODE_MULTITAP_UPPERCASE_SLOVENIAN:
  2055.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_SLOVENIAN);
  2056.             register_multitap_no_draw_key_handlers();
  2057.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  2058.             set_multitap_functions(
  2059.                 inline_edit_singleline_inputbox_multitap_input,
  2060.                 inline_edit_singleline_inputbox_multitap_input_complete);
  2061.             break;
  2062.         case INPUT_MODE_MULTITAP_LOWERCASE_SLOVENIAN:
  2063.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_SLOVENIAN);
  2064.             register_multitap_no_draw_key_handlers();
  2065.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  2066.             set_multitap_functions(
  2067.                 inline_edit_singleline_inputbox_multitap_input,
  2068.                 inline_edit_singleline_inputbox_multitap_input_complete);
  2069.             break;
  2070.     #endif /* defined(__MMI_MULTITAP_SLOVENIAN__) */ 
  2071.             //PMT END CR_ROM_SLO 20050923
  2072.             //PMT START GR_HE_CZ_FI_DA_HU 20051007
  2073.     #if defined(__MMI_MULTITAP_GREEK__)
  2074.         case INPUT_MODE_MULTITAP_UPPERCASE_GREEK:
  2075.             change_multitap_mode(INPUT_MODE_MULTITAP_UPPERCASE_GREEK);
  2076.             register_multitap_no_draw_key_handlers();
  2077.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  2078.             set_multitap_functions(
  2079.                 inline_edit_singleline_inputbox_multitap_input,
  2080.                 inline_edit_singleline_inputbox_multitap_input_complete);
  2081.             break;
  2082.         case INPUT_MODE_MULTITAP_LOWERCASE_GREEK:
  2083.             change_multitap_mode(INPUT_MODE_MULTITAP_LOWERCASE_GREEK);
  2084.             register_multitap_no_draw_key_handlers();
  2085.             register_keyboard_input_handler(inline_edit_singleline_inputbox_alphabetic_keyboard_input_handler);
  2086.             set_multitap_functions(
  2087.                 inline_edit_singleline_inputbox_multitap_input,
  2088.                 inline_edit_singleline_inputbox_multitap_input_complete);
  2089.             break;
  2090.     #endif /* defined(__MMI_MULTITAP_GREEK__) */ 
  2091.             /* PMT END GR_HE_CZ_FI_DA_HU 20051007 */
  2092.     }
  2093. }
  2094. void clear_inline_singleline_inputbox_keys(void);
  2095. void handle_inline_text_edit_complete(void);
  2096. /*****************************************************************************
  2097.  * FUNCTION
  2098.  *  inline_text_edit_handle_up_arrow
  2099.  * DESCRIPTION
  2100.  *  
  2101.  * PARAMETERS
  2102.  *  void
  2103.  * RETURNS
  2104.  *  void
  2105.  *****************************************************************************/
  2106. void inline_text_edit_handle_up_arrow(void)
  2107. {
  2108.     /*----------------------------------------------------------------*/
  2109.     /* Local Variables                                                */
  2110.     /*----------------------------------------------------------------*/
  2111.     /*----------------------------------------------------------------*/
  2112.     /* Code Body                                                      */
  2113.     /*----------------------------------------------------------------*/
  2114.     if (MMI_fixed_list_menu.n_items != 1)
  2115.     {
  2116.         handle_inline_text_edit_complete();
  2117.         inline_fixed_list_goto_previous_item();
  2118.     }
  2119. }
  2120. /*****************************************************************************
  2121.  * FUNCTION
  2122.  *  inline_text_edit_handle_down_arrow
  2123.  * DESCRIPTION
  2124.  *  
  2125.  * PARAMETERS
  2126.  *  void
  2127.  * RETURNS
  2128.  *  void
  2129.  *****************************************************************************/
  2130. void inline_text_edit_handle_down_arrow(void)
  2131. {
  2132.     /*----------------------------------------------------------------*/
  2133.     /* Local Variables                                                */
  2134.     /*----------------------------------------------------------------*/
  2135.     /*----------------------------------------------------------------*/
  2136.     /* Code Body                                                      */
  2137.     /*----------------------------------------------------------------*/
  2138.     if (MMI_fixed_list_menu.n_items != 1)
  2139.     {
  2140.         handle_inline_text_edit_complete();
  2141.         inline_fixed_list_goto_next_item();
  2142.     }
  2143. }
  2144. /*****************************************************************************
  2145.  * FUNCTION
  2146.  *  inline_singleline_inputbox_key_handler
  2147.  * DESCRIPTION
  2148.  *  
  2149.  * PARAMETERS
  2150.  *  vkey_code       [IN]        
  2151.  *  key_state       [IN]        
  2152.  * RETURNS
  2153.  *  void
  2154.  *****************************************************************************/
  2155. void inline_singleline_inputbox_key_handler(S32 vkey_code, S32 key_state)
  2156. {
  2157. #if(MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32)
  2158.     /*----------------------------------------------------------------*/
  2159.     /* Local Variables                                                */
  2160.     /*----------------------------------------------------------------*/
  2161.     /*----------------------------------------------------------------*/
  2162.     /* Code Body                                                      */
  2163.     /*----------------------------------------------------------------*/
  2164.     if (key_state)
  2165.     {
  2166.         switch (vkey_code)
  2167.         {
  2168.             case 37:
  2169.                 inline_edit_singleline_inputbox_previous_character();
  2170.                 break;
  2171.             case 38:
  2172.                 inline_text_edit_handle_up_arrow();
  2173.                 break;
  2174.             case 39:
  2175.                 inline_edit_singleline_inputbox_next_character();
  2176.                 break;
  2177.             case 40:
  2178.                 inline_text_edit_handle_down_arrow();
  2179.                 break;
  2180.             case 45:
  2181.                 inline_edit_singleline_inputbox_toggle_insert_mode();
  2182.                 break;
  2183.             case 46:
  2184.                 inline_edit_singleline_inputbox_delete_current_character();
  2185.                 break;
  2186.         }
  2187.     }
  2188. #else /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */ 
  2189.     UI_UNUSED_PARAMETER(vkey_code);
  2190.     UI_UNUSED_PARAMETER(key_state);
  2191. #endif /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */ 
  2192. }
  2193. /*****************************************************************************
  2194.  * FUNCTION
  2195.  *  register_inline_singleline_inputbox_keys
  2196.  * DESCRIPTION
  2197.  *  
  2198.  * PARAMETERS
  2199.  *  void
  2200.  * RETURNS
  2201.  *  void
  2202.  *****************************************************************************/
  2203. void register_inline_singleline_inputbox_keys(void)
  2204. {
  2205.     /*----------------------------------------------------------------*/
  2206.     /* Local Variables                                                */
  2207.     /*----------------------------------------------------------------*/
  2208.     /*----------------------------------------------------------------*/
  2209.     /* Code Body                                                      */
  2210.     /*----------------------------------------------------------------*/
  2211.     SetKeyHandler(inline_edit_singleline_inputbox_previous_character, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  2212.     SetKeyHandler(inline_edit_singleline_inputbox_next_character, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  2213.     /* SetKeyHandler(inline_edit_singleline_inputbox_delete_character,KEY_CLEAR,KEY_EVENT_DOWN); */
  2214.     register_keyboard_key_handler(inline_singleline_inputbox_key_handler);
  2215. }
  2216. /*****************************************************************************
  2217.  * FUNCTION
  2218.  *  inline_singleline_inputbox_test_change_input_mode
  2219.  * DESCRIPTION
  2220.  *  
  2221.  * PARAMETERS
  2222.  *  void
  2223.  * RETURNS
  2224.  *  
  2225.  *****************************************************************************/
  2226. U8 inline_singleline_inputbox_test_change_input_mode(void)
  2227. {
  2228.     /*----------------------------------------------------------------*/
  2229.     /* Local Variables                                                */
  2230.     /*----------------------------------------------------------------*/
  2231.     /*----------------------------------------------------------------*/
  2232.     /* Code Body                                                      */
  2233.     /*----------------------------------------------------------------*/
  2234.     if (MMI_inline_singleline_inputbox.flags & UI_SINGLE_LINE_INPUT_BOX_USE_ENCODING_BASED_LENGTH)
  2235.     {
  2236.         if (MMI_inline_singleline_inputbox.UCS2_count <= 0)
  2237.         {
  2238.             if ((MMI_inline_singleline_inputbox.flags & UI_SINGLE_LINE_INPUT_BOX_ONE_LESS_CHARACTER) &&
  2239.                 (MMI_inline_singleline_inputbox.text_length >=
  2240.                  ((MMI_inline_singleline_inputbox.available_length >> 1) - 1)))
  2241.             {
  2242.                 return (0);
  2243.             }
  2244.             else if (MMI_inline_singleline_inputbox.text_length >=
  2245.                      (MMI_inline_singleline_inputbox.available_length >> 1))
  2246.             {
  2247.                 return (0);
  2248.             }
  2249.             else
  2250.             {
  2251.                 return (1);
  2252.             }
  2253.         }
  2254.         else
  2255.         {
  2256.             return (1);
  2257.         }
  2258.     }
  2259.     else
  2260.     {
  2261.         return (1);
  2262.     }
  2263. }
  2264. void wgui_hide_inline_input_method(void);
  2265. void wgui_display_inline_input_method(void);
  2266. /*****************************************************************************
  2267.  * FUNCTION
  2268.  *  handle_inline_text_edit_complete
  2269.  * DESCRIPTION
  2270.  *  
  2271.  * PARAMETERS
  2272.  *  void
  2273.  * RETURNS
  2274.  *  void
  2275.  *****************************************************************************/
  2276. void handle_inline_text_edit_complete(void)
  2277. {
  2278.     /*----------------------------------------------------------------*/
  2279.     /* Local Variables                                                */
  2280.     /*----------------------------------------------------------------*/
  2281.     S32 input_type = current_wgui_inline_text_edit_item->input_type & INPUT_TYPE_MASK;
  2282.     /*----------------------------------------------------------------*/
  2283.     /* Code Body                                                      */
  2284.     /*----------------------------------------------------------------*/
  2285.     reset_inline_singleline_inputbox();
  2286.     current_wgui_inline_text_edit_item->UCS2_count = MMI_inline_singleline_inputbox.UCS2_count;
  2287.     register_inline_fixed_list_keys();
  2288.     gui_strcpy(
  2289.         (UI_string_type) current_wgui_inline_text_edit_item->buffer,
  2290.         (UI_string_type) wgui_inline_text_edit_buffer);
  2291.     if ((input_type == INPUT_TYPE_NUMERIC_PASSWORD) || (input_type == INPUT_TYPE_ALPHANUMERIC_PASSWORD) ||
  2292.         (input_type == INPUT_TYPE_SAT_NUMERIC_PASSWORD))
  2293.     {
  2294.         inline_edit_prepare_mask_buffer(
  2295.             current_wgui_inline_text_edit_item->buffer,
  2296.             current_wgui_inline_text_edit_item->mask_buffer);
  2297.         *current_wgui_inline_text_edit_text_p = current_wgui_inline_text_edit_item->mask_buffer;
  2298.     }
  2299.     else
  2300.     {
  2301.         /* PMT  MANISH  START  20050722 */
  2302.     #ifdef __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__
  2303.         if ((IsInlineItemDefaultTextEnable()) &&
  2304.             (gui_strlen((UI_string_type) current_wgui_inline_text_edit_item->buffer) == 0))
  2305.         {
  2306.             *current_wgui_inline_text_edit_text_p = current_wgui_inline_text_edit_item->default_item_text;
  2307.         }
  2308.         else
  2309.     #endif /* __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__ */ 
  2310.             /* PMT  MANISH  END  20050722 */
  2311.             *current_wgui_inline_text_edit_text_p = current_wgui_inline_text_edit_item->buffer;
  2312.         /* PMT  MANISH  START  20050722 */
  2313.     #ifdef __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__
  2314.         MMI_fixed_icontext_menuitems[wgui_inline_item_highlighted_index].item_text =
  2315.             (UI_string_type) (*current_wgui_inline_text_edit_text_p);
  2316.     #endif /* __MMI_UI_INLINE_EDIT_DEFAULT_TEXT_EFFECT__ */ 
  2317.         /* PMT  MANISH  END  20050722 */
  2318.     }
  2319.     inline_text_edit_RSK_function = NULL;
  2320.     clear_left_softkey();
  2321.     clear_right_softkey();
  2322. #if defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__)
  2323.     mmi_pen_editor_close_input_box();
  2324. #endif 
  2325.     wgui_inline_item_handled = 0;
  2326.     current_wgui_inline_text_edit_item->edit_complete_callback(
  2327.                                             current_wgui_inline_text_edit_item->buffer,
  2328.                                             current_wgui_inline_text_edit_item->buffer_size);
  2329.     redraw_current_inline_item = UI_dummy_function;
  2330.     wgui_inputbox_UCS2_count_function = NULL;
  2331.     wgui_inputbox_not_empty_callback = NULL;
  2332.     wgui_inputbox_empty_callback = NULL;
  2333.     wgui_inputbox_validation_callback = NULL;
  2334.     complete_inline_item_edit = UI_dummy_function;
  2335.     test_change_input_mode = NULL;
  2336.     MMI_allow_only_english_input_modes = 0;
  2337.     /*
  2338.      * MTK Elvis Because we use  wgui_current_inline_item_type(wgui_get_inline_history)
  2339.      * * to check which inline data struct(inline text edit or full screen edit) history
  2340.      * * will be stored in history, we have to reset it while switching to other inline item.
  2341.      * * Otherwise, if other inline item(INLINE_ITEM_TYPE_FULL_SCREEN_EDIT) is not set wgui_current_inline_item_type, then
  2342.      * * wgui_current_inline_item_type keeps the old setting and causes not required input box history be stored in history
  2343.      * * One example:
  2344.      * * 1. In PHB email inline editing box wgui_current_inline_item_type= INLINE_ITEM_TYPE_TEXT_EDIT   and input_type is abc
  2345.      * * 2. goto previous one item(full screen edit while pressing LSK"Edit")
  2346.      * * 3. At this momnet, charger in and cuase the INLINE_ITEM_TYPE_TEXT_EDIT(input method is abc) stored in history
  2347.      * * 4. goto previous item(home number editing box)
  2348.      * * 5. the history is re-stored into current inline text editing box
  2349.      * * 6. the input method is abc, but 123
  2350.      */
  2351.     //W05.33 Fix inline text edit history issue
  2352.     //wgui_current_inline_item_type = 0;
  2353.     //MTK end
  2354.     //gui_cancel_timer(UI_inputbox_blink_cursor);
  2355.     //MTK Elvis
  2356.     StopMyTimer(BLINKING_CURSOR);
  2357.     /* MTK end */
  2358.     gui_cancel_timer(wgui_hide_inline_input_method);
  2359.     gui_cancel_timer(wgui_display_inline_input_method);
  2360.     /* MTK Terry for Firefly #189 */
  2361.     gui_cancel_timer(inline_edit_phone_number_input_complete_multitap_star_key);
  2362.     gui_cancel_timer(inline_edit_phone_number_input_complete_multitap_zero_key);
  2363.     /* MTK end */
  2364.     /* W05.36 Fix Vietnamese Tone Input Issue */
  2365.     set_current_input_box_type(EDITOR_NONE_INPUT_BOX);
  2366. #if defined(__MMI_TOUCH_SCREEN__)
  2367.     wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY);
  2368.     //W06.09 Draw Center Softkey when entering new screen
  2369.     //But in in-line editor, redrawing is needed when completing in-line item
  2370. #ifdef __MMI_WGUI_CSK_ENABLE__
  2371.     redraw_softkey(MMI_CENTER_SOFTKEY);
  2372. #endif 
  2373. #endif /* defined(__MMI_TOUCH_SCREEN__) */ 
  2374.     //MTK Leo add 0511, to reduce stack size
  2375.     // draw_title();
  2376.     //MTK Leo end
  2377. }
  2378. /*****************************************************************************
  2379.  * FUNCTION
  2380.  *  handle_inline_text_edit_cancel
  2381.  * DESCRIPTION
  2382.  *  
  2383.  * PARAMETERS
  2384.  *  void
  2385.  * RETURNS
  2386.  *  void
  2387.  *****************************************************************************/
  2388. void handle_inline_text_edit_cancel(void)
  2389. {
  2390.     /*----------------------------------------------------------------*/
  2391.     /* Local Variables                                                */
  2392.     /*----------------------------------------------------------------*/
  2393.     /*----------------------------------------------------------------*/
  2394.     /* Code Body                                                      */
  2395.     /*----------------------------------------------------------------*/
  2396.     reset_inline_singleline_inputbox();
  2397.     register_inline_fixed_list_keys();
  2398.     inline_text_edit_RSK_function = NULL;
  2399.     clear_left_softkey();
  2400.     clear_right_softkey();
  2401. #if defined(__MMI_TOUCH_SCREEN__) || defined(__MMI_HANDWRITING_PAD__)
  2402.     mmi_pen_editor_close_input_box();
  2403. #endif 
  2404.     wgui_inline_item_handled = 0;
  2405.     wgui_text_menuitem_restart_scrolling();
  2406.     show_fixed_list();
  2407.     inline_edit_current_highlight_handler(wgui_inline_item_highlighted_index);
  2408.     redraw_current_inline_item = UI_dummy_function;
  2409.     wgui_inputbox_UCS2_count_function = NULL;
  2410.     wgui_inputbox_not_empty_callback = NULL;
  2411.     wgui_inputbox_empty_callback = NULL;
  2412.     wgui_inputbox_validation_callback = NULL;
  2413.     complete_inline_item_edit = UI_dummy_function;
  2414.     test_change_input_mode = NULL;
  2415.     MMI_allow_only_english_input_modes = 0;
  2416.     //gui_cancel_timer(UI_inputbox_blink_cursor);
  2417.     //MTK Elvis
  2418.     StopMyTimer(BLINKING_CURSOR);
  2419.     /* MTK end */
  2420.     gui_cancel_timer(wgui_hide_inline_input_method);
  2421.     gui_cancel_timer(wgui_display_inline_input_method);
  2422.     /* W05.36 Fix Vietnamese Tone Input Issue */
  2423.     set_current_input_box_type(EDITOR_NONE_INPUT_BOX);
  2424. #if defined(__MMI_TOUCH_SCREEN__)
  2425.     wgui_setup_virtual_keyboard(GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY);
  2426.     //W06.09 Draw Center Softkey when entering new screen
  2427.     //But in in-line editor, redrawing is needed when completing in-line item
  2428. #ifdef __MMI_WGUI_CSK_ENABLE__
  2429.     redraw_softkey(MMI_CENTER_SOFTKEY);
  2430. #endif 
  2431. #endif /* defined(__MMI_TOUCH_SCREEN__) */ 
  2432.     //MTK Leo add 0511, to reduce stack size
  2433.     // draw_title();
  2434.     //MTK Leo end
  2435. }
  2436. /* Clear / Back RSK functionality handling for inline text edit   */
  2437. /*****************************************************************************
  2438.  * FUNCTION
  2439.  *  handle_inline_text_edit_right_softkey_down
  2440.  * DESCRIPTION
  2441.  *  
  2442.  * PARAMETERS
  2443.  *  void
  2444.  * RETURNS
  2445.  *  void
  2446.  *****************************************************************************/
  2447. void handle_inline_text_edit_right_softkey_down(void)
  2448. {
  2449.     /*----------------------------------------------------------------*/
  2450.     /* Local Variables                                                */
  2451.     /*----------------------------------------------------------------*/
  2452.     /*----------------------------------------------------------------*/
  2453.     /* Code Body                                                      */
  2454.     /*----------------------------------------------------------------*/
  2455.     if (wgui_inline_singleline_inputbox_decimal_input_mode_flag)
  2456.     {
  2457.         if (wgui_inline_singleline_inputbox_decimal_flag)
  2458.         {
  2459.             UI_buffer_type p = MMI_inline_singleline_inputbox.current_text_p;
  2460.             UI_character_type c;
  2461.             if (p != MMI_inline_singleline_inputbox.text)
  2462.             {
  2463.                 UI_STRING_GET_PREVIOUS_CHARACTER(p, c);
  2464.                 if (c == (UI_character_type) '.')
  2465.                 {
  2466.                     wgui_inline_singleline_inputbox_decimal_flag = 0;
  2467.                 }
  2468.             }
  2469.         }
  2470.         if (gui_single_line_input_box_get_text_length(&MMI_inline_singleline_inputbox) > 0)
  2471.         {
  2472.             inline_edit_singleline_inputbox_delete_character();
  2473.         }
  2474.     }
  2475.     else
  2476.     {
  2477.         if (gui_single_line_input_box_get_text_length(&MMI_inline_singleline_inputbox) > 0)
  2478.         {
  2479.             inline_edit_singleline_inputbox_delete_character();
  2480.         }
  2481.     }
  2482. }
  2483. /*****************************************************************************
  2484.  * FUNCTION
  2485.  *  handle_inline_text_edit_right_softkey_up
  2486.  * DESCRIPTION
  2487.  *  
  2488.  * PARAMETERS
  2489.  *  void
  2490.  * RETURNS
  2491.  *  void
  2492.  *****************************************************************************/
  2493. void handle_inline_text_edit_right_softkey_up(void)
  2494. {
  2495.     /*----------------------------------------------------------------*/
  2496.     /* Local Variables                                                */
  2497.     /*----------------------------------------------------------------*/
  2498.     /*----------------------------------------------------------------*/
  2499.     /* Code Body                                                      */
  2500.     /*----------------------------------------------------------------*/
  2501.     if (inline_text_edit_RSK_function != NULL)
  2502.     {
  2503.         inline_text_edit_RSK_function();
  2504.     }
  2505. }
  2506. /*****************************************************************************
  2507.  * FUNCTION
  2508.  *  register_inline_text_edit_handle_right_softkey_up
  2509.  * DESCRIPTION
  2510.  *  
  2511.  * PARAMETERS
  2512.  *  void
  2513.  * RETURNS
  2514.  *  void
  2515.  *****************************************************************************/
  2516. void register_inline_text_edit_handle_right_softkey_up(void)
  2517. {
  2518.     /*----------------------------------------------------------------*/
  2519.     /* Local Variables                                                */
  2520.     /*----------------------------------------------------------------*/
  2521.     /*----------------------------------------------------------------*/
  2522.     /* Code Body                                                      */
  2523.     /*----------------------------------------------------------------*/
  2524.     set_right_softkey_function(handle_inline_text_edit_right_softkey_up, KEY_EVENT_UP);
  2525. }
  2526. /*****************************************************************************
  2527.  * FUNCTION
  2528.  *  register_inline_text_edit_handle_clear_key_up
  2529.  * DESCRIPTION
  2530.  *  
  2531.  * PARAMETERS
  2532.  *  void
  2533.  * RETURNS
  2534.  *  void
  2535.  *****************************************************************************/
  2536. void register_inline_text_edit_handle_clear_key_up(void)
  2537. {
  2538.     /*----------------------------------------------------------------*/
  2539.     /* Local Variables                                                */
  2540.     /*----------------------------------------------------------------*/
  2541.     /*----------------------------------------------------------------*/
  2542.     /* Code Body                                                      */
  2543.     /*----------------------------------------------------------------*/
  2544.     SetKeyHandler(handle_inline_text_edit_right_softkey_up, KEY_CLEAR, KEY_EVENT_UP);
  2545. }
  2546. /*****************************************************************************
  2547.  * FUNCTION
  2548.  *  handle_inline_text_edit_right_softkey_long_press
  2549.  * DESCRIPTION
  2550.  *  
  2551.  * PARAMETERS
  2552.  *  void
  2553.  * RETURNS
  2554.  *  void
  2555.  *****************************************************************************/
  2556. void handle_inline_text_edit_right_softkey_long_press(void)
  2557. {
  2558.     /*----------------------------------------------------------------*/
  2559.     /* Local Variables                                                */
  2560.     /*----------------------------------------------------------------*/
  2561.     /*----------------------------------------------------------------*/
  2562.     /* Code Body                                                      */
  2563.     /*----------------------------------------------------------------*/
  2564.     inline_edit_singleline_inputbox_delete_all_characters();
  2565.     if (wgui_inline_singleline_inputbox_decimal_input_mode_flag)
  2566.     {
  2567.         wgui_inline_singleline_inputbox_decimal_flag = 0;
  2568.     }
  2569. }
  2570. /*****************************************************************************
  2571.  * FUNCTION
  2572.  *  handle_inline_text_edit_input
  2573.  * DESCRIPTION
  2574.  *  
  2575.  * PARAMETERS
  2576.  *  void
  2577.  * RETURNS
  2578.  *  void
  2579.  *****************************************************************************/
  2580. void handle_inline_text_edit_input(void)
  2581. {
  2582.     /*----------------------------------------------------------------*/
  2583.     /* Local Variables                                                */
  2584.     /*----------------------------------------------------------------*/
  2585.     /*----------------------------------------------------------------*/
  2586.     /* Code Body                                                      */
  2587.     /*----------------------------------------------------------------*/
  2588.     if (gui_single_line_input_box_get_text_length(&MMI_inline_singleline_inputbox) > 0)
  2589.     {
  2590.     #ifdef __MMI_WITH_C_KEY__
  2591.         /* MTK for RSK display with C Key */
  2592.         /* Need to consider wgui_inline_list_menu_disable_done */
  2593.         if (wgui_inline_list_menu_changed && !(wgui_inline_list_menu_disable_done))
  2594.         {
  2595.             set_right_softkey_label(NULL);
  2596.             set_right_softkey_icon(NULL);
  2597.             /* PMT VIKAS START 20050707 */
  2598.         #ifdef __MMI_UI_DALMATIAN_SOFTKEYS__
  2599.             /* To show proper key arrangement */
  2600.             show_softkey_background();
  2601.             redraw_left_softkey();
  2602.         #endif /* __MMI_UI_DALMATIAN_SOFTKEYS__ */ 
  2603.             /* PMT VIKAS END 20050707 */
  2604.             redraw_right_softkey();
  2605.         }
  2606.         if (inline_text_edit_RSK_label_clear == 0)
  2607.         {
  2608.             //reset_right_softkey();
  2609.             //set_right_softkey_label(NULL);
  2610.             //set_right_softkey_icon(NULL);
  2611.             //redraw_right_softkey();
  2612.             if (wgui_inputbox_not_empty_callback != NULL)
  2613.             {
  2614.                 wgui_inputbox_not_empty_callback();
  2615.             }
  2616.             inline_text_edit_RSK_label_clear = 1;
  2617.             SetKeyHandler(handle_inline_text_edit_right_softkey_down, KEY_CLEAR, KEY_EVENT_DOWN);
  2618.             SetKeyHandler(UI_dummy_function, KEY_CLEAR, KEY_EVENT_UP);
  2619.             SetKeyHandler(handle_inline_text_edit_right_softkey_long_press, KEY_CLEAR, KEY_EVENT_LONG_PRESS);
  2620.         }
  2621.     #else /* __MMI_WITH_C_KEY__ */ 
  2622.         if (inline_text_edit_RSK_label_clear == 0)
  2623.         {
  2624.             set_right_softkey_label((UI_string_type) get_string(WGUI_CATEGORY_CLEAR_STRING_ID));
  2625.             set_right_softkey_icon(NULL);
  2626.             if (wgui_inputbox_not_empty_callback != NULL)
  2627.             {
  2628.                 wgui_inputbox_not_empty_callback();
  2629.             }
  2630.             register_right_softkey_handler();
  2631.             redraw_right_softkey();
  2632.             inline_text_edit_RSK_label_clear = 1;
  2633.             set_right_softkey_function(UI_dummy_function, KEY_EVENT_UP);
  2634.             set_right_softkey_function(handle_inline_text_edit_right_softkey_down, KEY_EVENT_DOWN);
  2635.         }
  2636.     #endif /* __MMI_WITH_C_KEY__ */ 
  2637.     }
  2638.     else
  2639.     {
  2640.         if (inline_text_edit_RSK_label_clear == 1)
  2641.         {
  2642.             if (wgui_inline_list_menu_changed)
  2643.             {
  2644.                 wgui_inline_text_edit_set_RSK_BACK_function();
  2645.                 inline_text_edit_RSK_label_clear = 0;
  2646.                 if (wgui_inputbox_empty_callback != NULL)
  2647.                 {
  2648.                     wgui_inputbox_empty_callback();
  2649.                 }
  2650.             }
  2651.             else
  2652.             {
  2653.             #if defined(__MMI_WITH_C_KEY__)
  2654.                 /* MTK Terry butterfly_836 #420 */
  2655.                 if (wgui_inputbox_empty_callback != NULL)
  2656.                 {
  2657.                     wgui_inputbox_empty_callback();
  2658.                 }
  2659.                 inline_text_edit_RSK_label_clear = 0;
  2660.                 SetKeyHandler(UI_dummy_function, KEY_CLEAR, KEY_EVENT_DOWN);
  2661.                 SetKeyHandler(register_inline_text_edit_handle_clear_key_up, KEY_CLEAR, KEY_EVENT_UP);
  2662.                 SetKeyHandler(UI_dummy_function, KEY_CLEAR, KEY_EVENT_LONG_PRESS);
  2663.             #else /* defined(__MMI_WITH_C_KEY__) */ 
  2664.                 set_right_softkey_label(inline_text_edit_RSK_label_string);
  2665.                 set_right_softkey_icon(inline_text_edit_RSK_label_icon);
  2666.                 if (wgui_inputbox_empty_callback != NULL)
  2667.                 {
  2668.                     wgui_inputbox_empty_callback();
  2669.                 }
  2670.                 register_right_softkey_handler();
  2671.                 redraw_right_softkey();
  2672.                 inline_text_edit_RSK_label_clear = 0;
  2673.                 set_right_softkey_function(register_inline_text_edit_handle_right_softkey_up, KEY_EVENT_UP);
  2674.                 set_right_softkey_function(UI_dummy_function, KEY_EVENT_DOWN);
  2675.             #endif /* defined(__MMI_WITH_C_KEY__) */ 
  2676.             }
  2677.         }
  2678.     }
  2679. #if(0)
  2680. if (pixtel_UI_single_line_input_box_test_first_position(&MMI_inline_singleline_inputbox))
  2681. {
  2682. if (inline_text_edit_RSK_label_clear == 1)
  2683. {
  2684. if (wgui_inline_list_menu_changed)
  2685. {
  2686. wgui_inline_text_edit_set_RSK_BACK_function();
  2687. inline_text_edit_RSK_label_clear = 0;
  2688. }
  2689. else
  2690. {
  2691. set_right_softkey_label(inline_text_edit_RSK_label_string);
  2692. set_right_softkey_icon(inline_text_edit_RSK_label_icon);
  2693. register_right_softkey_handler();
  2694. redraw_right_softkey();
  2695. inline_text_edit_RSK_label_clear = 0;
  2696. set_right_softkey_function(register_inline_text_edit_handle_right_softkey_up, KEY_EVENT_UP);
  2697. set_right_softkey_function(UI_dummy_function, KEY_EVENT_DOWN);
  2698. }
  2699. }
  2700. }
  2701. #endif /* (0) */ 
  2702.     if (MMI_inline_singleline_inputbox.flags & UI_SINGLE_LINE_INPUT_BOX_PLUS_CHARACTER_HANDLING)
  2703.     {
  2704.         if (MMI_inline_singleline_inputbox.text[0] == '+')
  2705.         {
  2706.             MMI_inline_singleline_inputbox.available_length =
  2707.                 (wgui_inline_singleline_inputbox_buffer_size + 1) * ENCODING_LENGTH;
  2708.         }
  2709.         else
  2710.         {
  2711.             MMI_inline_singleline_inputbox.available_length =
  2712.                 wgui_inline_singleline_inputbox_buffer_size * ENCODING_LENGTH;
  2713.         }
  2714.     }
  2715. }
  2716. /*****************************************************************************
  2717.  * FUNCTION
  2718.  *  handle_inline_text_edit_navigate
  2719.  * DESCRIPTION
  2720.  *  
  2721.  * PARAMETERS
  2722.  *  void
  2723.  * RETURNS
  2724.  *  void
  2725.  *****************************************************************************/
  2726. void handle_inline_text_edit_navigate(void)
  2727. {
  2728.     /*----------------------------------------------------------------*/
  2729.     /* Local Variables                                                */
  2730.     /*----------------------------------------------------------------*/
  2731.     /*----------------------------------------------------------------*/
  2732.     /* Code Body                                                      */
  2733.     /*----------------------------------------------------------------*/
  2734.     if (gui_single_line_input_box_test_first_position(&MMI_inline_singleline_inputbox))
  2735.     {
  2736.         if (inline_text_edit_RSK_label_clear == 1)
  2737.         {
  2738.             if (wgui_inline_list_menu_changed)
  2739.             {
  2740.                 wgui_inline_text_edit_set_RSK_BACK_function();
  2741.                 inline_text_edit_RSK_label_clear = 0;
  2742.             }
  2743.             else
  2744.             {
  2745.                 set_right_softkey_label(inline_text_edit_RSK_label_string);
  2746.                 set_right_softkey_icon(inline_text_edit_RSK_label_icon);
  2747.                 register_right_softkey_handler();
  2748.                 redraw_right_softkey();
  2749.                 inline_text_edit_RSK_label_clear = 0;
  2750.                 set_right_softkey_function(handle_inline_text_edit_right_softkey_up, KEY_EVENT_UP);
  2751.                 set_right_softkey_function(UI_dummy_function, KEY_EVENT_DOWN);
  2752.             }
  2753.         }
  2754.     }
  2755.     else
  2756.     {
  2757.         if (inline_text_edit_RSK_label_clear == 0)
  2758.         {
  2759.             set_right_softkey_label((UI_string_type) get_string(WGUI_CATEGORY_CLEAR_STRING_ID));
  2760.             set_right_softkey_icon(NULL);
  2761.             register_right_softkey_handler();
  2762.             redraw_right_softkey();
  2763.             inline_text_edit_RSK_label_clear = 1;
  2764.             set_right_softkey_function(UI_dummy_function, KEY_EVENT_UP);
  2765.             set_right_softkey_function(handle_inline_text_edit_right_softkey_down, KEY_EVENT_DOWN);
  2766.         }
  2767.     }
  2768. }
  2769. /*****************************************************************************
  2770.  * FUNCTION
  2771.  *  inline_text_edit_handle_multitap_input_complete
  2772.  * DESCRIPTION
  2773.  *  
  2774.  * PARAMETERS
  2775.  *  type        [IN]        
  2776.  * RETURNS
  2777.  *  void
  2778.  *****************************************************************************/
  2779. void inline_text_edit_handle_multitap_input_complete(S32 type)
  2780. {
  2781.     /*----------------------------------------------------------------*/
  2782.     /* Local Variables                                                */
  2783.     /*----------------------------------------------------------------*/
  2784.     /*----------------------------------------------------------------*/
  2785.     /* Code Body                                                      */
  2786.     /*----------------------------------------------------------------*/
  2787.     if (wgui_inline_text_edit_active_multitap == WGUI_INLINE_TEXT_EDIT_MULTITAP_NONE)
  2788.     {
  2789.         return;
  2790.     }
  2791.     switch (wgui_inline_text_edit_active_multitap)
  2792.     {
  2793.         case WGUI_INLINE_TEXT_EDIT_MULTITAP_STAR:
  2794.             if (type == WGUI_INLINE_TEXT_EDIT_MULTITAP_STAR)
  2795.             {
  2796.                 return;
  2797.             }
  2798.             if (MMI_inline_singleline_inputbox.flags & UI_SINGLE_LINE_INPUT_BOX_STATE_MULTITAP)
  2799.             {
  2800.                 gui_cancel_timer(inline_edit_phone_number_input_complete_multitap_star_key);
  2801.                 gui_multitap_input_complete(&wgui_inline_text_edit_multitap_star_key);
  2802.             }
  2803.             break;
  2804.             /* MTK Elvis */
  2805.         case WGUI_INLINE_TEXT_EDIT_MULTITAP_ZERO:
  2806.             if (type == WGUI_INLINE_TEXT_EDIT_MULTITAP_ZERO)
  2807.             {
  2808.                 return;
  2809.             }
  2810.             if (MMI_inline_singleline_inputbox.flags & UI_SINGLE_LINE_INPUT_BOX_STATE_MULTITAP)
  2811.             {
  2812.                 gui_cancel_timer(inline_edit_phone_number_input_complete_multitap_zero_key);
  2813.                 gui_multitap_input_complete(&wgui_inline_text_edit_multitap_zero_key);
  2814.             }
  2815.             break;
  2816.             /* MTK Elvis */
  2817.     }
  2818.     wgui_inline_text_edit_active_multitap = WGUI_INLINE_TEXT_EDIT_MULTITAP_NONE;
  2819. }
  2820. /*****************************************************************************
  2821.  * FUNCTION
  2822.  *  inline_edit_phone_number_input_complete_multitap_star_key
  2823.  * DESCRIPTION
  2824.  *  
  2825.  * PARAMETERS
  2826.  *  void
  2827.  * RETURNS
  2828.  *  void
  2829.  *****************************************************************************/
  2830. void inline_edit_phone_number_input_complete_multitap_star_key(void)
  2831. {
  2832.     /*----------------------------------------------------------------*/
  2833.     /* Local Variables                                                */
  2834.     /*----------------------------------------------------------------*/
  2835.     /*----------------------------------------------------------------*/
  2836.     /* Code Body                                                      */
  2837.     /*----------------------------------------------------------------*/
  2838.     gui_multitap_input_complete(&wgui_inline_text_edit_multitap_star_key);
  2839. }
  2840. /*****************************************************************************
  2841.  * FUNCTION
  2842.  *  inline_edit_phone_number_input_handle_multitap_star_key_down
  2843.  * DESCRIPTION
  2844.  *  
  2845.  * PARAMETERS
  2846.  *  void
  2847.  * RETURNS
  2848.  *  void
  2849.  *****************************************************************************/
  2850. void inline_edit_phone_number_input_handle_multitap_star_key_down(void)
  2851. {
  2852.     /*----------------------------------------------------------------*/
  2853.     /* Local Variables                                                */
  2854.     /*----------------------------------------------------------------*/
  2855.     /*----------------------------------------------------------------*/
  2856.     /* Code Body                                                      */
  2857.     /*----------------------------------------------------------------*/
  2858.     inline_text_edit_handle_multitap_input_complete(WGUI_INLINE_TEXT_EDIT_MULTITAP_STAR);
  2859.     wgui_inline_text_edit_active_multitap = WGUI_INLINE_TEXT_EDIT_MULTITAP_STAR;
  2860.     gui_change_multitap_input_state(&wgui_inline_text_edit_multitap_star_key);
  2861. }
  2862. /*****************************************************************************
  2863.  * FUNCTION
  2864.  *  inline_edit_phone_number_input_handle_multitap_star_key_up
  2865.  * DESCRIPTION
  2866.  *  
  2867.  * PARAMETERS
  2868.  *  void
  2869.  * RETURNS
  2870.  *  void
  2871.  *****************************************************************************/
  2872. void inline_edit_phone_number_input_handle_multitap_star_key_up(void)
  2873. {
  2874.     /*----------------------------------------------------------------*/
  2875.     /* Local Variables                                                */
  2876.     /*----------------------------------------------------------------*/
  2877.     /*----------------------------------------------------------------*/
  2878.     /* Code Body                                                      */
  2879.     /*----------------------------------------------------------------*/
  2880.     gui_start_timer(MMI_MULTITAP_TIMEOUT, inline_edit_phone_number_input_complete_multitap_star_key);
  2881. }
  2882. /* MTK Elvis */
  2883. extern void MMI_key_0_down(void);
  2884. extern void MMI_key_0_up(void);
  2885. /*****************************************************************************
  2886.  * FUNCTION
  2887.  *  inline_edit_phone_number_input_complete_multitap_zero_key
  2888.  * DESCRIPTION
  2889.  *  
  2890.  * PARAMETERS
  2891.  *  void
  2892.  * RETURNS
  2893.  *  void
  2894.  *****************************************************************************/
  2895. void inline_edit_phone_number_input_complete_multitap_zero_key(void)
  2896. {
  2897.     /*----------------------------------------------------------------*/
  2898.     /* Local Variables                                                */
  2899.     /*----------------------------------------------------------------*/
  2900.     /*----------------------------------------------------------------*/
  2901.     /* Code Body                                                      */
  2902.     /*----------------------------------------------------------------*/
  2903.     gui_multitap_input_complete(&wgui_inline_text_edit_multitap_zero_key);
  2904.     SetKeyHandler(MMI_key_0_down, KEY_0, KEY_EVENT_DOWN);
  2905.     SetKeyHandler(MMI_key_0_down, KEY_0, KEY_REPEAT);
  2906.     SetKeyHandler(MMI_key_0_up, KEY_0, KEY_EVENT_UP);
  2907. }
  2908. /*****************************************************************************
  2909.  * FUNCTION
  2910.  *  inline_edit_phone_number_input_handle_multitap_zero_key_down
  2911.  * DESCRIPTION
  2912.  *  
  2913.  * PARAMETERS
  2914.  *  void
  2915.  * RETURNS
  2916.  *  void
  2917.  *****************************************************************************/
  2918. void inline_edit_phone_number_input_handle_multitap_zero_key_down(void)
  2919. {
  2920.     /*----------------------------------------------------------------*/
  2921.     /* Local Variables                                                */
  2922.     /*----------------------------------------------------------------*/
  2923.     /*----------------------------------------------------------------*/
  2924.     /* Code Body                                                      */
  2925.     /*----------------------------------------------------------------*/
  2926.     inline_text_edit_handle_multitap_input_complete(WGUI_INLINE_TEXT_EDIT_MULTITAP_ZERO);
  2927.     wgui_inline_text_edit_active_multitap = WGUI_INLINE_TEXT_EDIT_MULTITAP_ZERO;
  2928.     gui_change_multitap_input_state(&wgui_inline_text_edit_multitap_zero_key);
  2929. }
  2930. /*****************************************************************************
  2931.  * FUNCTION
  2932.  *  inline_edit_phone_number_input_handle_multitap_zero_key_up
  2933.  * DESCRIPTION
  2934.  *  
  2935.  * PARAMETERS
  2936.  *  void
  2937.  * RETURNS
  2938.  *  void
  2939.  *****************************************************************************/
  2940. void inline_edit_phone_number_input_handle_multitap_zero_key_up(void)
  2941. {
  2942.     /*----------------------------------------------------------------*/
  2943.     /* Local Variables                                                */
  2944.     /*----------------------------------------------------------------*/
  2945.     /*----------------------------------------------------------------*/
  2946.     /* Code Body                                                      */
  2947.     /*----------------------------------------------------------------*/
  2948.     gui_start_timer(MMI_MULTITAP_TIMEOUT + 400, inline_edit_phone_number_input_complete_multitap_zero_key);
  2949. }
  2950. /*****************************************************************************
  2951.  * FUNCTION
  2952.  *  inline_edit_phone_number_input_handle_zero_key_long_press
  2953.  * DESCRIPTION
  2954.  *  
  2955.  * PARAMETERS
  2956.  *  void
  2957.  * RETURNS
  2958.  *  void
  2959.  *****************************************************************************/
  2960. void inline_edit_phone_number_input_handle_zero_key_long_press(void)
  2961. {
  2962.     /*----------------------------------------------------------------*/
  2963.     /* Local Variables                                                */
  2964.     /*----------------------------------------------------------------*/
  2965.     /*----------------------------------------------------------------*/
  2966.     /* Code Body                                                      */
  2967.     /*----------------------------------------------------------------*/
  2968.     SetKeyHandler(UI_dummy_function, KEY_0, KEY_REPEAT);
  2969.     inline_edit_singleline_inputbox_delete_character();
  2970.     inline_edit_phone_number_input_handle_multitap_zero_key_down();
  2971.     SetKeyHandler(inline_edit_phone_number_input_handle_multitap_zero_key_down, KEY_0, KEY_EVENT_DOWN);
  2972.     SetKeyHandler(inline_edit_phone_number_input_handle_multitap_zero_key_up, KEY_0, KEY_EVENT_UP);
  2973. }
  2974. /* MTK end */
  2975. /*****************************************************************************
  2976.  * FUNCTION
  2977.  *  inline_edit_phone_number_input_handle_hash_key_down
  2978.  * DESCRIPTION
  2979.  *  
  2980.  * PARAMETERS
  2981.  *  void
  2982.  * RETURNS
  2983.  *  void
  2984.  *****************************************************************************/
  2985. void inline_edit_phone_number_input_handle_hash_key_down(void)
  2986. {
  2987.     /*----------------------------------------------------------------*/
  2988.     /* Local Variables                                                */
  2989.     /*----------------------------------------------------------------*/
  2990.     /*----------------------------------------------------------------*/
  2991.     /* Code Body                                                      */
  2992.     /*----------------------------------------------------------------*/
  2993.     inline_text_edit_handle_multitap_input_complete(WGUI_INLINE_TEXT_EDIT_MULTITAP_ANY);
  2994.     inline_edit_singleline_inputbox_direct_input((UI_character_type) '#');
  2995. }
  2996. /* MTK Elvis */
  2997. /*****************************************************************************
  2998.  * FUNCTION
  2999.  *  inline_edit_phone_number_input_handle_star_key_down
  3000.  * DESCRIPTION
  3001.  *  
  3002.  * PARAMETERS
  3003.  *  void
  3004.  * RETURNS
  3005.  *  void
  3006.  *****************************************************************************/
  3007. void inline_edit_phone_number_input_handle_star_key_down(void)
  3008. {
  3009.     /*----------------------------------------------------------------*/
  3010.     /* Local Variables                                                */
  3011.     /*----------------------------------------------------------------*/
  3012.     /*----------------------------------------------------------------*/
  3013.     /* Code Body                                                      */
  3014.     /*----------------------------------------------------------------*/
  3015.     inline_text_edit_handle_multitap_input_complete(WGUI_INLINE_TEXT_EDIT_MULTITAP_ANY);
  3016.     inline_edit_singleline_inputbox_direct_input((UI_character_type) '*');
  3017. }
  3018. /* MTK end */