# HG changeset patch # User Mychaela Falconia # Date 1603418398 0 # Node ID e9a4b683f69731f3c4dcc8b75a99a0c91925892e # Parent 40d5d4addfb2781e5082d84939d8bc750d3068d0 mmiIcons.c: selective tab fixes diff -r 40d5d4addfb2 -r e9a4b683f697 src/ui/bmi/mmiIcons.c --- a/src/ui/bmi/mmiIcons.c Fri Oct 23 01:29:36 2020 +0000 +++ b/src/ui/bmi/mmiIcons.c Fri Oct 23 01:59:58 2020 +0000 @@ -9,14 +9,14 @@ ******************************************************************************** - $Project name: Basic MMI - $Project code: BMI (6349) - $Module: Icons - $File: Mmiicons.h - $Revision: 1.0 - - $Author: Condat(UK) - $Date: 25/10/00 + $Project name: Basic MMI + $Project code: BMI (6349) + $Module: Icons + $File: Mmiicons.h + $Revision: 1.0 + + $Author: Condat(UK) + $Date: 25/10/00 ******************************************************************************** @@ -194,7 +194,7 @@ /******************************************************************************* - Icon Bitmaps + Icon Bitmaps *******************************************************************************/ @@ -1510,7 +1510,7 @@ #define ICON_POS_Y (1) #ifdef WIDEICONS #define ICON_SX (21) -#define ICON_WIDTH ((SCREEN_SIZE_X)/8) +#define ICON_WIDTH ((SCREEN_SIZE_X)/8) #define ICON_POS_X_BATT (0) #define ICON_POS_X_CPR (ICON_WIDTH) #define ICON_POS_X_MSG (ICON_WIDTH*2) @@ -1523,7 +1523,7 @@ #define ICON_POS_X_SRNG (0) #else #define ICON_SX (19) -#define ICON_WIDTH ((SCREEN_SIZE_X)/9) +#define ICON_WIDTH ((SCREEN_SIZE_X)/9) #define ICON_POS_X_BATT (0) #define ICON_POS_X_CPR (ICON_WIDTH) #define ICON_POS_X_MSG (ICON_WIDTH*2) @@ -1928,7 +1928,7 @@ $Description: Change the background bitmap for the main menu to the id supplied - $Returns: None. + $Returns: None. $Arguments: bmpId - enumerated type for background bitmaps @@ -1989,7 +1989,7 @@ $Description: handle an icon event, empty handler - $Returns: None. + $Returns: None. $Arguments: e, event, i, icon @@ -2006,7 +2006,7 @@ $Description: handle a battery icon event, empty handler - $Returns: None. + $Returns: None. $Arguments: e, event, i, icon @@ -2024,7 +2024,7 @@ $Description: handle a signal icon event, empty handler - $Returns: None. + $Returns: None. $Arguments: e, event, i, icon @@ -2042,7 +2042,7 @@ $Description: Clears the icon area of all currently displayed icons - $Returns: None. + $Returns: None. $Arguments: None. @@ -2062,7 +2062,7 @@ $Description: display a single icon if it is currently visible - $Returns: None + $Returns: None $Arguments: Icon, pointer to the icon in question @@ -2088,13 +2088,13 @@ /******************************************************************************* - $Function: iconsInit - - $Description: Initialise the MMI Icon handling - - $Returns: None - - $Arguments: None + $Function: iconsInit + + $Description: Initialise the MMI Icon handling + + $Returns: None + + $Arguments: None *******************************************************************************/ @@ -2102,26 +2102,26 @@ { int i; - /* Create and initialise each of the icon state tables, to provide - invisible (initially) icons - */ + /* Create and initialise each of the icon state tables, to provide + invisible (initially) icons + */ for (i = 0; i < idlIdMax; i++) { state[i].state = ICON_INVISIBLE; state[i].h = icnCreate( 0, (MfwIcnAttr *)&idl_Attr[i], E_ICN_VISIBLE, (MfwCb) iconsEvent ); } - /* Battery icons - */ - for (i = 0; i < iconBattMax; i++) + /* Battery icons + */ + for (i = 0; i < iconBattMax; i++) { battstate[i].state = ICON_INVISIBLE; battstate[i].h = icnCreate( 0, (MfwIcnAttr *)&batt_Attr[i], E_ICN_VISIBLE, (MfwCb) iconsBattEvent ); } - /* Signal icons - */ - for (i = 0; i < iconSignalMax; i++) + /* Signal icons + */ + for (i = 0; i < iconSignalMax; i++) { signalstate[i].state = ICON_INVISIBLE; signalstate[i].h = icnCreate( 0, (MfwIcnAttr *)&sign_Attr[i], E_ICN_VISIBLE, (MfwCb) iconsSignEvent ); @@ -2134,13 +2134,13 @@ /******************************************************************************* - $Function: iconsExit - - $Description: Exit the MMI icons handling - - $Returns: None. - - $Arguments: None. + $Function: iconsExit + + $Description: Exit the MMI icons handling + + $Returns: None. + + $Arguments: None. *******************************************************************************/ @@ -2148,15 +2148,15 @@ { int i; - /* Delete all of the icons created during the iconsInit routine - */ + /* Delete all of the icons created during the iconsInit routine + */ for ( i = 0; i < idlIdMax; i++ ) icnDelete( state[i].h ); for ( i = 0; i < iconBattMax; i++ ) icnDelete( battstate[i].h ); - for ( i = 0; i < iconSignalMax; i++ ) + for ( i = 0; i < iconSignalMax; i++ ) icnDelete( signalstate[i].h ); } @@ -2165,21 +2165,21 @@ /******************************************************************************* - $Function: iconsGetState - - $Description: Get the state of an icon ICON_VISIBLE/ICON_INVISIBLE - - $Returns: Return state of icon. - - $Arguments: iconId, the id of the icon to be set + $Function: iconsGetState + + $Description: Get the state of an icon ICON_VISIBLE/ICON_INVISIBLE + + $Returns: Return state of icon. + + $Arguments: iconId, the id of the icon to be set *******************************************************************************/ U8 iconsGetState( int iconId ) { - TRACE_FUNCTION("iconsGetState() "); - /* Only set the state if the iconId is valid, ie in range - */ + TRACE_FUNCTION("iconsGetState() "); + /* Only set the state if the iconId is valid, ie in range + */ if ( ( iconId >= 0 ) && ( iconId < idlIdMax ) ) return state[iconId].state; @@ -2189,21 +2189,21 @@ /******************************************************************************* - $Function: iconsSetState - - $Description: Sets the state of an icon to be visible - - $Returns: None - - $Arguments: iconId, the id of the icon to be set + $Function: iconsSetState + + $Description: Sets the state of an icon to be visible + + $Returns: None + + $Arguments: iconId, the id of the icon to be set *******************************************************************************/ void iconsSetState( int iconId ) { - TRACE_FUNCTION("iconsSetState() "); - /* Only set the state if the iconId is valid, ie in range - */ + TRACE_FUNCTION("iconsSetState() "); + /* Only set the state if the iconId is valid, ie in range + */ if ( ( iconId >= 0 ) && ( iconId < idlIdMax ) ) state[iconId].state = ICON_VISIBLE; } @@ -2214,21 +2214,21 @@ /******************************************************************************* - $Function: iconsDeleteState - - $Description: Sets the state of an icon to be invisible - - $Returns: None - - $Arguments: iconId, the id of the icon to be deleted + $Function: iconsDeleteState + + $Description: Sets the state of an icon to be invisible + + $Returns: None + + $Arguments: iconId, the id of the icon to be deleted *******************************************************************************/ void iconsDeleteState( int iconId ) { - TRACE_FUNCTION("iconsDeleteState()"); - /* Only set the state if the iconId is valid, ie in range - */ + TRACE_FUNCTION("iconsDeleteState()"); + /* Only set the state if the iconId is valid, ie in range + */ if ( ( iconId >= 0 ) && ( iconId < idlIdMax ) ) state[iconId].state = ICON_INVISIBLE; } @@ -2238,13 +2238,13 @@ /******************************************************************************* - $Function: iconsShow - - $Description: Show the current set of icons on the display - - $Returns: None - - $Arguments: None + $Function: iconsShow + + $Description: Show the current set of icons on the display + + $Returns: None + + $Arguments: None *******************************************************************************/ @@ -2256,125 +2256,125 @@ TRACE_FUNCTION("iconsShow"); - /* The power-off scenario requires a check in here to override the - normal behaviour of the show routine - */ - - //nm + 25.2.01 - //it is only temporary for the B-Sample - // just testing the icon - //globalBatteryPicNumber = 4; //Leela 10 Apr, 2006 - resources_setTitleColour( COLOUR_IDLE ); + /* The power-off scenario requires a check in here to override the + normal behaviour of the show routine + */ + + //nm + 25.2.01 + //it is only temporary for the B-Sample + // just testing the icon + //globalBatteryPicNumber = 4; //Leela 10 Apr, 2006 + resources_setTitleColour( COLOUR_IDLE ); #ifndef COLOURDISPLAY - iconsScreenDelete(); + iconsScreenDelete(); #endif - if ( GlobalIconStatus & GlobalBatteryIconFlag ) - { - TRACE_EVENT_P1("iconsShow:globalBatteryPicNumber:%d", globalBatteryPicNumber); - iconsShowBattery( globalBatteryPicNumber ); - } - - if ( GlobalIconStatus & GlobalSignalIconFlag ) - iconsShowSignal( globalSignalPicNumber ); - // Apr 27, 2004 REF: ENH 12646 Deepa M.D - if ( GlobalIconStatus & GlobalSMSIconFlag ) - { - if (smsidle_get_memory_full()) //If memory is full, blink the SMS icon - iconsShowSmsFull ( ); - else - iconsShowIcon( &state[ iconIdSMS ] ); //else show the normal SMS icon - } + if ( GlobalIconStatus & GlobalBatteryIconFlag ) + { + TRACE_EVENT_P1("iconsShow:globalBatteryPicNumber:%d", globalBatteryPicNumber); + iconsShowBattery( globalBatteryPicNumber ); + } + + if ( GlobalIconStatus & GlobalSignalIconFlag ) + iconsShowSignal( globalSignalPicNumber ); + // Apr 27, 2004 REF: ENH 12646 Deepa M.D + if ( GlobalIconStatus & GlobalSMSIconFlag ) + { + if (smsidle_get_memory_full()) //If memory is full, blink the SMS icon + iconsShowSmsFull ( ); + else + iconsShowIcon( &state[ iconIdSMS ] ); //else show the normal SMS icon + } //nm do it later, step by step - if ( GlobalIconStatus & GlobalVoiceMailIconFlag ) - iconsShowIcon( &state[ iconIdVoice ] ); - - if ( GlobalIconStatus & GlobalCallForwardingIconFlag ) - iconsShowIcon( &state[ iconIdCallFor ] ); - - - if ( GlobalIconStatus & GlobalKeyplockIconFlag ) - iconsShowIcon( &state[ iconIdKeyplock ] ); - - if ( GlobalIconStatus & GlobalCipheringActivIconFlag ) - iconsShowIcon( &state[ iconIdCipheringActiv ] ); - - if ( GlobalIconStatus & GlobalCipheringDeactivIconFlag ) - iconsShowIcon( &state[ iconIdCipheringDeActiv ] ); - - /* SPR#2346 - SH - Show GPRS Attached icon*/ - - #ifdef MMI_GPRS_ENABLED - if ( GlobalIconStatus & GlobalGPRSOnIconFlag ) - { + if ( GlobalIconStatus & GlobalVoiceMailIconFlag ) + iconsShowIcon( &state[ iconIdVoice ] ); + + if ( GlobalIconStatus & GlobalCallForwardingIconFlag ) + iconsShowIcon( &state[ iconIdCallFor ] ); + + + if ( GlobalIconStatus & GlobalKeyplockIconFlag ) + iconsShowIcon( &state[ iconIdKeyplock ] ); + + if ( GlobalIconStatus & GlobalCipheringActivIconFlag ) + iconsShowIcon( &state[ iconIdCipheringActiv ] ); + + if ( GlobalIconStatus & GlobalCipheringDeactivIconFlag ) + iconsShowIcon( &state[ iconIdCipheringDeActiv ] ); + + /* SPR#2346 - SH - Show GPRS Attached icon*/ + + #ifdef MMI_GPRS_ENABLED + if ( GlobalIconStatus & GlobalGPRSOnIconFlag ) + { #ifdef NEPTUNE_BOARD - iResult = GPRS_Status(); - - if (iResult == GPRS_ATTACHED) - { - iconsShowIcon( &state[ iconIdGPRSOn ] ); - } - - if (iResult == EDGE_ATTACHED) - { - iconsShowIcon( &state[ iconIdEdgeOn] ); - } + iResult = GPRS_Status(); + + if (iResult == GPRS_ATTACHED) + { + iconsShowIcon( &state[ iconIdGPRSOn ] ); + } + + if (iResult == EDGE_ATTACHED) + { + iconsShowIcon( &state[ iconIdEdgeOn] ); + } #else - GPRS_Status(); - iconsShowIcon( &state[ iconIdGPRSOn ] ); + GPRS_Status(); + iconsShowIcon( &state[ iconIdGPRSOn ] ); #endif - } - #endif - - /* SPR#1985 - SH - Only show one of TTY or Homezone icons. - * Homezone takes precedence */ - - /* Show Homezone icon. */ - - #ifdef MMI_HOMEZONE_ENABLED - if ( GlobalIconStatus & GlobalHomezoneIconFlag ) - { - iconsShowIcon( &state[ iconIdHomezone ] ); - } - #endif - - /* Show TTY icon if active & homezone icon is not shown */ - #ifdef MMI_TTY_ENABLED - if ( (GlobalIconStatus & GlobalTTYIconFlag) && - !( ( GlobalIconStatus & GlobalHomezoneIconFlag ) && state[iconIdHomezone].state==ICON_VISIBLE ) ) - { - iconsShowIcon( &state[ iconIdTTY ] ); - } - #endif - /* end SH */ - - - - - if ( GlobalIconStatus & GlobalAlarmIconFlag ) - iconsShowIcon( &state[ iconIdAlarm ] ); + } + #endif + + /* SPR#1985 - SH - Only show one of TTY or Homezone icons. + * Homezone takes precedence */ + + /* Show Homezone icon. */ + + #ifdef MMI_HOMEZONE_ENABLED + if ( GlobalIconStatus & GlobalHomezoneIconFlag ) + { + iconsShowIcon( &state[ iconIdHomezone ] ); + } + #endif + + /* Show TTY icon if active & homezone icon is not shown */ + #ifdef MMI_TTY_ENABLED + if ( (GlobalIconStatus & GlobalTTYIconFlag) && + !( ( GlobalIconStatus & GlobalHomezoneIconFlag ) && state[iconIdHomezone].state==ICON_VISIBLE ) ) + { + iconsShowIcon( &state[ iconIdTTY ] ); + } + #endif + /* end SH */ + + + + + if ( GlobalIconStatus & GlobalAlarmIconFlag ) + iconsShowIcon( &state[ iconIdAlarm ] ); /* May 30, 2006 REF:OMAPS00079650 a0393213 (R.Prabakar) Description : CPHS Roaming indication feature implementation Solution : As part of this implementation, roaming icon is showed based on a flag corresponding to roaming*/ - if(GlobalIconStatus & GlobalRoamingIconFlag) - iconsShowIcon(&state[iconIdRoaming]); - //Change the colour back to what the menu was. - resources_restoreMnuColour(); + if(GlobalIconStatus & GlobalRoamingIconFlag) + iconsShowIcon(&state[iconIdRoaming]); + //Change the colour back to what the menu was. + resources_restoreMnuColour(); } /******************************************************************************* - $Function: iconsShowBattery - - $Description: Show battery status icons - - $Returns: 0 if error detected, otherwise 1 - - $Arguments: batterystatus, the current battery icon to be displayed + $Function: iconsShowBattery + + $Description: Show battery status icons + + $Returns: 0 if error detected, otherwise 1 + + $Arguments: batterystatus, the current battery icon to be displayed *******************************************************************************/ @@ -2386,9 +2386,9 @@ TRACE_FUNCTION("iconsShowBattery()"); /* If we have an error, ie invalid id then return 0 */ - /* x0045876, 14-Aug-2006 (WR - pointless comparison of unsigned integer with zero) */ - /* if ( ( batterystatus < 0 ) || ( batterystatus >= iconBattMax ) ) */ - if (batterystatus >= iconBattMax) + /* x0045876, 14-Aug-2006 (WR - pointless comparison of unsigned integer with zero) */ + /* if ( ( batterystatus < 0 ) || ( batterystatus >= iconBattMax ) ) */ + if (batterystatus >= iconBattMax) return 0; if( (globalMobileMode & (GlobalMobileOn|GlobalCharging)) AND @@ -2398,22 +2398,22 @@ { icn=((MfwHdr *)battstate[ icon_ctr].h)->data; dspl_BitBlt2(icn->attr->area.px,icn->attr->area.py, - icn->attr->area.sx,icn->attr->area.sy, - icn->attr->icons,icn->index,icn->attr->icnType); + icn->attr->area.sx,icn->attr->area.sy, + icn->attr->icons,icn->index,icn->attr->icnType); timStart(battery_charging_animate); } } else { - /* Otherwise clear all of the battery icons, and then set the - selected value to be visible - */ + /* Otherwise clear all of the battery icons, and then set the + selected value to be visible + */ for( i = 0; i < iconBattMax; i++ ) battstate[ i ].state = ICON_INVISIBLE; - battstate[ batterystatus ].state = ICON_VISIBLE; - - /* and display the current selection - */ + battstate[ batterystatus ].state = ICON_VISIBLE; + + /* and display the current selection + */ icnShow( battstate[ batterystatus ].h ); } return 1; @@ -2421,11 +2421,11 @@ /******************************************************************************* - $Function: BattChargeEventTim - - $Description: Timer callback for battery charging animation - - $Returns: 0 if error detected, otherwise 1 + $Function: BattChargeEventTim + + $Description: Timer callback for battery charging animation + + $Returns: 0 if error detected, otherwise 1 $Arguments: @@ -2446,19 +2446,19 @@ if( icon_ctr >4 ) icon_ctr = 0; - TRACE_EVENT_P1("icon_ctr:%d", icon_ctr); - for( i = 0; i < iconBattMax; i++ ) + TRACE_EVENT_P1("icon_ctr:%d", icon_ctr); + for( i = 0; i < iconBattMax; i++ ) { battstate[ i ].state = ICON_INVISIBLE; - icnHide(battstate[ i].h ); + icnHide(battstate[ i].h ); } - battstate[ icon_ctr ].state = ICON_VISIBLE; - - /* and display the current selection */ - icnUnhide(battstate[ icon_ctr ].h ); - - windowsUpdate(); //redraw the idle screen again. - timStart(battery_charging_animate); + battstate[ icon_ctr ].state = ICON_VISIBLE; + + /* and display the current selection */ + icnUnhide(battstate[ icon_ctr ].h ); + + windowsUpdate(); //redraw the idle screen again. + timStart(battery_charging_animate); } else //else stop animation { @@ -2473,53 +2473,53 @@ // Apr 27, 2004 REF: ENH 12646 Deepa M.D /******************************************************************************* - $Function: iconsShowSmsFull - - $Description: When SMS meory is full,start the timer for blinking the icon. - - $Returns: 0 if error detected, otherwise 1 - - $Arguments: None + $Function: iconsShowSmsFull + + $Description: When SMS meory is full,start the timer for blinking the icon. + + $Returns: 0 if error detected, otherwise 1 + + $Arguments: None *******************************************************************************/ int iconsShowSmsFull( ) { - MfwIcn *icn; - TRACE_FUNCTION("iconsShowSmsFull"); - if(isIconBlinking==1) - { - if(smsStatus==0) - { - - icn=((MfwHdr *)state[ iconIdSMS ] .h)->data; - dspl_BitBlt2(icn->attr->area.px,icn->attr->area.py, - icn->attr->area.sx,icn->attr->area.sy, - icn->attr->icons,icn->index,icn->attr->icnType); - } - return 0; - } - - isIconBlinking=1; - - if (sms_animate) - { - - timStart(sms_animate); - } - - return 1; + MfwIcn *icn; + TRACE_FUNCTION("iconsShowSmsFull"); + if(isIconBlinking==1) + { + if(smsStatus==0) + { + + icn=((MfwHdr *)state[ iconIdSMS ] .h)->data; + dspl_BitBlt2(icn->attr->area.px,icn->attr->area.py, + icn->attr->area.sx,icn->attr->area.sy, + icn->attr->icons,icn->index,icn->attr->icnType); + } + return 0; + } + + isIconBlinking=1; + + if (sms_animate) + { + + timStart(sms_animate); + } + + return 1; } // Apr 27, 2004 REF: ENH 12646 Deepa M.D /******************************************************************************* - $Function: smsFullEventTim - - $Description: Callback function for SMSFull timer.The SMS icon is toggled between visible - and invisible. - - $Returns: Event consumed + $Function: smsFullEventTim + + $Description: Callback function for SMSFull timer.The SMS icon is toggled between visible + and invisible. + + $Returns: Event consumed $Arguments: unused @@ -2528,54 +2528,54 @@ int smsFullEventTim( MfwEvt e, MfwTim *tc ) { - TRACE_FUNCTION("smsFullEventTim"); - -// Oct 28, 2004 REF: CRR 25886 xnkulkar -// Description: SMS Icon is not seen in Idle Screen. -// Solution: A check is done to determine if sms memory is full when the phone is in idle screen or -// when any calls are present and blinking sms icon is displayed. - if(idleIsFocussed() ||(call_data.calls.numCalls!=0)) - { - smsStatus++; - /* x0045876, 14-Aug-2006 (WR - pointless comparison of unsigned integer with zero) */ - /* if( smsStatus<0 || smsStatus>=2) */ - if(smsStatus>=2) - smsStatus=0; - - if(smsStatus==0) //The icon will be visible - { - state[ iconIdSMS ] .state = ICON_VISIBLE; - icnUnhide(state[ iconIdSMS ] .h); - } - else //The icon will be invisible - { - state[ iconIdSMS ] .state = ICON_INVISIBLE; - icnHide(state[ iconIdSMS ] .h); - } - windowsUpdate(); //redraw the idle screen again. - if (sms_animate) - { - timStart(sms_animate); - } - - } - else //else stop the timer for blinking. - { - isIconBlinking=0; - - if (sms_animate) - { - timStop(sms_animate); - } - } - - return MFW_EVENT_CONSUMED; + TRACE_FUNCTION("smsFullEventTim"); + +// Oct 28, 2004 REF: CRR 25886 xnkulkar +// Description: SMS Icon is not seen in Idle Screen. +// Solution: A check is done to determine if sms memory is full when the phone is in idle screen or +// when any calls are present and blinking sms icon is displayed. + if(idleIsFocussed() ||(call_data.calls.numCalls!=0)) + { + smsStatus++; + /* x0045876, 14-Aug-2006 (WR - pointless comparison of unsigned integer with zero) */ + /* if( smsStatus<0 || smsStatus>=2) */ + if(smsStatus>=2) + smsStatus=0; + + if(smsStatus==0) //The icon will be visible + { + state[ iconIdSMS ] .state = ICON_VISIBLE; + icnUnhide(state[ iconIdSMS ] .h); + } + else //The icon will be invisible + { + state[ iconIdSMS ] .state = ICON_INVISIBLE; + icnHide(state[ iconIdSMS ] .h); + } + windowsUpdate(); //redraw the idle screen again. + if (sms_animate) + { + timStart(sms_animate); + } + + } + else //else stop the timer for blinking. + { + isIconBlinking=0; + + if (sms_animate) + { + timStop(sms_animate); + } + } + + return MFW_EVENT_CONSUMED; } /******************************************************************************* - $Function: iconShowGoodbye + $Function: iconShowGoodbye $Description: @@ -2587,77 +2587,77 @@ void iconShowGoodbye( void) { -// iconsShowIcon( &state[ iconGoodbye ] ); +// iconsShowIcon( &state[ iconGoodbye ] ); } /******************************************************************************* - $Function: iconsShowSignal - - $Description: Shows the signal status icons - - $Returns: 0 if error detected, otherwise 1 - - $Arguments: signalstatus, the current signal icon to be displayed + $Function: iconsShowSignal + + $Description: Shows the signal status icons + + $Returns: 0 if error detected, otherwise 1 + + $Arguments: signalstatus, the current signal icon to be displayed *******************************************************************************/ int iconsShowSignal (U8 signalstatus) { - int i; - - /* If we have an error, ie invalid id then return 0 - */ - /* x0045876, 14-Aug-2006 (WR - pointless comparison of unsigned integer with zero) */ - /* if ( ( signalstatus < 0 ) || ( signalstatus >= iconSignalMax ) ) */ - if (signalstatus >= iconSignalMax) + int i; + + /* If we have an error, ie invalid id then return 0 + */ + /* x0045876, 14-Aug-2006 (WR - pointless comparison of unsigned integer with zero) */ + /* if ( ( signalstatus < 0 ) || ( signalstatus >= iconSignalMax ) ) */ + if (signalstatus >= iconSignalMax) return 0; - /* Otherwise clear all of the signal icons, and then set the - selected value to be visible - */ + /* Otherwise clear all of the signal icons, and then set the + selected value to be visible + */ for( i = 0; i < iconSignalMax; i++ ) signalstate[ i ].state = ICON_INVISIBLE; - signalstate[ signalstatus ].state = ICON_VISIBLE; - - /* and display the current selection - */ + signalstate[ signalstatus ].state = ICON_VISIBLE; + + /* and display the current selection + */ icnShow( signalstate[ signalstatus ].h ); - return 1; + return 1; } /******************************************************************************* - $Function: iconsInputShow - - $Description: show current input icons - - $Returns: None - - $Arguments: IconInputId, id of icon to be displayed + $Function: iconsInputShow + + $Description: show current input icons + + $Returns: None + + $Arguments: IconInputId, id of icon to be displayed *******************************************************************************/ void iconsInputShow (int IconInputId) { - CLEAR_BOTTOM_ZONE_ICON; + CLEAR_BOTTOM_ZONE_ICON; } /******************************************************************************* - $Function: iconsMainIconsAreaSet - - $Description: sets the current main icons area - - $Returns: None - - $Arguments: None + $Function: iconsMainIconsAreaSet + + $Description: sets the current main icons area + + $Returns: None + + $Arguments: None *******************************************************************************/ @@ -2667,56 +2667,56 @@ void copyAreaAttr(MfwRect *iconArea, MfwRect *display_area) { - if (display_area->sx > iconArea->sx) - { - iconArea->px = display_area->px + (display_area->sx - iconArea->sx)/2; - } - else - { - iconArea->px = display_area->px; - } - if (display_area->sy > iconArea->sy) - { - iconArea->py = display_area->py + (display_area->sy - iconArea->sy)/2; - } - else - { - iconArea->py = display_area->py; - - if (display_area->sy < iconArea->sy) - iconArea->sy = display_area->sy; + if (display_area->sx > iconArea->sx) + { + iconArea->px = display_area->px + (display_area->sx - iconArea->sx)/2; + } + else + { + iconArea->px = display_area->px; + } + if (display_area->sy > iconArea->sy) + { + iconArea->py = display_area->py + (display_area->sy - iconArea->sy)/2; + } + else + { + iconArea->py = display_area->py; + + if (display_area->sy < iconArea->sy) + iconArea->sy = display_area->sy; #ifndef LSCREEN /*With the small screen we change the size of the idle icons (when changing language)*/ - else - iconArea->sy = MAIN_ICON_Y; + else + iconArea->sy = MAIN_ICON_Y; #endif - } + } } void iconsMainIconsAreaSet (MfwRect selected_area) { - copyAreaAttr( &mainIconSimToolkit.area, &selected_area); - copyAreaAttr( &mainIconCalculator.area, &selected_area); - copyAreaAttr( &mainIconSettings.area, &selected_area); - copyAreaAttr( &mainIconWAP.area, &selected_area); - copyAreaAttr( &mainIconRecentCalls.area, &selected_area); - copyAreaAttr( &mainIconCallDivert.area, &selected_area); - copyAreaAttr( &mainIconSecurity.area, &selected_area); - copyAreaAttr( &mainIconMessages.area, &selected_area); - copyAreaAttr( &mainIconPhonebook.area, &selected_area); + copyAreaAttr( &mainIconSimToolkit.area, &selected_area); + copyAreaAttr( &mainIconCalculator.area, &selected_area); + copyAreaAttr( &mainIconSettings.area, &selected_area); + copyAreaAttr( &mainIconWAP.area, &selected_area); + copyAreaAttr( &mainIconRecentCalls.area, &selected_area); + copyAreaAttr( &mainIconCallDivert.area, &selected_area); + copyAreaAttr( &mainIconSecurity.area, &selected_area); + copyAreaAttr( &mainIconMessages.area, &selected_area); + copyAreaAttr( &mainIconPhonebook.area, &selected_area); /* #ifdef COLOURDISPLAY #ifdef USE110X110 - //No 110x110 for sim toolkit yet - mainIconSimToolkit.area.sx = 96; - mainIconSimToolkit.area.sy = 96; + //No 110x110 for sim toolkit yet + mainIconSimToolkit.area.sx = 96; + mainIconSimToolkit.area.sy = 96; #else - //Applications icon is 1 pixel wider than the rest - mainIconCalculator.area.sx = 97; - mainIconCalculator.area.sy = 96; + //Applications icon is 1 pixel wider than the rest + mainIconCalculator.area.sx = 97; + mainIconCalculator.area.sy = 96; #endif #endif*/ } @@ -2724,188 +2724,188 @@ /******************************************************************************* - $Function: () + $Function: () $Description: - $Returns: None - - $Arguments: None + $Returns: None + + $Arguments: None *******************************************************************************/ #ifdef COLOURDISPLAY -static T_BITMAP bgdBmpBubbles = {{0,0,120,120},1,COLOUR_ICON_XX,BMP_FORMAT_32BIT_COLOUR,(char*) bmpDataBubbles}; -static T_BITMAP bgdBmpCloud = {{0,0,120,100},1,COLOUR_ICON_XX,BMP_FORMAT_32BIT_COLOUR,(char*) bmpDataCloud}; +static T_BITMAP bgdBmpBubbles = {{0,0,120,120},1,COLOUR_ICON_XX,BMP_FORMAT_32BIT_COLOUR,(char*) bmpDataBubbles}; +static T_BITMAP bgdBmpCloud = {{0,0,120,100},1,COLOUR_ICON_XX,BMP_FORMAT_32BIT_COLOUR,(char*) bmpDataCloud}; /* x0039928 - Lint warning removal -static T_BITMAP bgdBmpSquares = {{0,0,176,220},1,COLOUR_ICON_XX, ICON_TYPE_16BIT_COL, (char *)bmpDataSquares }; -static T_BITMAP bgdBmpO2 = {{0,0,120,100},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR,(char*) bmpDataSquares}; -static T_BITMAP bgdBmpTree = {{0,0,120,100},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR,(char*) bmpDataSquares}; */ +static T_BITMAP bgdBmpSquares = {{0,0,176,220},1,COLOUR_ICON_XX, ICON_TYPE_16BIT_COL, (char *)bmpDataSquares }; +static T_BITMAP bgdBmpO2 = {{0,0,120,100},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR,(char*) bmpDataSquares}; +static T_BITMAP bgdBmpTree = {{0,0,120,100},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR,(char*) bmpDataSquares}; */ // by Nitin to set the TI Logo position // This has to be permamnantly done for Neptune #if (BOARD == 61) -static T_BITMAP TI_Bgd = {{32,50,176,220},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*) Ti_bgd_bmp}; +static T_BITMAP TI_Bgd = {{32,50,176,220},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*) Ti_bgd_bmp}; #else -static T_BITMAP TI_Bgd = {{0,0,176,220},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*) Ti_bgd_bmp}; +static T_BITMAP TI_Bgd = {{0,0,176,220},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*) Ti_bgd_bmp}; #endif //(BOARD == 61) -static T_BITMAP call_backdrop = {{2,8,120,170},1,COLOUR_ICON_XX,ICON_TYPE_1BIT_UNPACKED, (char *) iconInCallBackDrop}; - -static T_BITMAP Edinburgh1_Bgd = {{0,0,175,220},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR, (char*) Edinburgh1_bgd_bmp}; -static T_BITMAP Edinburgh2_Bgd = {{0,0,175,220},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR, (char*) &Edinburgh1_bgd_bmp[2]}; -static T_BITMAP Edinburgh3_Bgd = {{0,0,175,220},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR, (char*) Edinburgh3_bgd_bmp}; -static T_BITMAP Edinburgh4_Bgd = {{0,0,175,220},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR, (char*) &Edinburgh3_bgd_bmp[2]}; +static T_BITMAP call_backdrop = {{2,8,120,170},1,COLOUR_ICON_XX,ICON_TYPE_1BIT_UNPACKED, (char *) iconInCallBackDrop}; + +static T_BITMAP Edinburgh1_Bgd = {{0,0,175,220},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR, (char*) Edinburgh1_bgd_bmp}; +static T_BITMAP Edinburgh2_Bgd = {{0,0,175,220},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR, (char*) &Edinburgh1_bgd_bmp[2]}; +static T_BITMAP Edinburgh3_Bgd = {{0,0,175,220},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR, (char*) Edinburgh3_bgd_bmp}; +static T_BITMAP Edinburgh4_Bgd = {{0,0,175,220},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR, (char*) &Edinburgh3_bgd_bmp[2]}; #endif T_BITMAP* icon_getBgdBitmap( int bgdId ) { - TRACE_FUNCTION("icon_getBgdBitmap()"); + TRACE_FUNCTION("icon_getBgdBitmap()"); #ifdef COLOURDISPLAY - switch (bgdId) - { - case BGD_NONE: - return (NULL); - case BGD_BUBBLES: - return (&bgdBmpBubbles); - case BGD_CLOUD: - return (&bgdBmpCloud); - case BGD_SQUARE: -// return (&bgdBmpSquares); - break; - case BGD_TI_LOGO: - return (&TI_Bgd); - case BGD_O2: - return (NULL); - case BGD_TREE: - return (NULL); - case BGD_SUNSET: - return (NULL); - case BGD_EDINBURGH1: - return (&Edinburgh1_Bgd); - case BGD_EDINBURGH2: - return (&Edinburgh2_Bgd); - case BGD_EDINBURGH3: - return (&Edinburgh3_Bgd); - case BGD_EDINBURGH4: - return (&Edinburgh4_Bgd); - case BGD_INCALL: - return(&call_backdrop); - - } + switch (bgdId) + { + case BGD_NONE: + return (NULL); + case BGD_BUBBLES: + return (&bgdBmpBubbles); + case BGD_CLOUD: + return (&bgdBmpCloud); + case BGD_SQUARE: +// return (&bgdBmpSquares); + break; + case BGD_TI_LOGO: + return (&TI_Bgd); + case BGD_O2: + return (NULL); + case BGD_TREE: + return (NULL); + case BGD_SUNSET: + return (NULL); + case BGD_EDINBURGH1: + return (&Edinburgh1_Bgd); + case BGD_EDINBURGH2: + return (&Edinburgh2_Bgd); + case BGD_EDINBURGH3: + return (&Edinburgh3_Bgd); + case BGD_EDINBURGH4: + return (&Edinburgh4_Bgd); + case BGD_INCALL: + return(&call_backdrop); + + } #endif - return (NULL); + return (NULL); } #ifdef COLOURDISPLAY /******************************************************************************* - $Function: addnetwork - - $Description: This function adds a link between a bitmap and a network number. - - $Returns: None - - $Arguments: networkBitmap - pointer to the bitmap data - networkNo - pointer to the UBYTE array containing the network number + $Function: addnetwork + + $Description: This function adds a link between a bitmap and a network number. + + $Returns: None + + $Arguments: networkBitmap - pointer to the bitmap data + networkNo - pointer to the UBYTE array containing the network number *******************************************************************************/ #define MAX_NETWORK_NUMBER 50 typedef struct { - char *num; - T_BITMAP *bmp; + char *num; + T_BITMAP *bmp; } T_NETWORK_BITMAP; static T_NETWORK_BITMAP networkBitmap[MAX_NETWORK_NUMBER]; static void addnetwork(T_BITMAP *networkBmp, char* networkNo) { - int i=0; - while (i='0') && (str[i] <='9')) - num = num*10+str[i]-'0'; - else - return (num); - } - return (num); + int num = 0; + int i; + for (i=0;i='0') && (str[i] <='9')) + num = num*10+str[i]-'0'; + else + return (num); + } + return (num); } /******************************************************************************* - $Function: icon_getNetworkIcon - - $Description: This procedure returns a bitmap based on the suplied network number. - - $Returns: Pointer to the network logo bitmap - - $Arguments: networkNumber - array of data corresponding to the network number - NB This may not be null terminated. + $Function: icon_getNetworkIcon + + $Description: This procedure returns a bitmap based on the suplied network number. + + $Returns: Pointer to the network logo bitmap + + $Arguments: networkNumber - array of data corresponding to the network number + NB This may not be null terminated. *******************************************************************************/ T_BITMAP* icon_getNetworkIcon( UBYTE* networkNumber) { - char num[SIZE_PLMN_NAME+1]; - int i; - static int init=1; - TRACE_FUNCTION("icon_getNetworkIcon()"); - if (init) - { - icon_initNetworkBitmaps( ); - init=0; - } - // AP - 29-01-03 - IF this is satisfied we dont want to show provider icon - if( FFS_flashData.ProviderNetworkShow == FALSE ) - return ( NULL ); - - //NB: NetworkNumber may not be null terminated - for (i=0;iarea.sx = 0; - bmpData->area.sy = 0; - } - else - { - bmpData->area.px = data->area.px; - bmpData->area.py = data->area.py; - bmpData->area.sx = data->area.sx; - bmpData->area.sy = data->area.sy; - bmpData->area.sx = data->area.sx; - bmpData->nIcons = data->nIcons; - bmpData->iconCol = data->iconCol; - bmpData->icnType = data->icnType; - bmpData->icons = data->icons; - } - } - return (data); + T_BITMAP* data; + TRACE_FUNCTION("icon_getBitmapFromId()"); + + data = icon_getBgdBitmap( bgdId ); + //Update the supplied data structure (if any) + if (bmpData != NULL) + { + if (data == NULL) + { + bmpData->area.sx = 0; + bmpData->area.sy = 0; + } + else + { + bmpData->area.px = data->area.px; + bmpData->area.py = data->area.py; + bmpData->area.sx = data->area.sx; + bmpData->area.sy = data->area.sy; + bmpData->area.sx = data->area.sx; + bmpData->nIcons = data->nIcons; + bmpData->iconCol = data->iconCol; + bmpData->icnType = data->icnType; + bmpData->icons = data->icons; + } + } + return (data); } /******************************************************************************* - $Function: icon_bgdMenuSelected() - - $Description: This procedure is called when a background image is selected from a menu. - - $Returns: None - - $Arguments: None + $Function: icon_bgdMenuSelected() + + $Description: This procedure is called when a background image is selected from a menu. + + $Returns: None + + $Arguments: None *******************************************************************************/ int icon_bgdMenuSelected(MfwMnu* mnu, MfwMnuItem* mnuItem) { - T_MFW_HND win = mfw_parent(mfw_header()); - int mnuId; - /* int colDisplayType; */ /* Warning */ - /* int colType; */ /* Warning */ - /* int colFgdSelect = FALSE; */ /* Warning */ - int bmpId; - /* T_BITMAP *backgroundBmp; */ /* Warning */ - int storedMenuId; - - //The destination for the bitmap has been storeed by the previous menu selection - storedMenuId = MmiBook_getStoredOption(); - mnuId = (int)mnuItem->str; - - //Get the BMI index corresponding to the text string - bmpId = icon_getBitmapIdFromText(mnuId); - - //Depending on where this is to be displayed, we need either a pointer to the data or we - //must copy the data out of the structure to update another structure. - switch (storedMenuId) - { + T_MFW_HND win = mfw_parent(mfw_header()); + int mnuId; + /* int colDisplayType; */ /* Warning */ + /* int colType; */ /* Warning */ + /* int colFgdSelect = FALSE; */ /* Warning */ + int bmpId; + /* T_BITMAP *backgroundBmp; */ /* Warning */ + int storedMenuId; + + //The destination for the bitmap has been storeed by the previous menu selection + storedMenuId = MmiBook_getStoredOption(); + mnuId = (int)mnuItem->str; + + //Get the BMI index corresponding to the text string + bmpId = icon_getBitmapIdFromText(mnuId); + + //Depending on where this is to be displayed, we need either a pointer to the data or we + //must copy the data out of the structure to update another structure. + switch (storedMenuId) + { case TxtIdleScreen: - /* Update idle screen bitmap */ - idle_setBgdBitmap(bmpId); - FFS_flashData.IdleScreenBgd = bmpId; - break; + /* Update idle screen bitmap */ + idle_setBgdBitmap(bmpId); + FFS_flashData.IdleScreenBgd = bmpId; + break; case TxtMenuScreen: - /* The menu screen bitmap is a fixed structure - we need to update the data within*/ - icon_setMainBgdBitmap(bmpId); - FFS_flashData.MainMenuBgd = bmpId; - break; - -default: //unknown option - break; - } - - info_screen(win, TxtBackground, TxtSelected, 0); - flash_write(); - return(0); + /* The menu screen bitmap is a fixed structure - we need to update the data within*/ + icon_setMainBgdBitmap(bmpId); + FFS_flashData.MainMenuBgd = bmpId; + break; + +default: //unknown option + break; + } + + info_screen(win, TxtBackground, TxtSelected, 0); + flash_write(); + return(0); } /******************************************************************************* - $Function: icon_networkShow - - $Description: Procedure to show acivation of Provider Bitmap - - $Returns: Event consumed - - $Arguments: None + $Function: icon_networkShow + + $Description: Procedure to show acivation of Provider Bitmap + + $Returns: Event consumed + + $Arguments: None *******************************************************************************/ @@ -3145,26 +3145,26 @@ if(FFS_flashData.ProviderNetworkShow == FALSE ) { - FFS_flashData.ProviderNetworkShow = TRUE; - flash_write(); + FFS_flashData.ProviderNetworkShow = TRUE; + flash_write(); }// SPR:12822 vvadiraj - dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtProviderIcon, TxtOn, COLOUR_STATUS); - dlg_initDisplayData_events( &display_info, NULL, THREE_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT ); - - info_dialog(win, &display_info); + dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtProviderIcon, TxtOn, COLOUR_STATUS); + dlg_initDisplayData_events( &display_info, NULL, THREE_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT ); + + info_dialog(win, &display_info); return MFW_EVENT_CONSUMED; // SPR:12822 vvadiraj } } /******************************************************************************* - $Function: icon_networkDontShow - - $Description: Procedure to show deActivate of Provider Bitmap - - $Returns: None - - $Arguments: None + $Function: icon_networkDontShow + + $Description: Procedure to show deActivate of Provider Bitmap + + $Returns: None + + $Arguments: None *******************************************************************************/ @@ -3175,15 +3175,15 @@ if(FFS_flashData.ProviderNetworkShow == TRUE ) { - FFS_flashData.ProviderNetworkShow = FALSE; - flash_write(); + FFS_flashData.ProviderNetworkShow = FALSE; + flash_write(); }// SPR:12822 vvadiraj - dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtProviderIcon, TxtOff, COLOUR_STATUS); - dlg_initDisplayData_events( &display_info, NULL, THREE_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT ); - - info_dialog(win, &display_info); - - return MFW_EVENT_CONSUMED; + dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtProviderIcon, TxtOff, COLOUR_STATUS); + dlg_initDisplayData_events( &display_info, NULL, THREE_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT ); + + info_dialog(win, &display_info); + + return MFW_EVENT_CONSUMED; // SPR:12822 vvadiraj} } #endif @@ -3192,34 +3192,34 @@ /******************************************************************************* - $Function: icon_getNetworkIcon - - $Description: Dummy procedure for non-colour displays - - $Returns: None - - $Arguments: None + $Function: icon_getNetworkIcon + + $Description: Dummy procedure for non-colour displays + + $Returns: None + + $Arguments: None *******************************************************************************/ T_BITMAP* icon_getNetworkIcon( UBYTE* networkNumber) { - return (NULL); + return (NULL); } /******************************************************************************* - $Function: icon_getBitmapFromId - - $Description: Dummy procedure for non-colour displays - - $Returns: None - - $Arguments: None + $Function: icon_getBitmapFromId + + $Description: Dummy procedure for non-colour displays + + $Returns: None + + $Arguments: None *******************************************************************************/ T_BITMAP *icon_getBitmapFromId( int bgdId, T_BITMAP *bmpData) { - return (NULL); + return (NULL); } #endif