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

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.  * wgui_categories.c
  40.  *
  41.  * Project:
  42.  * --------
  43.  *   MAUI
  44.  *
  45.  * Description:
  46.  * ------------
  47.  *   Ordinary categories.
  48.  *
  49.  * Author:
  50.  * -------
  51.  * -------
  52.  *
  53.  *============================================================================
  54.  *             HISTORY
  55.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  56.  *------------------------------------------------------------------------------
  57.  * removed!
  58.  *
  59.  * removed!
  60.  * removed!
  61.  * removed!
  62.  *
  63.  * removed!
  64.  * removed!
  65.  * removed!
  66.  *
  67.  * removed!
  68.  * removed!
  69.  * removed!
  70.  *
  71.  * removed!
  72.  * removed!
  73.  * removed!
  74.  *
  75.  * removed!
  76.  * removed!
  77.  * removed!
  78.  *
  79.  * removed!
  80.  * removed!
  81.  * removed!
  82.  *
  83.  * removed!
  84.  * removed!
  85.  * removed!
  86.  *
  87.  * removed!
  88.  * removed!
  89.  * removed!
  90.  *
  91.  * removed!
  92.  * removed!
  93.  * removed!
  94.  *
  95.  * removed!
  96.  * removed!
  97.  * removed!
  98.  *
  99.  * removed!
  100.  * removed!
  101.  * removed!
  102.  *
  103.  * removed!
  104.  * removed!
  105.  * removed!
  106.  *
  107.  * removed!
  108.  * removed!
  109.  * removed!
  110.  *
  111.  * removed!
  112.  * removed!
  113.  * removed!
  114.  *
  115.  * removed!
  116.  * removed!
  117.  * removed!
  118.  *
  119.  * removed!
  120.  * removed!
  121.  * removed!
  122.  *
  123.  * removed!
  124.  * removed!
  125.  * removed!
  126.  *
  127.  * removed!
  128.  * removed!
  129.  * removed!
  130.  *
  131.  * removed!
  132.  * removed!
  133.  * removed!
  134.  *
  135.  * removed!
  136.  * removed!
  137.  * removed!
  138.  *
  139.  * removed!
  140.  * removed!
  141.  * removed!
  142.  *
  143.  * removed!
  144.  * removed!
  145.  * removed!
  146.  *
  147.  * removed!
  148.  * removed!
  149.  * removed!
  150.  *
  151.  * removed!
  152.  * removed!
  153.  * removed!
  154.  *
  155.  * removed!
  156.  * removed!
  157.  * removed!
  158.  *
  159.  * removed!
  160.  * removed!
  161.  * removed!
  162.  *
  163.  * removed!
  164.  * removed!
  165.  * removed!
  166.  *
  167.  * removed!
  168.  * removed!
  169.  * removed!
  170.  *
  171.  * removed!
  172.  * removed!
  173.  * removed!
  174.  *
  175.  * removed!
  176.  * removed!
  177.  * removed!
  178.  *
  179.  * removed!
  180.  * removed!
  181.  * removed!
  182.  *
  183.  * removed!
  184.  * removed!
  185.  * removed!
  186.  *
  187.  * removed!
  188.  * removed!
  189.  * removed!
  190.  *
  191.  * removed!
  192.  * removed!
  193.  * removed!
  194.  *
  195.  * removed!
  196.  * removed!
  197.  * removed!
  198.  *
  199.  * removed!
  200.  * removed!
  201.  * removed!
  202.  *
  203.  * removed!
  204.  * removed!
  205.  * removed!
  206.  *
  207.  * removed!
  208.  * removed!
  209.  * removed!
  210.  *
  211.  * removed!
  212.  * removed!
  213.  * removed!
  214.  *
  215.  * removed!
  216.  * removed!
  217.  * removed!
  218.  *
  219.  * removed!
  220.  * removed!
  221.  * removed!
  222.  *
  223.  * removed!
  224.  * removed!
  225.  * removed!
  226.  *
  227.  * removed!
  228.  * removed!
  229.  * removed!
  230.  *
  231.  * removed!
  232.  * removed!
  233.  * removed!
  234.  *
  235.  * removed!
  236.  * removed!
  237.  * removed!
  238.  *
  239.  * removed!
  240.  * removed!
  241.  * removed!
  242.  *
  243.  * removed!
  244.  * removed!
  245.  * removed!
  246.  *
  247.  * removed!
  248.  * removed!
  249.  * removed!
  250.  *
  251.  * removed!
  252.  * removed!
  253.  * removed!
  254.  *
  255.  * removed!
  256.  * removed!
  257.  * removed!
  258.  *
  259.  * removed!
  260.  * removed!
  261.  * removed!
  262.  *
  263.  * removed!
  264.  * removed!
  265.  * removed!
  266.  *
  267.  * removed!
  268.  * removed!
  269.  * removed!
  270.  *
  271.  * removed!
  272.  * removed!
  273.  * removed!
  274.  *
  275.  * removed!
  276.  * removed!
  277.  * removed!
  278.  *
  279.  * removed!
  280.  * removed!
  281.  * removed!
  282.  *
  283.  * removed!
  284.  * removed!
  285.  * removed!
  286.  *
  287.  * removed!
  288.  * removed!
  289.  * removed!
  290.  *
  291.  * removed!
  292.  * removed!
  293.  * removed!
  294.  *
  295.  * removed!
  296.  * removed!
  297.  * removed!
  298.  *
  299.  * removed!
  300.  * removed!
  301.  * removed!
  302.  *
  303.  * removed!
  304.  * removed!
  305.  * removed!
  306.  *
  307.  * removed!
  308.  * removed!
  309.  * removed!
  310.  *
  311.  * removed!
  312.  * removed!
  313.  * removed!
  314.  *
  315.  * removed!
  316.  * removed!
  317.  * removed!
  318.  *
  319.  * removed!
  320.  * removed!
  321.  * removed!
  322.  *
  323.  * removed!
  324.  * removed!
  325.  * removed!
  326.  *
  327.  * removed!
  328.  * removed!
  329.  * removed!
  330.  *
  331.  * removed!
  332.  * removed!
  333.  * removed!
  334.  *
  335.  * removed!
  336.  * removed!
  337.  * removed!
  338.  *
  339.  * removed!
  340.  * removed!
  341.  * removed!
  342.  *
  343.  * removed!
  344.  * removed!
  345.  * removed!
  346.  *
  347.  * removed!
  348.  * removed!
  349.  * removed!
  350.  *
  351.  * removed!
  352.  * removed!
  353.  * removed!
  354.  *
  355.  * removed!
  356.  * removed!
  357.  * removed!
  358.  *
  359.  * removed!
  360.  * removed!
  361.  * removed!
  362.  *
  363.  * removed!
  364.  * removed!
  365.  * removed!
  366.  *
  367.  * removed!
  368.  * removed!
  369.  * removed!
  370.  *
  371.  * removed!
  372.  * removed!
  373.  * removed!
  374.  *
  375.  * removed!
  376.  * removed!
  377.  * removed!
  378.  *
  379.  * removed!
  380.  * removed!
  381.  * removed!
  382.  *
  383.  * removed!
  384.  * removed!
  385.  * removed!
  386.  *
  387.  * removed!
  388.  * removed!
  389.  * removed!
  390.  *
  391.  * removed!
  392.  * removed!
  393.  * removed!
  394.  *
  395.  * removed!
  396.  * removed!
  397.  * removed!
  398.  *
  399.  * removed!
  400.  * removed!
  401.  * removed!
  402.  *
  403.  * removed!
  404.  * removed!
  405.  * removed!
  406.  *
  407.  * removed!
  408.  * removed!
  409.  * removed!
  410.  *
  411.  * removed!
  412.  * removed!
  413.  * removed!
  414.  *
  415.  * removed!
  416.  * removed!
  417.  * removed!
  418.  *
  419.  * removed!
  420.  * removed!
  421.  * removed!
  422.  *
  423.  * removed!
  424.  * removed!
  425.  * removed!
  426.  *
  427.  * removed!
  428.  * removed!
  429.  * removed!
  430.  *
  431.  * removed!
  432.  * removed!
  433.  * removed!
  434.  *
  435.  * removed!
  436.  * removed!
  437.  * removed!
  438.  *
  439.  * removed!
  440.  * removed!
  441.  * removed!
  442.  *
  443.  * removed!
  444.  * removed!
  445.  * removed!
  446.  *
  447.  * removed!
  448.  * removed!
  449.  * removed!
  450.  *
  451.  * removed!
  452.  * removed!
  453.  * removed!
  454.  *
  455.  * removed!
  456.  * removed!
  457.  * removed!
  458.  *
  459.  * removed!
  460.  * removed!
  461.  * removed!
  462.  *
  463.  * removed!
  464.  * removed!
  465.  * removed!
  466.  *
  467.  * removed!
  468.  * removed!
  469.  * removed!
  470.  *
  471.  * removed!
  472.  * removed!
  473.  * removed!
  474.  *
  475.  * removed!
  476.  * removed!
  477.  * removed!
  478.  *
  479.  * removed!
  480.  * removed!
  481.  * removed!
  482.  *
  483.  * removed!
  484.  * removed!
  485.  * removed!
  486.  *
  487.  * removed!
  488.  * removed!
  489.  * removed!
  490.  *
  491.  * removed!
  492.  * removed!
  493.  * removed!
  494.  *
  495.  * removed!
  496.  * removed!
  497.  * removed!
  498.  *
  499.  * removed!
  500.  * removed!
  501.  * removed!
  502.  *
  503.  * removed!
  504.  * removed!
  505.  * removed!
  506.  *
  507.  * removed!
  508.  * removed!
  509.  * removed!
  510.  *
  511.  * removed!
  512.  * removed!
  513.  * removed!
  514.  *
  515.  * removed!
  516.  * removed!
  517.  * removed!
  518.  *
  519.  * removed!
  520.  * removed!
  521.  * removed!
  522.  *
  523.  * removed!
  524.  * removed!
  525.  * removed!
  526.  *
  527.  * removed!
  528.  * removed!
  529.  * removed!
  530.  *
  531.  * removed!
  532.  * removed!
  533.  * removed!
  534.  *
  535.  * removed!
  536.  * removed!
  537.  * removed!
  538.  *
  539.  * removed!
  540.  * removed!
  541.  * removed!
  542.  *
  543.  * removed!
  544.  * removed!
  545.  * removed!
  546.  *
  547.  * removed!
  548.  * removed!
  549.  * removed!
  550.  *
  551.  * removed!
  552.  * removed!
  553.  * removed!
  554.  *
  555.  * removed!
  556.  * removed!
  557.  * removed!
  558.  *
  559.  * removed!
  560.  * removed!
  561.  * removed!
  562.  *
  563.  * removed!
  564.  * removed!
  565.  * removed!
  566.  *
  567.  * removed!
  568.  * removed!
  569.  * removed!
  570.  *
  571.  * removed!
  572.  * removed!
  573.  * removed!
  574.  *
  575.  * removed!
  576.  * removed!
  577.  * removed!
  578.  *
  579.  * removed!
  580.  * removed!
  581.  * removed!
  582.  *
  583.  * removed!
  584.  * removed!
  585.  * removed!
  586.  *
  587.  * removed!
  588.  * removed!
  589.  * removed!
  590.  *
  591.  * removed!
  592.  * removed!
  593.  * removed!
  594.  *
  595.  * removed!
  596.  * removed!
  597.  * removed!
  598.  *
  599.  * removed!
  600.  * removed!
  601.  * removed!
  602.  *
  603.  * removed!
  604.  * removed!
  605.  * removed!
  606.  *
  607.  * removed!
  608.  * removed!
  609.  * removed!
  610.  *
  611.  * removed!
  612.  * removed!
  613.  * removed!
  614.  *
  615.  * removed!
  616.  * removed!
  617.  * removed!
  618.  *
  619.  * removed!
  620.  * removed!
  621.  * removed!
  622.  *
  623.  * removed!
  624.  * removed!
  625.  * removed!
  626.  *
  627.  * removed!
  628.  * removed!
  629.  * removed!
  630.  *
  631.  * removed!
  632.  * removed!
  633.  * removed!
  634.  *
  635.  * removed!
  636.  * removed!
  637.  * removed!
  638.  *
  639.  * removed!
  640.  * removed!
  641.  * removed!
  642.  *
  643.  * removed!
  644.  * removed!
  645.  * removed!
  646.  *
  647.  * removed!
  648.  * removed!
  649.  * removed!
  650.  *
  651.  * removed!
  652.  * removed!
  653.  * removed!
  654.  *
  655.  * removed!
  656.  * removed!
  657.  * removed!
  658.  *
  659.  * removed!
  660.  * removed!
  661.  * removed!
  662.  *
  663.  * removed!
  664.  * removed!
  665.  * removed!
  666.  *
  667.  * removed!
  668.  * removed!
  669.  * removed!
  670.  *
  671.  * removed!
  672.  * removed!
  673.  * removed!
  674.  *
  675.  * removed!
  676.  * removed!
  677.  * removed!
  678.  *
  679.  * removed!
  680.  * removed!
  681.  * removed!
  682.  *
  683.  * removed!
  684.  * removed!
  685.  * removed!
  686.  *
  687.  * removed!
  688.  * removed!
  689.  * removed!
  690.  *
  691.  * removed!
  692.  * removed!
  693.  * removed!
  694.  *
  695.  * removed!
  696.  * removed!
  697.  * removed!
  698.  *
  699.  * removed!
  700.  * removed!
  701.  * removed!
  702.  *
  703.  * removed!
  704.  * removed!
  705.  * removed!
  706.  *
  707.  * removed!
  708.  * removed!
  709.  * removed!
  710.  *
  711.  * removed!
  712.  * removed!
  713.  * removed!
  714.  *
  715.  * removed!
  716.  * removed!
  717.  * removed!
  718.  *
  719.  * removed!
  720.  * removed!
  721.  * removed!
  722.  *
  723.  * removed!
  724.  * removed!
  725.  * removed!
  726.  *
  727.  * removed!
  728.  * removed!
  729.  * removed!
  730.  *
  731.  * removed!
  732.  * removed!
  733.  * removed!
  734.  *
  735.  * removed!
  736.  * removed!
  737.  * removed!
  738.  *
  739.  * removed!
  740.  * removed!
  741.  * removed!
  742.  *
  743.  * removed!
  744.  * removed!
  745.  * removed!
  746.  *
  747.  * removed!
  748.  * removed!
  749.  * removed!
  750.  *
  751.  * removed!
  752.  * removed!
  753.  * removed!
  754.  *
  755.  * removed!
  756.  * removed!
  757.  * removed!
  758.  *
  759.  * removed!
  760.  * removed!
  761.  * removed!
  762.  *
  763.  * removed!
  764.  * removed!
  765.  * removed!
  766.  *
  767.  * removed!
  768.  * removed!
  769.  * removed!
  770.  *
  771.  * removed!
  772.  * removed!
  773.  * removed!
  774.  *
  775.  * removed!
  776.  * removed!
  777.  * removed!
  778.  *
  779.  *------------------------------------------------------------------------------
  780.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  781.  *============================================================================
  782.  ****************************************************************************/
  783. /**
  784.  * Copyright Notice
  785.  * (c) 2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
  786.  * Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
  787.  *  (It is illegal to remove this copyright notice from this software or any
  788.  *  portion of it)
  789.  */
  790. /**********************************************************************************
  791.    Filename:      wgui_categories.c
  792.    Author:        manju, Vandana Mehtani, Vandana Dhawan
  793.    Date Created:  August-07-2002
  794.    Contains:      PixTel UI wrapper routines
  795.                High Level Category screen wrappers.
  796. **********************************************************************************/
  797. #include "MMI_features.h"
  798. #include "stdC.h"
  799. #include "L4Dr1.h"
  800. #include "PixtelDataTypes.h"
  801. #include "GlobalDefs.h"
  802. #include "EventsGprot.h"
  803. #include "CustDataProts.h"
  804. #include "CustMenuRes.h"
  805. #include "HistoryGprot.h"
  806. #include "FrameworkStruct.h"
  807. #include "TimerEvents.h"
  808. #include "EventsDef.h"
  809. #include "Unicodexdcl.h"
  810. #include "gui_setting.h"
  811. #include "gui_themes.h"
  812. #include "wgui.h"
  813. #include "wgui_softkeys.h"
  814. #include "wgui_menu_shortcuts.h"
  815. #include "wgui_fixed_menus.h"
  816. #include "wgui_fixed_menuitems.h"
  817. #include "wgui_inputs.h"
  818. #include "wgui_status_icons.h"
  819. #include "wgui_datetime.h"
  820. #include "wgui_categories_defs.h"
  821. #include "wgui_categories_idlescreen.h"
  822. #include "wgui_categories_inputs.h"
  823. #include "wgui_categories_MM.h"
  824. #include "wgui_categories_sublcd.h"
  825. #include "wgui_categories_util.h"
  826. #include "wgui_dynamic_menus.h"
  827. #include "wgui_dynamic_menuitems.h"
  828. #include "wgui_asyncdynamic_menus.h"
  829. #include "wgui_asyncdynamic_menuitems.h"
  830. #include "wgui_draw_manager.h"
  831. #include "IdleAppDef.h"
  832. #include "IdleAppProt.h"
  833. #include "WallpaperDefs.h"
  834. #include "ScreenSaverDefs.h"
  835. #include "DebugInitDef.h"
  836. #include "MainMenuDef.h"
  837. #include "gdi_include.h"        /* include for graphic lib */
  838. #include "SettingGProts.h"
  839. #include "ShortcutsDefs.h"
  840. #include "SimDetectionGexdcl.h"
  841. #include "PhoneBookTypes.h"
  842. #include "wgui_draw_manager.h"  /* Add for Draw Manager */
  843. #include "wgui_touch_screen.h"  /* for touch screen apis */
  844. #include "wgui_categories_util.h"       /* 032305 Calvin added */
  845. #ifdef __MMI_UI_TAB_PANE__
  846. #include "wgui_tab.h"
  847. #endif 
  848. #ifdef __MMI_AUDIO_PLAYER__
  849. /* dependent headers for AudioPlayerXXX.h" */
  850. #include "gui_data_types.h"
  851. #include "FrameworkStruct.h"
  852. #include "GlobalConstants.h"
  853. #include "mdi_datatype.h"
  854. #include "kal_release.h"
  855. #include "Conversions.h"
  856. #include "FileMgr.h"
  857. #include "AudioPlayerDef.h"
  858. #include "AudioPlayerType.h"
  859. #include "AudioPlayerProt.h"
  860. #include "AudioPlayerMainScreen.h"
  861. #endif /* __MMI_AUDIO_PLAYER__ */ 
  862. /* MTK Elvis for R2L characters */
  863. #include "BIDIDEF.h"
  864. #include "BIDIProt.h"
  865. #include "UCS2Prot.h"
  866. /* MTK end */
  867. #if defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)
  868. #include "SmsGuiInterfaceType.h"
  869. #include "wgui_categories_util.h"
  870. #endif /* defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__) */ 
  871. #if defined(__MMI_TOUCH_SCREEN__)
  872. #include "EditorPen.h"
  873. #include "wgui_virtual_keyboard.h"
  874. #endif /* defined(__MMI_TOUCH_SCREEN__) */ 
  875. #ifdef __MMI_EDITABLE_AUDIO_EQUALIZER__
  876. #ifdef __MMI_TOUCH_SCREEN__
  877. #include "TouchScreenGprot.h"
  878. #endif 
  879. #include "SoundEffect.h"
  880. #endif /* __MMI_EDITABLE_AUDIO_EQUALIZER__ */ 
  881. /* PMT HIMANSHU START 20050729 */
  882. #if defined(__MMI_TOUCH_SCREEN__) && defined(__MMI_WALLPAPER_ON_BOTTOM__)
  883. #include "VolumeHandler.h"
  884. #endif 
  885. /* PMT HIMANSHU END 20050729 */
  886. #if (defined(__MTK_TARGET__) && !defined(__MAUI_BASIC__) && !defined(__L1_STANDALONE__) && !defined(EMPTY_MMI))
  887. #include "bmt.h"
  888. #include "pwic.h"
  889. extern kal_bool custom_cfg_gpio_set_level(kal_uint8 gpio_dev_type, kal_uint8 gpio_dev_level);
  890. extern void setup_UI_wrappers(void);
  891. #endif /* (defined(__MTK_TARGET__) && !defined(__MAUI_BASIC__) && !defined(__L1_STANDALONE__) && !defined(EMPTY_MMI)) */ 
  892. #define MMI_CAT401_X_OFFSET   17
  893. #ifdef __MMI_UI_TAB_PANE__
  894. extern struct_tab_control MMI_tab_control;
  895. #endif
  896. /* for NFB progress bar images */
  897. extern U8 *nfb_progress_images[];
  898. #ifdef __MMI_BIDI_ALG__
  899. extern U8 visual_str[];
  900. #endif 
  901. extern BOOL r2lMMIFlag;
  902. /* image store the image data of left arrow key */
  903. extern U8 inline_select_left_arrow_image[];
  904. /* image store the image data of right arrow key */
  905. extern U8 inline_select_right_arrow_image[];
  906. extern U8 matrix_main_menu_highlight_bitmap_data[];
  907. extern S32 GUI_current_fixed_icontext_list_menuitem_column;
  908. extern U16 StopMyTimer(U16 nTimerId);
  909. extern U16 StartMyTimerInt(U16 nTimerId, U32 nTimeDuration, oslTimerFuncPtr TimerExpiry, U8 alignment);
  910. /* Externals for graphics context switching  */
  911. extern bitmap main_LCD_device_bitmap;
  912. extern bitmap sub_LCD_device_bitmap;
  913. extern bitmap *current_LCD_device_bitmap;
  914. /* store Main lcd width */
  915. extern S32 MAIN_LCD_device_width;
  916. /* store Main LCD height */
  917. extern S32 MAIN_LCD_device_height;
  918. extern BOOL dynamic_item_text_align_left;
  919. extern FuncPtr gExitFullScreenCallBack;
  920. void UI_set_main_LCD_graphics_context(void);
  921. void UI_set_sub_LCD_graphics_context(void);
  922. extern pBOOL GetShowAOC(void);
  923. extern S32 UI_get_font_height(UI_font_type f);
  924. extern void mtk_show_animation(S32 x, S32 y, U8 *image);
  925. extern void mtk_show_animation_frames(S32 x, S32 y, U8 *image, S32 start_frame);
  926. extern void UI_draw_horizontal_line(S32 x1, S32 x2, S32 y, color c);
  927. extern void UI_putpixel(S32 x, S32 y, color c);
  928. extern void UI_draw_vertical_line(S32 y1, S32 y2, S32 x, color c);
  929. extern void wgui_setup_singleline_inputbox(
  930.                 S32 x,
  931.                 S32 y,
  932.                 S32 width,
  933.                 S32 height,
  934.                 U8 *buffer,
  935.                 S32 buffer_size,
  936.                 U16 category_screen_ID,
  937.                 UI_string_type RSK_label,
  938.                 PU8 RSK_icon,
  939.                 U16 input_type,
  940.                 U8 *history_buffer,
  941.                 U8 information_bar_flag);
  942. extern void wgui_close_singleline_inputbox(void);
  943. extern void get_singleline_inputbox_category_history(U16 history_ID, U8 *history_buffer, S16 input_type);
  944. extern void move_slide_control_value(slide_control *s, S32 x, S32 y);
  945. extern void (*ExitCategoryFunction) (void);
  946. #ifdef __MMI_UI_LIST_TRANSITION__
  947. extern void set_list_transition(wgui_transition_styles style);
  948. extern wgui_transition_styles get_list_transition(void);
  949. extern void reset_list_transition(void);
  950. #endif /* __MMI_UI_LIST_TRANSITION__ */ 
  951. extern void dm_set_scr_bg_image_no_draw(U16 image_id, S8 *file_name, S32 x, S32 y, U8 opacity);
  952. #ifdef __MMI_T9__
  953. #include "T9Main.h"     /* T9SynT9WithInputBox() */
  954. extern void InuptMethodEnterCategory5(void);
  955. #elif defined __MMI_ZI__
  956. extern void ZiInuptMethodEnterCategory5(void);
  957. //KP Jerry add on 2007-4-17 start
  958. #elif defined __MMI_CSTAR__
  959. extern void CstarInputMethodEnterCategory5(void);
  960. //KP Jerry add on 2007-4-17 end
  961. #elif defined __MMI_KA__
  962. extern void KonkaInuptMethodEnterCategory5(void);
  963. #elif defined __MMI_ITAP__
  964. /* under construction !*/
  965. #endif 
  966. U8 category89_string_list[MAX_CATEGORY89_STRINGS][MAX_CATEGORY89_STRING_LENGTH];
  967. #ifdef __MMI_CALORIE__
  968. /* under construction !*/
  969. /* under construction !*/
  970. /* under construction !*/
  971. /* under construction !*/
  972. /* under construction !*/
  973. /* under construction !*/
  974. /* under construction !*/
  975. /* under construction !*/
  976. /* under construction !*/
  977. /* under construction !*/
  978. /* under construction !*/
  979. /* under construction !*/
  980. /* under construction !*/
  981. /* under construction !*/
  982. #endif /* __MMI_CALORIE__ */ 
  983. /* Store current menu type..matrix,list,circular */
  984. S32 MMI_current_menu_type = MATRIX_MENU;
  985. S32 volume_level_UI;
  986. #ifdef __MMI_IDLE_FULL_SCREEN__
  987. U16 on_idle_screen = 0;
  988. #endif 
  989. U8 Category154Align = 0;
  990. U8 cat9_show_message = 0;
  991. /* a flagused to check if text dispaly in category125 is scrolling or not */
  992. U8 flag_scroll = FALSE;
  993. /* used by category125 to display valeu in dispaly valeu bar beliow title bar */
  994. U8 *disp_valuestr = NULL;
  995. /* used by categopry 125 */
  996. U8 *disp_barstr = NULL, *left_value = NULL, *right_value = NULL;
  997. S16 status_icon = 0;
  998. /* global variable store the image height,width ,and no_of_pixtel */
  999. S32 no_of_pixel = 0;
  1000. /* store category142 image list */
  1001. U16 *category_142_image_list = NULL;
  1002. /* store the category142 image list inex */
  1003. U8 **category_142_image_file_name_list = NULL;
  1004. /* store the category142 image filename list inex */
  1005. S32 *category_142_image_list_index = NULL;
  1006. /* store number of items of category 142 */
  1007. S32 category_142_image_list_n_items = 0;
  1008. /* vertical scroll bar of category 142 */
  1009. vertical_scrollbar category142_vbar;
  1010. /* list of titles of category 142 */
  1011. U8 **category_142_list_of_titles = NULL;
  1012. #ifdef __MMI_EDITABLE_AUDIO_EQUALIZER__
  1013. equalizer_setting_info g_audio_equalizer_current_setting_info;  /* to store the values of currently accessed equal8izer setting */
  1014. float one_pixel_represents; /* one pixel in each equalizer bar represents what value.... */
  1015. float temp_float_var;
  1016. extern void mmi_settings_audio_equalizer_change_sound_level(S16 change);
  1017. extern U16 g_audio_equalizer_bar_start_x, g_audio_equalizer_bar_start_y;
  1018. extern U16 g_audio_equalizer_bar_width, g_audio_equalizer_bar_height, g_audio_equalizer_dist_btw_bars;
  1019. extern U16 g_audio_equalizer_scrollable_ht, g_audio_equalizer_unit_scroll;
  1020. #endif /* __MMI_EDITABLE_AUDIO_EQUALIZER__ */ 
  1021. /* category 154 message 1 y postition */
  1022. S32 category_154_message1_y = 0;
  1023. /* category 154 message 2 y position  */
  1024. S32 category_154_message2_y = 0;
  1025. scrolling_text scroll_text_cat125;
  1026. UI_string_type category155_slide_string = NULL;
  1027. #if defined (__MMI_WALLPAPER_ON_BOTTOM__)
  1028. static MMI_ID_TYPE idle_scr_bg_ID;
  1029. static S8 *idle_scr_bg_filename;
  1030. static S32 idle_scr_bg_x, idle_scr_bg_y;
  1031. static U8 idle_scr_bg_opacity;
  1032. static S32 idle_scr_bg_flags;//082906 scr_bg
  1033. #endif /* defined (__MMI_WALLPAPER_ON_BOTTOM__) */ 
  1034. extern U16 title_bg_id;
  1035. U16 Cat402PercentageBarId = 0;
  1036. /* Start of Common List Category Screen   */
  1037. extern PU8 subMenuDataPtrs[MAX_SUB_MENUS];
  1038. #ifdef __J2ME__
  1039. extern gdi_handle jui_layer_handle;
  1040. extern void ExitCategory176Screen(void);
  1041. #endif
  1042. /* 061306 dummy category Start */
  1043. U32 status_bar_flag[MAX_STATUS_ICON_BARS];
  1044. /*****************************************************************************
  1045.  * FUNCTION
  1046.  *  ExitCategoryDummyScreen
  1047.  * DESCRIPTION
  1048.  *  Exits the dummy category screen
  1049.  * PARAMETERS
  1050.  *  void
  1051.  * RETURNS
  1052.  *  void
  1053.  *****************************************************************************/
  1054. void ExitCategoryDummyScreen(void)
  1055. {
  1056.     /*----------------------------------------------------------------*/
  1057.     /* Local Variables                                                */
  1058.     /*----------------------------------------------------------------*/
  1059.     /*----------------------------------------------------------------*/
  1060.     /* Code Body                                                      */
  1061.     /*----------------------------------------------------------------*/
  1062.     set_status_icon_bar_type(0, status_bar_flag[0]);
  1063.     set_status_icon_bar_type(1, status_bar_flag[1]);
  1064. }   /* end of ExitCategoryDummyScreen */
  1065. /*****************************************************************************
  1066.  * FUNCTION
  1067.  *  ShowCategoryDummyScreen
  1068.  * DESCRIPTION
  1069.  *  Set some global settings for category without drawing anything on the screen
  1070.  * PARAMETERS
  1071.  *  
  1072.  * RETURNS
  1073.  *  
  1074.  *****************************************************************************/
  1075. void ShowCategoryDummyScreen(void)
  1076. {
  1077.     /*----------------------------------------------------------------*/
  1078.     /* Local Variables                                                */
  1079.     /*----------------------------------------------------------------*/
  1080.     /*----------------------------------------------------------------*/
  1081.     /* Code Body                                                      */
  1082.     /*----------------------------------------------------------------*/
  1083.     status_bar_flag[0] = get_status_icon_bar_type(0);
  1084.     hide_status_icon_bar(0);
  1085.     status_bar_flag[1] = get_status_icon_bar_type(1);
  1086.     hide_status_icon_bar(1);
  1087.     ExitCategoryFunction = ExitCategoryDummyScreen;
  1088.     RedrawCategoryFunction = dm_redraw_category_screen;
  1089.     GetCategoryHistory = dummy_get_history;
  1090.     GetCategoryHistorySize = dummy_get_history_size;
  1091. }   /* end of ShowCategoryDummyScreen */
  1092. /* 061306 dummy category End */
  1093. /*****************************************************************************
  1094.  * FUNCTION
  1095.  *  RedrawListCategoryScreen
  1096.  * DESCRIPTION
  1097.  *  Redraw category function of current main lcd category scrren using list menu
  1098.  * PARAMETERS
  1099.  *  void
  1100.  * RETURNS
  1101.  *  void
  1102.  *****************************************************************************/
  1103. void RedrawListCategoryScreen(void)
  1104. {
  1105.     /*----------------------------------------------------------------*/
  1106.     /* Local Variables                                                */
  1107.     /*----------------------------------------------------------------*/
  1108.     /*----------------------------------------------------------------*/
  1109.     /* Code Body                                                      */
  1110.     /*----------------------------------------------------------------*/
  1111. #ifdef __MMI_UI_TITLE_TRANSITION__
  1112.     S32 no_transition_in_title = 0;
  1113.     {
  1114.     #ifdef __MMI_UI_TAB_PANE__
  1115.         if (is_enabled_tab_pane())
  1116.         {
  1117.             tab_pane_modify_data();
  1118.         }
  1119.     #endif /* __MMI_UI_TAB_PANE__ */ 
  1120.         if ((gOnFullScreen & MMI_IN_FULL_SCREEN || gOnFullScreen & MMI_LEAVE_FULL_SCREEN) &&
  1121.             !(gOnFullScreen & MMI_LEAVE_FULL_IDLE_SCREEN))
  1122.         {
  1123.             no_transition_in_title = 1;
  1124.         }
  1125.         if (get_title_transition() != WGUI_TRANSITION_NONE && !no_transition_in_title)
  1126.         {
  1127.             draw_title();
  1128.         }
  1129.     }
  1130. #else /* __MMI_UI_TITLE_TRANSITION__ */ 
  1131. #ifdef __MMI_UI_TAB_PANE__
  1132.     if (is_enabled_tab_pane())
  1133.     {
  1134.         tab_pane_modify_data();
  1135.     }
  1136. #endif /* __MMI_UI_TAB_PANE__ */ 
  1137. #endif /* __MMI_UI_TITLE_TRANSITION__ */ 
  1138. #ifdef __MMI_UI_LIST_TRANSITION__
  1139.     if (get_list_transition() == WGUI_TRANSITION_T2D)
  1140.     {
  1141.         draw_title();
  1142.         show_fixed_list();
  1143.     }
  1144. #endif /* __MMI_UI_LIST_TRANSITION__ */ 
  1145.     gdi_layer_lock_frame_buffer();
  1146. #if(UI_ENABLE_POP_UP_DESCRIPTIONS)
  1147.     gui_pop_up_description_stop_scroll();
  1148. #endif 
  1149. #ifdef __MMI_WGUI_MINI_TAB_BAR__
  1150.     if (wgui_if_mini_tab_bar_enable() == MMI_TRUE)
  1151.     {
  1152.         move_fixed_list(MMI_fixed_list_menu.x, MMI_content_y + 5);
  1153.         resize_fixed_list(MMI_fixed_list_menu.width, MMI_fixed_list_menu.height - 5);
  1154.         wgui_show_mini_tab_bar();
  1155.     }
  1156. #endif /* __MMI_WGUI_MINI_TAB_BAR__ */ 
  1157.     clear_buttonbar();
  1158.     show_title_status_icon();
  1159. #ifdef __MMI_UI_TITLE_TRANSITION__
  1160.     if (no_transition_in_title || get_title_transition() == WGUI_TRANSITION_NONE)
  1161. #endif 
  1162.         //PMT VIKAS START 20051209
  1163.         //For transition, title function call should be from here 
  1164.         draw_title();
  1165.     /* PMT VIKAS END 20051209 */
  1166. #ifdef __MMI_UI_LIST_TRANSITION__
  1167.     if (get_list_transition() == WGUI_TRANSITION_NONE)
  1168. #endif 
  1169.         show_fixed_list();
  1170.     show_softkey_background();
  1171.     show_left_softkey();
  1172.     show_right_softkey();
  1173. #ifdef __MMI_UI_TAB_PANE__
  1174.     if (is_enabled_tab_pane())
  1175.     {
  1176.         show_tab_pane();
  1177.     }
  1178. #endif /* __MMI_UI_TAB_PANE__ */ 
  1179.     gdi_layer_unlock_frame_buffer();
  1180. #ifdef __MMI_UI_LIST_TRANSITION__
  1181.     if (get_list_transition() == WGUI_TRANSITION_D2T)
  1182.     {
  1183.         show_fixed_list();
  1184.     }
  1185. #endif /* __MMI_UI_LIST_TRANSITION__ */ 
  1186.     /* PMT VIKAS START 20051209 */
  1187. #if defined(__MMI_UI_LIST_TRANSITION__) && (LIST_TRANSITION_STYLE_NON_BLOCKING == 1)
  1188.     if (get_list_transition() == WGUI_TRANSITION_T2D && is_in_nonblocking_list_transition() == 1)
  1189.     {
  1190.         gdi_layer_blt_previous(0, get_original_prev_list_y_value(), UI_device_width - 1, UI_device_height - 1);
  1191.     }
  1192.     else
  1193. #endif /* defined(__MMI_UI_LIST_TRANSITION__) && (LIST_TRANSITION_STYLE_NON_BLOCKING == 1) */ 
  1194.         /* PMT VIKAS END 20051209 */
  1195.         gdi_layer_blt_previous(0, 0, UI_device_width - 1, UI_device_height - 1);
  1196. }   /* end of RedrawListCategoryScreen */
  1197. /*****************************************************************************
  1198.  * FUNCTION
  1199.  *  ExitListCategoryScreen
  1200.  * DESCRIPTION
  1201.  *  Exit category function of current main lcd category scrren using list menu
  1202.  * PARAMETERS
  1203.  *  void
  1204.  * RETURNS
  1205.  *  void
  1206.  *****************************************************************************/
  1207. void ExitListCategoryScreen(void)
  1208. {
  1209.     /*----------------------------------------------------------------*/
  1210.     /* Local Variables                                                */
  1211.     /*----------------------------------------------------------------*/
  1212.     /*----------------------------------------------------------------*/
  1213.     /* Code Body                                                      */
  1214.     /*----------------------------------------------------------------*/
  1215.     MMI_disable_title_shortcut_display = 0; /* 042905 Calvin added */
  1216.     disable_menu_shortcut_box_display = 0;
  1217.     ClearHighlightHandler();
  1218.     reset_softkeys();
  1219.     reset_menu_shortcut_handler();
  1220.     reset_fixed_list();
  1221.     reset_pop_up_descriptions();
  1222. #ifdef __MMI_UI_HINTS_IN_MENUITEM__
  1223.     reset_all_force_flags_for_hints();
  1224. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  1225.     gui_unblock_list_effect();
  1226. #endif 
  1227. #endif /* __MMI_UI_HINTS_IN_MENUITEM__ */ 
  1228. }   /* end of ExitListCategoryScreen */
  1229. /*****************************************************************************
  1230.  * FUNCTION
  1231.  *  GetListCategoryHistory
  1232.  * DESCRIPTION
  1233.  *  Get category history function of current main lcd category scrren
  1234.  *  using list menu
  1235.  * PARAMETERS
  1236.  *  history_buffer      [?]         
  1237.  *  history(?)          [IN]        Buffer store the valeu of history
  1238.  * RETURNS
  1239.  *  void
  1240.  *****************************************************************************/
  1241. U8 *GetListCategoryHistory(U8 *history_buffer)
  1242. {
  1243.     /*----------------------------------------------------------------*/
  1244.     /* Local Variables                                                */
  1245.     /*----------------------------------------------------------------*/
  1246.     /*----------------------------------------------------------------*/
  1247.     /* Code Body                                                      */
  1248.     /*----------------------------------------------------------------*/
  1249.     get_list_menu_category_history((U16) g_gui_current_catid, history_buffer);
  1250.     return (history_buffer);
  1251. }   /* end of GetListCategoryHistory */
  1252. /*****************************************************************************
  1253.  * FUNCTION
  1254.  *  SetListScreenFunctions
  1255.  * DESCRIPTION
  1256.  *  Common functions to set ExitCategory, RedrawCategory, GetCategoryHistory
  1257.  *  GetCategoryHistorySize functions.
  1258.  * PARAMETERS
  1259.  *  cat_id      [IN]        Current category id
  1260.  * RETURNS
  1261.  *  void
  1262.  *****************************************************************************/
  1263. void SetListScreenFunctions(S32 cat_id)
  1264. {
  1265.     /*----------------------------------------------------------------*/
  1266.     /* Local Variables                                                */
  1267.     /*----------------------------------------------------------------*/
  1268.     /*----------------------------------------------------------------*/
  1269.     /* Code Body                                                      */
  1270.     /*----------------------------------------------------------------*/
  1271.     ExitCategoryFunction = ExitListCategoryScreen;
  1272.     RedrawCategoryFunction = RedrawListCategoryScreen;
  1273.     GetCategoryHistory = GetListCategoryHistory;
  1274.     GetCategoryHistorySize = get_list_menu_category_history_size;
  1275.     g_gui_current_catid = cat_id;
  1276. }   /* end of SetListScreenFunctions */
  1277. /*****************************************************************************
  1278.  * FUNCTION
  1279.  *  ShowListCategoryScreen
  1280.  * DESCRIPTION
  1281.  *  Common function to show category screens containing list menu.
  1282.  * PARAMETERS
  1283.  *  title                   [IN]        String of title
  1284.  *  title_icon              [IN]        Icon of title
  1285.  *  left_softkey            [IN]        String of left softkey
  1286.  *  left_softkey_icon       [IN]        Icon of left softkey
  1287.  *  right_softkey           [IN]        String of right softkey
  1288.  *  right_softkey_icon      [IN]        Icon of right softkey
  1289.  *  number_of_items         [IN]        Number of items in list menu
  1290.  * RETURNS
  1291.  *  void
  1292.  *****************************************************************************/
  1293. void ShowListCategoryScreen(
  1294.         UI_string_type title,
  1295.         PU8 title_icon,
  1296.         UI_string_type left_softkey,
  1297.         PU8 left_softkey_icon,
  1298.         UI_string_type right_softkey,
  1299.         PU8 right_softkey_icon,
  1300.         S32 number_of_items)
  1301. {
  1302.     /*----------------------------------------------------------------*/
  1303.     /* Local Variables                                                */
  1304.     /*----------------------------------------------------------------*/
  1305.     S32 shortcut_width;
  1306.     /*----------------------------------------------------------------*/
  1307.     /* Code Body                                                      */
  1308.     /*----------------------------------------------------------------*/
  1309.     gdi_layer_lock_frame_buffer();
  1310.     /* Title */
  1311.     MMI_title_string = title;
  1312.     MMI_title_icon = title_icon;
  1313.     /* ShortCut */
  1314.     if (!wgui_is_disable_shortcut_display())
  1315.     {
  1316.         MMI_menu_shortcut_number = -1;
  1317.         register_fixed_list_shortcut_handler();
  1318.         shortcut_width = set_menu_item_count(number_of_items) + 7;
  1319.         resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
  1320.         move_menu_shortcut_handler(MMI_title_x + MMI_title_width - MMI_menu_shortcut_box.width, MMI_title_y);
  1321.         register_hide_menu_shortcut(gui_redraw_menu_shortcut);
  1322.     }
  1323.     else
  1324.     {
  1325.         MMI_disable_title_shortcut_display = 1;
  1326.         disable_menu_shortcut_box_display = 1;
  1327.     }
  1328.     /* Softkeys */
  1329.     set_left_softkey_label(left_softkey);
  1330.     set_left_softkey_icon(left_softkey_icon);
  1331.     set_right_softkey_label(right_softkey);
  1332.     set_right_softkey_icon(right_softkey_icon);
  1333.     SetupCategoryKeyHandlers();
  1334.     /* List */
  1335.     MMI_current_menu_type = LIST_MENU;
  1336.     register_fixed_list_keys();
  1337.     resize_fixed_icontext_menuitems(0, MMI_MENUITEM_HEIGHT);
  1338.     resize_fixed_icontext_menuitems(MMI_fixed_list_menu.width - MMI_fixed_list_menu.vbar.width - 1, MMI_fixed_icontext_menuitem.height);        /* 062705 Calvin added for width */
  1339.     register_fixed_list_highlight_handler(standard_list_highlight_handler);
  1340.     set_fixed_icontext_positions(MMI_MENUITEM_HEIGHT + 2, 0, 1, 0);
  1341.     gdi_layer_unlock_frame_buffer();
  1342. }   /* end of ShowListCategoryScreen */
  1343. /* End of Common List Category Screen  */
  1344. /*****************************************************************************
  1345.  * FUNCTION
  1346.  *  ShowCategory1Screen
  1347.  * DESCRIPTION
  1348.  *  Displays the category1 screen
  1349.  * PARAMETERS
  1350.  *  title                   [IN]        Title for the screen
  1351.  *  title_icon              [IN]        Icon shown with the title
  1352.  *  left_softkey            [IN]        Left softkey label
  1353.  *  left_softkey_icon       [IN]        Icon for the left softkey
  1354.  *  right_softkey           [IN]        Right softkey label
  1355.  *  right_softkey_icon      [IN]        Icon for the right softkey
  1356.  *  number_of_items         [IN]        Number of items
  1357.  *  list_of_items           [IN]        List of text items
  1358.  *  highlighted_item        [IN]        Index of the item to be highlighted by default
  1359.  *  history_buffer          [IN]        History buffer
  1360.  * RETURNS
  1361.  *  void
  1362.  *****************************************************************************/
  1363. void ShowCategory1Screen(
  1364.         U16 title,
  1365.         U16 title_icon,
  1366.         U16 left_softkey,
  1367.         U16 left_softkey_icon,
  1368.         U16 right_softkey,
  1369.         U16 right_softkey_icon,
  1370.         S32 number_of_items,
  1371.         U16 *list_of_items,
  1372.         S32 highlighted_item,
  1373.         U8 *history_buffer)
  1374. {
  1375.     /*----------------------------------------------------------------*/
  1376.     /* Local Variables                                                */
  1377.     /*----------------------------------------------------------------*/
  1378.     U8 i = 0;
  1379.     /*----------------------------------------------------------------*/
  1380.     /* Code Body                                                      */
  1381.     /*----------------------------------------------------------------*/
  1382.     for (i = 0; i < number_of_items; i++)
  1383.     {
  1384.         subMenuDataPtrs[i] = (PU8) get_string(list_of_items[i]);
  1385.     }
  1386. #ifdef __MMI_UI_LIST_TRANSITION__
  1387.     if (!history_buffer)
  1388.     {
  1389.         set_list_transition(WGUI_TRANSITION_D2T);
  1390.     }
  1391. #endif /* __MMI_UI_LIST_TRANSITION__ */ 
  1392.     ShowCategory6Screen(
  1393.         title,
  1394.         title_icon,
  1395.         left_softkey,
  1396.         left_softkey_icon,
  1397.         right_softkey,
  1398.         right_softkey_icon,
  1399.         number_of_items,
  1400.         subMenuDataPtrs,
  1401.         NULL,
  1402.         highlighted_item,
  1403.         history_buffer);
  1404. #ifdef __MMI_UI_LIST_TRANSITION__
  1405. #if(!LIST_TRANSITION_STYLE_NON_BLOCKING)
  1406.     reset_list_transition();
  1407. #endif 
  1408. #endif /* __MMI_UI_LIST_TRANSITION__ */ 
  1409. }   /* end of ShowCategory1Screen */
  1410. /*****************************************************************************
  1411.  * FUNCTION
  1412.  *  ShowCategory2Screen
  1413.  * DESCRIPTION
  1414.  *  Displays the category2 screen
  1415.  * PARAMETERS
  1416.  *  title                   [IN]        Title for the screen
  1417.  *  title_icon              [IN]        Icon shown with the title
  1418.  *  left_softkey            [IN]        Left softkey label
  1419.  *  left_softkey_icon       [IN]        Icon for the Left softkey
  1420.  *  right_softkey           [IN]        Right softkey label
  1421.  *  right_softkey_icon      [IN]        Icon for the right softkey
  1422.  *  message                 [IN]        Message string
  1423.  *  history_buffer          [IN]        History buffer
  1424.  * RETURNS
  1425.  *  void
  1426.  *****************************************************************************/
  1427. void ShowCategory2Screen(
  1428.         U16 title,
  1429.         U16 title_icon,
  1430.         U16 left_softkey,
  1431.         U16 left_softkey_icon,
  1432.         U16 right_softkey,
  1433.         U16 right_softkey_icon,
  1434.         U16 message,
  1435.         U8 *history_buffer)
  1436. {
  1437.     /*----------------------------------------------------------------*/
  1438.     /* Local Variables                                                */
  1439.     /*----------------------------------------------------------------*/
  1440.     U8 *message_str = NULL;
  1441.     /*----------------------------------------------------------------*/
  1442.     /* Code Body                                                      */
  1443.     /*----------------------------------------------------------------*/
  1444.     message_str = (U8*) get_string((MMI_ID_TYPE) message);
  1445.     ShowCategory7Screen(
  1446.         title,
  1447.         title_icon,
  1448.         left_softkey,
  1449.         left_softkey_icon,
  1450.         right_softkey,
  1451.         right_softkey_icon,
  1452.         message_str,
  1453.         history_buffer);
  1454. }   /* end of ShowCategory2Screen */
  1455. /*****************************************************************************
  1456.  * FUNCTION
  1457.  *  ShowCategory6Screen
  1458.  * DESCRIPTION
  1459.  *  Displays the category6 screen
  1460.  * PARAMETERS
  1461.  *  title                       [IN]        Title for the screen
  1462.  *  title_icon                  [IN]        Icon shown with the title
  1463.  *  left_softkey                [IN]        Left softkey label
  1464.  *  left_softkey_icon           [IN]        Icon for the left softkey
  1465.  *  right_softkey               [IN]        Right softkey label
  1466.  *  right_softkey_icon          [IN]        Icon for the right softkey
  1467.  *  number_of_items             [IN]        Number of items
  1468.  *  list_of_items               [IN]        List of text items.
  1469.  *  list_of_descriptions        [IN]        
  1470.  *  highlighted_item            [IN]        This is the default item that will be highlighted (if there is no history)
  1471.  *  history_buffer              [IN]        History buffer
  1472.  * RETURNS
  1473.  *  void
  1474.  *****************************************************************************/
  1475. void ShowCategory6Screen(
  1476.         U16 title,
  1477.         U16 title_icon,
  1478.         U16 left_softkey,
  1479.         U16 left_softkey_icon,
  1480.         U16 right_softkey,
  1481.         U16 right_softkey_icon,
  1482.         S32 number_of_items,
  1483.         U8 **list_of_items,
  1484.         U8 **list_of_descriptions,
  1485.         S32 highlighted_item,
  1486.         U8 *history_buffer)
  1487. {
  1488.     /*----------------------------------------------------------------*/
  1489.     /* Local Variables                                                */
  1490.     /*----------------------------------------------------------------*/
  1491.     dm_data_struct dm_data;
  1492.     S32 i = 0,mm_bg_flags;
  1493.     U8 h_flag;
  1494.     /*----------------------------------------------------------------*/
  1495.     /* Code Body                                                      */
  1496.     /*----------------------------------------------------------------*/
  1497.     gdi_layer_lock_frame_buffer();
  1498.     resize_fixed_list(MMI_content_width, MMI_content_height);   /* 031805 Calvin modified */
  1499.     create_fixed_text_menuitems();
  1500.     associate_fixed_text_list();
  1501. MMI_disable_title_shortcut_display = 1;
  1502. MMI_fixed_list_menu.flags |= UI_LIST_MENU_LOOP | UI_LIST_MENU_DISABLE_BACKGROUND | UI_LIST_MENU_DISABLE_BKGRND_IN_LAYER;
  1503.       
  1504.     ShowListCategoryScreen(
  1505.         get_string(title),
  1506.         get_image(title_icon),
  1507.         get_string(left_softkey),
  1508.         get_image(left_softkey_icon),
  1509.         get_string(right_softkey),
  1510.         get_image(right_softkey_icon),
  1511.         number_of_items);
  1512.     if (list_of_descriptions == NULL)
  1513.     {
  1514.         for (i = 0; i < number_of_items; i++)
  1515.         {
  1516.             add_fixed_text_item((UI_string_type) list_of_items[i]);
  1517.             wgui_pop_up_description_strings[i].text_strings[0] = NULL;
  1518.         }
  1519.     }
  1520.     else
  1521.     {
  1522.         for (i = 0; i < number_of_items; i++)
  1523.         {
  1524.             add_fixed_text_item((UI_string_type) list_of_items[i]);
  1525.             wgui_pop_up_description_strings[i].text_strings[0] = (UI_string_type) list_of_descriptions[i];
  1526.         }
  1527.     }
  1528.     resize_fixed_text_menuitems_to_list_width();
  1529.     resize_fixed_text_menuitems(0, MMI_MENUITEM_HEIGHT);    /* 090605 Shortcut Calvin moved */
  1530.     h_flag = set_list_menu_category_history(MMI_CATEGORY6_ID, history_buffer);
  1531.     if (h_flag)
  1532.     {
  1533.         fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
  1534.     }
  1535.     else
  1536.     {
  1537.         fixed_list_goto_item_no_redraw(highlighted_item);
  1538.     }
  1539.     if (list_of_descriptions != NULL)
  1540.     {
  1541.         set_pop_up_descriptions(1, number_of_items, MMI_fixed_list_menu.highlighted_item);
  1542.     }
  1543.     gdi_layer_unlock_frame_buffer();
  1544. wgui_set_title_bknd_display(MMI_FALSE);
  1545. dm_set_scr_bg_image(IMG_GLOBAL_SUB_MENU_BG_2, NULL, -1, -1, current_MMI_theme->bg_opacity_full);
  1546. dm_get_scr_bg_flag(&mm_bg_flags);
  1547. dm_set_scr_bg_flag(mm_bg_flags | DM_SCR_BG_FORCE_SHOW);
  1548.     ExitCategoryFunction = ExitListCategoryScreen;
  1549.     RedrawCategoryFunction = dm_redraw_category_screen;
  1550.     GetCategoryHistory = dm_get_category_history;
  1551.     GetCategoryHistorySize = dm_get_category_history_size;
  1552.     dm_data.s32ScrId = (S32) GetActiveScreenId();
  1553.     dm_data.s32CatId = MMI_CATEGORY6_ID;
  1554.     dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND | DM_NO_STATUS_BAR;
  1555.     dm_setup_data(&dm_data);
  1556.     dm_redraw_category_screen();
  1557. }   /* end of ShowCategory6Screen */
  1558. /*****************************************************************************
  1559.  * FUNCTION
  1560.  *  ShowCategory7Screen
  1561.  * DESCRIPTION
  1562.  *  Displays the category7 screen
  1563.  * PARAMETERS
  1564.  *  title                   [IN]        Title for the screen
  1565.  *  title_icon              [IN]        Icon shown with the title
  1566.  *  left_softkey            [IN]        Left softkey label
  1567.  *  left_softkey_icon       [IN]        Icon for the left softkey
  1568.  *  right_softkey           [IN]        Right softkey label
  1569.  *  right_softkey_icon      [IN]        
  1570.  *  message                 [IN]        Notification message (string. Not string ID)
  1571.  *  history_buffer          [IN]        History buffer
  1572.  *  right_softkey_iconIN Icon for the right softkey(?)
  1573.  * RETURNS
  1574.  *  void
  1575.  *****************************************************************************/
  1576. void ShowCategory7Screen(
  1577.         U16 title,
  1578.         U16 title_icon,
  1579.         U16 left_softkey,
  1580.         U16 left_softkey_icon,
  1581.         U16 right_softkey,
  1582.         U16 right_softkey_icon,
  1583.         U8 *message,
  1584.         U8 *history_buffer)
  1585. {
  1586.     /*----------------------------------------------------------------*/
  1587.     /* Local Variables                                                */
  1588.     /*----------------------------------------------------------------*/
  1589.     dm_data_struct dm_data;
  1590.     S32 l;
  1591.     /*----------------------------------------------------------------*/
  1592.     /* Code Body                                                      */
  1593.     /*----------------------------------------------------------------*/
  1594.     UI_UNUSED_PARAMETER(history_buffer);
  1595.     gdi_layer_lock_frame_buffer();
  1596.     MMI_menu_shortcut_number = -1;
  1597.     change_left_softkey(left_softkey, left_softkey_icon);
  1598.     change_right_softkey(right_softkey, right_softkey_icon);
  1599.     SetupCategoryKeyHandlers();
  1600.     MMI_title_string = (UI_string_type) get_string(title);
  1601.     MMI_title_icon = (PU8) get_image(title_icon);
  1602.     MMI_message_string = (UI_string_type) (message);
  1603.     l = gui_strlen(MMI_message_string);
  1604.     create_multiline_inputbox_set_buffer(MMI_message_string, l, l, 0);
  1605.     MMI_multiline_inputbox.flags |=
  1606.         (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND |
  1607.          UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
  1608.     gdi_layer_unlock_frame_buffer();
  1609.     ExitCategoryFunction = ExitCategory7Screen;
  1610.     RedrawCategoryFunction = dm_redraw_category_screen;
  1611.     GetCategoryHistory = dm_get_category_history;
  1612.     GetCategoryHistorySize = dm_get_category_history_size;
  1613.     dm_data.s32ScrId = (S32) GetActiveScreenId();
  1614.     dm_data.s32CatId = MMI_CATEGORY7_ID;
  1615.     dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
  1616.     dm_setup_data(&dm_data);
  1617.     dm_redraw_category_screen();
  1618. }   /* end of ShowCategory7Screen */
  1619. /*****************************************************************************
  1620.  * FUNCTION
  1621.  *  ExitCategory7Screen
  1622.  * DESCRIPTION
  1623.  *  Exits the category7 screen
  1624.  * PARAMETERS
  1625.  *  void
  1626.  * RETURNS
  1627.  *  void
  1628.  *****************************************************************************/
  1629. void ExitCategory7Screen(void)
  1630. {
  1631.     /*----------------------------------------------------------------*/
  1632.     /* Local Variables                                                */
  1633.     /*----------------------------------------------------------------*/
  1634.     /*----------------------------------------------------------------*/
  1635.     /* Code Body                                                      */
  1636.     /*----------------------------------------------------------------*/
  1637.     reset_softkeys();
  1638. }   /* end of ExitCategory7Screen */
  1639. /*****************************************************************************
  1640.  * FUNCTION
  1641.  *  ShowCategory8Screen
  1642.  * DESCRIPTION
  1643.  *  Displays the category8 screen
  1644.  * PARAMETERS
  1645.  *  title                   [IN]        Title for the screen
  1646.  *  title_icon              [IN]        Icon shown with the title
  1647.  *  left_softkey            [IN]        Left softkey label
  1648.  *  left_softkey_icon       [IN]        Icon for the left softkey
  1649.  *  right_softkey           [IN]        Right softkey label
  1650.  *  right_softkey_icon      [IN]        
  1651.  *  message                 [IN]        Notification message
  1652.  *  message_icon            [IN]        
  1653.  *  history_buffer          [IN]        History buffer
  1654.  *  image(?)                [IN]        Notification image
  1655.  *  right_softkey_iconIN Icon for the right softkey(?)
  1656.  * RETURNS
  1657.  *  void
  1658.  *****************************************************************************/
  1659. void ShowCategory8Screen(
  1660.         U16 title,
  1661.         U16 title_icon,
  1662.         U16 left_softkey,
  1663.         U16 left_softkey_icon,
  1664.         U16 right_softkey,
  1665.         U16 right_softkey_icon,
  1666.         U16 message,
  1667.         U16 message_icon,
  1668.         U8 *history_buffer)
  1669. {
  1670.     /*----------------------------------------------------------------*/
  1671.     /* Local Variables                                                */
  1672.     /*----------------------------------------------------------------*/
  1673.     /*----------------------------------------------------------------*/
  1674.     /* Code Body                                                      */
  1675.     /*----------------------------------------------------------------*/
  1676.     ShowCategory66Screen(
  1677.         title,
  1678.         title_icon,
  1679.         left_softkey,
  1680.         left_softkey_icon,
  1681.         right_softkey,
  1682.         right_softkey_icon,
  1683.         (U8*) get_string(message),
  1684.         message_icon,
  1685.         history_buffer);
  1686. }   /* end of ShowCategory8Screen */
  1687. /*****************************************************************************
  1688.  * FUNCTION
  1689.  *  ShowCategory208Screen
  1690.  * DESCRIPTION
  1691.  *  
  1692.  * PARAMETERS
  1693.  *  title                   [IN]        
  1694.  *  title_icon              [IN]        
  1695.  *  left_softkey            [IN]        
  1696.  *  left_softkey_icon       [IN]        
  1697.  *  right_softkey           [IN]        
  1698.  *  right_softkey_icon      [IN]        
  1699.  *  message                 [?]         
  1700.  *  message_icon            [IN]        
  1701.  *  history_buffer          [?]         
  1702.  * RETURNS
  1703.  *  void
  1704.  *****************************************************************************/
  1705. void ShowCategory208Screen(
  1706.         U16 title,
  1707.         U16 title_icon,
  1708.         U16 left_softkey,
  1709.         U16 left_softkey_icon,
  1710.         U16 right_softkey,
  1711.         U16 right_softkey_icon,
  1712.         S8 *message,
  1713.         U16 message_icon,
  1714.         U8 *history_buffer)
  1715. {
  1716.     /*----------------------------------------------------------------*/
  1717.     /* Local Variables                                                */
  1718.     /*----------------------------------------------------------------*/
  1719.     /*----------------------------------------------------------------*/
  1720.     /* Code Body                                                      */
  1721.     /*----------------------------------------------------------------*/
  1722.     ShowCategory66Screen(
  1723.         title,
  1724.         title_icon,
  1725.         left_softkey,
  1726.         left_softkey_icon,
  1727.         right_softkey,
  1728.         right_softkey_icon,
  1729.         (U8*) message,
  1730.         message_icon,
  1731.         history_buffer);
  1732. }
  1733. /*****************************************************************************
  1734.  * FUNCTION
  1735.  *  ShowCategory9Screen
  1736.  * DESCRIPTION
  1737.  *  Displays the category9 screen
  1738.  * PARAMETERS
  1739.  *  message             [IN]        Message string
  1740.  *  message_icon        [IN]        
  1741.  *  history_buffer      [IN]        History buffer
  1742.  *  icon(?)             [IN]        Message icon
  1743.  * RETURNS
  1744.  *  void
  1745.  *****************************************************************************/
  1746. void ShowCategory9Screen(U16 message, U16 message_icon, U8 *history_buffer)
  1747. {
  1748.     /*----------------------------------------------------------------*/
  1749.     /* Local Variables                                                */
  1750.     /*----------------------------------------------------------------*/
  1751.     dm_data_struct dm_data;
  1752.     S32 l;
  1753.     /*----------------------------------------------------------------*/
  1754.     /* Code Body                                                      */
  1755.     /*----------------------------------------------------------------*/
  1756.     dm_reset_context();
  1757.     UI_UNUSED_PARAMETER(history_buffer);
  1758.     gdi_layer_lock_frame_buffer();
  1759.     entry_full_screen();
  1760.     MMI_menu_shortcut_number = -1;
  1761.     clear_category_screen_key_handlers();
  1762.     clear_left_softkey();
  1763.     clear_right_softkey();
  1764.     if (message != 0)
  1765.     {
  1766.         MMI_message_string = (UI_string_type) get_string(message);
  1767.         l = gui_strlen(MMI_message_string);
  1768.         create_multiline_inputbox_set_buffer(MMI_message_string, l, l, 0);
  1769.         MMI_multiline_inputbox.flags |=
  1770.             (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_CENTER_JUSTIFY |
  1771.              UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND | UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
  1772.     }
  1773.     else
  1774.     {
  1775.         MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
  1776.     }
  1777.     dm_add_image(get_image(message_icon), NULL, NULL);
  1778.     gdi_layer_unlock_frame_buffer();
  1779.     ExitCategoryFunction = UI_dummy_function;
  1780.     RedrawCategoryFunction = dm_redraw_category_screen;
  1781.     GetCategoryHistory = dm_get_category_history;
  1782.     GetCategoryHistorySize = dm_get_category_history_size;
  1783.     dm_data.s32ScrId = (S32) GetActiveScreenId();
  1784.     dm_data.s32CatId = MMI_CATEGORY9_ID;
  1785.     dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
  1786.     dm_setup_data(&dm_data);
  1787.     dm_redraw_category_screen();
  1788. }   /* end of ShowCategory9Screen */
  1789. /*****************************************************************************
  1790.  * FUNCTION
  1791.  *  ExitCategory9Screen
  1792.  * DESCRIPTION
  1793.  *  Exits the category9 screen
  1794.  * PARAMETERS
  1795.  *  void
  1796.  * RETURNS
  1797.  *  void
  1798.  *****************************************************************************/
  1799. void ExitCategory9Screen(void)
  1800. {
  1801.     /*----------------------------------------------------------------*/
  1802.     /* Local Variables                                                */
  1803.     /*----------------------------------------------------------------*/
  1804.     /*----------------------------------------------------------------*/
  1805.     /* Code Body                                                      */
  1806.     /*----------------------------------------------------------------*/
  1807.     gui_hide_animations();
  1808. }   /* end of ExitCategory9Screen */
  1809. /*****************************************************************************
  1810.  * FUNCTION
  1811.  *  ShowCategory11Screen
  1812.  * DESCRIPTION
  1813.  *  Displays the category11 screen
  1814.  * PARAMETERS
  1815.  *  title                   [IN]        Title for the screen
  1816.  *  title_icon              [IN]        Icon shown with the title
  1817.  *  left_softkey            [IN]        Left softkey label
  1818.  *  left_softkey_icon       [IN]        Icon for the left softkey
  1819.  *  right_softkey           [IN]        Right softkey label
  1820.  *  right_softkey_icon      [IN]        Icon for the right softkey
  1821.  *  number_of_items         [IN]        Number of items
  1822.  *  list_of_items           [IN]        List of text items
  1823.  *  highlighted_item        [IN]        Zero based index of the highlighed item (used if there is no history)
  1824.  *  history_buffer          [IN]        History buffer
  1825.  * RETURNS
  1826.  *  void
  1827.  *****************************************************************************/
  1828. void ShowCategory11Screen(
  1829.         U16 title,
  1830.         U16 title_icon,
  1831.         U16 left_softkey,
  1832.         U16 left_softkey_icon,
  1833.         U16 right_softkey,
  1834.         U16 right_softkey_icon,
  1835.         S32 number_of_items,
  1836.         U16 *list_of_items,
  1837.         U16 highlighted_item,
  1838.         U8 *history_buffer)
  1839. {
  1840.     /*----------------------------------------------------------------*/
  1841.     /* Local Variables                                                */
  1842.     /*----------------------------------------------------------------*/
  1843.     U8 i = 0;
  1844.     /*----------------------------------------------------------------*/
  1845.     /* Code Body                                                      */
  1846.     /*----------------------------------------------------------------*/
  1847.     for (i = 0; i < number_of_items; i++)
  1848.     {
  1849.         subMenuDataPtrs[i] = (PU8) get_string(list_of_items[i]);
  1850.     }
  1851.     ShowCategory36Screen(
  1852.         title,
  1853.         title_icon,
  1854.         left_softkey,
  1855.         left_softkey_icon,
  1856.         right_softkey,
  1857.         right_softkey_icon,
  1858.         number_of_items,
  1859.         subMenuDataPtrs,
  1860.         highlighted_item,
  1861.         history_buffer);
  1862. }   /* end of ShowCategory11Screen */
  1863. /*****************************************************************************
  1864.  * FUNCTION
  1865.  *  ShowCategory12Screen
  1866.  * DESCRIPTION
  1867.  *  (two state menuitem)
  1868.  *  Displays the Category12 screen
  1869.  * PARAMETERS
  1870.  *  title                   [IN]        Title for the screen
  1871.  *  title_icon              [IN]        Icon shown with the title
  1872.  *  left_softkey            [IN]        Left softkey label
  1873.  *  left_softkey_icon       [IN]        Icon for the left softkey
  1874.  *  right_softkey           [IN]        Right softkey label
  1875.  *  right_softkey_icon      [IN]        Icon for the right softkey
  1876.  *  number_of_items         [IN]        Number of items
  1877.  *  list_of_items           [IN]        List of text items
  1878.  *  list_of_states          [IN]        Array containing the states of the items
  1879.  *  highlighted_item        [IN]        Zero based index of the highlighed item (used if there is no history)
  1880.  *  history_buffer          [IN]        History buffer
  1881.  * RETURNS
  1882.  *  void
  1883.  *****************************************************************************/
  1884. void ShowCategory12Screen(
  1885.         U16 title,
  1886.         U16 title_icon,
  1887.         U16 left_softkey,
  1888.         U16 left_softkey_icon,
  1889.         U16 right_softkey,
  1890.         U16 right_softkey_icon,
  1891.         S32 number_of_items,
  1892.         U8 **list_of_items,
  1893.         U8 *list_of_states,
  1894.         S32 highlighted_item,
  1895.         U8 *history_buffer)
  1896. {
  1897.     /*----------------------------------------------------------------*/
  1898.     /* Local Variables                                                */
  1899.     /*----------------------------------------------------------------*/
  1900.     dm_data_struct dm_data;
  1901.     S32 i;
  1902.     U8 h_flag;
  1903.     /*----------------------------------------------------------------*/
  1904.     /* Code Body                                                      */
  1905.     /*----------------------------------------------------------------*/
  1906.     gdi_layer_lock_frame_buffer();
  1907.     /* Setup menuitem */
  1908.     create_fixed_twostate_menuitems(get_image(CHECKBOX_ON_IMAGE_ID), get_image(CHECKBOX_OFF_IMAGE_ID));
  1909.     associate_fixed_twostate_list();
  1910.     ShowListCategoryScreen(
  1911.         get_string(title),
  1912.         get_image(title_icon),
  1913.         get_string(left_softkey),
  1914.         get_image(left_softkey_icon),
  1915.         get_string(right_softkey),
  1916.         get_image(right_softkey_icon),
  1917.         number_of_items);
  1918.     resize_fixed_twostate_menuitems(0, MMI_MENUITEM_HEIGHT);    /* 092005 twostate Calvin added */
  1919.     set_fixed_twostate_positions(MMI_MENUITEM_HEIGHT, 0, 1, 0); /* 092005 twostate Calvin added */
  1920.     set_left_softkey_function(standard_check_list_handle_left_softkey_up, KEY_EVENT_UP);
  1921.     checklist_category_menu_item_states = list_of_states;
  1922.     for (i = 0; i < number_of_items; i++)
  1923.     {
  1924.         add_fixed_twostate_item((UI_string_type) list_of_items[i]);
  1925.         if (list_of_states[i])
  1926.         {
  1927.             select_fixed_twostate_item(i);
  1928.         }
  1929.     }
  1930.     /* Read History */
  1931.     h_flag = set_list_menu_category_history(MMI_CATEGORY12_ID, history_buffer);
  1932.     if (h_flag)
  1933.     {
  1934.         fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
  1935.     }
  1936.     else
  1937.     {
  1938.         fixed_list_goto_item_no_redraw(highlighted_item);
  1939.     }
  1940.     /* Leo remove for test */
  1941.     /* register_menu_shortcut_selected(standard_check_list_handle_item_select); */
  1942.     resize_fixed_twostate_menuitems_to_list_width();
  1943.     gdi_layer_unlock_frame_buffer();
  1944.     ExitCategoryFunction = ExitListCategoryScreen;
  1945.     RedrawCategoryFunction = dm_redraw_category_screen;
  1946.     GetCategoryHistory = dm_get_category_history;
  1947.     GetCategoryHistorySize = dm_get_category_history_size;
  1948.     dm_data.s32ScrId = (S32) GetActiveScreenId();
  1949.     dm_data.s32CatId = MMI_CATEGORY12_ID;
  1950.     dm_data.s32flags = 0;
  1951.     dm_setup_data(&dm_data);
  1952.     dm_redraw_category_screen();
  1953. }   /* end of ShowCategory12Screen */
  1954. /*****************************************************************************
  1955.  * FUNCTION
  1956.  *  ShowCategory13Screen
  1957.  * DESCRIPTION
  1958.  *  Displays the Category13 screen
  1959.  * PARAMETERS
  1960.  *  title                   [IN]        Title for the screen
  1961.  *  title_icon              [IN]        Icon shown with the title
  1962.  *  left_softkey            [IN]        Left softkey label
  1963.  *  left_softkey_icon       [IN]        Icon for the left softkey
  1964.  *  right_softkey           [IN]        Right softkey label
  1965.  *  right_softkey_icon      [IN]        Icon for the right softkey
  1966.  *  number_of_items         [IN]        Number of items
  1967.  *  list_of_items           [IN]        List of text items
  1968.  *  list_of_states          [IN]        Array containing the states of the items
  1969.  *  highlighted_item        [IN]        Zero based index of the highlighed item (used if there is no history)
  1970.  *  history_buffer          [IN]        History buffer
  1971.  * RETURNS
  1972.  *  void
  1973.  *****************************************************************************/
  1974. void ShowCategory13Screen(
  1975.         U16 title,
  1976.         U16 title_icon,
  1977.         U16 left_softkey,
  1978.         U16 left_softkey_icon,
  1979.         U16 right_softkey,
  1980.         U16 right_softkey_icon,
  1981.         S32 number_of_items,
  1982.         U16 *list_of_items,
  1983.         U8 *list_of_states,
  1984.         S32 highlighted_item,
  1985.         U8 *history_buffer)
  1986. {
  1987.     /*----------------------------------------------------------------*/
  1988.     /* Local Variables                                                */
  1989.     /*----------------------------------------------------------------*/
  1990.     U8 i = 0;
  1991.     /*----------------------------------------------------------------*/
  1992.     /* Code Body                                                      */
  1993.     /*----------------------------------------------------------------*/
  1994.     for (i = 0; i < number_of_items; i++)
  1995.     {
  1996.         subMenuDataPtrs[i] = (PU8) get_string(list_of_items[i]);
  1997.     }
  1998.     ShowCategory12Screen(
  1999.         title,
  2000.         title_icon,
  2001.         left_softkey,
  2002.         left_softkey_icon,
  2003.         right_softkey,
  2004.         right_softkey_icon,
  2005.         number_of_items,
  2006.         subMenuDataPtrs,
  2007.         list_of_states,
  2008.         highlighted_item,
  2009.         history_buffer);
  2010. }   /* end of ShowCategory13Screen */
  2011. /*****************************************************************************
  2012.  * FUNCTION
  2013.  *  ShowCategory15Screen
  2014.  * DESCRIPTION
  2015.  *  Displays the category15 screen
  2016.  * PARAMETERS
  2017.  *  title                   [IN]        Title for the screen
  2018.  *  title_icon              [IN]        Icon displayed with the title
  2019.  *  left_softkey            [IN]        Left softkey label
  2020.  *  left_softkey_icon       [IN]        Left softkey icon
  2021.  *  right_softkey           [IN]        Right softkey label
  2022.  *  right_softkey_icon      [IN]        Right softkey icon
  2023.  *  number_of_items         [IN]        Number of items in the menu
  2024.  *  list_of_items           [IN]        Array of items
  2025.  *  list_of_icons           [IN]        Array of icons
  2026.  *  flags                   [IN]        (see explanation below)
  2027.  *  highlighted_item        [IN]        Default item to be highlighted (if there is no history)
  2028.  *  history_buffer          [IN]        History buffer
  2029.  *  LIST_MENU(?)            [IN]        
  2030.  *  Values(?)               [IN]        Allowed for these 8 bits are:
  2031.  *  MATRIX_MENU(?)          [IN]        
  2032.  *  The(?)                  [IN]        Last 8 bits of flags represent the type of the menu.
  2033.  * RETURNS
  2034.  *  void
  2035.  *****************************************************************************/
  2036. void ShowCategory15Screen(
  2037.         U16 title,
  2038.         U16 title_icon,
  2039.         U16 left_softkey,
  2040.         U16 left_softkey_icon,
  2041.         U16 right_softkey,
  2042.         U16 right_softkey_icon,
  2043.         S32 number_of_items,
  2044.         U16 *list_of_items,
  2045.         U16 *list_of_icons,
  2046.         S32 flags,
  2047.         S32 highlighted_item,
  2048.         U8 *history_buffer)
  2049. {
  2050.     /*----------------------------------------------------------------*/
  2051.     /* Local Variables                                                */
  2052.     /*----------------------------------------------------------------*/
  2053. #ifdef UI_SMALL_LIST_SCREEN
  2054.     if (whether_no_small_screen())
  2055.     {
  2056.         ShowCategory10Screen(
  2057.             title,
  2058.             title_icon,
  2059.             left_softkey,
  2060.             left_softkey_icon,
  2061.             right_softkey,
  2062.             right_softkey_icon,
  2063.             number_of_items,
  2064.             list_of_items,
  2065.             list_of_icons,
  2066.             highlighted_item,
  2067.             history_buffer);
  2068.     }
  2069.     else
  2070. #endif /* UI_SMALL_LIST_SCREEN */ 
  2071.     {
  2072.         /*----------------------------------------------------------------*/
  2073.         /* Local Variables                                                */
  2074.         /*----------------------------------------------------------------*/
  2075.         dm_data_struct dm_data;
  2076.         S32 i, shortcut_width, ixsize, iysize;
  2077.         U8 h_flag,mm_bg_flags;
  2078.         /*----------------------------------------------------------------*/
  2079.         /* Code Body                                                      */
  2080.         /*----------------------------------------------------------------*/
  2081.         gdi_layer_lock_frame_buffer();
  2082.         MMI_menu_shortcut_number = -1;
  2083.         change_left_softkey(left_softkey, left_softkey_icon);
  2084.         change_right_softkey(right_softkey, right_softkey_icon);
  2085.         SetupCategoryKeyHandlers();
  2086.         create_fixed_icontext_menuitems();
  2087.         MMI_current_menu_type = flags & 0x0f;
  2088.         MMI_title_string = (UI_string_type) get_string(title);
  2089.         MMI_title_icon = (PU8) get_image(title_icon);
  2090.         switch (MMI_current_menu_type)
  2091.         {
  2092.             case LIST_MENU:
  2093.                 /* resize_fixed_list(MMI_content_width,MMI_content_height+2); */
  2094.                 resize_fixed_list(MMI_content_width, MMI_content_height);       /* 031705 Calvin modified */
  2095.                 associate_fixed_icontext_list();
  2096. MMI_disable_title_shortcut_display = 1;
  2097. MMI_fixed_list_menu.flags |= UI_LIST_MENU_LOOP | UI_LIST_MENU_DISABLE_BACKGROUND | UI_LIST_MENU_DISABLE_BKGRND_IN_LAYER;
  2098.                 for (i = 0; i < number_of_items; i++)
  2099.                 {
  2100.                     add_fixed_icontext_item(get_string(list_of_items[i]), wgui_get_list_menu_icon(i, list_of_icons[i]));
  2101.                 }
  2102.                 register_fixed_list_shortcut_handler();
  2103.                 register_fixed_list_keys();
  2104.                 shortcut_width = set_menu_item_count(number_of_items) + 7;
  2105.                 resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
  2106.                 move_menu_shortcut_handler(UI_device_width - MMI_menu_shortcut_box.width, MMI_title_y);
  2107.                 register_hide_menu_shortcut(gui_redraw_menu_shortcut);
  2108.                 /* resize_fixed_icontext_menuitems(0,get_menu_item_height());//041205 Calvin modified */
  2109.                 resize_fixed_icontext_menuitems(0, MMI_MENUITEM_HEIGHT);
  2110.                 set_fixed_icontext_positions(MMI_ICONTEXT_MENUITEM_HEIGHT + 2, 0, 1, 0);
  2111.                 register_fixed_list_highlight_handler(standard_list_highlight_handler);
  2112.                 h_flag = set_list_menu_category_history(MMI_CATEGORY15_LIST_ID, history_buffer);
  2113.                 if (h_flag)
  2114.                 {
  2115.                     fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
  2116.                 }
  2117.                 else
  2118.                 {
  2119.                     fixed_list_goto_item_no_redraw(highlighted_item);
  2120.                 }
  2121.                 break;
  2122.             case MATRIX_MENU:
  2123.                 associate_fixed_icontext_matrix();
  2124.                 for (i = 0; i < number_of_items; i++)
  2125.                 {
  2126.                     add_fixed_icontext_item(get_string(list_of_items[i]), get_image(list_of_icons[i]));
  2127.                 }
  2128.                 register_fixed_matrix_shortcut_handler();
  2129.                 MMI_fixed_matrix_menu.flags |= UI_MATRIX_MENU_LOOP;
  2130.                 register_fixed_matrix_loop_keys();
  2131.                 register_fixed_matrix_highlight_handler(standard_animated_matrix_highlight_handler_type2);
  2132.                 if (number_of_items > 9)
  2133.                 {
  2134.                     ixsize = (MMI_content_width - MMI_fixed_matrix_menu.vbar.width - 6) / 3;
  2135.                 }
  2136.                 else
  2137.                 {
  2138.                     ixsize = (MMI_content_width - 6) / 3;
  2139.                 }
  2140.                 iysize = (MMI_content_height - 6) / 3;
  2141.                 configure_fixed_matrix(ixsize, iysize, 3, 0);
  2142.                 shortcut_width = set_menu_item_count(number_of_items) + 7;
  2143.                 resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
  2144.                 move_menu_shortcut_handler(UI_device_width - MMI_menu_shortcut_box.width, MMI_title_y);
  2145.                 register_hide_menu_shortcut(gui_redraw_menu_shortcut);
  2146.                 set_fixed_icontext_positions(0, 0, 0, 0);
  2147.                 MMI_fixed_icontext_menuitem.flags |= UI_MENUITEM_DISABLE_TEXT_DISPLAY;
  2148.                 MMI_disable_title_shortcut_display = 0;
  2149.                 h_flag = set_matrix_menu_category_history(MMI_CATEGORY15_MATRIX_ID, history_buffer);
  2150.                 if (h_flag)
  2151.                 {
  2152.                     fixed_matrix_goto_item_no_redraw(MMI_fixed_matrix_menu.highlighted_item);
  2153.                 }
  2154.                 else
  2155.                 {
  2156.                     fixed_matrix_goto_item_no_redraw(highlighted_item);
  2157.                 }
  2158.                 break;
  2159.         }
  2160.         gdi_layer_unlock_frame_buffer();
  2161. wgui_set_title_bknd_display(MMI_FALSE);
  2162.     dm_set_scr_bg_image(IMG_GLOBAL_SUB_MENU_BG_2, NULL, -1, -1, current_MMI_theme->bg_opacity_full);
  2163.         dm_get_scr_bg_flag(&mm_bg_flags);
  2164.         dm_set_scr_bg_flag(mm_bg_flags | DM_SCR_BG_FORCE_SHOW);
  2165.         ExitCategoryFunction = ExitCategory15Screen;
  2166.         RedrawCategoryFunction = dm_redraw_category_screen;
  2167.         GetCategoryHistory = dm_get_category_history;
  2168.         GetCategoryHistorySize = dm_get_category_history_size;
  2169.         dm_data.s32ScrId = (S32) GetActiveScreenId();
  2170.         if ((MMI_current_menu_type == LIST_MENU) || (MMI_current_menu_type == PAGE_MENU))
  2171.         {
  2172.             dm_data.s32CatId = MMI_CATEGORY15_LIST_ID;
  2173.         }
  2174.         else
  2175.         {
  2176.             dm_data.s32CatId = MMI_CATEGORY15_MATRIX_ID;
  2177.         }
  2178.         dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND | DM_NO_STATUS_BAR;
  2179.         dm_setup_data(&dm_data);
  2180.         dm_redraw_category_screen();
  2181.         /* START VIJAY PMT 20050930 */
  2182.     }
  2183.     /* END VIJAY PMT 20050930 */
  2184. }   /* end of ShowCategory15Screen */
  2185. /*****************************************************************************
  2186.  * FUNCTION
  2187.  *  ExitCategory15Screen
  2188.  * DESCRIPTION
  2189.  *  Exits the category15 screen
  2190.  * PARAMETERS
  2191.  *  void
  2192.  * RETURNS
  2193.  *  void
  2194.  *****************************************************************************/
  2195. void ExitCategory15Screen(void)
  2196. {
  2197.     /*----------------------------------------------------------------*/
  2198.     /* Local Variables                                                */
  2199.     /*----------------------------------------------------------------*/
  2200.     /*----------------------------------------------------------------*/
  2201.     /* Code Body                                                      */
  2202.     /*----------------------------------------------------------------*/
  2203.     ClearHighlightHandler();
  2204.     reset_softkeys();
  2205.     reset_menu_shortcut_handler();
  2206.     reset_fixed_list();
  2207.     reset_fixed_matrix();
  2208.     /* START VIJAY PMT 20051202 */
  2209. #ifdef UI_SMALL_LIST_SCREEN
  2210.     restore_small_screen();
  2211. #endif 
  2212.     /* END VIJAY PMT 20051202 */
  2213. }
  2214. /* START VIJAY PMT 20050930 */
  2215. #ifdef UI_SMALL_LIST_SCREEN     /* PMT   MANISH   20050705 */
  2216. UI_filled_area *fixed_list_backup_filler;
  2217. S32 cat10_list_item_num = 0;
  2218. /*****************************************************************************
  2219.  * FUNCTION
  2220.  *  ExitCategory10Screen
  2221.  * DESCRIPTION
  2222.  *  
  2223.  * PARAMETERS
  2224.  *  void
  2225.  * RETURNS
  2226.  *  void
  2227.  *****************************************************************************/
  2228. void ExitCategory10Screen(void)
  2229. {
  2230.     /*----------------------------------------------------------------*/
  2231.     /* Local Variables                                                */
  2232.     /*----------------------------------------------------------------*/
  2233.     /*----------------------------------------------------------------*/
  2234.     /* Code Body                                                      */
  2235.     /*----------------------------------------------------------------*/
  2236. #ifdef __MMI_UI_SMALL_SCREEN_SUPPORT__
  2237.     reset_small_screen();
  2238. #endif 
  2239.     MMI_fixed_list_menu.normal_filler = fixed_list_backup_filler;
  2240. //#ifdef __MMI_WALLPAPER_ON_BOTTOM__//111306 popup title
  2241.     title_bg_id = 0;
  2242. //#endif
  2243.     show_status_icon_bar(0);//052906 early status icon
  2244.     ExitListCategoryScreen();
  2245.     entry_full_screen();
  2246. }
  2247. #define UI_SMALL_LIST_SCREEN_WITHOUT_TITLE
  2248. #define MMI_SMALL_SCREEN_MAX_LIST_ITEMS_COUNT 5
  2249. /*****************************************************************************
  2250.  * FUNCTION
  2251.  *  DrawCate10CategoryControlArea
  2252.  * DESCRIPTION
  2253.  *  
  2254.  * PARAMETERS
  2255.  *  coordinate      [?]     
  2256.  * RETURNS
  2257.  *  void
  2258.  *****************************************************************************/
  2259. void DrawCate10CategoryControlArea(dm_coordinates *coordinate)
  2260. {
  2261.     /*----------------------------------------------------------------*/
  2262.     /* Local Variables                                                */
  2263.     /*----------------------------------------------------------------*/
  2264.     S32 x1, x2, y1, y2;
  2265.     /*----------------------------------------------------------------*/
  2266.     /* Code Body                                                      */
  2267.     /*----------------------------------------------------------------*/
  2268.     /* UNUSEDPARAMETER(coordinate); */
  2269.     gui_greyscale_rectangle(0, 0, UI_device_width - 1, UI_device_height - 1, 20, 1);
  2270.     x1 = MMI_SMALL_LIST_LEFT_OFFSET - 1;
  2271.     x2 = MMI_SMALL_LIST_SCREEN_WIDTH + 2;
  2272. #ifdef UI_SMALL_LIST_SCREEN_WITHOUT_TITLE
  2273.     y1 = UI_device_height - MMI_button_bar_height - (4 + get_menu_item_height() * cat10_list_item_num + 4 + 5) - 2;
  2274. #else /* UI_SMALL_LIST_SCREEN_WITHOUT_TITLE */ 
  2275.     y1 = UI_device_height - MMI_button_bar_height - MMI_title_height - (4 +
  2276.                                                                         get_menu_item_height() * cat10_list_item_num +
  2277.                                                                         4 + 5) - 2;
  2278. #endif /* UI_SMALL_LIST_SCREEN_WITHOUT_TITLE */ 
  2279.     y2 = UI_device_height - MMI_button_bar_height;
  2280.     gui_draw_filled_area(x1, y1, x2, y2, (current_MMI_theme->small_list_screen_border_filler));
  2281. }
  2282. /*****************************************************************************
  2283.  * FUNCTION
  2284.  *  ShowCategory10Screen
  2285.  * DESCRIPTION
  2286.  *  
  2287.  * PARAMETERS
  2288.  *  title                   [IN]        
  2289.  *  title_icon              [IN]        
  2290.  *  left_softkey            [IN]        
  2291.  *  left_softkey_icon       [IN]        
  2292.  *  right_softkey           [IN]        
  2293.  *  right_softkey_icon      [IN]        
  2294.  *  number_of_items         [IN]        
  2295.  *  list_of_items           [?]         
  2296.  *  list_of_icons           [?]         
  2297.  *  highlighted_item        [IN]        
  2298.  *  history_buffer          [?]         
  2299.  * RETURNS
  2300.  *  void
  2301.  *****************************************************************************/
  2302. void ShowCategory10Screen(
  2303.         U16 title,
  2304.         U16 title_icon,
  2305.         U16 left_softkey,
  2306.         U16 left_softkey_icon,
  2307.         U16 right_softkey,
  2308.         U16 right_softkey_icon,
  2309.         S32 number_of_items,
  2310.         U16 *list_of_items,
  2311.         U16 *list_of_icons,
  2312.         S32 highlighted_item,
  2313.         U8 *history_buffer)
  2314. {
  2315.     /*----------------------------------------------------------------*/
  2316.     /* Local Variables                                                */
  2317.     /*----------------------------------------------------------------*/
  2318.     dm_data_struct dm_data;
  2319.     S32 i, icon_width = 0, icon_height = 0;
  2320.     color c = *(current_MMI_theme->UI_black_color);
  2321.     U8 h_flag, flag = 0;
  2322.     /*----------------------------------------------------------------*/
  2323.     /* Code Body                                                      */
  2324.     /*----------------------------------------------------------------*/
  2325.     MMI_title_x = MMI_SMALL_SCREEN_X_OFFSET + 1;
  2326.     MMI_title_y += MMI_title_height + MMI_SMALL_SCREEN_Y_OFFSET;
  2327.     MMI_title_width -= (2 * MMI_SMALL_SCREEN_X_OFFSET + 1);
  2328.     gdi_layer_lock_frame_buffer();
  2329. #ifdef __MMI_UI_SMALL_SCREEN_SUPPORT__
  2330.     set_small_screen();
  2331.     gui_add_cleanup_hook(disable_resized_small_screen);
  2332. #endif /* __MMI_UI_SMALL_SCREEN_SUPPORT__ */ 
  2333.     hide_status_icon_bar(0);//052906 early status icon
  2334.     
  2335.     create_fixed_icontext_menuitems();
  2336.     associate_fixed_icontext_list();
  2337.     fixed_list_backup_filler = MMI_fixed_list_menu.normal_filler;
  2338.     MMI_fixed_list_menu.normal_filler = (current_MMI_theme->small_list_menu_normal_filler);
  2339.     wgui_set_disable_shortcut_display();
  2340.     ShowListCategoryScreen(
  2341.         get_string(title),
  2342.         get_image(title_icon),
  2343.         get_string(left_softkey),
  2344.         get_image(left_softkey_icon),
  2345.         get_string(right_softkey),
  2346.         get_image(right_softkey_icon),
  2347.         number_of_items);
  2348.     if (list_of_icons == NULL)
  2349.     {
  2350.         for (i = 0; i < number_of_items; i++)
  2351.         {
  2352.             add_fixed_icontext_item(get_string(list_of_items[i]), NULL);
  2353.         }
  2354.     }
  2355.     else
  2356.     {
  2357.         for (i = 0; i < number_of_items; i++)
  2358.         {
  2359.             add_fixed_icontext_item(get_string(list_of_items[i]), wgui_get_list_menu_icon(i, list_of_icons[i]));
  2360.             if (list_of_icons[i] != 0)
  2361.             {
  2362.                 flag = 1;
  2363.                 gui_measure_image(get_image(list_of_icons[i]), &icon_width, &icon_height);
  2364.             }
  2365.         }
  2366.     }
  2367.     if (number_of_items <= MMI_SMALL_SCREEN_MAX_LIST_ITEMS_COUNT)
  2368.     {
  2369.         cat10_list_item_num = number_of_items;
  2370.         MMI_fixed_list_menu.flags |= UI_LIST_MENU_DISABLE_SCROLLBAR;
  2371.         resize_fixed_list(MMI_SMALL_LIST_SCREEN_WIDTH - 3, get_menu_item_height() * number_of_items);
  2372.         resize_fixed_icontext_menuitems(MMI_SMALL_LIST_SCREEN_WIDTH - 3, 0);
  2373.         move_fixed_list(
  2374.             MMI_SMALL_LIST_LEFT_OFFSET + 1,
  2375.             UI_device_height - MMI_button_bar_height - (4 + get_menu_item_height() * number_of_items + 4 + 5) + 4);
  2376.     }
  2377.     else
  2378.     {
  2379.         cat10_list_item_num = MMI_SMALL_SCREEN_MAX_LIST_ITEMS_COUNT;
  2380.         resize_fixed_list(
  2381.             MMI_SMALL_LIST_SCREEN_WIDTH - 3,
  2382.             get_menu_item_height() * MMI_SMALL_SCREEN_MAX_LIST_ITEMS_COUNT);
  2383.         resize_fixed_icontext_menuitems(MMI_SMALL_LIST_SCREEN_WIDTH - 3 - MMI_fixed_list_menu.vbar.width, 0);
  2384.         move_fixed_list(
  2385.             MMI_SMALL_LIST_LEFT_OFFSET + 1,
  2386.             UI_device_height - MMI_button_bar_height - (4 + get_menu_item_height() * MMI_SMALL_SCREEN_MAX_LIST_ITEMS_COUNT + 4 + 5) + 4);
  2387.     }
  2388.     h_flag = set_list_menu_category_history(MMI_CATEGORY10_ID, history_buffer);
  2389.     if (h_flag)
  2390.     {
  2391.         fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
  2392.     }
  2393.     else
  2394.     {
  2395.         fixed_list_goto_item_no_redraw(highlighted_item);
  2396.     }
  2397. //#ifdef __MMI_WALLPAPER_ON_BOTTOM__//110306 popup title
  2398.     title_bg_id = IMG_FLEXIBLE_TITLEBAR_BG;
  2399. //#endif
  2400.     gdi_layer_unlock_frame_buffer();
  2401.     RedrawCategoryFunction = dm_redraw_category_screen;
  2402.     ExitCategoryFunction = ExitCategory10Screen;
  2403.     GetCategoryHistory = dm_get_category_history;
  2404.     GetCategoryHistorySize = dm_get_category_history_size;
  2405.     dm_data.s32ScrId = (S32) GetActiveScreenId();
  2406.     dm_data.s32CatId = MMI_CATEGORY10_ID;
  2407.     dm_data.s32flags = 0;
  2408.     dm_add_rectangle(c, DM_RECTANGLE_FILL_GRAYSCALE);
  2409.     dm_setup_data(&dm_data);
  2410.     dm_register_category_controlled_callback(DrawCate10CategoryControlArea);
  2411.     dm_redraw_category_screen();
  2412. }
  2413. #endif /* UI_SMALL_LIST_SCREEN */ 
  2414. /* END VIJAY PMT 20050930 */
  2415. /*****************************************************************************
  2416.  * FUNCTION
  2417.  *  ShowCategory21Screen
  2418.  * DESCRIPTION
  2419.  *  Displays the category21 screen
  2420.  * PARAMETERS
  2421.  *  title                   [IN]        Title for the screen
  2422.  *  title_icon              [IN]        Icon shown with the title
  2423.  *  left_softkey            [IN]        Left softkey label
  2424.  *  left_softkey_icon       [IN]        Icon for the left softkey
  2425.  *  right_softkey           [IN]        Right softkey label
  2426.  *  right_softkey_icon      [IN]        
  2427.  *  message                 [IN]        Notification message (string. Not string ID)
  2428.  *  history_buffer          [IN]        History buffer
  2429.  *  right_softkey_iconIN Icon for the right softkey(?)
  2430.  * RETURNS
  2431.  *  void
  2432.  *****************************************************************************/
  2433. void ShowCategory21Screen(
  2434.         U16 title,
  2435.         U16 title_icon,
  2436.         U16 left_softkey,
  2437.         U16 left_softkey_icon,
  2438.         U16 right_softkey,
  2439.         U16 right_softkey_icon,
  2440.         U16 message,
  2441.         U8 *history_buffer)
  2442. {
  2443.     /*----------------------------------------------------------------*/
  2444.     /* Local Variables                                                */
  2445.     /*----------------------------------------------------------------*/
  2446.     dm_data_struct dm_data;
  2447.     /*----------------------------------------------------------------*/
  2448.     /* Code Body                                                      */
  2449.     /*----------------------------------------------------------------*/
  2450.     UI_UNUSED_PARAMETER(history_buffer);
  2451.     gdi_layer_lock_frame_buffer();
  2452.     MMI_menu_shortcut_number = -1;
  2453.     change_left_softkey(left_softkey, left_softkey_icon);
  2454.     change_right_softkey(right_softkey, right_softkey_icon);
  2455.     SetupCategoryKeyHandlers();
  2456.     MMI_title_string = (UI_string_type) get_string(title);
  2457.     MMI_title_icon = (PU8) get_image(title_icon);
  2458.     MMI_message_string = (UI_string_type) get_string(message);
  2459.     create_multiline_inputbox_set_buffer(
  2460.         MMI_message_string,
  2461.         gui_strlen((UI_string_type) MMI_message_string),
  2462.         gui_strlen((UI_string_type) MMI_message_string),
  2463.         0);
  2464.     SetKeyHandler(multiline_inputbox_previous_line, KEY_UP_ARROW, KEY_EVENT_DOWN);
  2465.     SetKeyHandler(multiline_inputbox_next_line, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
  2466.     MMI_multiline_inputbox.flags |=
  2467.         (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND);
  2468.     gdi_layer_unlock_frame_buffer();
  2469.     ExitCategoryFunction = MMI_dummy_function;
  2470.     RedrawCategoryFunction = dm_redraw_category_screen;
  2471.     GetCategoryHistory = dm_get_category_history;
  2472.     GetCategoryHistorySize = dm_get_category_history_size;
  2473.     dm_data.s32ScrId = (S32) GetActiveScreenId();
  2474.     dm_data.s32CatId = MMI_CATEGORY21_ID;
  2475.     dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
  2476.     dm_setup_data(&dm_data);
  2477.     dm_redraw_category_screen();
  2478. }   /* end of ShowCategory21Screen */
  2479. /*****************************************************************************
  2480.  * FUNCTION
  2481.  *  ShowCategory22Screen
  2482.  * DESCRIPTION
  2483.  *  Displays the category22 screen
  2484.  * PARAMETERS
  2485.  *  title                   [IN]        Title for the screen
  2486.  *  title_icon              [IN]        Icon displayed with the title
  2487.  *  left_softkey            [IN]        Left softkey label
  2488.  *  left_softkey_icon       [IN]        Left softkey icon
  2489.  *  right_softkey           [IN]        Right softkey label
  2490.  *  right_softkey_icon      [IN]        Right softkey icon
  2491.  *  num_of_symbols          [IN]        Number of symbols
  2492.  *  MMI_symbols             [IN]        Symbols specific to application
  2493.  *  highlighted_item        [IN]        Default item to be highlighted (if there is no history)
  2494.  *  history_buffer          [IN]        History buffer
  2495.  * RETURNS
  2496.  *  void
  2497.  *****************************************************************************/
  2498. void ShowCategory22Screen(
  2499.         U16 title,
  2500.         U16 title_icon,
  2501.         U16 left_softkey,
  2502.         U16 left_softkey_icon,
  2503.         U16 right_softkey,
  2504.         U16 right_softkey_icon,
  2505.         S32 num_of_symbols,
  2506.         U8 **MMI_symbols,
  2507.         S32 highlighted_item,
  2508.         U8 *history_buffer)
  2509. {
  2510.     /*----------------------------------------------------------------*/
  2511.     /* Local Variables                                                */
  2512.     /*----------------------------------------------------------------*/
  2513.     dm_data_struct dm_data;
  2514.     S32 i;
  2515.     U8 h_flag;
  2516.     /*----------------------------------------------------------------*/
  2517.     /* Code Body                                                      */
  2518.     /*----------------------------------------------------------------*/
  2519.     /* PMT VIKAS START 20050720 */
  2520. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  2521.     gui_block_list_effect();
  2522. #endif 
  2523.     /* PMT VIKAS END 20050720 */
  2524.     gdi_layer_lock_frame_buffer();
  2525.     MMI_menu_shortcut_number = -1;
  2526.     change_left_softkey(left_softkey, left_softkey_icon);
  2527.     change_right_softkey(right_softkey, right_softkey_icon);
  2528.     SetupCategoryKeyHandlers();
  2529.     create_fixed_text_menuitems();
  2530.     associate_fixed_text_matrix();
  2531.     for (i = 0; i < num_of_symbols; i++)
  2532.     {
  2533.         add_fixed_text_item((UI_string_type) MMI_symbols[i]);
  2534.     }
  2535.     configure_fixed_matrix(24, 24, 0, 0); //Old:configure_fixed_matrix(19, 21, 0, 0);  //KP Jerry modify for display non-English symbol totally on 2007-4-17
  2536.     register_fixed_matrix_loop_keys();
  2537.     register_fixed_matrix_highlight_handler(standard_noshortcut_matrix_highlight_handler);
  2538.     MMI_current_menu_type = MATRIX_MENU;
  2539.     MMI_fixed_matrix_menu.flags |= UI_MATRIX_MENU_LOOP;
  2540.     h_flag = set_matrix_menu_category_history(MMI_CATEGORY22_ID, history_buffer);
  2541.     if (h_flag)
  2542.     {
  2543.         fixed_matrix_goto_item_no_redraw(MMI_fixed_matrix_menu.highlighted_item);
  2544.     }
  2545.     else
  2546.     {
  2547.         fixed_matrix_goto_item_no_redraw(highlighted_item);
  2548.     }
  2549.     MMI_disable_title_shortcut_display = 1;
  2550.     MMI_title_string = (UI_string_type) get_string(title);
  2551.     MMI_title_icon = (PU8) get_image(title_icon);
  2552.     gdi_layer_unlock_frame_buffer();
  2553.     ExitCategoryFunction = ExitCategory22Screen;
  2554.     RedrawCategoryFunction = dm_redraw_category_screen;
  2555.     GetCategoryHistory = dm_get_category_history;
  2556.     GetCategoryHistorySize = dm_get_category_history_size;
  2557.     dm_data.s32ScrId = (S32) GetActiveScreenId();
  2558.     dm_data.s32CatId = MMI_CATEGORY22_ID;
  2559.     dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
  2560.     dm_setup_data(&dm_data);
  2561.     dm_redraw_category_screen();
  2562. }   /* end of ShowCategory22Screen */
  2563. /*****************************************************************************
  2564.  * FUNCTION
  2565.  *  ExitCategory22Screen
  2566.  * DESCRIPTION
  2567.  *  Exits the category22 screen
  2568.  * PARAMETERS
  2569.  *  void
  2570.  * RETURNS
  2571.  *  void
  2572.  *****************************************************************************/
  2573. void ExitCategory22Screen(void)
  2574. {
  2575.     /*----------------------------------------------------------------*/
  2576.     /* Local Variables                                                */
  2577.     /*----------------------------------------------------------------*/
  2578.     /*----------------------------------------------------------------*/
  2579.     /* Code Body                                                      */
  2580.     /*----------------------------------------------------------------*/
  2581.     ClearHighlightHandler();
  2582.     /* PMT VIKAS START 20050720 */
  2583. #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
  2584.     gui_unblock_list_effect();
  2585. #endif 
  2586.     /* PMT VIKAS END 20050720 */
  2587.     reset_softkeys();
  2588.     reset_menu_shortcut_handler();
  2589.     reset_fixed_matrix();
  2590. }   /* end of ExitCategory22Screen */
  2591. /*****************************************************************************
  2592.  * FUNCTION
  2593.  *  GetCategory22HistorySize
  2594.  * DESCRIPTION
  2595.  *  Get category22 history size.
  2596.  * PARAMETERS
  2597.  *  void
  2598.  * RETURNS
  2599.  *  the size of history buffer
  2600.  *****************************************************************************/
  2601. S32 GetCategory22HistorySize(void)
  2602. {
  2603.     /*----------------------------------------------------------------*/
  2604.     /* Local Variables                                                */
  2605.     /*----------------------------------------------------------------*/
  2606.     /*----------------------------------------------------------------*/
  2607.     /* Code Body                                                      */
  2608.     /*----------------------------------------------------------------*/
  2609.     // TODO: need to revise.
  2610.     return (20);
  2611. }   /* end of GetCategory22HistorySize */
  2612. /*****************************************************************************
  2613.  * FUNCTION
  2614.  *  GetCategory22History
  2615.  * DESCRIPTION
  2616.  *  Get category22 history.
  2617.  * PARAMETERS
  2618.  *  history_buffer      [IN]        History buffer
  2619.  * RETURNS
  2620.  *  hitsory buffer
  2621.  *****************************************************************************/
  2622. U8 *GetCategory22History(U8 *history_buffer)
  2623. {
  2624.     /*----------------------------------------------------------------*/
  2625.     /* Local Variables                                                */
  2626.     /*----------------------------------------------------------------*/
  2627.     /*----------------------------------------------------------------*/
  2628.     /* Code Body                                                      */
  2629.     /*----------------------------------------------------------------*/
  2630.     get_matrix_menu_category_history(MMI_CATEGORY22_ID, history_buffer);
  2631.     return (history_buffer);
  2632. }   /* end of GetCategory22History */
  2633. /*****************************************************************************
  2634.  * FUNCTION
  2635.  *  category32_keyboard_key_handler
  2636.  * DESCRIPTION
  2637.  *  Key handler of category32 for WIN32
  2638.  * PARAMETERS
  2639.  *  vkey_code       [IN]        Type of key
  2640.  *  key_state       [IN]        State of key
  2641.  * RETURNS
  2642.  *  void
  2643.  *****************************************************************************/
  2644. void category32_keyboard_key_handler(S32 vkey_code, S32 key_state)
  2645. {
  2646. #if(MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32)
  2647.     /*----------------------------------------------------------------*/
  2648.     /* Local Variables                                                */
  2649.     /*----------------------------------------------------------------*/
  2650.     /*----------------------------------------------------------------*/
  2651.     /* Code Body                                                      */
  2652.     /*----------------------------------------------------------------*/
  2653.     if (key_state)
  2654.     {
  2655.         switch (vkey_code)
  2656.         {
  2657.             case 37:
  2658.                 multiline_inputbox_previous_line();
  2659.                 break;
  2660.             case 39:
  2661.                 multiline_inputbox_next_line();
  2662.                 break;
  2663.             case 38:
  2664.                 fixed_list_goto_previous_item();
  2665.                 break;
  2666.             case 40:
  2667.                 fixed_list_goto_next_item();
  2668.                 break;
  2669.         }
  2670.     }
  2671. #else /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */ 
  2672.     UI_UNUSED_PARAMETER(vkey_code);
  2673.     UI_UNUSED_PARAMETER(key_state);
  2674. #endif /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */ 
  2675. }   /* end of category32_keyboard_key_handler */
  2676. /*****************************************************************************
  2677.  * FUNCTION
  2678.  *  category32_list_highlight_handler
  2679.  * DESCRIPTION
  2680.  *  high light handler of category32
  2681.  * PARAMETERS
  2682.  *  item_index      [IN]        
  2683.  * RETURNS
  2684.  *  void
  2685.  *****************************************************************************/
  2686. void category32_list_highlight_handler(S32 item_index)
  2687. {
  2688.     /*----------------------------------------------------------------*/
  2689.     /* Local Variables                                                */
  2690.     /*----------------------------------------------------------------*/
  2691.     /*----------------------------------------------------------------*/
  2692.     /* Code Body                                                      */
  2693.     /*----------------------------------------------------------------*/
  2694.     MMI_menu_shortcut_number = item_index + 1;
  2695.     MMI_highlighted_item_text = get_item_text(item_index);
  2696.     gdi_layer_lock_frame_buffer();
  2697.     MMI_list_highlight_handler(item_index);
  2698.     gdi_layer_unlock_frame_buffer();
  2699. #if(UI_ENABLE_POP_UP_DESCRIPTIONS)
  2700.     gui_pop_up_description_stop_scroll();
  2701.     wgui_current_pop_up_description_index = item_index;
  2702. #endif /* (UI_ENABLE_POP_UP_DESCRIPTIONS) */ 
  2703. }
  2704. /*****************************************************************************
  2705.  * FUNCTION
  2706.  *  ShowCategory32Screen
  2707.  * DESCRIPTION
  2708.  *  Displays the Dynamic menu screen
  2709.  * PARAMETERS
  2710.  *  title                   [IN]        Title for the screen
  2711.  *  title_icon              [IN]        Icon displayed with the title
  2712.  *  left_softkey            [IN]        Left softkey label
  2713.  *  left_softkey_icon       [IN]        Left softkey icon
  2714.  *  right_softkey           [IN]        Right softkey label
  2715.  *  right_softkey_icon      [IN]        Right softkey icon
  2716.  *  number_of_items         [IN]        Number of items in the menu
  2717.  *  list_of_items           [IN]        Array of items
  2718.  *  list_of_icons           [IN]        Array of icons
  2719.  *  flags                   [IN]        Flags (see explanation below)
  2720.  *  highlighted_item        [IN]        Default item to be highlighted (if there is no history)
  2721.  *  history_buffer          [IN]        History buffer
  2722.  * RETURNS
  2723.  *  void
  2724.  *****************************************************************************/
  2725. void ShowCategory32Screen(
  2726.         U8 *title,
  2727.         PU8 title_icon,
  2728.         U8 *left_softkey,
  2729.         PU8 left_softkey_icon,
  2730.         U8 *right_softkey,
  2731.         PU8 right_softkey_icon,
  2732.         S32 number_of_items,
  2733.         U8 **list_of_items,
  2734.         PU8 *list_of_icons,
  2735.         S32 flags,
  2736.         S32 highlighted_item,
  2737.         U8 *history_buffer)
  2738. {
  2739.     /*----------------------------------------------------------------*/
  2740.     /* Local Variables                                                */
  2741.     /*----------------------------------------------------------------*/
  2742.     dm_data_struct dm_data;
  2743.     S32 i, l, shortcut_width;
  2744.     S32 x = 24;
  2745.     U8 flag = 0;
  2746.     U8 h_flag;
  2747.     /*----------------------------------------------------------------*/
  2748.     /* Code Body                                                      */
  2749.     /*----------------------------------------------------------------*/
  2750.     UI_UNUSED_PARAMETER(flags);
  2751.     gdi_layer_lock_frame_buffer();
  2752.     entry_full_screen();
  2753.     MMI_disable_title_shortcut_display = 1;
  2754.     MMI_menu_shortcut_number = -1;
  2755.     set_left_softkey_label((UI_string_type) left_softkey);
  2756.     set_left_softkey_icon(left_softkey_icon);
  2757.     set_right_softkey_label((UI_string_type) right_softkey);
  2758.     set_right_softkey_icon(right_softkey_icon);
  2759.     SetupCategoryKeyHandlers();
  2760.     shortcut_width = set_menu_item_count(number_of_items) + 7;
  2761.     create_fixed_icontext_menuitems();
  2762.     resize_fixed_list(MMI_content_width, UI_device_height - (MMI_title_height << 1) - MMI_button_bar_height);
  2763.     associate_fixed_icontext_list();
  2764.     for (i = 0; i < number_of_items; i++)
  2765.     {
  2766.         add_fixed_icontext_item((UI_string_type) list_of_items[i], list_of_icons[i]);
  2767.         if (list_of_icons[i] != UI_NULL_IMAGE)
  2768.         {
  2769.             flag = 1;
  2770.         }
  2771.     }
  2772.     register_fixed_list_keys();
  2773.     resize_fixed_icontext_menuitems(0, get_menu_item_height());
  2774.     if (flag)
  2775.     {
  2776.         set_fixed_icontext_positions(MMI_MENUITEM_HEIGHT + 2, 0, 1, 0);
  2777.     }
  2778.     else
  2779.     {
  2780.         set_fixed_icontext_positions(1, 0, 1, 0);
  2781.         MMI_fixed_icontext_menuitem.scroll_width = MMI_fixed_icontext_menuitem.width - 2;
  2782.     }
  2783.     register_fixed_list_highlight_handler(category32_list_highlight_handler);
  2784.     MMI_current_menu_type = LIST_MENU;
  2785.     h_flag = set_list_menu_category_history(MMI_CATEGORY32_ID, history_buffer);
  2786.     if (h_flag)
  2787.     {
  2788.         fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
  2789.     }
  2790.     else
  2791.     {
  2792.         fixed_list_goto_item_no_redraw(highlighted_item);
  2793.     }
  2794.     MMI_title_string = (UI_string_type) title;
  2795.     wgui_set_animation_image(x >> 1, (MMI_title_y + MMI_title_height), (PU8) title_icon);
  2796.     if (title_icon == NULL)
  2797.     {
  2798.         x = 0;
  2799.     }
  2800.     l = gui_strlen(MMI_title_string);
  2801.     create_multiline_inputbox_set_buffer(MMI_title_string, l, l, 0);
  2802.     MMI_multiline_inputbox.flags |= (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_VIEW_MODE);  /* |UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND); */
  2803.     SetKeyHandler(multiline_inputbox_previous_line, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  2804.     SetKeyHandler(multiline_inputbox_next_line, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  2805.     register_keyboard_key_handler(category32_keyboard_key_handler);
  2806.     disable_menu_shortcut_box_display = 1;
  2807.     register_fixed_list_shortcut_handler();
  2808.     resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
  2809.     gdi_layer_unlock_frame_buffer();
  2810.     ExitCategoryFunction = ExitCategory32Screen;
  2811.     RedrawCategoryFunction = dm_redraw_category_screen;
  2812.     GetCategoryHistory = dm_get_category_history;
  2813.     GetCategoryHistorySize = dm_get_category_history_size;
  2814.     dm_data.s32ScrId = (S32) GetActiveScreenId();
  2815.     dm_data.s32CatId = MMI_CATEGORY32_ID;
  2816.     dm_data.s32flags = 0;