⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wgui_status_icons.c

📁 MTK6226修改平台UI的文件介绍
💻 C
📖 第 1 页 / 共 5 页
字号:
 * 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

#ifdef __MMI_WLAN_FEATURES__
#include "DataAccount.h"
extern U8 mmi_netset_get_active_preferred_mode(void);
#endif /* __MMI_WLAN_FEATURES__ */

// begin add by luo ren 2007/04/28
#ifdef __MMI_CLOSE_STATUS_ICONS_IN_SUBMENUS__
#include "CallManagementIdDef.h"
#include "CallhistoryEnum.h"
#include "SimDetectionDef.h"
#include "MessagesResourceData.h"
#include  "IdleAppDef.h"
#include "SimDetectionDef.h"         //add by luo ren 2007/05/07
#include  "CallmanagementIdDef.h"  //add by luo ren 2007/05/14
#include  "PhoneBookDef.h"   //zx add 20070521
#include  "vObjectsEnum.h"   //zx add 20070523
// wangbei add start 20071010
#ifdef __NEW_STATUS_ICONS_STYLE__
#include "MainMenuDef.h"   
#endif
// wangbei add end
#endif
//end add by luo ren 2007/04/28

/* 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 mmi_flight_mode_is_status_icon_visible(S16 icon_ID, U32 icon_flag);

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_REVERB_EFFECT__
    /* 50 */ {0, 0, 0, 0, IMG_SI_REVERBSND, 0, 0, 0, 0, NULL, 0,},
#endif 
#ifdef __MMI_AUDIO_SURROUND_EFFECT__
    /* 51 */ {0, 0, 0, 0, IMG_SI_SURROUNDSND, 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_REVERB_EFFECT__
        ,
    STATUS_ICON_REVERB_SOUND
#endif /* __MMI_AUDIO_REVERB_EFFECT__ */ 
#ifdef __MMI_AUDIO_SURROUND_EFFECT__
        ,
    STATUS_ICON_AUD_SURROUND
#endif
#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__ */ 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -