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

MTK

开发平台:

C/C++

  1. /*****************************************************************************
  2. *  Copyright Statement:
  3. *  --------------------
  4. *  This software is protected by Copyright and the information contained
  5. *  herein is confidential. The software may not be copied and the information
  6. *  contained herein may not be used or disclosed except with the written
  7. *  permission of MediaTek Inc. (C) 2005
  8. *
  9. *  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  10. *  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  11. *  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
  12. *  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  13. *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  14. *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  15. *  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  16. *  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  17. *  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
  18. *  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
  19. *  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
  20. *  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
  21. *
  22. *  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
  23. *  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  24. *  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  25. *  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
  26. *  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
  27. *
  28. *  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
  29. *  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
  30. *  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
  31. *  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
  32. *  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
  33. *
  34. *****************************************************************************/
  35. /*******************************************************************************
  36. * Filename:
  37. * ---------
  38. *  wgui_dynamic_menus.c
  39. *
  40. * Project:
  41. * --------
  42. *   PlutoMMI
  43. *
  44. * Description:
  45. * ------------
  46. *   In order to use limited memory (size decided in compile-time) to load unlimited items (size decide in run-time) 
  47. *   to a category screen, a modification in MMI for dynamic item loading is required as the following.
  48. *
  49. * Author:
  50. * -------
  51. *  Tim Chen
  52. *
  53. *******************************************************************************/
  54. #include "CustDataRes.h"
  55. #include "wgui_fixed_menus.h"
  56. #include "wgui_dynamic_menus.h"
  57. #include "wgui_categories.h"
  58. #include "gui_custom_menus.h"
  59. extern void dummy_highlight_handler(S32 item_index);
  60. extern void (*_MMI_hide_fixed_list_menu) (void);
  61. extern void wgui_display_fixed_text_list_pop_up_description(void);
  62. extern void wgui_display_dynamic_text_list_pop_up_description(void);
  63. #if((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_LIST_MENU_FRAME_SKIPPING))
  64. extern S32 wgui_fixed_list_menu_frame_counter;
  65. #endif 
  66. /*****************************************************************************
  67.  * FUNCTION
  68.  *  reset_dynamic_list
  69.  * DESCRIPTION
  70.  *  
  71.  * PARAMETERS
  72.  *  void
  73.  * RETURNS
  74.  *  void
  75.  *****************************************************************************/
  76. void reset_dynamic_list(void)
  77. {
  78.     /*----------------------------------------------------------------*/
  79.     /* Local Variables                                                */
  80.     /*----------------------------------------------------------------*/
  81.     /*----------------------------------------------------------------*/
  82.     /* Code Body                                                      */
  83.     /*----------------------------------------------------------------*/
  84.     /* PMT VIKAS START 20050720 */
  85. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  86.     gui_stop_list_highlight_effect();
  87. #endif 
  88.     /* PMT VIKAS END 20050720 */
  89. #if((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_LIST_MENU_FRAME_SKIPPING))
  90.     gui_cancel_timer(wgui_dynamic_list_menu_end_frame);
  91.     wgui_fixed_list_menu_frame_counter = 0;
  92. #endif /* ((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_LIST_MENU_FRAME_SKIPPING)) */ 
  93.     normal_fixed_list();
  94.     /* PMT VIKAS START 20050610 */
  95. #if defined (__MMI_UI_TRANSPARENT_EFFECT__) || defined (__MMI_UI_LIST_HIGHLIGHT_EFFECTS__)      /* 072505 Calvin modified */
  96.     gui_reset_transparent_source_layer();
  97. #endif 
  98.     /* PMT VIKAS END */
  99.     clear_keyboard_key_handler();
  100.     ClearKeyHandler(KEY_UP_ARROW, KEY_EVENT_DOWN);
  101.     ClearKeyHandler(KEY_DOWN_ARROW, KEY_EVENT_DOWN);
  102.     MMI_fixed_list_menu.item_highlighted = dummy_highlight_handler;
  103.     wgui_text_menuitem_reset_scrolling();
  104.     /* PMT NEERAJ START 20050825 */
  105. #ifdef __MMI_UI_TWO_LINE_MENUITEM_STYLES__
  106.     reset_fixed_icontext_menuitem_type();
  107. #endif 
  108.     /* PMT NEERAJ END 20050825 */
  109. }
  110. /*****************************************************************************
  111.  * FUNCTION
  112.  *  show_dynamic_list
  113.  * DESCRIPTION
  114.  *  
  115.  * PARAMETERS
  116.  *  void
  117.  * RETURNS
  118.  *  void
  119.  *****************************************************************************/
  120. void show_dynamic_list(void)
  121. {
  122.     /*----------------------------------------------------------------*/
  123.     /* Local Variables                                                */
  124.     /*----------------------------------------------------------------*/
  125.     /*----------------------------------------------------------------*/
  126.     /* Code Body                                                      */
  127.     /*----------------------------------------------------------------*/
  128. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  129.     gui_stop_list_highlight_effect();
  130. #endif 
  131. #if (defined __MMI_UI_TWO_LINE_MENUITEM_STYLES__ || defined __MMI_UI_HINTS_IN_MENUITEM__)
  132.     wgui_two_line_stop_scroller();
  133. #endif 
  134.     if (MMI_fixed_list_menu.flags & UI_LIST_MENU_DISABLE_BACKGROUND)
  135.     {
  136.         _MMI_hide_fixed_list_menu();
  137.     }
  138.     /* gui_hide_animations(); */
  139.     gui_show_dynamic_list_menu(&MMI_fixed_list_menu);
  140.     wgui_display_dynamic_text_list_pop_up_description();
  141.     gui_BLT_double_buffer(
  142.         MMI_fixed_list_menu.x,
  143.         MMI_fixed_list_menu.y,
  144.         MMI_fixed_list_menu.x + MMI_fixed_list_menu.width,
  145.         MMI_fixed_list_menu.y + MMI_fixed_list_menu.height);
  146. }
  147. /*****************************************************************************
  148.  * FUNCTION
  149.  *  redraw_dynamic_list
  150.  * DESCRIPTION
  151.  *  
  152.  * PARAMETERS
  153.  *  void
  154.  * RETURNS
  155.  *  void
  156.  *****************************************************************************/
  157. void redraw_dynamic_list(void)
  158. {
  159.     /*----------------------------------------------------------------*/
  160.     /* Local Variables                                                */
  161.     /*----------------------------------------------------------------*/
  162.     /*----------------------------------------------------------------*/
  163.     /* Code Body                                                      */
  164.     /*----------------------------------------------------------------*/
  165.     if (MMI_current_menu_type == ANI_BG_LIST_MENU)
  166.     {
  167.         return;
  168.     }
  169. #if((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_LIST_MENU_FRAME_SKIPPING))
  170.     if (wgui_fixed_list_menu_frame_counter > 0)
  171.     {
  172.         wgui_fixed_list_menu_frame_counter++;
  173.         gui_show_dynamic_list_menu_no_draw(&MMI_fixed_list_menu);
  174.     }
  175.     else
  176.     {
  177.         wgui_fixed_list_menu_frame_counter = 1;
  178.         gui_show_dynamic_list_menu_no_draw(&MMI_fixed_list_menu);
  179.         gui_start_timer(UI_FRAME_START_TIMEOUT, wgui_dynamic_list_menu_end_frame);
  180.     }
  181. #else /* ((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_LIST_MENU_FRAME_SKIPPING)) */ 
  182.     show_dynamic_list();
  183. #endif /* ((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_LIST_MENU_FRAME_SKIPPING)) */ 
  184. }
  185. /*****************************************************************************
  186.  * FUNCTION
  187.  *  dynamic_list_goto_previous_item
  188.  * DESCRIPTION
  189.  *  
  190.  * PARAMETERS
  191.  *  void
  192.  * RETURNS
  193.  *  void
  194.  *****************************************************************************/
  195. void dynamic_list_goto_previous_item(void)
  196. {
  197.     /*----------------------------------------------------------------*/
  198.     /* Local Variables                                                */
  199.     /*----------------------------------------------------------------*/
  200.     /*----------------------------------------------------------------*/
  201.     /* Code Body                                                      */
  202.     /*----------------------------------------------------------------*/
  203.     if (MMI_fixed_list_menu.n_items <= 0)
  204.     {
  205.         return;
  206.     }
  207.     if ((MMI_fixed_list_menu.n_items == 1) && (MMI_fixed_list_menu.highlighted_item == 0))
  208.     {
  209.         return;
  210.     }
  211.     /* PMT VIKAS START 20051117 */
  212. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  213.     gui_stop_list_highlight_effect();
  214. #endif 
  215.     /* PMT VIKAS END 20051117 */
  216.     gui_dynamic_list_menu_goto_previous_item(&MMI_fixed_list_menu);
  217.     /* PMT VIKAS START 20050720 */
  218. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  219.     //PMT VIKAS START 20051117
  220.     //gui_stop_list_highlight_effect();
  221.     //PMT VIKAS START 20051117
  222. #endif /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  223.     /* PMT VIKAS END 20050720 */
  224.     redraw_dynamic_list();
  225. }
  226. /*****************************************************************************
  227.  * FUNCTION
  228.  *  dynamic_list_goto_next_item
  229.  * DESCRIPTION
  230.  *  
  231.  * PARAMETERS
  232.  *  void
  233.  * RETURNS
  234.  *  void
  235.  *****************************************************************************/
  236. void dynamic_list_goto_next_item(void)
  237. {
  238.     /*----------------------------------------------------------------*/
  239.     /* Local Variables                                                */
  240.     /*----------------------------------------------------------------*/
  241.     /*----------------------------------------------------------------*/
  242.     /* Code Body                                                      */
  243.     /*----------------------------------------------------------------*/
  244.     if (MMI_fixed_list_menu.n_items <= 0)
  245.     {
  246.         return;
  247.     }
  248.     if ((MMI_fixed_list_menu.n_items == 1) && (MMI_fixed_list_menu.highlighted_item == 0))
  249.     {
  250.         return;
  251.     }
  252.     /* PMT VIKAS START 20051117 */
  253. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  254.     gui_stop_list_highlight_effect();
  255. #endif 
  256.     /* PMT VIKAS END 20051117 */
  257.     gui_dynamic_list_menu_goto_next_item(&MMI_fixed_list_menu);
  258.     /* PMT VIKAS START 20050720 */
  259. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  260.     //PMT VIKAS START 20051117
  261.     //gui_stop_list_highlight_effect();
  262.     //PMT VIKAS START 20051117
  263. #endif /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  264.     /* PMT VIKAS END 20050720 */
  265.     redraw_dynamic_list();
  266. }
  267. /*****************************************************************************
  268.  * FUNCTION
  269.  *  dynamic_list_goto_item
  270.  * DESCRIPTION
  271.  *  
  272.  * PARAMETERS
  273.  *  item_index      [IN]        
  274.  * RETURNS
  275.  *  void
  276.  *****************************************************************************/
  277. void dynamic_list_goto_item(S32 item_index)
  278. {
  279.     /*----------------------------------------------------------------*/
  280.     /* Local Variables                                                */
  281.     /*----------------------------------------------------------------*/
  282.     /*----------------------------------------------------------------*/
  283.     /* Code Body                                                      */
  284.     /*----------------------------------------------------------------*/
  285.     if (MMI_fixed_list_menu.n_items <= 0)
  286.     {
  287.         return;
  288.     }
  289.     if (item_index == MMI_fixed_list_menu.highlighted_item)
  290.     {
  291.         return;
  292.     }
  293.     /* PMT VIKAS START 20050720 */
  294. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  295.     /* To handle the redraw of hilighter if item index is greater then no of items */
  296.     if (item_index >= MMI_fixed_list_menu.n_items)
  297.     {
  298.         return;
  299.     }
  300.     /* PMT VIKAS START 20051117 */
  301.     gui_stop_list_highlight_effect();
  302.     /* PMT VIKAS END 20051117 */
  303. #endif /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  304.     /* PMT VIKAS END 20050720 */
  305.     gui_dynamic_list_menu_goto_item(&MMI_fixed_list_menu, item_index);
  306.     /* PMT VIKAS START 20050720 */
  307. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  308.     //PMT VIKAS START 20051117
  309.     //gui_stop_list_highlight_effect();
  310.     //PMT VIKAS START 20051117
  311. #endif /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  312.     /* PMT VIKAS END 20050720 */
  313.     redraw_dynamic_list();
  314. }
  315. /*****************************************************************************
  316.  * FUNCTION
  317.  *  dynamic_list_goto_item_no_redraw
  318.  * DESCRIPTION
  319.  *  
  320.  * PARAMETERS
  321.  *  item_index      [IN]        
  322.  * RETURNS
  323.  *  void
  324.  *****************************************************************************/
  325. void dynamic_list_goto_item_no_redraw(S32 item_index)
  326. {
  327.     /*----------------------------------------------------------------*/
  328.     /* Local Variables                                                */
  329.     /*----------------------------------------------------------------*/
  330.     /*----------------------------------------------------------------*/
  331.     /* Code Body                                                      */
  332.     /*----------------------------------------------------------------*/
  333.     if (MMI_fixed_list_menu.n_items <= 0)
  334.     {
  335.         return;
  336.     }
  337.     if (item_index < 0)
  338.     {
  339.         item_index = 0;
  340.     }
  341.     if (item_index > (MMI_fixed_list_menu.n_items - 1))
  342.     {
  343.         item_index = MMI_fixed_list_menu.n_items - 1;
  344.     }
  345.     MMI_fixed_list_menu.highlighted_item = -1;
  346.     gui_dynamic_list_menu_goto_item(&MMI_fixed_list_menu, item_index);
  347. }
  348. /*****************************************************************************
  349.  * FUNCTION
  350.  *  register_dynamic_list_shortcut_handler
  351.  * DESCRIPTION
  352.  *  
  353.  * PARAMETERS
  354.  *  void
  355.  * RETURNS
  356.  *  void
  357.  *****************************************************************************/
  358. void register_dynamic_list_shortcut_handler(void)
  359. {
  360.     /*----------------------------------------------------------------*/
  361.     /* Local Variables                                                */
  362.     /*----------------------------------------------------------------*/
  363.     /*----------------------------------------------------------------*/
  364.     /* Code Body                                                      */
  365.     /*----------------------------------------------------------------*/
  366.     register_menu_shortcut_keys();
  367.     register_menu_shortcut_selected_only(dynamic_list_goto_item);
  368. }
  369. /*****************************************************************************
  370.  * FUNCTION
  371.  *  register_dynamic_list_keys
  372.  * DESCRIPTION
  373.  *  
  374.  * PARAMETERS
  375.  *  void
  376.  * RETURNS
  377.  *  void
  378.  *****************************************************************************/
  379. void register_dynamic_list_keys(void)
  380. {
  381.     /*----------------------------------------------------------------*/
  382.     /* Local Variables                                                */
  383.     /*----------------------------------------------------------------*/
  384.     /*----------------------------------------------------------------*/
  385.     /* Code Body                                                      */
  386.     /*----------------------------------------------------------------*/
  387.     clear_keyboard_key_handler();
  388.     SetKeyHandler(dynamic_list_goto_previous_item, KEY_UP_ARROW, KEY_EVENT_DOWN);
  389.     SetKeyHandler(dynamic_list_goto_next_item, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
  390.     SetKeyHandler(dynamic_list_goto_previous_item, KEY_VOL_UP, KEY_EVENT_DOWN);
  391.     SetKeyHandler(dynamic_list_goto_next_item, KEY_VOL_DOWN, KEY_EVENT_DOWN);
  392. }
  393. #if((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_LIST_MENU_FRAME_SKIPPING))
  394. /*****************************************************************************
  395.  * FUNCTION
  396.  *  wgui_dynamic_list_menu_end_frame
  397.  * DESCRIPTION
  398.  *  
  399.  * PARAMETERS
  400.  *  void
  401.  * RETURNS
  402.  *  void
  403.  *****************************************************************************/
  404. void wgui_dynamic_list_menu_end_frame(void)
  405. {
  406.     /*----------------------------------------------------------------*/
  407.     /* Local Variables                                                */
  408.     /*----------------------------------------------------------------*/
  409.     /*----------------------------------------------------------------*/
  410.     /* Code Body                                                      */
  411.     /*----------------------------------------------------------------*/
  412.     if (wgui_fixed_list_menu_frame_counter >= 1)
  413.     {
  414.         if (MMI_fixed_list_menu.flags & UI_LIST_MENU_DISABLE_BACKGROUND)
  415.         {
  416.             _MMI_hide_fixed_list_menu();
  417.         }
  418.         gui_hide_animations();
  419.     #if(UI_DOUBLE_BUFFER_SUPPORT)
  420.         gui_lock_double_buffer();
  421.     #endif 
  422.         gui_show_dynamic_list_menu(&MMI_fixed_list_menu);
  423.     #if(UI_DOUBLE_BUFFER_SUPPORT)
  424.         gui_unlock_double_buffer();
  425.     #endif 
  426.         wgui_display_dynamic_text_list_pop_up_description();    /* ????? */
  427.     #if(UI_DOUBLE_BUFFER_SUPPORT)
  428.         gui_BLT_double_buffer(
  429.             MMI_fixed_list_menu.x,
  430.             MMI_fixed_list_menu.y,
  431.             MMI_fixed_list_menu.x + MMI_fixed_list_menu.width,
  432.             MMI_fixed_list_menu.y + MMI_fixed_list_menu.height);
  433.     #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  434.         wgui_fixed_list_menu_frame_counter = 0;
  435.         gui_start_timer(UI_FRAME_SKIP_TIMEOUT, wgui_dynamic_list_menu_end_frame);
  436.     }
  437. }
  438. #endif /* ((UI_ENABLE_FRAME_SKIPPING) && (ENABLE_LIST_MENU_FRAME_SKIPPING)) */ 
  439. /*****************************************************************************
  440.  * FUNCTION
  441.  *  DynamicListIncreaseItem
  442.  * DESCRIPTION
  443.  *  Increase the total number of dynamic item
  444.  * PARAMETERS
  445.  *  steps       [IN]        Number of items to be increased
  446.  * RETURNS
  447.  *  void
  448.  *****************************************************************************/
  449. void DynamicListIncreaseItem(S16 steps)
  450. {
  451.     /*----------------------------------------------------------------*/
  452.     /* Local Variables                                                */
  453.     /*----------------------------------------------------------------*/
  454.     /*----------------------------------------------------------------*/
  455.     /* Code Body                                                      */
  456.     /*----------------------------------------------------------------*/
  457.     dynamic_item_buffer.n_total_items = dynamic_item_buffer.n_total_items + steps;
  458.     MMI_fixed_list_menu.n_items = MMI_fixed_list_menu.n_items + steps;
  459. }
  460. /*****************************************************************************
  461.  * FUNCTION
  462.  *  DynamicListGetItems
  463.  * DESCRIPTION
  464.  *  Returns total number of dynamic items and the requested item from the dynamic buffer
  465.  * PARAMETERS
  466.  *  string          [OUT]       Requested item
  467.  *  item_index      [IN]        Index of the requested item ,index is UI index
  468.  * RETURNS
  469.  *  total number of dynamic items
  470.  *****************************************************************************/
  471. S32 DynamicListGetItems(U8 *string, U16 item_index)
  472. {
  473.     /*----------------------------------------------------------------*/
  474.     /* Local Variables                                                */
  475.     /*----------------------------------------------------------------*/
  476.     /*----------------------------------------------------------------*/
  477.     /* Code Body                                                      */
  478.     /*----------------------------------------------------------------*/
  479.     if (string != NULL)
  480.     {
  481.         pfnUnicodeStrcpy((S8*) string, (S8*) MMI_fixed_icontext_menuitems[(item_index) % 32].item_text);
  482.     }
  483.     return MMI_fixed_list_menu.n_items;
  484. }
  485. /*****************************************************************************
  486.  * FUNCTION
  487.  *  DynamicListGetHighlightedItem
  488.  * DESCRIPTION
  489.  *  Returns the index of highlighted item, and highlighted item itself
  490.  * PARAMETERS
  491.  *  string      [OUT]       Highlighted item
  492.  * RETURNS
  493.  *  Highlighted item
  494.  *****************************************************************************/
  495. S32 DynamicListGetHighlightedItem(U8 *string)
  496. {
  497.     /*----------------------------------------------------------------*/
  498.     /* Local Variables                                                */
  499.     /*----------------------------------------------------------------*/
  500.     /*----------------------------------------------------------------*/
  501.     /* Code Body                                                      */
  502.     /*----------------------------------------------------------------*/
  503.     if (string != NULL)
  504.     {
  505.         pfnUnicodeStrcpy(
  506.             (S8*) string,
  507.             (S8*) MMI_fixed_icontext_menuitems[(MMI_fixed_list_menu.highlighted_item) % 32].item_text);
  508.     }
  509.     return MMI_fixed_list_menu.highlighted_item;
  510. }
  511. /*****************************************************************************
  512.  * FUNCTION
  513.  *  DynamicGetFirstDisplayedItem
  514.  * DESCRIPTION
  515.  *  Returns the index of first displayed item, and highlighted item itself
  516.  * PARAMETERS
  517.  *  string      [OUT]       First displayed item
  518.  * RETURNS
  519.  *  first displayed item item
  520.  *****************************************************************************/
  521. S32 DynamicGetFirstDisplayedItem(U8 *string)
  522. {
  523.     /*----------------------------------------------------------------*/
  524.     /* Local Variables                                                */
  525.     /*----------------------------------------------------------------*/
  526.     /*----------------------------------------------------------------*/
  527.     /* Code Body                                                      */
  528.     /*----------------------------------------------------------------*/
  529.     if (string != NULL)
  530.     {
  531.         pfnUnicodeStrcpy(
  532.             (S8*) string,
  533.             (S8*) MMI_fixed_icontext_menuitems[(MMI_fixed_list_menu.first_displayed_item) % 32].item_text);
  534.     }
  535.     return MMI_fixed_list_menu.first_displayed_item;
  536. }