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

MTK

开发平台:

C/C++

  1.     /* Local Variables                                                */
  2.     /*----------------------------------------------------------------*/
  3.     /*----------------------------------------------------------------*/
  4.     /* Code Body                                                      */
  5.     /*----------------------------------------------------------------*/
  6.     wgui_date_time_input_clear_keys();
  7.     wgui_reset_date_input();
  8.     clear_wgui_date_time_input_callback();
  9.     ExitCategoryFunction = MMI_dummy_function;
  10.     RedrawCategoryFunction = MMI_dummy_function;
  11.     GetCategoryHistory = dummy_get_history;
  12.     GetCategoryHistorySize = dummy_get_history_size;
  13. }
  14. /*****************************************************************************
  15.  * FUNCTION
  16.  *  GetCategory26HistorySize
  17.  * DESCRIPTION
  18.  *  Gets the history buffer size for the category26 screen
  19.  * PARAMETERS
  20.  *  void
  21.  * RETURNS
  22.  *  size of history buffer in U8s
  23.  *****************************************************************************/
  24. S32 GetCategory26HistorySize(void)
  25. {
  26.     /*----------------------------------------------------------------*/
  27.     /* Local Variables                                                */
  28.     /*----------------------------------------------------------------*/
  29.     /*----------------------------------------------------------------*/
  30.     /* Code Body                                                      */
  31.     /*----------------------------------------------------------------*/
  32.     return (0);
  33. }
  34. /*****************************************************************************
  35.  * FUNCTION
  36.  *  GetCategory26History
  37.  * DESCRIPTION
  38.  *  Gets the history buffer for the category26 screen
  39.  * PARAMETERS
  40.  *  history_buffer      [IN]        Is the buffer to store the history data (pre-allocated)
  41.  * RETURNS
  42.  *  pointer to the history buffer
  43.  *****************************************************************************/
  44. U8 *GetCategory26History(U8 *history_buffer)
  45. {
  46.     /*----------------------------------------------------------------*/
  47.     /* Local Variables                                                */
  48.     /*----------------------------------------------------------------*/
  49.     /*----------------------------------------------------------------*/
  50.     /* Code Body                                                      */
  51.     /*----------------------------------------------------------------*/
  52.     return (history_buffer);
  53. }
  54. /*****************************************************************************
  55.  * FUNCTION
  56.  *  RedrawCategory27Screen
  57.  * DESCRIPTION
  58.  *  Redraws the category27 screen
  59.  * PARAMETERS
  60.  *  void
  61.  * RETURNS
  62.  *  void
  63.  *****************************************************************************/
  64. void RedrawCategory27Screen(void)
  65. {
  66.     /*----------------------------------------------------------------*/
  67.     /* Local Variables                                                */
  68.     /*----------------------------------------------------------------*/
  69.     color c = gui_color(0, 0, 0);
  70.     UI_string_type THH_string = get_string(WGUI_CATEGORY_THH_STRING_ID);
  71.     UI_string_type TMM_string = get_string(WGUI_CATEGORY_TMM_STRING_ID);
  72.     S32 w;
  73.     /*----------------------------------------------------------------*/
  74.     /* Code Body                                                      */
  75.     /*----------------------------------------------------------------*/
  76. #if(UI_DOUBLE_BUFFER_SUPPORT)
  77.     gui_lock_double_buffer();
  78. #endif 
  79.     clear_screen();
  80.     show_title_status_icon();
  81.     draw_title();
  82.     show_multiline_inputbox();
  83.     show_softkey_background();
  84.     show_left_softkey();
  85.     show_right_softkey();
  86.     /* Needs to be enhanced */
  87.     gui_reset_text_clip();
  88.     gui_set_text_color(c);
  89.     gui_set_font(wgui_time_input_hours.text_font);
  90.     w = (wgui_time_input_hours.width >> 1) - (gui_get_string_width(THH_string) >> 1);
  91.     gui_move_text_cursor(wgui_time_input_hours.x + w, wgui_time_input_hours.y - 14);
  92.     gui_print_text(THH_string);
  93.     w = (wgui_time_input_minutes.width >> 1) - (gui_get_string_width(TMM_string) >> 1);
  94.     gui_move_text_cursor(wgui_time_input_minutes.x + w, wgui_time_input_minutes.y - 14);
  95.     gui_print_text(TMM_string);
  96.     wgui_show_date_time_input();
  97. #if(UI_DOUBLE_BUFFER_SUPPORT)
  98.     gui_unlock_double_buffer();
  99.     gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
  100. #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  101. }
  102. /*----------------------------------------------------------------------------
  103. Function:         category27_RSK_function
  104. Description:      a function pointer which store the address of RSK function handler
  105.                of category27
  106. Input Parameters: none
  107. Output Parameters:   none
  108. Returns:       void
  109. ----------------------------------------------------------------------------*/
  110. void (*category27_RSK_function) (void) = NULL;
  111. U8 category27_RSK_label_clear = 0;
  112. /* store teh string of RSK category27 */
  113. UI_string_type category27_RSK_label_string;
  114. /* store the icon of RSK category27 */
  115. PU8 category27_RSK_label_icon;
  116. /*****************************************************************************
  117.  * FUNCTION
  118.  *  SetCategory27RightSoftkeyFunction
  119.  * DESCRIPTION
  120.  *  register teh category27 RSK function handler
  121.  * PARAMETERS
  122.  *  f               [IN]        
  123.  *  k               [IN]        
  124.  *  function(?)     [IN]        Pointer
  125.  * RETURNS
  126.  *  void
  127.  *****************************************************************************/
  128. void SetCategory27RightSoftkeyFunction(void (*f) (void), MMI_key_event_type k)
  129. {
  130.     /*----------------------------------------------------------------*/
  131.     /* Local Variables                                                */
  132.     /*----------------------------------------------------------------*/
  133.     /*----------------------------------------------------------------*/
  134.     /* Code Body                                                      */
  135.     /*----------------------------------------------------------------*/
  136.     UI_UNUSED_PARAMETER(k);
  137.     category27_RSK_function = f;
  138. }
  139. /*****************************************************************************
  140.  * FUNCTION
  141.  *  handle_category27_right_softkey_down
  142.  * DESCRIPTION
  143.  *  handle rsk key down of category 27
  144.  * PARAMETERS
  145.  *  void
  146.  * RETURNS
  147.  *  void
  148.  *****************************************************************************/
  149. void handle_category27_right_softkey_down(void)
  150. {
  151.     /*----------------------------------------------------------------*/
  152.     /* Local Variables                                                */
  153.     /*----------------------------------------------------------------*/
  154.     /*----------------------------------------------------------------*/
  155.     /* Code Body                                                      */
  156.     /*----------------------------------------------------------------*/
  157.     wgui_date_time_delete_character();
  158. }
  159. /*****************************************************************************
  160.  * FUNCTION
  161.  *  handle_category27_right_softkey_up
  162.  * DESCRIPTION
  163.  *  handle rsk key down of category 27
  164.  * PARAMETERS
  165.  *  void
  166.  * RETURNS
  167.  *  void
  168.  *****************************************************************************/
  169. void handle_category27_right_softkey_up(void)
  170. {
  171.     /*----------------------------------------------------------------*/
  172.     /* Local Variables                                                */
  173.     /*----------------------------------------------------------------*/
  174.     S32 l1 = gui_single_line_input_box_get_text_length(&wgui_time_input_hours);
  175.     S32 l2 = gui_single_line_input_box_get_text_length(&wgui_time_input_minutes);
  176.     /*----------------------------------------------------------------*/
  177.     /* Code Body                                                      */
  178.     /*----------------------------------------------------------------*/
  179.     if ((l1 <= 0) && (l2 <= 0) && (!category27_RSK_label_clear))
  180.     {
  181.         if (category27_RSK_function != NULL)
  182.         {
  183.             category27_RSK_function();
  184.         }
  185.     }
  186. }
  187. /*****************************************************************************
  188.  * FUNCTION
  189.  *  register_category27_handle_right_softkey_up
  190.  * DESCRIPTION
  191.  *  register RSK key up function handlerof category 27
  192.  * PARAMETERS
  193.  *  void
  194.  *  function(?)     [IN]        Pointer
  195.  * RETURNS
  196.  *  void
  197.  *****************************************************************************/
  198. void register_category27_handle_right_softkey_up(void)
  199. {
  200.     /*----------------------------------------------------------------*/
  201.     /* Local Variables                                                */
  202.     /*----------------------------------------------------------------*/
  203.     /*----------------------------------------------------------------*/
  204.     /* Code Body                                                      */
  205.     /*----------------------------------------------------------------*/
  206.     set_right_softkey_function(handle_category27_right_softkey_up, KEY_EVENT_UP);
  207. }
  208. /*****************************************************************************
  209.  * FUNCTION
  210.  *  handle_category27_right_softkey_long_press
  211.  * DESCRIPTION
  212.  *  
  213.  * PARAMETERS
  214.  *  void
  215.  *  function(?)     [IN]        Pointer
  216.  * RETURNS
  217.  *  void
  218.  *****************************************************************************/
  219. void handle_category27_right_softkey_long_press(void)
  220. {
  221.     /*----------------------------------------------------------------*/
  222.     /* Local Variables                                                */
  223.     /*----------------------------------------------------------------*/
  224.     /*----------------------------------------------------------------*/
  225.     /* Code Body                                                      */
  226.     /*----------------------------------------------------------------*/
  227. }
  228. /*****************************************************************************
  229.  * FUNCTION
  230.  *  handle_category27_input
  231.  * DESCRIPTION
  232.  *  handle category27 input
  233.  * PARAMETERS
  234.  *  void
  235.  * RETURNS
  236.  *  void
  237.  *****************************************************************************/
  238. void handle_category27_input(void)
  239. {
  240.     /*----------------------------------------------------------------*/
  241.     /* Local Variables                                                */
  242.     /*----------------------------------------------------------------*/
  243.     S32 l1 = gui_single_line_input_box_get_text_length(&wgui_time_input_hours);
  244.     S32 l2 = gui_single_line_input_box_get_text_length(&wgui_time_input_minutes);
  245.     /*----------------------------------------------------------------*/
  246.     /* Code Body                                                      */
  247.     /*----------------------------------------------------------------*/
  248.     if ((l1 > 0) || (l2 > 0))
  249.     {
  250.         if (category27_RSK_label_clear == 0)
  251.         {
  252.             /* Hardcoded. Needs to be modified to take IDs  */
  253.             set_right_softkey_label((UI_string_type) get_string(WGUI_CATEGORY_CLEAR_STRING_ID));
  254.             set_right_softkey_icon(NULL);
  255.             redraw_right_softkey();
  256.             category27_RSK_label_clear = 1;
  257.             set_right_softkey_function(UI_dummy_function, KEY_EVENT_UP);
  258.         }
  259.     }
  260.     else
  261.     {
  262.         if (category27_RSK_label_clear == 1)
  263.         {
  264.             set_right_softkey_label(category27_RSK_label_string);
  265.             set_right_softkey_icon(category27_RSK_label_icon);
  266.             redraw_right_softkey();
  267.             category27_RSK_label_clear = 0;
  268.             set_right_softkey_function(register_category27_handle_right_softkey_up, KEY_EVENT_UP);
  269.         }
  270.     }
  271. }
  272. /*****************************************************************************
  273.  * FUNCTION
  274.  *  ShowCategory27Screen
  275.  * DESCRIPTION
  276.  *  Displays the category27 screen
  277.  * PARAMETERS
  278.  *  title                   [IN]        Title for the screen
  279.  *  title_icon              [IN]        Icon shown with the title
  280.  *  left_softkey            [IN]        Left softkey label
  281.  *  left_softkey_icon       [IN]        Icon for the Left softkey
  282.  *  right_softkey           [IN]        Right softkey label
  283.  *  right_softkey_icon      [IN]        Icon for the right softkey
  284.  *  message                 [IN]        Message string
  285.  *  hours_buffer            [IN]        Buffer to input hours
  286.  *  minutes_buffer          [IN]        Buffer to input minutes
  287.  *  history_buffer          [IN]        History buffer
  288.  * RETURNS
  289.  *  void
  290.  *****************************************************************************/
  291. void ShowCategory27Screen(
  292.         U16 title,
  293.         U16 title_icon,
  294.         U16 left_softkey,
  295.         U16 left_softkey_icon,
  296.         U16 right_softkey,
  297.         U16 right_softkey_icon,
  298.         U16 message,
  299.         U8 *hours_buffer,
  300.         U8 *minutes_buffer,
  301.         U8 *history_buffer)
  302. {
  303.     /*----------------------------------------------------------------*/
  304.     /* Local Variables                                                */
  305.     /*----------------------------------------------------------------*/
  306.     S32 l, s1, s2, sg, x, y, fh;
  307.     /*----------------------------------------------------------------*/
  308.     /* Code Body                                                      */
  309.     /*----------------------------------------------------------------*/
  310.     ADD_SCREEN_STRINGS((4, title, left_softkey, right_softkey, message));
  311.     ADD_SCREEN_IMAGES((3, title_icon, left_softkey_icon, right_softkey_icon));
  312.     UI_UNUSED_PARAMETER(history_buffer);
  313. #if(UI_DOUBLE_BUFFER_SUPPORT)
  314.     gui_lock_double_buffer();
  315. #endif 
  316.     MMI_menu_shortcut_number = -1;
  317.     clear_category_screen_key_handlers();
  318.     clear_left_softkey();
  319.     clear_right_softkey();
  320.     change_left_softkey(left_softkey, left_softkey_icon);
  321.     change_right_softkey(right_softkey, right_softkey_icon);
  322.     register_left_softkey_handler();
  323.     register_right_softkey_handler();
  324.     register_default_hide_softkeys();
  325.     MMI_title_string = (UI_string_type) get_string(title);
  326.     MMI_title_icon = (PU8) get_image(title_icon);
  327.     MMI_message_string = (UI_string_type) get_string(message);
  328.     l = gui_strlen(MMI_message_string);
  329.     create_multiline_inputbox_set_buffer(MMI_message_string, l, l, 0);
  330.     resize_multiline_inputbox(MMI_multiline_inputbox.width, 40);
  331.     MMI_multiline_inputbox.flags |=
  332.         (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_CENTER_JUSTIFY |
  333.          UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND | UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
  334.     show_multiline_inputbox_no_draw();
  335.     gui_set_font(MMI_multiline_inputbox.text_font);
  336.     fh = get_multiline_inputbox_line_height();
  337.     resize_multiline_inputbox(
  338.         MMI_multiline_inputbox.width,
  339.         (MMI_multiline_inputbox.n_lines * fh) + MULTILINE_INPUTBOX_HEIGHT_PAD + MMI_multiline_inputbox.text_y);
  340.     /* MTK Leo added, to move inputbox to proper position */
  341. #ifdef __BW_MMI__
  342.     move_multiline_inputbox((MMI_content_width << 1) - (l << 1), (MMI_title_y + MMI_title_height) + 2);
  343. #else 
  344.     move_multiline_inputbox(0, (MMI_title_y + MMI_title_height));
  345. #endif 
  346.     /* MTK Leo end */
  347.     wgui_reset_date_input();
  348.     wgui_initialize_time_input(hours_buffer, 2, minutes_buffer, 2, NULL, 0);
  349.     y = 16 + MMI_multiline_inputbox.y + MMI_multiline_inputbox.height +
  350.         (((MMI_content_height - MMI_multiline_inputbox.height) >> 1) - ((16 + 18) >> 1));
  351.     s1 = 24;
  352.     s2 = 24;
  353.     sg = 4;
  354.     /* MTK Leo added, to resize inputbox to proper size */
  355. #ifdef __BW_MMI__
  356.     wgui_resize_hours_input(s1, 14);
  357.     wgui_resize_minutes_input(s2, 14);
  358. #else /* __BW_MMI__ */ 
  359.     wgui_resize_hours_input(s1, 18);
  360.     wgui_resize_minutes_input(s2, 18);
  361. #endif /* __BW_MMI__ */ 
  362.     /* MTK Leo end */
  363.     x = (UI_device_width >> 1) - ((s1 + s2 + sg) >> 1);
  364.     wgui_move_hours_input(x, y);
  365.     x += s1 + sg;
  366.     wgui_move_minutes_input(x, y);
  367.     wgui_set_hours_input_navigation(WGUI_DATE_TIME_INPUT_FOCUS_NONE, WGUI_DATE_TIME_INPUT_FOCUS_MINUTES);
  368.     wgui_set_minutes_input_navigation(WGUI_DATE_TIME_INPUT_FOCUS_HOURS, WGUI_DATE_TIME_INPUT_FOCUS_NONE);
  369.     wgui_date_time_input_set_focus(WGUI_DATE_TIME_INPUT_FOCUS_HOURS);
  370.     wgui_date_time_input_register_keys();
  371.     category27_RSK_label_clear = 0;
  372.     set_right_softkey_function(handle_category27_right_softkey_down, KEY_EVENT_DOWN);
  373.     set_right_softkey_function(handle_category27_right_softkey_long_press, KEY_LONG_PRESS);
  374.     register_wgui_date_time_input_callback(handle_category27_input);
  375.     category27_RSK_label_icon = get_image(right_softkey_icon);
  376.     category27_RSK_label_string = get_string(right_softkey);
  377.     handle_category27_input();
  378.     {
  379.         S32 l1 = gui_single_line_input_box_get_text_length(&wgui_time_input_hours);
  380.         S32 l2 = gui_single_line_input_box_get_text_length(&wgui_time_input_minutes);
  381.         if ((l1 <= 0) && (l2 <= 0))
  382.         {
  383.             set_right_softkey_function(handle_category27_right_softkey_up, KEY_EVENT_UP);
  384.         }
  385.     }
  386. #if(UI_DOUBLE_BUFFER_SUPPORT)
  387.     gui_unlock_double_buffer();
  388. #endif 
  389.     ExitCategoryFunction = ExitCategory27Screen;
  390.     RedrawCategoryFunction = RedrawCategory27Screen;
  391.     GetCategoryHistory = GetCategory27History;
  392.     GetCategoryHistorySize = GetCategory27HistorySize;
  393.     RedrawCategory27Screen();
  394. }
  395. /*****************************************************************************
  396.  * FUNCTION
  397.  *  ExitCategory27Screen
  398.  * DESCRIPTION
  399.  *  Exits the category27 screen
  400.  * PARAMETERS
  401.  *  void
  402.  * RETURNS
  403.  *  void
  404.  *****************************************************************************/
  405. void ExitCategory27Screen(void)
  406. {
  407.     /*----------------------------------------------------------------*/
  408.     /* Local Variables                                                */
  409.     /*----------------------------------------------------------------*/
  410.     /*----------------------------------------------------------------*/
  411.     /* Code Body                                                      */
  412.     /*----------------------------------------------------------------*/
  413.     wgui_date_time_input_clear_keys();
  414.     wgui_reset_time_input();
  415.     clear_wgui_date_time_input_callback();
  416.     ExitCategoryFunction = MMI_dummy_function;
  417.     RedrawCategoryFunction = MMI_dummy_function;
  418.     GetCategoryHistory = dummy_get_history;
  419.     GetCategoryHistorySize = dummy_get_history_size;
  420. }
  421. /*****************************************************************************
  422.  * FUNCTION
  423.  *  GetCategory27HistorySize
  424.  * DESCRIPTION
  425.  *  Gets the history buffer size for the category27 screen
  426.  * PARAMETERS
  427.  *  void
  428.  * RETURNS
  429.  *  size of history buffer in U8s
  430.  *****************************************************************************/
  431. S32 GetCategory27HistorySize(void)
  432. {
  433.     /*----------------------------------------------------------------*/
  434.     /* Local Variables                                                */
  435.     /*----------------------------------------------------------------*/
  436.     /*----------------------------------------------------------------*/
  437.     /* Code Body                                                      */
  438.     /*----------------------------------------------------------------*/
  439.     return (0);
  440. }
  441. /*****************************************************************************
  442.  * FUNCTION
  443.  *  GetCategory27History
  444.  * DESCRIPTION
  445.  *  Gets the history buffer for the category27 screen
  446.  * PARAMETERS
  447.  *  history_buffer      [IN]        Is the buffer to store the history data (pre-allocated)
  448.  * RETURNS
  449.  *  pointer to the history buffer
  450.  *****************************************************************************/
  451. U8 *GetCategory27History(U8 *history_buffer)
  452. {
  453.     /*----------------------------------------------------------------*/
  454.     /* Local Variables                                                */
  455.     /*----------------------------------------------------------------*/
  456.     /*----------------------------------------------------------------*/
  457.     /* Code Body                                                      */
  458.     /*----------------------------------------------------------------*/
  459.     return (history_buffer);
  460. }
  461. /*****************************************************************************
  462.  * FUNCTION
  463.  *  RedrawCategory31Screen
  464.  * DESCRIPTION
  465.  *  Redraws the Category31 screen
  466.  * PARAMETERS
  467.  *  void
  468.  * RETURNS
  469.  *  void
  470.  *****************************************************************************/
  471. void RedrawCategory31Screen(void)
  472. {
  473.     /*----------------------------------------------------------------*/
  474.     /* Local Variables                                                */
  475.     /*----------------------------------------------------------------*/
  476.     /*----------------------------------------------------------------*/
  477.     /* Code Body                                                      */
  478.     /*----------------------------------------------------------------*/
  479. #if(UI_DOUBLE_BUFFER_SUPPORT)
  480.     gui_lock_double_buffer();
  481. #endif 
  482.     clear_screen();
  483.     gui_set_clip(0, 0, UI_device_width - 1, UI_device_height - 1);
  484.     gui_set_text_clip(0, 0, UI_device_width - 1, UI_device_height - 1);
  485.     show_multiline_inputbox();
  486. #if(UI_DOUBLE_BUFFER_SUPPORT)
  487.     gui_unlock_double_buffer();
  488.     gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
  489. #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  490. }
  491. /*****************************************************************************
  492.  * FUNCTION
  493.  *  ShowCategory31Screen
  494.  * DESCRIPTION
  495.  *  Displays the Category31 screen
  496.  * PARAMETERS
  497.  *  message             [IN]        Message string
  498.  *  history_buffer      [IN]        History buffer
  499.  * RETURNS
  500.  *  void
  501.  *****************************************************************************/
  502. void ShowCategory31Screen(U16 message, U8 *history_buffer)
  503. {
  504.     /*----------------------------------------------------------------*/
  505.     /* Local Variables                                                */
  506.     /*----------------------------------------------------------------*/
  507.     S32 l, fh;
  508.     /*----------------------------------------------------------------*/
  509.     /* Code Body                                                      */
  510.     /*----------------------------------------------------------------*/
  511.     ADD_SCREEN_STRINGS((1, message));
  512.     UI_UNUSED_PARAMETER(history_buffer);
  513. #if(UI_DOUBLE_BUFFER_SUPPORT)
  514.     gui_lock_double_buffer();
  515. #endif 
  516.     MMI_menu_shortcut_number = -1;
  517.     clear_category_screen_key_handlers();
  518.     clear_left_softkey();
  519.     clear_right_softkey();
  520.     MMI_message_string = (UI_string_type) get_string(message);
  521.     l = gui_strlen(MMI_message_string);
  522.     create_multiline_inputbox_set_buffer(MMI_message_string, l, l, 0);
  523.     resize_multiline_inputbox(MMI_multiline_inputbox.width, MMI_content_height);
  524.     MMI_multiline_inputbox.flags |=
  525.         (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_CENTER_JUSTIFY |
  526.          UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND | UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
  527.     show_multiline_inputbox_no_draw();
  528.     gui_set_font(MMI_multiline_inputbox.text_font);
  529.     fh = get_multiline_inputbox_line_height();
  530.     resize_multiline_inputbox(
  531.         MMI_multiline_inputbox.width,
  532.         (MMI_multiline_inputbox.n_lines * fh) + MULTILINE_INPUTBOX_HEIGHT_PAD + MMI_multiline_inputbox.text_y);
  533. #if(UI_DOUBLE_BUFFER_SUPPORT)
  534.     gui_unlock_double_buffer();
  535. #endif 
  536.     ExitCategoryFunction = ExitCategory31Screen;
  537.     RedrawCategoryFunction = RedrawCategory31Screen;
  538.     GetCategoryHistory = GetCategory31History;
  539.     GetCategoryHistorySize = GetCategory31HistorySize;
  540.     RedrawCategory31Screen();
  541. }
  542. /*****************************************************************************
  543.  * FUNCTION
  544.  *  ExitCategory31Screen
  545.  * DESCRIPTION
  546.  *  Exits the Category31 screen
  547.  * PARAMETERS
  548.  *  void
  549.  * RETURNS
  550.  *  void
  551.  *****************************************************************************/
  552. void ExitCategory31Screen(void)
  553. {
  554.     /*----------------------------------------------------------------*/
  555.     /* Local Variables                                                */
  556.     /*----------------------------------------------------------------*/
  557.     /*----------------------------------------------------------------*/
  558.     /* Code Body                                                      */
  559.     /*----------------------------------------------------------------*/
  560.     ExitCategoryFunction = MMI_dummy_function;
  561.     RedrawCategoryFunction = MMI_dummy_function;
  562.     GetCategoryHistory = dummy_get_history;
  563.     GetCategoryHistorySize = dummy_get_history_size;
  564. }
  565. /*****************************************************************************
  566.  * FUNCTION
  567.  *  GetCategory31HistorySize
  568.  * DESCRIPTION
  569.  *  Gets the history buffer size for the Category31 screen
  570.  * PARAMETERS
  571.  *  void
  572.  * RETURNS
  573.  *  size in U8s of the history buffer
  574.  *****************************************************************************/
  575. S32 GetCategory31HistorySize(void)
  576. {
  577.     /*----------------------------------------------------------------*/
  578.     /* Local Variables                                                */
  579.     /*----------------------------------------------------------------*/
  580.     /*----------------------------------------------------------------*/
  581.     /* Code Body                                                      */
  582.     /*----------------------------------------------------------------*/
  583.     return (0);
  584. }
  585. /*****************************************************************************
  586.  * FUNCTION
  587.  *  GetCategory31History
  588.  * DESCRIPTION
  589.  *  Gets the history buffer for the Category31 screen
  590.  * PARAMETERS
  591.  *  history_buffer      [IN]        Is the buffer into which the history data is stored (pre-allocated)
  592.  * RETURNS
  593.  *  pointer to the history buffer
  594.  *****************************************************************************/
  595. U8 *GetCategory31History(U8 *history_buffer)
  596. {
  597.     /*----------------------------------------------------------------*/
  598.     /* Local Variables                                                */
  599.     /*----------------------------------------------------------------*/
  600.     /*----------------------------------------------------------------*/
  601.     /* Code Body                                                      */
  602.     /*----------------------------------------------------------------*/
  603.     return (history_buffer);
  604. }
  605. /*****************************************************************************
  606.  * FUNCTION
  607.  *  RedrawCategory34Screen
  608.  * DESCRIPTION
  609.  *  Redraws the dynamic icon notification screen
  610.  * PARAMETERS
  611.  *  void
  612.  * RETURNS
  613.  *  void
  614.  *****************************************************************************/
  615. void RedrawCategory34Screen(void)
  616. {
  617.     /*----------------------------------------------------------------*/
  618.     /* Local Variables                                                */
  619.     /*----------------------------------------------------------------*/
  620.     /*----------------------------------------------------------------*/
  621.     /* Code Body                                                      */
  622.     /*----------------------------------------------------------------*/
  623. #if(UI_DOUBLE_BUFFER_SUPPORT)
  624.     gui_lock_double_buffer();
  625. #endif 
  626.     gui_hide_animations();
  627.     clear_screen();
  628.     gui_reset_clip();
  629.     wgui_show_transparent_animation();
  630.     show_multiline_inputbox();
  631.     show_softkey_background();
  632.     show_left_softkey();
  633.     show_right_softkey();
  634. #if(UI_DOUBLE_BUFFER_SUPPORT)
  635.     gui_unlock_double_buffer();
  636.     gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
  637. #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  638. }
  639. /*****************************************************************************
  640.  * FUNCTION
  641.  *  category34_keyboard_key_handler
  642.  * DESCRIPTION
  643.  *  keyboard key handler of category 34
  644.  * PARAMETERS
  645.  *  vkey_code           [IN]        
  646.  *  key_state           [IN]        
  647.  *  vkey_codes(?)       [IN]        
  648.  * RETURNS
  649.  *  void
  650.  *****************************************************************************/
  651. void category34_keyboard_key_handler(S32 vkey_code, S32 key_state)
  652. {
  653. #if(MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32)
  654.     /*----------------------------------------------------------------*/
  655.     /* Local Variables                                                */
  656.     /*----------------------------------------------------------------*/
  657.     /*----------------------------------------------------------------*/
  658.     /* Code Body                                                      */
  659.     /*----------------------------------------------------------------*/
  660.     if (key_state)
  661.     {
  662.         switch (vkey_code)
  663.         {
  664.             case 37:    /* left */
  665.                 break;
  666.             case 39:    /* right */
  667.                 break;
  668.             case 38:
  669.                 multiline_inputbox_previous_line();
  670.                 break;
  671.             case 40:
  672.                 multiline_inputbox_next_line();
  673.                 break;
  674.         }
  675.     }
  676. #else /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */ 
  677.     UI_UNUSED_PARAMETER(vkey_code);
  678.     UI_UNUSED_PARAMETER(key_state);
  679. #endif /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */ 
  680. }
  681. /*****************************************************************************
  682.  * FUNCTION
  683.  *  ShowCategory34Screen
  684.  * DESCRIPTION
  685.  *  Displays the dynamic icon notification screen
  686.  * PARAMETERS
  687.  *  left_softkey            [IN]        Left softkey label
  688.  *  left_softkey_icon       [IN]        Icon for the left softkey
  689.  *  right_softkey           [IN]        Right softkey label
  690.  *  right_softkey_icon      [IN]        Icon for the right softkey
  691.  *  message                 [IN]        Notification message
  692.  *  message_icon            [IN]        
  693.  *  history_buffer          [IN]        History buffer
  694.  *  IMAGE(?)                [IN]        Image          Notification image
  695.  * RETURNS
  696.  *  void
  697.  *****************************************************************************/
  698. void ShowCategory34Screen(
  699.         U8 *left_softkey,
  700.         PU8 left_softkey_icon,
  701.         U8 *right_softkey,
  702.         PU8 right_softkey_icon,
  703.         U8 *message,
  704.         PU8 message_icon,
  705.         U8 *history_buffer)
  706. {
  707.     /*----------------------------------------------------------------*/
  708.     /* Local Variables                                                */
  709.     /*----------------------------------------------------------------*/
  710.     S32 l, h, fh, y, iwidth, iheight, n, th;
  711.     /*----------------------------------------------------------------*/
  712.     /* Code Body                                                      */
  713.     /*----------------------------------------------------------------*/
  714.     UI_UNUSED_PARAMETER(history_buffer);
  715. #if(UI_DOUBLE_BUFFER_SUPPORT)
  716.     gui_lock_double_buffer();
  717. #endif 
  718.     MMI_menu_shortcut_number = -1;
  719.     clear_category_screen_key_handlers();
  720.     set_left_softkey_label((UI_string_type) left_softkey);
  721.     set_left_softkey_icon(left_softkey_icon);
  722.     set_right_softkey_label((UI_string_type) right_softkey);
  723.     set_right_softkey_icon(right_softkey_icon);
  724.     clear_left_softkey();
  725.     clear_right_softkey();
  726.     register_left_softkey_handler();
  727.     register_right_softkey_handler();
  728.     register_default_hide_softkeys();
  729.     MMI_message_string = (UI_string_type) message;
  730.     gui_measure_image(message_icon, &iwidth, &iheight);
  731.     l = gui_strlen(MMI_message_string);
  732.     create_multiline_inputbox_set_buffer(MMI_message_string, l, l, 0);
  733.     resize_multiline_inputbox(UI_device_width, MMI_content_height - iheight + 1);
  734.     MMI_multiline_inputbox.flags |=
  735.         (UI_MULTI_LINE_INPUT_BOX_CENTER_JUSTIFY | UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW |
  736.          UI_MULTI_LINE_INPUT_BOX_VIEW_MODE);
  737.     show_multiline_inputbox_no_draw();
  738.     gui_set_font(MMI_multiline_inputbox.text_font);
  739.     fh = get_multiline_inputbox_line_height();
  740.     n = MMI_multiline_inputbox.n_lines;
  741.     h = n * fh + MMI_multiline_inputbox.text_y + MULTILINE_INPUTBOX_HEIGHT_PAD;
  742.     th = UI_device_height - MMI_button_bar_height + 1 - iheight;
  743.     if (message_icon != NULL)
  744.     {
  745.         if (h > (th - MULTILINE_INPUTBOX_HEIGHT_PAD))
  746.         {
  747.             h = (th - MULTILINE_INPUTBOX_HEIGHT_PAD);
  748.         }
  749.         th = h + iheight + MULTILINE_INPUTBOX_HEIGHT_PAD;
  750.         y = ((UI_device_height - MMI_button_bar_height) >> 1) - (th >> 1);
  751.         if (y < 0)
  752.         {
  753.             y = 0;
  754.         }
  755.         wgui_set_animation_image_y((UI_device_width >> 1), y, message_icon);
  756.         y = iheight + MULTILINE_INPUTBOX_HEIGHT_PAD + y;
  757.     }
  758.     else
  759.     {
  760.         if (h > th)
  761.         {
  762.             h = th;
  763.         }
  764.         th = h + iheight;
  765.         y = ((UI_device_height - MMI_button_bar_height) >> 1) - (th >> 1);
  766.         if (y < 0)
  767.         {
  768.             y = 0;
  769.         }
  770.         wgui_set_animation_image_y((UI_device_width >> 1), y, message_icon);
  771.         y = iheight + y;
  772.     }
  773.     if ((y + h) > (UI_device_height - MMI_button_bar_height + 1))
  774.     {
  775.         h = (UI_device_height - MMI_button_bar_height + 1) - y;
  776.     }
  777.     resize_multiline_inputbox(MMI_multiline_inputbox.width, h);
  778.     move_multiline_inputbox(0, y);
  779.     register_keyboard_key_handler(category34_keyboard_key_handler);
  780.     SetKeyHandler(multiline_inputbox_previous_line, KEY_UP_ARROW, KEY_EVENT_DOWN);
  781.     SetKeyHandler(multiline_inputbox_next_line, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
  782. #if(UI_DOUBLE_BUFFER_SUPPORT)
  783.     gui_unlock_double_buffer();
  784. #endif 
  785.     ExitCategoryFunction = ExitCategory34Screen;
  786.     RedrawCategoryFunction = RedrawCategory34Screen;
  787.     GetCategoryHistory = GetCategory34History;
  788.     GetCategoryHistorySize = GetCategory34HistorySize;
  789.     RedrawCategory34Screen();
  790. }
  791. /*****************************************************************************
  792.  * FUNCTION
  793.  *  ExitCategory34Screen
  794.  * DESCRIPTION
  795.  *  Exits the dynamic icon notification screen
  796.  * PARAMETERS
  797.  *  void
  798.  * RETURNS
  799.  *  void
  800.  *****************************************************************************/
  801. void ExitCategory34Screen(void)
  802. {
  803.     /*----------------------------------------------------------------*/
  804.     /* Local Variables                                                */
  805.     /*----------------------------------------------------------------*/
  806.     /*----------------------------------------------------------------*/
  807.     /* Code Body                                                      */
  808.     /*----------------------------------------------------------------*/
  809.     gui_hide_animations();
  810. #if(UI_BLINKING_CURSOR_SUPPORT)
  811.     //gui_cancel_timer(UI_inputbox_blink_cursor);
  812.     //MTK Elvis
  813.     StopMyTimer(BLINKING_CURSOR);
  814.     /* MTK end */
  815. #endif /* (UI_BLINKING_CURSOR_SUPPORT) */ 
  816.     ExitCategoryFunction = MMI_dummy_function;
  817.     RedrawCategoryFunction = MMI_dummy_function;
  818.     GetCategoryHistory = dummy_get_history;
  819.     GetCategoryHistorySize = dummy_get_history_size;
  820. }
  821. /*****************************************************************************
  822.  * FUNCTION
  823.  *  GetCategory34HistorySize
  824.  * DESCRIPTION
  825.  *  Gets the history buffer size for the dynamic icon notification screen
  826.  * PARAMETERS
  827.  *  void
  828.  * RETURNS
  829.  *  size in U8s of the history buffer
  830.  *****************************************************************************/
  831. S32 GetCategory34HistorySize(void)
  832. {
  833.     /*----------------------------------------------------------------*/
  834.     /* Local Variables                                                */
  835.     /*----------------------------------------------------------------*/
  836.     /*----------------------------------------------------------------*/
  837.     /* Code Body                                                      */
  838.     /*----------------------------------------------------------------*/
  839.     return (0);
  840. }
  841. /*****************************************************************************
  842.  * FUNCTION
  843.  *  GetCategory34History
  844.  * DESCRIPTION
  845.  *  Gets the history buffer for the dynamic icon notification screen
  846.  * PARAMETERS
  847.  *  history_buffer      [IN]        Is the buffer into which the history data is stored
  848.  * RETURNS
  849.  *  pointer to the history buffer
  850.  *****************************************************************************/
  851. U8 *GetCategory34History(U8 *history_buffer)
  852. {
  853.     /*----------------------------------------------------------------*/
  854.     /* Local Variables                                                */
  855.     /*----------------------------------------------------------------*/
  856.     /*----------------------------------------------------------------*/
  857.     /* Code Body                                                      */
  858.     /*----------------------------------------------------------------*/
  859.     return (history_buffer);
  860. }
  861. /*****************************************************************************
  862.  * FUNCTION
  863.  *  RedrawCategory37Screen
  864.  * DESCRIPTION
  865.  *  Redraws the MO_call screen
  866.  * PARAMETERS
  867.  *  void
  868.  * RETURNS
  869.  *  void
  870.  *****************************************************************************/
  871. void RedrawCategory37Screen(void)
  872. {
  873.     /*----------------------------------------------------------------*/
  874.     /* Local Variables                                                */
  875.     /*----------------------------------------------------------------*/
  876.     /*----------------------------------------------------------------*/
  877.     /* Code Body                                                      */
  878.     /*----------------------------------------------------------------*/
  879. #if(UI_DOUBLE_BUFFER_SUPPORT)
  880.     gui_lock_double_buffer();
  881. #endif 
  882.     clear_screen();
  883.     show_status_icons();
  884.     show_main_LCD_dt_display();
  885.     show_dialer_inputbox();
  886.     show_left_softkey();
  887.     show_right_softkey();
  888. #if(UI_DOUBLE_BUFFER_SUPPORT)
  889.     gui_unlock_double_buffer();
  890.     gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
  891. #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  892. }
  893. /*****************************************************************************
  894.  * FUNCTION
  895.  *  ShowCategory37Screen
  896.  * DESCRIPTION
  897.  *  Displays the MO_call screen
  898.  * PARAMETERS
  899.  *  left_softkey            [IN]        Left softkey label
  900.  *  left_softkey_icon       [IN]        Icon for the left softkey
  901.  *  right_softkey           [IN]        Right softkey label
  902.  *  right_softkey_icon      [IN]        Icon for the right softkey
  903.  *  Buffer                  [IN]        Lenghth,         Length of buffer
  904.  *  BufferLength            [IN]        
  905.  *  history_buffer          [IN]        History buffer
  906.  *  STRING(?)               [IN]        *  Dial Pad buffer,     Dial Pad contents
  907.  * RETURNS
  908.  *  void
  909.  *****************************************************************************/
  910. void ShowCategory37Screen(
  911.         U16 left_softkey,
  912.         U16 left_softkey_icon,
  913.         U16 right_softkey,
  914.         U16 right_softkey_icon,
  915.         U8 *Buffer,
  916.         U32 BufferLength,
  917.         U8 *history_buffer)
  918. {
  919.     /*----------------------------------------------------------------*/
  920.     /* Local Variables                                                */
  921.     /*----------------------------------------------------------------*/
  922.     /*----------------------------------------------------------------*/
  923.     /* Code Body                                                      */
  924.     /*----------------------------------------------------------------*/
  925.     ADD_SCREEN_STRINGS((2, left_softkey, right_softkey));
  926.     ADD_SCREEN_IMAGES((2, left_softkey_icon, right_softkey_icon));
  927.     UI_UNUSED_PARAMETER(history_buffer);
  928. #if(UI_DOUBLE_BUFFER_SUPPORT)
  929.     gui_lock_double_buffer();
  930. #endif 
  931.     clear_key_handlers();
  932.     clear_left_softkey();
  933.     clear_right_softkey();
  934.     change_right_softkey(right_softkey, right_softkey_icon);
  935.     change_left_softkey(left_softkey, left_softkey_icon);
  936.     register_left_softkey_handler();
  937.     register_right_softkey_handler();
  938.     set_dt_display(DT_MO_CALL_SCREEN);
  939.     register_hide_status_icon_bar(0, CM_screens_hide_status_icons);
  940.     set_status_icon_bar_clip(0, 0, 0, UI_device_width - 1, MMI_status_bar_height - 1);
  941.     show_status_icon_bar(0);
  942.     hide_status_icon_bar(1);
  943. #if(0)
  944. if(history_buffer!=NULL)
  945. { word history_ID=(word)((word)(history_buffer[0])|(word)(history_buffer[1]<<8));
  946. if((history_ID & 0x8000) && ((history_ID & 0x7fff)==MMI_CATEGORY16_ID))
  947. {
  948. /* Get the length and number */
  949. BufferLength = (U8) history_buffer[2];
  950. pixtel_UI_strncpy((UI_string_type)Buffer,(UI_string_type)(history_buffer+3),BufferLength);
  951. Buffer[BufferLength+1] = '';
  952. }
  953. /* Need to get the number from history */
  954. }
  955. #endif /* (0) */ 
  956.     setup_general_inputbox_dialer(
  957.         (UI_string_type) Buffer,
  958.         BufferLength,
  959.         gui_strlen((UI_string_type) Buffer),
  960.         gui_strlen((UI_string_type) Buffer));
  961. #if(UI_DOUBLE_BUFFER_SUPPORT)
  962.     gui_unlock_double_buffer();
  963. #endif 
  964.     RedrawCategoryFunction = RedrawCategory37Screen;
  965.     ExitCategoryFunction = ExitCategory37Screen;
  966.     GetCategoryHistory = GetCategory37History;
  967.     GetCategoryHistorySize = GetCategory37HistorySize;
  968.     RedrawCategory37Screen();
  969. }
  970. /*****************************************************************************
  971.  * FUNCTION
  972.  *  ExitCategory37Screen
  973.  * DESCRIPTION
  974.  *  Exits the MO_call screen
  975.  * PARAMETERS
  976.  *  void
  977.  * RETURNS
  978.  *  void
  979.  *****************************************************************************/
  980. void ExitCategory37Screen()
  981. {
  982.     /*----------------------------------------------------------------*/
  983.     /* Local Variables                                                */
  984.     /*----------------------------------------------------------------*/
  985.     /*----------------------------------------------------------------*/
  986.     /* Code Body                                                      */
  987.     /*----------------------------------------------------------------*/
  988. #if(UI_DOUBLE_BUFFER_SUPPORT)
  989.     gui_lock_double_buffer();
  990. #endif 
  991.     close_main_LCD_dt_display();
  992.     close_status_icons();
  993.     reset_softkeys();
  994.     reset_multitaps();
  995.     reset_general_inputbox();
  996. #if(UI_DOUBLE_BUFFER_SUPPORT)
  997.     gui_unlock_double_buffer();
  998. #endif 
  999.     ExitCategoryFunction = MMI_dummy_function;
  1000.     RedrawCategoryFunction = MMI_dummy_function;
  1001.     GetCategoryHistory = dummy_get_history;
  1002.     GetCategoryHistorySize = dummy_get_history_size;
  1003. }
  1004. /*****************************************************************************
  1005.  * FUNCTION
  1006.  *  GetCategory37History
  1007.  * DESCRIPTION
  1008.  *  Gets the history buffer for MO_call screen
  1009.  * PARAMETERS
  1010.  *  history_buffer      [IN]        Is a pointer to the buffer where the history data
  1011.  *  is(?)               [IN]        To be stored      (pre-allocated)
  1012.  * RETURNS
  1013.  *  pointer to the history buffer
  1014.  *****************************************************************************/
  1015. U8 *GetCategory37History(U8 *history_buffer)
  1016. {
  1017. #if(0)
  1018.     /*----------------------------------------------------------------*/
  1019.     /* Local Variables                                                */
  1020.     /*----------------------------------------------------------------*/
  1021. if(history_buffer!=NULL)
  1022. { U16 i,j;
  1023. word history_ID=(word)(MMI_CATEGORY16_ID|0x8000);
  1024. history_buffer[0]=(U8)(history_ID & 0xff);
  1025. history_buffer[1]=(U8)(history_ID >> 8);
  1026. history_buffer[2]= (U8) (pixtel_UI_strlen((UI_string_type)MMI_general_inputbox.text));
  1027. for(i=0,j=3;i<pixtel_UI_strlen((UI_string_type)MMI_general_inputbox.text);i++)
  1028. {
  1029. history_buffer[j+i]=(U8)(MMI_general_inputbox.text[i]);
  1030. }
  1031. }
  1032. #endif /* (0) */ 
  1033.     /*----------------------------------------------------------------*/
  1034.     /* Code Body                                                      */
  1035.     /*----------------------------------------------------------------*/
  1036.     return (history_buffer);
  1037. }
  1038. /*****************************************************************************
  1039.  * FUNCTION
  1040.  *  GetCategory37HistorySize
  1041.  * DESCRIPTION
  1042.  *  Gets the history buffer size for category MO_call screen
  1043.  * PARAMETERS
  1044.  *  void
  1045.  * RETURNS
  1046.  *  size in U8s of the history buffer
  1047.  *****************************************************************************/
  1048. S32 GetCategory37HistorySize(void)
  1049. {
  1050. #if(0)
  1051.     /*----------------------------------------------------------------*/
  1052.     /* Local Variables                                                */
  1053.     /*----------------------------------------------------------------*/
  1054. return (pixtel_UI_strlen(MMI_general_inputbox.text));
  1055. #endif /* (0) */ 
  1056.     /*----------------------------------------------------------------*/
  1057.     /* Code Body                                                      */
  1058.     /*----------------------------------------------------------------*/
  1059.     return (0);
  1060. }
  1061. /*****************************************************************************
  1062.  * FUNCTION
  1063.  *  RedrawCategory50Screen
  1064.  * DESCRIPTION
  1065.  *  Redraws the Category50 screen
  1066.  * PARAMETERS
  1067.  *  void
  1068.  * RETURNS
  1069.  *  void
  1070.  *****************************************************************************/
  1071. void RedrawCategory50Screen(void)
  1072. {
  1073.     /*----------------------------------------------------------------*/
  1074.     /* Local Variables                                                */
  1075.     /*----------------------------------------------------------------*/
  1076.     /*----------------------------------------------------------------*/
  1077.     /* Code Body                                                      */
  1078.     /*----------------------------------------------------------------*/
  1079. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1080.     gui_lock_double_buffer();
  1081. #endif 
  1082.     clear_buttonbar();
  1083.     show_title_status_icon();
  1084.     draw_title();
  1085.     show_fixed_list();
  1086.     show_softkey_background();
  1087.     show_left_softkey();
  1088.     show_right_softkey();
  1089. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1090.     gui_unlock_double_buffer();
  1091.     gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
  1092. #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  1093. }
  1094. /*****************************************************************************
  1095.  * FUNCTION
  1096.  *  ShowCategory50Screen
  1097.  * DESCRIPTION
  1098.  *  Displays the Category50 screen
  1099.  * PARAMETERS
  1100.  *  title                   [IN]        Title for the screen
  1101.  *  title_icon              [IN]        Icon shown with the title
  1102.  *  left_softkey1           [IN]        Left softkey label (SET)
  1103.  *  left_softkey_icon1      [IN]        Icon for the left softkey (SET)
  1104.  *  left_softkey2           [IN]        Left softkey label (UNSET)
  1105.  *  left_softkey_icon2      [IN]        Icon for the left softkey (UNSET)
  1106.  *  right_softkey           [IN]        Right softkey label
  1107.  *  right_softkey_icon      [IN]        Icon for the right softkey
  1108.  *  number_of_items         [IN]        Number of items
  1109.  *  list_of_items           [IN]        List of text items (Strings, not string IDs)
  1110.  *  list_of_states          [IN]        Array containing the states of the items
  1111.  *  highlighted_item        [IN]        
  1112.  *  history_buffer          [IN]        History buffer
  1113.  *  INT(?)                  [IN]        Hilighted_item,         Default item to be highlighted (if there is no history)
  1114.  * RETURNS
  1115.  *  void
  1116.  *****************************************************************************/
  1117. void ShowCategory50Screen(
  1118.         U16 title,
  1119.         U16 title_icon,
  1120.         U16 left_softkey1,
  1121.         U16 left_softkey_icon1,
  1122.         U16 left_softkey2,
  1123.         U16 left_softkey_icon2,
  1124.         U16 right_softkey,
  1125.         U16 right_softkey_icon,
  1126.         S32 number_of_items,
  1127.         U8 **list_of_items,
  1128.         U8 *list_of_states,
  1129.         S32 highlighted_item,
  1130.         U8 *history_buffer)
  1131. {
  1132.     /*----------------------------------------------------------------*/
  1133.     /* Local Variables                                                */
  1134.     /*----------------------------------------------------------------*/
  1135.     S32 i, shortcut_width;
  1136.     U8 h_flag;
  1137.     /*----------------------------------------------------------------*/
  1138.     /* Code Body                                                      */
  1139.     /*----------------------------------------------------------------*/
  1140.     ADD_SCREEN_STRINGS((4, title, left_softkey1, left_softkey2, right_softkey));
  1141.     ADD_SCREEN_IMAGES((4, title_icon, left_softkey_icon1, left_softkey_icon2, right_softkey_icon));
  1142.     UI_UNUSED_PARAMETER(left_softkey2);
  1143.     UI_UNUSED_PARAMETER(left_softkey_icon2);
  1144. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1145.     gui_lock_double_buffer();
  1146. #endif 
  1147.     clear_category_screen_key_handlers();
  1148.     MMI_current_menu_type = LIST_MENU;
  1149.     register_fixed_list_shortcut_handler();
  1150.     register_fixed_list_keys();
  1151.     shortcut_width = set_menu_item_count(number_of_items) + 7;
  1152.     resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
  1153.     move_menu_shortcut_handler(UI_device_width - MMI_menu_shortcut_box.width, MMI_title_y);
  1154.     register_hide_menu_shortcut(gui_redraw_menu_shortcut);
  1155.     change_left_softkey(left_softkey1, left_softkey_icon1);
  1156.     change_right_softkey(right_softkey, right_softkey_icon);
  1157.     clear_left_softkey();
  1158.     clear_right_softkey();
  1159.     register_left_softkey_handler();
  1160.     register_right_softkey_handler();
  1161.     register_default_hide_softkeys();
  1162.     set_left_softkey_function(standard_check_list_handle_left_softkey_up, KEY_EVENT_UP);
  1163.     MMI_title_string = (UI_string_type) get_string(title);
  1164.     MMI_title_icon = (PU8) get_image(title_icon);
  1165.     resize_fixed_list(MMI_content_width, MMI_content_height + 2);
  1166.     create_fixed_twostate_menuitems(get_image(CHECKBOX_ON_IMAGE_ID), get_image(CHECKBOX_OFF_IMAGE_ID));
  1167.     /* set_fixed_twostate_positions(18,0,1,0); */
  1168.     associate_fixed_twostate_list();
  1169.     resize_fixed_twostate_menuitems(0, MMI_MENUITEM_HEIGHT);    /* 091305 twostate Calvin added */
  1170.     set_fixed_twostate_positions(MMI_MENUITEM_HEIGHT, 0, 1, 0); /* 091305 twostate Calvin added */
  1171.     checklist_category_menu_item_states = list_of_states;
  1172.     for (i = 0; i < number_of_items; i++)
  1173.     {
  1174.         add_fixed_twostate_item((UI_string_type) list_of_items[i]);
  1175.         if (list_of_states[i])
  1176.         {
  1177.             select_fixed_twostate_item(i);
  1178.         }
  1179.     }
  1180.     move_fixed_list(0, (MMI_title_y + MMI_title_height));
  1181.     resize_fixed_list(MMI_content_width, MMI_content_height + 2);
  1182.     register_fixed_list_highlight_handler(standard_check_list_highlight_handler);
  1183.     resize_fixed_list_to_content_height();
  1184.     h_flag = set_list_menu_category_history(MMI_CATEGORY50_ID, history_buffer);
  1185.     if (h_flag)
  1186.     {
  1187.         fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
  1188.     }
  1189.     else
  1190.     {
  1191.         fixed_list_goto_item_no_redraw(highlighted_item);
  1192.     }
  1193.     register_menu_shortcut_selected(standard_check_list_handle_item_select);
  1194.     resize_fixed_twostate_menuitems_to_list_width();
  1195. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1196.     gui_unlock_double_buffer();
  1197. #endif 
  1198.     ExitCategoryFunction = ExitCategory50Screen;
  1199.     RedrawCategoryFunction = RedrawCategory50Screen;
  1200.     GetCategoryHistory = GetCategory50History;
  1201.     GetCategoryHistorySize = GetCategory50HistorySize;
  1202.     RedrawCategory50Screen();
  1203. }
  1204. /*****************************************************************************
  1205.  * FUNCTION
  1206.  *  ExitCategory50Screen
  1207.  * DESCRIPTION
  1208.  *  Exits the Category50 screen
  1209.  * PARAMETERS
  1210.  *  void
  1211.  * RETURNS
  1212.  *  void
  1213.  *****************************************************************************/
  1214. void ExitCategory50Screen(void)
  1215. {
  1216.     /*----------------------------------------------------------------*/
  1217.     /* Local Variables                                                */
  1218.     /*----------------------------------------------------------------*/
  1219.     /*----------------------------------------------------------------*/
  1220.     /* Code Body                                                      */
  1221.     /*----------------------------------------------------------------*/
  1222.     ClearHighlightHandler();
  1223.     reset_softkeys();
  1224.     reset_menu_shortcut_handler();
  1225.     reset_fixed_list();
  1226.     ExitCategoryFunction = MMI_dummy_function;
  1227.     RedrawCategoryFunction = MMI_dummy_function;
  1228.     GetCategoryHistory = dummy_get_history;
  1229.     GetCategoryHistorySize = dummy_get_history_size;
  1230. }
  1231. /*****************************************************************************
  1232.  * FUNCTION
  1233.  *  GetCategory50HistorySize
  1234.  * DESCRIPTION
  1235.  *  Gets the history buffer size for Category50 screen
  1236.  * PARAMETERS
  1237.  *  void
  1238.  * RETURNS
  1239.  *  size in U8s of the history buffer
  1240.  *****************************************************************************/
  1241. S32 GetCategory50HistorySize(void)
  1242. {
  1243.     /*----------------------------------------------------------------*/
  1244.     /* Local Variables                                                */
  1245.     /*----------------------------------------------------------------*/
  1246.     /*----------------------------------------------------------------*/
  1247.     /* Code Body                                                      */
  1248.     /*----------------------------------------------------------------*/
  1249.     return (sizeof(list_menu_category_history));
  1250. }
  1251. /*****************************************************************************
  1252.  * FUNCTION
  1253.  *  GetCategory50History
  1254.  * DESCRIPTION
  1255.  *  Gets the history buffer for Category50 screen
  1256.  * PARAMETERS
  1257.  *  history_buffer      [IN]        Is a pointer to the buffer where the history data
  1258.  *  is(?)               [IN]        To be stored      (pre-allocated)
  1259.  * RETURNS
  1260.  *  pointer to the history buffer
  1261.  *****************************************************************************/
  1262. U8 *GetCategory50History(U8 *history_buffer)
  1263. {
  1264.     /*----------------------------------------------------------------*/
  1265.     /* Local Variables                                                */
  1266.     /*----------------------------------------------------------------*/
  1267.     /*----------------------------------------------------------------*/
  1268.     /* Code Body                                                      */
  1269.     /*----------------------------------------------------------------*/
  1270.     get_list_menu_category_history(MMI_CATEGORY50_ID, history_buffer);
  1271.     return (history_buffer);
  1272. }
  1273. /*****************************************************************************
  1274.  * FUNCTION
  1275.  *  RedrawCategory51Screen
  1276.  * DESCRIPTION
  1277.  *  Redraws the category51 screen
  1278.  * PARAMETERS
  1279.  *  void
  1280.  * RETURNS
  1281.  *  void
  1282.  *****************************************************************************/
  1283. void RedrawCategory51Screen(void)
  1284. {
  1285.     /*----------------------------------------------------------------*/
  1286.     /* Local Variables                                                */
  1287.     /*----------------------------------------------------------------*/
  1288.     /*----------------------------------------------------------------*/
  1289.     /* Code Body                                                      */
  1290.     /*----------------------------------------------------------------*/
  1291. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1292.     gui_lock_double_buffer();
  1293. #endif 
  1294.     clear_buttonbar();
  1295.     show_title_status_icon();
  1296.     draw_title();
  1297.     show_fixed_list();
  1298.     show_softkey_background();
  1299.     show_left_softkey();
  1300.     show_right_softkey();
  1301. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1302.     gui_unlock_double_buffer();
  1303.     gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
  1304. #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  1305. }
  1306. /*****************************************************************************
  1307.  * FUNCTION
  1308.  *  category51_check_list_handle_left_softkey_up
  1309.  * DESCRIPTION
  1310.  *  Handles Check List Selection/Deselection
  1311.  * PARAMETERS
  1312.  *  void
  1313.  * RETURNS
  1314.  *  void
  1315.  *****************************************************************************/
  1316. void category51_check_list_handle_left_softkey_up(void)
  1317. {
  1318.     /*----------------------------------------------------------------*/
  1319.     /* Local Variables                                                */
  1320.     /*----------------------------------------------------------------*/
  1321.     S32 i = GetHighlightedItem();
  1322.     /*----------------------------------------------------------------*/
  1323.     /* Code Body                                                      */
  1324.     /*----------------------------------------------------------------*/
  1325.     standard_check_list_handle_item_select(i);
  1326.     if (checklist_category_menu_item_states != NULL)
  1327.     {
  1328.         checklist_category_menu_item_states[i] = get_fixed_twostate_item_state(i);
  1329.     }
  1330. }
  1331. /*****************************************************************************
  1332.  * FUNCTION
  1333.  *  ShowCategory51Screen
  1334.  * DESCRIPTION
  1335.  *  Displays the category51 screen
  1336.  * PARAMETERS
  1337.  *  title                   [IN]        Title for the screen
  1338.  *  title_icon              [IN]        Icon shown with the title
  1339.  *  left_softkey1           [IN]        Left softkey label   (SET)
  1340.  *  left_softkey_icon1      [IN]        Icon for the left softkey (SET)
  1341.  *  left_softkey2           [IN]        Left softkey label (UNSET)
  1342.  *  left_softkey_icon2      [IN]        Icon for the left softkey (UNSET)
  1343.  *  right_softkey           [IN]        Right softkey label
  1344.  *  right_softkey_icon      [IN]        Icon for the right softkey
  1345.  *  number_of_items         [IN]        Number of items
  1346.  *  list_of_items           [IN]        List of text items
  1347.  *  list_of_states          [IN]        Array containing the states of the items
  1348.  *  highlighted_item        [IN]        Default item to be highlighted (if there is no history)
  1349.  *  history_buffer          [IN]        History buffer
  1350.  * RETURNS
  1351.  *  void
  1352.  *****************************************************************************/
  1353. void ShowCategory51Screen(
  1354.         U16 title,
  1355.         U16 title_icon,
  1356.         U16 left_softkey1,
  1357.         U16 left_softkey_icon1,
  1358.         U16 left_softkey2,
  1359.         U16 left_softkey_icon2,
  1360.         U16 right_softkey,
  1361.         U16 right_softkey_icon,
  1362.         S32 number_of_items,
  1363.         U16 *list_of_items,
  1364.         U8 *list_of_states,
  1365.         S32 highlighted_item,
  1366.         U8 *history_buffer)
  1367. {
  1368.     /*----------------------------------------------------------------*/
  1369.     /* Local Variables                                                */
  1370.     /*----------------------------------------------------------------*/
  1371.     S32 i, shortcut_width;
  1372.     U8 h_flag;
  1373.     /*----------------------------------------------------------------*/
  1374.     /* Code Body                                                      */
  1375.     /*----------------------------------------------------------------*/
  1376.     ADD_SCREEN_STRINGS((4, title, left_softkey1, left_softkey2, right_softkey));
  1377.     APPEND_SCREEN_STRING_LIST(number_of_items, (U16*) list_of_items);
  1378.     ADD_SCREEN_IMAGES((4, title_icon, left_softkey_icon1, left_softkey_icon2, right_softkey_icon));
  1379.     UI_UNUSED_PARAMETER(left_softkey2);
  1380.     UI_UNUSED_PARAMETER(left_softkey_icon2);
  1381. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1382.     gui_lock_double_buffer();
  1383. #endif 
  1384.     clear_category_screen_key_handlers();
  1385.     MMI_current_menu_type = LIST_MENU;
  1386.     register_fixed_list_shortcut_handler();
  1387.     register_fixed_list_keys();
  1388.     shortcut_width = set_menu_item_count(number_of_items) + 7;
  1389.     resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
  1390.     move_menu_shortcut_handler(UI_device_width - MMI_menu_shortcut_box.width, MMI_title_y);
  1391.     register_hide_menu_shortcut(gui_redraw_menu_shortcut);
  1392.     change_left_softkey(left_softkey1, left_softkey_icon1);
  1393.     change_right_softkey(right_softkey, right_softkey_icon);
  1394.     clear_left_softkey();
  1395.     clear_right_softkey();
  1396.     register_left_softkey_handler();
  1397.     register_right_softkey_handler();
  1398.     register_default_hide_softkeys();
  1399.     set_left_softkey_function(standard_check_list_handle_left_softkey_up, KEY_EVENT_UP);
  1400.     MMI_title_string = (UI_string_type) get_string(title);
  1401.     MMI_title_icon = (PU8) get_image(title_icon);
  1402.     resize_fixed_list(MMI_content_width, MMI_content_height + 2);
  1403.     create_fixed_twostate_menuitems(get_image(CHECKBOX_ON_IMAGE_ID), get_image(CHECKBOX_OFF_IMAGE_ID));
  1404.     /* set_fixed_twostate_positions(18,0,1,0); */
  1405.     associate_fixed_twostate_list();
  1406.     resize_fixed_twostate_menuitems(0, MMI_MENUITEM_HEIGHT);    /* 091305 twostate Calvin added */
  1407.     set_fixed_twostate_positions(MMI_MENUITEM_HEIGHT, 0, 1, 0); /* 091305 twostate Calvin added */
  1408.     checklist_category_menu_item_states = list_of_states;
  1409.     for (i = 0; i < number_of_items; i++)
  1410.     {
  1411.         add_fixed_twostate_item(get_string(list_of_items[i]));
  1412.         if (list_of_states[i])
  1413.         {
  1414.             select_fixed_twostate_item(i);
  1415.         }
  1416.     }
  1417.     move_fixed_list(0, (MMI_title_y + MMI_title_height));
  1418.     resize_fixed_list(MMI_content_width, MMI_content_height + 2);
  1419.     register_fixed_list_highlight_handler(standard_check_list_highlight_handler);
  1420.     resize_fixed_list_to_content_height();
  1421.     h_flag = set_list_menu_category_history(MMI_CATEGORY51_ID, history_buffer);
  1422.     if (h_flag)
  1423.     {
  1424.         fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
  1425.     }
  1426.     else
  1427.     {
  1428.         fixed_list_goto_item_no_redraw(highlighted_item);
  1429.     }
  1430.     register_menu_shortcut_selected(standard_check_list_handle_item_select);
  1431.     resize_fixed_twostate_menuitems_to_list_width();
  1432. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1433.     gui_unlock_double_buffer();
  1434. #endif 
  1435.     ExitCategoryFunction = ExitCategory51Screen;
  1436.     RedrawCategoryFunction = RedrawCategory51Screen;
  1437.     GetCategoryHistory = GetCategory51History;
  1438.     GetCategoryHistorySize = GetCategory51HistorySize;
  1439.     RedrawCategory51Screen();
  1440. }
  1441. /*****************************************************************************
  1442.  * FUNCTION
  1443.  *  ExitCategory51Screen
  1444.  * DESCRIPTION
  1445.  *  Exits the category51 screen
  1446.  * PARAMETERS
  1447.  *  void
  1448.  * RETURNS
  1449.  *  void
  1450.  *****************************************************************************/
  1451. void ExitCategory51Screen(void)
  1452. {
  1453.     /*----------------------------------------------------------------*/
  1454.     /* Local Variables                                                */
  1455.     /*----------------------------------------------------------------*/
  1456.     /*----------------------------------------------------------------*/
  1457.     /* Code Body                                                      */
  1458.     /*----------------------------------------------------------------*/
  1459.     ClearHighlightHandler();
  1460.     reset_softkeys();
  1461.     reset_menu_shortcut_handler();
  1462.     reset_fixed_list();
  1463.     ExitCategoryFunction = MMI_dummy_function;
  1464.     RedrawCategoryFunction = MMI_dummy_function;
  1465.     GetCategoryHistory = dummy_get_history;
  1466.     GetCategoryHistorySize = dummy_get_history_size;
  1467. }
  1468. /*****************************************************************************
  1469.  * FUNCTION
  1470.  *  GetCategory51HistorySize
  1471.  * DESCRIPTION
  1472.  *  Gets the history buffer size for category51 screen
  1473.  * PARAMETERS
  1474.  *  void
  1475.  * RETURNS
  1476.  *  size in U8s of the history buffer
  1477.  *****************************************************************************/
  1478. S32 GetCategory51HistorySize(void)
  1479. {
  1480.     /*----------------------------------------------------------------*/
  1481.     /* Local Variables                                                */
  1482.     /*----------------------------------------------------------------*/
  1483.     /*----------------------------------------------------------------*/
  1484.     /* Code Body                                                      */
  1485.     /*----------------------------------------------------------------*/
  1486.     return (sizeof(list_menu_category_history));
  1487. }
  1488. /*****************************************************************************
  1489.  * FUNCTION
  1490.  *  GetCategory51History
  1491.  * DESCRIPTION
  1492.  *  Gets the history buffer for category51 screen
  1493.  * PARAMETERS
  1494.  *  history_buffer      [IN]        Is a pointer to the buffer where the history data
  1495.  *  is(?)               [IN]        To be stored      (pre-allocated)
  1496.  * RETURNS
  1497.  *  pointer to the history buffer
  1498.  *****************************************************************************/
  1499. U8 *GetCategory51History(U8 *history_buffer)
  1500. {
  1501.     /*----------------------------------------------------------------*/
  1502.     /* Local Variables                                                */
  1503.     /*----------------------------------------------------------------*/
  1504.     /*----------------------------------------------------------------*/
  1505.     /* Code Body                                                      */
  1506.     /*----------------------------------------------------------------*/
  1507.     get_list_menu_category_history(MMI_CATEGORY51_ID, history_buffer);
  1508.     return (history_buffer);
  1509. }
  1510. /*****************************************************************************
  1511.  * FUNCTION
  1512.  *  RedrawCategory54Screen
  1513.  * DESCRIPTION
  1514.  *  Redraws the category54 screen
  1515.  * PARAMETERS
  1516.  *  void
  1517.  * RETURNS
  1518.  *  void
  1519.  *****************************************************************************/
  1520. void RedrawCategory54Screen(void)
  1521. {
  1522.     /*----------------------------------------------------------------*/
  1523.     /* Local Variables                                                */
  1524.     /*----------------------------------------------------------------*/
  1525.     /*----------------------------------------------------------------*/
  1526.     /* Code Body                                                      */
  1527.     /*----------------------------------------------------------------*/
  1528. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1529.     gui_lock_double_buffer();
  1530. #endif 
  1531.     clear_buttonbar();
  1532.     show_title_status_icon();
  1533.     draw_title();
  1534.     show_fixed_list();
  1535.     show_softkey_background();
  1536.     show_left_softkey();
  1537.     show_right_softkey();
  1538. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1539.     gui_unlock_double_buffer();
  1540.     gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
  1541. #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  1542. }
  1543. /*****************************************************************************
  1544.  * FUNCTION
  1545.  *  ShowCategory54Screen
  1546.  * DESCRIPTION
  1547.  *  Displays the category54 screen
  1548.  * PARAMETERS
  1549.  *  title                       [IN]        Title for the screen
  1550.  *  title_icon                  [IN]        Icon displayed with the title
  1551.  *  left_softkey                [IN]        Left softkey label
  1552.  *  left_softkey_icon           [IN]        Left softkey icon
  1553.  *  right_softkey               [IN]        Right softkey label
  1554.  *  right_softkey_icon          [IN]        Right softkey icon
  1555.  *  number_of_items             [IN]        Number of items in the menu
  1556.  *  list_of_items               [IN]        Array of items
  1557.  *  list_of_icons               [IN]        Array of icons
  1558.  *  list_of_descriptions1       [IN]        Array of Pop up description strings 1
  1559.  *  list_of_descriptions2       [IN]        Array of Pop up description strings 2
  1560.  *  flags                       [IN]        Currently unused.
  1561.  *  highlighted_item            [IN]        Default item to be highlighted (if there is no history)
  1562.  *  history_buffer              [IN]        History buffer
  1563.  * RETURNS
  1564.  *  void
  1565.  *****************************************************************************/
  1566. void ShowCategory54Screen(
  1567.         U16 title,
  1568.         U16 title_icon,
  1569.         U16 left_softkey,
  1570.         U16 left_softkey_icon,
  1571.         U16 right_softkey,
  1572.         U16 right_softkey_icon,
  1573.         S32 number_of_items,
  1574.         U8 **list_of_items,
  1575.         U16 *list_of_icons,
  1576.         U8 **list_of_descriptions1,
  1577.         U8 **list_of_descriptions2,
  1578.         S32 flags,
  1579.         S32 highlighted_item,
  1580.         U8 *history_buffer)
  1581. {
  1582.     /*----------------------------------------------------------------*/
  1583.     /* Local Variables                                                */
  1584.     /*----------------------------------------------------------------*/
  1585.     S32 i, shortcut_width;
  1586.     U8 h_flag;
  1587.     /*----------------------------------------------------------------*/
  1588.     /* Code Body                                                      */
  1589.     /*----------------------------------------------------------------*/
  1590.     ADD_SCREEN_STRINGS((3, title, left_softkey, right_softkey));
  1591.     APPEND_SCREEN_STRING_LIST(number_of_items, (U16*) list_of_items);
  1592.     ADD_SCREEN_IMAGES((3, title_icon, left_softkey_icon, right_softkey_icon));
  1593.     APPEND_SCREEN_IMAGE_LIST(number_of_items, (U16*) list_of_icons);
  1594.     UI_UNUSED_PARAMETER(flags);
  1595.     UI_UNUSED_PARAMETER(list_of_descriptions1);
  1596.     UI_UNUSED_PARAMETER(list_of_descriptions2);
  1597. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1598.     gui_lock_double_buffer();
  1599. #endif 
  1600.     MMI_menu_shortcut_number = -1;
  1601.     clear_category_screen_key_handlers();
  1602.     change_left_softkey(left_softkey, left_softkey_icon);
  1603.     change_right_softkey(right_softkey, right_softkey_icon);
  1604.     clear_left_softkey();
  1605.     clear_right_softkey();
  1606.     register_left_softkey_handler();
  1607.     register_right_softkey_handler();
  1608.     register_default_hide_softkeys();
  1609.     create_fixed_icontext_menuitems();
  1610.     resize_fixed_list(MMI_content_width, MMI_content_height + 2);
  1611.     associate_fixed_icontext_list();
  1612.     if ((list_of_descriptions1 == NULL) && (list_of_descriptions2 == NULL))
  1613.     {
  1614.         for (i = 0; i < number_of_items; i++)
  1615.         {
  1616.             /* MTK Leo added, not display icon on BW_MMI */
  1617.         #ifdef __BW_MMI__
  1618.             add_fixed_icontext_item((UI_string_type) list_of_items[i], get_image(0));
  1619.         #else 
  1620.             add_fixed_icontext_item((UI_string_type) list_of_items[i], get_image(list_of_icons[i]));
  1621.         #endif 
  1622.             /* MTK Leo end */
  1623.             wgui_pop_up_description_strings[i].text_strings[0] = NULL;
  1624.             wgui_pop_up_description_strings[i].text_strings[1] = NULL;
  1625.         }
  1626.     }
  1627.     else if (list_of_descriptions1 == NULL)
  1628.     {
  1629.         for (i = 0; i < number_of_items; i++)
  1630.         {
  1631.             /* MTK Leo added, not display icon on BW_MMI */
  1632.         #ifdef __BW_MMI__
  1633.             add_fixed_icontext_item((UI_string_type) list_of_items[i], get_image(0));
  1634.         #else 
  1635.             add_fixed_icontext_item((UI_string_type) list_of_items[i], get_image(list_of_icons[i]));
  1636.         #endif 
  1637.             /* MTK Leo end */
  1638.             wgui_pop_up_description_strings[i].text_strings[0] = NULL;
  1639.             wgui_pop_up_description_strings[i].text_strings[1] = (UI_string_type) list_of_descriptions2[i];
  1640.         }
  1641.     }
  1642.     else if (list_of_descriptions2 == NULL)
  1643.     {
  1644.         for (i = 0; i < number_of_items; i++)
  1645.         {
  1646.             /* MTK Leo added, not display icon on BW_MMI */
  1647.         #ifdef __BW_MMI__
  1648.             add_fixed_icontext_item((UI_string_type) list_of_items[i], get_image(0));
  1649.         #else 
  1650.             add_fixed_icontext_item((UI_string_type) list_of_items[i], get_image(list_of_icons[i]));
  1651.         #endif 
  1652.             /* MTK Leo end */
  1653.             wgui_pop_up_description_strings[i].text_strings[0] = (UI_string_type) list_of_descriptions1[i];
  1654.             wgui_pop_up_description_strings[i].text_strings[1] = NULL;
  1655.         }
  1656.     }
  1657.     else
  1658.     {
  1659.         for (i = 0; i < number_of_items; i++)
  1660.         {
  1661.             /* MTK Leo added, not display icon on BW_MMI */
  1662.         #ifdef __BW_MMI__
  1663.             add_fixed_icontext_item((UI_string_type) list_of_items[i], get_image(0));
  1664.         #else 
  1665.             add_fixed_icontext_item((UI_string_type) list_of_items[i], get_image(list_of_icons[i]));
  1666.         #endif 
  1667.             /* MTK Leo end */
  1668.             wgui_pop_up_description_strings[i].text_strings[0] = (UI_string_type) list_of_descriptions1[i];
  1669.             wgui_pop_up_description_strings[i].text_strings[1] = (UI_string_type) list_of_descriptions2[i];
  1670.         }
  1671.     }
  1672.     register_fixed_list_shortcut_handler();
  1673.     register_fixed_list_keys();
  1674.     shortcut_width = set_menu_item_count(number_of_items) + 7;
  1675.     resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
  1676.     move_menu_shortcut_handler(UI_device_width - MMI_menu_shortcut_box.width, MMI_title_y);
  1677.     register_hide_menu_shortcut(gui_redraw_menu_shortcut);
  1678.     resize_fixed_icontext_menuitems(0, get_menu_item_height());
  1679.     set_fixed_icontext_positions(MMI_ICONTEXT_MENUITEM_HEIGHT + 2, 0, 1, 0);
  1680.     move_fixed_list(0, (MMI_title_y + MMI_title_height));
  1681.     resize_fixed_list(MMI_content_width, MMI_content_height + 2);
  1682.     resize_fixed_list_to_content_height();
  1683.     register_fixed_list_highlight_handler(standard_list_highlight_handler);
  1684.     MMI_current_menu_type = LIST_MENU;
  1685.     h_flag = set_list_menu_category_history(MMI_CATEGORY54_ID, history_buffer);
  1686.     if (h_flag)
  1687.     {
  1688.         fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
  1689.     }
  1690.     else
  1691.     {
  1692.         fixed_list_goto_item_no_redraw(highlighted_item);
  1693.     }
  1694.     MMI_title_string = (UI_string_type) get_string(title);
  1695.     MMI_title_icon = (PU8) get_image(title_icon);
  1696.     resize_fixed_icontext_menuitems_to_list_width();
  1697.     set_pop_up_descriptions(2, number_of_items, MMI_fixed_list_menu.highlighted_item);
  1698. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1699.     gui_unlock_double_buffer();
  1700. #endif 
  1701.     ExitCategoryFunction = ExitCategory54Screen;
  1702.     RedrawCategoryFunction = RedrawCategory54Screen;
  1703.     GetCategoryHistory = GetCategory54History;
  1704.     GetCategoryHistorySize = GetCategory54HistorySize;
  1705.     RedrawCategory54Screen();
  1706. }
  1707. /*****************************************************************************
  1708.  * FUNCTION
  1709.  *  ExitCategory54Screen
  1710.  * DESCRIPTION
  1711.  *  Exits the category54 screen
  1712.  * PARAMETERS
  1713.  *  void
  1714.  * RETURNS
  1715.  *  void
  1716.  *****************************************************************************/
  1717. void ExitCategory54Screen(void)
  1718. {
  1719.     /*----------------------------------------------------------------*/
  1720.     /* Local Variables                                                */
  1721.     /*----------------------------------------------------------------*/
  1722.     /*----------------------------------------------------------------*/
  1723.     /* Code Body                                                      */
  1724.     /*----------------------------------------------------------------*/
  1725.     ClearHighlightHandler();
  1726.     reset_softkeys();
  1727.     reset_menu_shortcut_handler();
  1728.     reset_fixed_list();
  1729.     reset_pop_up_descriptions();
  1730.     ExitCategoryFunction = MMI_dummy_function;
  1731.     RedrawCategoryFunction = MMI_dummy_function;
  1732.     GetCategoryHistory = dummy_get_history;
  1733.     GetCategoryHistorySize = dummy_get_history_size;
  1734. }
  1735. /*****************************************************************************
  1736.  * FUNCTION
  1737.  *  GetCategory54HistorySize
  1738.  * DESCRIPTION
  1739.  *  Gets the history buffer size for the category54 screen
  1740.  * PARAMETERS
  1741.  *  void
  1742.  * RETURNS
  1743.  *  size in U8s of the history buffer
  1744.  *****************************************************************************/
  1745. S32 GetCategory54HistorySize(void)
  1746. {
  1747.     /*----------------------------------------------------------------*/
  1748.     /* Local Variables                                                */
  1749.     /*----------------------------------------------------------------*/
  1750.     /*----------------------------------------------------------------*/
  1751.     /* Code Body                                                      */
  1752.     /*----------------------------------------------------------------*/
  1753.     return (sizeof(list_menu_category_history));
  1754. }
  1755. /*****************************************************************************
  1756.  * FUNCTION
  1757.  *  GetCategory54History
  1758.  * DESCRIPTION
  1759.  *  Gets the history buffer for the category54 screen
  1760.  * PARAMETERS
  1761.  *  history_buffer      [IN]        Is the buffer into which the history data is stored (pre-allocated)
  1762.  * RETURNS
  1763.  *  pointer to the history buffer
  1764.  *****************************************************************************/
  1765. U8 *GetCategory54History(U8 *history_buffer)
  1766. {
  1767.     /*----------------------------------------------------------------*/
  1768.     /* Local Variables                                                */
  1769.     /*----------------------------------------------------------------*/
  1770.     /*----------------------------------------------------------------*/
  1771.     /* Code Body                                                      */
  1772.     /*----------------------------------------------------------------*/
  1773.     get_list_menu_category_history(MMI_CATEGORY54_ID, history_buffer);
  1774.     return (history_buffer);
  1775. }
  1776. /*****************************************************************************
  1777.  * FUNCTION
  1778.  *  RedrawCategory58Screen
  1779.  * DESCRIPTION
  1780.  *  Redraws the category58 screen
  1781.  * PARAMETERS
  1782.  *  void
  1783.  * RETURNS
  1784.  *  void
  1785.  *****************************************************************************/
  1786. void RedrawCategory58Screen(void)
  1787. {
  1788.     /*----------------------------------------------------------------*/
  1789.     /* Local Variables                                                */
  1790.     /*----------------------------------------------------------------*/
  1791.     /*----------------------------------------------------------------*/
  1792.     /* Code Body                                                      */
  1793.     /*----------------------------------------------------------------*/
  1794. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1795.     gui_lock_double_buffer();
  1796. #endif 
  1797.     gui_hide_animations();
  1798.     clear_screen();
  1799.     show_title_status_icon();
  1800.     draw_title();
  1801.     gui_reset_clip();
  1802.     gui_reset_text_clip();
  1803.     wgui_show_transparent_animation();
  1804.     show_multiline_inputbox();
  1805.     show_softkey_background();
  1806.     show_left_softkey();
  1807.     show_right_softkey();
  1808. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1809.     gui_unlock_double_buffer();
  1810.     gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
  1811. #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  1812. }
  1813. /*****************************************************************************
  1814.  * FUNCTION
  1815.  *  ShowCategory58Screen
  1816.  * DESCRIPTION
  1817.  *  Displays the category58 screen
  1818.  * PARAMETERS
  1819.  *  title                   [IN]        Title for the screen
  1820.  *  title_icon              [IN]        Icon shown with the title
  1821.  *  left_softkey            [IN]        Left softkey label
  1822.  *  left_softkey_icon       [IN]        Icon for the left softkey
  1823.  *  right_softkey           [IN]        Right softkey label
  1824.  *  right_softkey_icon      [IN]        Icon for the right softkey
  1825.  *  message                 [IN]        Notification message
  1826.  *  message_icon            [IN]        
  1827.  *  history_buffer          [IN]        History buffer
  1828.  *  MMI_ID_TYPE(?)          [IN]        Image          Notification image
  1829.  * RETURNS
  1830.  *  void
  1831.  *****************************************************************************/
  1832. void ShowCategory58Screen(
  1833.         U16 title,
  1834.         U16 title_icon,
  1835.         U16 left_softkey,
  1836.         U16 left_softkey_icon,
  1837.         U16 right_softkey,
  1838.         U16 right_softkey_icon,
  1839.         U16 message,
  1840.         U16 message_icon,
  1841.         U8 *history_buffer)
  1842. {
  1843.     /*----------------------------------------------------------------*/
  1844.     /* Local Variables                                                */
  1845.     /*----------------------------------------------------------------*/
  1846.     S32 l, fh;
  1847.     /*----------------------------------------------------------------*/
  1848.     /* Code Body                                                      */
  1849.     /*----------------------------------------------------------------*/
  1850.     ADD_SCREEN_STRINGS((4, title, left_softkey, right_softkey, message));
  1851.     ADD_SCREEN_IMAGES((4, title_icon, left_softkey_icon, right_softkey_icon, message_icon));
  1852.     UI_UNUSED_PARAMETER(history_buffer);
  1853. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1854.     gui_lock_double_buffer();
  1855. #endif 
  1856.     MMI_menu_shortcut_number = -1;
  1857.     clear_category_screen_key_handlers();
  1858.     clear_left_softkey();
  1859.     clear_right_softkey();
  1860.     change_left_softkey(left_softkey, left_softkey_icon);
  1861.     change_right_softkey(right_softkey, right_softkey_icon);
  1862.     register_left_softkey_handler();
  1863.     register_right_softkey_handler();
  1864.     register_default_hide_softkeys();
  1865.     MMI_title_string = (UI_string_type) get_string(title);
  1866.     MMI_title_icon = (PU8) get_image(title_icon);
  1867.     MMI_message_string = (UI_string_type) get_string(message);
  1868.     l = gui_strlen(MMI_message_string);
  1869.     create_multiline_inputbox_set_buffer(MMI_message_string, l, l, 0);
  1870.     resize_multiline_inputbox(UI_device_width - 31, MMI_content_height + 3);
  1871.     MMI_multiline_inputbox.flags |=
  1872.         (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND |
  1873.          UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
  1874.     show_multiline_inputbox_no_draw();
  1875.     gui_set_font(MMI_multiline_inputbox.text_font);
  1876.     fh = get_multiline_inputbox_line_height();
  1877.     resize_multiline_inputbox(
  1878.         MMI_multiline_inputbox.width,
  1879.         (MMI_multiline_inputbox.n_lines * fh) + MULTILINE_INPUTBOX_HEIGHT_PAD + MMI_multiline_inputbox.text_y);
  1880.     move_multiline_inputbox(
  1881.         32,
  1882.         (MMI_title_y + MMI_title_height) + ((MMI_content_height >> 1) - (MMI_multiline_inputbox.height >> 1)));
  1883.     wgui_set_animation_y(16, MMI_multiline_inputbox.y + 8, message_icon);
  1884. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1885.     gui_unlock_double_buffer();
  1886. #endif 
  1887.     ExitCategoryFunction = ExitCategory58Screen;
  1888.     RedrawCategoryFunction = RedrawCategory58Screen;
  1889.     GetCategoryHistory = GetCategory58History;
  1890.     GetCategoryHistorySize = GetCategory58HistorySize;
  1891.     RedrawCategory58Screen();
  1892. }
  1893. /*****************************************************************************
  1894.  * FUNCTION
  1895.  *  ExitCategory58Screen
  1896.  * DESCRIPTION
  1897.  *  Exits the category58 screen
  1898.  * PARAMETERS
  1899.  *  void
  1900.  * RETURNS
  1901.  *  void
  1902.  *****************************************************************************/
  1903. void ExitCategory58Screen(void)
  1904. {
  1905.     /*----------------------------------------------------------------*/
  1906.     /* Local Variables                                                */
  1907.     /*----------------------------------------------------------------*/
  1908.     /*----------------------------------------------------------------*/
  1909.     /* Code Body                                                      */
  1910.     /*----------------------------------------------------------------*/
  1911.     gui_hide_animations();
  1912.     ExitCategoryFunction = MMI_dummy_function;
  1913.     RedrawCategoryFunction = MMI_dummy_function;
  1914.     GetCategoryHistory = dummy_get_history;
  1915.     GetCategoryHistorySize = dummy_get_history_size;
  1916. }
  1917. /*****************************************************************************
  1918.  * FUNCTION
  1919.  *  GetCategory58HistorySize
  1920.  * DESCRIPTION
  1921.  *  Gets the history buffer size for the category58 screen
  1922.  * PARAMETERS
  1923.  *  void
  1924.  * RETURNS
  1925.  *  size in U8s of the history buffer
  1926.  *****************************************************************************/
  1927. S32 GetCategory58HistorySize(void)
  1928. {
  1929.     /*----------------------------------------------------------------*/
  1930.     /* Local Variables                                                */
  1931.     /*----------------------------------------------------------------*/
  1932.     /*----------------------------------------------------------------*/
  1933.     /* Code Body                                                      */
  1934.     /*----------------------------------------------------------------*/
  1935.     return (0);
  1936. }
  1937. /*****************************************************************************
  1938.  * FUNCTION
  1939.  *  GetCategory58History
  1940.  * DESCRIPTION
  1941.  *  Gets the history buffer for the category58 screen
  1942.  * PARAMETERS
  1943.  *  history_buffer      [IN]        Is the buffer into which the history data is stored
  1944.  * RETURNS
  1945.  *  pointer to the history buffer
  1946.  *****************************************************************************/
  1947. U8 *GetCategory58History(U8 *history_buffer)
  1948. {
  1949.     /*----------------------------------------------------------------*/
  1950.     /* Local Variables                                                */
  1951.     /*----------------------------------------------------------------*/
  1952.     /*----------------------------------------------------------------*/
  1953.     /* Code Body                                                      */
  1954.     /*----------------------------------------------------------------*/
  1955.     return (history_buffer);
  1956. }
  1957. /* CODE ENDED VANDANA MEHTANI */
  1958. /*****************************************************************************
  1959.  * FUNCTION
  1960.  *  RedrawCategory60Screen
  1961.  * DESCRIPTION
  1962.  *  Redraws the category60 screen
  1963.  * PARAMETERS
  1964.  *  void
  1965.  * RETURNS
  1966.  *  void
  1967.  *****************************************************************************/
  1968. void RedrawCategory60Screen(void)
  1969. {
  1970.     /*----------------------------------------------------------------*/
  1971.     /* Local Variables                                                */
  1972.     /*----------------------------------------------------------------*/
  1973.     S32 width, height, y;
  1974.     /*----------------------------------------------------------------*/
  1975.     /* Code Body                                                      */
  1976.     /*----------------------------------------------------------------*/
  1977. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1978.     gui_lock_double_buffer();
  1979. #endif 
  1980.     clear_screen();
  1981.     gui_set_clip(0, 0, UI_device_width - 1, UI_device_height - 1);
  1982.     gui_set_text_clip(0, 0, UI_device_width - 1, UI_device_height - 1);
  1983.     y = MMI_multiline_inputbox.y + MMI_multiline_inputbox.height;
  1984.     gui_measure_image(MMI_message_icon, &width, &height);
  1985.     gui_show_image(
  1986.         (UI_device_width >> 1) - (width >> 1),
  1987.         y + ((UI_device_height - MMI_softkey_height - y) >> 1) - (height >> 1),
  1988.         MMI_message_icon);
  1989.     show_multiline_inputbox();
  1990. #if(UI_DOUBLE_BUFFER_SUPPORT)
  1991.     gui_unlock_double_buffer();
  1992.     gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
  1993. #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  1994. }
  1995. /*****************************************************************************
  1996.  * FUNCTION
  1997.  *  ShowCategory60Screen
  1998.  * DESCRIPTION
  1999.  *  Displays the category60 screen
  2000.  * PARAMETERS
  2001.  *  message             [IN]        Message string
  2002.  *  message_icon        [IN]        
  2003.  *  history_buffer      [IN]        History buffer
  2004.  *  MMI_ID_TYPE(?)      [IN]        Icon        Message icon
  2005.  * RETURNS
  2006.  *  void
  2007.  *****************************************************************************/
  2008. void ShowCategory60Screen(U16 message, U16 message_icon, U8 *history_buffer)
  2009. {
  2010.     /*----------------------------------------------------------------*/
  2011.     /* Local Variables                                                */
  2012.     /*----------------------------------------------------------------*/
  2013.     S32 l, fh;
  2014.     /*----------------------------------------------------------------*/
  2015.     /* Code Body                                                      */
  2016.     /*----------------------------------------------------------------*/
  2017.     ADD_SCREEN_STRINGS((1, message));
  2018.     ADD_SCREEN_IMAGES((1, message_icon));
  2019.     UI_UNUSED_PARAMETER(history_buffer);
  2020. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2021.     gui_lock_double_buffer();
  2022. #endif 
  2023.     MMI_menu_shortcut_number = -1;
  2024.     clear_category_screen_key_handlers();
  2025.     clear_left_softkey();
  2026.     clear_right_softkey();
  2027.     MMI_message_string = (UI_string_type) get_string(message);
  2028.     l = gui_strlen(MMI_message_string);
  2029.     create_multiline_inputbox_set_buffer(MMI_message_string, l, l, 0);
  2030.     resize_multiline_inputbox(MMI_multiline_inputbox.width, MMI_content_height);
  2031.     MMI_multiline_inputbox.flags |=
  2032.         (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_CENTER_JUSTIFY |
  2033.          UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND | UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
  2034.     MMI_message_icon = (PU8) get_image(message_icon);
  2035.     show_multiline_inputbox_no_draw();
  2036.     gui_set_font(MMI_multiline_inputbox.text_font);
  2037.     fh = get_multiline_inputbox_line_height();
  2038.     resize_multiline_inputbox(
  2039.         MMI_multiline_inputbox.width,
  2040.         (MMI_multiline_inputbox.n_lines * fh) + MULTILINE_INPUTBOX_HEIGHT_PAD + MMI_multiline_inputbox.text_y);
  2041. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2042.     gui_unlock_double_buffer();
  2043. #endif 
  2044.     ExitCategoryFunction = ExitCategory60Screen;
  2045.     RedrawCategoryFunction = RedrawCategory60Screen;
  2046.     GetCategoryHistory = GetCategory60History;
  2047.     GetCategoryHistorySize = GetCategory60HistorySize;
  2048.     RedrawCategory60Screen();
  2049. }
  2050. /*****************************************************************************
  2051.  * FUNCTION
  2052.  *  ExitCategory60Screen
  2053.  * DESCRIPTION
  2054.  *  Exits the category60 screen
  2055.  * PARAMETERS
  2056.  *  void
  2057.  * RETURNS
  2058.  *  void
  2059.  *****************************************************************************/
  2060. void ExitCategory60Screen(void)
  2061. {
  2062.     /*----------------------------------------------------------------*/
  2063.     /* Local Variables                                                */
  2064.     /*----------------------------------------------------------------*/
  2065.     /*----------------------------------------------------------------*/
  2066.     /* Code Body                                                      */
  2067.     /*----------------------------------------------------------------*/
  2068.     ExitCategoryFunction = MMI_dummy_function;
  2069.     RedrawCategoryFunction = MMI_dummy_function;
  2070.     GetCategoryHistory = dummy_get_history;
  2071.     GetCategoryHistorySize = dummy_get_history_size;
  2072. }
  2073. /*****************************************************************************
  2074.  * FUNCTION
  2075.  *  GetCategory60HistorySize
  2076.  * DESCRIPTION
  2077.  *  Gets the history buffer size for the category60 screen
  2078.  * PARAMETERS
  2079.  *  void
  2080.  * RETURNS
  2081.  *  size in U8s of the history buffer
  2082.  *****************************************************************************/
  2083. S32 GetCategory60HistorySize(void)
  2084. {
  2085.     /*----------------------------------------------------------------*/
  2086.     /* Local Variables                                                */
  2087.     /*----------------------------------------------------------------*/
  2088.     /*----------------------------------------------------------------*/
  2089.     /* Code Body                                                      */
  2090.     /*----------------------------------------------------------------*/
  2091.     return (0);
  2092. }
  2093. /*****************************************************************************
  2094.  * FUNCTION
  2095.  *  GetCategory60History
  2096.  * DESCRIPTION
  2097.  *  Gets the history buffer for the category60 screen
  2098.  * PARAMETERS
  2099.  *  history_buffer      [IN]        Is the buffer into which the history data is stored (pre-allocated)
  2100.  * RETURNS
  2101.  *  pointer to the history buffer
  2102.  *****************************************************************************/
  2103. U8 *GetCategory60History(U8 *history_buffer)
  2104. {
  2105.     /*----------------------------------------------------------------*/
  2106.     /* Local Variables                                                */
  2107.     /*----------------------------------------------------------------*/
  2108.     /*----------------------------------------------------------------*/
  2109.     /* Code Body                                                      */
  2110.     /*----------------------------------------------------------------*/
  2111.     return (history_buffer);
  2112. }
  2113. /* CODE ADDED VANDANA MEHTANI 11 JUNE */
  2114. /*****************************************************************************
  2115.  * FUNCTION
  2116.  *  RedrawCategory67Screen
  2117.  * DESCRIPTION
  2118.  *  Redraws the category67 screen
  2119.  * PARAMETERS
  2120.  *  void
  2121.  * RETURNS
  2122.  *  void
  2123.  *****************************************************************************/
  2124. void RedrawCategory67Screen(void)
  2125. {
  2126.     /*----------------------------------------------------------------*/
  2127.     /* Local Variables                                                */
  2128.     /*----------------------------------------------------------------*/
  2129.     /*----------------------------------------------------------------*/
  2130.     /* Code Body                                                      */
  2131.     /*----------------------------------------------------------------*/
  2132. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2133.     gui_lock_double_buffer();
  2134. #endif 
  2135.     gui_hide_animations();
  2136.     clear_screen();
  2137.     show_title_status_icon();
  2138.     draw_title();
  2139.     // MTK modified, Max: to solve Chicago issue #965
  2140.     //      gui_reset_clip();
  2141.     gui_set_clip(0, MMI_TITLE_HEIGHT, UI_device_width, UI_device_height - MMI_BUTTON_BAR_HEIGHT);
  2142.     /* MTK end */
  2143.     gui_reset_text_clip();
  2144.     wgui_show_transparent_animation();
  2145.     /* show_multiline_inputbox(); */
  2146.     show_softkey_background();
  2147.     show_left_softkey();
  2148.     show_right_softkey();
  2149. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2150.     gui_unlock_double_buffer();
  2151.     gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
  2152. #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  2153. }
  2154. /*****************************************************************************
  2155.  * FUNCTION
  2156.  *  ShowCategory67Screen
  2157.  * DESCRIPTION
  2158.  *  Displays the category67 screen
  2159.  * PARAMETERS
  2160.  *  title                   [IN]        Title for the screen
  2161.  *  title_icon              [IN]        Icon shown with the title
  2162.  *  left_softkey            [IN]        Left softkey label
  2163.  *  left_softkey_icon       [IN]        Icon for the left softkey
  2164.  *  right_softkey           [IN]        Right softkey label
  2165.  *  right_softkey_icon      [IN]        Icon for the right softkey
  2166.  *  message_icon            [IN]        
  2167.  *  history_buffer          [IN]        History buffer
  2168.  *  MMI_ID_TYPE(?)          [IN]        Image          Animation image
  2169.  * RETURNS
  2170.  *  void
  2171.  *****************************************************************************/
  2172. void ShowCategory67Screen(
  2173.         U16 title,
  2174.         U16 title_icon,
  2175.         U16 left_softkey,
  2176.         U16 left_softkey_icon,
  2177.         U16 right_softkey,
  2178.         U16 right_softkey_icon,
  2179.         U16 message_icon,
  2180.         U8 *history_buffer)
  2181. {
  2182.     /*----------------------------------------------------------------*/
  2183.     /* Local Variables                                                */
  2184.     /*----------------------------------------------------------------*/
  2185.     /*----------------------------------------------------------------*/
  2186.     /* Code Body                                                      */
  2187.     /*----------------------------------------------------------------*/
  2188.     /* ADD_SCREEN_STRINGS((4,title,left_softkey,right_softkey,message)); */
  2189.     ADD_SCREEN_STRINGS((3, title, left_softkey, right_softkey));
  2190.     ADD_SCREEN_IMAGES((4, title_icon, left_softkey_icon, right_softkey_icon, message_icon));
  2191.     UI_UNUSED_PARAMETER(history_buffer);
  2192.     /* UI_UNUSED_PARAMETER(message); */
  2193. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2194.     gui_lock_double_buffer();
  2195. #endif 
  2196.     MMI_menu_shortcut_number = -1;
  2197.     clear_category_screen_key_handlers();
  2198.     clear_left_softkey();
  2199.     clear_right_softkey();
  2200.     change_left_softkey(left_softkey, left_softkey_icon);
  2201.     change_right_softkey(right_softkey, right_softkey_icon);
  2202.     register_left_softkey_handler();
  2203.     register_right_softkey_handler();
  2204.     register_default_hide_softkeys();
  2205.     MMI_title_string = (UI_string_type) get_string(title);
  2206.     MMI_title_icon = (PU8) get_image(title_icon);
  2207.     MMI_message_string = (UI_string_type) NULL;
  2208.     /* CODE ADDED VANDANA MEHTANI */
  2209.     /* wgui_set_animation((MMI_content_width>>1),(MMI_content_height>>1),message_icon); */
  2210.     wgui_set_animation(
  2211.         (MMI_content_width >> 1),
  2212.         ((UI_device_height - (MMI_title_y + MMI_title_height)) >> 1) + 10,
  2213.         message_icon);
  2214.     /* CODE ENDED VANDNA MEHTANI */
  2215. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2216.     gui_unlock_double_buffer();
  2217. #endif 
  2218.     ExitCategoryFunction = ExitCategory67Screen;
  2219.     RedrawCategoryFunction = RedrawCategory67Screen;
  2220.     GetCategoryHistory = GetCategory67History;
  2221.     GetCategoryHistorySize = GetCategory67HistorySize;
  2222.     RedrawCategory67Screen();
  2223. }
  2224. /*****************************************************************************
  2225.  * FUNCTION
  2226.  *  ExitCategory67Screen
  2227.  * DESCRIPTION
  2228.  *  Exits the category67 screen
  2229.  * PARAMETERS
  2230.  *  void
  2231.  * RETURNS
  2232.  *  void
  2233.  *****************************************************************************/
  2234. void ExitCategory67Screen(void)
  2235. {
  2236.     /*----------------------------------------------------------------*/
  2237.     /* Local Variables                                                */
  2238.     /*----------------------------------------------------------------*/
  2239.     /*----------------------------------------------------------------*/
  2240.     /* Code Body                                                      */
  2241.     /*----------------------------------------------------------------*/
  2242.     gui_hide_animations();
  2243.     ExitCategoryFunction = MMI_dummy_function;
  2244.     RedrawCategoryFunction = MMI_dummy_function;
  2245.     GetCategoryHistory = dummy_get_history;
  2246.     GetCategoryHistorySize = dummy_get_history_size;
  2247. }
  2248. /*****************************************************************************
  2249.  * FUNCTION
  2250.  *  GetCategory67HistorySize
  2251.  * DESCRIPTION
  2252.  *  Gets the history buffer size for the category67 screen
  2253.  * PARAMETERS
  2254.  *  void
  2255.  * RETURNS
  2256.  *  size in U8s of the history buffer
  2257.  *****************************************************************************/
  2258. S32 GetCategory67HistorySize(void)
  2259. {
  2260.     /*----------------------------------------------------------------*/
  2261.     /* Local Variables                                                */
  2262.     /*----------------------------------------------------------------*/
  2263.     /*----------------------------------------------------------------*/
  2264.     /* Code Body                                                      */
  2265.     /*----------------------------------------------------------------*/
  2266.     return (0);
  2267. }
  2268. /*****************************************************************************
  2269.  * FUNCTION
  2270.  *  GetCategory67History
  2271.  * DESCRIPTION
  2272.  *  Gets the history buffer for the category67 screen
  2273.  * PARAMETERS
  2274.  *  history_buffer      [IN]        Is the buffer into which the history data is stored
  2275.  * RETURNS
  2276.  *  pointer to the history buffer
  2277.  *****************************************************************************/
  2278. U8 *GetCategory67History(U8 *history_buffer)
  2279. {
  2280.     /*----------------------------------------------------------------*/
  2281.     /* Local Variables                                                */
  2282.     /*----------------------------------------------------------------*/
  2283.     /*----------------------------------------------------------------*/
  2284.     /* Code Body                                                      */
  2285.     /*----------------------------------------------------------------*/
  2286.     return (history_buffer);
  2287. }
  2288. /*****************************************************************************
  2289.  * FUNCTION
  2290.  *  RedrawCategory68Screen
  2291.  * DESCRIPTION
  2292.  *  Redraws the help category screen
  2293.  * PARAMETERS
  2294.  *  void
  2295.  * RETURNS
  2296.  *  void
  2297.  *****************************************************************************/
  2298. void RedrawCategory68Screen(void)
  2299. {
  2300.     /*----------------------------------------------------------------*/
  2301.     /* Local Variables                                                */
  2302.     /*----------------------------------------------------------------*/
  2303.     /*----------------------------------------------------------------*/
  2304.     /* Code Body                                                      */
  2305.     /*----------------------------------------------------------------*/
  2306. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2307.     gui_lock_double_buffer();
  2308. #endif 
  2309.     clear_screen();
  2310.     show_title_status_icon();
  2311.     draw_title();
  2312.     gui_reset_clip();
  2313.     gui_draw_rectangle(
  2314.         0,
  2315.         (MMI_title_y + MMI_title_height),
  2316.         UI_device_width - 1,
  2317.         (MMI_title_y + MMI_title_height) + MMI_content_height,
  2318.         *(current_MMI_theme->UI_black_color));
  2319.     gui_show_transparent_image(4, (MMI_title_y + MMI_title_height) + 8, get_image(THEME_0_HELP_CATEGORY_IMAGE_ID), 0);
  2320.     show_multiline_inputbox();
  2321.     show_softkey_background();
  2322.     show_left_softkey();
  2323.     show_right_softkey();
  2324. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2325.     gui_unlock_double_buffer();
  2326.     gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
  2327. #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  2328. }
  2329. /*****************************************************************************
  2330.  * FUNCTION
  2331.  *  ShowCategory68Screen
  2332.  * DESCRIPTION
  2333.  *  Displays the help category screen
  2334.  * PARAMETERS
  2335.  *  title                   [IN]        Title for the screen
  2336.  *  title_icon              [IN]        Icon shown with the title
  2337.  *  left_softkey            [IN]        Left softkey label
  2338.  *  left_softkey_icon       [IN]        Icon for the Left softkey
  2339.  *  right_softkey           [IN]        Left softkey label
  2340.  *  right_softkey_icon      [IN]        Icon for the Left softkey
  2341.  *  message                 [IN]        Message string ID
  2342.  *  history_buffer          [IN]        History buffer
  2343.  * RETURNS
  2344.  *  void
  2345.  *****************************************************************************/
  2346. void ShowCategory68Screen(
  2347.         U16 title,
  2348.         U16 title_icon,
  2349.         U16 left_softkey,
  2350.         U16 left_softkey_icon,
  2351.         U16 right_softkey,
  2352.         U16 right_softkey_icon,
  2353.         U8 *message,
  2354.         U8 *history_buffer)
  2355. {
  2356.     /*----------------------------------------------------------------*/
  2357.     /* Local Variables                                                */
  2358.     /*----------------------------------------------------------------*/
  2359.     S32 l;
  2360.     /*----------------------------------------------------------------*/
  2361.     /* Code Body                                                      */
  2362.     /*----------------------------------------------------------------*/
  2363.     ADD_SCREEN_STRINGS((2, left_softkey, message));
  2364.     ADD_SCREEN_IMAGES((2, title_icon, left_softkey_icon));
  2365.     UI_UNUSED_PARAMETER(history_buffer);
  2366. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2367.     gui_lock_double_buffer();
  2368. #endif 
  2369.     MMI_menu_shortcut_number = -1;
  2370.     clear_category_screen_key_handlers();
  2371.     clear_left_softkey();
  2372.     clear_right_softkey();
  2373.     change_left_softkey(left_softkey, left_softkey_icon);
  2374.     change_right_softkey(right_softkey, right_softkey_icon);
  2375.     register_left_softkey_handler();
  2376.     register_right_softkey_handler();
  2377.     register_default_hide_softkeys();
  2378.     MMI_title_string = (UI_string_type) get_string(title);
  2379.     MMI_title_icon = (PU8) get_image(title_icon);
  2380.     MMI_message_string = (UI_string_type) message;
  2381.     l = gui_strlen(MMI_message_string);
  2382.     create_multiline_inputbox_set_buffer(
  2383.         MMI_message_string,
  2384.         gui_strlen((UI_string_type) MMI_message_string),
  2385.         gui_strlen((UI_string_type) MMI_message_string),
  2386.         0);
  2387.     SetKeyHandler(multiline_inputbox_previous_line, KEY_UP_ARROW, KEY_EVENT_DOWN);
  2388.     SetKeyHandler(multiline_inputbox_next_line, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
  2389.     move_multiline_inputbox(32, (MMI_title_y + MMI_title_height) - 1);
  2390.     resize_multiline_inputbox(UI_device_width - 31, MMI_content_height + 3);
  2391.     MMI_multiline_inputbox.flags |=
  2392.         (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND);
  2393. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2394.     gui_unlock_double_buffer();
  2395. #endif 
  2396.     ExitCategoryFunction = ExitCategory68Screen;
  2397.     RedrawCategoryFunction = RedrawCategory68Screen;
  2398.     GetCategoryHistory = GetCategory68History;
  2399.     GetCategoryHistorySize = GetCategory68HistorySize;
  2400.     RedrawCategory68Screen();
  2401. }
  2402. /*****************************************************************************
  2403.  * FUNCTION
  2404.  *  ExitCategory68Screen
  2405.  * DESCRIPTION
  2406.  *  Exits the help category screen
  2407.  * PARAMETERS
  2408.  *  void
  2409.  * RETURNS
  2410.  *  void
  2411.  *****************************************************************************/
  2412. void ExitCategory68Screen(void)
  2413. {
  2414.     /*----------------------------------------------------------------*/
  2415.     /* Local Variables                                                */
  2416.     /*----------------------------------------------------------------*/
  2417.     /*----------------------------------------------------------------*/
  2418.     /* Code Body                                                      */
  2419.     /*----------------------------------------------------------------*/
  2420.     ExitCategoryFunction = MMI_dummy_function;
  2421.     RedrawCategoryFunction = MMI_dummy_function;
  2422.     GetCategoryHistory = dummy_get_history;
  2423.     GetCategoryHistorySize = dummy_get_history_size;
  2424. }
  2425. /*****************************************************************************
  2426.  * FUNCTION
  2427.  *  GetCategory68HistorySize
  2428.  * DESCRIPTION
  2429.  *  Gets the size of the history buffer for the help screen
  2430.  * PARAMETERS
  2431.  *  void
  2432.  * RETURNS
  2433.  *  size of history buffer in U8s
  2434.  *****************************************************************************/
  2435. S32 GetCategory68HistorySize(void)
  2436. {
  2437.     /*----------------------------------------------------------------*/
  2438.     /* Local Variables                                                */
  2439.     /*----------------------------------------------------------------*/
  2440.     /*----------------------------------------------------------------*/
  2441.     /* Code Body                                                      */
  2442.     /*----------------------------------------------------------------*/
  2443.     return (0);
  2444. }
  2445. /*****************************************************************************
  2446.  * FUNCTION
  2447.  *  GetCategory68History
  2448.  * DESCRIPTION
  2449.  *  Gets the history buffer for the help screen
  2450.  * PARAMETERS
  2451.  *  history_buffer      [IN]        Is the buffer into which the history data is stored (pre-allocated)
  2452.  * RETURNS
  2453.  *  pointer to the history buffer
  2454.  *****************************************************************************/
  2455. U8 *GetCategory68History(U8 *history_buffer)
  2456. {
  2457.     /*----------------------------------------------------------------*/
  2458.     /* Local Variables                                                */
  2459.     /*----------------------------------------------------------------*/
  2460.     /*----------------------------------------------------------------*/
  2461.     /* Code Body                                                      */
  2462.     /*----------------------------------------------------------------*/
  2463.     return (history_buffer);
  2464. }
  2465. /*****************************************************************************
  2466.  * FUNCTION
  2467.  *  category70_hide_multitap
  2468.  * DESCRIPTION
  2469.  *  Hide function for multitap
  2470.  *  
  2471.  *  Internal function
  2472.  * PARAMETERS
  2473.  *  void
  2474.  * RETURNS
  2475.  *  void
  2476.  *****************************************************************************/
  2477. void category70_hide_multitap(void)
  2478. {
  2479.     /*----------------------------------------------------------------*/
  2480.     /* Local Variables                                                */
  2481.     /*----------------------------------------------------------------*/
  2482.     color c;
  2483. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2484.     /* gui_lock_double_buffer(); */
  2485. #endif 
  2486.     /*----------------------------------------------------------------*/
  2487.     /* Code Body                                                      */
  2488.     /*----------------------------------------------------------------*/
  2489.     c.r = 255;
  2490.     c.g = 255;
  2491.     c.b = 255;
  2492.     c.alpha = 100;
  2493.     gui_reset_clip();
  2494.     gui_fill_rectangle(
  2495.         MMI_multitap_x,
  2496.         MMI_multitap_y,
  2497.         MMI_multitap_x + MMI_multitap_width + 1,
  2498.         MMI_multitap_y + MMI_multitap_height + 1,
  2499.         c);
  2500. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2501.     //      gui_unlock_double_buffer();
  2502.     //      gui_BLT_double_buffer(MMI_multitap_x,MMI_multitap_y,MMI_multitap_x+MMI_multitap_width+1,MMI_multitap_y+MMI_multitap_height+1);
  2503. #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  2504. }
  2505. /*****************************************************************************
  2506.  * FUNCTION
  2507.  *  RedrawCategory70Screen
  2508.  * DESCRIPTION
  2509.  *  Redraws the category70 screen
  2510.  * PARAMETERS
  2511.  *  void
  2512.  * RETURNS
  2513.  *  void
  2514.  *****************************************************************************/
  2515. void RedrawCategory70Screen(void)
  2516. {
  2517.     /*----------------------------------------------------------------*/
  2518.     /* Local Variables                                                */
  2519.     /*----------------------------------------------------------------*/
  2520.     /*----------------------------------------------------------------*/
  2521.     /* Code Body                                                      */
  2522.     /*----------------------------------------------------------------*/
  2523. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2524.     gui_lock_double_buffer();
  2525. #endif 
  2526.     clear_screen();
  2527.     if (wgui_switch_title_with_status_bar)
  2528.     {
  2529.         show_status_icons();
  2530.     }
  2531.     else
  2532.     {
  2533.         show_title_status_icon();
  2534.         draw_title();
  2535.     }
  2536.     show_multiline_inputbox();
  2537.     show_singleline_inputbox();
  2538.     show_softkey_background();
  2539.     show_left_softkey();
  2540.     show_right_softkey();
  2541. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2542.     gui_unlock_double_buffer();
  2543.     gui_BLT_double_buffer(0, 0, UI_device_width - 1, UI_device_height - 1);
  2544. #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  2545. }
  2546. /*****************************************************************************
  2547.  * FUNCTION
  2548.  *  SetCategory70RightSoftkeyFunction
  2549.  * DESCRIPTION
  2550.  *  
  2551.  * PARAMETERS
  2552.  *  f       [IN]        
  2553.  *  k       [IN]        
  2554.  * RETURNS
  2555.  *  void
  2556.  *****************************************************************************/
  2557. void SetCategory70RightSoftkeyFunction(void (*f) (void), MMI_key_event_type k)
  2558. {
  2559.     /*----------------------------------------------------------------*/
  2560.     /* Local Variables                                                */
  2561.     /*----------------------------------------------------------------*/
  2562.     /*----------------------------------------------------------------*/
  2563.     /* Code Body                                                      */
  2564.     /*----------------------------------------------------------------*/
  2565.     UI_UNUSED_PARAMETER(k);
  2566.     wgui_singleline_inputbox_RSK_function = f;
  2567. }
  2568. /*****************************************************************************
  2569.  * FUNCTION
  2570.  *  ShowCategory70Screen
  2571.  * DESCRIPTION
  2572.  *  Displays the category70 screen
  2573.  * PARAMETERS
  2574.  *  title                                       [IN]        Title for the screen
  2575.  *  title_icon                                  [IN]        Icon shown with the title
  2576.  *  left_softkey                                [IN]        Left softkey label
  2577.  *  left_softkey_icon                           [IN]        Icon for the left softkey
  2578.  *  right_softkey                               [IN]        Right softkey label
  2579.  *  right_softkey_icon                          [IN]        Icon for the right softkey
  2580.  *  message                                     [IN]        Message
  2581.  *  input_type                                  [IN]        Type of input to use
  2582.  *  buffer                                      [IN]        Buffer the input box should use.
  2583.  *  buffer_size                                 [IN]        Size of the buffer.
  2584.  *  history_buffer                              [IN]        History buffer
  2585.  *  INPUT_TYPE_ALPHANUMERIC_SENTENCECASE(?)     [IN]        
  2586.  *  INPUT_TYPE(?)                               [IN]        Can take the following values:
  2587.  *  INPUT_TYPE_ALPHANUMERIC_LOWERCASE(?)        [IN]        
  2588.  *  INPUT_TYPE_NUMERIC(?)                       [IN]        
  2589.  *  below(?)                                    [IN]        
  2590.  *  INPUT_TYPE_ALPHANUMERIC_PASSWORD(?)         [IN]        (rare).
  2591.  *  INPUT_TYPE_ALPHANUMERIC_UPPERCASE(?)        [IN]        
  2592.  *  INPUT_TYPE_NUMERIC_PASSWORD(?)              [IN]        
  2593.  *  For(?)                                      [IN]        Example, 5 means only 5 characters can be input in this screen.
  2594.  * RETURNS
  2595.  *  void
  2596.  *****************************************************************************/
  2597. void ShowCategory70Screen(
  2598.         U16 title,
  2599.         U16 title_icon,
  2600.         U16 left_softkey,
  2601.         U16 left_softkey_icon,
  2602.         U16 right_softkey,
  2603.         U16 right_softkey_icon,
  2604.         U8 *message,
  2605.         S16 input_type,
  2606.         U8 *buffer,
  2607.         S32 buffer_size,
  2608.         U8 *history_buffer)
  2609. {
  2610.     /*----------------------------------------------------------------*/
  2611.     /* Local Variables                                                */
  2612.     /*----------------------------------------------------------------*/
  2613.     S32 h, fh, len, n;
  2614.     /*----------------------------------------------------------------*/
  2615.     /* Code Body                                                      */
  2616.     /*----------------------------------------------------------------*/
  2617.     ADD_SCREEN_STRINGS((3, title, right_softkey, left_softkey));
  2618.     ADD_SCREEN_IMAGES((3, title_icon, right_softkey_icon, left_softkey_icon));
  2619.     UI_UNUSED_PARAMETER(message);
  2620. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2621.     gui_lock_double_buffer();
  2622. #endif 
  2623.     /* MTK Elvis 20040104 */
  2624. #ifdef __MMI_ZI__
  2625.     ZiInuptMethodEnterSinglelineInputBox();
  2626. #endif 
  2627.     MMI_menu_shortcut_number = -1;
  2628.     MMI_disable_title_shortcut_display = 1;
  2629.     clear_category_screen_key_handlers();
  2630.     if (title == 0)
  2631.     {
  2632.         wgui_switch_title_with_status_bar = 1;
  2633.         ShowStatusIconsTitle();
  2634.     }
  2635.     else
  2636.     {
  2637.         MMI_title_string = get_string(title);
  2638.         MMI_title_icon = get_image(title_icon);
  2639.         wgui_switch_title_with_status_bar = 0;
  2640.     }
  2641.     MMI_message_string = (UI_string_type) message;
  2642.     len = gui_strlen(MMI_message_string);
  2643.     create_multiline_inputbox_set_buffer(MMI_message_string, len, len, 0);
  2644.     resize_multiline_inputbox(MMI_multiline_inputbox.width, MMI_content_height);
  2645.     MMI_multiline_inputbox.flags |=
  2646.         (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_CENTER_JUSTIFY |
  2647.          UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND | UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
  2648.     show_multiline_inputbox_no_draw();
  2649.     gui_set_font(MMI_multiline_inputbox.text_font);
  2650.     fh = get_multiline_inputbox_line_height();
  2651.     h = 22;
  2652.     n = MMI_multiline_inputbox.n_lines;
  2653.     if (n > 3)
  2654.     {
  2655.         n = 3;
  2656.     }
  2657.     resize_multiline_inputbox(
  2658.         MMI_multiline_inputbox.width,
  2659.         (n * fh) + MULTILINE_INPUTBOX_HEIGHT_PAD + MMI_multiline_inputbox.text_y);
  2660.     move_multiline_inputbox(
  2661.         0,
  2662.         (MMI_title_y + MMI_title_height) + (MMI_content_height >> 1) - ((MMI_multiline_inputbox.height + h) >> 1));
  2663.     change_left_softkey(left_softkey, left_softkey_icon);
  2664.     change_right_softkey(right_softkey, right_softkey_icon);
  2665.     clear_left_softkey();
  2666.     clear_right_softkey();
  2667.     register_left_softkey_handler();
  2668.     register_right_softkey_handler();
  2669.     register_default_hide_softkeys();
  2670.     wgui_setup_singleline_inputbox(
  2671.         4,
  2672.         MMI_multiline_inputbox.y + MMI_multiline_inputbox.height,
  2673.         UI_device_width - 8,
  2674.         h,
  2675.         buffer,
  2676.         buffer_size,
  2677.         MMI_CATEGORY111_ID,
  2678.         get_string(right_softkey),
  2679.         get_image(right_softkey_icon),
  2680.         input_type,
  2681.         history_buffer,
  2682.         0);
  2683.     register_hide_multitap(category70_hide_multitap);
  2684. #if(UI_DOUBLE_BUFFER_SUPPORT)
  2685.     gui_unlock_double_buffer();
  2686. #endif 
  2687.     ExitCategoryFunction = ExitCategory70Screen;
  2688.     RedrawCategoryFunction = RedrawCategory70Screen;
  2689.     GetCategoryHistory = GetCategory70History;
  2690.     GetCategoryHistorySize = GetCategory70HistorySize;
  2691.     RedrawCategory70Screen();
  2692. }
  2693. /*****************************************************************************
  2694.  * FUNCTION
  2695.  *  ExitCategory70Screen
  2696.  * DESCRIPTION
  2697.  *  Exits the category70 screen
  2698.  * PARAMETERS
  2699.  *  void
  2700.  * RETURNS
  2701.  *  void
  2702.  *****************************************************************************/
  2703. void ExitCategory70Screen(void)
  2704. {
  2705.     /*----------------------------------------------------------------*/
  2706.     /* Local Variables                                                */
  2707.     /*----------------------------------------------------------------*/
  2708.     /*----------------------------------------------------------------*/
  2709.     /* Code Body                                                      */
  2710.     /*----------------------------------------------------------------*/
  2711.     set_MMI_current_input_type();
  2712.     wgui_switch_title_with_status_bar = 0;
  2713.     reset_softkeys();
  2714.     reset_multitaps();
  2715.     reset_multiline_inputbox();
  2716.     wgui_close_singleline_inputbox();
  2717.     ExitCategoryFunction = MMI_dummy_function;
  2718.     RedrawCategoryFunction = MMI_dummy_function;
  2719.     GetCategoryHistory = dummy_get_history;
  2720.     GetCategoryHistorySize = dummy_get_history_size;
  2721. }
  2722. /*****************************************************************************
  2723.  * FUNCTION
  2724.  *  GetCategory70HistorySize
  2725.  * DESCRIPTION
  2726.  *  Gets the size of the history buffer for category70 screen
  2727.  * PARAMETERS