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

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.  *
  37.  * Filename:
  38.  * ---------
  39.  *   gui_fixed_menuitems.c
  40.  *
  41.  * Project:
  42.  * --------
  43.  *   MAUI
  44.  *
  45.  * Description:
  46.  * ------------
  47.  *   Menu items in fixed menu - UI component
  48.  *
  49.  *   [Text menu item]
  50.  *   [Icontext menu item]
  51.  *   [Icontext-list menu item]
  52.  *   [Twostate menu item]
  53.  *
  54.  * Author:
  55.  * -------
  56.  * -------
  57.  * -------
  58.  *
  59.  *============================================================================
  60.  *             HISTORY
  61.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  62.  *------------------------------------------------------------------------------
  63.  * removed!
  64.  *
  65.  * removed!
  66.  * removed!
  67.  * removed!
  68.  *
  69.  * removed!
  70.  * removed!
  71.  * removed!
  72.  *
  73.  * removed!
  74.  * removed!
  75.  * removed!
  76.  *
  77.  * removed!
  78.  * removed!
  79.  * removed!
  80.  *
  81.  * removed!
  82.  * removed!
  83.  * removed!
  84.  *
  85.  * removed!
  86.  * removed!
  87.  * removed!
  88.  *
  89.  * removed!
  90.  * removed!
  91.  * removed!
  92.  *
  93.  * removed!
  94.  * removed!
  95.  * removed!
  96.  *
  97.  * removed!
  98.  * removed!
  99.  * removed!
  100.  *
  101.  * removed!
  102.  * removed!
  103.  * removed!
  104.  *
  105.  * removed!
  106.  * removed!
  107.  * removed!
  108.  *
  109.  * removed!
  110.  * removed!
  111.  * removed!
  112.  *
  113.  * removed!
  114.  * removed!
  115.  * removed!
  116.  *
  117.  * removed!
  118.  * removed!
  119.  * removed!
  120.  *
  121.  * removed!
  122.  * removed!
  123.  * removed!
  124.  *
  125.  * removed!
  126.  * removed!
  127.  * removed!
  128.  *
  129.  * removed!
  130.  * removed!
  131.  * removed!
  132.  *
  133.  * removed!
  134.  * removed!
  135.  * removed!
  136.  *
  137.  * removed!
  138.  * removed!
  139.  * removed!
  140.  *
  141.  * removed!
  142.  * removed!
  143.  * removed!
  144.  *
  145.  * removed!
  146.  * removed!
  147.  * removed!
  148.  *
  149.  * removed!
  150.  * removed!
  151.  * removed!
  152.  *
  153.  * removed!
  154.  * removed!
  155.  * removed!
  156.  *
  157.  * removed!
  158.  * removed!
  159.  * removed!
  160.  *
  161.  * removed!
  162.  * removed!
  163.  * removed!
  164.  *
  165.  * removed!
  166.  * removed!
  167.  * removed!
  168.  *
  169.  * removed!
  170.  * removed!
  171.  * removed!
  172.  *
  173.  * removed!
  174.  * removed!
  175.  * removed!
  176.  *
  177.  * removed!
  178.  * removed!
  179.  * removed!
  180.  *
  181.  * removed!
  182.  * removed!
  183.  * removed!
  184.  *
  185.  * removed!
  186.  * removed!
  187.  * removed!
  188.  *
  189.  * removed!
  190.  * removed!
  191.  * removed!
  192.  *
  193.  * removed!
  194.  * removed!
  195.  * removed!
  196.  *
  197.  * removed!
  198.  * removed!
  199.  * removed!
  200.  *
  201.  * removed!
  202.  * removed!
  203.  * removed!
  204.  *
  205.  * removed!
  206.  * removed!
  207.  * removed!
  208.  *
  209.  * removed!
  210.  * removed!
  211.  * removed!
  212.  *
  213.  * removed!
  214.  * removed!
  215.  * removed!
  216.  *
  217.  * removed!
  218.  * removed!
  219.  * removed!
  220.  *
  221.  * removed!
  222.  * removed!
  223.  * removed!
  224.  *
  225.  * removed!
  226.  * removed!
  227.  * removed!
  228.  *
  229.  * removed!
  230.  * removed!
  231.  * removed!
  232.  *
  233.  * removed!
  234.  * removed!
  235.  * removed!
  236.  *
  237.  * removed!
  238.  * removed!
  239.  * removed!
  240.  *
  241.  * removed!
  242.  * removed!
  243.  * removed!
  244.  *
  245.  * removed!
  246.  * removed!
  247.  * removed!
  248.  *
  249.  * removed!
  250.  * removed!
  251.  * removed!
  252.  *
  253.  * removed!
  254.  * removed!
  255.  * removed!
  256.  *
  257.  * removed!
  258.  * removed!
  259.  * removed!
  260.  *
  261.  * removed!
  262.  * removed!
  263.  * removed!
  264.  *
  265.  *------------------------------------------------------------------------------
  266.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  267.  *============================================================================
  268.  ****************************************************************************/
  269. /**
  270.  * Copyright Notice
  271.  * ?2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
  272.  * Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
  273.  *  (It is illegal to remove this copyright notice from this software or any
  274.  *  portion of it)
  275.  */
  276. /**********************************************************************************
  277.    Filename:      gui_fixed_menuitems.c
  278.    Author:        manju
  279.    Date Created:  July-22-2002
  280.    Contains:      PixTel UI routines for Fixed Menuitems
  281. **********************************************************************************/
  282. #include "MMI_features.h"
  283. #include "gui_fixed_menuitems.h"
  284. #include "gui_common_menus.h"
  285. #include "kal_non_specific_general_types.h"
  286. #include "gdi_include.h"
  287. #include "lcd_sw_rnd.h"
  288. #include "wgui.h"
  289. #include "CustMenuRes.h"
  290. /* For R2L characters */
  291. #include "BIDIDEF.h"
  292. #include "BIDIProt.h"
  293. #include "UCS2Prot.h"
  294. #include "wgui_fixed_menuitems.h"
  295. #include "DebugInitDef.h"
  296. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  297. #include "MMI_features.h"       /* Add for Effect type entry for Title & highlighter */
  298. #include "wgui_categories_defs.h"
  299. #include "wgui_categories_util.h"
  300. /* For list highlighter effects */
  301. static S32 flash_feel_last_frame = 0;
  302. static S32 gblock_list_effect = 0;
  303. #endif /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  304. //KP Jerry add for KP-Style 12-Matrix mainmenu on 2007-3-19 start
  305. #ifdef __MMI_KP_STYLE_MAIN_MENU_MATRIX__
  306. #include "mainmenudef.h"
  307. #endif
  308. //KP Jerry add for KP-Style 12-Matrix mainmenu on 2007-3-19 end
  309. /* Text scrolling related data      */
  310. S32 UI_text_menuitem_scroll_time = UI_TEXT_MENUITEM_SCROLL_TIME;
  311. S32 UI_text_menuitem_scroll_size = UI_TEXT_MENUITEM_SCROLL_SIZE;
  312. S32 UI_text_menuitem_scroll_gap = UI_TEXT_MENUITEM_SCROLL_GAP;
  313. S32 UI_text_menuitem_scroll_pause = UI_TEXT_MENUITEM_SCROLL_PAUSE;
  314. /* Orange color poup dialog */
  315. UI_filled_area colorangewgui_pop_up_dialog_background =
  316.     {UI_FILLED_AREA_TYPE_COLOR | UI_FILLED_AREA_VERTICAL_FILL | UI_FILLED_AREA_SINGLE_BORDER,
  317.     UI_NULL_IMAGE,
  318.     NULL,
  319.     {255, 220, 185, 100},
  320.     {0, 0, 0, 0},
  321.     {255, 163, 70, 100},
  322.     {50, 50, 50, 100},
  323.     0
  324. };
  325. UI_filled_area f1={
  326.     UI_FILLED_AREA_TYPE_COLOR|UI_FILLED_AREA_BORDER|UI_FILLED_AREA_ROUNDED_BORDER,
  327. UI_IMAGE_ID_NULL,
  328. NULL,
  329. {255,255,255,100},
  330. {0,0,0,100},
  331. {255,255,255,100},
  332. {0,0,0,100},
  333. 0};
  334. extern PU8 MMI_mm_animation;
  335. extern BOOL r2lMMIFlag;
  336. #if (defined __MMI_UI_TWO_LINE_MENUITEM_STYLES__ || defined __MMI_UI_HINTS_IN_MENUITEM__)
  337. #define GUI_TWO_LINE_TEXT_ICON_GAP 5
  338. #endif 
  339. #ifdef __MMI_UI_DALMATIAN_FIXEDLIST__
  340. BOOL inline_bottom_line_draw;
  341. BOOL line_draw;
  342. #define TEXT_ICON_GAP 5 /* for display gap of text from grid */
  343. extern fixed_list_menu MMI_fixed_list_menu;
  344. extern MMI_theme *current_MMI_theme;
  345. /*****************************************************************************
  346.  * FUNCTION
  347.  *  gui_disable_fixed_list_line_draw
  348.  * DESCRIPTION
  349.  *  function for disable line draw
  350.  * PARAMETERS
  351.  *  void
  352.  * RETURNS
  353.  *  void
  354.  *****************************************************************************/
  355. void gui_disable_fixed_list_line_draw(void)
  356. {
  357.     /*----------------------------------------------------------------*/
  358.     /* Local Variables                                                */
  359.     /*----------------------------------------------------------------*/
  360.     /*----------------------------------------------------------------*/
  361.     /* Code Body                                                      */
  362.     /*----------------------------------------------------------------*/
  363.     line_draw = 0;
  364. }
  365. /*****************************************************************************
  366.  * FUNCTION
  367.  *  gui_enable_fixed_list_line_draw
  368.  * DESCRIPTION
  369.  *  function for disable line draw
  370.  * PARAMETERS
  371.  *  void
  372.  * RETURNS
  373.  *  void
  374.  *****************************************************************************/
  375. void gui_enable_fixed_list_line_draw(void)
  376. {
  377.     /*----------------------------------------------------------------*/
  378.     /* Local Variables                                                */
  379.     /*----------------------------------------------------------------*/
  380.     /*----------------------------------------------------------------*/
  381.     /* Code Body                                                      */
  382.     /*----------------------------------------------------------------*/
  383.     line_draw = 1;
  384. }
  385. /*****************************************************************************
  386.  * FUNCTION
  387.  *  gui_disable_inline_bottom_line_draw
  388.  * DESCRIPTION
  389.  *  function for disable inline bottom line draw for inline item
  390.  * PARAMETERS
  391.  *  void
  392.  * RETURNS
  393.  *  void
  394.  *****************************************************************************/
  395. void gui_disable_inline_bottom_line_draw(void)
  396. {
  397.     /*----------------------------------------------------------------*/
  398.     /* Local Variables                                                */
  399.     /*----------------------------------------------------------------*/
  400.     /*----------------------------------------------------------------*/
  401.     /* Code Body                                                      */
  402.     /*----------------------------------------------------------------*/
  403.     inline_bottom_line_draw = 0;
  404. }
  405. /*****************************************************************************
  406.  * FUNCTION
  407.  *  gui_enable_inline_bottom_line_draw
  408.  * DESCRIPTION
  409.  *  function for inable bottom line draw for inline item
  410.  * PARAMETERS
  411.  *  void
  412.  * RETURNS
  413.  *  void
  414.  *****************************************************************************/
  415. void gui_enable_inline_bottom_line_draw(void)
  416. {
  417.     /*----------------------------------------------------------------*/
  418.     /* Local Variables                                                */
  419.     /*----------------------------------------------------------------*/
  420.     /*----------------------------------------------------------------*/
  421.     /* Code Body                                                      */
  422.     /*----------------------------------------------------------------*/
  423.     inline_bottom_line_draw = 1;
  424. }
  425. #endif /* __MMI_UI_DALMATIAN_FIXEDLIST__ */ 
  426. /* Pop up description related data  */
  427. /*****************************************************************************
  428.  * FUNCTION
  429.  *  UI_dummy_display_pop_up_description
  430.  * DESCRIPTION
  431.  *  dummy function of display popup
  432.  * PARAMETERS
  433.  *  x           [IN]        Start x position
  434.  *  y           [IN]        Start y position
  435.  *  width       [IN]        Width of popup
  436.  *  height      [IN]        Hieght of popup
  437.  * RETURNS
  438.  *  void
  439.  *****************************************************************************/
  440. void UI_dummy_display_pop_up_description(S32 x, S32 y, S32 width, S32 height)
  441. {
  442.     /*----------------------------------------------------------------*/
  443.     /* Local Variables                                                */
  444.     /*----------------------------------------------------------------*/
  445.     /*----------------------------------------------------------------*/
  446.     /* Code Body                                                      */
  447.     /*----------------------------------------------------------------*/
  448.     UI_UNUSED_PARAMETER(x);
  449.     UI_UNUSED_PARAMETER(y);
  450.     UI_UNUSED_PARAMETER(width);
  451.     UI_UNUSED_PARAMETER(height);
  452. }
  453. #ifdef __MMI_UI_HINTS_IN_MENUITEM__
  454. /*****************************************************************************
  455.  * FUNCTION
  456.  *  UI_dummy_get_current_pop_up_description_string
  457.  * DESCRIPTION
  458.  *  dummy function to get popup description string
  459.  * PARAMETERS
  460.  *  void
  461.  * RETURNS
  462.  *  string to be displayed
  463.  *****************************************************************************/
  464. UI_string_type UI_dummy_get_current_pop_up_description_string(void)
  465. {
  466.     /*----------------------------------------------------------------*/
  467.     /* Local Variables                                                */
  468.     /*----------------------------------------------------------------*/
  469.     /*----------------------------------------------------------------*/
  470.     /* Code Body                                                      */
  471.     /*----------------------------------------------------------------*/
  472.     return NULL;
  473. }
  474. UI_string_type(*gui_get_current_pop_up_description_string) (void) = UI_dummy_get_current_pop_up_description_string;
  475. #endif /* __MMI_UI_HINTS_IN_MENUITEM__ */ 
  476. void (*gui_display_pop_up_description) (S32 x, S32 y, S32 width, S32 height) = UI_dummy_display_pop_up_description;
  477. #ifdef __MMI_UI_TRANSPARENT_EFFECT__
  478. static BOOL block_transparency = FALSE;
  479. /*****************************************************************************
  480.  * FUNCTION
  481.  *  gui_block_transparency_effect
  482.  * DESCRIPTION
  483.  *  
  484.  * PARAMETERS
  485.  *  void
  486.  * RETURNS
  487.  *  void
  488.  *****************************************************************************/
  489. void gui_block_transparency_effect(void)
  490. {
  491.     /*----------------------------------------------------------------*/
  492.     /* Local Variables                                                */
  493.     /*----------------------------------------------------------------*/
  494.     /*----------------------------------------------------------------*/
  495.     /* Code Body                                                      */
  496.     /*----------------------------------------------------------------*/
  497.     block_transparency = TRUE;
  498. }
  499. /*****************************************************************************
  500.  * FUNCTION
  501.  *  gui_unblock_transparency_effect
  502.  * DESCRIPTION
  503.  *  
  504.  * PARAMETERS
  505.  *  void
  506.  * RETURNS
  507.  *  void
  508.  *****************************************************************************/
  509. void gui_unblock_transparency_effect(void)
  510. {
  511.     /*----------------------------------------------------------------*/
  512.     /* Local Variables                                                */
  513.     /*----------------------------------------------------------------*/
  514.     /*----------------------------------------------------------------*/
  515.     /* Code Body                                                      */
  516.     /*----------------------------------------------------------------*/
  517.     block_transparency = FALSE;
  518. }
  519. /*****************************************************************************
  520.  * FUNCTION
  521.  *  gui_fixed_icontext_enable_transparent_effect
  522.  * DESCRIPTION
  523.  *  enable the transparent effect flag
  524.  * PARAMETERS
  525.  *  m       [?]     
  526.  * RETURNS
  527.  *  void
  528.  *****************************************************************************/
  529. UI_filled_area non_transparent_focussed_filler;
  530. UI_filled_area *backup_focussed_filler;
  531. S32 transparency_in_list = 0;
  532. void gui_fixed_icontext_enable_transparent_effect(fixed_icontext_menuitem *m)
  533. {
  534.     /*----------------------------------------------------------------*/
  535.     /* Local Variables                                                */
  536.     /*----------------------------------------------------------------*/
  537.     /*----------------------------------------------------------------*/
  538.     /* Code Body                                                      */
  539.     /*----------------------------------------------------------------*/
  540.     if (block_transparency)
  541.     {
  542.         return;
  543.     }
  544.     /* to enable transparency only when it is required */
  545.     if (transparency_in_list)
  546.     {
  547.         m->focussed_filler = backup_focussed_filler;
  548.     }
  549.     transparency_in_list = 0;
  550. }
  551. /*****************************************************************************
  552.  * FUNCTION
  553.  *  gui_fixed_icontext_disable_transparent_effect
  554.  * DESCRIPTION
  555.  *  Disable the transparent effect flag
  556.  * PARAMETERS
  557.  *  m       [?]     
  558.  * RETURNS
  559.  *  void
  560.  *****************************************************************************/
  561. void gui_fixed_icontext_disable_transparent_effect(fixed_icontext_menuitem *m)
  562. {
  563.     /*----------------------------------------------------------------*/
  564.     /* Local Variables                                                */
  565.     /*----------------------------------------------------------------*/
  566.     /*----------------------------------------------------------------*/
  567.     /* Code Body                                                      */
  568.     /*----------------------------------------------------------------*/
  569.     if (block_transparency)
  570.     {
  571.         return;
  572.     }
  573.     /* disable transparency only when it is enabled */
  574.     if (m->focussed_filler->flags & UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR)
  575.     {
  576.         transparency_in_list = 1;
  577.         backup_focussed_filler = m->focussed_filler;
  578.         non_transparent_focussed_filler = *backup_focussed_filler;
  579.         m->focussed_filler = &non_transparent_focussed_filler;
  580.         m->focussed_filler->flags = m->focussed_filler->flags & ~UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR;
  581.     }
  582. }
  583. /*****************************************************************************
  584.  * FUNCTION
  585.  *  gui_fixed_icontext_list_enable_transparent_effect
  586.  * DESCRIPTION
  587.  *  enable the transparent effect flag
  588.  * PARAMETERS
  589.  *  m       [?]     
  590.  * RETURNS
  591.  *  void
  592.  *****************************************************************************/
  593. void gui_fixed_icontext_list_enable_transparent_effect(fixed_icontext_list_menuitem *m)
  594. {
  595.     /*----------------------------------------------------------------*/
  596.     /* Local Variables                                                */
  597.     /*----------------------------------------------------------------*/
  598.     /*----------------------------------------------------------------*/
  599.     /* Code Body                                                      */
  600.     /*----------------------------------------------------------------*/
  601.     if (block_transparency)
  602.     {
  603.         return;
  604.     }
  605.     if (transparency_in_list)
  606.     {
  607.         m->focussed_filler = backup_focussed_filler;
  608.     }
  609.     transparency_in_list = 0;
  610. }
  611. /*****************************************************************************
  612.  * FUNCTION
  613.  *  gui_fixed_icontext_list_disable_transparent_effect
  614.  * DESCRIPTION
  615.  *  Disable the transparent effect flag
  616.  * PARAMETERS
  617.  *  m       [?]     
  618.  * RETURNS
  619.  *  void
  620.  *****************************************************************************/
  621. void gui_fixed_icontext_list_disable_transparent_effect(fixed_icontext_list_menuitem *m)
  622. {
  623.     /*----------------------------------------------------------------*/
  624.     /* Local Variables                                                */
  625.     /*----------------------------------------------------------------*/
  626.     /*----------------------------------------------------------------*/
  627.     /* Code Body                                                      */
  628.     /*----------------------------------------------------------------*/
  629.     if (block_transparency)
  630.     {
  631.         return;
  632.     }
  633.     if (m->focussed_filler->flags & UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR)
  634.     {
  635.         transparency_in_list = 1;
  636.         backup_focussed_filler = m->focussed_filler;
  637.         non_transparent_focussed_filler = *backup_focussed_filler;
  638.         m->focussed_filler = &non_transparent_focussed_filler;
  639.         m->focussed_filler->flags = m->focussed_filler->flags & ~UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR;
  640.     }
  641. }
  642. /*****************************************************************************
  643.  * FUNCTION
  644.  *  gui_fixed_text_menuitem_enable_transparent_effect
  645.  * DESCRIPTION
  646.  *  enable the transparent effect flag
  647.  * PARAMETERS
  648.  *  m       [?]     
  649.  * RETURNS
  650.  *  void
  651.  *****************************************************************************/
  652. void gui_fixed_text_menuitem_enable_transparent_effect(fixed_text_menuitem *m)
  653. {
  654.     /*----------------------------------------------------------------*/
  655.     /* Local Variables                                                */
  656.     /*----------------------------------------------------------------*/
  657.     /*----------------------------------------------------------------*/
  658.     /* Code Body                                                      */
  659.     /*----------------------------------------------------------------*/
  660.     if (block_transparency)
  661.     {
  662.         return;
  663.     }
  664.     if (transparency_in_list)
  665.     {
  666.         m->focussed_filler = backup_focussed_filler;
  667.     }
  668.     transparency_in_list = 0;
  669. }
  670. /*****************************************************************************
  671.  * FUNCTION
  672.  *  gui_fixed_text_menuitem_disable_transparent_effect
  673.  * DESCRIPTION
  674.  *  Disable the transparent effect flag
  675.  * PARAMETERS
  676.  *  m       [?]     
  677.  * RETURNS
  678.  *  void
  679.  *****************************************************************************/
  680. void gui_fixed_text_menuitem_disable_transparent_effect(fixed_text_menuitem *m)
  681. {
  682.     /*----------------------------------------------------------------*/
  683.     /* Local Variables                                                */
  684.     /*----------------------------------------------------------------*/
  685.     /*----------------------------------------------------------------*/
  686.     /* Code Body                                                      */
  687.     /*----------------------------------------------------------------*/
  688.     if (block_transparency)
  689.     {
  690.         return;
  691.     }
  692.     if (m->focussed_filler->flags & UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR)
  693.     {
  694.         transparency_in_list = 1;
  695.         backup_focussed_filler = m->focussed_filler;
  696.         non_transparent_focussed_filler = *backup_focussed_filler;
  697.         m->focussed_filler = &non_transparent_focussed_filler;
  698.         m->focussed_filler->flags = m->focussed_filler->flags & ~UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR;
  699.     }
  700. }
  701. /*****************************************************************************
  702.  * FUNCTION
  703.  *  gui_fixed_twostate_menuitem_enable_transparent_effect
  704.  * DESCRIPTION
  705.  *  enable the transparent effect flag
  706.  * PARAMETERS
  707.  *  m       [?]     
  708.  * RETURNS
  709.  *  void
  710.  *****************************************************************************/
  711. void gui_fixed_twostate_menuitem_enable_transparent_effect(fixed_twostate_menuitem *m)
  712. {
  713.     /*----------------------------------------------------------------*/
  714.     /* Local Variables                                                */
  715.     /*----------------------------------------------------------------*/
  716.     /*----------------------------------------------------------------*/
  717.     /* Code Body                                                      */
  718.     /*----------------------------------------------------------------*/
  719.     if (block_transparency)
  720.     {
  721.         return;
  722.     }
  723.     if (transparency_in_list)
  724.     {
  725.         m->focussed_filler = backup_focussed_filler;
  726.     }
  727.     transparency_in_list = 0;
  728. }
  729. /*****************************************************************************
  730.  * FUNCTION
  731.  *  gui_fixed_twostate_menuitem_disable_transparent_effect
  732.  * DESCRIPTION
  733.  *  Disable the transparent effect flag
  734.  * PARAMETERS
  735.  *  m       [?]     
  736.  * RETURNS
  737.  *  void
  738.  *****************************************************************************/
  739. void gui_fixed_twostate_menuitem_disable_transparent_effect(fixed_twostate_menuitem *m)
  740. {
  741.     /*----------------------------------------------------------------*/
  742.     /* Local Variables                                                */
  743.     /*----------------------------------------------------------------*/
  744.     /*----------------------------------------------------------------*/
  745.     /* Code Body                                                      */
  746.     /*----------------------------------------------------------------*/
  747.     if (block_transparency)
  748.     {
  749.         return;
  750.     }
  751.     if (m->focussed_filler->flags & UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR)
  752.     {
  753.         transparency_in_list = 1;
  754.         backup_focussed_filler = m->focussed_filler;
  755.         non_transparent_focussed_filler = *backup_focussed_filler;
  756.         m->focussed_filler = &non_transparent_focussed_filler;
  757.         m->focussed_filler->flags = m->focussed_filler->flags & ~UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR;
  758.     }
  759. }
  760. #endif /* __MMI_UI_TRANSPARENT_EFFECT__ */ 
  761. /* Fixed menuitem dummy functions: Do not delete any of these functions */
  762. /*****************************************************************************
  763.  * FUNCTION
  764.  *  UI_fixed_menuitem_dummy_display_function
  765.  * DESCRIPTION
  766.  *  dummy func of UI_fixed_menuitem_dummy_display_function
  767.  * PARAMETERS
  768.  *  item                    [IN]        
  769.  *  common_item_data        [IN]        
  770.  *  x                       [IN]        
  771.  *  y                       [IN]        
  772.  * RETURNS
  773.  *  void
  774.  *****************************************************************************/
  775. void UI_fixed_menuitem_dummy_display_function(void *item, void *common_item_data, S32 x, S32 y)
  776. {
  777.     /*----------------------------------------------------------------*/
  778.     /* Local Variables                                                */
  779.     /*----------------------------------------------------------------*/
  780.     /*----------------------------------------------------------------*/
  781.     /* Code Body                                                      */
  782.     /*----------------------------------------------------------------*/
  783.     UI_UNUSED_PARAMETER(item);
  784.     UI_UNUSED_PARAMETER(common_item_data);
  785.     UI_UNUSED_PARAMETER(x);
  786.     UI_UNUSED_PARAMETER(y);
  787. }
  788. /*****************************************************************************
  789.  * FUNCTION
  790.  *  UI_fixed_menuitem_dummy_hide_function
  791.  * DESCRIPTION
  792.  *  dummy hide func
  793.  * PARAMETERS
  794.  *  item                    [IN]        
  795.  *  common_item_data        [IN]        
  796.  *  x                       [IN]        
  797.  *  y                       [IN]        
  798.  * RETURNS
  799.  *  void
  800.  *****************************************************************************/
  801. void UI_fixed_menuitem_dummy_hide_function(void *item, void *common_item_data, S32 x, S32 y)
  802. {
  803.     /*----------------------------------------------------------------*/
  804.     /* Local Variables                                                */
  805.     /*----------------------------------------------------------------*/
  806.     /*----------------------------------------------------------------*/
  807.     /* Code Body                                                      */
  808.     /*----------------------------------------------------------------*/
  809.     UI_UNUSED_PARAMETER(item);
  810.     UI_UNUSED_PARAMETER(common_item_data);
  811.     UI_UNUSED_PARAMETER(x);
  812.     UI_UNUSED_PARAMETER(y);
  813. }
  814. /*****************************************************************************
  815.  * FUNCTION
  816.  *  UI_fixed_menuitem_dummy_measure_function
  817.  * DESCRIPTION
  818.  *  dummy measure  func
  819.  * PARAMETERS
  820.  *  item                    [IN]        
  821.  *  common_item_data        [IN]        
  822.  *  width                   [?]         
  823.  *  height                  [?]         
  824.  *  x(?)                    [IN]        
  825.  *  y(?)                    [IN]        
  826.  * RETURNS
  827.  *  void
  828.  *****************************************************************************/
  829. void UI_fixed_menuitem_dummy_measure_function(void *item, void *common_item_data, S32 *width, S32 *height)
  830. {
  831.     /*----------------------------------------------------------------*/
  832.     /* Local Variables                                                */
  833.     /*----------------------------------------------------------------*/
  834.     /*----------------------------------------------------------------*/
  835.     /* Code Body                                                      */
  836.     /*----------------------------------------------------------------*/
  837.     UI_UNUSED_PARAMETER(item);
  838.     UI_UNUSED_PARAMETER(common_item_data);
  839.     UI_UNUSED_PARAMETER(width);
  840.     UI_UNUSED_PARAMETER(height);
  841. }
  842. /*****************************************************************************
  843.  * FUNCTION
  844.  *  UI_fixed_menuitem_dummy_highlight_function
  845.  * DESCRIPTION
  846.  *  dummy highlight  func
  847.  * PARAMETERS
  848.  *  item                    [IN]        
  849.  *  common_item_data        [IN]        
  850.  * RETURNS
  851.  *  void
  852.  *****************************************************************************/
  853. void UI_fixed_menuitem_dummy_highlight_function(void *item, void *common_item_data)
  854. {
  855.     /*----------------------------------------------------------------*/
  856.     /* Local Variables                                                */
  857.     /*----------------------------------------------------------------*/
  858.     /*----------------------------------------------------------------*/
  859.     /* Code Body                                                      */
  860.     /*----------------------------------------------------------------*/
  861.     UI_UNUSED_PARAMETER(item);
  862.     UI_UNUSED_PARAMETER(common_item_data);
  863. }
  864. /*****************************************************************************
  865.  * FUNCTION
  866.  *  UI_fixed_menuitem_dummy_remove_highlight_function
  867.  * DESCRIPTION
  868.  *  dummy remove highlight  func
  869.  * PARAMETERS
  870.  *  item                    [IN]        
  871.  *  common_item_data        [IN]        
  872.  * RETURNS
  873.  *  void
  874.  *****************************************************************************/
  875. void UI_fixed_menuitem_dummy_remove_highlight_function(void *item, void *common_item_data)
  876. {
  877.     /*----------------------------------------------------------------*/
  878.     /* Local Variables                                                */
  879.     /*----------------------------------------------------------------*/
  880.     /*----------------------------------------------------------------*/
  881.     /* Code Body                                                      */
  882.     /*----------------------------------------------------------------*/
  883.     UI_UNUSED_PARAMETER(item);
  884.     UI_UNUSED_PARAMETER(common_item_data);
  885. }
  886. /*****************************************************************************
  887.  * FUNCTION
  888.  *  UI_fixed_menuitem_dummy_resize_function
  889.  * DESCRIPTION
  890.  *  dummy resize function
  891.  * PARAMETERS
  892.  *  x       [IN]        
  893.  *  y       [IN]        
  894.  * RETURNS
  895.  *  void
  896.  *****************************************************************************/
  897. void UI_fixed_menuitem_dummy_resize_function(S32 x, S32 y)
  898. {
  899.     /*----------------------------------------------------------------*/
  900.     /* Local Variables                                                */
  901.     /*----------------------------------------------------------------*/
  902.     /*----------------------------------------------------------------*/
  903.     /* Code Body                                                      */
  904.     /*----------------------------------------------------------------*/
  905.     UI_UNUSED_PARAMETER(x);
  906.     UI_UNUSED_PARAMETER(y);
  907. }
  908. #ifdef __MMI_TOUCH_SCREEN__
  909. /*****************************************************************************
  910.  * FUNCTION
  911.  *  UI_fixed_menuitem_dummy_pen_function
  912.  * DESCRIPTION
  913.  *  
  914.  * PARAMETERS
  915.  *  item                    [?]         
  916.  *  common_item_data        [?]         
  917.  *  item_x                  [IN]        
  918.  *  item_y                  [IN]        
  919.  *  pen_event               [IN]        
  920.  *  x                       [IN]        
  921.  *  y                       [IN]        
  922.  *  menuitem_event          [?]         
  923.  *  menuitem_param          [?]         
  924.  * RETURNS
  925.  *  
  926.  *****************************************************************************/
  927. BOOL UI_fixed_menuitem_dummy_pen_function(
  928.         void *item,
  929.         void *common_item_data,
  930.         S32 item_x,
  931.         S32 item_y,
  932.         mmi_pen_event_type_enum pen_event,
  933.         S16 x,
  934.         S16 y,
  935.         gui_list_pen_enum *menuitem_event,
  936.         gui_pen_event_param_struct *menuitem_param)
  937. {
  938.     /*----------------------------------------------------------------*/
  939.     /* Local Variables                                                */
  940.     /*----------------------------------------------------------------*/
  941.     /*----------------------------------------------------------------*/
  942.     /* Code Body                                                      */
  943.     /*----------------------------------------------------------------*/
  944.     UI_UNUSED_PARAMETER(item);
  945.     UI_UNUSED_PARAMETER(common_item_data);
  946.     UI_UNUSED_PARAMETER(pen_event);
  947.     UI_UNUSED_PARAMETER(x);
  948.     UI_UNUSED_PARAMETER(y);
  949.     UI_UNUSED_PARAMETER(menuitem_event);
  950.     UI_UNUSED_PARAMETER(menuitem_param);
  951.     return MMI_FALSE;
  952. }
  953. #endif /* __MMI_TOUCH_SCREEN__ */ 
  954. /* GUI: fixed text menuitem functions              */
  955. UI_fixed_text_menuitem_theme *current_fixed_text_menuitem_theme = NULL;
  956. /*****************************************************************************
  957.  * FUNCTION
  958.  *  gui_set_fixed_text_menuitem_theme
  959.  * DESCRIPTION
  960.  *  Applies the given theme to a fixed text menuitem
  961.  * PARAMETERS
  962.  *  m       [IN]        Is the fixed text menuitem object   (common data)
  963.  *  t       [IN]        Is the theme
  964.  * RETURNS
  965.  *  void
  966.  *****************************************************************************/
  967. #ifdef __MMI_UI_TRANSPARENT_EFFECT__
  968. UI_filled_area fixed_text_menuitem_transparent_filled_area;
  969. #endif 
  970. void gui_set_fixed_text_menuitem_theme(fixed_text_menuitem *m, UI_fixed_text_menuitem_theme *t)
  971. {
  972.     /*----------------------------------------------------------------*/
  973.     /* Local Variables                                                */
  974.     /*----------------------------------------------------------------*/
  975.     /*----------------------------------------------------------------*/
  976.     /* Code Body                                                      */
  977.     /*----------------------------------------------------------------*/
  978.     m->normal_filler = t->normal_filler;
  979.     m->disabled_filler = t->disabled_filler;
  980.     m->selected_filler = t->selected_filler;
  981.     m->focussed_filler = t->focussed_filler;
  982. #ifdef __MMI_UI_TRANSPARENT_EFFECT__
  983.     /* This is to replace the UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR flag and alpha value from the themecomponent.h */
  984.     if (!m->focussed_filler->flags & UI_FILLED_AREA_TYPE_BITMAP)
  985.     {
  986.         fixed_text_menuitem_transparent_filled_area = *(m->focussed_filler);
  987.         m->focussed_filler = &fixed_text_menuitem_transparent_filled_area;
  988.         fixed_text_menuitem_transparent_filled_area.flags |= UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR;
  989.         fixed_text_menuitem_transparent_filled_area.c.alpha = HIGHLIGHTER_COLOR_OPACITY_VALUE;
  990.     }
  991. #endif /* __MMI_UI_TRANSPARENT_EFFECT__ */ 
  992.     m->normal_text_color = t->normal_text_color;
  993.     m->disabled_text_color = t->disabled_text_color;
  994.     m->selected_text_color = t->selected_text_color;
  995.     m->focussed_text_color = t->focussed_text_color;
  996.     m->text_font = t->text_font;
  997.     m->flags |= t->flags;
  998. }
  999. /*****************************************************************************
  1000.  * FUNCTION
  1001.  *  gui_set_fixed_text_menuitem_current_theme
  1002.  * DESCRIPTION
  1003.  *  Applies the current theme to a fixed text menuitem
  1004.  * PARAMETERS
  1005.  *  m       [IN]        Is the fixed text menuitem object   (common data)
  1006.  * RETURNS
  1007.  *  void
  1008.  *****************************************************************************/
  1009. void gui_set_fixed_text_menuitem_current_theme(fixed_text_menuitem *m)
  1010. {
  1011.     /*----------------------------------------------------------------*/
  1012.     /* Local Variables                                                */
  1013.     /*----------------------------------------------------------------*/
  1014.     /*----------------------------------------------------------------*/
  1015.     /* Code Body                                                      */
  1016.     /*----------------------------------------------------------------*/
  1017.     /* set th normal filler color of menu item equal to current theme */
  1018.     m->normal_filler = current_fixed_text_menuitem_theme->normal_filler;
  1019.     m->disabled_filler = current_fixed_text_menuitem_theme->disabled_filler;
  1020.     m->selected_filler = current_fixed_text_menuitem_theme->selected_filler;
  1021.     m->focussed_filler = current_fixed_text_menuitem_theme->focussed_filler;
  1022. #ifdef __MMI_UI_TRANSPARENT_EFFECT__
  1023.     /* This is to replace the UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR flag and alpha value from the themecomponent.h */
  1024.     if (!m->focussed_filler->flags & UI_FILLED_AREA_TYPE_BITMAP)
  1025.     {
  1026.         fixed_text_menuitem_transparent_filled_area = *(m->focussed_filler);
  1027.         m->focussed_filler = &fixed_text_menuitem_transparent_filled_area;
  1028.         fixed_text_menuitem_transparent_filled_area.flags |= UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR;
  1029.     }
  1030. #endif /* __MMI_UI_TRANSPARENT_EFFECT__ */ 
  1031.     m->normal_text_color = current_fixed_text_menuitem_theme->normal_text_color;
  1032.     m->disabled_text_color = current_fixed_text_menuitem_theme->disabled_text_color;
  1033.     m->selected_text_color = current_fixed_text_menuitem_theme->selected_text_color;
  1034.     m->focussed_text_color = current_fixed_text_menuitem_theme->focussed_text_color;
  1035.     m->text_font = current_fixed_text_menuitem_theme->text_font;
  1036.     m->flags |= current_fixed_text_menuitem_theme->flags;
  1037. }
  1038. /*****************************************************************************
  1039.  * FUNCTION
  1040.  *  gui_create_fixed_text_menuitem
  1041.  * DESCRIPTION
  1042.  *  Creates a fixed text menuitem
  1043.  * PARAMETERS
  1044.  *  m           [IN]        Is the fixed text menuitem object (common data)
  1045.  *  width       [IN]        Width is the width of the fixed text menuitem
  1046.  *  height      [IN]        Height is the height of the fixed text menuitem
  1047.  * RETURNS
  1048.  *  void
  1049.  *****************************************************************************/
  1050. void gui_create_fixed_text_menuitem(fixed_text_menuitem *m, S32 width, S32 height)
  1051. {
  1052.     /*----------------------------------------------------------------*/
  1053.     /* Local Variables                                                */
  1054.     /*----------------------------------------------------------------*/
  1055.     /*----------------------------------------------------------------*/
  1056.     /* Code Body                                                      */
  1057.     /*----------------------------------------------------------------*/
  1058.     m->width = width;
  1059.     m->height = height;
  1060.     m->flags = 0;
  1061.     m->ext_flags = 0;
  1062.     gui_set_fixed_text_menuitem_current_theme(m);
  1063.     m->text_x = 0;
  1064.     m->text_y = 0;
  1065.     m->scroll_x = 0;
  1066.     m->scroll_width = width;
  1067.     m->parent_list = NULL;
  1068.     m->parent_matrix = NULL;
  1069. }
  1070. /*****************************************************************************
  1071.  * FUNCTION
  1072.  *  gui_fixed_text_menuitem_set_text_position
  1073.  * DESCRIPTION
  1074.  *  Sets the text position within a fixed text menuitem
  1075.  * PARAMETERS
  1076.  *  m       [IN]        Is the fixed text menuitem object   (common data)
  1077.  *  x       [IN]        Is the position of the text (offset from the left-top corner of the menuitem)
  1078.  *  y       [IN]        Is the position of the text (offset from the left-top corner of the menuitem)
  1079.  * RETURNS
  1080.  *  void
  1081.  *****************************************************************************/
  1082. void gui_fixed_text_menuitem_set_text_position(fixed_text_menuitem *m, S32 x, S32 y)
  1083. {
  1084.     /*----------------------------------------------------------------*/
  1085.     /* Local Variables                                                */
  1086.     /*----------------------------------------------------------------*/
  1087.     /*----------------------------------------------------------------*/
  1088.     /* Code Body                                                      */
  1089.     /*----------------------------------------------------------------*/
  1090.     m->text_x = x;
  1091.     m->text_y = y;
  1092. }
  1093. /*****************************************************************************
  1094.  * FUNCTION
  1095.  *  gui_resize_fixed_text_menuitem
  1096.  * DESCRIPTION
  1097.  *  Changes the size of a fixed text menuitem
  1098.  * PARAMETERS
  1099.  *  m           [IN]        Is the fixed text menuitem object   (common data)
  1100.  *  width       [IN]        Is the new width
  1101.  *  height      [IN]        Is the new height
  1102.  * RETURNS
  1103.  *  void
  1104.  *****************************************************************************/
  1105. void gui_resize_fixed_text_menuitem(fixed_text_menuitem *m, S32 width, S32 height)
  1106. {
  1107.     /*----------------------------------------------------------------*/
  1108.     /* Local Variables                                                */
  1109.     /*----------------------------------------------------------------*/
  1110.     /*----------------------------------------------------------------*/
  1111.     /* Code Body                                                      */
  1112.     /*----------------------------------------------------------------*/
  1113.     m->width = width;
  1114.     m->height = height;
  1115.     m->scroll_width = width;
  1116. }
  1117. /* Text scrolling related functions within the menu item */
  1118. fixed_text_menuitem *GUI_current_fixed_text_menuitem_common_data = NULL;
  1119. fixed_text_menuitem_type *GUI_current_fixed_text_menuitem_data = NULL;
  1120. U8 GUI_current_fixed_text_menuitem_scroll = 0;
  1121. U8 GUI_current_fixed_text_menuitem_scroll_direction;
  1122. S32 GUI_current_fixed_text_menuitem_x;
  1123. S32 GUI_current_fixed_text_menuitem_y;
  1124. S32 GUI_current_fixed_text_menuitem_scroll_counter = 0;
  1125. UI_string_type GUI_current_fixed_text_menuitem_scroll_text = NULL;
  1126. UI_string_type GUI_current_fixed_text_menuitem_scroll_text_end = NULL;
  1127. /*****************************************************************************
  1128.  * FUNCTION
  1129.  *  gui_fixed_text_menuitem_scroll_handler
  1130.  * DESCRIPTION
  1131.  *  
  1132.  * PARAMETERS
  1133.  *  void
  1134.  * RETURNS
  1135.  *  void
  1136.  *****************************************************************************/
  1137. void gui_fixed_text_menuitem_scroll_handler(void)
  1138. {
  1139.     /*----------------------------------------------------------------*/
  1140.     /* Local Variables                                                */
  1141.     /*----------------------------------------------------------------*/
  1142.     U32 flags = GUI_current_fixed_text_menuitem_common_data->flags;
  1143.     /*----------------------------------------------------------------*/
  1144.     /* Code Body                                                      */
  1145.     /*----------------------------------------------------------------*/
  1146.     flags |= GUI_current_fixed_text_menuitem_data->flags;
  1147. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  1148.     gui_reset_current_list_effect();
  1149. #endif 
  1150.     if (GUI_current_fixed_text_menuitem_scroll_counter)
  1151.     {
  1152.         GUI_current_fixed_text_menuitem_scroll_counter--;
  1153.     }
  1154.     else
  1155.     {
  1156.     #if(UI_USE_WORD_SCROLLING_TEXT)
  1157.         GUI_current_fixed_text_menuitem_scroll_text = GUI_current_fixed_text_menuitem_scroll_text_end;
  1158.     #else /* (UI_USE_WORD_SCROLLING_TEXT) */ 
  1159.         if (flags & UI_MENUITEM_MARQUEE_SCROLL)
  1160.         {
  1161.             if (r2lMMIFlag)
  1162.             {
  1163.                 GUI_current_fixed_text_menuitem_common_data->scroll_x += UI_text_menuitem_scroll_size;
  1164.                 if (GUI_current_fixed_text_menuitem_common_data->scroll_x >=
  1165.                     (GUI_current_fixed_text_menuitem_common_data->text_width + UI_text_menuitem_scroll_gap))
  1166.                 {
  1167.                     GUI_current_fixed_text_menuitem_common_data->scroll_x = 0;
  1168.                 }
  1169.             }
  1170.             else
  1171.             {
  1172.                 GUI_current_fixed_text_menuitem_common_data->scroll_x -= UI_text_menuitem_scroll_size;
  1173.                 if (GUI_current_fixed_text_menuitem_common_data->scroll_x <=
  1174.                     (-(GUI_current_fixed_text_menuitem_common_data->text_width + UI_text_menuitem_scroll_gap)))
  1175.                 {
  1176.                     GUI_current_fixed_text_menuitem_common_data->scroll_x = 0;
  1177.                 }
  1178.             }
  1179.         }
  1180.         else
  1181.         {
  1182.             if (GUI_current_fixed_text_menuitem_scroll_direction == 0)
  1183.             {
  1184.                 GUI_current_fixed_text_menuitem_common_data->scroll_x -= UI_text_menuitem_scroll_size;
  1185.                 if ((GUI_current_fixed_text_menuitem_common_data->scroll_x +
  1186.                      GUI_current_fixed_text_menuitem_common_data->text_width) <=
  1187.                     (GUI_current_fixed_text_menuitem_common_data->scroll_width))
  1188.                 {
  1189.                     GUI_current_fixed_text_menuitem_scroll_direction = 1;
  1190.                     GUI_current_fixed_text_menuitem_scroll_counter = UI_text_menuitem_scroll_pause;
  1191.                 }
  1192.             }
  1193.             else if (GUI_current_fixed_text_menuitem_scroll_direction == 1)
  1194.             {
  1195.                 GUI_current_fixed_text_menuitem_common_data->scroll_x += UI_text_menuitem_scroll_size;
  1196.                 if (GUI_current_fixed_text_menuitem_common_data->scroll_x >= 0)
  1197.                 {
  1198.                     GUI_current_fixed_text_menuitem_scroll_direction = 0;
  1199.                     GUI_current_fixed_text_menuitem_scroll_counter = UI_text_menuitem_scroll_pause;
  1200.                 }
  1201.             }
  1202.         }
  1203.     #endif /* (UI_USE_WORD_SCROLLING_TEXT) */ 
  1204.         GUI_current_fixed_text_menuitem_common_data->ext_flags |= UI_MENUITEM_EXT_SHOW_IN_MARQUEE;
  1205.     #ifdef __MMI_UI_TRANSPARENT_EFFECT__
  1206.         if (!gui_is_current_transparency_with_multi_layer())
  1207.         {
  1208.             gui_fixed_text_menuitem_disable_transparent_effect(GUI_current_fixed_text_menuitem_common_data);    /* To disable transparency for scrolling text */
  1209.         }
  1210.     #endif /* __MMI_UI_TRANSPARENT_EFFECT__ */ 
  1211.         gui_show_fixed_text_menuitem(
  1212.             (void*)GUI_current_fixed_text_menuitem_data,
  1213.             (void*)GUI_current_fixed_text_menuitem_common_data,
  1214.             GUI_current_fixed_text_menuitem_x,
  1215.             GUI_current_fixed_text_menuitem_y);
  1216.     #ifdef __MMI_UI_TRANSPARENT_EFFECT__
  1217.         gui_fixed_text_menuitem_enable_transparent_effect(GUI_current_fixed_text_menuitem_common_data); /* To enable transparency */
  1218.     #endif 
  1219.         GUI_current_fixed_text_menuitem_common_data->ext_flags &= ~UI_MENUITEM_EXT_SHOW_IN_MARQUEE;
  1220.         gui_BLT_double_buffer(
  1221.             GUI_current_fixed_text_menuitem_x,
  1222.             GUI_current_fixed_text_menuitem_y,
  1223.             GUI_current_fixed_text_menuitem_x + GUI_current_fixed_text_menuitem_common_data->width - 1,
  1224.             GUI_current_fixed_text_menuitem_y + GUI_current_fixed_text_menuitem_common_data->height - 1);
  1225.     }
  1226.     gui_start_timer(UI_text_menuitem_scroll_time, gui_fixed_text_menuitem_scroll_handler);
  1227. }
  1228. /*****************************************************************************
  1229.  * FUNCTION
  1230.  *  gui_fixed_text_menuitem_start_scroll
  1231.  * DESCRIPTION
  1232.  *  
  1233.  * PARAMETERS
  1234.  *  void
  1235.  * RETURNS
  1236.  *  void
  1237.  *****************************************************************************/
  1238. void gui_fixed_text_menuitem_start_scroll(void)
  1239. {
  1240.     /*----------------------------------------------------------------*/
  1241.     /* Local Variables                                                */
  1242.     /*----------------------------------------------------------------*/
  1243.     fixed_text_menuitem_type *t = (fixed_text_menuitem_type*) GUI_current_fixed_text_menuitem_data;
  1244.     fixed_text_menuitem *m = (fixed_text_menuitem*) GUI_current_fixed_text_menuitem_common_data;
  1245.     S32 w;
  1246.     U32 flags;
  1247.     /*----------------------------------------------------------------*/
  1248.     /* Code Body                                                      */
  1249.     /*----------------------------------------------------------------*/
  1250.     flags = m->flags;
  1251.     flags |= t->flags;
  1252.     gui_set_font(m->text_font);
  1253.     w = gui_get_string_width(t->text);
  1254.     m->text_width = w;
  1255.     m->scroll_x = 0;
  1256.     if (w >= (m->scroll_width - 1))
  1257.     {
  1258.     #if(UI_USE_WORD_SCROLLING_TEXT)
  1259.         GUI_current_fixed_text_menuitem_scroll_text = t->text;
  1260.         GUI_current_fixed_text_menuitem_scroll = 1;
  1261.         GUI_current_fixed_text_menuitem_scroll_direction = 0;
  1262.         GUI_current_fixed_text_menuitem_scroll_counter = UI_text_menuitem_scroll_pause;
  1263.     #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  1264.         if (gui_get_current_list_effect() && gblock_list_effect != 1)
  1265.         {
  1266.             gui_register_callback_menuitem_scroll(gui_fixed_text_menuitem_scroll_handler);
  1267.         }
  1268.         else
  1269.     #endif /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  1270.         {
  1271.             gui_start_timer(UI_text_menuitem_scroll_time, gui_fixed_text_menuitem_scroll_handler);
  1272.         }
  1273.     #else /* (UI_USE_WORD_SCROLLING_TEXT) */ 
  1274.         if ((flags & UI_MENUITEM_MARQUEE_SCROLL) || (flags & UI_MENUITEM_TWO_DIRECTION_SCROLL))
  1275.         {
  1276.             GUI_current_fixed_text_menuitem_scroll = 1;
  1277.             GUI_current_fixed_text_menuitem_scroll_direction = 0;
  1278.             GUI_current_fixed_text_menuitem_scroll_counter = UI_text_menuitem_scroll_pause;
  1279.         #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  1280.             if (gui_get_current_list_effect() && gblock_list_effect != 1)
  1281.             {
  1282.                 gui_register_callback_menuitem_scroll(gui_fixed_text_menuitem_scroll_handler);
  1283.             }
  1284.             else
  1285.         #endif /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  1286.             {
  1287.                 gui_start_timer(UI_text_menuitem_scroll_time, gui_fixed_text_menuitem_scroll_handler);
  1288.             }
  1289.         }
  1290.     #endif /* (UI_USE_WORD_SCROLLING_TEXT) */ 
  1291.     }
  1292.     else
  1293. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  1294.     {
  1295.         gui_register_callback_menuitem_scroll(gui_dummy_scroll_handler_for_list_effects);
  1296.         GUI_current_fixed_text_menuitem_scroll = 0;
  1297.     }
  1298. #else /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  1299.     {
  1300.         GUI_current_fixed_text_menuitem_scroll = 0;
  1301.     }
  1302. #endif /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  1303. }
  1304. /*****************************************************************************
  1305.  * FUNCTION
  1306.  *  gui_fixed_text_menuitem_stop_scroll
  1307.  * DESCRIPTION
  1308.  *  
  1309.  * PARAMETERS
  1310.  *  void
  1311.  * RETURNS
  1312.  *  void
  1313.  *****************************************************************************/
  1314. void gui_fixed_text_menuitem_stop_scroll(void)
  1315. {
  1316.     /*----------------------------------------------------------------*/
  1317.     /* Local Variables                                                */
  1318.     /*----------------------------------------------------------------*/
  1319.     /*----------------------------------------------------------------*/
  1320.     /* Code Body                                                      */
  1321.     /*----------------------------------------------------------------*/
  1322.     if (GUI_current_fixed_text_menuitem_scroll)
  1323.     {
  1324.         gui_cancel_timer(gui_fixed_text_menuitem_scroll_handler);
  1325.         GUI_current_fixed_text_menuitem_scroll = 0;
  1326.     }
  1327. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  1328.     gui_register_callback_menuitem_scroll(gui_dummy_scroll_handler_for_list_effects);
  1329.     gui_restore_current_list_effect();
  1330. #endif /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  1331. }
  1332. /*****************************************************************************
  1333.  * FUNCTION
  1334.  *  gui_show_fixed_text_menuitem
  1335.  * DESCRIPTION
  1336.  *  Displays the fixed text menuitem
  1337.  * PARAMETERS
  1338.  *  item                    [IN]        Is a specific fixed text menuitem object
  1339.  *  common_item_data        [IN]        Is the fixed text menuitem object (common_data)
  1340.  *  x                       [IN]        Is the position at which the menuitem is displayed
  1341.  *  y                       [IN]        Is the position at which the menuitem is displayed
  1342.  * RETURNS
  1343.  *  void
  1344.  *****************************************************************************/
  1345. void gui_show_fixed_text_menuitem(void *item, void *common_item_data, S32 x, S32 y)
  1346. {
  1347.     /*----------------------------------------------------------------*/
  1348.     /* Local Variables                                                */
  1349.     /*----------------------------------------------------------------*/
  1350.     S32 x1, y1, x2, y2;
  1351.     S32 text_x, text_y;
  1352.     color text_color;
  1353.     UI_filled_area *f = NULL;
  1354.     fixed_text_menuitem *m = (fixed_text_menuitem*) common_item_data;
  1355.     fixed_text_menuitem_type *mi = (fixed_text_menuitem_type*) item;
  1356.     U32 flags;
  1357.     UI_string_type _text;
  1358.     S32 sw, sh;
  1359.     /*----------------------------------------------------------------*/
  1360.     /* Code Body                                                      */
  1361.     /*----------------------------------------------------------------*/
  1362.     flags = mi->flags;
  1363.     flags |= m->flags;
  1364.     _text = mi->text;
  1365.     if (flags & UI_MENUITEM_STATE_FOCUSSED)
  1366.     {
  1367.         GUI_current_fixed_text_menuitem_x = x;
  1368.         GUI_current_fixed_text_menuitem_y = y;
  1369.     }
  1370.     /* Autocalculate the text position based on font   */
  1371.     gui_set_font(m->text_font);
  1372.     gui_measure_string(_text, &sw, &sh);
  1373.     if (flags & UI_MENUITEM_CENTER_TEXT_X)
  1374.     {
  1375.         if (m->width > sw)
  1376.         {
  1377.             m->text_x = (m->width >> 1) - (sw >> 1);
  1378.         }
  1379.         else
  1380.         {
  1381.             m->text_x = 0;
  1382.         }
  1383.     }
  1384.     if (flags & UI_MENUITEM_CENTER_TEXT_Y)
  1385.     {
  1386.         if (m->height > sh)
  1387.         {
  1388.             m->text_y = (m->height >> 1) - (sh >> 1);
  1389.         }
  1390.         else
  1391.         {
  1392.             m->text_y = 0;
  1393.         }
  1394.     }
  1395.     x1 = x;
  1396.     y1 = y;
  1397.     y2 = y1 + m->height - 1;
  1398.     x2 = x1 + m->width - 1;
  1399.     if (r2lMMIFlag)
  1400.     {
  1401.         text_x = m->width - 1 - m->text_x;
  1402.     }
  1403.     else
  1404.     {
  1405.         text_x = m->text_x;
  1406.     }
  1407.     text_y = m->text_y;
  1408. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  1409.     /* To hide the text of the menuitem up to the last frame for flash feel effect */
  1410.     if (gblock_list_effect == 0)
  1411.     {
  1412.         if (gui_get_current_list_effect() == MMI_UI_LIST_HIGHLIGHT_EFFECT_FLASH_FEELING)
  1413.         {
  1414.             if (flash_feel_last_frame == 0)
  1415.             {
  1416.                 if (flags & UI_MENUITEM_STATE_FOCUSSED)
  1417.                 {
  1418.                     flags |= UI_MENUITEM_DISABLE_TEXT_DISPLAY;
  1419.                 }
  1420.             }
  1421.         }
  1422.     }
  1423. #endif /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  1424.     if (flags & UI_MENUITEM_STATE_FOCUSSED)
  1425.     {
  1426.         text_x += m->scroll_x;
  1427.     }
  1428.     if ((flags & UI_MENUITEM_STATE_FOCUSSED) && !(flags & UI_MENUITEM_DISABLE_HIGHLIGHT))
  1429.     {
  1430.         if (!(flags & UI_MENUITEM_DISABLE_BACKGROUND_ALWAYS))
  1431.         {
  1432.             f = m->focussed_filler;
  1433.         }
  1434.         text_color = m->focussed_text_color;
  1435.     }
  1436.     else if (flags & UI_MENUITEM_STATE_DISABLED)
  1437.     {
  1438.         if (!(flags & UI_MENUITEM_DISABLE_BACKGROUND) && !(flags & UI_MENUITEM_DISABLE_BACKGROUND_ALWAYS))
  1439.         {
  1440.             f = m->disabled_filler;
  1441.         }
  1442.         text_color = m->focussed_text_color;
  1443.     }
  1444.     else if (flags & UI_MENUITEM_STATE_SELECTED)
  1445.     {
  1446.         f = m->selected_filler;
  1447.         text_color = m->selected_text_color;
  1448.     }
  1449.     else
  1450.     {
  1451.         if (!(flags & UI_MENUITEM_DISABLE_BACKGROUND) && !(flags & UI_MENUITEM_DISABLE_BACKGROUND_ALWAYS))
  1452.         {
  1453.             f = m->normal_filler;
  1454.         }
  1455.         text_color = m->normal_text_color;
  1456.     }
  1457.     if (f != NULL)
  1458.     {
  1459.     #ifdef __MMI_SUPPORT_DUMP_SCREEN_STRING__
  1460.     #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  1461.         if (is_draw_next_frame_list_highlight_effect_value())
  1462.     #endif
  1463.         {
  1464.             g_mmi_frm_cntx.dump_screen_info.hightlight_type = MMI_SCREEN_HIGHLIGHT_TEXT_ITEM;
  1465.         }
  1466.     #endif
  1467.     #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  1468.         set_start_position_and_item_parameters_for_list_highlighter_effect(item, common_item_data, x1, y1);
  1469.     #ifdef __MMI_UI_DALMATIAN_FIXEDLIST__
  1470.         if (r2lMMIFlag)
  1471.         {
  1472.             gui_draw_list_filled_area(x1 + 1, y1 + 1, x2, y2, f);
  1473.         }
  1474.         else
  1475.         {
  1476.             gui_draw_list_filled_area(x1, y1 + 1, x2 - 1, y2, f);
  1477.         }
  1478.     #else /* __MMI_UI_DALMATIAN_FIXEDLIST__ */ 
  1479.         gui_draw_list_filled_area(x1, y1, x2, y2, f);
  1480.     #endif /* __MMI_UI_DALMATIAN_FIXEDLIST__ */ 
  1481.     #else /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  1482.         gui_draw_filled_area(x1, y1, x2, y2, f);
  1483.     #endif /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  1484.     }
  1485. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  1486.     /* To hide the text of the menuitem up to the last frame for flash feel effect */
  1487.     if (!
  1488.         ((gui_get_current_list_effect() == MMI_UI_LIST_HIGHLIGHT_EFFECT_FLASH_FEELING) &&
  1489.          (flags & UI_MENUITEM_DISABLE_TEXT_DISPLAY) && (gblock_list_effect == 0)))
  1490. #endif /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  1491.     {
  1492.         gui_push_text_clip();
  1493.         gui_set_text_clip(x1, y1, x2, y2);
  1494.         gui_move_text_cursor(x1 + text_x, y1 + text_y);
  1495.         gui_set_line_height(sh);
  1496.         gui_set_text_color(text_color);
  1497.     #if(UI_USE_WORD_SCROLLING_TEXT)
  1498.         if ((flags & UI_MENUITEM_STATE_FOCUSSED) && GUI_current_fixed_text_menuitem_scroll)
  1499.         {
  1500.             GUI_current_fixed_text_menuitem_scroll_text_end = GUI_current_fixed_text_menuitem_scroll_text;
  1501.             if (gui_print_truncated_text2
  1502.                 (x1 + text_x, y1 + text_y, m->width, &GUI_current_fixed_text_menuitem_scroll_text_end))
  1503.             {
  1504.                 GUI_current_fixed_text_menuitem_scroll_text_end = _text;
  1505.             }
  1506.         }
  1507.         else
  1508.         {
  1509.             gui_print_truncated_text2(x1 + text_x, y1 + text_y, m->width, &_text);
  1510.         }
  1511.     #else /* (UI_USE_WORD_SCROLLING_TEXT) */ 
  1512.         gui_print_text(_text);
  1513.         if ((flags & UI_MENUITEM_STATE_FOCUSSED) && (flags & UI_MENUITEM_MARQUEE_SCROLL) &&
  1514.             GUI_current_fixed_text_menuitem_scroll)
  1515.         {
  1516.             if (r2lMMIFlag)
  1517.             {
  1518.                 gui_move_text_cursor(x1 + text_x - (m->text_width + UI_text_menuitem_scroll_gap), y1 + text_y);
  1519.             }
  1520.             else
  1521.             {
  1522.                 gui_move_text_cursor(x1 + text_x + m->text_width + UI_text_menuitem_scroll_gap, y1 + text_y);
  1523.             }
  1524.             gui_set_line_height(sh);
  1525.             gui_print_text(_text);
  1526.         }
  1527.     #endif /* (UI_USE_WORD_SCROLLING_TEXT) */ 
  1528.         gui_pop_text_clip();
  1529.     }
  1530. #if(UI_ENABLE_POP_UP_DESCRIPTIONS)
  1531.     if ((flags & UI_MENUITEM_STATE_FOCUSSED) && !(m->ext_flags & UI_MENUITEM_EXT_SHOW_IN_MARQUEE))
  1532.     {
  1533.         gui_display_pop_up_description(x, y, m->width, m->height);
  1534.     }
  1535. #endif /* (UI_ENABLE_POP_UP_DESCRIPTIONS) */ 
  1536. }
  1537. /*****************************************************************************
  1538.  * FUNCTION
  1539.  *  gui_measure_fixed_text_menuitem
  1540.  * DESCRIPTION
  1541.  *  Measures a fixed text menuitem
  1542.  * PARAMETERS
  1543.  *  item                    [?]         
  1544.  *  common_item_data        [IN]        Is the fixed text menuitem object (common_data)
  1545.  *  width                   [OUT]       
  1546.  *  height                  [OUT]       
  1547.  * RETURNS
  1548.  *  void
  1549.  *****************************************************************************/
  1550. void gui_measure_fixed_text_menuitem(void *item, void *common_item_data, S32 *width, S32 *height)
  1551. {
  1552.     /*----------------------------------------------------------------*/
  1553.     /* Local Variables                                                */
  1554.     /*----------------------------------------------------------------*/
  1555.     fixed_text_menuitem *m = (fixed_text_menuitem*) common_item_data;
  1556.     /*----------------------------------------------------------------*/
  1557.     /* Code Body                                                      */
  1558.     /*----------------------------------------------------------------*/
  1559.     UI_UNUSED_PARAMETER(item);
  1560.     *width = m->width;
  1561.     *height = m->height;
  1562. }
  1563. /*****************************************************************************
  1564.  * FUNCTION
  1565.  *  gui_highlight_fixed_text_menuitem
  1566.  * DESCRIPTION
  1567.  *  Highlights a fixed text menuitem (not visually)
  1568.  * PARAMETERS
  1569.  *  item                    [IN]        Is a specific fixed text menuitem object
  1570.  *  common_item_data        [IN]        
  1571.  * RETURNS
  1572.  *  void
  1573.  *****************************************************************************/
  1574. void gui_highlight_fixed_text_menuitem(void *item, void *common_item_data)
  1575. {
  1576.     /*----------------------------------------------------------------*/
  1577.     /* Local Variables                                                */
  1578.     /*----------------------------------------------------------------*/
  1579.     fixed_text_menuitem_type *t = (fixed_text_menuitem_type*) item;
  1580.     fixed_text_menuitem *m = (fixed_text_menuitem*) common_item_data;
  1581.     U32 flags;
  1582.     /*----------------------------------------------------------------*/
  1583.     /* Code Body                                                      */
  1584.     /*----------------------------------------------------------------*/
  1585.     flags = m->flags;
  1586.     flags |= t->flags;
  1587.     GUI_current_fixed_text_menuitem_common_data = m;
  1588.     GUI_current_fixed_text_menuitem_data = t;
  1589.     gui_fixed_text_menuitem_stop_scroll();
  1590.     gui_fixed_text_menuitem_start_scroll();
  1591.     if (t->flags & UI_MENUITEM_DISABLE_HIGHLIGHT)
  1592.     {
  1593.         return;
  1594.     }
  1595.     t->flags |= UI_MENUITEM_STATE_FOCUSSED;
  1596. }
  1597. /*****************************************************************************
  1598.  * FUNCTION
  1599.  *  gui_remove_highlight_fixed_text_menuitem
  1600.  * DESCRIPTION
  1601.  *  Removes the highlight of a fixed text menuitem (not visually)
  1602.  * PARAMETERS
  1603.  *  item                    [IN]        Is a specific fixed text menuitem object
  1604.  *  common_item_data        [IN]        
  1605.  * RETURNS
  1606.  *  void
  1607.  *****************************************************************************/
  1608. void gui_remove_highlight_fixed_text_menuitem(void *item, void *common_item_data)
  1609. {
  1610.     /*----------------------------------------------------------------*/
  1611.     /* Local Variables                                                */
  1612.     /*----------------------------------------------------------------*/
  1613.     fixed_text_menuitem_type *t = (fixed_text_menuitem_type*) item;
  1614.     fixed_text_menuitem *m = (fixed_text_menuitem*) common_item_data;
  1615.     /*----------------------------------------------------------------*/
  1616.     /* Code Body                                                      */
  1617.     /*----------------------------------------------------------------*/
  1618.     UI_UNUSED_PARAMETER(common_item_data);
  1619.     m->scroll_x = 0;
  1620.     t->flags &= ~UI_MENUITEM_STATE_FOCUSSED;
  1621. }
  1622. /* GUI: fixed icon text menuitem functions               */
  1623. UI_fixed_icontext_menuitem_theme *current_fixed_icontext_menuitem_theme = NULL;
  1624. /*****************************************************************************
  1625.  * FUNCTION
  1626.  *  gui_set_fixed_icontext_menuitem_current_theme
  1627.  * DESCRIPTION
  1628.  *  Applies the current theme to a fixed icontext menuitem
  1629.  * PARAMETERS
  1630.  *  m       [IN]        Is the fixed icontext menuitem object  (common data)
  1631.  * RETURNS
  1632.  *  void
  1633.  *****************************************************************************/
  1634. #ifdef __MMI_UI_TRANSPARENT_EFFECT__
  1635. UI_filled_area fixed_icontext_menuitem_transparent_filled_area;
  1636. #endif 
  1637. void gui_set_fixed_icontext_menuitem_current_theme(fixed_icontext_menuitem *m)
  1638. {
  1639.     /*----------------------------------------------------------------*/
  1640.     /* Local Variables                                                */
  1641.     /*----------------------------------------------------------------*/
  1642.     /*----------------------------------------------------------------*/
  1643.     /* Code Body                                                      */
  1644.     /*----------------------------------------------------------------*/
  1645.     m->disabled_filler = current_fixed_icontext_menuitem_theme->disabled_filler;
  1646.     m->disabled_text_color = current_fixed_icontext_menuitem_theme->disabled_text_color;
  1647.     m->flags |= current_fixed_icontext_menuitem_theme->flags;
  1648.     m->focussed_filler = current_fixed_icontext_menuitem_theme->focussed_filler;
  1649. #ifdef __MMI_UI_TRANSPARENT_EFFECT__
  1650.     /* This is to replace the UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR flag and alpha value from the themecomponent.h */
  1651.     if (!m->focussed_filler->flags & UI_FILLED_AREA_TYPE_BITMAP)
  1652.     {
  1653.         fixed_icontext_menuitem_transparent_filled_area = *(m->focussed_filler);
  1654.         m->focussed_filler = &fixed_icontext_menuitem_transparent_filled_area;
  1655.         fixed_icontext_menuitem_transparent_filled_area.flags |= UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR;
  1656.         fixed_icontext_menuitem_transparent_filled_area.c.alpha = HIGHLIGHTER_COLOR_OPACITY_VALUE;
  1657.     }
  1658. #endif /* __MMI_UI_TRANSPARENT_EFFECT__ */ 
  1659.     m->focussed_text_color = current_fixed_icontext_menuitem_theme->focussed_text_color;
  1660.     m->normal_filler = current_fixed_icontext_menuitem_theme->normal_filler;
  1661.     m->normal_text_color = current_fixed_icontext_menuitem_theme->normal_text_color;
  1662.     m->selected_filler = current_fixed_icontext_menuitem_theme->selected_filler;
  1663.     m->selected_text_color = current_fixed_icontext_menuitem_theme->selected_text_color;
  1664.     m->text_font = current_fixed_icontext_menuitem_theme->text_font;
  1665. }
  1666. /*****************************************************************************
  1667.  * FUNCTION
  1668.  *  gui_set_fixed_icontext_menuitem_theme
  1669.  * DESCRIPTION
  1670.  *  Applies the given theme to a fixed icontext menuitem
  1671.  * PARAMETERS
  1672.  *  m       [IN]        Is the fixed icontext menuitem object  (common data)
  1673.  *  t       [IN]        Is the theme
  1674.  * RETURNS
  1675.  *  void
  1676.  *****************************************************************************/
  1677. void gui_set_fixed_icontext_menuitem_theme(fixed_icontext_menuitem *m, UI_fixed_icontext_menuitem_theme *t)
  1678. {
  1679.     /*----------------------------------------------------------------*/
  1680.     /* Local Variables                                                */
  1681.     /*----------------------------------------------------------------*/
  1682.     /*----------------------------------------------------------------*/
  1683.     /* Code Body                                                      */
  1684.     /*----------------------------------------------------------------*/
  1685.     m->disabled_filler = t->disabled_filler;
  1686.     m->disabled_text_color = t->disabled_text_color;
  1687.     m->flags |= t->flags;
  1688.     m->focussed_filler = t->focussed_filler;
  1689. #ifdef __MMI_UI_TRANSPARENT_EFFECT__
  1690.     /* This is to replace the UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR flag and alpha value from the themecomponent.h */
  1691.     if (!m->focussed_filler->flags & UI_FILLED_AREA_TYPE_BITMAP)
  1692.     {
  1693.         fixed_icontext_menuitem_transparent_filled_area = *(m->focussed_filler);
  1694.         m->focussed_filler = &fixed_icontext_menuitem_transparent_filled_area;
  1695.         fixed_icontext_menuitem_transparent_filled_area.flags |= UI_FILLED_AREA_TYPE_TRANSPARENT_COLOR;
  1696.         fixed_icontext_menuitem_transparent_filled_area.c.alpha = HIGHLIGHTER_COLOR_OPACITY_VALUE;
  1697.     }
  1698. #endif /* __MMI_UI_TRANSPARENT_EFFECT__ */ 
  1699.     m->focussed_text_color = t->focussed_text_color;
  1700.     m->normal_filler = t->normal_filler;
  1701.     m->normal_text_color = t->normal_text_color;
  1702.     m->selected_filler = t->selected_filler;
  1703.     m->selected_text_color = t->selected_text_color;
  1704.     m->text_font = t->text_font;
  1705. }
  1706. /*****************************************************************************
  1707.  * FUNCTION
  1708.  *  gui_create_fixed_icontext_menuitem
  1709.  * DESCRIPTION
  1710.  *  Creates a fixed icontext menuitem
  1711.  * PARAMETERS
  1712.  *  m           [IN]        Is the fixed icontext menuitem object (common data)
  1713.  *  width       [IN]        Width is the width of the fixed icontext menuitem
  1714.  *  height      [IN]        Height is the height of the fixed icontext menuitem
  1715.  * RETURNS
  1716.  *  void
  1717.  *****************************************************************************/
  1718. void gui_create_fixed_icontext_menuitem(fixed_icontext_menuitem *m, S32 width, S32 height)
  1719. {
  1720.     /*----------------------------------------------------------------*/
  1721.     /* Local Variables                                                */
  1722.     /*----------------------------------------------------------------*/
  1723.     /*----------------------------------------------------------------*/
  1724.     /* Code Body                                                      */
  1725.     /*----------------------------------------------------------------*/
  1726.     m->width = width;
  1727.     m->height = height;
  1728.     m->flags = 0;
  1729.     m->ext_flags = 0;
  1730.     m->icon_transparent_color = gui_transparent_color(0, 0, 0);
  1731.     gui_set_fixed_icontext_menuitem_current_theme(m);
  1732.     m->text_x = 0;
  1733.     m->text_y = 0;
  1734. #ifdef __MMI_UI_DALMATIAN_FIXEDLIST__
  1735.     m->icon_x = 2;  /* To display gap of icon from left side border */
  1736. #else 
  1737.     m->icon_x = 0;
  1738. #endif 
  1739.     m->icon_y = 0;
  1740.     m->scroll_x = 0;
  1741.     m->scroll_width = width;
  1742.     m->parent_list = NULL;
  1743.     m->parent_matrix = NULL;    
  1744. }
  1745. /*****************************************************************************
  1746.  * FUNCTION
  1747.  *  gui_fixed_icontext_menuitem_set_text_position
  1748.  * DESCRIPTION
  1749.  *  Sets the text position within a fixed icontext menuitem
  1750.  * PARAMETERS
  1751.  *  m       [IN]        Is the fixed icontext menuitem object  (common data)
  1752.  *  x       [IN]        Is the position of the text (offset from the left-top corner of the menuitem)
  1753.  *  y       [IN]        Is the position of the text (offset from the left-top corner of the menuitem)
  1754.  * RETURNS
  1755.  *  void
  1756.  *****************************************************************************/
  1757. void gui_fixed_icontext_menuitem_set_text_position(fixed_icontext_menuitem *m, S32 x, S32 y)
  1758. {
  1759.     /*----------------------------------------------------------------*/
  1760.     /* Local Variables                                                */
  1761.     /*----------------------------------------------------------------*/
  1762.     /*----------------------------------------------------------------*/
  1763.     /* Code Body                                                      */
  1764.     /*----------------------------------------------------------------*/
  1765.     m->text_x = x;
  1766.     m->text_y = y;
  1767.     if (m->icon_x > m->text_x)
  1768.     {
  1769.         m->scroll_width = m->icon_x - m->text_x;
  1770.     }
  1771.     else
  1772.     {
  1773.         m->scroll_width = m->width - m->text_x;
  1774.     }
  1775. }
  1776. /*****************************************************************************
  1777.  * FUNCTION
  1778.  *  gui_fixed_icontext_menuitem_set_icon_position
  1779.  * DESCRIPTION
  1780.  *  Sets the icon position within a fixed icontext menuitem
  1781.  * PARAMETERS
  1782.  *  m       [IN]        Is the fixed icontext menuitem object  (common data)
  1783.  *  x       [IN]        Is the position of the icon (offset from the left-top corner of the menuitem)
  1784.  *  y       [IN]        Is the position of the icon (offset from the left-top corner of the menuitem)
  1785.  * RETURNS
  1786.  *  void
  1787.  *****************************************************************************/
  1788. void gui_fixed_icontext_menuitem_set_icon_position(fixed_icontext_menuitem *m, S32 x, S32 y)
  1789. {
  1790.     /*----------------------------------------------------------------*/
  1791.     /* Local Variables                                                */
  1792.     /*----------------------------------------------------------------*/
  1793.     /*----------------------------------------------------------------*/
  1794.     /* Code Body                                                      */
  1795.     /*----------------------------------------------------------------*/
  1796.     m->icon_x = x;
  1797.     m->icon_x = y;
  1798.     if (m->icon_x > m->text_x)
  1799.     {
  1800.         m->scroll_width = m->icon_x - m->text_x;
  1801.     }
  1802.     else
  1803.     {
  1804.         m->scroll_width = m->width - m->text_x;
  1805.     }
  1806. }
  1807. /*****************************************************************************
  1808.  * FUNCTION
  1809.  *  gui_resize_fixed_icontext_menuitem
  1810.  * DESCRIPTION
  1811.  *  Changes the size of a fixed icontext menuitem
  1812.  * PARAMETERS
  1813.  *  m           [IN]        Is the fixed icontext menuitem object  (common data)
  1814.  *  width       [IN]        Is the new width
  1815.  *  height      [IN]        Is the new height
  1816.  * RETURNS
  1817.  *  void
  1818.  *****************************************************************************/
  1819. void gui_resize_fixed_icontext_menuitem(fixed_icontext_menuitem *m, S32 width, S32 height)
  1820. {
  1821.     /*----------------------------------------------------------------*/
  1822.     /* Local Variables                                                */
  1823.     /*----------------------------------------------------------------*/
  1824.     /*----------------------------------------------------------------*/
  1825.     /* Code Body                                                      */
  1826.     /*----------------------------------------------------------------*/
  1827.     m->width = width;
  1828.     m->height = height;
  1829.     if (m->icon_x > m->text_x)
  1830.     {
  1831.         m->scroll_width = m->icon_x - m->text_x;
  1832.     }
  1833.     /* PMT VIKAS START 20051202 */
  1834. #ifdef __MMI_UI_DALMATIAN_FIXEDLIST__
  1835.     else
  1836.     {
  1837.         m->scroll_width = m->width - (m->text_x + TEXT_ICON_GAP);       /* As TEXT_ICON_GAP is add in text x to start show text */
  1838.     }
  1839. #else /* __MMI_UI_DALMATIAN_FIXEDLIST__ */ 
  1840.     else
  1841.     {
  1842.         m->scroll_width = m->width - m->text_x;
  1843.     }
  1844. #endif /* __MMI_UI_DALMATIAN_FIXEDLIST__ */ 
  1845.     /* PMT VIKAS END 20051202 */
  1846. }
  1847. /* Text scrolling related functions within the menu item */
  1848. fixed_icontext_menuitem *GUI_current_fixed_icontext_menuitem_common_data = NULL;
  1849. fixed_icontext_menuitem_type *GUI_current_fixed_icontext_menuitem_data = NULL;
  1850. U8 GUI_current_fixed_icontext_menuitem_scroll = 0;
  1851. U8 GUI_current_fixed_icontext_menuitem_scroll_direction;
  1852. S32 GUI_current_fixed_icontext_menuitem_x;
  1853. S32 GUI_current_fixed_icontext_menuitem_y;
  1854. S32 GUI_current_fixed_icontext_menuitem_scroll_counter = 0;
  1855. UI_string_type GUI_current_fixed_icontext_menuitem_scroll_text = NULL;
  1856. UI_string_type GUI_current_fixed_icontext_menuitem_scroll_text_end = NULL;
  1857. /*****************************************************************************
  1858.  * FUNCTION
  1859.  *  gui_fixed_icontext_menuitem_scroll_handler
  1860.  * DESCRIPTION
  1861.  *  
  1862.  * PARAMETERS
  1863.  *  void
  1864.  * RETURNS
  1865.  *  void
  1866.  *****************************************************************************/
  1867. void gui_fixed_icontext_menuitem_scroll_handler(void)
  1868. {
  1869.     /*----------------------------------------------------------------*/
  1870.     /* Local Variables                                                */
  1871.     /*----------------------------------------------------------------*/
  1872.     U32 flags = GUI_current_fixed_icontext_menuitem_common_data->flags;
  1873.     gdi_handle act_lcd;
  1874.     /*----------------------------------------------------------------*/
  1875.     /* Code Body                                                      */
  1876.     /*----------------------------------------------------------------*/
  1877. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  1878.     gui_reset_current_list_effect();
  1879. #endif 
  1880.     if (!(flags & UI_MENUITEM_MARQUEE_SCROLL) && !(flags & UI_MENUITEM_TWO_DIRECTION_SCROLL))
  1881.     {
  1882.         return;
  1883.     }
  1884.     if (GUI_current_fixed_icontext_menuitem_scroll == 0)
  1885.     {
  1886.         return;
  1887.     }
  1888.     if (GUI_current_fixed_icontext_menuitem_common_data->parent_list)
  1889.     {
  1890.         fixed_list_menu *parent_list = GUI_current_fixed_icontext_menuitem_common_data->parent_list;
  1891.         gdi_lcd_get_active(&act_lcd);
  1892.         gdi_lcd_set_active(parent_list->act_lcd_handle);
  1893.         gdi_layer_push_and_set_active(parent_list->act_layer_handle);
  1894.     }
  1895.     flags |= GUI_current_fixed_icontext_menuitem_data->flags;
  1896.     if (GUI_current_fixed_icontext_menuitem_scroll_counter)
  1897.     {
  1898.         GUI_current_fixed_icontext_menuitem_scroll_counter--;
  1899.     }
  1900.     else
  1901.     {
  1902.     #if(UI_USE_WORD_SCROLLING_TEXT)
  1903.         GUI_current_fixed_icontext_menuitem_scroll_text = GUI_current_fixed_icontext_menuitem_scroll_text_end;
  1904.     #else /* (UI_USE_WORD_SCROLLING_TEXT) */ 
  1905.         if (flags & UI_MENUITEM_MARQUEE_SCROLL)
  1906.         {
  1907.             if (r2lMMIFlag)
  1908.             {
  1909.                 GUI_current_fixed_icontext_menuitem_common_data->scroll_x += UI_text_menuitem_scroll_size;
  1910.                 if (GUI_current_fixed_icontext_menuitem_common_data->scroll_x >=
  1911.                     (GUI_current_fixed_icontext_menuitem_common_data->text_width + UI_text_menuitem_scroll_gap))
  1912.                 {
  1913.                     GUI_current_fixed_icontext_menuitem_common_data->scroll_x = 0;
  1914.                 }
  1915.             }
  1916.             else
  1917.             {
  1918.                 GUI_current_fixed_icontext_menuitem_common_data->scroll_x -= UI_text_menuitem_scroll_size;
  1919.                 if (GUI_current_fixed_icontext_menuitem_common_data->scroll_x <=
  1920.                     (-(GUI_current_fixed_icontext_menuitem_common_data->text_width + UI_text_menuitem_scroll_gap)))
  1921.                 {
  1922.                     GUI_current_fixed_icontext_menuitem_common_data->scroll_x = 0;
  1923.                 }
  1924.             }
  1925.         }
  1926.         else
  1927.         {
  1928.             if (GUI_current_fixed_icontext_menuitem_scroll_direction == 0)
  1929.             {
  1930.                 GUI_current_fixed_icontext_menuitem_common_data->scroll_x -= UI_text_menuitem_scroll_size;
  1931.                 if ((GUI_current_fixed_icontext_menuitem_common_data->scroll_x +
  1932.                      GUI_current_fixed_icontext_menuitem_common_data->text_width) <=
  1933.                     (GUI_current_fixed_icontext_menuitem_common_data->scroll_width))
  1934.                 {
  1935.                     GUI_current_fixed_icontext_menuitem_scroll_direction = 1;
  1936.                     GUI_current_fixed_icontext_menuitem_scroll_counter = UI_text_menuitem_scroll_pause;
  1937.                 }
  1938.             }
  1939.             else if (GUI_current_fixed_icontext_menuitem_scroll_direction == 1)
  1940.             {
  1941.                 GUI_current_fixed_icontext_menuitem_common_data->scroll_x += UI_text_menuitem_scroll_size;
  1942.                 if (GUI_current_fixed_icontext_menuitem_common_data->scroll_x >= 0)
  1943.                 {
  1944.                     GUI_current_fixed_icontext_menuitem_scroll_direction = 0;
  1945.                     GUI_current_fixed_icontext_menuitem_scroll_counter = UI_text_menuitem_scroll_pause;
  1946.                 }
  1947.             }
  1948.         }
  1949.     #endif /* (UI_USE_WORD_SCROLLING_TEXT) */ 
  1950.         GUI_current_fixed_icontext_menuitem_common_data->ext_flags |= UI_MENUITEM_EXT_SHOW_IN_MARQUEE;
  1951.     #ifdef __MMI_UI_TRANSPARENT_EFFECT__
  1952.         if (!gui_is_current_transparency_with_multi_layer())
  1953.         {
  1954.             gui_fixed_icontext_disable_transparent_effect(GUI_current_fixed_icontext_menuitem_common_data);     /* To hide text below scrolling text */
  1955.         }
  1956.     #endif /* __MMI_UI_TRANSPARENT_EFFECT__ */ 
  1957.         gui_show_fixed_icontext_menuitem(
  1958.             (void*)GUI_current_fixed_icontext_menuitem_data,
  1959.             (void*)GUI_current_fixed_icontext_menuitem_common_data,
  1960.             GUI_current_fixed_icontext_menuitem_x,
  1961.             GUI_current_fixed_icontext_menuitem_y);
  1962.     #ifdef __MMI_UI_TRANSPARENT_EFFECT__
  1963.         gui_fixed_icontext_enable_transparent_effect(GUI_current_fixed_icontext_menuitem_common_data);  /* Enable after scrolling text */
  1964.     #endif 
  1965.         GUI_current_fixed_icontext_menuitem_common_data->ext_flags &= ~UI_MENUITEM_EXT_SHOW_IN_MARQUEE;
  1966.     #if defined(__MMI_UI_TWO_LINE_MENUITEM_STYLES__) && defined(__MMI_UI_HINTS_IN_MENUITEM__)
  1967.     #if(UI_DOUBLE_BUFFER_SUPPORT)
  1968.         if (GUI_current_fixed_icontext_menuitem_common_data->ext_flags & UI_MENUITEM_EXT_SHOW_TWO_LINE_SELECT)
  1969.         {
  1970.             gui_BLT_double_buffer(
  1971.                 GUI_current_fixed_icontext_menuitem_x,
  1972.                 GUI_current_fixed_icontext_menuitem_y,
  1973.                 GUI_current_fixed_icontext_menuitem_x + GUI_current_fixed_icontext_menuitem_common_data->width - 1,
  1974.                 GUI_current_fixed_icontext_menuitem_y + (GUI_current_fixed_icontext_menuitem_common_data->height << 1) - 1);
  1975.         }
  1976.         else if ((GUI_current_fixed_icontext_menuitem_common_data->ext_flags & UI_MENUITEM_SHOW_ALL_HINTS ||
  1977.                   ((GUI_current_fixed_icontext_menuitem_data->flags & UI_MENUITEM_STATE_FOCUSSED) &&
  1978.                    (GUI_current_fixed_icontext_menuitem_common_data->ext_flags & UI_MENUITEM_SHOW_HIGHLIGHTED_HINT))) &&
  1979.                  (gui_get_current_pop_up_description_string()))
  1980.         {
  1981.             gui_BLT_double_buffer(
  1982.                 GUI_current_fixed_icontext_menuitem_x,
  1983.                 GUI_current_fixed_icontext_menuitem_y,
  1984.                 GUI_current_fixed_icontext_menuitem_x + GUI_current_fixed_icontext_menuitem_common_data->width - 1,
  1985.                 GUI_current_fixed_icontext_menuitem_y + (GUI_current_fixed_icontext_menuitem_common_data->height << 1) - 1);
  1986.         }
  1987.         else
  1988.         {
  1989.             gui_BLT_double_buffer(
  1990.                 GUI_current_fixed_icontext_menuitem_x,
  1991.                 GUI_current_fixed_icontext_menuitem_y,
  1992.                 GUI_current_fixed_icontext_menuitem_x + GUI_current_fixed_icontext_menuitem_common_data->width - 1,
  1993.                 GUI_current_fixed_icontext_menuitem_y + GUI_current_fixed_icontext_menuitem_common_data->height - 1);
  1994.         }
  1995.     #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  1996.     #else /* defined(__MMI_UI_TWO_LINE_MENUITEM_STYLES__) && defined(__MMI_UI_HINTS_IN_MENUITEM__) */ 
  1997.     #ifdef __MMI_UI_TWO_LINE_MENUITEM_STYLES__
  1998.     #if(UI_DOUBLE_BUFFER_SUPPORT)
  1999.         if (GUI_current_fixed_icontext_menuitem_common_data->ext_flags & UI_MENUITEM_EXT_SHOW_TWO_LINE_SELECT)
  2000.         {
  2001.             gui_BLT_double_buffer(
  2002.                 GUI_current_fixed_icontext_menuitem_x,
  2003.                 GUI_current_fixed_icontext_menuitem_y,
  2004.                 GUI_current_fixed_icontext_menuitem_x + GUI_current_fixed_icontext_menuitem_common_data->width - 1,
  2005.                 GUI_current_fixed_icontext_menuitem_y + (GUI_current_fixed_icontext_menuitem_common_data->height << 1) - 1);
  2006.         }
  2007.         else
  2008.         {
  2009.             gui_BLT_double_buffer(
  2010.                 GUI_current_fixed_icontext_menuitem_x,
  2011.                 GUI_current_fixed_icontext_menuitem_y,
  2012.                 GUI_current_fixed_icontext_menuitem_x + GUI_current_fixed_icontext_menuitem_common_data->width - 1,
  2013.                 GUI_current_fixed_icontext_menuitem_y + GUI_current_fixed_icontext_menuitem_common_data->height - 1);
  2014.         }
  2015.     #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  2016.     #else /* __MMI_UI_TWO_LINE_MENUITEM_STYLES__ */ 
  2017.         //PMT NEERAJ END 20050825
  2018.         //PMT NEERAJ START 20050712
  2019.     #ifdef __MMI_UI_HINTS_IN_MENUITEM__
  2020.     #if(UI_DOUBLE_BUFFER_SUPPORT)
  2021.         if ((GUI_current_fixed_icontext_menuitem_common_data->ext_flags & UI_MENUITEM_SHOW_ALL_HINTS ||
  2022.              ((GUI_current_fixed_icontext_menuitem_data->flags & UI_MENUITEM_STATE_FOCUSSED) &&
  2023.               (GUI_current_fixed_icontext_menuitem_common_data->ext_flags & UI_MENUITEM_SHOW_HIGHLIGHTED_HINT))) &&
  2024.             (gui_get_current_pop_up_description_string()))
  2025.         {
  2026.             gui_BLT_double_buffer(
  2027.                 GUI_current_fixed_icontext_menuitem_x,
  2028.                 GUI_current_fixed_icontext_menuitem_y,
  2029.                 GUI_current_fixed_icontext_menuitem_x + GUI_current_fixed_icontext_menuitem_common_data->width - 1,
  2030.                 GUI_current_fixed_icontext_menuitem_y + (GUI_current_fixed_icontext_menuitem_common_data->height << 1) - 1);
  2031.         }
  2032.         else
  2033.         {
  2034.             gui_BLT_double_buffer(
  2035.                 GUI_current_fixed_icontext_menuitem_x,
  2036.                 GUI_current_fixed_icontext_menuitem_y,
  2037.                 GUI_current_fixed_icontext_menuitem_x + GUI_current_fixed_icontext_menuitem_common_data->width - 1,
  2038.                 GUI_current_fixed_icontext_menuitem_y + GUI_current_fixed_icontext_menuitem_common_data->height - 1);
  2039.         }
  2040.     #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  2041.     #else /* __MMI_UI_HINTS_IN_MENUITEM__ */ 
  2042.         /* PMT NEERAJ END 20050712 */
  2043.     #if(UI_DOUBLE_BUFFER_SUPPORT)
  2044.         gui_BLT_double_buffer(
  2045.             GUI_current_fixed_icontext_menuitem_x,
  2046.             GUI_current_fixed_icontext_menuitem_y,
  2047.             GUI_current_fixed_icontext_menuitem_x + GUI_current_fixed_icontext_menuitem_common_data->width - 1,
  2048.             GUI_current_fixed_icontext_menuitem_y + GUI_current_fixed_icontext_menuitem_common_data->height - 1);
  2049.     #endif /* (UI_DOUBLE_BUFFER_SUPPORT) */ 
  2050.         /* PMT NEERAJ START 20050712 */
  2051.     #endif /* __MMI_UI_HINTS_IN_MENUITEM__ */ 
  2052.         //PMT NEERAJ END 20050712
  2053.         //PMT NEERAJ START 20050825
  2054.     #endif /* __MMI_UI_TWO_LINE_MENUITEM_STYLES__ */ 
  2055.     #endif /* defined(__MMI_UI_TWO_LINE_MENUITEM_STYLES__) && defined(__MMI_UI_HINTS_IN_MENUITEM__) */ 
  2056.     }
  2057.     if (GUI_current_fixed_icontext_menuitem_common_data->parent_list)
  2058.     {
  2059.         gdi_layer_pop_and_restore_active();
  2060.         gdi_lcd_set_active(act_lcd);
  2061.     }
  2062.     
  2063.     gui_start_timer(UI_text_menuitem_scroll_time, gui_fixed_icontext_menuitem_scroll_handler);
  2064. }
  2065. /*****************************************************************************
  2066.  * FUNCTION
  2067.  *  gui_fixed_icontext_menuitem_start_scroll
  2068.  * DESCRIPTION
  2069.  *  
  2070.  * PARAMETERS
  2071.  *  void
  2072.  * RETURNS
  2073.  *  void
  2074.  *****************************************************************************/
  2075. void gui_fixed_icontext_menuitem_start_scroll(void)
  2076. {
  2077.     /*----------------------------------------------------------------*/
  2078.     /* Local Variables                                                */
  2079.     /*----------------------------------------------------------------*/
  2080.     fixed_icontext_menuitem_type *t = (fixed_icontext_menuitem_type*) GUI_current_fixed_icontext_menuitem_data;
  2081.     fixed_icontext_menuitem *m = (fixed_icontext_menuitem*) GUI_current_fixed_icontext_menuitem_common_data;
  2082.     S32 w;
  2083.     U32 flags;
  2084.     /*----------------------------------------------------------------*/
  2085.     /* Code Body                                                      */
  2086.     /*----------------------------------------------------------------*/
  2087.     flags = m->flags;
  2088.     flags |= t->flags;
  2089.     gui_set_font(m->text_font);
  2090.     w = gui_get_string_width(t->item_text);
  2091.     m->text_width = w;
  2092.     m->scroll_x = 0;
  2093.     if (w > (m->scroll_width))
  2094.     {
  2095.     #if(UI_USE_WORD_SCROLLING_TEXT)
  2096.         GUI_current_fixed_icontext_menuitem_scroll_text = t->item_text;
  2097.         GUI_current_fixed_icontext_menuitem_scroll = 1;
  2098.         GUI_current_fixed_icontext_menuitem_scroll_direction = 0;
  2099.         GUI_current_fixed_icontext_menuitem_scroll_counter = UI_text_menuitem_scroll_pause;
  2100.     #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  2101.         if (gui_get_current_list_effect() && gblock_list_effect != 1)
  2102.         {
  2103.             gui_register_callback_menuitem_scroll(gui_fixed_icontext_menuitem_scroll_handler);
  2104.         }
  2105.         else
  2106.     #endif /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  2107.         {
  2108.             gui_start_timer(UI_text_menuitem_scroll_time, gui_fixed_icontext_menuitem_scroll_handler);
  2109.         }
  2110.     #else /* (UI_USE_WORD_SCROLLING_TEXT) */ 
  2111.         if ((flags & UI_MENUITEM_MARQUEE_SCROLL) || (flags & UI_MENUITEM_TWO_DIRECTION_SCROLL))
  2112.         {
  2113.             GUI_current_fixed_icontext_menuitem_scroll = 1;
  2114.             GUI_current_fixed_icontext_menuitem_scroll_direction = 0;
  2115.             GUI_current_fixed_icontext_menuitem_scroll_counter = UI_text_menuitem_scroll_pause;
  2116.         #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  2117.             if (gui_get_current_list_effect() && gblock_list_effect != 1)
  2118.             {
  2119.                 gui_register_callback_menuitem_scroll(gui_fixed_icontext_menuitem_scroll_handler);
  2120.             }
  2121.             else
  2122.         #endif /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  2123.             {
  2124.                 gui_start_timer(UI_text_menuitem_scroll_time, gui_fixed_icontext_menuitem_scroll_handler);
  2125.             }
  2126.         }
  2127.     #endif /* (UI_USE_WORD_SCROLLING_TEXT) */ 
  2128.     }
  2129.     else
  2130. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  2131.     {
  2132.         gui_register_callback_menuitem_scroll(gui_dummy_scroll_handler_for_list_effects);
  2133.         GUI_current_fixed_icontext_menuitem_scroll = 0;
  2134.     }
  2135. #else /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  2136.     {
  2137.         GUI_current_fixed_icontext_menuitem_scroll = 0;
  2138.     }
  2139. #endif /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  2140. }
  2141. /*****************************************************************************
  2142.  * FUNCTION
  2143.  *  gui_fixed_icontext_menuitem_stop_scroll
  2144.  * DESCRIPTION
  2145.  *  
  2146.  * PARAMETERS
  2147.  *  void
  2148.  * RETURNS
  2149.  *  void
  2150.  *****************************************************************************/
  2151. void gui_fixed_icontext_menuitem_stop_scroll(void)
  2152. {
  2153.     /*----------------------------------------------------------------*/
  2154.     /* Local Variables                                                */
  2155.     /*----------------------------------------------------------------*/
  2156.     /*----------------------------------------------------------------*/
  2157.     /* Code Body                                                      */
  2158.     /*----------------------------------------------------------------*/
  2159.     if (GUI_current_fixed_icontext_menuitem_scroll)
  2160.     {
  2161.         gui_cancel_timer(gui_fixed_icontext_menuitem_scroll_handler);
  2162.         GUI_current_fixed_icontext_menuitem_scroll = 0;
  2163.     }
  2164. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  2165.     gui_register_callback_menuitem_scroll(gui_dummy_scroll_handler_for_list_effects);
  2166.     gui_restore_current_list_effect();
  2167. #endif /* __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ */ 
  2168. }
  2169. /* External used to display inline edit menu items */
  2170. void wgui_show_inline_edit_menuitem(S32 x1, S32 y1, S32 width, S32 height);
  2171. /*****************************************************************************
  2172.  * FUNCTION
  2173.  *  print_wrap_string
  2174.  * DESCRIPTION
  2175.  *  Displays the fixed icontext menuitem
  2176.  * PARAMETERS
  2177.  *  s                       [IN]        
  2178.  *  x                       [IN]        Is the position at which the menuitem is displayed
  2179.  *  y                       [IN]        Is the position at which the menuitem is displayed
  2180.  *  number_of_rows          [IN]        
  2181.  *  line_width              [IN]        
  2182.  *  item(?)                 [IN]        Is a specific fixed icontext menuitem object
  2183.  *  common_item_data(?)     [IN]        Is the fixed icontext menuitem object (common_data)
  2184.  * RETURNS
  2185.  *  void
  2186.  *****************************************************************************/
  2187. extern S32 MMI_current_menu_type;
  2188. extern fixed_matrix_menu MMI_fixed_matrix_menu;
  2189. extern gdi_handle animation_handle;
  2190. #ifdef __MMI_BI_DEGREE_MAIN_MENU_STYLE__
  2191. void print_wrap_string(UI_string_type s, S32 x, S32 y, S32 number_of_rows, S32 line_width)
  2192. {
  2193.     /*----------------------------------------------------------------*/
  2194.     /* Local Variables                                                */
  2195.     /*----------------------------------------------------------------*/
  2196.     S32 line_height = 0, current_line_width = 0, char_width = 0, char_height = 0, cursor_pos_x = x, cursor_pos_y = y;
  2197.     U16 char_index = 0;
  2198.     S32 total_rows = 1;
  2199.     S32 es_width = 0, es_height = 0;
  2200.     UI_character_type es[] = { '.', '' };
  2201.     UI_character_type terminal[] = { '' };
  2202.     /*----------------------------------------------------------------*/
  2203.     /* Code Body                                                      */
  2204.     /*----------------------------------------------------------------*/
  2205.     gui_measure_string(es, &es_width, &es_height);
  2206.     if (!s)
  2207.     {
  2208.         return;