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

MTK

开发平台:

C/C++

  1.     /* Code Body                                                      */
  2.     /*----------------------------------------------------------------*/
  3.     if (r == EMS_OK)
  4.     {
  5.         return (EMS_get_object_size(EMS_TYPE_PIC, &object));
  6.     }
  7.     return (0);
  8. }
  9. /*****************************************************************************
  10.  * FUNCTION
  11.  *  EMS_get_predefined_picture_data_size
  12.  * DESCRIPTION
  13.  *  
  14.  * PARAMETERS
  15.  *  data        [?]     
  16.  * RETURNS
  17.  *  
  18.  *****************************************************************************/
  19. S32 EMS_get_predefined_picture_data_size(U8 *data)
  20. {
  21.     /*----------------------------------------------------------------*/
  22.     /* Local Variables                                                */
  23.     /*----------------------------------------------------------------*/
  24.     EMSObjData object;
  25.     EMSTATUS r = EMS_load_object(EMS_PREDEFINED_PICTURE, data, -1, &object);
  26.     /*----------------------------------------------------------------*/
  27.     /* Code Body                                                      */
  28.     /*----------------------------------------------------------------*/
  29.     if (r == EMS_OK)
  30.     {
  31.         return (EMS_get_object_size(EMS_TYPE_PIC, &object));
  32.     }
  33.     return (0);
  34. }
  35. /*****************************************************************************
  36.  * FUNCTION
  37.  *  EMS_check_predefined_picture_data_size
  38.  * DESCRIPTION
  39.  *  
  40.  * PARAMETERS
  41.  *  data        [?]     
  42.  *  allowed     [?]     
  43.  * RETURNS
  44.  *  
  45.  *****************************************************************************/
  46. S32 EMS_check_predefined_picture_data_size(U8 *data, U8 *allowed)
  47. {
  48.     /*----------------------------------------------------------------*/
  49.     /* Local Variables                                                */
  50.     /*----------------------------------------------------------------*/
  51.     EMSObjData object;
  52.     EMSTATUS r = EMS_load_object(EMS_PREDEFINED_PICTURE, data, -1, &object);
  53.     /*----------------------------------------------------------------*/
  54.     /* Code Body                                                      */
  55.     /*----------------------------------------------------------------*/
  56.     if (r == EMS_OK)
  57.     {
  58.         return (EMS_check_object_size(EMS_TYPE_PIC, &object, allowed));
  59.     }
  60.     return (0);
  61. }
  62. /*****************************************************************************
  63.  * FUNCTION
  64.  *  EMS_get_userdefined_picture_size
  65.  * DESCRIPTION
  66.  *  
  67.  * PARAMETERS
  68.  *  data        [?]     
  69.  * RETURNS
  70.  *  
  71.  *****************************************************************************/
  72. S32 EMS_get_userdefined_picture_size(U8 *data)
  73. {
  74.     /*----------------------------------------------------------------*/
  75.     /* Local Variables                                                */
  76.     /*----------------------------------------------------------------*/
  77.     EMSObjData object;
  78.     EMSTATUS r = EMS_load_object(EMS_USERDEFINED_PICTURE, data, 0, &object);
  79.     /*----------------------------------------------------------------*/
  80.     /* Code Body                                                      */
  81.     /*----------------------------------------------------------------*/
  82.     if (r == EMS_OK)
  83.     {
  84.         return (EMS_get_object_size(EMS_TYPE_PIC, &object));
  85.     }
  86.     return (0);
  87. }
  88. /*****************************************************************************
  89.  * FUNCTION
  90.  *  EMS_check_userdefined_picture_size
  91.  * DESCRIPTION
  92.  *  
  93.  * PARAMETERS
  94.  *  data        [?]     
  95.  *  allowed     [?]     
  96.  * RETURNS
  97.  *  
  98.  *****************************************************************************/
  99. S32 EMS_check_userdefined_picture_size(U8 *data, U8 *allowed)
  100. {
  101.     /*----------------------------------------------------------------*/
  102.     /* Local Variables                                                */
  103.     /*----------------------------------------------------------------*/
  104.     EMSObjData object;
  105.     EMSTATUS r = EMS_load_object(EMS_USERDEFINED_PICTURE, data, 0, &object);
  106.     /*----------------------------------------------------------------*/
  107.     /* Code Body                                                      */
  108.     /*----------------------------------------------------------------*/
  109.     if (r == EMS_OK)
  110.     {
  111.         return (EMS_check_object_size(EMS_TYPE_PIC, &object, allowed));
  112.     }
  113.     return (0);
  114. }
  115. /*****************************************************************************
  116.  * FUNCTION
  117.  *  EMS_inputbox_insert_userdefined_picture
  118.  * DESCRIPTION
  119.  *  
  120.  * PARAMETERS
  121.  *  data        [?]     
  122.  * RETURNS
  123.  *  
  124.  *****************************************************************************/
  125. EMSTATUS EMS_inputbox_insert_userdefined_picture(U8 *data)
  126. {
  127.     /*----------------------------------------------------------------*/
  128.     /* Local Variables                                                */
  129.     /*----------------------------------------------------------------*/
  130.     EMSObjData object;
  131.     EMSTATUS r = EMS_load_object(EMS_USERDEFINED_PICTURE, data, 0, &object);
  132.     /*----------------------------------------------------------------*/
  133.     /* Code Body                                                      */
  134.     /*----------------------------------------------------------------*/
  135.     if (r == EMS_OK)
  136.     {
  137.         r = gui_EMS_inputbox_add_object(&MMI_EMS_inputbox, EMS_TYPE_PIC, &object, 0);
  138.     }
  139.     return (r);
  140. }
  141. /*****************************************************************************
  142.  * FUNCTION
  143.  *  EMS_get_predefined_animation_size
  144.  * DESCRIPTION
  145.  *  
  146.  * PARAMETERS
  147.  *  index       [IN]        
  148.  * RETURNS
  149.  *  
  150.  *****************************************************************************/
  151. S32 EMS_get_predefined_animation_size(S32 index)
  152. {
  153.     /*----------------------------------------------------------------*/
  154.     /* Local Variables                                                */
  155.     /*----------------------------------------------------------------*/
  156.     EMSObjData object;
  157.     /*----------------------------------------------------------------*/
  158.     /* Code Body                                                      */
  159.     /*----------------------------------------------------------------*/
  160.     if ((index < 0) || (index >= MAX_EMS_PREDEFINED_ANIMATIONS))
  161.     {
  162.         return (0);
  163.     }
  164.     return (EMS_get_object_size(EMS_TYPE_PREDEF_ANM, &object));
  165. }
  166. /*****************************************************************************
  167.  * FUNCTION
  168.  *  EMS_inputbox_insert_predefined_animation
  169.  * DESCRIPTION
  170.  *  
  171.  * PARAMETERS
  172.  *  index       [IN]        
  173.  * RETURNS
  174.  *  
  175.  *****************************************************************************/
  176. EMSTATUS EMS_inputbox_insert_predefined_animation(S32 index)
  177. {
  178.     /*----------------------------------------------------------------*/
  179.     /* Local Variables                                                */
  180.     /*----------------------------------------------------------------*/
  181.     /*----------------------------------------------------------------*/
  182.     /* Code Body                                                      */
  183.     /*----------------------------------------------------------------*/
  184.     if ((index < 0) || (index >= MAX_EMS_PREDEFINED_ANIMATIONS))
  185.     {
  186.         return (EMS_INVALID_OBJECT);
  187.     }
  188.     return (gui_EMS_inputbox_add_object(&MMI_EMS_inputbox, EMS_TYPE_PREDEF_ANM, NULL, (U8) index));
  189. }
  190. /*****************************************************************************
  191.  * FUNCTION
  192.  *  EMS_get_userdefined_animation_size
  193.  * DESCRIPTION
  194.  *  
  195.  * PARAMETERS
  196.  *  data        [?]     
  197.  * RETURNS
  198.  *  
  199.  *****************************************************************************/
  200. S32 EMS_get_userdefined_animation_size(U8 *data)
  201. {
  202.     /*----------------------------------------------------------------*/
  203.     /* Local Variables                                                */
  204.     /*----------------------------------------------------------------*/
  205.     EMSObjData object;
  206.     EMSTATUS r = EMS_load_object(EMS_USERDEFINED_ANIMATION, data, 0, &object);
  207.     /*----------------------------------------------------------------*/
  208.     /* Code Body                                                      */
  209.     /*----------------------------------------------------------------*/
  210.     if (r == EMS_OK)
  211.     {
  212.         return (EMS_get_object_size(EMS_TYPE_USERDEF_ANM, &object));
  213.     }
  214.     return (0);
  215. }
  216. /*****************************************************************************
  217.  * FUNCTION
  218.  *  EMS_check_userdefined_animation_size
  219.  * DESCRIPTION
  220.  *  
  221.  * PARAMETERS
  222.  *  data        [?]     
  223.  *  allowed     [?]     
  224.  * RETURNS
  225.  *  
  226.  *****************************************************************************/
  227. S32 EMS_check_userdefined_animation_size(U8 *data, U8 *allowed)
  228. {
  229.     /*----------------------------------------------------------------*/
  230.     /* Local Variables                                                */
  231.     /*----------------------------------------------------------------*/
  232.     EMSObjData object;
  233.     EMSTATUS r = EMS_load_object(EMS_USERDEFINED_ANIMATION, data, 0, &object);
  234.     /*----------------------------------------------------------------*/
  235.     /* Code Body                                                      */
  236.     /*----------------------------------------------------------------*/
  237.     if (r == EMS_OK)
  238.     {
  239.         return (EMS_check_object_size(EMS_TYPE_USERDEF_ANM, &object, allowed));
  240.     }
  241.     return (0);
  242. }
  243. /*****************************************************************************
  244.  * FUNCTION
  245.  *  EMS_inputbox_insert_userdefined_animation
  246.  * DESCRIPTION
  247.  *  
  248.  * PARAMETERS
  249.  *  data        [?]     
  250.  * RETURNS
  251.  *  
  252.  *****************************************************************************/
  253. EMSTATUS EMS_inputbox_insert_userdefined_animation(U8 *data)
  254. {
  255.     /*----------------------------------------------------------------*/
  256.     /* Local Variables                                                */
  257.     /*----------------------------------------------------------------*/
  258.     EMSObjData object;
  259.     EMSTATUS r = EMS_load_object(EMS_USERDEFINED_ANIMATION, data, 0, &object);
  260.     /*----------------------------------------------------------------*/
  261.     /* Code Body                                                      */
  262.     /*----------------------------------------------------------------*/
  263.     if (r == EMS_OK)
  264.     {
  265.         r = gui_EMS_inputbox_add_object(&MMI_EMS_inputbox, EMS_TYPE_USERDEF_ANM, &object, 0);
  266.     }
  267.     return (r);
  268. }
  269. /*****************************************************************************
  270.  * FUNCTION
  271.  *  EMS_get_predefined_sound_size
  272.  * DESCRIPTION
  273.  *  
  274.  * PARAMETERS
  275.  *  index       [IN]        
  276.  * RETURNS
  277.  *  
  278.  *****************************************************************************/
  279. S32 EMS_get_predefined_sound_size(S32 index)
  280. {
  281.     /*----------------------------------------------------------------*/
  282.     /* Local Variables                                                */
  283.     /*----------------------------------------------------------------*/
  284.     EMSObjData object;
  285.     /*----------------------------------------------------------------*/
  286.     /* Code Body                                                      */
  287.     /*----------------------------------------------------------------*/
  288.     if ((index < 0) || (index >= MAX_EMS_PREDEFINED_SOUNDS))
  289.     {
  290.         return (0);
  291.     }
  292.     return (EMS_get_object_size(EMS_TYPE_PREDEF_SND, &object));
  293. }
  294. /*****************************************************************************
  295.  * FUNCTION
  296.  *  EMS_inputbox_insert_predefined_sound
  297.  * DESCRIPTION
  298.  *  
  299.  * PARAMETERS
  300.  *  index       [IN]        
  301.  * RETURNS
  302.  *  
  303.  *****************************************************************************/
  304. EMSTATUS EMS_inputbox_insert_predefined_sound(S32 index)
  305. {
  306.     /*----------------------------------------------------------------*/
  307.     /* Local Variables                                                */
  308.     /*----------------------------------------------------------------*/
  309.     /*----------------------------------------------------------------*/
  310.     /* Code Body                                                      */
  311.     /*----------------------------------------------------------------*/
  312.     if ((index < 0) || (index >= MAX_EMS_PREDEFINED_SOUNDS))
  313.     {
  314.         return (EMS_INVALID_OBJECT);
  315.     }
  316.     return (gui_EMS_inputbox_add_object(&MMI_EMS_inputbox, EMS_TYPE_PREDEF_SND, NULL, (U8) index));
  317. }
  318. /* MTK Joy added for customization, 1014 */
  319. #if defined(__MMI_IMELODY_SUPPORT__)
  320. /*****************************************************************************
  321.  * FUNCTION
  322.  *  EMS_load_predefined_melody
  323.  * DESCRIPTION
  324.  *  
  325.  * PARAMETERS
  326.  *  index       [IN]        
  327.  *  data        [?]         
  328.  * RETURNS
  329.  *  void
  330.  *****************************************************************************/
  331. void EMS_load_predefined_melody(S32 index, U8 *data)
  332. {
  333.     /*----------------------------------------------------------------*/
  334.     /* Local Variables                                                */
  335.     /*----------------------------------------------------------------*/
  336.     /*----------------------------------------------------------------*/
  337.     /* Code Body                                                      */
  338.     /*----------------------------------------------------------------*/
  339.     if ((index >= 0) && (index < MAX_EMS_PREDEFINED_MELODIES))
  340.     {
  341.         EMS_predefined_melodies[index] = data;
  342.     }
  343. }
  344. /*****************************************************************************
  345.  * FUNCTION
  346.  *  EMS_get_predefined_melody_size
  347.  * DESCRIPTION
  348.  *  
  349.  * PARAMETERS
  350.  *  index       [IN]        
  351.  * RETURNS
  352.  *  
  353.  *****************************************************************************/
  354. S32 EMS_get_predefined_melody_size(S32 index)
  355. {
  356.     /*----------------------------------------------------------------*/
  357.     /* Local Variables                                                */
  358.     /*----------------------------------------------------------------*/
  359.     EMSObjData object;
  360.     U8 *data = NULL;
  361.     EMSTATUS r = EMS_load_object(EMS_PREDEFINED_MELODY, data, index, &object);
  362.     /*----------------------------------------------------------------*/
  363.     /* Code Body                                                      */
  364.     /*----------------------------------------------------------------*/
  365.     if (r == EMS_OK)
  366.     {
  367.         return (EMS_get_object_size(EMS_TYPE_USERDEF_SND, &object));
  368.     }
  369.     return (0);
  370. }
  371. /*****************************************************************************
  372.  * FUNCTION
  373.  *  EMS_get_predefined_melody_data_size
  374.  * DESCRIPTION
  375.  *  
  376.  * PARAMETERS
  377.  *  data        [?]     
  378.  * RETURNS
  379.  *  
  380.  *****************************************************************************/
  381. S32 EMS_get_predefined_melody_data_size(U8 *data)
  382. {
  383.     /*----------------------------------------------------------------*/
  384.     /* Local Variables                                                */
  385.     /*----------------------------------------------------------------*/
  386.     EMSObjData object;
  387.     EMSTATUS r = EMS_load_object(EMS_PREDEFINED_MELODY, data, -1, &object);
  388.     /*----------------------------------------------------------------*/
  389.     /* Code Body                                                      */
  390.     /*----------------------------------------------------------------*/
  391.     if (r == EMS_OK)
  392.     {
  393.         return (EMS_get_object_size(EMS_TYPE_USERDEF_SND, &object));
  394.     }
  395.     return (0);
  396. }
  397. /*****************************************************************************
  398.  * FUNCTION
  399.  *  EMS_check_predefined_melody_data_size
  400.  * DESCRIPTION
  401.  *  
  402.  * PARAMETERS
  403.  *  data        [?]     
  404.  *  allowed     [?]     
  405.  * RETURNS
  406.  *  
  407.  *****************************************************************************/
  408. S32 EMS_check_predefined_melody_data_size(U8 *data, U8 *allowed)
  409. {
  410.     /*----------------------------------------------------------------*/
  411.     /* Local Variables                                                */
  412.     /*----------------------------------------------------------------*/
  413.     EMSObjData object;
  414.     EMSTATUS r = EMS_load_object(EMS_PREDEFINED_MELODY, data, -1, &object);
  415.     /*----------------------------------------------------------------*/
  416.     /* Code Body                                                      */
  417.     /*----------------------------------------------------------------*/
  418.     if (r == EMS_OK)
  419.     {
  420.         return (EMS_check_object_size(EMS_TYPE_USERDEF_SND, &object, allowed));
  421.     }
  422.     return (0);
  423. }
  424. /*****************************************************************************
  425.  * FUNCTION
  426.  *  EMS_inputbox_insert_predefined_melody
  427.  * DESCRIPTION
  428.  *  
  429.  * PARAMETERS
  430.  *  index       [IN]        
  431.  * RETURNS
  432.  *  
  433.  *****************************************************************************/
  434. EMSTATUS EMS_inputbox_insert_predefined_melody(S32 index)
  435. {
  436.     /*----------------------------------------------------------------*/
  437.     /* Local Variables                                                */
  438.     /*----------------------------------------------------------------*/
  439.     EMSObjData object;
  440.     U8 *data = NULL;
  441.     EMSTATUS r = EMS_load_object(EMS_PREDEFINED_MELODY, data, index, &object);
  442.     /*----------------------------------------------------------------*/
  443.     /* Code Body                                                      */
  444.     /*----------------------------------------------------------------*/
  445.     if (r == EMS_OK)
  446.     {
  447.         r = gui_EMS_inputbox_add_object(&MMI_EMS_inputbox, EMS_TYPE_USERDEF_SND, &object, 0);
  448.     }
  449.     return (r);
  450. }
  451. /*****************************************************************************
  452.  * FUNCTION
  453.  *  EMS_get_userdefined_melody_size
  454.  * DESCRIPTION
  455.  *  
  456.  * PARAMETERS
  457.  *  data        [?]     
  458.  * RETURNS
  459.  *  
  460.  *****************************************************************************/
  461. S32 EMS_get_userdefined_melody_size(U8 *data)
  462. {
  463.     /*----------------------------------------------------------------*/
  464.     /* Local Variables                                                */
  465.     /*----------------------------------------------------------------*/
  466.     EMSObjData object;
  467.     EMSTATUS r = EMS_load_object(EMS_USERDEFINED_MELODY, data, 0, &object);
  468.     /*----------------------------------------------------------------*/
  469.     /* Code Body                                                      */
  470.     /*----------------------------------------------------------------*/
  471.     if (r == EMS_OK)
  472.     {
  473.         return (EMS_get_object_size(EMS_TYPE_USERDEF_SND, &object));
  474.     }
  475.     return (0);
  476. }
  477. /*****************************************************************************
  478.  * FUNCTION
  479.  *  EMS_check_userdefined_melody_size
  480.  * DESCRIPTION
  481.  *  
  482.  * PARAMETERS
  483.  *  data        [?]     
  484.  *  allowed     [?]     
  485.  * RETURNS
  486.  *  
  487.  *****************************************************************************/
  488. S32 EMS_check_userdefined_melody_size(U8 *data, U8 *allowed)
  489. {
  490.     /*----------------------------------------------------------------*/
  491.     /* Local Variables                                                */
  492.     /*----------------------------------------------------------------*/
  493.     EMSObjData object;
  494.     EMSTATUS r = EMS_load_object(EMS_USERDEFINED_MELODY, data, 0, &object);
  495.     /*----------------------------------------------------------------*/
  496.     /* Code Body                                                      */
  497.     /*----------------------------------------------------------------*/
  498.     if (r == EMS_OK)
  499.     {
  500.         return (EMS_check_object_size(EMS_TYPE_USERDEF_SND, &object, allowed));
  501.     }
  502.     return (0);
  503. }
  504. /*****************************************************************************
  505.  * FUNCTION
  506.  *  EMS_inputbox_insert_userdefined_melody
  507.  * DESCRIPTION
  508.  *  
  509.  * PARAMETERS
  510.  *  data        [?]     
  511.  * RETURNS
  512.  *  
  513.  *****************************************************************************/
  514. EMSTATUS EMS_inputbox_insert_userdefined_melody(U8 *data)
  515. {
  516.     /*----------------------------------------------------------------*/
  517.     /* Local Variables                                                */
  518.     /*----------------------------------------------------------------*/
  519.     EMSObjData object;
  520.     EMSTATUS r = EMS_load_object(EMS_USERDEFINED_MELODY, data, 0, &object);
  521.     /*----------------------------------------------------------------*/
  522.     /* Code Body                                                      */
  523.     /*----------------------------------------------------------------*/
  524.     if (r == EMS_OK)
  525.     {
  526.         r = gui_EMS_inputbox_add_object(&MMI_EMS_inputbox, EMS_TYPE_USERDEF_SND, &object, 0);
  527.     }
  528.     return (r);
  529. }
  530. /*****************************************************************************
  531.  * FUNCTION
  532.  *  EMS_userdefined_melody_attach_header
  533.  * DESCRIPTION
  534.  *  
  535.  * PARAMETERS
  536.  *  src         [?]     
  537.  *  dst         [?]     
  538.  *  size        [?]     
  539.  * RETURNS
  540.  *  void
  541.  *****************************************************************************/
  542. void EMS_userdefined_melody_attach_header(U8 *src, U8 *dst, S32 *size)
  543. {
  544.     /*----------------------------------------------------------------*/
  545.     /* Local Variables                                                */
  546.     /*----------------------------------------------------------------*/
  547.     /*----------------------------------------------------------------*/
  548.     /* Code Body                                                      */
  549.     /*----------------------------------------------------------------*/
  550.     gui_memcpy(dst + 4, src, *size);
  551.     dst[0] = EMS_USERDEFINED_MELODY;
  552.     dst[1] = 0;
  553.     dst[2] = (U8) ((*size) & 0xff);
  554.     dst[3] = (U8) ((*size) >> 8);
  555.     *size = *size + 4;
  556. }
  557. /*****************************************************************************
  558.  * FUNCTION
  559.  *  EMS_userdefined_melody_detach_header
  560.  * DESCRIPTION
  561.  *  
  562.  * PARAMETERS
  563.  *  src         [?]     
  564.  *  dst         [?]     
  565.  *  size        [?]     
  566.  * RETURNS
  567.  *  void
  568.  *****************************************************************************/
  569. void EMS_userdefined_melody_detach_header(U8 *src, U8 *dst, S32 *size)
  570. {
  571.     /*----------------------------------------------------------------*/
  572.     /* Local Variables                                                */
  573.     /*----------------------------------------------------------------*/
  574.     /*----------------------------------------------------------------*/
  575.     /* Code Body                                                      */
  576.     /*----------------------------------------------------------------*/
  577.     *size = *size - 4;
  578.     gui_memcpy(dst, src + 4, *size);
  579. }
  580. /*****************************************************************************
  581.  * FUNCTION
  582.  *  EMS_predefined_melody_attach_header
  583.  * DESCRIPTION
  584.  *  
  585.  * PARAMETERS
  586.  *  src         [?]     
  587.  *  dst         [?]     
  588.  *  size        [?]     
  589.  * RETURNS
  590.  *  void
  591.  *****************************************************************************/
  592. void EMS_predefined_melody_attach_header(U8 *src, U8 *dst, S32 *size)
  593. {
  594.     /*----------------------------------------------------------------*/
  595.     /* Local Variables                                                */
  596.     /*----------------------------------------------------------------*/
  597.     /*----------------------------------------------------------------*/
  598.     /* Code Body                                                      */
  599.     /*----------------------------------------------------------------*/
  600.     gui_memcpy(dst + 4, src, *size);
  601.     dst[0] = EMS_PREDEFINED_MELODY;
  602.     dst[1] = 0;
  603.     dst[2] = (U8) ((*size) & 0xff);
  604.     dst[3] = (U8) ((*size) >> 8);
  605.     *size = *size + 4;
  606. }
  607. /*****************************************************************************
  608.  * FUNCTION
  609.  *  EMS_predefined_melody_detach_header
  610.  * DESCRIPTION
  611.  *  
  612.  * PARAMETERS
  613.  *  src         [?]     
  614.  *  dst         [?]     
  615.  *  size        [?]     
  616.  * RETURNS
  617.  *  void
  618.  *****************************************************************************/
  619. void EMS_predefined_melody_detach_header(U8 *src, U8 *dst, S32 *size)
  620. {
  621.     /*----------------------------------------------------------------*/
  622.     /* Local Variables                                                */
  623.     /*----------------------------------------------------------------*/
  624.     /*----------------------------------------------------------------*/
  625.     /* Code Body                                                      */
  626.     /*----------------------------------------------------------------*/
  627.     *size = *size - 4;
  628.     gui_memcpy(dst, src + 4, *size);
  629. }
  630. #endif /* defined(__MMI_IMELODY_SUPPORT__) */ 
  631. /* MTK end */
  632. /*****************************************************************************
  633.  * FUNCTION
  634.  *  EMS_inputbox_set_text_size
  635.  * DESCRIPTION
  636.  *  
  637.  * PARAMETERS
  638.  *  s       [IN]        
  639.  * RETURNS
  640.  *  void
  641.  *****************************************************************************/
  642. void EMS_inputbox_set_text_size(EMSFONTSIZE s)
  643. {
  644.     /*----------------------------------------------------------------*/
  645.     /* Local Variables                                                */
  646.     /*----------------------------------------------------------------*/
  647.     /*----------------------------------------------------------------*/
  648.     /* Code Body                                                      */
  649.     /*----------------------------------------------------------------*/
  650.     wgui_EMS_text_format.FontSize = s;
  651.     /* AddString(MMI_EMS_inputbox.data,NULL,0,&wgui_EMS_text_format); */
  652. }
  653. /*****************************************************************************
  654.  * FUNCTION
  655.  *  EMS_inputbox_get_text_size
  656.  * DESCRIPTION
  657.  *  
  658.  * PARAMETERS
  659.  *  void
  660.  * RETURNS
  661.  *  
  662.  *****************************************************************************/
  663. EMSFONTSIZE EMS_inputbox_get_text_size(void)
  664. {
  665. #ifdef __MMI_DIALLING_FONT__
  666.     /*----------------------------------------------------------------*/
  667.     /* Local Variables                                                */
  668.     /*----------------------------------------------------------------*/
  669.     /*----------------------------------------------------------------*/
  670.     /* Code Body                                                      */
  671.     /*----------------------------------------------------------------*/
  672.     if (wgui_EMS_text_format.FontSize == EMS_FONTSIZE_LARGE)
  673.     {
  674.         return (EMS_FONTSIZE_NORMAL);
  675.     }
  676.     else
  677.     {
  678.         return (wgui_EMS_text_format.FontSize);
  679.     }
  680. #else /* __MMI_DIALLING_FONT__ */ 
  681.     return (wgui_EMS_text_format.FontSize);
  682. #endif /* __MMI_DIALLING_FONT__ */ 
  683. }
  684. /*****************************************************************************
  685.  * FUNCTION
  686.  *  EMS_inputbox_set_text_style
  687.  * DESCRIPTION
  688.  *  
  689.  * PARAMETERS
  690.  *  isBold              [IN]        
  691.  *  isItalic            [IN]        
  692.  *  isUnderline         [IN]        
  693.  *  isStrikethrough     [IN]        
  694.  * RETURNS
  695.  *  void
  696.  *****************************************************************************/
  697. void EMS_inputbox_set_text_style(U8 isBold, U8 isItalic, U8 isUnderline, U8 isStrikethrough)
  698. {
  699.     /*----------------------------------------------------------------*/
  700.     /* Local Variables                                                */
  701.     /*----------------------------------------------------------------*/
  702.     /*----------------------------------------------------------------*/
  703.     /* Code Body                                                      */
  704.     /*----------------------------------------------------------------*/
  705.     if (isBold)
  706.     {
  707.         wgui_EMS_text_format.isBold = KAL_TRUE;
  708.     }
  709.     else
  710.     {
  711.         wgui_EMS_text_format.isBold = KAL_FALSE;
  712.     }
  713.     if (isItalic)
  714.     {
  715.         wgui_EMS_text_format.isItalic = KAL_TRUE;
  716.     }
  717.     else
  718.     {
  719.         wgui_EMS_text_format.isItalic = KAL_FALSE;
  720.     }
  721.     if (isUnderline)
  722.     {
  723.         wgui_EMS_text_format.isUnderline = KAL_TRUE;
  724.     }
  725.     else
  726.     {
  727.         wgui_EMS_text_format.isUnderline = KAL_FALSE;
  728.     }
  729.     if (isStrikethrough)
  730.     {
  731.         wgui_EMS_text_format.isStrikethrough = KAL_TRUE;
  732.     }
  733.     else
  734.     {
  735.         wgui_EMS_text_format.isStrikethrough = KAL_FALSE;
  736.     }
  737.     /* AddString(MMI_EMS_inputbox.data,NULL,0,&wgui_EMS_text_format); */
  738. }
  739. /*****************************************************************************
  740.  * FUNCTION
  741.  *  EMS_inputbox_get_text_style
  742.  * DESCRIPTION
  743.  *  
  744.  * PARAMETERS
  745.  *  isBold              [?]     
  746.  *  isItalic            [?]     
  747.  *  isUnderline         [?]     
  748.  *  isStrikethrough     [?]     
  749.  * RETURNS
  750.  *  void
  751.  *****************************************************************************/
  752. void EMS_inputbox_get_text_style(U8 *isBold, U8 *isItalic, U8 *isUnderline, U8 *isStrikethrough)
  753. {
  754.     /*----------------------------------------------------------------*/
  755.     /* Local Variables                                                */
  756.     /*----------------------------------------------------------------*/
  757.     /*----------------------------------------------------------------*/
  758.     /* Code Body                                                      */
  759.     /*----------------------------------------------------------------*/
  760.     if (wgui_EMS_text_format.isBold == KAL_TRUE)
  761.     {
  762.         *isBold = 1;
  763.     }
  764.     else
  765.     {
  766.         *isBold = 0;
  767.     }
  768.     if (wgui_EMS_text_format.isItalic == KAL_TRUE)
  769.     {
  770.         *isItalic = 1;
  771.     }
  772.     else
  773.     {
  774.         *isItalic = 0;
  775.     }
  776.     if (wgui_EMS_text_format.isUnderline == KAL_TRUE)
  777.     {
  778.         *isUnderline = 1;
  779.     }
  780.     else
  781.     {
  782.         *isUnderline = 0;
  783.     }
  784.     if (wgui_EMS_text_format.isStrikethrough == KAL_TRUE)
  785.     {
  786.         *isStrikethrough = 1;
  787.     }
  788.     else
  789.     {
  790.         *isStrikethrough = 0;
  791.     }
  792. }
  793. #endif /* __MMI_MESSAGES_EMS__ */ /* endif __MMI_MESSAGES_EMS__ */
  794. U8 EMS_inputbox_alignment_added_flag = 0;
  795. EMSALIGNMENT EMS_inputbox_alignment = EMS_ALIGN_LANG_DEP;
  796. #ifdef __MMI_MESSAGES_EMS__
  797. /*****************************************************************************
  798.  * FUNCTION
  799.  *  EMS_inputbox_set_text_alignment
  800.  * DESCRIPTION
  801.  *  
  802.  * PARAMETERS
  803.  *  a       [IN]        
  804.  * RETURNS
  805.  *  
  806.  *****************************************************************************/
  807. EMSTATUS EMS_inputbox_set_text_alignment(EMSALIGNMENT a)
  808. {
  809.     /*----------------------------------------------------------------*/
  810.     /* Local Variables                                                */
  811.     /*----------------------------------------------------------------*/
  812.     EMSTATUS emsObjectStatus;
  813.     EMSTextFormat saved_wgui_EMS_text_format = wgui_EMS_text_format;
  814.     /*----------------------------------------------------------------*/
  815.     /* Code Body                                                      */
  816.     /*----------------------------------------------------------------*/
  817.     /* Old code: Used for testing purpose. Leave commented   */
  818.     //      ResetTextFormat(&wgui_EMS_text_format);
  819.     //      wgui_EMS_text_format.Alignment=a;
  820.     /* Old code: ends */
  821.     saved_wgui_EMS_text_format.Alignment = a;
  822.     emsObjectStatus = gui_EMS_input_box_insert_text_alignment(&MMI_EMS_inputbox, &saved_wgui_EMS_text_format);
  823.     /* Old code: Used for testing purpose. Leave commented   */
  824.     //      AddString(MMI_EMS_inputbox.data,NULL,0,&wgui_EMS_text_format);
  825.     //      wgui_EMS_text_format=saved_wgui_EMS_text_format;
  826.     /* Old code: ends */
  827.     if (emsObjectStatus != EMS_OK)
  828.     {
  829.         return emsObjectStatus;
  830.     }
  831.     if (MMI_EMS_inputbox.data->CurrentTextFormatObj != NULL)
  832.     {
  833.         wgui_EMS_text_format.Alignment = MMI_EMS_inputbox.data->CurrentTextFormatObj->data->text_format.Alignment;
  834.     }
  835.     /* HACK: Set a flag to indicate that text alignment has been added   */
  836.     EMS_inputbox_alignment_added_flag = 1;
  837.     EMS_inputbox_alignment = a;
  838.     return emsObjectStatus;
  839. }
  840. /*****************************************************************************
  841.  * FUNCTION
  842.  *  EMS_inputbox_get_text_alignment
  843.  * DESCRIPTION
  844.  *  
  845.  * PARAMETERS
  846.  *  void
  847.  * RETURNS
  848.  *  
  849.  *****************************************************************************/
  850. EMSALIGNMENT EMS_inputbox_get_text_alignment(void)
  851. {
  852.     /*----------------------------------------------------------------*/
  853.     /* Local Variables                                                */
  854.     /*----------------------------------------------------------------*/
  855.     /*----------------------------------------------------------------*/
  856.     /* Code Body                                                      */
  857.     /*----------------------------------------------------------------*/
  858.     return (wgui_EMS_text_format.Alignment);
  859. }
  860. /*****************************************************************************
  861.  * FUNCTION
  862.  *  EMS_inputbox_create_new_paragraph
  863.  * DESCRIPTION
  864.  *  
  865.  * PARAMETERS
  866.  *  a       [IN]        
  867.  * RETURNS
  868.  *  
  869.  *****************************************************************************/
  870. EMSTATUS EMS_inputbox_create_new_paragraph(EMSALIGNMENT a)
  871. {
  872.     /*----------------------------------------------------------------*/
  873.     /* Local Variables                                                */
  874.     /*----------------------------------------------------------------*/
  875.     EMSTATUS emsObjectStatus;
  876. #if(0)
  877. wgui_EMS_text_format.Alignment=a;
  878. MMI_EMS_inputbox.text_format.Alignment=a;
  879. EMS_inputbox_insert_new_line();
  880. #else /* (0) */ 
  881.     /*----------------------------------------------------------------*/
  882.     /* Code Body                                                      */
  883.     /*----------------------------------------------------------------*/
  884.     wgui_EMS_text_format.Alignment = a;
  885.     emsObjectStatus = gui_EMS_input_box_insert_new_paragraph(&MMI_EMS_inputbox, &wgui_EMS_text_format);
  886.     /* AddString(MMI_EMS_inputbox.data,NULL,0,&wgui_EMS_text_format); */
  887.     if (emsObjectStatus != EMS_OK)
  888.     {
  889.         wgui_EMS_text_format = MMI_EMS_inputbox.text_format;
  890.     }
  891.     EMS_inputbox_input_callback();
  892.     return emsObjectStatus;
  893. #endif /* (0) */ 
  894. }
  895. #if(0)
  896. byte EMS_bold=1;
  897. void EMS_inputbox_insert_text_format(void)
  898. { EMSObjData object;
  899. ResetTextFormat(&object.text_format);
  900. object.text_format.bgColor=EMS_BLACK;
  901. object.text_format.fgColor=EMS_BLACK;
  902. object.text_format.Alignment=EMS_ALIGN_LEFT;
  903. if(EMS_bold) object.text_format.FontSize=EMS_FONTSIZE_SMALL;
  904. else object.text_format.FontSize=EMS_FONTSIZE_NORMAL;
  905. object.text_format.isBold=0;
  906. object.text_format.isItalic=0;
  907. object.text_format.isUnderline=0;
  908. object.text_format.isStrikethrough=0;
  909. object.text_format.textLength=1;
  910. pixtel_toggle(EMS_bold);
  911. AddString(MMI_EMS_inputbox.data,NULL,0,&object.text_format);
  912. }
  913. #endif /* (0) */ 
  914. extern PU8 EMS_editor_sound_icon;
  915. extern PU8 EMS_editor_melody_icon;
  916. /*****************************************************************************
  917.  * FUNCTION
  918.  *  initialize_EMS_objects
  919.  * DESCRIPTION
  920.  *  
  921.  * PARAMETERS
  922.  *  void
  923.  * RETURNS
  924.  *  void
  925.  *****************************************************************************/
  926. void initialize_EMS_objects(void)
  927. {
  928.     /*----------------------------------------------------------------*/
  929.     /* Local Variables                                                */
  930.     /*----------------------------------------------------------------*/
  931.     /*----------------------------------------------------------------*/
  932.     /* Code Body                                                      */
  933.     /*----------------------------------------------------------------*/
  934.     EMS_editor_sound_icon = get_image(EMS_EDITOR_SOUND_OBJECT_ID);
  935.     EMS_editor_melody_icon = get_image(EMS_EDITOR_MELODY_OBJECT_ID);
  936. }
  937. /*****************************************************************************
  938.  * FUNCTION
  939.  *  close_EMS_objects
  940.  * DESCRIPTION
  941.  *  
  942.  * PARAMETERS
  943.  *  void
  944.  * RETURNS
  945.  *  void
  946.  *****************************************************************************/
  947. void close_EMS_objects(void)
  948. {
  949.     /*----------------------------------------------------------------*/
  950.     /* Local Variables                                                */
  951.     /*----------------------------------------------------------------*/
  952.     /*----------------------------------------------------------------*/
  953.     /* Code Body                                                      */
  954.     /*----------------------------------------------------------------*/
  955. }
  956. /* EMS category screens: Application menus   */
  957. #define EMS_APPLICATION_MENUS_BASE                    (DEMO_APP_BASE+400)
  958. #define EMS_APPLICATION_MENUS_SCREEN_ID_BASE          (EMS_APPLICATION_MENUS_BASE+0)
  959. #define EMS_MAIN_MENU_SCREEN_ID                       (EMS_APPLICATION_MENUS_SCREEN_ID_BASE+1)
  960. #define EMS_OBJECTS_MENU_SCREEN_ID                    (EMS_APPLICATION_MENUS_SCREEN_ID_BASE+2)
  961. #define EMS_TEXT_FORMATTING_MENU_SCREEN_ID               (EMS_APPLICATION_MENUS_SCREEN_ID_BASE+3)
  962. #define EMS_TEXT_ALIGNMENT_SELECTION_MENU_SCREEN_ID         (EMS_APPLICATION_MENUS_SCREEN_ID_BASE+4)
  963. #define EMS_TEXT_SIZE_SELECTION_MENU_SCREEN_ID           (EMS_APPLICATION_MENUS_SCREEN_ID_BASE+5)
  964. #define EMS_TEXT_STYLE_SELECTION_MENU_SCREEN_ID          (EMS_APPLICATION_MENUS_SCREEN_ID_BASE+6)
  965. #define EMS_TEXT_NEW_PARAGRAPH_ALIGNMENT_MENU_SCREEN_ID     (EMS_APPLICATION_MENUS_SCREEN_ID_BASE+7)
  966. #define MAX_EMS_MAIN_MENU_ITEMS  5
  967. #if(EMS_USE_INTERNAL_MENU)
  968. #ifdef __UCS2_ENCODING
  969. U8 *EMS_main_menu_items[] = { (U8 *) "Add symbol",
  970.     (U8 *) "Insert object",
  971.     (U8 *) "Format text",
  972.     (U8 *) "Input method",
  973.     (U8 *) "Help",
  974. };
  975. #else /* __UCS2_ENCODING */ 
  976. U8 *EMS_main_menu_items[] = { (U8 *) "Add symbol",
  977.     (U8 *) "Insert object",
  978.     (U8 *) "Formart text",
  979.     (U8 *) "Input method",
  980.     (U8 *) "Help",
  981. };
  982. #endif /* __UCS2_ENCODING */ 
  983. /*****************************************************************************
  984.  * FUNCTION
  985.  *  HandleEMSMainMenuLSK
  986.  * DESCRIPTION
  987.  *  
  988.  * PARAMETERS
  989.  *  void
  990.  * RETURNS
  991.  *  void
  992.  *****************************************************************************/
  993. void HandleEMSMainMenuLSK(void)
  994. {
  995.     /*----------------------------------------------------------------*/
  996.     /* Local Variables                                                */
  997.     /*----------------------------------------------------------------*/
  998.     /*----------------------------------------------------------------*/
  999.     /* Code Body                                                      */
  1000.     /*----------------------------------------------------------------*/
  1001.     switch (GetHighlightedItem())
  1002.     {
  1003.         case 0:
  1004.             break;
  1005.         case 1: /* Temporary: For testing  */
  1006.             EMS_inputbox_insert_object();
  1007.             GoBackHistory();
  1008.             /* EntryEMSObjectsMenu(); */
  1009.             break;
  1010.         case 2:
  1011.             GotoEMSTextFormattingMenu();
  1012.             break;
  1013.         case 3:
  1014.             break;
  1015.         case 4:
  1016.             break;
  1017.     }
  1018. }
  1019. /*****************************************************************************
  1020.  * FUNCTION
  1021.  *  EntryEMSMainMenu
  1022.  * DESCRIPTION
  1023.  *  
  1024.  * PARAMETERS
  1025.  *  void
  1026.  * RETURNS
  1027.  *  void
  1028.  *****************************************************************************/
  1029. void EntryEMSMainMenu(void)
  1030. {
  1031.     /*----------------------------------------------------------------*/
  1032.     /* Local Variables                                                */
  1033.     /*----------------------------------------------------------------*/
  1034.     U8 *guiBuffer;
  1035.     /*----------------------------------------------------------------*/
  1036.     /* Code Body                                                      */
  1037.     /*----------------------------------------------------------------*/
  1038.     ExecuteCurrExitHandler();
  1039.     guiBuffer = GetCurrGuiBuffer(EMS_MAIN_MENU_SCREEN_ID);
  1040.     ShowCategory6Screen(
  1041.         0,
  1042.         0,
  1043.         STR_GLOBAL_OK,
  1044.         IMG_GLOBAL_OK,
  1045.         STR_GLOBAL_BACK,
  1046.         IMG_GLOBAL_BACK,
  1047.         MAX_EMS_MAIN_MENU_ITEMS,
  1048.         EMS_main_menu_items,
  1049.         0,
  1050.         guiBuffer);
  1051.     SetLeftSoftkeyFunction(HandleEMSMainMenuLSK, KEY_EVENT_UP);
  1052.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1053.     SetExitHandler(EMS_MAIN_MENU_SCREEN_ID, ExitEMSMainMenu);
  1054. }
  1055. /*****************************************************************************
  1056.  * FUNCTION
  1057.  *  ExitEMSMainMenu
  1058.  * DESCRIPTION
  1059.  *  
  1060.  * PARAMETERS
  1061.  *  void
  1062.  * RETURNS
  1063.  *  void
  1064.  *****************************************************************************/
  1065. void ExitEMSMainMenu(void)
  1066. {
  1067.     /*----------------------------------------------------------------*/
  1068.     /* Local Variables                                                */
  1069.     /*----------------------------------------------------------------*/
  1070.     history h;
  1071.     /*----------------------------------------------------------------*/
  1072.     /* Code Body                                                      */
  1073.     /*----------------------------------------------------------------*/
  1074.     h.scrnID = EMS_MAIN_MENU_SCREEN_ID;
  1075.     h.entryFuncPtr = EntryEMSMainMenu;
  1076.     h.inputBuffer[0] = '';
  1077.     GetCategoryHistory(h.guiBuffer);
  1078.     AddHistory(h);
  1079. }
  1080. #define MAX_EMS_OBJECTS_MENU_ITEMS  4
  1081. #ifdef __UCS2_ENCODING
  1082. U8 *EMS_objects_menu_items[] = { (U8 *) "Picture",
  1083.     (U8 *) "Animation",
  1084.     (U8 *) "Sound",
  1085.     (U8 *) "Melody",
  1086. };
  1087. #else /* __UCS2_ENCODING */ 
  1088. U8 *EMS_objects_menu_items[] = { (U8 *) "Picture",
  1089.     (U8 *) "Animation",
  1090.     (U8 *) "Sound",
  1091.     (U8 *) "Melody",
  1092. };
  1093. #endif /* __UCS2_ENCODING */ 
  1094. /*****************************************************************************
  1095.  * FUNCTION
  1096.  *  EntryEMSObjectsMenu
  1097.  * DESCRIPTION
  1098.  *  
  1099.  * PARAMETERS
  1100.  *  void
  1101.  * RETURNS
  1102.  *  void
  1103.  *****************************************************************************/
  1104. void EntryEMSObjectsMenu(void)
  1105. {
  1106.     /*----------------------------------------------------------------*/
  1107.     /* Local Variables                                                */
  1108.     /*----------------------------------------------------------------*/
  1109.     U8 *guiBuffer;
  1110.     /*----------------------------------------------------------------*/
  1111.     /* Code Body                                                      */
  1112.     /*----------------------------------------------------------------*/
  1113.     ExecuteCurrExitHandler();
  1114.     guiBuffer = GetCurrGuiBuffer(EMS_OBJECTS_MENU_SCREEN_ID);
  1115.     ShowCategory6Screen(
  1116.         0,
  1117.         0,
  1118.         STR_GLOBAL_OK,
  1119.         IMG_GLOBAL_OK,
  1120.         STR_GLOBAL_BACK,
  1121.         IMG_GLOBAL_BACK,
  1122.         MAX_EMS_OBJECTS_MENU_ITEMS,
  1123.         EMS_objects_menu_items,
  1124.         0,
  1125.         guiBuffer);
  1126.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1127.     SetExitHandler(EMS_OBJECTS_MENU_SCREEN_ID, ExitEMSObjectsMenu);
  1128. }
  1129. /*****************************************************************************
  1130.  * FUNCTION
  1131.  *  ExitEMSObjectsMenu
  1132.  * DESCRIPTION
  1133.  *  
  1134.  * PARAMETERS
  1135.  *  void
  1136.  * RETURNS
  1137.  *  void
  1138.  *****************************************************************************/
  1139. void ExitEMSObjectsMenu(void)
  1140. {
  1141.     /*----------------------------------------------------------------*/
  1142.     /* Local Variables                                                */
  1143.     /*----------------------------------------------------------------*/
  1144.     history h;
  1145.     /*----------------------------------------------------------------*/
  1146.     /* Code Body                                                      */
  1147.     /*----------------------------------------------------------------*/
  1148.     h.scrnID = EMS_OBJECTS_MENU_SCREEN_ID;
  1149.     h.entryFuncPtr = EntryEMSObjectsMenu;
  1150.     h.inputBuffer[0] = '';
  1151.     GetCategoryHistory(h.guiBuffer);
  1152.     AddHistory(h);
  1153. }
  1154. #define MAX_EMS_TEXT_FORMATTING_MENU_ITEMS   4
  1155. #ifdef __UCS2_ENCODING
  1156. U8 *EMS_text_formatting_menu_items[] = { (U8 *) "Text size",
  1157.     (U8 *) "Text style",
  1158.     (U8 *) "Alignment",
  1159.     (U8 *) "New paragraph",
  1160. };
  1161. #else /* __UCS2_ENCODING */ 
  1162. U8 *EMS_text_formatting_menu_items[] = { (U8 *) "Text size",
  1163.     (U8 *) "Text style",
  1164.     (U8 *) "Alignment",
  1165.     (U8 *) "New paragraph",
  1166. };
  1167. #endif /* __UCS2_ENCODING */ 
  1168. /*****************************************************************************
  1169.  * FUNCTION
  1170.  *  HandleEMSTextFormattingMenuLSK
  1171.  * DESCRIPTION
  1172.  *  
  1173.  * PARAMETERS
  1174.  *  void
  1175.  * RETURNS
  1176.  *  void
  1177.  *****************************************************************************/
  1178. void HandleEMSTextFormattingMenuLSK(void)
  1179. {
  1180.     /*----------------------------------------------------------------*/
  1181.     /* Local Variables                                                */
  1182.     /*----------------------------------------------------------------*/
  1183.     /*----------------------------------------------------------------*/
  1184.     /* Code Body                                                      */
  1185.     /*----------------------------------------------------------------*/
  1186.     switch (GetHighlightedItem())
  1187.     {
  1188.         case 0:
  1189.             EntryEMSTextSizeSelectionMenu();
  1190.             break;
  1191.         case 1:
  1192.             EntryEMSTextStyleSelectionMenu();
  1193.             break;
  1194.         case 2:
  1195.             EntryEMSTextAlignmentSelectionMenu();
  1196.             break;
  1197.         case 3:
  1198.             EntryEMSNewParagraphAlignmentMenu();
  1199.             break;
  1200.     }
  1201. }
  1202. /* 0: false, 1: true */
  1203. U8 EMSTextFormattingMenu_bold = 0;
  1204. U8 EMSTextFormattingMenu_italic = 0;
  1205. U8 EMSTextFormattingMenu_underline = 0;
  1206. U8 EMSTextFormattingMenu_strikethrough = 0;
  1207. /* 1: left, 2: right, 3: center, 0: automatic   */
  1208. U8 EMSTextFormattingMenu_alignment = 0;
  1209. /* 0: small, 1: medium, 2: large */
  1210. U8 EMSTextFormattingMenu_font_size = 1;
  1211. /*****************************************************************************
  1212.  * FUNCTION
  1213.  *  LoadEMSTextFormattingMenu
  1214.  * DESCRIPTION
  1215.  *  
  1216.  * PARAMETERS
  1217.  *  void
  1218.  * RETURNS
  1219.  *  void
  1220.  *****************************************************************************/
  1221. void LoadEMSTextFormattingMenu(void)
  1222. {
  1223.     /*----------------------------------------------------------------*/
  1224.     /* Local Variables                                                */
  1225.     /*----------------------------------------------------------------*/
  1226.     EMSTextFormat *o;
  1227.     /*----------------------------------------------------------------*/
  1228.     /* Code Body                                                      */
  1229.     /*----------------------------------------------------------------*/
  1230.     if ((MMI_EMS_inputbox.data == NULL) || (MMI_EMS_inputbox.data->CurrentTextFormatObj == NULL))
  1231.     {
  1232.         EMSTextFormattingMenu_bold = 0;
  1233.         EMSTextFormattingMenu_italic = 0;
  1234.         EMSTextFormattingMenu_strikethrough = 0;
  1235.         EMSTextFormattingMenu_underline = 0;
  1236.         EMSTextFormattingMenu_alignment = 0;
  1237.         EMSTextFormattingMenu_font_size = 1;
  1238.     }
  1239.     else
  1240.     {
  1241.         o = &MMI_EMS_inputbox.data->CurrentTextFormatObj->data->text_format;
  1242.         if (o->isBold)
  1243.         {
  1244.             EMSTextFormattingMenu_bold = 1;
  1245.         }
  1246.         else
  1247.         {
  1248.             EMSTextFormattingMenu_bold = 0;
  1249.         }
  1250.         if (o->isItalic)
  1251.         {
  1252.             EMSTextFormattingMenu_italic = 1;
  1253.         }
  1254.         else
  1255.         {
  1256.             EMSTextFormattingMenu_italic = 0;
  1257.         }
  1258.         if (o->isStrikethrough)
  1259.         {
  1260.             EMSTextFormattingMenu_strikethrough = 1;
  1261.         }
  1262.         else
  1263.         {
  1264.             EMSTextFormattingMenu_strikethrough = 0;
  1265.         }
  1266.         if (o->isUnderline)
  1267.         {
  1268.             EMSTextFormattingMenu_underline = 1;
  1269.         }
  1270.         else
  1271.         {
  1272.             EMSTextFormattingMenu_underline = 0;
  1273.         }
  1274.         switch (o->Alignment)
  1275.         {
  1276.             case EMS_ALIGN_LEFT:
  1277.                 EMSTextFormattingMenu_alignment = 1;
  1278.                 break;
  1279.             case EMS_ALIGN_RIGHT:
  1280.                 EMSTextFormattingMenu_alignment = 2;
  1281.                 break;
  1282.             case EMS_ALIGN_CENTER:
  1283.                 EMSTextFormattingMenu_alignment = 3;
  1284.                 break;
  1285.             case EMS_ALIGN_LANG_DEP:
  1286.                 EMSTextFormattingMenu_alignment = 0;
  1287.                 break;
  1288.         }
  1289.         switch (o->FontSize)
  1290.         {
  1291.             case EMS_FONTSIZE_NORMAL:
  1292.                 EMSTextFormattingMenu_font_size = 1;
  1293.                 break;
  1294.             case EMS_FONTSIZE_LARGE:
  1295.                 EMSTextFormattingMenu_font_size = 2;
  1296.                 break;
  1297.             case EMS_FONTSIZE_SMALL:
  1298.                 EMSTextFormattingMenu_font_size = 0;
  1299.                 break;
  1300.         }
  1301.     }
  1302. }
  1303. /*****************************************************************************
  1304.  * FUNCTION
  1305.  *  StoreEMSTextFormattingMenu
  1306.  * DESCRIPTION
  1307.  *  
  1308.  * PARAMETERS
  1309.  *  void
  1310.  * RETURNS
  1311.  *  void
  1312.  *****************************************************************************/
  1313. void StoreEMSTextFormattingMenu(void)
  1314. {
  1315.     /*----------------------------------------------------------------*/
  1316.     /* Local Variables                                                */
  1317.     /*----------------------------------------------------------------*/
  1318.     EMSObjData object;
  1319.     /*----------------------------------------------------------------*/
  1320.     /* Code Body                                                      */
  1321.     /*----------------------------------------------------------------*/
  1322.     ResetTextFormat(&object.text_format);
  1323.     object.text_format.bgColor = EMS_BLACK;
  1324.     object.text_format.fgColor = EMS_BLACK;
  1325.     switch (EMSTextFormattingMenu_alignment)
  1326.     {
  1327.         case 0:
  1328.             object.text_format.Alignment = EMS_ALIGN_LEFT;
  1329.             break;
  1330.         case 1:
  1331.             object.text_format.Alignment = EMS_ALIGN_LEFT;
  1332.             break;
  1333.         case 2:
  1334.             object.text_format.Alignment = EMS_ALIGN_RIGHT;
  1335.             break;
  1336.         case 3:
  1337.             object.text_format.Alignment = EMS_ALIGN_CENTER;
  1338.             break;
  1339.     }
  1340.     switch (EMSTextFormattingMenu_font_size)
  1341.     {
  1342.         case 0:
  1343.             object.text_format.FontSize = EMS_FONTSIZE_SMALL;
  1344.             break;
  1345.         case 1:
  1346.             object.text_format.FontSize = EMS_FONTSIZE_NORMAL;
  1347.             break;
  1348.         case 2:
  1349.             object.text_format.FontSize = EMS_FONTSIZE_LARGE;
  1350.             break;
  1351.     }
  1352.     if (EMSTextFormattingMenu_bold)
  1353.     {
  1354.         object.text_format.isBold = 1;
  1355.     }
  1356.     else
  1357.     {
  1358.         object.text_format.isBold = 0;
  1359.     }
  1360.     if (EMSTextFormattingMenu_italic)
  1361.     {
  1362.         object.text_format.isItalic = 1;
  1363.     }
  1364.     else
  1365.     {
  1366.         object.text_format.isItalic = 0;
  1367.     }
  1368.     if (EMSTextFormattingMenu_underline)
  1369.     {
  1370.         object.text_format.isUnderline = 1;
  1371.     }
  1372.     else
  1373.     {
  1374.         object.text_format.isUnderline = 0;
  1375.     }
  1376.     if (EMSTextFormattingMenu_strikethrough)
  1377.     {
  1378.         object.text_format.isStrikethrough = 1;
  1379.     }
  1380.     else
  1381.     {
  1382.         object.text_format.isStrikethrough = 0;
  1383.     }
  1384.     object.text_format.textLength = 1;
  1385.     wgui_EMS_text_format = object.text_format;
  1386. }
  1387. /*****************************************************************************
  1388.  * FUNCTION
  1389.  *  HandleEMSTextFormattingMenuRSK
  1390.  * DESCRIPTION
  1391.  *  
  1392.  * PARAMETERS
  1393.  *  void
  1394.  * RETURNS
  1395.  *  void
  1396.  *****************************************************************************/
  1397. void HandleEMSTextFormattingMenuRSK(void)
  1398. {
  1399.     /*----------------------------------------------------------------*/
  1400.     /* Local Variables                                                */
  1401.     /*----------------------------------------------------------------*/
  1402.     /*----------------------------------------------------------------*/
  1403.     /* Code Body                                                      */
  1404.     /*----------------------------------------------------------------*/
  1405.     StoreEMSTextFormattingMenu();
  1406.     GoBackHistory();
  1407.     GoBackHistory();
  1408. }
  1409. /*****************************************************************************
  1410.  * FUNCTION
  1411.  *  GotoEMSTextFormattingMenu
  1412.  * DESCRIPTION
  1413.  *  
  1414.  * PARAMETERS
  1415.  *  void
  1416.  * RETURNS
  1417.  *  void
  1418.  *****************************************************************************/
  1419. void GotoEMSTextFormattingMenu(void)
  1420. {
  1421.     /*----------------------------------------------------------------*/
  1422.     /* Local Variables                                                */
  1423.     /*----------------------------------------------------------------*/
  1424.     /*----------------------------------------------------------------*/
  1425.     /* Code Body                                                      */
  1426.     /*----------------------------------------------------------------*/
  1427.     LoadEMSTextFormattingMenu();
  1428.     EntryEMSTextFormattingMenu();
  1429. }
  1430. /*****************************************************************************
  1431.  * FUNCTION
  1432.  *  EntryEMSTextFormattingMenu
  1433.  * DESCRIPTION
  1434.  *  
  1435.  * PARAMETERS
  1436.  *  void
  1437.  * RETURNS
  1438.  *  void
  1439.  *****************************************************************************/
  1440. void EntryEMSTextFormattingMenu(void)
  1441. {
  1442.     /*----------------------------------------------------------------*/
  1443.     /* Local Variables                                                */
  1444.     /*----------------------------------------------------------------*/
  1445.     U8 *guiBuffer;
  1446.     /*----------------------------------------------------------------*/
  1447.     /* Code Body                                                      */
  1448.     /*----------------------------------------------------------------*/
  1449.     ExecuteCurrExitHandler();
  1450.     guiBuffer = GetCurrGuiBuffer(EMS_TEXT_FORMATTING_MENU_SCREEN_ID);
  1451.     ShowCategory6Screen(
  1452.         0,
  1453.         0,
  1454.         STR_GLOBAL_OK,
  1455.         IMG_GLOBAL_OK,
  1456.         STR_GLOBAL_BACK,
  1457.         IMG_GLOBAL_BACK,
  1458.         MAX_EMS_TEXT_FORMATTING_MENU_ITEMS,
  1459.         EMS_text_formatting_menu_items,
  1460.         0,
  1461.         guiBuffer);
  1462.     SetLeftSoftkeyFunction(HandleEMSTextFormattingMenuLSK, KEY_EVENT_UP);
  1463.     SetRightSoftkeyFunction(HandleEMSTextFormattingMenuRSK, KEY_EVENT_UP);
  1464.     SetExitHandler(EMS_TEXT_FORMATTING_MENU_SCREEN_ID, ExitEMSTextFormattingMenu);
  1465. }
  1466. /*****************************************************************************
  1467.  * FUNCTION
  1468.  *  ExitEMSTextFormattingMenu
  1469.  * DESCRIPTION
  1470.  *  
  1471.  * PARAMETERS
  1472.  *  void
  1473.  * RETURNS
  1474.  *  void
  1475.  *****************************************************************************/
  1476. void ExitEMSTextFormattingMenu(void)
  1477. {
  1478.     /*----------------------------------------------------------------*/
  1479.     /* Local Variables                                                */
  1480.     /*----------------------------------------------------------------*/
  1481.     history h;
  1482.     /*----------------------------------------------------------------*/
  1483.     /* Code Body                                                      */
  1484.     /*----------------------------------------------------------------*/
  1485.     h.scrnID = EMS_TEXT_FORMATTING_MENU_SCREEN_ID;
  1486.     h.entryFuncPtr = EntryEMSTextFormattingMenu;
  1487.     h.inputBuffer[0] = '';
  1488.     GetCategoryHistory(h.guiBuffer);
  1489.     AddHistory(h);
  1490. }
  1491. #define MAX_EMS_TEXT_SIZE_MENU_ITEMS   3
  1492. #ifdef __UCS2_ENCODING
  1493. U8 *EMS_text_size_menu_items[] = { (U8 *) "Small",
  1494.     (U8 *) "Medium",
  1495.     (U8 *) "Large",
  1496. };
  1497. #else /* __UCS2_ENCODING */ 
  1498. U8 *EMS_text_size_menu_items[] = { (U8 *) "Small",
  1499.     (U8 *) "Medium",
  1500.     (U8 *) "Large",
  1501. };
  1502. #endif /* __UCS2_ENCODING */ 
  1503. /*****************************************************************************
  1504.  * FUNCTION
  1505.  *  HandleEMSTextSizeSelectionMenuLSK
  1506.  * DESCRIPTION
  1507.  *  
  1508.  * PARAMETERS
  1509.  *  void
  1510.  * RETURNS
  1511.  *  void
  1512.  *****************************************************************************/
  1513. void HandleEMSTextSizeSelectionMenuLSK(void)
  1514. {
  1515.     /*----------------------------------------------------------------*/
  1516.     /* Local Variables                                                */
  1517.     /*----------------------------------------------------------------*/
  1518.     /*----------------------------------------------------------------*/
  1519.     /* Code Body                                                      */
  1520.     /*----------------------------------------------------------------*/
  1521.     EMSTextFormattingMenu_font_size = (U8) GetHighlightedItem();
  1522.     GoBackHistory();
  1523. }
  1524. /*****************************************************************************
  1525.  * FUNCTION
  1526.  *  EntryEMSTextSizeSelectionMenu
  1527.  * DESCRIPTION
  1528.  *  
  1529.  * PARAMETERS
  1530.  *  void
  1531.  * RETURNS
  1532.  *  void
  1533.  *****************************************************************************/
  1534. void EntryEMSTextSizeSelectionMenu(void)
  1535. {
  1536.     /*----------------------------------------------------------------*/
  1537.     /* Local Variables                                                */
  1538.     /*----------------------------------------------------------------*/
  1539.     U8 *guiBuffer;
  1540.     U16 h;
  1541.     /*----------------------------------------------------------------*/
  1542.     /* Code Body                                                      */
  1543.     /*----------------------------------------------------------------*/
  1544.     ExecuteCurrExitHandler();
  1545.     guiBuffer = GetCurrGuiBuffer(EMS_TEXT_SIZE_SELECTION_MENU_SCREEN_ID);
  1546.     h = EMSTextFormattingMenu_font_size;
  1547.     ShowCategory36Screen(
  1548.         0,
  1549.         0,
  1550.         STR_GLOBAL_OK,
  1551.         IMG_GLOBAL_OK,
  1552.         STR_GLOBAL_BACK,
  1553.         IMG_GLOBAL_BACK,
  1554.         MAX_EMS_TEXT_SIZE_MENU_ITEMS,
  1555.         EMS_text_size_menu_items,
  1556.         h,
  1557.         guiBuffer);
  1558.     SetLeftSoftkeyFunction(HandleEMSTextSizeSelectionMenuLSK, KEY_EVENT_UP);
  1559.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1560.     SetExitHandler(EMS_TEXT_SIZE_SELECTION_MENU_SCREEN_ID, ExitEMSTextSizeSelectionMenu);
  1561. }
  1562. /*****************************************************************************
  1563.  * FUNCTION
  1564.  *  ExitEMSTextSizeSelectionMenu
  1565.  * DESCRIPTION
  1566.  *  
  1567.  * PARAMETERS
  1568.  *  void
  1569.  * RETURNS
  1570.  *  void
  1571.  *****************************************************************************/
  1572. void ExitEMSTextSizeSelectionMenu(void)
  1573. {
  1574.     /*----------------------------------------------------------------*/
  1575.     /* Local Variables                                                */
  1576.     /*----------------------------------------------------------------*/
  1577.     history h;
  1578.     /*----------------------------------------------------------------*/
  1579.     /* Code Body                                                      */
  1580.     /*----------------------------------------------------------------*/
  1581.     h.scrnID = EMS_TEXT_SIZE_SELECTION_MENU_SCREEN_ID;
  1582.     h.entryFuncPtr = EntryEMSTextSizeSelectionMenu;
  1583.     h.inputBuffer[0] = '';
  1584.     GetCategoryHistory(h.guiBuffer);
  1585.     AddHistory(h);
  1586. }
  1587. #define MAX_EMS_TEXT_STYLE_MENU_ITEMS  4
  1588. #ifdef __UCS2_ENCODING
  1589. U8 *EMS_text_style_menu_items[] = { (U8 *) "Bold",
  1590.     (U8 *) "Italic",
  1591.     (U8 *) "Underline",
  1592.     (U8 *) "Strikethrough",
  1593. };
  1594. #else /* __UCS2_ENCODING */ 
  1595. U8 *EMS_text_style_menu_items[] = { (U8 *) "Bold",
  1596.     (U8 *) "Italic",
  1597.     (U8 *) "Underline",
  1598.     (U8 *) "Strikethrough",
  1599. };
  1600. #endif /* __UCS2_ENCODING */ 
  1601. U8 EMS_text_style_menu_states[] = {0, 0, 0, 0,
  1602. };
  1603. /*****************************************************************************
  1604.  * FUNCTION
  1605.  *  HandleEMSTextStyleSelectionMenuRSK
  1606.  * DESCRIPTION
  1607.  *  
  1608.  * PARAMETERS
  1609.  *  void
  1610.  * RETURNS
  1611.  *  void
  1612.  *****************************************************************************/
  1613. void HandleEMSTextStyleSelectionMenuRSK(void)
  1614. {
  1615.     /*----------------------------------------------------------------*/
  1616.     /* Local Variables                                                */
  1617.     /*----------------------------------------------------------------*/
  1618.     /*----------------------------------------------------------------*/
  1619.     /* Code Body                                                      */
  1620.     /*----------------------------------------------------------------*/
  1621.     if (EMS_text_style_menu_states[0])
  1622.     {
  1623.         EMSTextFormattingMenu_bold = 1;
  1624.     }
  1625.     else
  1626.     {
  1627.         EMSTextFormattingMenu_bold = 0;
  1628.     }
  1629.     if (EMS_text_style_menu_states[1])
  1630.     {
  1631.         EMSTextFormattingMenu_italic = 1;
  1632.     }
  1633.     else
  1634.     {
  1635.         EMSTextFormattingMenu_italic = 0;
  1636.     }
  1637.     if (EMS_text_style_menu_states[2])
  1638.     {
  1639.         EMSTextFormattingMenu_underline = 1;
  1640.     }
  1641.     else
  1642.     {
  1643.         EMSTextFormattingMenu_underline = 0;
  1644.     }
  1645.     if (EMS_text_style_menu_states[3])
  1646.     {
  1647.         EMSTextFormattingMenu_strikethrough = 1;
  1648.     }
  1649.     else
  1650.     {
  1651.         EMSTextFormattingMenu_strikethrough = 0;
  1652.     }
  1653.     GoBackHistory();
  1654. }
  1655. /*****************************************************************************
  1656.  * FUNCTION
  1657.  *  EntryEMSTextStyleSelectionMenu
  1658.  * DESCRIPTION
  1659.  *  
  1660.  * PARAMETERS
  1661.  *  void
  1662.  * RETURNS
  1663.  *  void
  1664.  *****************************************************************************/
  1665. void EntryEMSTextStyleSelectionMenu(void)
  1666. {
  1667.     /*----------------------------------------------------------------*/
  1668.     /* Local Variables                                                */
  1669.     /*----------------------------------------------------------------*/
  1670.     U8 *guiBuffer;
  1671.     /*----------------------------------------------------------------*/
  1672.     /* Code Body                                                      */
  1673.     /*----------------------------------------------------------------*/
  1674.     ExecuteCurrExitHandler();
  1675.     guiBuffer = GetCurrGuiBuffer(EMS_TEXT_STYLE_SELECTION_MENU_SCREEN_ID);
  1676.     if (EMSTextFormattingMenu_bold)
  1677.     {
  1678.         EMS_text_style_menu_states[0] = 1;
  1679.     }
  1680.     else
  1681.     {
  1682.         EMS_text_style_menu_states[0] = 0;
  1683.     }
  1684.     if (EMSTextFormattingMenu_italic)
  1685.     {
  1686.         EMS_text_style_menu_states[1] = 1;
  1687.     }
  1688.     else
  1689.     {
  1690.         EMS_text_style_menu_states[1] = 0;
  1691.     }
  1692.     if (EMSTextFormattingMenu_underline)
  1693.     {
  1694.         EMS_text_style_menu_states[2] = 1;
  1695.     }
  1696.     else
  1697.     {
  1698.         EMS_text_style_menu_states[2] = 0;
  1699.     }
  1700.     if (EMSTextFormattingMenu_strikethrough)
  1701.     {
  1702.         EMS_text_style_menu_states[3] = 1;
  1703.     }
  1704.     else
  1705.     {
  1706.         EMS_text_style_menu_states[3] = 0;
  1707.     }
  1708.     ShowCategory12Screen(
  1709.         0,
  1710.         0,
  1711.         STR_GLOBAL_OK,
  1712.         IMG_GLOBAL_OK,
  1713.         STR_GLOBAL_BACK,
  1714.         IMG_GLOBAL_BACK,
  1715.         MAX_EMS_TEXT_STYLE_MENU_ITEMS,
  1716.         EMS_text_style_menu_items,
  1717.         EMS_text_style_menu_states,
  1718.         0,
  1719.         guiBuffer);
  1720.     SetRightSoftkeyFunction(HandleEMSTextStyleSelectionMenuRSK, KEY_EVENT_UP);
  1721.     SetExitHandler(EMS_TEXT_STYLE_SELECTION_MENU_SCREEN_ID, ExitEMSTextStyleSelectionMenu);
  1722. }
  1723. /*****************************************************************************
  1724.  * FUNCTION
  1725.  *  ExitEMSTextStyleSelectionMenu
  1726.  * DESCRIPTION
  1727.  *  
  1728.  * PARAMETERS
  1729.  *  void
  1730.  * RETURNS
  1731.  *  void
  1732.  *****************************************************************************/
  1733. void ExitEMSTextStyleSelectionMenu(void)
  1734. {
  1735.     /*----------------------------------------------------------------*/
  1736.     /* Local Variables                                                */
  1737.     /*----------------------------------------------------------------*/
  1738.     history h;
  1739.     /*----------------------------------------------------------------*/
  1740.     /* Code Body                                                      */
  1741.     /*----------------------------------------------------------------*/
  1742.     h.scrnID = EMS_TEXT_STYLE_SELECTION_MENU_SCREEN_ID;
  1743.     h.entryFuncPtr = EntryEMSTextStyleSelectionMenu;
  1744.     h.inputBuffer[0] = '';
  1745.     GetCategoryHistory(h.guiBuffer);
  1746.     AddHistory(h);
  1747. }
  1748. #define MAX_EMS_TEXT_ALIGNMENT_MENU_ITEMS 4
  1749. #ifdef __UCS2_ENCODING
  1750. U8 *EMS_text_alignment_menu_items[] = { (U8 *) "Automatic",
  1751.     (U8 *) "Left",
  1752.     (U8 *) "Right",
  1753.     (U8 *) "Center",
  1754. };
  1755. #else /* __UCS2_ENCODING */ 
  1756. U8 *EMS_text_alignment_menu_items[] = { (U8 *) "Automatic",
  1757.     (U8 *) "Left",
  1758.     (U8 *) "Right",
  1759.     (U8 *) "Center",
  1760. };
  1761. #endif /* __UCS2_ENCODING */ 
  1762. /*****************************************************************************
  1763.  * FUNCTION
  1764.  *  HandleEMSTextAlignmentSelectionMenuLSK
  1765.  * DESCRIPTION
  1766.  *  
  1767.  * PARAMETERS
  1768.  *  void
  1769.  * RETURNS
  1770.  *  void
  1771.  *****************************************************************************/
  1772. void HandleEMSTextAlignmentSelectionMenuLSK(void)
  1773. {
  1774.     /*----------------------------------------------------------------*/
  1775.     /* Local Variables                                                */
  1776.     /*----------------------------------------------------------------*/
  1777.     /*----------------------------------------------------------------*/
  1778.     /* Code Body                                                      */
  1779.     /*----------------------------------------------------------------*/
  1780.     EMSTextFormattingMenu_alignment = (U8) GetHighlightedItem();
  1781.     GoBackHistory();
  1782. }
  1783. /*****************************************************************************
  1784.  * FUNCTION
  1785.  *  EntryEMSTextAlignmentSelectionMenu
  1786.  * DESCRIPTION
  1787.  *  
  1788.  * PARAMETERS
  1789.  *  void
  1790.  * RETURNS
  1791.  *  void
  1792.  *****************************************************************************/
  1793. void EntryEMSTextAlignmentSelectionMenu(void)
  1794. {
  1795.     /*----------------------------------------------------------------*/
  1796.     /* Local Variables                                                */
  1797.     /*----------------------------------------------------------------*/
  1798.     U8 *guiBuffer;
  1799.     U16 h;
  1800.     /*----------------------------------------------------------------*/
  1801.     /* Code Body                                                      */
  1802.     /*----------------------------------------------------------------*/
  1803.     ExecuteCurrExitHandler();
  1804.     guiBuffer = GetCurrGuiBuffer(EMS_TEXT_ALIGNMENT_SELECTION_MENU_SCREEN_ID);
  1805.     h = EMSTextFormattingMenu_alignment;
  1806.     ShowCategory36Screen(
  1807.         0,
  1808.         0,
  1809.         STR_GLOBAL_OK,
  1810.         IMG_GLOBAL_OK,
  1811.         STR_GLOBAL_BACK,
  1812.         IMG_GLOBAL_BACK,
  1813.         MAX_EMS_TEXT_ALIGNMENT_MENU_ITEMS,
  1814.         EMS_text_alignment_menu_items,
  1815.         h,
  1816.         guiBuffer);
  1817.     SetLeftSoftkeyFunction(HandleEMSTextAlignmentSelectionMenuLSK, KEY_EVENT_UP);
  1818.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1819.     SetExitHandler(EMS_TEXT_ALIGNMENT_SELECTION_MENU_SCREEN_ID, ExitEMSTextAlignmentSelectionMenu);
  1820. }
  1821. /*****************************************************************************
  1822.  * FUNCTION
  1823.  *  ExitEMSTextAlignmentSelectionMenu
  1824.  * DESCRIPTION
  1825.  *  
  1826.  * PARAMETERS
  1827.  *  void
  1828.  * RETURNS
  1829.  *  void
  1830.  *****************************************************************************/
  1831. void ExitEMSTextAlignmentSelectionMenu(void)
  1832. {
  1833.     /*----------------------------------------------------------------*/
  1834.     /* Local Variables                                                */
  1835.     /*----------------------------------------------------------------*/
  1836.     history h;
  1837.     /*----------------------------------------------------------------*/
  1838.     /* Code Body                                                      */
  1839.     /*----------------------------------------------------------------*/
  1840.     h.scrnID = EMS_TEXT_ALIGNMENT_SELECTION_MENU_SCREEN_ID;
  1841.     h.entryFuncPtr = EntryEMSTextAlignmentSelectionMenu;
  1842.     h.inputBuffer[0] = '';
  1843.     GetCategoryHistory(h.guiBuffer);
  1844.     AddHistory(h);
  1845. }
  1846. /*****************************************************************************
  1847.  * FUNCTION
  1848.  *  HandleEMSNewParagraphAlignmentMenuLSK
  1849.  * DESCRIPTION
  1850.  *  
  1851.  * PARAMETERS
  1852.  *  void
  1853.  * RETURNS
  1854.  *  void
  1855.  *****************************************************************************/
  1856. void HandleEMSNewParagraphAlignmentMenuLSK(void)
  1857. {
  1858.     /*----------------------------------------------------------------*/
  1859.     /* Local Variables                                                */
  1860.     /*----------------------------------------------------------------*/
  1861.     /*----------------------------------------------------------------*/
  1862.     /* Code Body                                                      */
  1863.     /*----------------------------------------------------------------*/
  1864.     EMSTextFormattingMenu_alignment = (U8) GetHighlightedItem();
  1865.     GoBackHistory();
  1866.     StoreEMSTextFormattingMenu();
  1867.     EMS_inputbox_insert_new_line();
  1868.     GoBackHistory();
  1869.     GoBackHistory();
  1870. }
  1871. /*****************************************************************************
  1872.  * FUNCTION
  1873.  *  EntryEMSNewParagraphAlignmentMenu
  1874.  * DESCRIPTION
  1875.  *  
  1876.  * PARAMETERS
  1877.  *  void
  1878.  * RETURNS
  1879.  *  void
  1880.  *****************************************************************************/
  1881. void EntryEMSNewParagraphAlignmentMenu(void)
  1882. {
  1883.     /*----------------------------------------------------------------*/
  1884.     /* Local Variables                                                */
  1885.     /*----------------------------------------------------------------*/
  1886.     U8 *guiBuffer;
  1887.     U16 h;
  1888.     /*----------------------------------------------------------------*/
  1889.     /* Code Body                                                      */
  1890.     /*----------------------------------------------------------------*/
  1891.     ExecuteCurrExitHandler();
  1892.     guiBuffer = GetCurrGuiBuffer(EMS_TEXT_ALIGNMENT_SELECTION_MENU_SCREEN_ID);
  1893.     h = EMSTextFormattingMenu_alignment;
  1894.     ShowCategory36Screen(
  1895.         0,
  1896.         0,
  1897.         STR_GLOBAL_OK,
  1898.         IMG_GLOBAL_OK,
  1899.         STR_GLOBAL_BACK,
  1900.         IMG_GLOBAL_BACK,
  1901.         MAX_EMS_TEXT_ALIGNMENT_MENU_ITEMS,
  1902.         EMS_text_alignment_menu_items,
  1903.         h,
  1904.         guiBuffer);
  1905.     SetLeftSoftkeyFunction(HandleEMSNewParagraphAlignmentMenuLSK, KEY_EVENT_UP);
  1906.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1907.     SetExitHandler(EMS_TEXT_ALIGNMENT_SELECTION_MENU_SCREEN_ID, ExitEMSTextAlignmentSelectionMenu);
  1908. }
  1909. /*****************************************************************************
  1910.  * FUNCTION
  1911.  *  ExitEMSNewParagraphAlignmentMenu
  1912.  * DESCRIPTION
  1913.  *  
  1914.  * PARAMETERS
  1915.  *  void
  1916.  * RETURNS
  1917.  *  void
  1918.  *****************************************************************************/
  1919. void ExitEMSNewParagraphAlignmentMenu(void)
  1920. {
  1921.     /*----------------------------------------------------------------*/
  1922.     /* Local Variables                                                */
  1923.     /*----------------------------------------------------------------*/
  1924.     history h;
  1925.     /*----------------------------------------------------------------*/
  1926.     /* Code Body                                                      */
  1927.     /*----------------------------------------------------------------*/
  1928.     h.scrnID = EMS_TEXT_ALIGNMENT_SELECTION_MENU_SCREEN_ID;
  1929.     h.entryFuncPtr = EntryEMSTextAlignmentSelectionMenu;
  1930.     h.inputBuffer[0] = '';
  1931.     GetCategoryHistory(h.guiBuffer);
  1932.     AddHistory(h);
  1933. }
  1934. #endif /* (EMS_USE_INTERNAL_MENU) */ /* __MMI_MESSAGES_EMS__ */
  1935. #endif /* __MMI_MESSAGES_EMS__ */ /* UI_DISABLE_EMS_INPUT_BOX */
  1936. /* EMS input box history related functions   */
  1937. extern U8 history_valid(U16 history_ID, U16 category_screen_ID);
  1938. /*****************************************************************************
  1939.  * FUNCTION
  1940.  *  get_EMS_inputbox_category_history
  1941.  * DESCRIPTION
  1942.  *  
  1943.  * PARAMETERS
  1944.  *  history_ID          [IN]        
  1945.  *  history_buffer      [?]         
  1946.  *  input_type          [IN]        
  1947.  * RETURNS
  1948.  *  void
  1949.  *****************************************************************************/
  1950. void get_EMS_inputbox_category_history(U16 history_ID, U8 *history_buffer, S16 input_type)
  1951. {
  1952.     /*----------------------------------------------------------------*/
  1953.     /* Local Variables                                                */
  1954.     /*----------------------------------------------------------------*/
  1955.     /*----------------------------------------------------------------*/
  1956.     /* Code Body                                                      */
  1957.     /*----------------------------------------------------------------*/
  1958.     if (history_buffer != NULL)
  1959.     {
  1960.         U16 hID = (U16) (history_ID | 0x8000);
  1961.         EMS_inputbox_category_history *h = (EMS_inputbox_category_history*) history_buffer;
  1962.         h->history_ID = hID;
  1963.         h->cursor_ax = (S16) MMI_EMS_inputbox.cursor_ax;
  1964.         h->cursor_ay = (S16) MMI_EMS_inputbox.cursor_ay;
  1965.         h->cursor_line_height = (S16) MMI_EMS_inputbox.cursor_line_height;
  1966.         h->display_y = (S16) MMI_EMS_inputbox.display_y;
  1967.         h->input_type = (S16) input_type;
  1968.         h->UCS2_count = (S16) MMI_EMS_inputbox.UCS2_count;
  1969.     #if defined(__MMI_TOUCH_SCREEN__)
  1970.         //W05.32 Virtual Keyboard History Issue
  1971.         //W05.41 Do not Strore Virtual Keyboard into History when View Mode
  1972.         if (!(MMI_EMS_inputbox.flags & UI_EMS_INPUT_BOX_VIEW_MODE))
  1973.         {
  1974.             if (GUI_VIRTUAL_KEYBOARD_MAX_LANG == mmi_pen_editor_history_vk_lang_type())
  1975.             {
  1976.                 h->vk_lang_type = MMI_virtual_keyboard.lang_type;
  1977.             }
  1978.             else
  1979.             {
  1980.                 h->vk_lang_type = mmi_pen_editor_history_vk_lang_type();
  1981.             }
  1982.         }
  1983.         else
  1984.         {
  1985.             h->vk_lang_type = GUI_VIRTUAL_KEYBOARD_EMPTY_TRAY;
  1986.         }
  1987.     #endif /* defined(__MMI_TOUCH_SCREEN__) */ 
  1988.     }
  1989. }
  1990. /*****************************************************************************
  1991.  * FUNCTION
  1992.  *  set_EMS_inputbox_category_history
  1993.  * DESCRIPTION
  1994.  *  
  1995.  * PARAMETERS
  1996.  *  history_ID          [IN]        
  1997.  *  history_buffer      [?]         
  1998.  *  input_type          [?]         
  1999.  * RETURNS
  2000.  *  
  2001.  *****************************************************************************/
  2002. U8 set_EMS_inputbox_category_history(U16 history_ID, U8 *history_buffer, S16 *input_type)
  2003. {
  2004.     /*----------------------------------------------------------------*/
  2005.     /* Local Variables                                                */
  2006.     /*----------------------------------------------------------------*/
  2007.     /*----------------------------------------------------------------*/
  2008.     /* Code Body                                                      */
  2009.     /*----------------------------------------------------------------*/
  2010.     if (history_buffer != NULL)
  2011.     {
  2012.         EMS_inputbox_category_history *h = (EMS_inputbox_category_history*) history_buffer;
  2013.         if (history_valid(h->history_ID, history_ID))
  2014.         {
  2015.             MMI_EMS_inputbox.cursor_ax = h->cursor_ax;
  2016.             MMI_EMS_inputbox.cursor_ay = h->cursor_ay;
  2017.             MMI_EMS_inputbox.cursor_line_height = h->cursor_line_height;
  2018.             MMI_EMS_inputbox.display_y = h->display_y;
  2019.             MMI_EMS_inputbox.UCS2_count = h->UCS2_count;
  2020.             *input_type = h->input_type;
  2021.         #if defined(__MMI_TOUCH_DIAL_SCREEN__)
  2022.             /* W05.32 Virtual Keyboard History Issue */
  2023.             wgui_setup_virtual_keyboard(h->vk_lang_type);
  2024.         #endif /* defined(__MMI_TOUCH_DIAL_SCREEN__) */ 
  2025.             return (1);
  2026.         }
  2027.     }
  2028.     return (0);
  2029. }
  2030. #endif /* (!UI_DISABLE_EMS_INPUT_BOX) */ /* UI_DISABLE_EMS_CATEGORY_SCREENS  */
  2031. extern void set_MMI_current_input_type(void);
  2032. S32 wgui_EMS_inputbox_information_bar_x;
  2033. S32 wgui_EMS_inputbox_information_bar_y;
  2034. S32 wgui_EMS_inputbox_information_bar_width;
  2035. S32 wgui_EMS_inputbox_information_bar_height;
  2036. U8 wgui_EMS_inputbox_information_flag = 0;
  2037. PU8 wgui_EMS_inputbox_information_icon = NULL;
  2038. /*****************************************************************************
  2039.  * FUNCTION
  2040.  *  wgui_EMS_setup_input_information
  2041.  * DESCRIPTION
  2042.  *  
  2043.  * PARAMETERS
  2044.  *  x           [IN]        
  2045.  *  y           [IN]        
  2046.  *  width       [IN]        
  2047.  *  height      [IN]        
  2048.  * RETURNS
  2049.  *  void
  2050.  *****************************************************************************/
  2051. void wgui_EMS_setup_input_information(S32 x, S32 y, S32 width, S32 height)
  2052. {
  2053.     /*----------------------------------------------------------------*/
  2054.     /* Local Variables                                                */
  2055.     /*----------------------------------------------------------------*/
  2056.     /*----------------------------------------------------------------*/
  2057.     /* Code Body                                                      */
  2058.     /*----------------------------------------------------------------*/
  2059.     wgui_EMS_inputbox_information_bar_x = x;
  2060.     wgui_EMS_inputbox_information_bar_y = y;
  2061.     wgui_EMS_inputbox_information_bar_width = width;
  2062.     wgui_EMS_inputbox_information_bar_height = height;
  2063. }
  2064. /*****************************************************************************
  2065.  * FUNCTION
  2066.  *  wgui_EMS_input_information_background
  2067.  * DESCRIPTION
  2068.  *  
  2069.  * PARAMETERS
  2070.  *  x1      [IN]        
  2071.  *  y1      [IN]        
  2072.  *  x2      [IN]        
  2073.  *  y2      [IN]        
  2074.  * RETURNS
  2075.  *  void
  2076.  *****************************************************************************/
  2077. void wgui_EMS_input_information_background(S32 x1, S32 y1, S32 x2, S32 y2)
  2078. {
  2079.     /*----------------------------------------------------------------*/
  2080.     /* Local Variables                                                */
  2081.     /*----------------------------------------------------------------*/
  2082.     /* Now reads color from the theme structure  */
  2083.     color c = *current_MMI_theme->information_bar_color;
  2084.     /*----------------------------------------------------------------*/
  2085.     /* Code Body                                                      */
  2086.     /*----------------------------------------------------------------*/
  2087.     gui_reset_clip();
  2088.     /* W05.39 Set Information Bar Background as GDI_COLOR_TRANSPARENT when wgui_is_wallpaper_on_bottom */
  2089.     if (wgui_is_wallpaper_on_bottom() == MMI_TRUE)
  2090.     {
  2091.         gdi_draw_solid_rect(x1, y1, x2, y2, GDI_COLOR_TRANSPARENT);     /* 061705 Calvin added */
  2092.     }
  2093.     else
  2094.     {
  2095.         gui_fill_rectangle(x1, y1, x2, y2, c);
  2096.     }
  2097. }
  2098. //MTK Elvis modify for THai
  2099. //MTK Elvis 20031203
  2100. //START PMTFARHAD 20050224
  2101. #if defined __MMI_LANG_HINDI__ && (defined __MMI_LANG_ARABIC__ || defined __MMI_LANG_PERSIAN__)
  2102. extern S32 HINDI_PRESENT;
  2103. extern S32 ARABIC_PRESENT;
  2104. S32 IS_ARABIC = 0;
  2105. S32 IS_HINDI = 0;
  2106. #endif /* defined __MMI_LANG_HINDI__ && (defined __MMI_LANG_ARABIC__ || defined __MMI_LANG_PERSIAN__) */ 
  2107. /* END PMTFARHAD 20050224 */
  2108. #if defined(__MMI_TOUCH_SCREEN__)
  2109. extern UI_filled_area information_bar_BG_filler;
  2110. #endif 
  2111. #if defined(__MMI_TOUCH_SCREEN__)
  2112. extern S32 wgui_information_bar_input_mode_display_width;
  2113. extern S32 wgui_information_bar_input_mode_display_height;
  2114. #endif
  2115. /*****************************************************************************
  2116.  * FUNCTION
  2117.  *  wgui_EMS_show_input_mode
  2118.  * DESCRIPTION
  2119.  *  
  2120.  * PARAMETERS
  2121.  *  void
  2122.  * RETURNS
  2123.  *  void
  2124.  *****************************************************************************/
  2125. void wgui_EMS_show_input_mode(void)
  2126. {
  2127.     /*----------------------------------------------------------------*/
  2128.     /* Local Variables                                                */
  2129.     /*----------------------------------------------------------------*/
  2130.     color c = *current_MMI_theme->input_method_text_color;
  2131. #if !defined(__MMI_TOUCH_SCREEN__)
  2132.     stFontAttribute *f = &MMI_small_font;
  2133. #else /* !defined(__MMI_TOUCH_SCREEN__) */ 
  2134.     stFontAttribute *f = &MMI_medium_font;
  2135.     S32 rect_height;
  2136. #endif /* !defined(__MMI_TOUCH_SCREEN__) */ 
  2137.     S32 x;
  2138.     UI_string_type inputmode_string = (UI_string_type) "";
  2139.     S32 width, height;
  2140. #ifdef __MMI_HINDI_ALG__
  2141.     U16 name[] = {IV_A, IV_AA, IV_I, 0x0};
  2142. #endif 
  2143.     /* PMT RAKESH START 20061006 */
  2144. #if defined (__MMI_LANG_MARATHI__)
  2145.     U16 input_mode_marathi_string_array[] = {C_MA, C_RA, DV_AA, C_TTHA, DV_II, 0x0};
  2146. #endif 
  2147.     /* PMT RAKESH END 20061006 */
  2148.     /*----------------------------------------------------------------*/
  2149.     /* Code Body                                                      */
  2150.     /*----------------------------------------------------------------*/
  2151. #if defined(__MMI_TOUCH_SCREEN__)
  2152.     wgui_information_bar_input_mode_display_width = 0;
  2153.     wgui_information_bar_input_mode_display_height = 0;
  2154. #endif
  2155.     switch (MMI_current_input_mode)
  2156.     {
  2157.         case INPUT_MODE_MULTITAP_UPPERCASE_ABC:
  2158.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_ABC_STRING_ID);
  2159.             break;
  2160.         case INPUT_MODE_MULTITAP_LOWERCASE_ABC:
  2161.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_abc_STRING_ID);
  2162.             break;
  2163.             /* PMT dara added for Multitap thai */
  2164.     #if defined (__MMI_MULTITAP_THAI__)
  2165.         case INPUT_MODE_MULTITAP_THAI:
  2166.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_thai_STRING_ID);
  2167.             break;
  2168.     #endif /* defined (__MMI_MULTITAP_THAI__) */ 
  2169.             /* MTK Terry for Spanish French German Italian Russian Turkish Portuguese Indonesian Malay Vietnamese */
  2170.     #if defined(__MMI_MULTITAP_SPANISH__)
  2171.         case INPUT_MODE_MULTITAP_UPPERCASE_SPANISH:
  2172.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_SPANISH_STRING_ID);
  2173.             break;
  2174.         case INPUT_MODE_MULTITAP_LOWERCASE_SPANISH:
  2175.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_spanish_STRING_ID);
  2176.             break;
  2177.     #endif /* defined(__MMI_MULTITAP_SPANISH__) */ 
  2178.             /* PMT VIKASG START 20050729 */
  2179.     #if defined(__MMI_MULTITAP_DANISH__)
  2180.         case INPUT_MODE_MULTITAP_UPPERCASE_DANISH:
  2181.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_DANISH_STRING_ID);
  2182.             break;
  2183.         case INPUT_MODE_MULTITAP_LOWERCASE_DANISH:
  2184.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_danish_STRING_ID);
  2185.             break;
  2186.     #endif /* defined(__MMI_MULTITAP_DANISH__) */ 
  2187.             //PMT VIKASG END 20050729
  2188.             //PMT CZ_PO_TU START 20050812
  2189.     #if defined(__MMI_MULTITAP_POLISH__)
  2190.         case INPUT_MODE_MULTITAP_UPPERCASE_POLISH:
  2191.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_POLISH_STRING_ID);
  2192.             break;
  2193.         case INPUT_MODE_MULTITAP_LOWERCASE_POLISH:
  2194.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_polish_STRING_ID);
  2195.             break;
  2196.     #endif /* defined(__MMI_MULTITAP_POLISH__) */ 
  2197.             /* PMT CZ_PO_TU END 20050812 */
  2198.     #if defined(__MMI_MULTITAP_FRENCH__)
  2199.         case INPUT_MODE_MULTITAP_UPPERCASE_FRENCH:
  2200.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_FRENCH_STRING_ID);
  2201.             break;
  2202.         case INPUT_MODE_MULTITAP_LOWERCASE_FRENCH:
  2203.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_french_STRING_ID);
  2204.             break;
  2205.     #endif /* defined(__MMI_MULTITAP_FRENCH__) */ 
  2206.     #if defined(__MMI_MULTITAP_GERMAN__)
  2207.         case INPUT_MODE_MULTITAP_UPPERCASE_GERMAN:
  2208.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_GERMAN_STRING_ID);
  2209.             break;
  2210.         case INPUT_MODE_MULTITAP_LOWERCASE_GERMAN:
  2211.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_german_STRING_ID);
  2212.             break;
  2213.     #endif /* defined(__MMI_MULTITAP_GERMAN__) */ 
  2214.     #if defined(__MMI_MULTITAP_ITALIAN__)
  2215.         case INPUT_MODE_MULTITAP_UPPERCASE_ITALIAN:
  2216.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_ITALIAN_STRING_ID);
  2217.             break;
  2218.         case INPUT_MODE_MULTITAP_LOWERCASE_ITALIAN:
  2219.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_italian_STRING_ID);
  2220.             break;
  2221.     #endif /* defined(__MMI_MULTITAP_ITALIAN__) */ 
  2222.     #if defined(__MMI_MULTITAP_RUSSIAN__)
  2223.         case INPUT_MODE_MULTITAP_UPPERCASE_RUSSIAN:
  2224.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_RUSSIAN_STRING_ID);
  2225.             break;
  2226.         case INPUT_MODE_MULTITAP_LOWERCASE_RUSSIAN:
  2227.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_russian_STRING_ID);
  2228.             break;
  2229.     #endif /* defined(__MMI_MULTITAP_RUSSIAN__) */ 
  2230.             /* PMT BULGARIAN START 20051201 */
  2231.     #if defined(__MMI_MULTITAP_BULGARIAN__)
  2232.         case INPUT_MODE_MULTITAP_UPPERCASE_BULGARIAN:
  2233.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_BULGARIAN_STRING_ID);
  2234.             break;
  2235.         case INPUT_MODE_MULTITAP_LOWERCASE_BULGARIAN:
  2236.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_bulgarian_STRING_ID);
  2237.             break;
  2238.     #endif /* defined(__MMI_MULTITAP_BULGARIAN__) */ 
  2239.             /* PMT BULGARIAN END 20051201 */
  2240.     #if defined(__MMI_MULTITAP_TURKISH__)
  2241.         case INPUT_MODE_MULTITAP_UPPERCASE_TURKISH:
  2242.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_TURKISH_STRING_ID);
  2243.             break;
  2244.         case INPUT_MODE_MULTITAP_LOWERCASE_TURKISH:
  2245.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_turkish_STRING_ID);
  2246.             break;
  2247.     #endif /* defined(__MMI_MULTITAP_TURKISH__) */ 
  2248.     #if defined(__MMI_MULTITAP_PORTUGUESE__)
  2249.         case INPUT_MODE_MULTITAP_UPPERCASE_PORTUGUESE:
  2250.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_PORTUGUESE_STRING_ID);
  2251.             break;
  2252.         case INPUT_MODE_MULTITAP_LOWERCASE_PORTUGUESE:
  2253.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_portuguese_STRING_ID);
  2254.             break;
  2255.     #endif /* defined(__MMI_MULTITAP_PORTUGUESE__) */ 
  2256.     #if defined(__MMI_HINDI_ALG__)
  2257.         case INPUT_MODE_MULTITAP_HINDI:
  2258.             inputmode_string = (UI_string_type) name;
  2259.             break;
  2260.     #endif /* defined(__MMI_HINDI_ALG__) */ 
  2261.             /* PMT RAKESH START 20061006 */
  2262.     #if defined(__MMI_MULTITAP_MARATHI__)
  2263.         case INPUT_MODE_MULTITAP_MARATHI:
  2264.             inputmode_string = (UI_string_type) input_mode_marathi_string_array;
  2265.             break;
  2266.     #endif /* defined(__MMI_MULTITAP_MARATHI__) */ 
  2267.             /* PMT RAKESH END 20061006 */
  2268.     #if defined(__MMI_MULTITAP_INDONESIAN__)
  2269.         case INPUT_MODE_MULTITAP_UPPERCASE_INDONESIAN:
  2270.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_INDONESIAN_STRING_ID);
  2271.             break;
  2272.         case INPUT_MODE_MULTITAP_LOWERCASE_INDONESIAN:
  2273.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_indonesian_STRING_ID);
  2274.             break;
  2275.     #endif /* defined(__MMI_MULTITAP_INDONESIAN__) */ 
  2276.             /* PMT CZ_PO_TU START 20050812 */
  2277.     #if defined(__MMI_MULTITAP_CZECH__)
  2278.         case INPUT_MODE_MULTITAP_UPPERCASE_CZECH:
  2279.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_CZECH_STRING_ID);
  2280.             break;
  2281.         case INPUT_MODE_MULTITAP_LOWERCASE_CZECH:
  2282.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_czech_STRING_ID);
  2283.             break;
  2284.     #endif /* defined(__MMI_MULTITAP_CZECH__) */ 
  2285.             /* PMT CZ_PO_TU END 20050812 */
  2286.     #if defined(__MMI_MULTITAP_MALAY__)
  2287.         case INPUT_MODE_MULTITAP_UPPERCASE_MALAY:
  2288.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_MALAY_STRING_ID);
  2289.             break;
  2290.         case INPUT_MODE_MULTITAP_LOWERCASE_MALAY:
  2291.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_malay_STRING_ID);
  2292.             break;
  2293.     #endif /* defined(__MMI_MULTITAP_MALAY__) */ 
  2294.     #if defined(__MMI_MULTITAP_VIETNAMESE__)
  2295.         case INPUT_MODE_MULTITAP_UPPERCASE_VIETNAMESE:
  2296.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_VIETNAMESE_STRING_ID);
  2297.             break;
  2298.         case INPUT_MODE_MULTITAP_LOWERCASE_VIETNAMESE:
  2299.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_vietnamese_STRING_ID);
  2300.             break;
  2301.     #endif /* defined(__MMI_MULTITAP_VIETNAMESE__) */ 
  2302.             /* PMT START HU_FI 20050825 */
  2303.     #if defined(__MMI_MULTITAP_FINNISH__)
  2304.         case INPUT_MODE_MULTITAP_UPPERCASE_FINNISH:
  2305.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_FINNISH_STRING_ID);
  2306.             break;
  2307.         case INPUT_MODE_MULTITAP_LOWERCASE_FINNISH:
  2308.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_finnish_STRING_ID);
  2309.             break;
  2310.     #endif /* defined(__MMI_MULTITAP_FINNISH__) */ 
  2311.     #if defined(__MMI_MULTITAP_HUNGARIAN__)
  2312.         case INPUT_MODE_MULTITAP_UPPERCASE_HUNGARIAN:
  2313.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_HUNGARIAN_STRING_ID);
  2314.             break;
  2315.         case INPUT_MODE_MULTITAP_LOWERCASE_HUNGARIAN:
  2316.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_hungarian_STRING_ID);
  2317.             break;
  2318.     #endif /* defined(__MMI_MULTITAP_HUNGARIAN__) */ 
  2319.             //PMT END HU_FI 20050825
  2320.             //MTK end
  2321.             /* PMT START GR_HE_CZ_FI_DA_HU 20051007 */
  2322.     #if defined(__MMI_MULTITAP_HEBREW__)
  2323.         case INPUT_MODE_MULTITAP_HEBREW:
  2324.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_HEBREW_STRING_ID);
  2325.             break;
  2326.     #endif /* defined(__MMI_MULTITAP_HEBREW__) */ 
  2327.             //PMT END GR_HE_CZ_FI_DA_HU 20051007
  2328.             //PMT NO_AR_SL_DU START 20050909
  2329.     #if defined(__MMI_MULTITAP_SLOVAK__)
  2330.         case INPUT_MODE_MULTITAP_UPPERCASE_SLOVAK:
  2331.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_SLOVAK_STRING_ID);
  2332.             break;
  2333.         case INPUT_MODE_MULTITAP_LOWERCASE_SLOVAK:
  2334.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_slovak_STRING_ID);
  2335.             break;
  2336.     #endif /* defined(__MMI_MULTITAP_SLOVAK__) */ 
  2337.     #if defined(__MMI_MULTITAP_DUTCH__)
  2338.         case INPUT_MODE_MULTITAP_UPPERCASE_DUTCH:
  2339.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_DUTCH_STRING_ID);
  2340.             break;
  2341.         case INPUT_MODE_MULTITAP_LOWERCASE_DUTCH:
  2342.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_dutch_STRING_ID);
  2343.             break;
  2344.     #endif /* defined(__MMI_MULTITAP_DUTCH__) */ 
  2345.     #if defined(__MMI_MULTITAP_ARABIC__)
  2346.         case INPUT_MODE_MULTITAP_ARABIC:
  2347.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_ARABIC_STRING_ID);
  2348.             break;
  2349.     #endif /* defined(__MMI_MULTITAP_ARABIC__) */ 
  2350.             /* PMT START PERSIAN */
  2351.     #if defined(__MMI_MULTITAP_PERSIAN__)
  2352.         case INPUT_MODE_MULTITAP_PERSIAN:
  2353.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_PERSIAN_STRING_ID);
  2354.             break;
  2355.     #endif /* defined(__MMI_MULTITAP_PERSIAN__) */ 
  2356.             /* PMT END PERSIAN */
  2357.             /* Norwegian start */
  2358.     #if defined(__MMI_MULTITAP_NORWEGIAN__)
  2359.         case INPUT_MODE_MULTITAP_UPPERCASE_NORWEGIAN:
  2360.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_NORWEGIAN_STRING_ID);
  2361.             break;
  2362.         case INPUT_MODE_MULTITAP_LOWERCASE_NORWEGIAN:
  2363.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_norwegian_STRING_ID);
  2364.             break;
  2365.     #endif /* defined(__MMI_MULTITAP_NORWEGIAN__) */ 
  2366.             //Norwegian end
  2367.             //PMT NO_AR_SL_DU END 20050909
  2368.             //PMT START SWEDISH 20050916
  2369.     #if defined(__MMI_MULTITAP_SWEDISH__)
  2370.         case INPUT_MODE_MULTITAP_UPPERCASE_SWEDISH:
  2371.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_SWEDISH_STRING_ID);
  2372.             break;
  2373.         case INPUT_MODE_MULTITAP_LOWERCASE_SWEDISH:
  2374.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_swedish_STRING_ID);
  2375.             break;
  2376.     #endif /* defined(__MMI_MULTITAP_SWEDISH__) */ 
  2377.             /* PMT END SWEDISH 20050916 */
  2378.             /* PMT START CR_ROM_SLO 20050923 */
  2379.     #if defined(__MMI_MULTITAP_CROATIAN__)
  2380.         case INPUT_MODE_MULTITAP_UPPERCASE_CROATIAN:
  2381.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_CROATIAN_STRING_ID);
  2382.             break;
  2383.         case INPUT_MODE_MULTITAP_LOWERCASE_CROATIAN:
  2384.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_croatian_STRING_ID);
  2385.             break;
  2386.     #endif /* defined(__MMI_MULTITAP_CROATIAN__) */ 
  2387.     #if defined(__MMI_MULTITAP_ROMANIAN__)
  2388.         case INPUT_MODE_MULTITAP_UPPERCASE_ROMANIAN:
  2389.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_ROMANIAN_STRING_ID);
  2390.             break;
  2391.         case INPUT_MODE_MULTITAP_LOWERCASE_ROMANIAN:
  2392.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_romanian_STRING_ID);
  2393.             break;
  2394.     #endif /* defined(__MMI_MULTITAP_ROMANIAN__) */ 
  2395.     #if defined(__MMI_MULTITAP_SLOVENIAN__)
  2396.         case INPUT_MODE_MULTITAP_UPPERCASE_SLOVENIAN:
  2397.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_SLOVENIAN_STRING_ID);
  2398.             break;
  2399.         case INPUT_MODE_MULTITAP_LOWERCASE_SLOVENIAN:
  2400.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_slovenian_STRING_ID);
  2401.             break;
  2402.     #endif /* defined(__MMI_MULTITAP_SLOVENIAN__) */ 
  2403.             //PMT END CR_ROM_SLO 20050923
  2404.             //PMT START GR_HE_CZ_FI_DA_HU 20051007
  2405.     #if defined(__MMI_MULTITAP_GREEK__)
  2406.         case INPUT_MODE_MULTITAP_UPPERCASE_GREEK:
  2407.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_GREEK_STRING_ID);
  2408.             break;
  2409.         case INPUT_MODE_MULTITAP_LOWERCASE_GREEK:
  2410.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_greek_STRING_ID);
  2411.             break;
  2412.     #endif /* defined(__MMI_MULTITAP_GREEK__) */ 
  2413.             /* PMT END GR_HE_CZ_FI_DA_HU 20051007 */
  2414.         case INPUT_MODE_123:
  2415.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_123_STRING_ID);
  2416.             break;
  2417.         case INPUT_MODE_SMART_UPPERCASE_ABC:
  2418.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_ABC_STRING_ID);
  2419.             break;
  2420.         case INPUT_MODE_SMART_LOWERCASE_ABC:
  2421.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_abc_STRING_ID);
  2422.             break;
  2423. //KP Jerry modify on 2007-4-18 start
  2424. #ifdef __MMI_LANG_THAI__      //KP Jerry add on 2007-4-17
  2425.         case INPUT_MODE_SMART_THAI:
  2426.             inputmode_string = (UI_string_type) get_string(STR_INPUT_METHOD_THAI);
  2427.             break;
  2428.             //MTK Elvis for R2L characters
  2429.             //PMT START GR_HE_CZ_FI_DA_HU 20051007
  2430. #endif/*__MMI_LANG_THAI__*/      //KP Jerry add on 2007-4-17
  2431. #ifdef __MMI_LANG_ARABIC__      //KP Jerry add on 2007-4-17
  2432.         case INPUT_MODE_SMART_ARABIC:
  2433.             inputmode_string = (UI_string_type) get_string(STR_INPUT_METHOD_ARABIC);
  2434.             break;
  2435.             /* PMT START PERSIAN */
  2436. #endif/*__MMI_LANG_ARABIC__*/      //KP Jerry add on 2007-4-17
  2437. #ifdef __MMI_LANG_PERSIAN__      //KP Jerry add on 2007-4-17
  2438.         case INPUT_MODE_SMART_PERSIAN:
  2439.             inputmode_string = (UI_string_type) get_string(STR_INPUT_METHOD_PERSIAN);
  2440.             break;
  2441.             /* PMT END PERSIAN */
  2442.             /* PMT VIKAS GUPTA START 20051129 */
  2443. #endif/*__MMI_LANG_PERSIAN__*/      //KP Jerry add on 2007-4-17
  2444. #ifdef __MMI_LANG_HINDI__      //KP Jerry add on 2007-4-17
  2445.         case INPUT_MODE_SMART_HINDI:
  2446.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_HINDI_STRING_ID);
  2447.             break;
  2448. #endif/*__MMI_LANG_HINDI__*/      //KP Jerry add on 2007-4-17
  2449. #ifdef __MMI_LANG_HEBREW__      //KP Jerry add on 2007-4-17
  2450.         case INPUT_MODE_SMART_HEBREW:
  2451.             inputmode_string = (UI_string_type) get_string(STR_INPUT_METHOD_HEBREW);
  2452.             break;
  2453.             /* PMT END GR_HE_CZ_FI_DA_HU 20051007 */
  2454. #endif/*__MMI_LANG_HEBREW__*/      //KP Jerry add on 2007-4-17
  2455.             //PMT VIKAS GUPTA END 20051129
  2456.             //MTK end
  2457. //KP Jerry modify on 2007-4-18 end
  2458.             //MTK Terry for Spanish French German Italian Russian Turkish Portuguese Indonesian Malay Vietnamese
  2459.     #if defined(__MMI_T9_SPANISH__) || defined(__MMI_ZI_EU_SPANISH__) || defined(__MMI_ZI_SA_SPANISH__) || defined(__MMI_CSTAR_SPANISH__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2460.         case INPUT_MODE_SMART_UPPERCASE_SPANISH:
  2461.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_SPANISH_STRING_ID);
  2462.             break;
  2463.         case INPUT_MODE_SMART_LOWERCASE_SPANISH:
  2464.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_spanish_STRING_ID);
  2465.             break;
  2466.     #endif /* defined(__MMI_T9_SPANISH__) || defined(__MMI_ZI_EU_SPANISH__) || defined(__MMI_ZI_SA_SPANISH__) */ 
  2467.             /* PMT VIKASG START 20050729 */
  2468.     #if defined(__MMI_T9_DANISH__) || defined(__MMI_ZI_DANISH__) || defined(__MMI_CSTAR_DANISH__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2469.         case INPUT_MODE_SMART_UPPERCASE_DANISH: /* Danish-Vikas */
  2470.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_DANISH_STRING_ID);
  2471.             break;
  2472.         case INPUT_MODE_SMART_LOWERCASE_DANISH:
  2473.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_danish_STRING_ID);
  2474.             break;
  2475.     #endif /* defined(__MMI_T9_DANISH__) || defined(__MMI_ZI_DANISH__) */ 
  2476.             //PMT VIKASG END 20050729
  2477.             //PMT CZ_PO_TU START 20050812
  2478.     #if defined(__MMI_T9_POLISH__) || defined(__MMI_ZI_POLISH__) || defined(__MMI_CSTAR_POLISH__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2479.         case INPUT_MODE_SMART_UPPERCASE_POLISH: /* Polish-Vikas */
  2480.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_POLISH_STRING_ID);
  2481.             break;
  2482.         case INPUT_MODE_SMART_LOWERCASE_POLISH:
  2483.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_polish_STRING_ID);
  2484.             break;
  2485.     #endif /* defined(__MMI_T9_POLISH__) || defined(__MMI_ZI_POLISH__) */ 
  2486.             /* PMT CZ_PO_TU END 20050812 */
  2487.     #if defined(__MMI_T9_FRENCH__) || defined(__MMI_ZI_CA_FRENCH__) || defined(__MMI_ZI_EU_FRENCH__) || defined(__MMI_CSTAR_FRENCH__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2488.         case INPUT_MODE_SMART_UPPERCASE_FRENCH:
  2489.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_FRENCH_STRING_ID);
  2490.             break;
  2491.         case INPUT_MODE_SMART_LOWERCASE_FRENCH:
  2492.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_french_STRING_ID);
  2493.             break;
  2494.     #endif /* defined(__MMI_T9_FRENCH__) || defined(__MMI_ZI_CA_FRENCH__) || defined(__MMI_ZI_EU_FRENCH__) */ 
  2495.     #if defined(__MMI_T9_GERMAN__) || defined(__MMI_ZI_GERMAN__) || defined(__MMI_CSTAR_GERMAN__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2496.         case INPUT_MODE_SMART_UPPERCASE_GERMAN:
  2497.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_GERMAN_STRING_ID);
  2498.             break;
  2499.         case INPUT_MODE_SMART_LOWERCASE_GERMAN:
  2500.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_german_STRING_ID);
  2501.             break;
  2502.     #endif /* defined(__MMI_T9_GERMAN__) || defined(__MMI_ZI_GERMAN__) */ 
  2503.     #if defined(__MMI_T9_ITALIAN__) || defined(__MMI_ZI_ITALIAN__) || defined(__MMI_CSTAR_ITALIAN__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2504.         case INPUT_MODE_SMART_UPPERCASE_ITALIAN:
  2505.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_ITALIAN_STRING_ID);
  2506.             break;
  2507.         case INPUT_MODE_SMART_LOWERCASE_ITALIAN:
  2508.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_italian_STRING_ID);
  2509.             break;
  2510.     #endif /* defined(__MMI_T9_ITALIAN__) || defined(__MMI_ZI_ITALIAN__) */ 
  2511.             /* START PMT VANDANA 20051506 */
  2512.     #if defined (__MMI_T9_RUSSIAN__) || defined(__MMI_ZI_RUSSIAN__) || defined(__MMI_ZI_RECOMMENDED_SIZE_RUSSIAN__) || defined(__MMI_CSTAR_RUSSIAN__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2513.             /* END PMT */
  2514.         case INPUT_MODE_SMART_UPPERCASE_RUSSIAN:
  2515.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_RUSSIAN_STRING_ID);
  2516.             break;
  2517.         case INPUT_MODE_SMART_LOWERCASE_RUSSIAN:
  2518.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_russian_STRING_ID);
  2519.             break;
  2520.     #endif /* defined (__MMI_T9_RUSSIAN__) || defined(__MMI_ZI_RUSSIAN__) || defined(__MMI_ZI_RECOMMENDED_SIZE_RUSSIAN__) */ 
  2521.             /* PMT BULGARIAN START 20051201 */
  2522.     #if defined (__MMI_T9_BULGARIAN__) || defined(__MMI_ZI_BULGARIAN__) || defined(__MMI_CSTAR_BULGARIAN__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2523.         case INPUT_MODE_SMART_UPPERCASE_BULGARIAN:
  2524.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_BULGARIAN_STRING_ID);
  2525.             break;
  2526.         case INPUT_MODE_SMART_LOWERCASE_BULGARIAN:
  2527.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_bulgarian_STRING_ID);
  2528.             break;
  2529.     #endif /* defined (__MMI_T9_BULGARIAN__) || defined(__MMI_ZI_BULGARIAN__) */ 
  2530.             //PMT BULGARIAN END 20051201
  2531.             //PMT CZ_PO_TU START 20050812
  2532.     #if defined(__MMI_ZI_TURKISH__) || defined(__MMI_T9_TURKISH__) || defined(__MMI_CSTAR_TURKISH__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2533.             /* PMT CZ_PO_TU END 20050812 */
  2534.         case INPUT_MODE_SMART_UPPERCASE_TURKISH:
  2535.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_TURKISH_STRING_ID);
  2536.             break;
  2537.         case INPUT_MODE_SMART_LOWERCASE_TURKISH:
  2538.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_turkish_STRING_ID);
  2539.             break;
  2540.     #endif /* defined(__MMI_ZI_TURKISH__) || defined(__MMI_T9_TURKISH__) */ 
  2541.             /* PMT SHARIQ START 20050729 */
  2542.     #if defined(__MMI_T9_PORTUGUESE__) || defined(__MMI_ZI_EU_PORTUGUESE__) || defined(__MMI_ZI_SA_PORTUGUESE__) || defined(__MMI_ZI_BZ_PORTUGUESE__) || defined(__MMI_CSTAR_PORTUGUESE__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2543.             /* PMT SHARIQ END 20050729 */
  2544.         case INPUT_MODE_SMART_UPPERCASE_PORTUGUESE:
  2545.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_PORTUGUESE_STRING_ID);
  2546.             break;
  2547.         case INPUT_MODE_SMART_LOWERCASE_PORTUGUESE:
  2548.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_portuguese_STRING_ID);
  2549.             break;
  2550.     #endif /* defined(__MMI_T9_PORTUGUESE__) || defined(__MMI_ZI_EU_PORTUGUESE__) || defined(__MMI_ZI_SA_PORTUGUESE__) || defined(__MMI_ZI_BZ_PORTUGUESE__) */ 
  2551.             /* PMT Gurdev Start 20050729 */
  2552.     #if defined(__MMI_ZI_INDONESIAN__) || defined(__MMI_T9_INDONESIAN__) || defined(__MMI_CSTAR_INDONESIAN__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2553.         case INPUT_MODE_SMART_UPPERCASE_INDONESIAN:
  2554.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_INDONESIAN_STRING_ID);
  2555.             break;
  2556.         case INPUT_MODE_SMART_LOWERCASE_INDONESIAN:
  2557.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_indonesian_STRING_ID);
  2558.             break;
  2559.     #endif /* defined(__MMI_ZI_INDONESIAN__) || defined(__MMI_T9_INDONESIAN__) */ 
  2560.             //PMT Gurdev End 20050729
  2561.             //PMT START LANGUAGE 20060104
  2562.     #if defined(__MMI_ZI_MALAY__) || defined(__MMI_T9_MALAY__) || defined(__MMI_CSTAR_MALAY__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2563.             /* PMT END LANGUAGE 20060104 */
  2564.         case INPUT_MODE_SMART_UPPERCASE_MALAY:
  2565.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_MALAY_STRING_ID);
  2566.             break;
  2567.         case INPUT_MODE_SMART_LOWERCASE_MALAY:
  2568.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_malay_STRING_ID);
  2569.             break;
  2570.     #endif /* defined(__MMI_ZI_MALAY__) || defined(__MMI_T9_MALAY__) */ 
  2571.     #if defined(__MMI_ZI_VIETNAMESE__) || defined(__MMI_T9_VIETNAMESE__) || defined(__MMI_CSTAR_VIETNAMESE__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2572.             /* PMT BHASKAR END 20052907 */
  2573.         case INPUT_MODE_SMART_UPPERCASE_VIETNAMESE:
  2574.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_VIETNAMESE_STRING_ID);
  2575.             break;
  2576.         case INPUT_MODE_SMART_LOWERCASE_VIETNAMESE:
  2577.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_vietnamese_STRING_ID);
  2578.             break;
  2579.     #endif /* defined(__MMI_ZI_VIETNAMESE__) || defined(__MMI_T9_VIETNAMESE__) */ 
  2580.             /* PMT CZ_PO_TU START 20050812 */
  2581.     #if defined(__MMI_ZI_CZECH__) || defined(__MMI_T9_CZECH__) || defined(__MMI_CSTAR_CZECH__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2582.         case INPUT_MODE_SMART_UPPERCASE_CZECH:
  2583.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_CZECH_STRING_ID);
  2584.             break;
  2585.         case INPUT_MODE_SMART_LOWERCASE_CZECH:
  2586.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_czech_STRING_ID);
  2587.             break;
  2588.     #endif /* defined(__MMI_ZI_CZECH__) || defined(__MMI_T9_CZECH__) */ 
  2589.             //PMT CZ_PO_TU END 20050812
  2590.             //PMT START HU_FI 20050825
  2591.     #if defined(__MMI_T9_FINNISH__) || defined(__MMI_ZI_FINNISH__) || defined(__MMI_CSTAR_FINNISH__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2592.         case INPUT_MODE_SMART_UPPERCASE_FINNISH:
  2593.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_FINNISH_STRING_ID);
  2594.             break;
  2595.         case INPUT_MODE_SMART_LOWERCASE_FINNISH:
  2596.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_finnish_STRING_ID);
  2597.             break;
  2598.     #endif /* defined(__MMI_T9_FINNISH__) || defined(__MMI_ZI_FINNISH__) */ 
  2599.     #if defined(__MMI_ZI_HUNGARIAN__) || defined(__MMI_T9_HUNGARIAN__) || defined(__MMI_CSTAR_HUNGARIAN__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2600.         case INPUT_MODE_SMART_UPPERCASE_HUNGARIAN:
  2601.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_HUNGARIAN_STRING_ID);
  2602.             break;
  2603.         case INPUT_MODE_SMART_LOWERCASE_HUNGARIAN:
  2604.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_hungarian_STRING_ID);
  2605.             break;
  2606.     #endif /* defined(__MMI_ZI_HUNGARIAN__) || defined(__MMI_T9_HUNGARIAN__) */ 
  2607.             //PMT END HU_FI 20050825
  2608.             //PMT NO_AR_SL_DU START 20050909
  2609.     #if defined(__MMI_T9_SLOVAK__) || defined(__MMI_ZI_SLOVAK__) || defined(__MMI_CSTAR_SLOVAK__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2610.         case INPUT_MODE_SMART_UPPERCASE_SLOVAK:
  2611.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_SLOVAK_STRING_ID);
  2612.             break;
  2613.         case INPUT_MODE_SMART_LOWERCASE_SLOVAK:
  2614.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_slovak_STRING_ID);
  2615.             break;
  2616.     #endif /* defined(__MMI_T9_SLOVAK__) || defined(__MMI_ZI_SLOVAK__) */ 
  2617.     #if defined(__MMI_ZI_DUTCH__) || defined(__MMI_T9_DUTCH__) || defined(__MMI_CSTAR_DUTCH__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2618.         case INPUT_MODE_SMART_UPPERCASE_DUTCH:
  2619.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_DUTCH_STRING_ID);
  2620.             break;
  2621.         case INPUT_MODE_SMART_LOWERCASE_DUTCH:
  2622.             inputmode_string = (UI_string_type) get_string(WGUI_CATEGORY_dutch_STRING_ID);
  2623.             break;
  2624.     #endif /* defined(__MMI_ZI_DUTCH__) || defined(__MMI_T9_DUTCH__) */ 
  2625.             //Norwegian start
  2626.             //PMT VIKAS GUPTA START PO_NO_ZI 20050930
  2627.     #if defined(__MMI_T9_NORWEGIAN__) || defined(__MMI_ZI_NORWEGIAN__) || defined(__MMI_CSTAR_NORWEGIAN__)    //KP Jerry add "__MMI_CSTAR_XXX__" on 2007-4-18
  2628.             /* PMT VIKAS GUPTA END PO_NO_ZI 20050930 */
  2629.         case INPUT_MODE_SMART_UPPERCASE_NORWEGIAN: