wgui_categories.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:657k
源码类别:
MTK
开发平台:
C/C++
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * wgui_categories.c
- *
- * Project:
- * --------
- * MAUI
- *
- * Description:
- * ------------
- * Ordinary categories.
- *
- * Author:
- * -------
- * -------
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- /**
- * Copyright Notice
- * (c) 2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
- * Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
- * (It is illegal to remove this copyright notice from this software or any
- * portion of it)
- */
- /**********************************************************************************
- Filename: wgui_categories.c
- Author: manju, Vandana Mehtani, Vandana Dhawan
- Date Created: August-07-2002
- Contains: PixTel UI wrapper routines
- High Level Category screen wrappers.
- **********************************************************************************/
- #include "MMI_features.h"
- #include "stdC.h"
- #include "L4Dr1.h"
- #include "PixtelDataTypes.h"
- #include "GlobalDefs.h"
- #include "EventsGprot.h"
- #include "CustDataProts.h"
- #include "CustMenuRes.h"
- #include "HistoryGprot.h"
- #include "FrameworkStruct.h"
- #include "TimerEvents.h"
- #include "EventsDef.h"
- #include "Unicodexdcl.h"
- #include "gui_setting.h"
- #include "gui_themes.h"
- #include "wgui.h"
- #include "wgui_softkeys.h"
- #include "wgui_menu_shortcuts.h"
- #include "wgui_fixed_menus.h"
- #include "wgui_fixed_menuitems.h"
- #include "wgui_inputs.h"
- #include "wgui_status_icons.h"
- #include "wgui_datetime.h"
- #include "wgui_categories_defs.h"
- #include "wgui_categories_idlescreen.h"
- #include "wgui_categories_inputs.h"
- #include "wgui_categories_MM.h"
- #include "wgui_categories_sublcd.h"
- #include "wgui_categories_util.h"
- #include "wgui_dynamic_menus.h"
- #include "wgui_dynamic_menuitems.h"
- #include "wgui_asyncdynamic_menus.h"
- #include "wgui_asyncdynamic_menuitems.h"
- #include "wgui_draw_manager.h"
- #include "IdleAppDef.h"
- #include "IdleAppProt.h"
- #include "WallpaperDefs.h"
- #include "ScreenSaverDefs.h"
- #include "DebugInitDef.h"
- #include "MainMenuDef.h"
- #include "gdi_include.h" /* include for graphic lib */
- #include "SettingGProts.h"
- #include "ShortcutsDefs.h"
- #include "SimDetectionGexdcl.h"
- #include "PhoneBookTypes.h"
- #include "wgui_draw_manager.h" /* Add for Draw Manager */
- #include "wgui_touch_screen.h" /* for touch screen apis */
- #include "wgui_categories_util.h" /* 032305 Calvin added */
- #ifdef __MMI_UI_TAB_PANE__
- #include "wgui_tab.h"
- #endif
- #ifdef __MMI_AUDIO_PLAYER__
- /* dependent headers for AudioPlayerXXX.h" */
- #include "gui_data_types.h"
- #include "FrameworkStruct.h"
- #include "GlobalConstants.h"
- #include "mdi_datatype.h"
- #include "kal_release.h"
- #include "Conversions.h"
- #include "FileMgr.h"
- #include "AudioPlayerDef.h"
- #include "AudioPlayerType.h"
- #include "AudioPlayerProt.h"
- #include "AudioPlayerMainScreen.h"
- #endif /* __MMI_AUDIO_PLAYER__ */
- /* MTK Elvis for R2L characters */
- #include "BIDIDEF.h"
- #include "BIDIProt.h"
- #include "UCS2Prot.h"
- /* MTK end */
- #if defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)
- #include "SmsGuiInterfaceType.h"
- #include "wgui_categories_util.h"
- #endif /* defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__) */
- #if defined(__MMI_TOUCH_SCREEN__)
- #include "EditorPen.h"
- #include "wgui_virtual_keyboard.h"
- #endif /* defined(__MMI_TOUCH_SCREEN__) */
- #ifdef __MMI_EDITABLE_AUDIO_EQUALIZER__
- #ifdef __MMI_TOUCH_SCREEN__
- #include "TouchScreenGprot.h"
- #endif
- #include "SoundEffect.h"
- #endif /* __MMI_EDITABLE_AUDIO_EQUALIZER__ */
- /* PMT HIMANSHU START 20050729 */
- #if defined(__MMI_TOUCH_SCREEN__) && defined(__MMI_WALLPAPER_ON_BOTTOM__)
- #include "VolumeHandler.h"
- #endif
- /* PMT HIMANSHU END 20050729 */
- #if (defined(__MTK_TARGET__) && !defined(__MAUI_BASIC__) && !defined(__L1_STANDALONE__) && !defined(EMPTY_MMI))
- #include "bmt.h"
- #include "pwic.h"
- extern kal_bool custom_cfg_gpio_set_level(kal_uint8 gpio_dev_type, kal_uint8 gpio_dev_level);
- extern void setup_UI_wrappers(void);
- #endif /* (defined(__MTK_TARGET__) && !defined(__MAUI_BASIC__) && !defined(__L1_STANDALONE__) && !defined(EMPTY_MMI)) */
- #define MMI_CAT401_X_OFFSET 17
- #ifdef __MMI_UI_TAB_PANE__
- extern struct_tab_control MMI_tab_control;
- #endif
- /* for NFB progress bar images */
- extern U8 *nfb_progress_images[];
- #ifdef __MMI_BIDI_ALG__
- extern U8 visual_str[];
- #endif
- extern BOOL r2lMMIFlag;
- /* image store the image data of left arrow key */
- extern U8 inline_select_left_arrow_image[];
- /* image store the image data of right arrow key */
- extern U8 inline_select_right_arrow_image[];
- extern U8 matrix_main_menu_highlight_bitmap_data[];
- extern S32 GUI_current_fixed_icontext_list_menuitem_column;
- extern U16 StopMyTimer(U16 nTimerId);
- extern U16 StartMyTimerInt(U16 nTimerId, U32 nTimeDuration, oslTimerFuncPtr TimerExpiry, U8 alignment);
- /* Externals for graphics context switching */
- extern bitmap main_LCD_device_bitmap;
- extern bitmap sub_LCD_device_bitmap;
- extern bitmap *current_LCD_device_bitmap;
- /* store Main lcd width */
- extern S32 MAIN_LCD_device_width;
- /* store Main LCD height */
- extern S32 MAIN_LCD_device_height;
- extern BOOL dynamic_item_text_align_left;
- extern FuncPtr gExitFullScreenCallBack;
- void UI_set_main_LCD_graphics_context(void);
- void UI_set_sub_LCD_graphics_context(void);
- extern pBOOL GetShowAOC(void);
- extern S32 UI_get_font_height(UI_font_type f);
- extern void mtk_show_animation(S32 x, S32 y, U8 *image);
- extern void mtk_show_animation_frames(S32 x, S32 y, U8 *image, S32 start_frame);
- extern void UI_draw_horizontal_line(S32 x1, S32 x2, S32 y, color c);
- extern void UI_putpixel(S32 x, S32 y, color c);
- extern void UI_draw_vertical_line(S32 y1, S32 y2, S32 x, color c);
- extern void wgui_setup_singleline_inputbox(
- S32 x,
- S32 y,
- S32 width,
- S32 height,
- U8 *buffer,
- S32 buffer_size,
- U16 category_screen_ID,
- UI_string_type RSK_label,
- PU8 RSK_icon,
- U16 input_type,
- U8 *history_buffer,
- U8 information_bar_flag);
- extern void wgui_close_singleline_inputbox(void);
- extern void get_singleline_inputbox_category_history(U16 history_ID, U8 *history_buffer, S16 input_type);
- extern void move_slide_control_value(slide_control *s, S32 x, S32 y);
- extern void (*ExitCategoryFunction) (void);
- #ifdef __MMI_UI_LIST_TRANSITION__
- extern void set_list_transition(wgui_transition_styles style);
- extern wgui_transition_styles get_list_transition(void);
- extern void reset_list_transition(void);
- #endif /* __MMI_UI_LIST_TRANSITION__ */
- extern void dm_set_scr_bg_image_no_draw(U16 image_id, S8 *file_name, S32 x, S32 y, U8 opacity);
- #ifdef __MMI_T9__
- #include "T9Main.h" /* T9SynT9WithInputBox() */
- extern void InuptMethodEnterCategory5(void);
- #elif defined __MMI_ZI__
- extern void ZiInuptMethodEnterCategory5(void);
- //KP Jerry add on 2007-4-17 start
- #elif defined __MMI_CSTAR__
- extern void CstarInputMethodEnterCategory5(void);
- //KP Jerry add on 2007-4-17 end
- #elif defined __MMI_KA__
- extern void KonkaInuptMethodEnterCategory5(void);
- #elif defined __MMI_ITAP__
- /* under construction !*/
- #endif
- U8 category89_string_list[MAX_CATEGORY89_STRINGS][MAX_CATEGORY89_STRING_LENGTH];
- #ifdef __MMI_CALORIE__
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #endif /* __MMI_CALORIE__ */
- /* Store current menu type..matrix,list,circular */
- S32 MMI_current_menu_type = MATRIX_MENU;
- S32 volume_level_UI;
- #ifdef __MMI_IDLE_FULL_SCREEN__
- U16 on_idle_screen = 0;
- #endif
- U8 Category154Align = 0;
- U8 cat9_show_message = 0;
- /* a flagused to check if text dispaly in category125 is scrolling or not */
- U8 flag_scroll = FALSE;
- /* used by category125 to display valeu in dispaly valeu bar beliow title bar */
- U8 *disp_valuestr = NULL;
- /* used by categopry 125 */
- U8 *disp_barstr = NULL, *left_value = NULL, *right_value = NULL;
- S16 status_icon = 0;
- /* global variable store the image height,width ,and no_of_pixtel */
- S32 no_of_pixel = 0;
- /* store category142 image list */
- U16 *category_142_image_list = NULL;
- /* store the category142 image list inex */
- U8 **category_142_image_file_name_list = NULL;
- /* store the category142 image filename list inex */
- S32 *category_142_image_list_index = NULL;
- /* store number of items of category 142 */
- S32 category_142_image_list_n_items = 0;
- /* vertical scroll bar of category 142 */
- vertical_scrollbar category142_vbar;
- /* list of titles of category 142 */
- U8 **category_142_list_of_titles = NULL;
- #ifdef __MMI_EDITABLE_AUDIO_EQUALIZER__
- equalizer_setting_info g_audio_equalizer_current_setting_info; /* to store the values of currently accessed equal8izer setting */
- float one_pixel_represents; /* one pixel in each equalizer bar represents what value.... */
- float temp_float_var;
- extern void mmi_settings_audio_equalizer_change_sound_level(S16 change);
- extern U16 g_audio_equalizer_bar_start_x, g_audio_equalizer_bar_start_y;
- extern U16 g_audio_equalizer_bar_width, g_audio_equalizer_bar_height, g_audio_equalizer_dist_btw_bars;
- extern U16 g_audio_equalizer_scrollable_ht, g_audio_equalizer_unit_scroll;
- #endif /* __MMI_EDITABLE_AUDIO_EQUALIZER__ */
- /* category 154 message 1 y postition */
- S32 category_154_message1_y = 0;
- /* category 154 message 2 y position */
- S32 category_154_message2_y = 0;
- scrolling_text scroll_text_cat125;
- UI_string_type category155_slide_string = NULL;
- #if defined (__MMI_WALLPAPER_ON_BOTTOM__)
- static MMI_ID_TYPE idle_scr_bg_ID;
- static S8 *idle_scr_bg_filename;
- static S32 idle_scr_bg_x, idle_scr_bg_y;
- static U8 idle_scr_bg_opacity;
- static S32 idle_scr_bg_flags;//082906 scr_bg
- #endif /* defined (__MMI_WALLPAPER_ON_BOTTOM__) */
- extern U16 title_bg_id;
- U16 Cat402PercentageBarId = 0;
- /* Start of Common List Category Screen */
- extern PU8 subMenuDataPtrs[MAX_SUB_MENUS];
- #ifdef __J2ME__
- extern gdi_handle jui_layer_handle;
- extern void ExitCategory176Screen(void);
- #endif
- /* 061306 dummy category Start */
- U32 status_bar_flag[MAX_STATUS_ICON_BARS];
- /*****************************************************************************
- * FUNCTION
- * ExitCategoryDummyScreen
- * DESCRIPTION
- * Exits the dummy category screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategoryDummyScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- set_status_icon_bar_type(0, status_bar_flag[0]);
- set_status_icon_bar_type(1, status_bar_flag[1]);
- } /* end of ExitCategoryDummyScreen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategoryDummyScreen
- * DESCRIPTION
- * Set some global settings for category without drawing anything on the screen
- * PARAMETERS
- *
- * RETURNS
- *
- *****************************************************************************/
- void ShowCategoryDummyScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- status_bar_flag[0] = get_status_icon_bar_type(0);
- hide_status_icon_bar(0);
- status_bar_flag[1] = get_status_icon_bar_type(1);
- hide_status_icon_bar(1);
- ExitCategoryFunction = ExitCategoryDummyScreen;
- RedrawCategoryFunction = dm_redraw_category_screen;
- GetCategoryHistory = dummy_get_history;
- GetCategoryHistorySize = dummy_get_history_size;
- } /* end of ShowCategoryDummyScreen */
- /* 061306 dummy category End */
- /*****************************************************************************
- * FUNCTION
- * RedrawListCategoryScreen
- * DESCRIPTION
- * Redraw category function of current main lcd category scrren using list menu
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void RedrawListCategoryScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UI_TITLE_TRANSITION__
- S32 no_transition_in_title = 0;
- {
- #ifdef __MMI_UI_TAB_PANE__
- if (is_enabled_tab_pane())
- {
- tab_pane_modify_data();
- }
- #endif /* __MMI_UI_TAB_PANE__ */
- if ((gOnFullScreen & MMI_IN_FULL_SCREEN || gOnFullScreen & MMI_LEAVE_FULL_SCREEN) &&
- !(gOnFullScreen & MMI_LEAVE_FULL_IDLE_SCREEN))
- {
- no_transition_in_title = 1;
- }
- if (get_title_transition() != WGUI_TRANSITION_NONE && !no_transition_in_title)
- {
- draw_title();
- }
- }
- #else /* __MMI_UI_TITLE_TRANSITION__ */
- #ifdef __MMI_UI_TAB_PANE__
- if (is_enabled_tab_pane())
- {
- tab_pane_modify_data();
- }
- #endif /* __MMI_UI_TAB_PANE__ */
- #endif /* __MMI_UI_TITLE_TRANSITION__ */
- #ifdef __MMI_UI_LIST_TRANSITION__
- if (get_list_transition() == WGUI_TRANSITION_T2D)
- {
- draw_title();
- show_fixed_list();
- }
- #endif /* __MMI_UI_LIST_TRANSITION__ */
- gdi_layer_lock_frame_buffer();
- #if(UI_ENABLE_POP_UP_DESCRIPTIONS)
- gui_pop_up_description_stop_scroll();
- #endif
- #ifdef __MMI_WGUI_MINI_TAB_BAR__
- if (wgui_if_mini_tab_bar_enable() == MMI_TRUE)
- {
- move_fixed_list(MMI_fixed_list_menu.x, MMI_content_y + 5);
- resize_fixed_list(MMI_fixed_list_menu.width, MMI_fixed_list_menu.height - 5);
- wgui_show_mini_tab_bar();
- }
- #endif /* __MMI_WGUI_MINI_TAB_BAR__ */
- clear_buttonbar();
- show_title_status_icon();
- #ifdef __MMI_UI_TITLE_TRANSITION__
- if (no_transition_in_title || get_title_transition() == WGUI_TRANSITION_NONE)
- #endif
- //PMT VIKAS START 20051209
- //For transition, title function call should be from here
- draw_title();
- /* PMT VIKAS END 20051209 */
- #ifdef __MMI_UI_LIST_TRANSITION__
- if (get_list_transition() == WGUI_TRANSITION_NONE)
- #endif
- show_fixed_list();
- show_softkey_background();
- show_left_softkey();
- show_right_softkey();
- #ifdef __MMI_UI_TAB_PANE__
- if (is_enabled_tab_pane())
- {
- show_tab_pane();
- }
- #endif /* __MMI_UI_TAB_PANE__ */
- gdi_layer_unlock_frame_buffer();
- #ifdef __MMI_UI_LIST_TRANSITION__
- if (get_list_transition() == WGUI_TRANSITION_D2T)
- {
- show_fixed_list();
- }
- #endif /* __MMI_UI_LIST_TRANSITION__ */
- /* PMT VIKAS START 20051209 */
- #if defined(__MMI_UI_LIST_TRANSITION__) && (LIST_TRANSITION_STYLE_NON_BLOCKING == 1)
- if (get_list_transition() == WGUI_TRANSITION_T2D && is_in_nonblocking_list_transition() == 1)
- {
- gdi_layer_blt_previous(0, get_original_prev_list_y_value(), UI_device_width - 1, UI_device_height - 1);
- }
- else
- #endif /* defined(__MMI_UI_LIST_TRANSITION__) && (LIST_TRANSITION_STYLE_NON_BLOCKING == 1) */
- /* PMT VIKAS END 20051209 */
- gdi_layer_blt_previous(0, 0, UI_device_width - 1, UI_device_height - 1);
- } /* end of RedrawListCategoryScreen */
- /*****************************************************************************
- * FUNCTION
- * ExitListCategoryScreen
- * DESCRIPTION
- * Exit category function of current main lcd category scrren using list menu
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitListCategoryScreen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_disable_title_shortcut_display = 0; /* 042905 Calvin added */
- disable_menu_shortcut_box_display = 0;
- ClearHighlightHandler();
- reset_softkeys();
- reset_menu_shortcut_handler();
- reset_fixed_list();
- reset_pop_up_descriptions();
- #ifdef __MMI_UI_HINTS_IN_MENUITEM__
- reset_all_force_flags_for_hints();
- #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
- gui_unblock_list_effect();
- #endif
- #endif /* __MMI_UI_HINTS_IN_MENUITEM__ */
- } /* end of ExitListCategoryScreen */
- /*****************************************************************************
- * FUNCTION
- * GetListCategoryHistory
- * DESCRIPTION
- * Get category history function of current main lcd category scrren
- * using list menu
- * PARAMETERS
- * history_buffer [?]
- * history(?) [IN] Buffer store the valeu of history
- * RETURNS
- * void
- *****************************************************************************/
- U8 *GetListCategoryHistory(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- get_list_menu_category_history((U16) g_gui_current_catid, history_buffer);
- return (history_buffer);
- } /* end of GetListCategoryHistory */
- /*****************************************************************************
- * FUNCTION
- * SetListScreenFunctions
- * DESCRIPTION
- * Common functions to set ExitCategory, RedrawCategory, GetCategoryHistory
- * GetCategoryHistorySize functions.
- * PARAMETERS
- * cat_id [IN] Current category id
- * RETURNS
- * void
- *****************************************************************************/
- void SetListScreenFunctions(S32 cat_id)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ExitCategoryFunction = ExitListCategoryScreen;
- RedrawCategoryFunction = RedrawListCategoryScreen;
- GetCategoryHistory = GetListCategoryHistory;
- GetCategoryHistorySize = get_list_menu_category_history_size;
- g_gui_current_catid = cat_id;
- } /* end of SetListScreenFunctions */
- /*****************************************************************************
- * FUNCTION
- * ShowListCategoryScreen
- * DESCRIPTION
- * Common function to show category screens containing list menu.
- * PARAMETERS
- * title [IN] String of title
- * title_icon [IN] Icon of title
- * left_softkey [IN] String of left softkey
- * left_softkey_icon [IN] Icon of left softkey
- * right_softkey [IN] String of right softkey
- * right_softkey_icon [IN] Icon of right softkey
- * number_of_items [IN] Number of items in list menu
- * RETURNS
- * void
- *****************************************************************************/
- void ShowListCategoryScreen(
- UI_string_type title,
- PU8 title_icon,
- UI_string_type left_softkey,
- PU8 left_softkey_icon,
- UI_string_type right_softkey,
- PU8 right_softkey_icon,
- S32 number_of_items)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 shortcut_width;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- /* Title */
- MMI_title_string = title;
- MMI_title_icon = title_icon;
- /* ShortCut */
- if (!wgui_is_disable_shortcut_display())
- {
- MMI_menu_shortcut_number = -1;
- register_fixed_list_shortcut_handler();
- shortcut_width = set_menu_item_count(number_of_items) + 7;
- resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
- move_menu_shortcut_handler(MMI_title_x + MMI_title_width - MMI_menu_shortcut_box.width, MMI_title_y);
- register_hide_menu_shortcut(gui_redraw_menu_shortcut);
- }
- else
- {
- MMI_disable_title_shortcut_display = 1;
- disable_menu_shortcut_box_display = 1;
- }
- /* Softkeys */
- set_left_softkey_label(left_softkey);
- set_left_softkey_icon(left_softkey_icon);
- set_right_softkey_label(right_softkey);
- set_right_softkey_icon(right_softkey_icon);
- SetupCategoryKeyHandlers();
- /* List */
- MMI_current_menu_type = LIST_MENU;
- register_fixed_list_keys();
- resize_fixed_icontext_menuitems(0, MMI_MENUITEM_HEIGHT);
- 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 */
- register_fixed_list_highlight_handler(standard_list_highlight_handler);
- set_fixed_icontext_positions(MMI_MENUITEM_HEIGHT + 2, 0, 1, 0);
- gdi_layer_unlock_frame_buffer();
- } /* end of ShowListCategoryScreen */
- /* End of Common List Category Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory1Screen
- * DESCRIPTION
- * Displays the category1 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * number_of_items [IN] Number of items
- * list_of_items [IN] List of text items
- * highlighted_item [IN] Index of the item to be highlighted by default
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory1Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- U16 *list_of_items,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 i = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (i = 0; i < number_of_items; i++)
- {
- subMenuDataPtrs[i] = (PU8) get_string(list_of_items[i]);
- }
- #ifdef __MMI_UI_LIST_TRANSITION__
- if (!history_buffer)
- {
- set_list_transition(WGUI_TRANSITION_D2T);
- }
- #endif /* __MMI_UI_LIST_TRANSITION__ */
- ShowCategory6Screen(
- title,
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- number_of_items,
- subMenuDataPtrs,
- NULL,
- highlighted_item,
- history_buffer);
- #ifdef __MMI_UI_LIST_TRANSITION__
- #if(!LIST_TRANSITION_STYLE_NON_BLOCKING)
- reset_list_transition();
- #endif
- #endif /* __MMI_UI_LIST_TRANSITION__ */
- } /* end of ShowCategory1Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory2Screen
- * DESCRIPTION
- * Displays the category2 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the Left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * message [IN] Message string
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory2Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 message,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *message_str = NULL;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- message_str = (U8*) get_string((MMI_ID_TYPE) message);
- ShowCategory7Screen(
- title,
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- message_str,
- history_buffer);
- } /* end of ShowCategory2Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory6Screen
- * DESCRIPTION
- * Displays the category6 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * number_of_items [IN] Number of items
- * list_of_items [IN] List of text items.
- * list_of_descriptions [IN]
- * highlighted_item [IN] This is the default item that will be highlighted (if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory6Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- U8 **list_of_items,
- U8 **list_of_descriptions,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 i = 0,mm_bg_flags;
- U8 h_flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- resize_fixed_list(MMI_content_width, MMI_content_height); /* 031805 Calvin modified */
- create_fixed_text_menuitems();
- associate_fixed_text_list();
- MMI_disable_title_shortcut_display = 1;
- MMI_fixed_list_menu.flags |= UI_LIST_MENU_LOOP | UI_LIST_MENU_DISABLE_BACKGROUND | UI_LIST_MENU_DISABLE_BKGRND_IN_LAYER;
- ShowListCategoryScreen(
- get_string(title),
- get_image(title_icon),
- get_string(left_softkey),
- get_image(left_softkey_icon),
- get_string(right_softkey),
- get_image(right_softkey_icon),
- number_of_items);
- if (list_of_descriptions == NULL)
- {
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_text_item((UI_string_type) list_of_items[i]);
- wgui_pop_up_description_strings[i].text_strings[0] = NULL;
- }
- }
- else
- {
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_text_item((UI_string_type) list_of_items[i]);
- wgui_pop_up_description_strings[i].text_strings[0] = (UI_string_type) list_of_descriptions[i];
- }
- }
- resize_fixed_text_menuitems_to_list_width();
- resize_fixed_text_menuitems(0, MMI_MENUITEM_HEIGHT); /* 090605 Shortcut Calvin moved */
- h_flag = set_list_menu_category_history(MMI_CATEGORY6_ID, history_buffer);
- if (h_flag)
- {
- fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
- }
- else
- {
- fixed_list_goto_item_no_redraw(highlighted_item);
- }
- if (list_of_descriptions != NULL)
- {
- set_pop_up_descriptions(1, number_of_items, MMI_fixed_list_menu.highlighted_item);
- }
- gdi_layer_unlock_frame_buffer();
- wgui_set_title_bknd_display(MMI_FALSE);
- dm_set_scr_bg_image(IMG_GLOBAL_SUB_MENU_BG_2, NULL, -1, -1, current_MMI_theme->bg_opacity_full);
- dm_get_scr_bg_flag(&mm_bg_flags);
- dm_set_scr_bg_flag(mm_bg_flags | DM_SCR_BG_FORCE_SHOW);
- ExitCategoryFunction = ExitListCategoryScreen;
- RedrawCategoryFunction = dm_redraw_category_screen;
- GetCategoryHistory = dm_get_category_history;
- GetCategoryHistorySize = dm_get_category_history_size;
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY6_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND | DM_NO_STATUS_BAR;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory6Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory7Screen
- * DESCRIPTION
- * Displays the category7 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN]
- * message [IN] Notification message (string. Not string ID)
- * history_buffer [IN] History buffer
- * right_softkey_iconIN Icon for the right softkey(?)
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory7Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U8 *message,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 l;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(history_buffer);
- gdi_layer_lock_frame_buffer();
- MMI_menu_shortcut_number = -1;
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- MMI_title_string = (UI_string_type) get_string(title);
- MMI_title_icon = (PU8) get_image(title_icon);
- MMI_message_string = (UI_string_type) (message);
- l = gui_strlen(MMI_message_string);
- create_multiline_inputbox_set_buffer(MMI_message_string, l, l, 0);
- MMI_multiline_inputbox.flags |=
- (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND |
- UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory7Screen;
- RedrawCategoryFunction = dm_redraw_category_screen;
- GetCategoryHistory = dm_get_category_history;
- GetCategoryHistorySize = dm_get_category_history_size;
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY7_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory7Screen */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory7Screen
- * DESCRIPTION
- * Exits the category7 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory7Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- reset_softkeys();
- } /* end of ExitCategory7Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory8Screen
- * DESCRIPTION
- * Displays the category8 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN]
- * message [IN] Notification message
- * message_icon [IN]
- * history_buffer [IN] History buffer
- * image(?) [IN] Notification image
- * right_softkey_iconIN Icon for the right softkey(?)
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory8Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 message,
- U16 message_icon,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ShowCategory66Screen(
- title,
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- (U8*) get_string(message),
- message_icon,
- history_buffer);
- } /* end of ShowCategory8Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory208Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * title [IN]
- * title_icon [IN]
- * left_softkey [IN]
- * left_softkey_icon [IN]
- * right_softkey [IN]
- * right_softkey_icon [IN]
- * message [?]
- * message_icon [IN]
- * history_buffer [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory208Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S8 *message,
- U16 message_icon,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ShowCategory66Screen(
- title,
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- (U8*) message,
- message_icon,
- history_buffer);
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory9Screen
- * DESCRIPTION
- * Displays the category9 screen
- * PARAMETERS
- * message [IN] Message string
- * message_icon [IN]
- * history_buffer [IN] History buffer
- * icon(?) [IN] Message icon
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory9Screen(U16 message, U16 message_icon, U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 l;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- dm_reset_context();
- UI_UNUSED_PARAMETER(history_buffer);
- gdi_layer_lock_frame_buffer();
- entry_full_screen();
- MMI_menu_shortcut_number = -1;
- clear_category_screen_key_handlers();
- clear_left_softkey();
- clear_right_softkey();
- if (message != 0)
- {
- MMI_message_string = (UI_string_type) get_string(message);
- l = gui_strlen(MMI_message_string);
- create_multiline_inputbox_set_buffer(MMI_message_string, l, l, 0);
- MMI_multiline_inputbox.flags |=
- (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_CENTER_JUSTIFY |
- UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND | UI_MULTI_LINE_INPUT_BOX_DISABLE_SCROLLBAR);
- }
- else
- {
- MMI_multiline_inputbox.flags |= UI_MULTI_LINE_INPUT_BOX_DISABLE_DRAW;
- }
- dm_add_image(get_image(message_icon), NULL, NULL);
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = UI_dummy_function;
- RedrawCategoryFunction = dm_redraw_category_screen;
- GetCategoryHistory = dm_get_category_history;
- GetCategoryHistorySize = dm_get_category_history_size;
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY9_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory9Screen */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory9Screen
- * DESCRIPTION
- * Exits the category9 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory9Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_hide_animations();
- } /* end of ExitCategory9Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory11Screen
- * DESCRIPTION
- * Displays the category11 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * number_of_items [IN] Number of items
- * list_of_items [IN] List of text items
- * highlighted_item [IN] Zero based index of the highlighed item (used if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory11Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- U16 *list_of_items,
- U16 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 i = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (i = 0; i < number_of_items; i++)
- {
- subMenuDataPtrs[i] = (PU8) get_string(list_of_items[i]);
- }
- ShowCategory36Screen(
- title,
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- number_of_items,
- subMenuDataPtrs,
- highlighted_item,
- history_buffer);
- } /* end of ShowCategory11Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory12Screen
- * DESCRIPTION
- * (two state menuitem)
- * Displays the Category12 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * number_of_items [IN] Number of items
- * list_of_items [IN] List of text items
- * list_of_states [IN] Array containing the states of the items
- * highlighted_item [IN] Zero based index of the highlighed item (used if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory12Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- U8 **list_of_items,
- U8 *list_of_states,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 i;
- U8 h_flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- /* Setup menuitem */
- create_fixed_twostate_menuitems(get_image(CHECKBOX_ON_IMAGE_ID), get_image(CHECKBOX_OFF_IMAGE_ID));
- associate_fixed_twostate_list();
- ShowListCategoryScreen(
- get_string(title),
- get_image(title_icon),
- get_string(left_softkey),
- get_image(left_softkey_icon),
- get_string(right_softkey),
- get_image(right_softkey_icon),
- number_of_items);
- resize_fixed_twostate_menuitems(0, MMI_MENUITEM_HEIGHT); /* 092005 twostate Calvin added */
- set_fixed_twostate_positions(MMI_MENUITEM_HEIGHT, 0, 1, 0); /* 092005 twostate Calvin added */
- set_left_softkey_function(standard_check_list_handle_left_softkey_up, KEY_EVENT_UP);
- checklist_category_menu_item_states = list_of_states;
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_twostate_item((UI_string_type) list_of_items[i]);
- if (list_of_states[i])
- {
- select_fixed_twostate_item(i);
- }
- }
- /* Read History */
- h_flag = set_list_menu_category_history(MMI_CATEGORY12_ID, history_buffer);
- if (h_flag)
- {
- fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
- }
- else
- {
- fixed_list_goto_item_no_redraw(highlighted_item);
- }
- /* Leo remove for test */
- /* register_menu_shortcut_selected(standard_check_list_handle_item_select); */
- resize_fixed_twostate_menuitems_to_list_width();
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitListCategoryScreen;
- RedrawCategoryFunction = dm_redraw_category_screen;
- GetCategoryHistory = dm_get_category_history;
- GetCategoryHistorySize = dm_get_category_history_size;
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY12_ID;
- dm_data.s32flags = 0;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory12Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory13Screen
- * DESCRIPTION
- * Displays the Category13 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Icon for the right softkey
- * number_of_items [IN] Number of items
- * list_of_items [IN] List of text items
- * list_of_states [IN] Array containing the states of the items
- * highlighted_item [IN] Zero based index of the highlighed item (used if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory13Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- U16 *list_of_items,
- U8 *list_of_states,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 i = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (i = 0; i < number_of_items; i++)
- {
- subMenuDataPtrs[i] = (PU8) get_string(list_of_items[i]);
- }
- ShowCategory12Screen(
- title,
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- number_of_items,
- subMenuDataPtrs,
- list_of_states,
- highlighted_item,
- history_buffer);
- } /* end of ShowCategory13Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory15Screen
- * DESCRIPTION
- * Displays the category15 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon displayed with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Left softkey icon
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Right softkey icon
- * number_of_items [IN] Number of items in the menu
- * list_of_items [IN] Array of items
- * list_of_icons [IN] Array of icons
- * flags [IN] (see explanation below)
- * highlighted_item [IN] Default item to be highlighted (if there is no history)
- * history_buffer [IN] History buffer
- * LIST_MENU(?) [IN]
- * Values(?) [IN] Allowed for these 8 bits are:
- * MATRIX_MENU(?) [IN]
- * The(?) [IN] Last 8 bits of flags represent the type of the menu.
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory15Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- U16 *list_of_items,
- U16 *list_of_icons,
- S32 flags,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- #ifdef UI_SMALL_LIST_SCREEN
- if (whether_no_small_screen())
- {
- ShowCategory10Screen(
- title,
- title_icon,
- left_softkey,
- left_softkey_icon,
- right_softkey,
- right_softkey_icon,
- number_of_items,
- list_of_items,
- list_of_icons,
- highlighted_item,
- history_buffer);
- }
- else
- #endif /* UI_SMALL_LIST_SCREEN */
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 i, shortcut_width, ixsize, iysize;
- U8 h_flag,mm_bg_flags;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gdi_layer_lock_frame_buffer();
- MMI_menu_shortcut_number = -1;
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- create_fixed_icontext_menuitems();
- MMI_current_menu_type = flags & 0x0f;
- MMI_title_string = (UI_string_type) get_string(title);
- MMI_title_icon = (PU8) get_image(title_icon);
- switch (MMI_current_menu_type)
- {
- case LIST_MENU:
- /* resize_fixed_list(MMI_content_width,MMI_content_height+2); */
- resize_fixed_list(MMI_content_width, MMI_content_height); /* 031705 Calvin modified */
- associate_fixed_icontext_list();
- MMI_disable_title_shortcut_display = 1;
- MMI_fixed_list_menu.flags |= UI_LIST_MENU_LOOP | UI_LIST_MENU_DISABLE_BACKGROUND | UI_LIST_MENU_DISABLE_BKGRND_IN_LAYER;
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_icontext_item(get_string(list_of_items[i]), wgui_get_list_menu_icon(i, list_of_icons[i]));
- }
- register_fixed_list_shortcut_handler();
- register_fixed_list_keys();
- shortcut_width = set_menu_item_count(number_of_items) + 7;
- resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
- move_menu_shortcut_handler(UI_device_width - MMI_menu_shortcut_box.width, MMI_title_y);
- register_hide_menu_shortcut(gui_redraw_menu_shortcut);
- /* resize_fixed_icontext_menuitems(0,get_menu_item_height());//041205 Calvin modified */
- resize_fixed_icontext_menuitems(0, MMI_MENUITEM_HEIGHT);
- set_fixed_icontext_positions(MMI_ICONTEXT_MENUITEM_HEIGHT + 2, 0, 1, 0);
- register_fixed_list_highlight_handler(standard_list_highlight_handler);
- h_flag = set_list_menu_category_history(MMI_CATEGORY15_LIST_ID, history_buffer);
- if (h_flag)
- {
- fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
- }
- else
- {
- fixed_list_goto_item_no_redraw(highlighted_item);
- }
- break;
- case MATRIX_MENU:
- associate_fixed_icontext_matrix();
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_icontext_item(get_string(list_of_items[i]), get_image(list_of_icons[i]));
- }
- register_fixed_matrix_shortcut_handler();
- MMI_fixed_matrix_menu.flags |= UI_MATRIX_MENU_LOOP;
- register_fixed_matrix_loop_keys();
- register_fixed_matrix_highlight_handler(standard_animated_matrix_highlight_handler_type2);
- if (number_of_items > 9)
- {
- ixsize = (MMI_content_width - MMI_fixed_matrix_menu.vbar.width - 6) / 3;
- }
- else
- {
- ixsize = (MMI_content_width - 6) / 3;
- }
- iysize = (MMI_content_height - 6) / 3;
- configure_fixed_matrix(ixsize, iysize, 3, 0);
- shortcut_width = set_menu_item_count(number_of_items) + 7;
- resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
- move_menu_shortcut_handler(UI_device_width - MMI_menu_shortcut_box.width, MMI_title_y);
- register_hide_menu_shortcut(gui_redraw_menu_shortcut);
- set_fixed_icontext_positions(0, 0, 0, 0);
- MMI_fixed_icontext_menuitem.flags |= UI_MENUITEM_DISABLE_TEXT_DISPLAY;
- MMI_disable_title_shortcut_display = 0;
- h_flag = set_matrix_menu_category_history(MMI_CATEGORY15_MATRIX_ID, history_buffer);
- if (h_flag)
- {
- fixed_matrix_goto_item_no_redraw(MMI_fixed_matrix_menu.highlighted_item);
- }
- else
- {
- fixed_matrix_goto_item_no_redraw(highlighted_item);
- }
- break;
- }
- gdi_layer_unlock_frame_buffer();
- wgui_set_title_bknd_display(MMI_FALSE);
- dm_set_scr_bg_image(IMG_GLOBAL_SUB_MENU_BG_2, NULL, -1, -1, current_MMI_theme->bg_opacity_full);
- dm_get_scr_bg_flag(&mm_bg_flags);
- dm_set_scr_bg_flag(mm_bg_flags | DM_SCR_BG_FORCE_SHOW);
- ExitCategoryFunction = ExitCategory15Screen;
- RedrawCategoryFunction = dm_redraw_category_screen;
- GetCategoryHistory = dm_get_category_history;
- GetCategoryHistorySize = dm_get_category_history_size;
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- if ((MMI_current_menu_type == LIST_MENU) || (MMI_current_menu_type == PAGE_MENU))
- {
- dm_data.s32CatId = MMI_CATEGORY15_LIST_ID;
- }
- else
- {
- dm_data.s32CatId = MMI_CATEGORY15_MATRIX_ID;
- }
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND | DM_NO_STATUS_BAR;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- /* START VIJAY PMT 20050930 */
- }
- /* END VIJAY PMT 20050930 */
- } /* end of ShowCategory15Screen */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory15Screen
- * DESCRIPTION
- * Exits the category15 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory15Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ClearHighlightHandler();
- reset_softkeys();
- reset_menu_shortcut_handler();
- reset_fixed_list();
- reset_fixed_matrix();
- /* START VIJAY PMT 20051202 */
- #ifdef UI_SMALL_LIST_SCREEN
- restore_small_screen();
- #endif
- /* END VIJAY PMT 20051202 */
- }
- /* START VIJAY PMT 20050930 */
- #ifdef UI_SMALL_LIST_SCREEN /* PMT MANISH 20050705 */
- UI_filled_area *fixed_list_backup_filler;
- S32 cat10_list_item_num = 0;
- /*****************************************************************************
- * FUNCTION
- * ExitCategory10Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory10Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UI_SMALL_SCREEN_SUPPORT__
- reset_small_screen();
- #endif
- MMI_fixed_list_menu.normal_filler = fixed_list_backup_filler;
- //#ifdef __MMI_WALLPAPER_ON_BOTTOM__//111306 popup title
- title_bg_id = 0;
- //#endif
- show_status_icon_bar(0);//052906 early status icon
- ExitListCategoryScreen();
- entry_full_screen();
- }
- #define UI_SMALL_LIST_SCREEN_WITHOUT_TITLE
- #define MMI_SMALL_SCREEN_MAX_LIST_ITEMS_COUNT 5
- /*****************************************************************************
- * FUNCTION
- * DrawCate10CategoryControlArea
- * DESCRIPTION
- *
- * PARAMETERS
- * coordinate [?]
- * RETURNS
- * void
- *****************************************************************************/
- void DrawCate10CategoryControlArea(dm_coordinates *coordinate)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 x1, x2, y1, y2;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* UNUSEDPARAMETER(coordinate); */
- gui_greyscale_rectangle(0, 0, UI_device_width - 1, UI_device_height - 1, 20, 1);
- x1 = MMI_SMALL_LIST_LEFT_OFFSET - 1;
- x2 = MMI_SMALL_LIST_SCREEN_WIDTH + 2;
- #ifdef UI_SMALL_LIST_SCREEN_WITHOUT_TITLE
- y1 = UI_device_height - MMI_button_bar_height - (4 + get_menu_item_height() * cat10_list_item_num + 4 + 5) - 2;
- #else /* UI_SMALL_LIST_SCREEN_WITHOUT_TITLE */
- y1 = UI_device_height - MMI_button_bar_height - MMI_title_height - (4 +
- get_menu_item_height() * cat10_list_item_num +
- 4 + 5) - 2;
- #endif /* UI_SMALL_LIST_SCREEN_WITHOUT_TITLE */
- y2 = UI_device_height - MMI_button_bar_height;
- gui_draw_filled_area(x1, y1, x2, y2, (current_MMI_theme->small_list_screen_border_filler));
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory10Screen
- * DESCRIPTION
- *
- * PARAMETERS
- * title [IN]
- * title_icon [IN]
- * left_softkey [IN]
- * left_softkey_icon [IN]
- * right_softkey [IN]
- * right_softkey_icon [IN]
- * number_of_items [IN]
- * list_of_items [?]
- * list_of_icons [?]
- * highlighted_item [IN]
- * history_buffer [?]
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory10Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 number_of_items,
- U16 *list_of_items,
- U16 *list_of_icons,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 i, icon_width = 0, icon_height = 0;
- color c = *(current_MMI_theme->UI_black_color);
- U8 h_flag, flag = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_title_x = MMI_SMALL_SCREEN_X_OFFSET + 1;
- MMI_title_y += MMI_title_height + MMI_SMALL_SCREEN_Y_OFFSET;
- MMI_title_width -= (2 * MMI_SMALL_SCREEN_X_OFFSET + 1);
- gdi_layer_lock_frame_buffer();
- #ifdef __MMI_UI_SMALL_SCREEN_SUPPORT__
- set_small_screen();
- gui_add_cleanup_hook(disable_resized_small_screen);
- #endif /* __MMI_UI_SMALL_SCREEN_SUPPORT__ */
- hide_status_icon_bar(0);//052906 early status icon
- create_fixed_icontext_menuitems();
- associate_fixed_icontext_list();
- fixed_list_backup_filler = MMI_fixed_list_menu.normal_filler;
- MMI_fixed_list_menu.normal_filler = (current_MMI_theme->small_list_menu_normal_filler);
- wgui_set_disable_shortcut_display();
- ShowListCategoryScreen(
- get_string(title),
- get_image(title_icon),
- get_string(left_softkey),
- get_image(left_softkey_icon),
- get_string(right_softkey),
- get_image(right_softkey_icon),
- number_of_items);
- if (list_of_icons == NULL)
- {
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_icontext_item(get_string(list_of_items[i]), NULL);
- }
- }
- else
- {
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_icontext_item(get_string(list_of_items[i]), wgui_get_list_menu_icon(i, list_of_icons[i]));
- if (list_of_icons[i] != 0)
- {
- flag = 1;
- gui_measure_image(get_image(list_of_icons[i]), &icon_width, &icon_height);
- }
- }
- }
- if (number_of_items <= MMI_SMALL_SCREEN_MAX_LIST_ITEMS_COUNT)
- {
- cat10_list_item_num = number_of_items;
- MMI_fixed_list_menu.flags |= UI_LIST_MENU_DISABLE_SCROLLBAR;
- resize_fixed_list(MMI_SMALL_LIST_SCREEN_WIDTH - 3, get_menu_item_height() * number_of_items);
- resize_fixed_icontext_menuitems(MMI_SMALL_LIST_SCREEN_WIDTH - 3, 0);
- move_fixed_list(
- MMI_SMALL_LIST_LEFT_OFFSET + 1,
- UI_device_height - MMI_button_bar_height - (4 + get_menu_item_height() * number_of_items + 4 + 5) + 4);
- }
- else
- {
- cat10_list_item_num = MMI_SMALL_SCREEN_MAX_LIST_ITEMS_COUNT;
- resize_fixed_list(
- MMI_SMALL_LIST_SCREEN_WIDTH - 3,
- get_menu_item_height() * MMI_SMALL_SCREEN_MAX_LIST_ITEMS_COUNT);
- resize_fixed_icontext_menuitems(MMI_SMALL_LIST_SCREEN_WIDTH - 3 - MMI_fixed_list_menu.vbar.width, 0);
- move_fixed_list(
- MMI_SMALL_LIST_LEFT_OFFSET + 1,
- UI_device_height - MMI_button_bar_height - (4 + get_menu_item_height() * MMI_SMALL_SCREEN_MAX_LIST_ITEMS_COUNT + 4 + 5) + 4);
- }
- h_flag = set_list_menu_category_history(MMI_CATEGORY10_ID, history_buffer);
- if (h_flag)
- {
- fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
- }
- else
- {
- fixed_list_goto_item_no_redraw(highlighted_item);
- }
- //#ifdef __MMI_WALLPAPER_ON_BOTTOM__//110306 popup title
- title_bg_id = IMG_FLEXIBLE_TITLEBAR_BG;
- //#endif
- gdi_layer_unlock_frame_buffer();
- RedrawCategoryFunction = dm_redraw_category_screen;
- ExitCategoryFunction = ExitCategory10Screen;
- GetCategoryHistory = dm_get_category_history;
- GetCategoryHistorySize = dm_get_category_history_size;
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY10_ID;
- dm_data.s32flags = 0;
- dm_add_rectangle(c, DM_RECTANGLE_FILL_GRAYSCALE);
- dm_setup_data(&dm_data);
- dm_register_category_controlled_callback(DrawCate10CategoryControlArea);
- dm_redraw_category_screen();
- }
- #endif /* UI_SMALL_LIST_SCREEN */
- /* END VIJAY PMT 20050930 */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory21Screen
- * DESCRIPTION
- * Displays the category21 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon shown with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Icon for the left softkey
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN]
- * message [IN] Notification message (string. Not string ID)
- * history_buffer [IN] History buffer
- * right_softkey_iconIN Icon for the right softkey(?)
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory21Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- U16 message,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(history_buffer);
- gdi_layer_lock_frame_buffer();
- MMI_menu_shortcut_number = -1;
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- MMI_title_string = (UI_string_type) get_string(title);
- MMI_title_icon = (PU8) get_image(title_icon);
- MMI_message_string = (UI_string_type) get_string(message);
- create_multiline_inputbox_set_buffer(
- MMI_message_string,
- gui_strlen((UI_string_type) MMI_message_string),
- gui_strlen((UI_string_type) MMI_message_string),
- 0);
- SetKeyHandler(multiline_inputbox_previous_line, KEY_UP_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(multiline_inputbox_next_line, KEY_DOWN_ARROW, KEY_EVENT_DOWN);
- MMI_multiline_inputbox.flags |=
- (UI_MULTI_LINE_INPUT_BOX_DISABLE_CURSOR_DRAW | UI_MULTI_LINE_INPUT_BOX_DISABLE_BACKGROUND);
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = MMI_dummy_function;
- RedrawCategoryFunction = dm_redraw_category_screen;
- GetCategoryHistory = dm_get_category_history;
- GetCategoryHistorySize = dm_get_category_history_size;
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY21_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory21Screen */
- /*****************************************************************************
- * FUNCTION
- * ShowCategory22Screen
- * DESCRIPTION
- * Displays the category22 screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon displayed with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Left softkey icon
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Right softkey icon
- * num_of_symbols [IN] Number of symbols
- * MMI_symbols [IN] Symbols specific to application
- * highlighted_item [IN] Default item to be highlighted (if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory22Screen(
- U16 title,
- U16 title_icon,
- U16 left_softkey,
- U16 left_softkey_icon,
- U16 right_softkey,
- U16 right_softkey_icon,
- S32 num_of_symbols,
- U8 **MMI_symbols,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 i;
- U8 h_flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* PMT VIKAS START 20050720 */
- #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
- gui_block_list_effect();
- #endif
- /* PMT VIKAS END 20050720 */
- gdi_layer_lock_frame_buffer();
- MMI_menu_shortcut_number = -1;
- change_left_softkey(left_softkey, left_softkey_icon);
- change_right_softkey(right_softkey, right_softkey_icon);
- SetupCategoryKeyHandlers();
- create_fixed_text_menuitems();
- associate_fixed_text_matrix();
- for (i = 0; i < num_of_symbols; i++)
- {
- add_fixed_text_item((UI_string_type) MMI_symbols[i]);
- }
- 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
- register_fixed_matrix_loop_keys();
- register_fixed_matrix_highlight_handler(standard_noshortcut_matrix_highlight_handler);
- MMI_current_menu_type = MATRIX_MENU;
- MMI_fixed_matrix_menu.flags |= UI_MATRIX_MENU_LOOP;
- h_flag = set_matrix_menu_category_history(MMI_CATEGORY22_ID, history_buffer);
- if (h_flag)
- {
- fixed_matrix_goto_item_no_redraw(MMI_fixed_matrix_menu.highlighted_item);
- }
- else
- {
- fixed_matrix_goto_item_no_redraw(highlighted_item);
- }
- MMI_disable_title_shortcut_display = 1;
- MMI_title_string = (UI_string_type) get_string(title);
- MMI_title_icon = (PU8) get_image(title_icon);
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory22Screen;
- RedrawCategoryFunction = dm_redraw_category_screen;
- GetCategoryHistory = dm_get_category_history;
- GetCategoryHistorySize = dm_get_category_history_size;
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY22_ID;
- dm_data.s32flags = DM_CLEAR_SCREEN_BACKGROUND;
- dm_setup_data(&dm_data);
- dm_redraw_category_screen();
- } /* end of ShowCategory22Screen */
- /*****************************************************************************
- * FUNCTION
- * ExitCategory22Screen
- * DESCRIPTION
- * Exits the category22 screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitCategory22Screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ClearHighlightHandler();
- /* PMT VIKAS START 20050720 */
- #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__
- gui_unblock_list_effect();
- #endif
- /* PMT VIKAS END 20050720 */
- reset_softkeys();
- reset_menu_shortcut_handler();
- reset_fixed_matrix();
- } /* end of ExitCategory22Screen */
- /*****************************************************************************
- * FUNCTION
- * GetCategory22HistorySize
- * DESCRIPTION
- * Get category22 history size.
- * PARAMETERS
- * void
- * RETURNS
- * the size of history buffer
- *****************************************************************************/
- S32 GetCategory22HistorySize(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- // TODO: need to revise.
- return (20);
- } /* end of GetCategory22HistorySize */
- /*****************************************************************************
- * FUNCTION
- * GetCategory22History
- * DESCRIPTION
- * Get category22 history.
- * PARAMETERS
- * history_buffer [IN] History buffer
- * RETURNS
- * hitsory buffer
- *****************************************************************************/
- U8 *GetCategory22History(U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- get_matrix_menu_category_history(MMI_CATEGORY22_ID, history_buffer);
- return (history_buffer);
- } /* end of GetCategory22History */
- /*****************************************************************************
- * FUNCTION
- * category32_keyboard_key_handler
- * DESCRIPTION
- * Key handler of category32 for WIN32
- * PARAMETERS
- * vkey_code [IN] Type of key
- * key_state [IN] State of key
- * RETURNS
- * void
- *****************************************************************************/
- void category32_keyboard_key_handler(S32 vkey_code, S32 key_state)
- {
- #if(MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32)
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (key_state)
- {
- switch (vkey_code)
- {
- case 37:
- multiline_inputbox_previous_line();
- break;
- case 39:
- multiline_inputbox_next_line();
- break;
- case 38:
- fixed_list_goto_previous_item();
- break;
- case 40:
- fixed_list_goto_next_item();
- break;
- }
- }
- #else /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */
- UI_UNUSED_PARAMETER(vkey_code);
- UI_UNUSED_PARAMETER(key_state);
- #endif /* (MMI_BUILD_TYPE == BUILD_TYPE_X86WIN32) */
- } /* end of category32_keyboard_key_handler */
- /*****************************************************************************
- * FUNCTION
- * category32_list_highlight_handler
- * DESCRIPTION
- * high light handler of category32
- * PARAMETERS
- * item_index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void category32_list_highlight_handler(S32 item_index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MMI_menu_shortcut_number = item_index + 1;
- MMI_highlighted_item_text = get_item_text(item_index);
- gdi_layer_lock_frame_buffer();
- MMI_list_highlight_handler(item_index);
- gdi_layer_unlock_frame_buffer();
- #if(UI_ENABLE_POP_UP_DESCRIPTIONS)
- gui_pop_up_description_stop_scroll();
- wgui_current_pop_up_description_index = item_index;
- #endif /* (UI_ENABLE_POP_UP_DESCRIPTIONS) */
- }
- /*****************************************************************************
- * FUNCTION
- * ShowCategory32Screen
- * DESCRIPTION
- * Displays the Dynamic menu screen
- * PARAMETERS
- * title [IN] Title for the screen
- * title_icon [IN] Icon displayed with the title
- * left_softkey [IN] Left softkey label
- * left_softkey_icon [IN] Left softkey icon
- * right_softkey [IN] Right softkey label
- * right_softkey_icon [IN] Right softkey icon
- * number_of_items [IN] Number of items in the menu
- * list_of_items [IN] Array of items
- * list_of_icons [IN] Array of icons
- * flags [IN] Flags (see explanation below)
- * highlighted_item [IN] Default item to be highlighted (if there is no history)
- * history_buffer [IN] History buffer
- * RETURNS
- * void
- *****************************************************************************/
- void ShowCategory32Screen(
- U8 *title,
- PU8 title_icon,
- U8 *left_softkey,
- PU8 left_softkey_icon,
- U8 *right_softkey,
- PU8 right_softkey_icon,
- S32 number_of_items,
- U8 **list_of_items,
- PU8 *list_of_icons,
- S32 flags,
- S32 highlighted_item,
- U8 *history_buffer)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- dm_data_struct dm_data;
- S32 i, l, shortcut_width;
- S32 x = 24;
- U8 flag = 0;
- U8 h_flag;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- UI_UNUSED_PARAMETER(flags);
- gdi_layer_lock_frame_buffer();
- entry_full_screen();
- MMI_disable_title_shortcut_display = 1;
- MMI_menu_shortcut_number = -1;
- set_left_softkey_label((UI_string_type) left_softkey);
- set_left_softkey_icon(left_softkey_icon);
- set_right_softkey_label((UI_string_type) right_softkey);
- set_right_softkey_icon(right_softkey_icon);
- SetupCategoryKeyHandlers();
- shortcut_width = set_menu_item_count(number_of_items) + 7;
- create_fixed_icontext_menuitems();
- resize_fixed_list(MMI_content_width, UI_device_height - (MMI_title_height << 1) - MMI_button_bar_height);
- associate_fixed_icontext_list();
- for (i = 0; i < number_of_items; i++)
- {
- add_fixed_icontext_item((UI_string_type) list_of_items[i], list_of_icons[i]);
- if (list_of_icons[i] != UI_NULL_IMAGE)
- {
- flag = 1;
- }
- }
- register_fixed_list_keys();
- resize_fixed_icontext_menuitems(0, get_menu_item_height());
- if (flag)
- {
- set_fixed_icontext_positions(MMI_MENUITEM_HEIGHT + 2, 0, 1, 0);
- }
- else
- {
- set_fixed_icontext_positions(1, 0, 1, 0);
- MMI_fixed_icontext_menuitem.scroll_width = MMI_fixed_icontext_menuitem.width - 2;
- }
- register_fixed_list_highlight_handler(category32_list_highlight_handler);
- MMI_current_menu_type = LIST_MENU;
- h_flag = set_list_menu_category_history(MMI_CATEGORY32_ID, history_buffer);
- if (h_flag)
- {
- fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item);
- }
- else
- {
- fixed_list_goto_item_no_redraw(highlighted_item);
- }
- MMI_title_string = (UI_string_type) title;
- wgui_set_animation_image(x >> 1, (MMI_title_y + MMI_title_height), (PU8) title_icon);
- if (title_icon == NULL)
- {
- x = 0;
- }
- l = gui_strlen(MMI_title_string);
- create_multiline_inputbox_set_buffer(MMI_title_string, l, l, 0);
- 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); */
- SetKeyHandler(multiline_inputbox_previous_line, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(multiline_inputbox_next_line, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- register_keyboard_key_handler(category32_keyboard_key_handler);
- disable_menu_shortcut_box_display = 1;
- register_fixed_list_shortcut_handler();
- resize_menu_shortcut_handler(shortcut_width, MMI_title_height);
- gdi_layer_unlock_frame_buffer();
- ExitCategoryFunction = ExitCategory32Screen;
- RedrawCategoryFunction = dm_redraw_category_screen;
- GetCategoryHistory = dm_get_category_history;
- GetCategoryHistorySize = dm_get_category_history_size;
- dm_data.s32ScrId = (S32) GetActiveScreenId();
- dm_data.s32CatId = MMI_CATEGORY32_ID;
- dm_data.s32flags = 0;