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

MTK

开发平台:

C/C++

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