wgui_status_icons.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:176k
源码类别:
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_status_icons.c
- *
- * Project:
- * --------
- * MAUI
- *
- * Description:
- * ------------
- * This file is intends for status icon bars control.
- *
- * 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!
- *
- *------------------------------------------------------------------------------
- * 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_status_icons.c
- Author: manju
- Date Created: August-07-2002
- Contains: PixTel UI wrapper routines
- Status Icon wrappers
- **********************************************************************************/
- #include "wgui_status_icons.h"
- #include "gdi_include.h"
- /* To be removed later..and put in boot up init file..Right now needed for
- initializing status icon data */
- #include "CustDataRes.h"
- #include "StatusIconRes.h"
- #include "MMI_features.h"
- #include "SimDetectionGexdcl.h"
- #include "SimDetectionGprot.h"
- #include "IdleAppDef.h"
- #include "IdleAppProt.h"//110606 compile warning
- #ifdef __MMI_TOUCH_SCREEN__
- #include "wgui_touch_screen.h"
- #include "TouchScreenGprot.h"
- #endif /* __MMI_TOUCH_SCREEN__ */
- #if defined(__MMI_UI_TECHNO_STATUS_ICON__)
- #include "MainMenuDef.h"
- #endif
- #if defined(__MMI_UI_STATUS_BAR_AT_BOTTOM__)
- #include "wgui_categories_idlescreen.h"
- #endif
- #ifdef __MMI_DOWNLOADABLE_THEMES_SUPPORT__
- #include "ThemeManager.h"
- #endif
- //KP Jerry add for KP-Style 12-Matrix mainmenu on 2007-3-19 start
- #ifdef __MMI_KP_STYLE_MAIN_MENU_MATRIX__
- #include "MainMenuDef.h"
- #endif
- //KP Jerry add for KP-Style 12-Matrix mainmenu on 2007-3-19 end
- #ifdef __MMI_WLAN_FEATURES__
- #include "DataAccount.h"
- extern U8 mmi_netset_get_active_preferred_mode(void);
- #endif /* __MMI_WLAN_FEATURES__ */
- /* Externals for graphics context switching */
- extern bitmap main_LCD_device_bitmap;
- extern bitmap sub_LCD_device_bitmap;
- #if defined(__MMI_MAINLCD_176X220__) || defined (__MMI_MAINLCD_240X320__) /* 041205 Calvin modieid */
- extern MMI_BOOL if_full_screen_hide_status_icons(void);
- #endif
- extern MMI_BOOL PhnsetFlightModeHideButSaveStatusIcon(S16 icon_ID, U32 icon_flag);
- #ifdef __FLIGHT_MODE_SUPPORT__
- extern pBOOL gPowerOnWithFlightMode;
- #endif
- void UI_set_main_LCD_graphics_context(void);
- void UI_set_sub_LCD_graphics_context(void);
- extern bitmap *current_LCD_device_bitmap;
- extern BOOL IsClamClose(void);
- static U8 IsReArrangeNeeded = 0;
- /* Moved from down HIMANSHU modified */
- extern S32 MAIN_LCD_device_width;
- extern S32 MAIN_LCD_device_height;
- /* Setting this value to 1 will cause icons to be drawn from bottom baseline */
- /* Setting to 0 will cause icons to be drawn from center baseline */
- /* MTK added by JL for Joyce's request */
- #define STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE 1
- /* This is the customizable list of status icons */
- /* Use (x,y)=(0,0) for automatic positioning. Automatic positioning is */
- /* only valid with Icon bars having STATUS_ICON_BAR_ARRANGE_XXXXXXXX */
- /* Set width=0, height=0 for all icons. These values are autocalculated */
- /* If there is no icon, use IMAGE_ID_NULL for the MMI_ID_TYPE value */
- /* FLAGS: Set status icon specific flags here. Usually this value is 0 */
- /* STATE: Set the default state of a multi-state status icon here */
- /* GROUP: Set the group number for grouped icons here. */
- /* 0 = Icon is not grouped */
- /* PRIORITY: Set the status icon priority here. If there are more status */
- /* icons than what can be displayed in the status icon bar */
- /* area, priority is used to determine which icons are */
- /* displayed and which are not. */
- /* 0 = Icon is always displayed */
- /* IMAGE: Pointer to Icons image data. Autocalculated. Always set to NULL */
- /* NFRAMES: Number of frames in the image. Autocalculated. Always set to 0 */
- /* !!NOTE: Currently the priority field is dummy, the icons need to be */
- /* manually arranged according to the desired priority */
- /* Also, grouped icons need to be arranged consecutively in the list */
- MMI_status_icon MMI_status_icons[MAX_STATUS_ICONS] =
- {
- /* ICON_NUMBER X Y WIDTH HEIGHT MMI_ID_TYPE FLAGS STATE GROUP PRIORITY IMAGE NFRAMES */
- /* 0 */ {1, 2, 0, 0, IMG_SI_SIGNAL_STRENGTH, 0, 0, 0, 0, NULL, 0,},
- /* 1 */ {111, 4, 0, 0, IMG_SI_BATTERY_STRENGTH, 0, 0, 0, 0, NULL, 0,},
- #ifdef __MMI_WLAN_FEATURES__
- /* 54 */ {0, 0, 0, 0, IMG_ID_DTCNT_WLAN_STATUS_DISCONNECT, 0, 0, 0, 0, NULL, 0,},
- #endif
- #ifndef __MMI_STATUS_ICON_SIGNAL_WITH_LINE_SWITCH__ /* 022505 Calvin added */
- /* 2 */ {0, 0, 0, 0, IMG_SI_LINE_L1, 0, 0, 1, 0, NULL, 0,},
- /* 3 */ {0, 0, 0, 0, IMG_SI_LINE_L2, 0, 0, 1, 0, NULL, 0,},
- #endif /* __MMI_STATUS_ICON_SIGNAL_WITH_LINE_SWITCH__ */
- #if defined(__GSM_RAT__) && defined(__WCDMA_RAT__) /* 112805 3G icon Calvin */
- /* 4 */ {0, 0, 0, 0, IMG_SI_3G, 0, 0, 0, 0, NULL, 0,},
- /* 5 */ {0, 0, 0, 0, IMG_SI_2G, 0, 0, 0, 0, NULL, 0,},
- #endif /* defined(__GSM_RAT__) && defined(__WCDMA_RAT__) */
- #ifdef __MMI_VOIP__
- /* 5 */ {0, 0, 0, 0, IMG_SI_VOIP, 0, 0, 0, 0, NULL, 0,},//091806 voip icon
- #endif
- /* 6 */ {0, 0, 0, 0, IMG_SI_ROAMING_INDICATOR, 0, 0, 0, 0, NULL, 0,},
- /* 7 */ {0, 0, 0, 0, IMG_SI_CALL_DIVERT_L1L2, 0, 0, 2, 0, NULL, 0,},
- /* 8 */ {0, 0, 0, 0, IMG_SI_CALL_DIVERT_L1, 0, 0, 2, 0, NULL, 0,},
- /* 9 */ {0, 0, 0, 0, IMG_SI_CALL_DIVERT_L2, 0, 0, 2, 0, NULL, 0,},
- /* 10 */ {0, 0, 0, 0, IMG_SI_MUTE, 0, 0, 0, 0, NULL, 0,},
- /* 11 */ {0, 0, 0, 0, IMG_SI_SMS_INDICATOR, 0, 0, 0, 0, NULL, 0,},
- /* 12 */ {0, 0, 0, 0, IMG_SI_MMS_UNREAD_INDICATOR, 0, 0, 0, 0, NULL, 0,},
- /* 13 */ {0, 0, 0, 0, IMG_SI_MMS_BUSY_INDICATOR, 0, 0, 0, 0, NULL, 0,},
- /* 14 */ {0, 0, 0, 0, IMG_SI_VIBRATE, 0, 0, 3, 0, NULL, 0,},
- /* 15 */ {0, 0, 0, 0, IMG_SI_SILENT, 0, 0, 3, 0, NULL, 0,},
- /* 16 */ {0, 0, 0, 0, IMG_SI_RING, 0, 0, 3, 0, NULL, 0,},
- /* 17 */ {0, 0, 0, 0, IMG_SI_VIBRATE_AND_RING, 0, 0, 3, 0, NULL, 0,},
- /* 18 */ {0, 0, 0, 0, IMG_SI_VIBRATE_THEN_RING, 0, 0, 3, 0, NULL, 0,},
- /* 19 */ {0, 0, 0, 0, IMG_SI_GPRS_INDICATOR, 0, 0, 0, 0, NULL, 0,},
- /* 20 */ {0, 0, 0, 0, IMG_SI_GPRS_ATT_NO_PDP_INDICATOR, 0, 0, 0, 0, NULL, 0,},
- /* 010406 G icon Calvin */
- /* 21 */ {0, 0, 0, 0, IMG_SI_EARPHONE_INDICATOR, 0, 0, 0, 0, NULL, 0,},
- /* 22 */ {0, 0, 0, 0, IMG_SI_ALARM_ACTIVATED, 0, 0, 0, 0, NULL, 0,},
- /* 23 */ {0, 0, 0, 0, IMG_SI_VOICE_RECORD, 0, 0, 0, 0, NULL, 0,},
- /* 24 */ {0, 0, 0, 0, IMG_SI_KEYPAD_LOCK, 0, 0, 0, 0, NULL, 0,},
- /* 25 */ {0, 0, 0, 0, IMG_SI_MISSED_CALL_INDICATOR, 0, 0, 0, 0, NULL, 0,},
- /* 26 */ {0, 0, 0, 0, IMG_SI_UNREAD_VOICE_L1L2, 0, 0, 4, 0, NULL, 0,},
- /* 27 */ {0, 0, 0, 0, IMG_SI_UNREAD_VOICE_L1, 0, 0, 4, 0, NULL, 0,},
- /* 28 */ {0, 0, 0, 0, IMG_SI_UNREAD_VOICE_L2, 0, 0, 4, 0, NULL, 0,},
- /* 29 */ {0, 0, 0, 0, IMG_SI_UNREAD_FAX_L1L2, 0, 0, 5, 0, NULL, 0,},
- /* 30 */ {0, 0, 0, 0, IMG_SI_UNREAD_FAX_L1, 0, 0, 5, 0, NULL, 0,},
- /* 31 */ {0, 0, 0, 0, IMG_SI_UNREAD_FAX_L2, 0, 0, 5, 0, NULL, 0,},
- /* 32 */ {0, 0, 0, 0, IMG_SI_UNREAD_EMAIL_L1L2, 0, 0, 6, 0, NULL, 0,},
- /* 33 */ {0, 0, 0, 0, IMG_SI_UNREAD_EMAIL_L1, 0, 0, 6, 0, NULL, 0,},
- /* 34 */ {0, 0, 0, 0, IMG_SI_UNREAD_EMAIL_L2, 0, 0, 6, 0, NULL, 0,},
- /* 35 */ {0, 0, 0, 0, IMG_SI_IMPS_MSG, 0, 0, 8, 0, NULL, 0,},
- /* 36 */ {0, 0, 0, 0, IMG_SI_IMPS_LOGIN, 0, 0, 8, 0, NULL, 0,},
- /* 37 */ {0, 0, 0, 0, IMG_SI_WAP, 0, 0, 0, 0, NULL, 0,},
- /* 38 */ {0, 0, 0, 0, IMG_SI_POC, 0, 0, 0, 0, NULL, 0,},
- /* 030705 Calvin added */
- /* 39 */ {0, 0, 0, 0, IMG_SI_BT, 0, 0, 0, 0, NULL, 0,},
- /* 40 */ {0, 0, 0, 0, IMG_SI_BT_CON, 0, 0, 0, 0, NULL, 0,},
- /* 41 */ {0, 0, 0, 0, IMG_SI_BT_ND, 0, 0, 0, 0, NULL, 0,},
- /* 42 */ {0, 0, 0, 0, IMG_SI_IR_INDICATOR, 0, 0, 0, 0, NULL, 0,},
- /* 43 */ {0, 0, 0, 0, IMG_SI_STOPWATCH, 0, 0, 0, 0, NULL, 0,},
- /* 44 */ {0, 0, 0, 0, IMG_BLINKINGICON_CHAT_ROOM1, 0, 0, 0, 0, NULL, 0,},
- /* SMS Chat Status Icon - Gurinder 20/4/2004 */
- /* 45 */ {0, 0, 0, 0, IMG_BLINKINGICON_CHAT_ROOM2, 0, 0, 0, 0, NULL, 0,},
- /* */
- /* 46 */ {0, 0, 0, 0, IMG_SI_NETWORK_CIPHER_GSM, 0, 0, 0, 0, NULL, 0,},
- /* 021505 Calvin added */
- /* 47 */ {0, 0, 0, 0, IMG_SI_NETWORK_CIPHER_GPRS, 0, 0, 0, 0, NULL, 0,},
- /* 021505 Calvin added */
- /* 48 */ {0, 0, 0, 0, IMG_SI_JAVA_PAUSE, 0, 0, 0, 0, NULL, 0,},
- /* 031005 Calvin added */
- /* 101205 new icon Calvin Start */
- #ifdef __MMI_BG_SOUND_EFFECT__
- /* 49 */ {0, 0, 0, 0, IMG_SI_BGSND, 0, 0, 0, 0, NULL, 0,},
- #endif
- #ifdef __MMI_AUDIO_3D_EFFECT__
- /* 50 */ {0, 0, 0, 0, IMG_SI_3DSND, 0, 0, 0, 0, NULL, 0,},
- #endif
- #ifdef __MMI_HOMEZONE_STATUS_ICON__
- /* 51 */ {0, 0, 0, 0, IMG_SI_HZONE, 0, 0, 0, 0, NULL, 0,},
- /* 52 */ {0, 0, 0, 0, IMG_SI_CZONE, 0, 0, 0, 0, NULL, 0,},
- #endif /* __MMI_HOMEZONE_STATUS_ICON__ */
- #ifdef __CTM_SUPPORT__
- /* 53 */ {0, 0, 0, 0, IMG_SI_TTY_INDICATOR, 0, 0, 0, 0, NULL, 0,},
- #endif
- /* 101205 new icon Calvin End */
- /* Sublcd Start */
- /* 54 */ {0, 0, 0, 0, IMG_SLSI_SIGNAL_STRENGTH, 0, 0, 0, 0, NULL, 0,},
- /* 55 */ {36, 0, 0, 0, IMG_SLSI_BATTERY_STRENGTH, 0, 0, 0, 0, NULL, 0,},
- /* 56 */ {11, 2, 0, 0, IMG_SLSI_SMS_INDICATOR, 0, 0, 0, 0, NULL, 0,},
- /* 57 */ {24, 1, 0, 0, IMG_SLSI_RING, 0, 0, 7, 0, NULL, 0,},
- /* 58 */ {24, 1, 0, 0, IMG_SLSI_VIBRATE, 0, 0, 7, 0, NULL, 0,},
- /* 59 */ {24, 1, 0, 0, IMG_SLSI_VIBRATE_AND_RING, 0, 0, 7, 0, NULL, 0,},
- /* 60 */ {24, 1, 0, 0, IMG_SLSI_VIBRATE_THEN_RING, 0, 0, 7, 0, NULL, 0,},
- /* 61 */ {24, 1, 0, 0, IMG_SLSI_SILENT, 0, 0, 7, 0, NULL, 0,},
- /* 62 */ {24, 1, 0, 0, IMG_SLSI_ALARM, 0, 0, 0, 2, NULL, 0,},
- /* 63 */ {24, 1, 0, 0, IMG_SLSI_MISSED_CALL, 0, 0, 0, 2, NULL, 0,},
- };
- /* Pool of status icons used for the horizontal and vertical */
- /* status icon bars */
- /* MTK added by JL 040228 optimize code size */
- #define MMI_N_STATUS_ICONS_POOL1 ( sizeof(MMI_status_icons_pool1)/sizeof(MMI_status_icons_pool1[0]) ) /* 32 */
- /* store id of main lcd icon */
- const S16 MMI_status_icons_pool1[] =
- {
- STATUS_ICON_SIGNAL_STRENGTH,
- STATUS_ICON_BATTERY_STRENGTH,
- #ifdef __MMI_WLAN_FEATURES__
- STATUS_ICON_WLAN_SIGNAL,
- #endif /* __MMI_WLAN_FEATURES__ */
- #ifndef __MMI_STATUS_ICON_SIGNAL_WITH_LINE_SWITCH__
- STATUS_ICON_ALTERNATE_LINE_L1,
- STATUS_ICON_ALTERNATE_LINE_L2,
- #endif /* __MMI_STATUS_ICON_SIGNAL_WITH_LINE_SWITCH__ */
- #if defined(__GSM_RAT__) && defined(__WCDMA_RAT__) /* 112805 3G icon Calvin */
- STATUS_ICON_3G,
- STATUS_ICON_2G,
- #endif /* defined(__GSM_RAT__) && defined(__WCDMA_RAT__) */
- #ifdef __MMI_VOIP__//091806 voip icon
- STATUS_ICON_VOIP,
- #endif
- STATUS_ICON_ROAMING,
- STATUS_ICON_CALL_DIVERT_L1L2,
- STATUS_ICON_CALL_DIVERT_L1,
- STATUS_ICON_CALL_DIVERT_L2,
- STATUS_ICON_MUTE,
- STATUS_ICON_INCOMING_SMS,
- STATUS_ICON_MMS_UNREAD,
- STATUS_ICON_MMS_BUSY,
- STATUS_ICON_VIBRATION,
- STATUS_ICON_SILENT,
- STATUS_ICON_RING,
- STATUS_ICON_VIBRATE_AND_RING,
- STATUS_ICON_VIBRATE_THEN_RING,
- STATUS_ICON_GPRS_SERVICE,
- STATUS_ICON_GPRS_ATT_NO_PDP_INDICATOR, /* 010406 G icon Calvin */
- STATUS_ICON_EARPHONE_INDICATOR,
- STATUS_ICON_ALARM,
- STATUS_ICON_VOICE_RECORD,
- STATUS_ICON_KEYPAD_LOCK,
- STATUS_ICON_MISSED_CALL,
- STATUS_ICON_UNREAD_VOICE_L1L2,
- STATUS_ICON_UNREAD_VOICE_L1,
- STATUS_ICON_UNREAD_VOICE_L2,
- STATUS_ICON_UNREAD_FAX_L1L2,
- STATUS_ICON_UNREAD_FAX_L1,
- STATUS_ICON_UNREAD_FAX_L2,
- STATUS_ICON_UNREAD_EMAIL_L1L2,
- STATUS_ICON_UNREAD_EMAIL_L1,
- STATUS_ICON_UNREAD_EMAIL_L2,
- STATUS_ICON_IMPS_MSG,
- STATUS_ICON_IMPS_LOGIN,
- STATUS_ICON_WAP,
- STATUS_ICON_POC, /* 030705 Calvin added */
- STATUS_ICON_BT,
- STATUS_ICON_BT_CON,
- STATUS_ICON_BT_ND,
- STATUS_ICON_IR,
- STATUS_ICON_STOP_WATCH,
- STATUS_ICON_CHAT_INDICATION_ROOM1,
- STATUS_ICON_CHAT_INDICATION_ROOM2,
- STATUS_ICON_NETWORK_CIPHER_GSM,
- STATUS_ICON_NETWORK_CIPHER_GPRS,
- STATUS_ICON_JAVA_PAUSE
- /* 101205 new icon Calvin Start */
- #ifdef __MMI_BG_SOUND_EFFECT__
- ,
- STATUS_ICON_BG_SOUND
- #endif /* __MMI_BG_SOUND_EFFECT__ */
- #ifdef __MMI_AUDIO_3D_EFFECT__
- ,
- STATUS_ICON_3D_SOUND
- #endif /* __MMI_AUDIO_3D_EFFECT__ */
- #ifdef __MMI_HOMEZONE_STATUS_ICON__
- ,
- STATUS_ICON_HOMEZONE,
- STATUS_ICON_CITYZONE
- #endif /* __MMI_HOMEZONE_STATUS_ICON__ */
- #ifdef __CTM_SUPPORT__
- ,
- STATUS_ICON_TTY_INDICATOR
- #endif /* __CTM_SUPPORT__ */
- /* 101205 new icon Calvin End */
- };
- /* MTK added by JL 040228 optimize code size */
- #define MMI_N_STATUS_ICONS_POOL2 ( sizeof(MMI_status_icons_pool2)/sizeof(MMI_status_icons_pool2[0]) ) /* 8 */
- const S16 MMI_status_icons_pool2[] =
- {
- STATUS_ICON_SUBLCD_SIGNAL_STRENGTH,
- STATUS_ICON_SUBLCD_BATTERY_STRENGTH,
- STATUS_ICON_SUBLCD_SMS,
- STATUS_ICON_SUBLCD_RING,
- STATUS_ICON_SUBLCD_VIBRATE,
- STATUS_ICON_SUBLCD_VIBRATE_AND_RING,
- STATUS_ICON_SUBLCD_VIBRATE_THEN_RING,
- STATUS_ICON_SUBLCD_SILENT,
- STATUS_ICON_SUBLCD_ALARM,
- STATUS_ICON_SUBLCD_MISSED_CALL
- };
- #ifdef __MMI_LCD_PARTIAL_ON__
- #define MMI_N_STATUS_ICONS_POOL_PARTIAL_DISPLAY ( sizeof(MMI_status_icons_pool_partial_display)/sizeof(MMI_status_icons_pool_partial_display[0]) )
- /* For incoming events */
- const S16 MMI_status_icons_pool_partial_display[] =
- {
- STATUS_ICON_INCOMING_SMS,
- STATUS_ICON_MMS_UNREAD,
- STATUS_ICON_MISSED_CALL,
- STATUS_ICON_UNREAD_VOICE_L1L2,
- STATUS_ICON_UNREAD_VOICE_L1,
- STATUS_ICON_UNREAD_VOICE_L2,
- STATUS_ICON_UNREAD_EMAIL_L1L2,
- STATUS_ICON_UNREAD_EMAIL_L1,
- STATUS_ICON_UNREAD_EMAIL_L2,
- STATUS_ICON_IMPS_MSG,
- STATUS_ICON_WAP
- };
- #endif /* __MMI_LCD_PARTIAL_ON__ */
- S16 MMI_status_icons_list1[MMI_N_STATUS_ICONS_LIST1];
- /* store icons id of vertical status bar of main lcd */
- S16 MMI_status_icons_list2[MMI_N_STATUS_ICONS_LIST2];
- /* store icons id of horizontal status bar of sub lcd */
- S16 MMI_status_icons_list3[MMI_N_STATUS_ICONS_LIST3];
- #ifdef __MMI_LCD_PARTIAL_ON__
- S16 MMI_status_icons_list_partial_display[MMI_N_STATUS_ICONS_PARTIAL_DISPLAY];
- S16 MMI_status_icons_partial_display_n_icons;
- #endif /* __MMI_LCD_PARTIAL_ON__ */
- /* This is the customizable list of status icon bars */
- MMI_status_icon_bar MMI_status_icon_bars[MAX_STATUS_ICON_BARS];
- static S32 status_icon_display_area = DEFAULT_BOTH;
- /* Globals */
- /* Hide functions need to take x1,y1,x2,y2 as parameters */
- void (*MMI_hide_status_icon_bars[MAX_STATUS_ICON_BARS]) (void);
- U8 status_icon_display_ON = 0;
- U8 status_icon_blink_animate_ON = 0;
- U8 MMI_status_icons_blink_animate_ON_state = 0;
- //S32 status_icon_display_locked=0; 030705 Calvin removed
- //PMT VIKAS START 20050707
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- /* UI_status_bar_theme *current_status_bar_theme = NULL; */
- U8 is_status_bar_shuffled = 0;
- static S32 background_fill = 1;
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /* PMT VIKAS END 20050707 */
- #define SUBLCD_ALPHA_VALUE 30
- #ifdef __MMI_TOUCH_SCREEN__
- FuncPtr MMI_status_icon_pen_event_hdlr[MAX_STATUS_ICONS][WGUI_STATUS_ICON_BAR_PEN_EVENT_MAX];
- S16 pen_down_status_icon_id = -1;
- #endif /* __MMI_TOUCH_SCREEN__ */
- /* START VIJAY PMT 20060105 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- pBOOL g_status_bar_at_bottom = FALSE;
- /*****************************************************************************
- * FUNCTION
- * whether_status_bar_at_bottom
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- pBOOL whether_status_bar_at_bottom(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return g_status_bar_at_bottom;
- }
- /*****************************************************************************
- * FUNCTION
- * set_status_bar_at_bottom
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void set_status_bar_at_bottom(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_status_bar_at_bottom = TRUE;
- }
- /*****************************************************************************
- * FUNCTION
- * reset_status_bar_at_bottom
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void reset_status_bar_at_bottom(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_status_bar_at_bottom = FALSE;
- }
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- /* END VIJAY PMT 20060105 */
- /*****************************************************************************
- * FUNCTION
- * register_hide_status_icon_bar
- * DESCRIPTION
- * register hide function of status bar
- * PARAMETERS
- * status_bar_ID [IN] Bar id
- * f [IN] )(void) :- function pointer
- * horizontal(?) [IN] Bar :- sublcd
- * vertical(?) [IN] Bar main lcd
- * RETURNS
- * void
- *****************************************************************************/
- void register_hide_status_icon_bar(U8 status_bar_ID, void (*f) (void))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* register the hide function of status bar */
- MMI_hide_status_icon_bars[status_bar_ID] = f;
- }
- /*****************************************************************************
- * FUNCTION
- * clear_hide_status_icon_bars
- * DESCRIPTION
- * clear hide function of status bar
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void clear_hide_status_icon_bars(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* set the hide function to dummy function */
- for (i = 0; i < MAX_STATUS_ICON_BARS; i++)
- {
- if (MMI_status_icon_bars[i].graphics_context == current_LCD_device_bitmap)
- {
- MMI_hide_status_icon_bars[i] = UI_dummy_function;
- }
- }
- }
- #define TEST_STATUS_ICON_DISPLAY_ON(flags) (flags & (STATUS_ICON_ANIMATE|STATUS_ICON_REVERSE_ANIMATE|STATUS_ICON_FORWARD_ANIMATE|STATUS_ICON_BLINK|STATUS_ICON_DISABLED|STATUS_ICON_DISPLAY))
- /* PMT HIMANSHU START 20050625 */
- #if defined(__MMI_UI_TECHNO_STATUS_ICON__)
- extern void set_vertical_signal_status_icons(void);
- extern void set_horizontal_signal_status_icons(void);
- #endif /* defined(__MMI_UI_TECHNO_STATUS_ICON__) */
- /* PMT HIMANSHU END */
- /*****************************************************************************
- * FUNCTION
- * arrange_status_icons
- * DESCRIPTION
- * calulate the position of status icon of both main lcd (horizontal/vertical)
- * and sub lcd
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void arrange_status_icons(void)
- {
- #if(0) /* Original implementation: Temporarily disabled for worse performance */
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- s32 i,j,x,y,width,height;
- UI_image_type img;
- byte d=0;
- byte group_flag;
- for(j=0;j<MAX_STATUS_ICON_BARS;j++)
- { if(MMI_status_icon_bars[j].group_ID>0) group_flag=1;
- else group_flag=0;
- if(MMI_status_icon_bars[j].flags & STATUS_ICON_BAR_ARRANGE_DESCENDING) d=1;
- x=y=0;
- if(MMI_status_icon_bars[j].flags & STATUS_ICON_BAR_ARRANGE_HORIZONTAL)
- { if(d) /* Descending direction */
- { for(i=0;i<MMI_status_icon_bars[j].n_icons;i++)
- { if(MMI_status_icons[i].flags & (STATUS_ICON_DISPLAY|STATUS_ICON_BLINK|STATUS_ICON_ANIMATE))
- { img=MMI_status_icons[i].icon_data;
- pixtel_UI_measure_image(img,&width,&height);
- x-=(width+STATUS_ICON_X_GAP);
- MMI_status_icons[i].x=x;
- MMI_status_icons[i].y=y;
- }
- }
- }
- else /* Ascending direction */
- { for(i=0;i<MMI_status_icon_bars[j].n_icons;i++)
- { if(MMI_status_icons[i].flags & (STATUS_ICON_DISPLAY|STATUS_ICON_BLINK|STATUS_ICON_ANIMATE))
- { img=MMI_status_icons[i].icon_data;
- pixtel_UI_measure_image(img,&width,&height);
- MMI_status_icons[i].x=x;
- MMI_status_icons[i].y=y;
- x+=(width+STATUS_ICON_X_GAP);
- }
- }
- }
- }
- else if(MMI_status_icon_bars[j].flags & STATUS_ICON_BAR_ARRANGE_VERTICAL)
- { if(d) /* Descending direction */
- { for(i=0;i<MMI_status_icon_bars[j].n_icons;i++)
- { if(MMI_status_icons[i].flags & (STATUS_ICON_DISPLAY|STATUS_ICON_BLINK|STATUS_ICON_ANIMATE))
- { img=MMI_status_icons[i].icon_data;
- pixtel_UI_measure_image(img,&width,&height);
- y-=(height+STATUS_ICON_Y_GAP);
- MMI_status_icons[i].x=x;
- MMI_status_icons[i].y=y;
- }
- }
- }
- else /* Ascending direction */
- { for(i=0;i<MMI_status_icon_bars[j].n_icons;i++)
- { if(MMI_status_icons[i].flags & (STATUS_ICON_DISPLAY|STATUS_ICON_BLINK|STATUS_ICON_ANIMATE))
- { img=MMI_status_icons[i].icon_data;
- pixtel_UI_measure_image(img,&width,&height);
- MMI_status_icons[i].x=x;
- MMI_status_icons[i].y=y;
- y+=(height+STATUS_ICON_Y_GAP);
- }
- }
- }
- }
- }
- #else /* (0) */ /* Hardcoded implementation for better performance */
- S32 x1, y1, x2, y2, x, y, cx, cy;
- S32 i, j, k = 0, group_ID;
- U8 done = 0, inner_done, display_flag;
- S32 old_i; /* 122004 Calvin added */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Status bar 1: Horizontal bar */
- /* PMT HIMANSHU START 20050625 */
- #if defined(__MMI_UI_TECHNO_STATUS_ICON__)
- /* PMT VIKAS START 20051202 */
- if ((is_on_idlescreen() == 1) || (GetActiveScreenId() == MAIN_MENU_SCREENID))
- /* PMT VIKAS END 20051202 */
- {
- set_vertical_signal_status_icons();
- ChangeStatusIconImageWithoutReArrange(STATUS_ICON_BATTERY_STRENGTH, IMG_SI_BATTERY_STRENGTH_IDLE);
- MMI_status_icon_bars[0].n_icons = 0;
- }
- else
- {
- set_horizontal_signal_status_icons();
- ChangeStatusIconImageWithoutReArrange(STATUS_ICON_BATTERY_STRENGTH, IMG_SI_BATTERY_STRENGTH);
- MMI_status_icons_list1[0] = STATUS_ICON_SIGNAL_STRENGTH;
- MMI_status_icons_list1[1] = STATUS_ICON_BATTERY_STRENGTH;
- MMI_status_icon_bars[0].n_icons = 2;
- }
- /* PMT VIKAS START 20050707 */
- #elif defined(__MMI_UI_DALMATIAN_STATUSBAR__)
- /* PMT VIKAS START 20051202 */
- if (is_on_idlescreen() == 1)
- /* PMT VIKAS END 20051202 */
- {
- MMI_status_icon_bars[0].n_icons = 0; /* signal icon is now placed on title bar on idle screen. */
- }
- else
- {
- MMI_status_icons_list1[0] = STATUS_ICON_SIGNAL_STRENGTH;
- MMI_status_icon_bars[0].n_icons = 1;
- }
- /* PMT VIKAS END 20050707 */
- #else
- MMI_status_icons_list1[0] = STATUS_ICON_SIGNAL_STRENGTH;
- MMI_status_icons_list1[1] = STATUS_ICON_BATTERY_STRENGTH;
- MMI_status_icon_bars[0].n_icons = 2;
- #endif
- /* PMT HIMANSHU END */
- x1 = MMI_status_icon_bars[0].x1; /* start x position of horizontal status bar main lcd */
- y1 = MMI_status_icon_bars[0].y1; /* start y position of horizontal status bar main lcd */
- x2 = MMI_status_icon_bars[0].x2; /* end x position of horizontal status bar main lcd */
- y2 = MMI_status_icon_bars[0].y2; /* end y position of horizontal status bar main lcd */
- /* PMT HIMANSHU START 20050625 */
- #if defined(__MMI_UI_TECHNO_STATUS_ICON__)
- /* PMT VIKAS START 20051202 */
- if (is_on_idlescreen() == 0 && (!(GetActiveScreenId() == MAIN_MENU_SCREENID)))
- /* PMT VIKAS END 20051202 */
- {
- /* Shift x1,x2 assuming signal strength and battery strength icons are at either ends */
- x1 += MMI_status_icons[MMI_status_icons_list1[0]].width - 1 + STATUS_ICON_X_GAP;
- x2 = MMI_status_icons[MMI_status_icons_list1[1]].x - STATUS_ICON_X_GAP;
- }
- /* PMT VIKAS START 20050707 */
- #elif defined(__MMI_UI_DALMATIAN_STATUSBAR__)
- /* PMT VIKAS START 20051202 */
- if (is_on_idlescreen() == 0)
- /* PMT VIKAS END 20051202 */
- {
- x1 += MMI_status_icons[MMI_status_icons_list1[0]].width - 1 + STATUS_ICON_X_GAP;
- }
- if (is_status_bar_shuffled == 0)
- {
- x2 = UI_device_width - MMI_STATUS_BAR_WIDTH;
- }
- else
- {
- x2 -= 6;
- }
- /* PMT VIKAS END 20050707 */
- #else
- /* Shift x1,x2 assuming signal strength and battery strength icons are at either ends */
- x1 += MMI_status_icons[MMI_status_icons_list1[0]].width - 1 + STATUS_ICON_X_GAP;
- x2 = MMI_status_icons[MMI_status_icons_list1[1]].x - STATUS_ICON_X_GAP;
- #endif
- /* PMT HIMANSHU END */
- #if(STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE)
- cy = y2 - y1 + 1;
- #else
- cy = (y2 - y1 + 1) >> 1;
- #endif
- /* PMT HIMANSHU START 20050625 */
- #if defined(__MMI_UI_TECHNO_STATUS_ICON__)
- /* PMT VIKAS START 20051202 */
- if (is_on_idlescreen() == 1)
- /* PMT VIKAS END 20051202 */
- {
- MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].x = 1;
- MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].y = MMI_status_bar_height
- + MMI_IDLESCREEN_BAR_HEIGHT - 2 - MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height;
- MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].x = MAIN_LCD_device_width
- - 1 - MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].width;
- MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].y = MMI_status_bar_height
- + MMI_IDLESCREEN_BAR_HEIGHT - 2 - MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].height;
- }
- else if (GetActiveScreenId() == MAIN_MENU_SCREENID)
- {
- MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].x = 1;
- MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].y = MMI_status_bar_height
- + MMI_title_height - MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height - 1;
- MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].x = MAIN_LCD_device_width
- - 1 - MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].width;
- MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].y = MMI_status_bar_height
- + MMI_title_height - MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].height - 1;
- }
- else
- {
- #if(STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE)
- MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].x = 1;
- MMI_status_icons[0].y = cy - MMI_status_icons[0].height;
- MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].x = MAIN_LCD_device_width
- - 1 - MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].width;
- MMI_status_icons[1].y = cy + 1 - MMI_status_icons[1].height;
- x2 = MMI_status_icons[MMI_status_icons_list1[1]].x - STATUS_ICON_X_GAP;
- #else /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */
- MMI_status_icons[0].y = cy - (MMI_status_icons[0].height >> 1);
- MMI_status_icons[1].y = cy - (MMI_status_icons[1].height >> 1);
- #endif /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */
- }
- /* PMT VIKAS START 20050707 */
- #elif defined(__MMI_UI_DALMATIAN_STATUSBAR__)
- #if(STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE)
- // set the position of signal strength icon.
- //PMT VIKAS START 20051202
- if (is_on_idlescreen() == 1)
- /* PMT VIKAS END 20051202 */
- {
- MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].y =
- (MMI_title_height >> 1) - (MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height >> 1);
- }
- else
- {
- MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].y = cy - MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height;
- }
- #else /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */
- /* PMT VIKAS START 20051202 */
- if (is_on_idlescreen() == 1)
- /* PMT VIKAS END 20051202 */
- {
- MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].y =
- (MMI_title_height >> 1) - (MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height >> 1);
- }
- else
- {
- MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].y = cy - (MMI_status_icons[0].height >> 1);
- }
- #endif /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */
- /* PMT VIKAS END 20050707 */
- #else
- #if(STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE)
- /* PMT VIKAS START 20051010 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- /* START VIJAY PMT 20060105 */
- if (whether_status_bar_at_bottom())
- /* END VIJAY PMT 20060105 */
- {
- MMI_status_icons[0].y =
- UI_device_height - MMI_button_bar_height - 1 - (MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height + 2);
- MMI_status_icons[1].y =
- UI_device_height - MMI_button_bar_height - 1 - (MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].height + 2);
- }
- else
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- {
- MMI_status_icons[0].y = cy - MMI_status_icons[0].height - 1;//080206 status icon
- MMI_status_icons[1].y = cy - MMI_status_icons[1].height - 1;
- }
- /* PMT VIKAS END 20051010 */
- #else /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */
- /* PMT VIKAS START 20051010 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- /* START VIJAY PMT 20060105 */
- if (whether_status_bar_at_bottom())
- /* END VIJAY PMT 20060105 */
- {
- MMI_status_icons[0].y =
- UI_device_height - MMI_button_bar_height - 1 - MMI_status_bar_height - 2 +
- ((MMI_status_bar_height - MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height) >> 1);
- MMI_status_icons[1].y =
- UI_device_height - MMI_button_bar_height - 1 - MMI_status_bar_height - 2 +
- ((MMI_status_bar_height - MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height) >> 1);
- }
- else
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- {
- MMI_status_icons[0].y = cy - (MMI_status_icons[0].height >> 1);
- MMI_status_icons[1].y = cy - (MMI_status_icons[1].height >> 1);
- }
- /* PMT VIKAS END 20051010 */
- #endif /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */
- #endif
- /* PMT HIMANSHU END */
- i = 2;
- /* PMT HIMANSHU START 20050625 */
- #if defined(__MMI_UI_TECHNO_STATUS_ICON__)
- /* PMT VIKAS START 20051202 */
- if ((is_on_idlescreen() == 1) || (GetActiveScreenId() == MAIN_MENU_SCREENID))
- /* PMT VIKAS END 20051202 */
- {
- x = (MAIN_LCD_device_width >> 1) - ((NumberOfDisplayedIcons()
- * (MMI_status_icons[2].width + STATUS_ICON_X_GAP)) >> 1)
- /*- STATUS_ICON_X_GAP */ ;
- if (x < (x1 + 2))
- {
- x = x1 + 2;
- }
- }
- else
- #endif /* defined(__MMI_UI_TECHNO_STATUS_ICON__) */
- /* PMT HIMANSHU END */
- x = x1 + STATUS_ICON_X_GAP;
- while (!done)
- {
- display_flag = 0;
- j = MMI_status_icons_pool1[i];
- old_i = i; /* 122004 Calvin added */
- i++;
- if (i > MMI_N_STATUS_ICONS_POOL1)
- {
- break;
- }
- if (TEST_STATUS_ICON_DISPLAY_ON(MMI_status_icons[j].flags))
- {
- k = j;
- display_flag = 1;
- }
- if ((MMI_status_icons[j].group_ID > 0))
- {
- group_ID = MMI_status_icons[j].group_ID;
- j++;
- inner_done = 0;
- while (!inner_done)
- {
- if (group_ID != MMI_status_icons[j].group_ID)
- {
- break;
- }
- if ((!display_flag) && TEST_STATUS_ICON_DISPLAY_ON(MMI_status_icons[j].flags))
- {
- display_flag = 1;
- k = j;
- }
- else
- {
- i++;
- j++;
- }
- }
- }
- if (display_flag) /* if flagis set to display */
- {
- /* if((x+MMI_status_icons[k].width+STATUS_ICON_X_GAP)>x2) */
- if ((x + MMI_status_icons[k].width) > x2) /* 022205 Calvin modfied */
- { /* i--; */
- i = old_i; /* 122004 Calvin changed */
- break;
- }
- #if(STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE)
- /* PMT VIKAS START 20050707 */
- #if defined(__MMI_UI_DALMATIAN_STATUSBAR__) && defined(__MMI_MAINLCD_176X220__)
- y = cy - MMI_status_icons[k].height - 1;
- #else /* defined(__MMI_UI_DALMATIAN_STATUSBAR__) && defined(__MMI_MAINLCD_176X220__) */
- /* PMT VIKAS START 20051010 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- /* START VIJAY PMT 20060105 */
- if (whether_status_bar_at_bottom())
- /* END VIJAY PMT 20060105 */
- {
- y = UI_device_height - MMI_button_bar_height - 1 - MMI_status_icons[k].height - 2;
- }
- else
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- /* PMT VIKAS END 20051010 */
- y = cy - MMI_status_icons[k].height - 1;//080206 status icon
- #endif /* defined(__MMI_UI_DALMATIAN_STATUSBAR__) && defined(__MMI_MAINLCD_176X220__) */
- /* PMT VIKAS END 20050707 */
- #else /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */
- /* PMT VIKAS START 20051010 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- /* START VIJAY PMT 20060105 */
- if (whether_status_bar_at_bottom())
- /* END VIJAY PMT 20060105 */
- {
- y = UI_device_height - MMI_button_bar_height - 1 - MMI_status_bar_height +
- ((MMI_status_bar_height - MMI_status_icons[STATUS_ICON_SIGNAL_STRENGTH].height) >> 1);
- }
- else
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- /* PMT VIKAS END 20051010 */
- y = cy - (MMI_status_icons[k].height >> 1);
- #endif /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */
- MMI_status_icons[k].x = x;
- MMI_status_icons[k].y = y;
- x += MMI_status_icons[k].width + STATUS_ICON_X_GAP;
- MMI_status_icons_list1[MMI_status_icon_bars[0].n_icons] = (S16) k;
- MMI_status_icon_bars[0].n_icons++;
- if (MMI_status_icon_bars[0].n_icons >= MMI_N_STATUS_ICONS_LIST1)
- {
- done = 1;
- }
- }
- }
- /* Status bar 2: Vertical bar */
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- /* PMT VIKAS START 20051202 */
- if (is_on_idlescreen() == 1)
- /* PMT VIKAS END 20051202 */
- {
- MMI_status_icon_bars[1].n_icons = 0; /* battery icon is now placed on title bar on idle screen. */
- }
- else
- {
- MMI_status_icons_list2[0] = STATUS_ICON_BATTERY_STRENGTH;
- MMI_status_icon_bars[1].n_icons = 1;
- }
- #else /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- MMI_status_icon_bars[1].n_icons = 0;
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /* PMT VIKAS END 20050707 */
- x1 = MMI_status_icon_bars[1].x1; /* start x position of vertical status bar main lcd */
- y1 = MMI_status_icon_bars[1].y1; /* start y position of vertical status bar main lcd */
- x2 = MMI_status_icon_bars[1].x2; /* end x position of vertical status bar main lcd */
- y2 = MMI_status_icon_bars[1].y2; /* end y position of horizontal status bar main lcd */
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- /* to handle shuffling of status bar on idle screen. */
- if (is_status_bar_shuffled == 0)
- {
- x = 6;
- }
- else
- {
- x = 2 * MMI_STATUS_BAR_WIDTH - UI_device_width + STATUS_ICON_X_GAP;
- }
- /* PMT VIKAS START 20051202 */
- if (is_on_idlescreen() == 0)
- /* PMT VIKAS END 20051202 */
- {
- x2 = MMI_STATUS_BAR_WIDTH - MMI_status_icons[MMI_status_icons_list2[0]].width;
- }
- else
- {
- x2 = MMI_STATUS_BAR_WIDTH - 1;
- }
- #if(STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE)
- /* PMT VIKAS START 20051202 */
- if (is_on_idlescreen() == 1)
- /* PMT VIKAS END 20051202 */
- {
- MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].x =
- UI_device_width - 1 - MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].width;
- MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].y =
- (MMI_title_height >> 1) - (MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].height >> 1);
- }
- else
- {
- MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].x = (UI_device_width - 1)
- - MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].width - MMI_status_icon_bars[1].x;
- MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].y = cy - MMI_status_icons[STATUS_ICON_BATTERY_STRENGTH].height;
- }
- #else /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */
- /* PMT VIKAS START 20051202 */
- if (is_on_idlescreen() == 1)
- /* PMT VIKAS END 20051202 */
- {
- MMI_status_icons[1].y = MMI_title_height >> 1;
- }
- else
- {
- MMI_status_icons[1].y = cy - (MMI_status_icons[1].height >> 1);
- }
- #endif /* (STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE) */
- #else /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /* x2 = UI_device_width - MMI_status_icons[MMI_status_icons_list2[0]].width;//090605 StatusIcon Calvin moved */
- cx = (x2 - x1 + 1) >> 1;
- /* PMT VIKAS START 20051010 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- /* START VIJAY PMT 20060105 */
- if (whether_status_bar_at_bottom())
- /* END VIJAY PMT 20060105 */
- {
- /* START VIJAY PMT 20060105 */
- #ifdef __MMI_MAINLCD_128X160__
- y = UI_device_height - MMI_button_bar_height - MMI_status_bar_height -
- ((MMI_status_icons[1].height + (STATUS_ICON_Y_GAP) << 1) + STATUS_ICON_Y_GAP + 2) - 1;
- #else /* __MMI_MAINLCD_128X160__ */
- y = UI_device_height - MMI_button_bar_height - MMI_status_bar_height -
- ((MMI_status_icons[1].height + (STATUS_ICON_Y_GAP) << 1) + STATUS_ICON_Y_GAP) - 1;
- #endif /* __MMI_MAINLCD_128X160__ */
- /* END VIJAY PMT 20060105 */
- }
- else
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- {
- y = STATUS_ICON_Y_GAP;
- }
- /* PMT VIKAS END 20051010 */
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /* PMT VIKAS END 20050707 */
- done = 0;
- while (!done)
- {
- display_flag = 0;
- j = MMI_status_icons_pool1[i];
- old_i = i;
- i++;
- if (i > MMI_N_STATUS_ICONS_POOL1)
- {
- break;
- }
- if (TEST_STATUS_ICON_DISPLAY_ON(MMI_status_icons[j].flags)) /* check if the flag is on /off */
- {
- k = j;
- display_flag = 1;
- }
- if ((MMI_status_icons[j].group_ID > 0))
- {
- group_ID = MMI_status_icons[j].group_ID;
- j++;
- inner_done = 0;
- while (!inner_done)
- {
- if (group_ID != MMI_status_icons[j].group_ID)
- {
- break;
- }
- if ((!display_flag) && TEST_STATUS_ICON_DISPLAY_ON(MMI_status_icons[j].flags))
- {
- display_flag = 1;
- k = j;
- }
- else
- {
- i++;
- j++;
- }
- }
- }
- if (display_flag)
- {
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- /* to handle horizontal alignment of status bar. */
- if ((x + MMI_status_icons[k].width + STATUS_ICON_X_GAP) > x2)
- #else /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /* PMT VIKAS START 20051217 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- if ((y - MMI_status_icons[k].height) < y1)
- #else /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- /* if((y1+y+MMI_status_icons[k].height+STATUS_ICON_Y_GAP)>y2) */
- if ((y1 + y + MMI_status_icons[k].height) > y2) /* 022205 Calvin modified */
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- /* PMT VIKAS END 20051217 */
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /* PMT VIKAS END 20050707 */
- { /* i--; */
- i = old_i;
- break;
- }
- /* PMT VIKAS START 20050707 */
- #ifndef __MMI_UI_DALMATIAN_STATUSBAR__
- x = cx - (MMI_status_icons[k].width >> 1);
- #endif
- /* PMT VIKAS END 20050707 */
- MMI_status_icons[k].x = x; /* set the x and y position of icon */
- MMI_status_icons[k].y = y;
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- x += MMI_status_icons[k].width + STATUS_ICON_X_GAP;
- #else /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /* PMT VIKAS START 20051010 */
- #ifdef __MMI_UI_STATUS_BAR_AT_BOTTOM__
- /* START VIJAY PMT 20060105 */
- if (whether_status_bar_at_bottom())
- /* END VIJAY PMT 20060105 */
- {
- y = MMI_status_icons[k].y - (MMI_status_icons[k].height + STATUS_ICON_Y_GAP);
- }
- #else /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- y += MMI_status_icons[k].height + STATUS_ICON_Y_GAP;
- #endif /* __MMI_UI_STATUS_BAR_AT_BOTTOM__ */
- /* PMT VIKAS END 20051010 */
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /* PMT VIKAS END 20050707 */
- MMI_status_icons_list2[MMI_status_icon_bars[1].n_icons] = (S16) k;
- MMI_status_icon_bars[1].n_icons++;
- if (MMI_status_icon_bars[1].n_icons >= MMI_N_STATUS_ICONS_LIST2)
- {
- done = 1;
- }
- }
- }
- /* Status bar 3: Sub LCD status bar */
- /* MTK Leo add 20040415, arrange status icons in sublcd by priority */
- MMI_status_icons_list3[0] = STATUS_ICON_SUBLCD_SIGNAL_STRENGTH;
- MMI_status_icons_list3[1] = STATUS_ICON_SUBLCD_BATTERY_STRENGTH;
- MMI_status_icon_bars[2].n_icons = 2;
- x1 = MMI_status_icon_bars[2].x1; /* start x position of status bar sub lcd */
- y1 = MMI_status_icon_bars[2].y1; /* start y position of status bar sub lcd */
- x2 = MMI_status_icon_bars[2].x2; /* end x position of status bar sub lcd */
- y2 = MMI_status_icon_bars[2].y2; /* end y position of status bar sub lcd */
- /* Shift x1,x2 assuming signal strength and battery strength icons are at either ends */
- x1 += MMI_status_icons[MMI_status_icons_list3[0]].width - 1 + SUBLCD_STATUS_ICON_X_GAP;
- x2 = MMI_status_icons[MMI_status_icons_list3[1]].x - SUBLCD_STATUS_ICON_X_GAP;
- /* MTK Leo end */
- #if(STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE)
- cy = y2 - y1 - 1;
- #else
- cy = (y2 - y1 + 1) >> 1;
- #endif
- x = x1 + SUBLCD_STATUS_ICON_X_GAP;
- #if(STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE)
- cy = MMI_status_icon_bars[2].y2 - MMI_status_icon_bars[2].y1 - 1;
- #endif
- done = 0;
- i = 2;
- while (!done)
- {
- display_flag = 0;
- j = MMI_status_icons_pool2[i];
- i++;
- if (i > MMI_N_STATUS_ICONS_POOL2)
- {
- break;
- }
- if (TEST_STATUS_ICON_DISPLAY_ON(MMI_status_icons[j].flags))
- {
- k = j;
- display_flag = 1;
- }
- if ((MMI_status_icons[j].group_ID > 0))
- {
- group_ID = MMI_status_icons[j].group_ID;
- j++;
- inner_done = 0;
- while (!inner_done)
- {
- if (group_ID != MMI_status_icons[j].group_ID)
- {
- break;
- }
- if ((!display_flag) && TEST_STATUS_ICON_DISPLAY_ON(MMI_status_icons[j].flags))
- {
- display_flag = 1;
- k = j;
- }
- else
- {
- i++;
- j++;
- }
- }
- }
- if (display_flag)
- {
- //MTK Leo add 20040415, arrange status icons in sublcd by priority
- //if ( x + MMI_status_icons[k].width+SUBLCD_STATUS_ICON_X_GAP > x2 )
- if (x + MMI_status_icons[k].width > x2) /* 022205 Calvin modified */
- {
- break;
- }
- MMI_status_icons_list3[MMI_status_icon_bars[2].n_icons] = (S16) k;
- MMI_status_icon_bars[2].n_icons++;
- #if(STATUS_ICONS_DRAW_FROM_BOTTOM_BASELINE)
- y = cy - MMI_status_icons[k].height;
- #else
- y = cy - (MMI_status_icons[k].height >> 1);
- #endif
- MMI_status_icons[k].x = x;
- MMI_status_icons[k].y = y;
- x += MMI_status_icons[k].width + SUBLCD_STATUS_ICON_X_GAP;
- /* MTK Leo end */
- }
- }
- #ifdef __MMI_LCD_PARTIAL_ON__
- /* Extra status bar: Used in LCD partial display */
- MMI_status_icons_partial_display_n_icons = 0;
- done = 0;
- i = 0;
- while (!done)
- {
- display_flag = 0;
- j = MMI_status_icons_pool_partial_display[i];
- i++;
- if (i > MMI_N_STATUS_ICONS_POOL_PARTIAL_DISPLAY)
- {
- break;
- }
- if (TEST_STATUS_ICON_DISPLAY_ON(MMI_status_icons[j].flags))
- {
- k = j;
- display_flag = 1;
- }
- if (display_flag)
- {
- MMI_status_icons_list_partial_display[MMI_status_icons_partial_display_n_icons] = (S16) k;
- MMI_status_icons_partial_display_n_icons++;
- if (MMI_status_icons_partial_display_n_icons >= MMI_N_STATUS_ICONS_PARTIAL_DISPLAY)
- {
- done = 1;
- }
- }
- }
- #endif /* __MMI_LCD_PARTIAL_ON__ */
- #endif /* (0) */
- }
- /*****************************************************************************
- * FUNCTION
- * hide_status_icon_bars
- * DESCRIPTION
- * call hide function of status bar (horizontal/vertical status bar of main
- * lcd and horizontal status bar of sub lcd
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void hide_status_icon_bars(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (i = 0; i < MAX_STATUS_ICON_BARS; i++)
- {
- /* if ( MMI_status_icon_bars[i].flags & STATUS_ICON_BAR_DISPLAY && MMI_status_icon_bars[i].n_icons>0 ) */
- if (MMI_status_icon_bars[i].flags & STATUS_ICON_BAR_DISPLAY) /* 101805 stopwatch icon Calvin changed because re-arragne earlier */
- {
- if (MMI_status_icon_bars[i].graphics_context == &main_LCD_device_bitmap)
- {
- if (status_icon_display_area != SUBLCD_ONLY)
- {
- MMI_hide_status_icon_bars[i] (); /* execute the hide function of status bar */
- }
- }
- else if (MMI_status_icon_bars[i].graphics_context == &sub_LCD_device_bitmap)
- {
- if (status_icon_display_area != MAINLCD_ONLY)
- {
- MMI_hide_status_icon_bars[i] (); /* execute the hide function of status bar */
- }
- }
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * refresh_fixed_status_icon
- * DESCRIPTION
- * refrsh particulr icon of status bar
- * PARAMETERS
- * icon_id [IN]
- * bar_id [IN]
- * RETURNS
- * void
- *****************************************************************************/
- #ifdef __MMI_IDLE_FULL_SCREEN__
- extern U16 on_idle_screen;
- #endif
- extern void draw_wallpaper(void);
- extern U16 GetActiveScreenId(void);
- /* extern color wgui_transparent_color;//112205 transparent color Calvin */
- #ifdef __MMI_SUB_WALLPAPER__
- /* extern color wgui_transparent_color;//112205 transparent color Calvin */
- extern int is_sub_idle_screen;
- extern void cat312_hide_status_icon_bar(void);
- #endif /* __MMI_SUB_WALLPAPER__ */
- GDI_HANDLE wgui_status_icon_display_layer = GDI_LAYER_EMPTY_HANDLE;
- void refresh_fixed_status_icon(S16 icon_id, S16 bar_id)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- // for refreshing the signal and battery icon on idle screen.
- //PMT VIKAS START 20051202
- if ((is_on_idlescreen()) ||
- ((status_icon_display_ON) && (MMI_status_icon_bars[bar_id].flags & STATUS_ICON_BAR_DISPLAY)))
- /* PMT VIKAS END 20051202 */
- #else /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- if ((status_icon_display_ON) && (MMI_status_icon_bars[bar_id].flags & STATUS_ICON_BAR_DISPLAY))
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /* PMT VIKAS END 20050707 */
- {
- S32 x1, x2, y1, y2;
- /* backup active lcd */
- bitmap *saved_graphics_context = current_LCD_device_bitmap;
- color c;
- /* PMT VIKAS START 20050707 */
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- /* filler is not required for sub-LCD. */
- if (bar_id != 2)
- /* c = MMI_status_icon_bars[bar_id].normal_bar_filler->c; */
- {
- c = current_MMI_theme->LSK_up_filler->c;
- }
- /* PMT VIKAS START 20051202 */
- if (is_on_idlescreen() == 1)
- /* PMT VIKAS END 20051202 */
- {
- x1 = MMI_status_icons[icon_id].x;
- y1 = MMI_status_icons[icon_id].y;
- }
- else
- {
- x1 = MMI_status_icon_bars[bar_id].x + MMI_status_icons[icon_id].x; /* x start position of icon */
- y1 = MMI_status_icon_bars[bar_id].y + MMI_status_icons[icon_id].y; /* y start poition of icon */
- }
- #else /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- if (current_MMI_theme != NULL)
- {
- c = *current_MMI_theme->statusbar0_background_color; /* Color is currently hardcoded: must be calling hide function instead */
- }
- else
- {
- c = gui_color(216, 212, 212);
- }
- /* set drawing region */
- x1 = MMI_status_icons[icon_id].x; /* x start position of icon */
- y1 = MMI_status_icons[icon_id].y; /* y start poition of icon */
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /* PMT VIKAS END 20050707 */
- x2 = x1 + MMI_status_icons[icon_id].width - 1; /* x end position of icon */
- y2 = y1 + MMI_status_icons[icon_id].height - 1; /* y end position of icon */
- /* set active lcd */
- if (bar_id == 2)
- {
- UI_set_sub_LCD_graphics_context(); /* if barid is equal to 2 then switch the graphic context to sub lcd. */
- }
- else
- {
- UI_set_main_LCD_graphics_context(); /* switch graphic context to main lcd if bar id is eqaul to 0 or 1 */
- }
- if (wgui_status_icon_display_layer != GDI_LAYER_EMPTY_HANDLE)
- {
- gdi_layer_push_and_set_active(wgui_status_icon_display_layer);
- }
- /* lock frame buffer */
- gdi_layer_lock_frame_buffer();
- /* 061506 double buffer Start */
- if(get_status_icon_bar_layer((U8)bar_id)!=GDI_ERROR_HANDLE)
- {
- gdi_layer_push_and_set_active(get_status_icon_bar_layer((U8)bar_id));
- }
- /* 061506 double buffer End */
- /* set clip region */
- gui_push_clip();
- gui_set_clip(x1, y1, x2, y2);
- if (bar_id == 2) /* SUBLCD status icons */
- {
- #ifdef __MMI_SUB_WALLPAPER__
- if (is_sub_idle_screen)
- /* Leo start 20050811 */
- {
- gdi_draw_solid_rect(x1, y1, x2, y2, GDI_COLOR_TRANSPARENT);
- }
- /* Leo end 20050811 */
- else
- {
- show_sublcd_status_background(x1, y1, x2, y2, MMI_TRUE);
- }
- #else /* __MMI_SUB_WALLPAPER__ */
- show_sublcd_status_background(x1, y1, x2, y2, MMI_TRUE);
- #endif /* __MMI_SUB_WALLPAPER__ */
- }
- else
- {
- #ifdef __MMI_IDLE_FULL_SCREEN__
- if (on_idle_screen == 0)
- {
- /* PMT HIMANSHU START 20050625 */
- #if defined(__MMI_UI_TECHNO_STATUS_ICON__)
- if (GetActiveScreenId() == MAIN_MENU_SCREENID)
- /* PMT VIKAS START 20050718 */
- {
- gui_fill_rectangle(x1, y1, x2, y2, current_UI_theme->window_title_theme->active_filler->c);
- }
- //PMT VIKAS END 20050718
- //PMT VIKAS START 20050707
- #elif defined(__MMI_UI_DALMATIAN_STATUSBAR__)
- show_status_icons();
- /* PMT VIKAS END 20050707 */
- #else
- /* 082305 Calvin Start */
- if (wgui_is_wallpaper_on_bottom() == MMI_TRUE)
- {
- gdi_draw_solid_rect(x1, y1, x2, y2, GDI_COLOR_TRANSPARENT);
- }
- else
- {
- gui_fill_rectangle(x1, y1, x2, y2, c); /* fill the icon position with grey color */
- }
- /* 082305 Calvin End */
- //if(g_idle_context.IsOnIdleScreen == 1 && mmi_bootup_is_idle_screen_reached() == MMI_TRUE)//011906 signal Calvin removed
- // draw_wallpaper();
- #endif
- /* PMT HIMANSHU END */
- }
- else
- {
- #if defined(__MMI_UI_TECHNO_STATUS_ICON__)
- //KP Jerry modify on 2007-1-5 start
- #ifndef __MMI_UI_TECHNO_IDLESCREEN_BAR_HALF_TRANSPARENT_DISPLAY__
- gui_show_image(0, MMI_status_bar_height, get_image(idlescreen_bar_id));//070306 Alpha layer
- #else
- gui_reset_clip();
- gui_lock_double_buffer();
- gdi_draw_solid_rect(0,MMI_status_bar_height,UI_device_width-1,MMI_status_bar_height+MMI_IDLESCREEN_BAR_HEIGHT-1,GDI_COLOR_HALF_TRANSPARENT);
- gui_unlock_double_buffer();
- gui_BLT_double_buffer(0,MMI_status_bar_height,UI_device_width-1,MMI_status_bar_height+MMI_IDLESCREEN_BAR_HEIGHT-1);
- #endif
- //KP Jerry modify on 2007-1-5 end
- #elif defined(__MMI_UI_DALMATIAN_STATUSBAR__)
- gui_draw_filled_area(
- MMI_title_x,
- MMI_title_y,
- MMI_title_x + MMI_title_width - 1,
- MMI_title_y + MMI_title_height - 1,
- current_UI_theme->window_title_theme->active_filler);
- /* PMT VIKAS START 20050720 */
- #ifdef __MMI_UI_ANIMATED_TITLE_EFFECT__
- if (is_enable_animated_title_effect())
- {
- wgui_draw_animate_title_image_frame_0(
- MMI_title_x,
- MMI_title_y,
- MMI_title_x + MMI_title_width - 1,
- MMI_title_y + MMI_title_height - 1);
- }
- #endif /* __MMI_UI_ANIMATED_TITLE_EFFECT__ */
- /* PMT VIKAS END 20050720 */
- #else
- #ifdef __GDI_MEMORY_PROFILE_2__
- /* gui_fill_rectangle(x1,y1,x2,y2,wgui_transparent_color); */
- gdi_draw_solid_rect(x1, y1, x2, y2, GDI_COLOR_TRANSPARENT); /* 112205 transparent color Calvin */
- #else /* __GDI_MEMORY_PROFILE_2__ */
- draw_wallpaper();
- #endif /* __GDI_MEMORY_PROFILE_2__ */
- #endif
- }
- #else /* __MMI_IDLE_FULL_SCREEN__ */
- gui_fill_rectangle(x1, y1, x2, y2, c); /* fill the icon position with grey color */
- #endif /* __MMI_IDLE_FULL_SCREEN__ */
- }
- /* show the icon */
- #ifdef __MMI_DOWNLOADABLE_THEMES_SUPPORT__
- if (mmi_tm_does_theme_have_alt_image())
- {
- if (mmi_tm_is_theme_dirty_bit_set(GetImageIndex(MMI_status_icons[icon_id].icon_ID)))
- {
- MMI_status_icons[icon_id].icon_data = get_image(MMI_status_icons[icon_id].icon_ID);
- /* No need to calculate Image width, height and frames as they will not change */
- }
- }
- #endif /* __MMI_DOWNLOADABLE_THEMES_SUPPORT__ */
- /* PMT HIMANSHU START 20050625 */
- #if defined(__MMI_UI_TECHNO_STATUS_ICON__)
- /* for showing the animated battery icon when charger is connected. */
- if (MMI_status_icons[icon_id].flags & STATUS_ICON_ANIMATE)
- {
- gui_show_transparent_animated_image_frame(
- x1,
- y1,
- MMI_status_icons[icon_id].icon_data,
- 0,
- MMI_status_icons[icon_id].current_frame);
- /* 091505 bettery Calvin removed to status_icon_timer_callback */
- #if 0
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #endif /* 0 */
- /* 091505 bettery Calvin end */
- }
- else
- #endif /* defined(__MMI_UI_TECHNO_STATUS_ICON__) */
- //PMT HIMANSHU END
- //PMT VIKAS START 20050707
- #ifdef __MMI_UI_DALMATIAN_STATUSBAR__
- /* for showing the animated battery icon when charger is connected. */
- if (MMI_status_icons[icon_id].flags & STATUS_ICON_ANIMATE)
- {
- gui_show_transparent_animated_image_frame(
- x1,
- y1,
- MMI_status_icons[icon_id].icon_data,
- 0,
- MMI_status_icons[icon_id].current_frame);
- /* 091505 bettery Calvin removed to status_icon_timer_callback */
- #if 0
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #endif /* 0 */
- /* 091505 bettery Calvin end */
- }
- else
- #endif /* __MMI_UI_DALMATIAN_STATUSBAR__ */
- /* PMT VIKAS END 20050707 */
- gdi_image_draw_animation_single_frame(
- x1,
- y1,
- MMI_status_icons[icon_id].icon_data,
- MMI_status_icons[icon_id].state);
- /* restoer clip region */
- gui_pop_clip();
- /* 061506 double buffer Start */
- if(get_status_icon_bar_layer((U8)bar_id)!=GDI_ERROR_HANDLE)
- {
- gdi_layer_pop_and_restore_active();
- }
- /* 061506 double buffer End */
- /* unlock and blt frame buffer */
- gdi_layer_unlock_frame_buffer();
- gui_BLT_double_buffer(x1, y1, x2, y2);
- /* 061506 double buffer Start */
- if(get_status_icon_bar_type((U8)bar_id)&STATUS_ICON_BAR_ENABLE_DOUBLE_BUFFER)
- {
- gdi_layer_push_and_set_active(get_status_icon_bar_layer((U8)bar_id));
- gdi_layer_toggle_double();
- gdi_layer_copy_double();//070306 copy double
- gdi_layer_pop_and_restore_active();
- }
- /* 061506 double buffer Start */
- if (wgui_status_icon_display_layer != GDI_LAYER_EMPTY_HANDLE)
- {
- gdi_layer_pop_and_restore_active();
- }
- /* restore active lcd according to backuped lcd */
- if (saved_graphics_context == &main_LCD_device_bitmap)
- {
- UI_set_main_LCD_graphics_context();
- }
- else if (saved_graphics_context == &sub_LCD_device_bitmap)
- {
- UI_set_sub_LCD_graphics_context();
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * refresh_status_icon_display
- * DESCRIPTION
- * refrsh all status bar icons
- * PARAMETERS
- * void
- * S16(?) [IN] Bar_id
- * RETURNS
- * void
- *****************************************************************************/
- void refresh_status_icon_display(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 idx = 0;//061506 double buffer
- S32 is_status_layer_pushed = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (status_icon_display_ON)
- {
- /* backup active lcd */
- bitmap *saved_graphics_context = current_LCD_device_bitmap;
- S32 i;
- if (wgui_status_icon_display_layer != GDI_LAYER_EMPTY_HANDLE)
- {
- gdi_layer_push_and_set_active(wgui_status_icon_display_layer);
- is_status_layer_pushed = 1;
- }
- /* lock frame buffer */
- gui_lock_double_buffer();
- /* hide all status bars */
- hide_status_icon_bars();
- /* show all status bar icons */
- show_status_icons();
- /* unlock frame buffer */
- gui_unlock_double_buffer();
- for (i = 0; i < MAX_STATUS_ICON_BARS; i++)
- {
- if (MMI_status_icon_bars[i].flags & STATUS_ICON_BAR_DISPLAY)
- {
- if (MMI_status_icon_bars[i].graphics_context == &main_LCD_device_bitmap)
- {
- if (status_icon_display_area != SUBLCD_ONLY)
- {
- UI_set_main_LCD_graphics_context(); /* switch to main lcd graphic context */
- gui_BLT_double_buffer(
- MMI_status_icon_bars[i].x1,
- MMI_status_icon_bars[i].y1,
- MMI_status_icon_bars[i].x2,
- MMI_status_icon_bars[i].y2);
- }
- }
- else if (MMI_status_icon_bars[i].graphics_context == &sub_LCD_device_bitmap)
- {
- if (status_icon_display_area != MAINLCD_ONLY)
- {
- UI_set_sub_LCD_graphics_context(); /* switch to sub lcd graphic context */
- gui_BLT_double_buffer(
- MMI_status_icon_bars[i].x1,
- MMI_status_icon_bars[i].y1,
- MMI_status_icon_bars[i].x2,
- MMI_status_icon_bars[i].y2);
- }
- }
- }
- }
- /* 061506 double buffer Start */
- for (idx=0; idx<MAX_STATUS_ICON_BARS; idx++)
- {
- if(get_status_icon_bar_type((U8)idx)&STATUS_ICON_BAR_ENABLE_DOUBLE_BUFFER)
- {
- gdi_layer_push_and_set_active(get_status_icon_bar_layer((U8)idx));
- gdi_layer_toggle_double();
- gdi_layer_copy_double();//070306 copy double
- gdi_layer_pop_and_restore_active();
- }
- }
- /* 061506 double buffer Start */
- /* restore active lcd according to backuped lcd */
- if (saved_graphics_context == &main_LCD_device_bitmap)
- {
- UI_set_main_LCD_graphics_context();
- }
- else if (saved_graphics_context == &sub_LCD_device_bitmap)
- {
- UI_set_sub_LCD_graphics_context();
- }
- if (/*(wgui_status_icon_display_layer != GDI_LAYER_EMPTY_HANDLE) && */(is_status_layer_pushed == 1))
- {
- gdi_layer_pop_and_restore_active();
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * animate_status_icon
- * DESCRIPTION
- * animate teh status icon
- * PARAMETERS
- * icon_ID [IN]
- * icon_id(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void animate_status_icon(S16 icon_ID)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if ((icon_ID < 0) || (icon_ID >= MAX_STATUS_ICONS))
- {
- return;
- }
- /* set the flaf of icon animated */
- MMI_status_icons[icon_ID].flags |= STATUS_ICON_ANIMATE; /* set the flag of icon to animate */
- /* set teh currenty frame to zero */
- MMI_status_icons[icon_ID].current_frame = 0;
- setup_status_icon_blink_animate();
- }
- /*****************************************************************************
- * FUNCTION
- * forward_animate_status_icon
- * DESCRIPTION
- * show the animation of icon such that it is moving forward direction
- * PARAMETERS
- * icon_ID [IN]
- * icon_id(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void forward_animate_status_icon(S16 icon_ID)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if ((icon_ID < 0) || (icon_ID >= MAX_STATUS_ICONS))
- {
- return;
- }
- /* set teh flag of icon to forward animate */
- MMI_status_icons[icon_ID].flags |= STATUS_ICON_FORWARD_ANIMATE;
- setup_status_icon_blink_animate();
- }
- /*****************************************************************************
- * FUNCTION
- * reverse_animate_status_icon
- * DESCRIPTION
- * show the animation of icon such that it is moving in reverse ditrection
- * PARAMETERS
- * icon_ID [IN]
- * icon_id(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void reverse_animate_status_icon(S16 icon_ID)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if ((icon_ID < 0) || (icon_ID >= MAX_STATUS_ICONS))
- {
- return;
- }
- /* set the flag of icon to reverse animate */
- MMI_status_icons[icon_ID].flags |= STATUS_ICON_REVERSE_ANIMATE;
- setup_status_icon_blink_animate();
- }
- /*****************************************************************************
- * FUNCTION
- * blink_status_icon
- * DESCRIPTION
- * set teh flag of icon as blink and shw the blinking icon
- * PARAMETERS
- * icon_ID [IN]
- * icon_id(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void blink_status_icon(S16 icon_ID)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if ((icon_ID < 0) || (icon_ID >= MAX_STATUS_ICONS))
- {
- return;
- }
- /* 2005/10/20 Hide status icon in flight mode */
- #ifdef __FLIGHT_MODE_SUPPORT__
- #ifdef __MMI_WLAN_FEATURES__
- if (mmi_bootup_get_active_flight_mode() == 1 || mmi_netset_get_active_preferred_mode() == 1 || mmi_bootup_is_sim_valid() == MMI_FALSE)
- #else
- if (mmi_bootup_get_active_flight_mode() == 1 || mmi_bootup_is_sim_valid() == MMI_FALSE)
- #endif
- {
- pBOOL rtn = PhnsetFlightModeHideButSaveStatusIcon(icon_ID, MMI_status_icons[icon_ID].flags | STATUS_ICON_BLINK);
- if (rtn == MMI_TRUE && (gPowerOnWithFlightMode == MMI_TRUE || mmi_bootup_is_sim_valid() == MMI_FALSE))
- {
- return;
- }
- }
- #else /* __FLIGHT_MODE_SUPPORT__ */
- if (mmi_bootup_is_sim_valid() == MMI_FALSE)
- {
- if (PhnsetFlightModeHideButSaveStatusIcon(icon_ID, MMI_status_icons[icon_ID].flags | STATUS_ICON_BLINK) ==
- MMI_TRUE)
- {
- return;
- }
- }
- #endif /* __FLIGHT_MODE_SUPPORT__ */
- /* set teh flag of icon to blink */
- MMI_status_icons[icon_ID].flags |= STATUS_ICON_BLINK;
- setup_status_icon_blink_animate();
- }
- /*****************************************************************************
- * FUNCTION
- * disable_status_icon
- * DESCRIPTION
- * set teh flag of icon as disable
- * PARAMETERS
- * icon_ID [IN]
- * icon_id(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void disable_status_icon(S16 icon_ID)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if ((icon_ID < 0) || (icon_ID >= MAX_STATUS_ICONS))
- {
- return;
- }
- /* set the flag of icon to disable */
- MMI_status_icons[icon_ID].flags |= STATUS_ICON_DISABLED;
- }
- /*****************************************************************************
- * FUNCTION
- * enable_status_icon
- * DESCRIPTION
- * set teh flag of icon as enable
- * PARAMETERS
- * icon_ID [IN]
- * icon_id(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void enable_status_icon(S16 icon_ID)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if ((icon_ID < 0) || (icon_ID >= MAX_STATUS_ICONS))
- {
- return;
- }
- /* set teh flag of icn to enbale */
- MMI_status_icons[icon_ID].flags &= ~STATUS_ICON_DISABLED;
- }
- /*****************************************************************************
- * FUNCTION
- * set_status_icon_state
- * DESCRIPTION
- * set the state of icon equal to valeu pass as parameter
- * PARAMETERS
- * icon_ID [IN]
- * state [IN]
- * icon_id(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void set_status_icon_state(S16 icon_ID, U8 state)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* set teh flag of icon equal to valeu pass as paraeter */
- MMI_status_icons[icon_ID].state = state;
- }
- /*****************************************************************************
- * FUNCTION
- * reset_status_icon_state
- * DESCRIPTION
- * set the state of icon equal to zero default value
- * PARAMETERS
- * icon_ID [IN]
- * icon_id(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void reset_status_icon_state(S16 icon_ID)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* set teh flag of icon to default 0 value */
- MMI_status_icons[icon_ID].state = 0;
- }
- /*****************************************************************************
- * FUNCTION
- * fill_status_bar_color
- * DESCRIPTION
- * fill teh clor of status bar as grey
- * PARAMETERS
- * bar_id [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void fill_status_bar_color(U8 bar_id)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 x1, y1, x2, y2;
- color c;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (current_MMI_theme != NULL)
- {
- c = *current_MMI_theme->statusbar0_background_color; /* gui_color(216,212,212); */
- }
- else
- {
- c = gui_color(216, 212, 212);
- }
- /* set clip region */
- gui_push_clip();
- get_status_icon_bar_clip(bar_id, &x1, &y1, &x2, &y2); /* get teh clip values of bar_id */
- gui_set_clip(x1, y1, x2, y2);
- /* draw status icon bar */
- gui_fill_rectangle(x1, y1, x2, y2, c); /* fill the bar with grey color */
- /* restore clip region */
- gui_pop_clip();
- }
- /*****************************************************************************
- * FUNCTION
- * redraw_status_icon_bar
- * DESCRIPTION
- * redarw only the staus bar whose id is equl to valeu pass as parameter
- * PARAMETERS
- * j [IN]
- * bar_id(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void redraw_status_icon_bar(U8 j)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /* backup active lcd */
- bitmap *saved_graphics_context = current_LCD_device_bitmap;
- S32 i, id, sbx, sby;
- S32 ix1, iy1;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (MMI_status_icon_bars[j].flags & STATUS_ICON_BAR_DISPLAY)
- {
- /* set active lcd according to different status icon bar */
- if (MMI_status_icon_bars[j].graphics_context == &main_LCD_device_bitmap) /* check the graphicd context of bar id */
- {
- UI_set_main_LCD_graphics_context();
- }
- else if (MMI_status_icon_bars[j].graphics_context == &sub_LCD_device_bitmap)
- {
- UI_set_sub_LCD_graphics_context();
- }
- sbx = MMI_status_icon_bars[j].x; /* store the start offset x position of bar */
- sby = MMI_status_icon_bars[j].y; /* store the start offset y position of bar */
- if (MMI_status_icon_bars[j].icon_list != NULL)
- {
- for (i = 0; i < MMI_status_icon_bars[j].n_icons; i++)
- {
- id = MMI_status_icon_bars[j].icon_list[i];
- #ifdef __MMI_DOWNLOADABLE_THEMES_SUPPORT__
- if (mmi_tm_does_theme_have_alt_image())
- {
- if (mmi_tm_is_theme_dirty_bit_set(GetImageIndex((U16) id)))
- {
- MMI_status_icons[j].icon_data = get_image((U16) id);
- /* No need to calculate Image width, height and frames as they will not change */
- }
- }
- #endif /* __MMI_DOWNLOADABLE_THEMES_SUPPORT__ */
- if (MMI_status_icons[id].icon_ID != IMAGE_ID_NULL)
- {
- ix1 = MMI_status_icons[id].x + sbx; /* start x position of icon */
- iy1 = MMI_status_icons[id].y + sby; /* start y position of icon */
- if (MMI_status_icons[id].flags & STATUS_ICON_ANIMATE)
- {
- /* show animated icon */
- gui_show_transparent_animated_image_frame(
- ix1,
- iy1,
- MMI_status_icons[id].icon_data,
- 0,
- MMI_status_icons[id].state);
- }
- else if (MMI_status_icons[id].flags & STATUS_ICON_BLINK)
- {
- /* show blinking icon */
- if (MMI_status_icons_blink_animate_ON_state)
- {
- gui_show_transparent_image(ix1, iy1, MMI_status_icons[id].icon_data, 0);
- }
- }
- else
- {
- /* show normal icon */
- if (MMI_status_icons[id].state > 0)
- /* the icon have many frames for different levels */
- {
- gui_show_transparent_animated_image_frame(
- ix1,
- iy1,
- MMI_status_icons[id].icon_data,
- 0,
- MMI_status_icons[id].state);
- }
- else
- /* the icon has only one level */
- {
- gui_show_transparent_image(ix1, iy1, MMI_status_icons[id].icon_data, 0);
- }
- }
- }
- }
- }
- }
- /* restore active lcd according to backuped lcd */
- if (saved_graphics_context == &main_LCD_device_bitmap)
- {
- UI_set_main_LCD_graphics_context(); /* set graphic context to main lcd */
- }
- else if (saved_graphics_context == &sub_LCD_device_bitmap)
- {
- UI_set_sub_LCD_graphics_context(); /* set graphic context to sub lcd */
- }
- }
- /*****************************************************************************
- * FUNCTION
- * set_status_icon_display