comparison src/ui/bmi/mmiIcons.c @ 68:e9a4b683f697

mmiIcons.c: selective tab fixes
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 23 Oct 2020 01:59:58 +0000
parents 40d5d4addfb2
children 77321341946c
comparison
equal deleted inserted replaced
67:40d5d4addfb2 68:e9a4b683f697
7 This software product is the property of Condat (UK) Ltd and may not be 7 This software product is the property of Condat (UK) Ltd and may not be
8 disclosed to any third party without the express permission of the owner. 8 disclosed to any third party without the express permission of the owner.
9 9
10 ******************************************************************************** 10 ********************************************************************************
11 11
12 $Project name: Basic MMI 12 $Project name: Basic MMI
13 $Project code: BMI (6349) 13 $Project code: BMI (6349)
14 $Module: Icons 14 $Module: Icons
15 $File: Mmiicons.h 15 $File: Mmiicons.h
16 $Revision: 1.0 16 $Revision: 1.0
17 17
18 $Author: Condat(UK) 18 $Author: Condat(UK)
19 $Date: 25/10/00 19 $Date: 25/10/00
20 20
21 ******************************************************************************** 21 ********************************************************************************
22 22
23 Description: 23 Description:
24 24
192 extern void scrOnOff (int on); /* ES!! add. functions */ 192 extern void scrOnOff (int on); /* ES!! add. functions */
193 #endif 193 #endif
194 194
195 /******************************************************************************* 195 /*******************************************************************************
196 196
197 Icon Bitmaps 197 Icon Bitmaps
198 198
199 *******************************************************************************/ 199 *******************************************************************************/
200 200
201 /* battery 0-4% 201 /* battery 0-4%
202 */ 202 */
1508 1508
1509 1509
1510 #define ICON_POS_Y (1) 1510 #define ICON_POS_Y (1)
1511 #ifdef WIDEICONS 1511 #ifdef WIDEICONS
1512 #define ICON_SX (21) 1512 #define ICON_SX (21)
1513 #define ICON_WIDTH ((SCREEN_SIZE_X)/8) 1513 #define ICON_WIDTH ((SCREEN_SIZE_X)/8)
1514 #define ICON_POS_X_BATT (0) 1514 #define ICON_POS_X_BATT (0)
1515 #define ICON_POS_X_CPR (ICON_WIDTH) 1515 #define ICON_POS_X_CPR (ICON_WIDTH)
1516 #define ICON_POS_X_MSG (ICON_WIDTH*2) 1516 #define ICON_POS_X_MSG (ICON_WIDTH*2)
1517 #define ICON_POS_X_VMAIL (ICON_WIDTH*3) 1517 #define ICON_POS_X_VMAIL (ICON_WIDTH*3)
1518 #define ICON_POS_X_FOR (ICON_WIDTH*4) 1518 #define ICON_POS_X_FOR (ICON_WIDTH*4)
1521 #define ICON_POS_X_HZONE (ICON_WIDTH*6) 1521 #define ICON_POS_X_HZONE (ICON_WIDTH*6)
1522 #define ICON_POS_X_SIG (ICON_WIDTH*7) 1522 #define ICON_POS_X_SIG (ICON_WIDTH*7)
1523 #define ICON_POS_X_SRNG (0) 1523 #define ICON_POS_X_SRNG (0)
1524 #else 1524 #else
1525 #define ICON_SX (19) 1525 #define ICON_SX (19)
1526 #define ICON_WIDTH ((SCREEN_SIZE_X)/9) 1526 #define ICON_WIDTH ((SCREEN_SIZE_X)/9)
1527 #define ICON_POS_X_BATT (0) 1527 #define ICON_POS_X_BATT (0)
1528 #define ICON_POS_X_CPR (ICON_WIDTH) 1528 #define ICON_POS_X_CPR (ICON_WIDTH)
1529 #define ICON_POS_X_MSG (ICON_WIDTH*2) 1529 #define ICON_POS_X_MSG (ICON_WIDTH*2)
1530 #define ICON_POS_X_VMAIL (ICON_WIDTH*3) 1530 #define ICON_POS_X_VMAIL (ICON_WIDTH*3)
1531 #define ICON_POS_X_FOR (ICON_WIDTH*4) 1531 #define ICON_POS_X_FOR (ICON_WIDTH*4)
1926 1926
1927 $Function: icon_setMainBgdBitmap 1927 $Function: icon_setMainBgdBitmap
1928 1928
1929 $Description: Change the background bitmap for the main menu to the id supplied 1929 $Description: Change the background bitmap for the main menu to the id supplied
1930 1930
1931 $Returns: None. 1931 $Returns: None.
1932 1932
1933 $Arguments: bmpId - enumerated type for background bitmaps 1933 $Arguments: bmpId - enumerated type for background bitmaps
1934 1934
1935 *******************************************************************************/ 1935 *******************************************************************************/
1936 void icon_setMainBgdBitmap (int bmpId) 1936 void icon_setMainBgdBitmap (int bmpId)
1987 1987
1988 $Function: iconsEvent 1988 $Function: iconsEvent
1989 1989
1990 $Description: handle an icon event, empty handler 1990 $Description: handle an icon event, empty handler
1991 1991
1992 $Returns: None. 1992 $Returns: None.
1993 1993
1994 $Arguments: e, event, i, icon 1994 $Arguments: e, event, i, icon
1995 1995
1996 *******************************************************************************/ 1996 *******************************************************************************/
1997 1997
2004 2004
2005 $Function: iconsBattEvent 2005 $Function: iconsBattEvent
2006 2006
2007 $Description: handle a battery icon event, empty handler 2007 $Description: handle a battery icon event, empty handler
2008 2008
2009 $Returns: None. 2009 $Returns: None.
2010 2010
2011 $Arguments: e, event, i, icon 2011 $Arguments: e, event, i, icon
2012 2012
2013 *******************************************************************************/ 2013 *******************************************************************************/
2014 2014
2022 2022
2023 $Function: iconsSignEvent 2023 $Function: iconsSignEvent
2024 2024
2025 $Description: handle a signal icon event, empty handler 2025 $Description: handle a signal icon event, empty handler
2026 2026
2027 $Returns: None. 2027 $Returns: None.
2028 2028
2029 $Arguments: e, event, i, icon 2029 $Arguments: e, event, i, icon
2030 2030
2031 *******************************************************************************/ 2031 *******************************************************************************/
2032 2032
2040 2040
2041 $Function: iconsScreenDelete 2041 $Function: iconsScreenDelete
2042 2042
2043 $Description: Clears the icon area of all currently displayed icons 2043 $Description: Clears the icon area of all currently displayed icons
2044 2044
2045 $Returns: None. 2045 $Returns: None.
2046 2046
2047 $Arguments: None. 2047 $Arguments: None.
2048 2048
2049 *******************************************************************************/ 2049 *******************************************************************************/
2050 2050
2060 2060
2061 $Function: iconsShowIcon 2061 $Function: iconsShowIcon
2062 2062
2063 $Description: display a single icon if it is currently visible 2063 $Description: display a single icon if it is currently visible
2064 2064
2065 $Returns: None 2065 $Returns: None
2066 2066
2067 $Arguments: Icon, pointer to the icon in question 2067 $Arguments: Icon, pointer to the icon in question
2068 2068
2069 *******************************************************************************/ 2069 *******************************************************************************/
2070 2070
2086 2086
2087 *******************************************************************************/ 2087 *******************************************************************************/
2088 2088
2089 /******************************************************************************* 2089 /*******************************************************************************
2090 2090
2091 $Function: iconsInit 2091 $Function: iconsInit
2092 2092
2093 $Description: Initialise the MMI Icon handling 2093 $Description: Initialise the MMI Icon handling
2094 2094
2095 $Returns: None 2095 $Returns: None
2096 2096
2097 $Arguments: None 2097 $Arguments: None
2098 2098
2099 *******************************************************************************/ 2099 *******************************************************************************/
2100 2100
2101 void iconsInit() 2101 void iconsInit()
2102 { 2102 {
2103 int i; 2103 int i;
2104 2104
2105 /* Create and initialise each of the icon state tables, to provide 2105 /* Create and initialise each of the icon state tables, to provide
2106 invisible (initially) icons 2106 invisible (initially) icons
2107 */ 2107 */
2108 for (i = 0; i < idlIdMax; i++) 2108 for (i = 0; i < idlIdMax; i++)
2109 { 2109 {
2110 state[i].state = ICON_INVISIBLE; 2110 state[i].state = ICON_INVISIBLE;
2111 state[i].h = icnCreate( 0, (MfwIcnAttr *)&idl_Attr[i], E_ICN_VISIBLE, (MfwCb) iconsEvent ); 2111 state[i].h = icnCreate( 0, (MfwIcnAttr *)&idl_Attr[i], E_ICN_VISIBLE, (MfwCb) iconsEvent );
2112 } 2112 }
2113 2113
2114 /* Battery icons 2114 /* Battery icons
2115 */ 2115 */
2116 for (i = 0; i < iconBattMax; i++) 2116 for (i = 0; i < iconBattMax; i++)
2117 { 2117 {
2118 battstate[i].state = ICON_INVISIBLE; 2118 battstate[i].state = ICON_INVISIBLE;
2119 battstate[i].h = icnCreate( 0, (MfwIcnAttr *)&batt_Attr[i], E_ICN_VISIBLE, (MfwCb) iconsBattEvent ); 2119 battstate[i].h = icnCreate( 0, (MfwIcnAttr *)&batt_Attr[i], E_ICN_VISIBLE, (MfwCb) iconsBattEvent );
2120 } 2120 }
2121 2121
2122 /* Signal icons 2122 /* Signal icons
2123 */ 2123 */
2124 for (i = 0; i < iconSignalMax; i++) 2124 for (i = 0; i < iconSignalMax; i++)
2125 { 2125 {
2126 signalstate[i].state = ICON_INVISIBLE; 2126 signalstate[i].state = ICON_INVISIBLE;
2127 signalstate[i].h = icnCreate( 0, (MfwIcnAttr *)&sign_Attr[i], E_ICN_VISIBLE, (MfwCb) iconsSignEvent ); 2127 signalstate[i].h = icnCreate( 0, (MfwIcnAttr *)&sign_Attr[i], E_ICN_VISIBLE, (MfwCb) iconsSignEvent );
2128 } 2128 }
2129 } 2129 }
2132 2132
2133 2133
2134 2134
2135 /******************************************************************************* 2135 /*******************************************************************************
2136 2136
2137 $Function: iconsExit 2137 $Function: iconsExit
2138 2138
2139 $Description: Exit the MMI icons handling 2139 $Description: Exit the MMI icons handling
2140 2140
2141 $Returns: None. 2141 $Returns: None.
2142 2142
2143 $Arguments: None. 2143 $Arguments: None.
2144 2144
2145 *******************************************************************************/ 2145 *******************************************************************************/
2146 2146
2147 void iconsExit( void ) 2147 void iconsExit( void )
2148 { 2148 {
2149 int i; 2149 int i;
2150 2150
2151 /* Delete all of the icons created during the iconsInit routine 2151 /* Delete all of the icons created during the iconsInit routine
2152 */ 2152 */
2153 for ( i = 0; i < idlIdMax; i++ ) 2153 for ( i = 0; i < idlIdMax; i++ )
2154 icnDelete( state[i].h ); 2154 icnDelete( state[i].h );
2155 2155
2156 for ( i = 0; i < iconBattMax; i++ ) 2156 for ( i = 0; i < iconBattMax; i++ )
2157 icnDelete( battstate[i].h ); 2157 icnDelete( battstate[i].h );
2158 2158
2159 for ( i = 0; i < iconSignalMax; i++ ) 2159 for ( i = 0; i < iconSignalMax; i++ )
2160 icnDelete( signalstate[i].h ); 2160 icnDelete( signalstate[i].h );
2161 2161
2162 } 2162 }
2163 2163
2164 //API - 1259 - 13-01-03 - Removed Functions iconsChargeDisplayOnOff & iconsStateOfCharge they were not being called. 2164 //API - 1259 - 13-01-03 - Removed Functions iconsChargeDisplayOnOff & iconsStateOfCharge they were not being called.
2165 2165
2166 /******************************************************************************* 2166 /*******************************************************************************
2167 2167
2168 $Function: iconsGetState 2168 $Function: iconsGetState
2169 2169
2170 $Description: Get the state of an icon ICON_VISIBLE/ICON_INVISIBLE 2170 $Description: Get the state of an icon ICON_VISIBLE/ICON_INVISIBLE
2171 2171
2172 $Returns: Return state of icon. 2172 $Returns: Return state of icon.
2173 2173
2174 $Arguments: iconId, the id of the icon to be set 2174 $Arguments: iconId, the id of the icon to be set
2175 2175
2176 *******************************************************************************/ 2176 *******************************************************************************/
2177 2177
2178 U8 iconsGetState( int iconId ) 2178 U8 iconsGetState( int iconId )
2179 { 2179 {
2180 TRACE_FUNCTION("iconsGetState() "); 2180 TRACE_FUNCTION("iconsGetState() ");
2181 /* Only set the state if the iconId is valid, ie in range 2181 /* Only set the state if the iconId is valid, ie in range
2182 */ 2182 */
2183 if ( ( iconId >= 0 ) && ( iconId < idlIdMax ) ) 2183 if ( ( iconId >= 0 ) && ( iconId < idlIdMax ) )
2184 return state[iconId].state; 2184 return state[iconId].state;
2185 2185
2186 /* x0045876, 14-Aug-2006 (WR - missing return statement at end of non-void function) */ 2186 /* x0045876, 14-Aug-2006 (WR - missing return statement at end of non-void function) */
2187 return ICON_INVISIBLE; 2187 return ICON_INVISIBLE;
2188 } 2188 }
2189 2189
2190 /******************************************************************************* 2190 /*******************************************************************************
2191 2191
2192 $Function: iconsSetState 2192 $Function: iconsSetState
2193 2193
2194 $Description: Sets the state of an icon to be visible 2194 $Description: Sets the state of an icon to be visible
2195 2195
2196 $Returns: None 2196 $Returns: None
2197 2197
2198 $Arguments: iconId, the id of the icon to be set 2198 $Arguments: iconId, the id of the icon to be set
2199 2199
2200 *******************************************************************************/ 2200 *******************************************************************************/
2201 2201
2202 void iconsSetState( int iconId ) 2202 void iconsSetState( int iconId )
2203 { 2203 {
2204 TRACE_FUNCTION("iconsSetState() "); 2204 TRACE_FUNCTION("iconsSetState() ");
2205 /* Only set the state if the iconId is valid, ie in range 2205 /* Only set the state if the iconId is valid, ie in range
2206 */ 2206 */
2207 if ( ( iconId >= 0 ) && ( iconId < idlIdMax ) ) 2207 if ( ( iconId >= 0 ) && ( iconId < idlIdMax ) )
2208 state[iconId].state = ICON_VISIBLE; 2208 state[iconId].state = ICON_VISIBLE;
2209 } 2209 }
2210 2210
2211 2211
2212 2212
2213 2213
2214 2214
2215 /******************************************************************************* 2215 /*******************************************************************************
2216 2216
2217 $Function: iconsDeleteState 2217 $Function: iconsDeleteState
2218 2218
2219 $Description: Sets the state of an icon to be invisible 2219 $Description: Sets the state of an icon to be invisible
2220 2220
2221 $Returns: None 2221 $Returns: None
2222 2222
2223 $Arguments: iconId, the id of the icon to be deleted 2223 $Arguments: iconId, the id of the icon to be deleted
2224 2224
2225 *******************************************************************************/ 2225 *******************************************************************************/
2226 2226
2227 void iconsDeleteState( int iconId ) 2227 void iconsDeleteState( int iconId )
2228 { 2228 {
2229 TRACE_FUNCTION("iconsDeleteState()"); 2229 TRACE_FUNCTION("iconsDeleteState()");
2230 /* Only set the state if the iconId is valid, ie in range 2230 /* Only set the state if the iconId is valid, ie in range
2231 */ 2231 */
2232 if ( ( iconId >= 0 ) && ( iconId < idlIdMax ) ) 2232 if ( ( iconId >= 0 ) && ( iconId < idlIdMax ) )
2233 state[iconId].state = ICON_INVISIBLE; 2233 state[iconId].state = ICON_INVISIBLE;
2234 } 2234 }
2235 2235
2236 2236
2237 2237
2238 2238
2239 /******************************************************************************* 2239 /*******************************************************************************
2240 2240
2241 $Function: iconsShow 2241 $Function: iconsShow
2242 2242
2243 $Description: Show the current set of icons on the display 2243 $Description: Show the current set of icons on the display
2244 2244
2245 $Returns: None 2245 $Returns: None
2246 2246
2247 $Arguments: None 2247 $Arguments: None
2248 2248
2249 *******************************************************************************/ 2249 *******************************************************************************/
2250 2250
2251 void iconsShow( void ) 2251 void iconsShow( void )
2252 { 2252 {
2254 int iResult = 0; /* Get the GPRS Status */ 2254 int iResult = 0; /* Get the GPRS Status */
2255 #endif 2255 #endif
2256 2256
2257 TRACE_FUNCTION("iconsShow"); 2257 TRACE_FUNCTION("iconsShow");
2258 2258
2259 /* The power-off scenario requires a check in here to override the 2259 /* The power-off scenario requires a check in here to override the
2260 normal behaviour of the show routine 2260 normal behaviour of the show routine
2261 */ 2261 */
2262 2262
2263 //nm + 25.2.01 2263 //nm + 25.2.01
2264 //it is only temporary for the B-Sample 2264 //it is only temporary for the B-Sample
2265 // just testing the icon 2265 // just testing the icon
2266 //globalBatteryPicNumber = 4; //Leela 10 Apr, 2006 2266 //globalBatteryPicNumber = 4; //Leela 10 Apr, 2006
2267 resources_setTitleColour( COLOUR_IDLE ); 2267 resources_setTitleColour( COLOUR_IDLE );
2268 #ifndef COLOURDISPLAY 2268 #ifndef COLOURDISPLAY
2269 iconsScreenDelete(); 2269 iconsScreenDelete();
2270 #endif 2270 #endif
2271 2271
2272 if ( GlobalIconStatus & GlobalBatteryIconFlag ) 2272 if ( GlobalIconStatus & GlobalBatteryIconFlag )
2273 { 2273 {
2274 TRACE_EVENT_P1("iconsShow:globalBatteryPicNumber:%d", globalBatteryPicNumber); 2274 TRACE_EVENT_P1("iconsShow:globalBatteryPicNumber:%d", globalBatteryPicNumber);
2275 iconsShowBattery( globalBatteryPicNumber ); 2275 iconsShowBattery( globalBatteryPicNumber );
2276 } 2276 }
2277 2277
2278 if ( GlobalIconStatus & GlobalSignalIconFlag ) 2278 if ( GlobalIconStatus & GlobalSignalIconFlag )
2279 iconsShowSignal( globalSignalPicNumber ); 2279 iconsShowSignal( globalSignalPicNumber );
2280 // Apr 27, 2004 REF: ENH 12646 Deepa M.D 2280 // Apr 27, 2004 REF: ENH 12646 Deepa M.D
2281 if ( GlobalIconStatus & GlobalSMSIconFlag ) 2281 if ( GlobalIconStatus & GlobalSMSIconFlag )
2282 { 2282 {
2283 if (smsidle_get_memory_full()) //If memory is full, blink the SMS icon 2283 if (smsidle_get_memory_full()) //If memory is full, blink the SMS icon
2284 iconsShowSmsFull ( ); 2284 iconsShowSmsFull ( );
2285 else 2285 else
2286 iconsShowIcon( &state[ iconIdSMS ] ); //else show the normal SMS icon 2286 iconsShowIcon( &state[ iconIdSMS ] ); //else show the normal SMS icon
2287 } 2287 }
2288 2288
2289 //nm do it later, step by step 2289 //nm do it later, step by step
2290 2290
2291 if ( GlobalIconStatus & GlobalVoiceMailIconFlag ) 2291 if ( GlobalIconStatus & GlobalVoiceMailIconFlag )
2292 iconsShowIcon( &state[ iconIdVoice ] ); 2292 iconsShowIcon( &state[ iconIdVoice ] );
2293 2293
2294 if ( GlobalIconStatus & GlobalCallForwardingIconFlag ) 2294 if ( GlobalIconStatus & GlobalCallForwardingIconFlag )
2295 iconsShowIcon( &state[ iconIdCallFor ] ); 2295 iconsShowIcon( &state[ iconIdCallFor ] );
2296 2296
2297 2297
2298 if ( GlobalIconStatus & GlobalKeyplockIconFlag ) 2298 if ( GlobalIconStatus & GlobalKeyplockIconFlag )
2299 iconsShowIcon( &state[ iconIdKeyplock ] ); 2299 iconsShowIcon( &state[ iconIdKeyplock ] );
2300 2300
2301 if ( GlobalIconStatus & GlobalCipheringActivIconFlag ) 2301 if ( GlobalIconStatus & GlobalCipheringActivIconFlag )
2302 iconsShowIcon( &state[ iconIdCipheringActiv ] ); 2302 iconsShowIcon( &state[ iconIdCipheringActiv ] );
2303 2303
2304 if ( GlobalIconStatus & GlobalCipheringDeactivIconFlag ) 2304 if ( GlobalIconStatus & GlobalCipheringDeactivIconFlag )
2305 iconsShowIcon( &state[ iconIdCipheringDeActiv ] ); 2305 iconsShowIcon( &state[ iconIdCipheringDeActiv ] );
2306 2306
2307 /* SPR#2346 - SH - Show GPRS Attached icon*/ 2307 /* SPR#2346 - SH - Show GPRS Attached icon*/
2308 2308
2309 #ifdef MMI_GPRS_ENABLED 2309 #ifdef MMI_GPRS_ENABLED
2310 if ( GlobalIconStatus & GlobalGPRSOnIconFlag ) 2310 if ( GlobalIconStatus & GlobalGPRSOnIconFlag )
2311 { 2311 {
2312 #ifdef NEPTUNE_BOARD 2312 #ifdef NEPTUNE_BOARD
2313 iResult = GPRS_Status(); 2313 iResult = GPRS_Status();
2314 2314
2315 if (iResult == GPRS_ATTACHED) 2315 if (iResult == GPRS_ATTACHED)
2316 { 2316 {
2317 iconsShowIcon( &state[ iconIdGPRSOn ] ); 2317 iconsShowIcon( &state[ iconIdGPRSOn ] );
2318 } 2318 }
2319 2319
2320 if (iResult == EDGE_ATTACHED) 2320 if (iResult == EDGE_ATTACHED)
2321 { 2321 {
2322 iconsShowIcon( &state[ iconIdEdgeOn] ); 2322 iconsShowIcon( &state[ iconIdEdgeOn] );
2323 } 2323 }
2324 #else 2324 #else
2325 GPRS_Status(); 2325 GPRS_Status();
2326 iconsShowIcon( &state[ iconIdGPRSOn ] ); 2326 iconsShowIcon( &state[ iconIdGPRSOn ] );
2327 #endif 2327 #endif
2328 } 2328 }
2329 #endif 2329 #endif
2330 2330
2331 /* SPR#1985 - SH - Only show one of TTY or Homezone icons. 2331 /* SPR#1985 - SH - Only show one of TTY or Homezone icons.
2332 * Homezone takes precedence */ 2332 * Homezone takes precedence */
2333 2333
2334 /* Show Homezone icon. */ 2334 /* Show Homezone icon. */
2335 2335
2336 #ifdef MMI_HOMEZONE_ENABLED 2336 #ifdef MMI_HOMEZONE_ENABLED
2337 if ( GlobalIconStatus & GlobalHomezoneIconFlag ) 2337 if ( GlobalIconStatus & GlobalHomezoneIconFlag )
2338 { 2338 {
2339 iconsShowIcon( &state[ iconIdHomezone ] ); 2339 iconsShowIcon( &state[ iconIdHomezone ] );
2340 } 2340 }
2341 #endif 2341 #endif
2342 2342
2343 /* Show TTY icon if active & homezone icon is not shown */ 2343 /* Show TTY icon if active & homezone icon is not shown */
2344 #ifdef MMI_TTY_ENABLED 2344 #ifdef MMI_TTY_ENABLED
2345 if ( (GlobalIconStatus & GlobalTTYIconFlag) && 2345 if ( (GlobalIconStatus & GlobalTTYIconFlag) &&
2346 !( ( GlobalIconStatus & GlobalHomezoneIconFlag ) && state[iconIdHomezone].state==ICON_VISIBLE ) ) 2346 !( ( GlobalIconStatus & GlobalHomezoneIconFlag ) && state[iconIdHomezone].state==ICON_VISIBLE ) )
2347 { 2347 {
2348 iconsShowIcon( &state[ iconIdTTY ] ); 2348 iconsShowIcon( &state[ iconIdTTY ] );
2349 } 2349 }
2350 #endif 2350 #endif
2351 /* end SH */ 2351 /* end SH */
2352 2352
2353 2353
2354 2354
2355 2355
2356 if ( GlobalIconStatus & GlobalAlarmIconFlag ) 2356 if ( GlobalIconStatus & GlobalAlarmIconFlag )
2357 iconsShowIcon( &state[ iconIdAlarm ] ); 2357 iconsShowIcon( &state[ iconIdAlarm ] );
2358 2358
2359 /* May 30, 2006 REF:OMAPS00079650 a0393213 (R.Prabakar) 2359 /* May 30, 2006 REF:OMAPS00079650 a0393213 (R.Prabakar)
2360 Description : CPHS Roaming indication feature implementation 2360 Description : CPHS Roaming indication feature implementation
2361 Solution : As part of this implementation, roaming icon is showed based on a flag corresponding to roaming*/ 2361 Solution : As part of this implementation, roaming icon is showed based on a flag corresponding to roaming*/
2362 2362
2363 if(GlobalIconStatus & GlobalRoamingIconFlag) 2363 if(GlobalIconStatus & GlobalRoamingIconFlag)
2364 iconsShowIcon(&state[iconIdRoaming]); 2364 iconsShowIcon(&state[iconIdRoaming]);
2365 //Change the colour back to what the menu was. 2365 //Change the colour back to what the menu was.
2366 resources_restoreMnuColour(); 2366 resources_restoreMnuColour();
2367 } 2367 }
2368 2368
2369 /******************************************************************************* 2369 /*******************************************************************************
2370 2370
2371 $Function: iconsShowBattery 2371 $Function: iconsShowBattery
2372 2372
2373 $Description: Show battery status icons 2373 $Description: Show battery status icons
2374 2374
2375 $Returns: 0 if error detected, otherwise 1 2375 $Returns: 0 if error detected, otherwise 1
2376 2376
2377 $Arguments: batterystatus, the current battery icon to be displayed 2377 $Arguments: batterystatus, the current battery icon to be displayed
2378 2378
2379 *******************************************************************************/ 2379 *******************************************************************************/
2380 2380
2381 int iconsShowBattery( U8 batterystatus ) 2381 int iconsShowBattery( U8 batterystatus )
2382 { 2382 {
2384 int i; 2384 int i;
2385 2385
2386 TRACE_FUNCTION("iconsShowBattery()"); 2386 TRACE_FUNCTION("iconsShowBattery()");
2387 2387
2388 /* If we have an error, ie invalid id then return 0 */ 2388 /* If we have an error, ie invalid id then return 0 */
2389 /* x0045876, 14-Aug-2006 (WR - pointless comparison of unsigned integer with zero) */ 2389 /* x0045876, 14-Aug-2006 (WR - pointless comparison of unsigned integer with zero) */
2390 /* if ( ( batterystatus < 0 ) || ( batterystatus >= iconBattMax ) ) */ 2390 /* if ( ( batterystatus < 0 ) || ( batterystatus >= iconBattMax ) ) */
2391 if (batterystatus >= iconBattMax) 2391 if (batterystatus >= iconBattMax)
2392 return 0; 2392 return 0;
2393 2393
2394 if( (globalMobileMode & (GlobalMobileOn|GlobalCharging)) AND 2394 if( (globalMobileMode & (GlobalMobileOn|GlobalCharging)) AND
2395 (globalBatteryMode NEQ GlobalBatteryFull) ) 2395 (globalBatteryMode NEQ GlobalBatteryFull) )
2396 { 2396 {
2397 if ( idleIsFocussed() AND battery_charging_animate) 2397 if ( idleIsFocussed() AND battery_charging_animate)
2398 { 2398 {
2399 icn=((MfwHdr *)battstate[ icon_ctr].h)->data; 2399 icn=((MfwHdr *)battstate[ icon_ctr].h)->data;
2400 dspl_BitBlt2(icn->attr->area.px,icn->attr->area.py, 2400 dspl_BitBlt2(icn->attr->area.px,icn->attr->area.py,
2401 icn->attr->area.sx,icn->attr->area.sy, 2401 icn->attr->area.sx,icn->attr->area.sy,
2402 icn->attr->icons,icn->index,icn->attr->icnType); 2402 icn->attr->icons,icn->index,icn->attr->icnType);
2403 timStart(battery_charging_animate); 2403 timStart(battery_charging_animate);
2404 } 2404 }
2405 } 2405 }
2406 else 2406 else
2407 { 2407 {
2408 /* Otherwise clear all of the battery icons, and then set the 2408 /* Otherwise clear all of the battery icons, and then set the
2409 selected value to be visible 2409 selected value to be visible
2410 */ 2410 */
2411 for( i = 0; i < iconBattMax; i++ ) 2411 for( i = 0; i < iconBattMax; i++ )
2412 battstate[ i ].state = ICON_INVISIBLE; 2412 battstate[ i ].state = ICON_INVISIBLE;
2413 battstate[ batterystatus ].state = ICON_VISIBLE; 2413 battstate[ batterystatus ].state = ICON_VISIBLE;
2414 2414
2415 /* and display the current selection 2415 /* and display the current selection
2416 */ 2416 */
2417 icnShow( battstate[ batterystatus ].h ); 2417 icnShow( battstate[ batterystatus ].h );
2418 } 2418 }
2419 return 1; 2419 return 1;
2420 } 2420 }
2421 2421
2422 /******************************************************************************* 2422 /*******************************************************************************
2423 2423
2424 $Function: BattChargeEventTim 2424 $Function: BattChargeEventTim
2425 2425
2426 $Description: Timer callback for battery charging animation 2426 $Description: Timer callback for battery charging animation
2427 2427
2428 $Returns: 0 if error detected, otherwise 1 2428 $Returns: 0 if error detected, otherwise 1
2429 2429
2430 $Arguments: 2430 $Arguments:
2431 2431
2432 *******************************************************************************/ 2432 *******************************************************************************/
2433 //x0pleela 11 Apr, 2006 ER: OMAPS00075178 2433 //x0pleela 11 Apr, 2006 ER: OMAPS00075178
2444 icon_ctr++; 2444 icon_ctr++;
2445 2445
2446 if( icon_ctr >4 ) 2446 if( icon_ctr >4 )
2447 icon_ctr = 0; 2447 icon_ctr = 0;
2448 2448
2449 TRACE_EVENT_P1("icon_ctr:%d", icon_ctr); 2449 TRACE_EVENT_P1("icon_ctr:%d", icon_ctr);
2450 for( i = 0; i < iconBattMax; i++ ) 2450 for( i = 0; i < iconBattMax; i++ )
2451 { 2451 {
2452 battstate[ i ].state = ICON_INVISIBLE; 2452 battstate[ i ].state = ICON_INVISIBLE;
2453 icnHide(battstate[ i].h ); 2453 icnHide(battstate[ i].h );
2454 } 2454 }
2455 battstate[ icon_ctr ].state = ICON_VISIBLE; 2455 battstate[ icon_ctr ].state = ICON_VISIBLE;
2456 2456
2457 /* and display the current selection */ 2457 /* and display the current selection */
2458 icnUnhide(battstate[ icon_ctr ].h ); 2458 icnUnhide(battstate[ icon_ctr ].h );
2459 2459
2460 windowsUpdate(); //redraw the idle screen again. 2460 windowsUpdate(); //redraw the idle screen again.
2461 timStart(battery_charging_animate); 2461 timStart(battery_charging_animate);
2462 } 2462 }
2463 else //else stop animation 2463 else //else stop animation
2464 { 2464 {
2465 if (battery_charging_animate) 2465 if (battery_charging_animate)
2466 timStop(battery_charging_animate); 2466 timStop(battery_charging_animate);
2471 2471
2472 2472
2473 // Apr 27, 2004 REF: ENH 12646 Deepa M.D 2473 // Apr 27, 2004 REF: ENH 12646 Deepa M.D
2474 /******************************************************************************* 2474 /*******************************************************************************
2475 2475
2476 $Function: iconsShowSmsFull 2476 $Function: iconsShowSmsFull
2477 2477
2478 $Description: When SMS meory is full,start the timer for blinking the icon. 2478 $Description: When SMS meory is full,start the timer for blinking the icon.
2479 2479
2480 $Returns: 0 if error detected, otherwise 1 2480 $Returns: 0 if error detected, otherwise 1
2481 2481
2482 $Arguments: None 2482 $Arguments: None
2483 2483
2484 *******************************************************************************/ 2484 *******************************************************************************/
2485 int iconsShowSmsFull( ) 2485 int iconsShowSmsFull( )
2486 { 2486 {
2487 MfwIcn *icn; 2487 MfwIcn *icn;
2488 TRACE_FUNCTION("iconsShowSmsFull"); 2488 TRACE_FUNCTION("iconsShowSmsFull");
2489 if(isIconBlinking==1) 2489 if(isIconBlinking==1)
2490 { 2490 {
2491 if(smsStatus==0) 2491 if(smsStatus==0)
2492 { 2492 {
2493 2493
2494 icn=((MfwHdr *)state[ iconIdSMS ] .h)->data; 2494 icn=((MfwHdr *)state[ iconIdSMS ] .h)->data;
2495 dspl_BitBlt2(icn->attr->area.px,icn->attr->area.py, 2495 dspl_BitBlt2(icn->attr->area.px,icn->attr->area.py,
2496 icn->attr->area.sx,icn->attr->area.sy, 2496 icn->attr->area.sx,icn->attr->area.sy,
2497 icn->attr->icons,icn->index,icn->attr->icnType); 2497 icn->attr->icons,icn->index,icn->attr->icnType);
2498 } 2498 }
2499 return 0; 2499 return 0;
2500 } 2500 }
2501 2501
2502 isIconBlinking=1; 2502 isIconBlinking=1;
2503 2503
2504 if (sms_animate) 2504 if (sms_animate)
2505 { 2505 {
2506 2506
2507 timStart(sms_animate); 2507 timStart(sms_animate);
2508 } 2508 }
2509 2509
2510 return 1; 2510 return 1;
2511 } 2511 }
2512 2512
2513 2513
2514 // Apr 27, 2004 REF: ENH 12646 Deepa M.D 2514 // Apr 27, 2004 REF: ENH 12646 Deepa M.D
2515 /******************************************************************************* 2515 /*******************************************************************************
2516 2516
2517 $Function: smsFullEventTim 2517 $Function: smsFullEventTim
2518 2518
2519 $Description: Callback function for SMSFull timer.The SMS icon is toggled between visible 2519 $Description: Callback function for SMSFull timer.The SMS icon is toggled between visible
2520 and invisible. 2520 and invisible.
2521 2521
2522 $Returns: Event consumed 2522 $Returns: Event consumed
2523 2523
2524 $Arguments: unused 2524 $Arguments: unused
2525 2525
2526 *******************************************************************************/ 2526 *******************************************************************************/
2527 2527
2528 int smsFullEventTim( MfwEvt e, MfwTim *tc ) 2528 int smsFullEventTim( MfwEvt e, MfwTim *tc )
2529 { 2529 {
2530 2530
2531 TRACE_FUNCTION("smsFullEventTim"); 2531 TRACE_FUNCTION("smsFullEventTim");
2532 2532
2533 // Oct 28, 2004 REF: CRR 25886 xnkulkar 2533 // Oct 28, 2004 REF: CRR 25886 xnkulkar
2534 // Description: SMS Icon is not seen in Idle Screen. 2534 // Description: SMS Icon is not seen in Idle Screen.
2535 // Solution: A check is done to determine if sms memory is full when the phone is in idle screen or 2535 // Solution: A check is done to determine if sms memory is full when the phone is in idle screen or
2536 // when any calls are present and blinking sms icon is displayed. 2536 // when any calls are present and blinking sms icon is displayed.
2537 if(idleIsFocussed() ||(call_data.calls.numCalls!=0)) 2537 if(idleIsFocussed() ||(call_data.calls.numCalls!=0))
2538 { 2538 {
2539 smsStatus++; 2539 smsStatus++;
2540 /* x0045876, 14-Aug-2006 (WR - pointless comparison of unsigned integer with zero) */ 2540 /* x0045876, 14-Aug-2006 (WR - pointless comparison of unsigned integer with zero) */
2541 /* if( smsStatus<0 || smsStatus>=2) */ 2541 /* if( smsStatus<0 || smsStatus>=2) */
2542 if(smsStatus>=2) 2542 if(smsStatus>=2)
2543 smsStatus=0; 2543 smsStatus=0;
2544 2544
2545 if(smsStatus==0) //The icon will be visible 2545 if(smsStatus==0) //The icon will be visible
2546 { 2546 {
2547 state[ iconIdSMS ] .state = ICON_VISIBLE; 2547 state[ iconIdSMS ] .state = ICON_VISIBLE;
2548 icnUnhide(state[ iconIdSMS ] .h); 2548 icnUnhide(state[ iconIdSMS ] .h);
2549 } 2549 }
2550 else //The icon will be invisible 2550 else //The icon will be invisible
2551 { 2551 {
2552 state[ iconIdSMS ] .state = ICON_INVISIBLE; 2552 state[ iconIdSMS ] .state = ICON_INVISIBLE;
2553 icnHide(state[ iconIdSMS ] .h); 2553 icnHide(state[ iconIdSMS ] .h);
2554 } 2554 }
2555 windowsUpdate(); //redraw the idle screen again. 2555 windowsUpdate(); //redraw the idle screen again.
2556 if (sms_animate) 2556 if (sms_animate)
2557 { 2557 {
2558 timStart(sms_animate); 2558 timStart(sms_animate);
2559 } 2559 }
2560 2560
2561 } 2561 }
2562 else //else stop the timer for blinking. 2562 else //else stop the timer for blinking.
2563 { 2563 {
2564 isIconBlinking=0; 2564 isIconBlinking=0;
2565 2565
2566 if (sms_animate) 2566 if (sms_animate)
2567 { 2567 {
2568 timStop(sms_animate); 2568 timStop(sms_animate);
2569 } 2569 }
2570 } 2570 }
2571 2571
2572 return MFW_EVENT_CONSUMED; 2572 return MFW_EVENT_CONSUMED;
2573 } 2573 }
2574 2574
2575 2575
2576 /******************************************************************************* 2576 /*******************************************************************************
2577 2577
2578 $Function: iconShowGoodbye 2578 $Function: iconShowGoodbye
2579 2579
2580 $Description: 2580 $Description:
2581 2581
2582 $Returns: 2582 $Returns:
2583 2583
2585 2585
2586 *******************************************************************************/ 2586 *******************************************************************************/
2587 2587
2588 void iconShowGoodbye( void) 2588 void iconShowGoodbye( void)
2589 { 2589 {
2590 // iconsShowIcon( &state[ iconGoodbye ] ); 2590 // iconsShowIcon( &state[ iconGoodbye ] );
2591 } 2591 }
2592 2592
2593 2593
2594 2594
2595 /******************************************************************************* 2595 /*******************************************************************************
2596 2596
2597 $Function: iconsShowSignal 2597 $Function: iconsShowSignal
2598 2598
2599 $Description: Shows the signal status icons 2599 $Description: Shows the signal status icons
2600 2600
2601 $Returns: 0 if error detected, otherwise 1 2601 $Returns: 0 if error detected, otherwise 1
2602 2602
2603 $Arguments: signalstatus, the current signal icon to be displayed 2603 $Arguments: signalstatus, the current signal icon to be displayed
2604 2604
2605 *******************************************************************************/ 2605 *******************************************************************************/
2606 2606
2607 int iconsShowSignal (U8 signalstatus) 2607 int iconsShowSignal (U8 signalstatus)
2608 { 2608 {
2609 int i; 2609 int i;
2610 2610
2611 /* If we have an error, ie invalid id then return 0 2611 /* If we have an error, ie invalid id then return 0
2612 */ 2612 */
2613 /* x0045876, 14-Aug-2006 (WR - pointless comparison of unsigned integer with zero) */ 2613 /* x0045876, 14-Aug-2006 (WR - pointless comparison of unsigned integer with zero) */
2614 /* if ( ( signalstatus < 0 ) || ( signalstatus >= iconSignalMax ) ) */ 2614 /* if ( ( signalstatus < 0 ) || ( signalstatus >= iconSignalMax ) ) */
2615 if (signalstatus >= iconSignalMax) 2615 if (signalstatus >= iconSignalMax)
2616 return 0; 2616 return 0;
2617 2617
2618 /* Otherwise clear all of the signal icons, and then set the 2618 /* Otherwise clear all of the signal icons, and then set the
2619 selected value to be visible 2619 selected value to be visible
2620 */ 2620 */
2621 for( i = 0; i < iconSignalMax; i++ ) 2621 for( i = 0; i < iconSignalMax; i++ )
2622 signalstate[ i ].state = ICON_INVISIBLE; 2622 signalstate[ i ].state = ICON_INVISIBLE;
2623 signalstate[ signalstatus ].state = ICON_VISIBLE; 2623 signalstate[ signalstatus ].state = ICON_VISIBLE;
2624 2624
2625 /* and display the current selection 2625 /* and display the current selection
2626 */ 2626 */
2627 icnShow( signalstate[ signalstatus ].h ); 2627 icnShow( signalstate[ signalstatus ].h );
2628 2628
2629 return 1; 2629 return 1;
2630 } 2630 }
2631 2631
2632 2632
2633 2633
2634 /******************************************************************************* 2634 /*******************************************************************************
2635 2635
2636 $Function: iconsInputShow 2636 $Function: iconsInputShow
2637 2637
2638 $Description: show current input icons 2638 $Description: show current input icons
2639 2639
2640 $Returns: None 2640 $Returns: None
2641 2641
2642 $Arguments: IconInputId, id of icon to be displayed 2642 $Arguments: IconInputId, id of icon to be displayed
2643 2643
2644 *******************************************************************************/ 2644 *******************************************************************************/
2645 2645
2646 void iconsInputShow (int IconInputId) 2646 void iconsInputShow (int IconInputId)
2647 { 2647 {
2648 CLEAR_BOTTOM_ZONE_ICON; 2648 CLEAR_BOTTOM_ZONE_ICON;
2649 } 2649 }
2650 2650
2651 2651
2652 /******************************************************************************* 2652 /*******************************************************************************
2653 2653
2654 $Function: iconsMainIconsAreaSet 2654 $Function: iconsMainIconsAreaSet
2655 2655
2656 $Description: sets the current main icons area 2656 $Description: sets the current main icons area
2657 2657
2658 $Returns: None 2658 $Returns: None
2659 2659
2660 $Arguments: None 2660 $Arguments: None
2661 2661
2662 *******************************************************************************/ 2662 *******************************************************************************/
2663 2663
2664 #ifndef LSCREEN 2664 #ifndef LSCREEN
2665 #define MAIN_ICON_Y 31 2665 #define MAIN_ICON_Y 31
2666 #endif 2666 #endif
2667 2667
2668 void copyAreaAttr(MfwRect *iconArea, MfwRect *display_area) 2668 void copyAreaAttr(MfwRect *iconArea, MfwRect *display_area)
2669 { 2669 {
2670 if (display_area->sx > iconArea->sx) 2670 if (display_area->sx > iconArea->sx)
2671 { 2671 {
2672 iconArea->px = display_area->px + (display_area->sx - iconArea->sx)/2; 2672 iconArea->px = display_area->px + (display_area->sx - iconArea->sx)/2;
2673 } 2673 }
2674 else 2674 else
2675 { 2675 {
2676 iconArea->px = display_area->px; 2676 iconArea->px = display_area->px;
2677 } 2677 }
2678 if (display_area->sy > iconArea->sy) 2678 if (display_area->sy > iconArea->sy)
2679 { 2679 {
2680 iconArea->py = display_area->py + (display_area->sy - iconArea->sy)/2; 2680 iconArea->py = display_area->py + (display_area->sy - iconArea->sy)/2;
2681 } 2681 }
2682 else 2682 else
2683 { 2683 {
2684 iconArea->py = display_area->py; 2684 iconArea->py = display_area->py;
2685 2685
2686 if (display_area->sy < iconArea->sy) 2686 if (display_area->sy < iconArea->sy)
2687 iconArea->sy = display_area->sy; 2687 iconArea->sy = display_area->sy;
2688 #ifndef LSCREEN 2688 #ifndef LSCREEN
2689 /*With the small screen we change the size of the idle icons (when changing language)*/ 2689 /*With the small screen we change the size of the idle icons (when changing language)*/
2690 else 2690 else
2691 iconArea->sy = MAIN_ICON_Y; 2691 iconArea->sy = MAIN_ICON_Y;
2692 #endif 2692 #endif
2693 } 2693 }
2694 } 2694 }
2695 2695
2696 void iconsMainIconsAreaSet (MfwRect selected_area) 2696 void iconsMainIconsAreaSet (MfwRect selected_area)
2697 { 2697 {
2698 2698
2699 2699
2700 copyAreaAttr( &mainIconSimToolkit.area, &selected_area); 2700 copyAreaAttr( &mainIconSimToolkit.area, &selected_area);
2701 copyAreaAttr( &mainIconCalculator.area, &selected_area); 2701 copyAreaAttr( &mainIconCalculator.area, &selected_area);
2702 copyAreaAttr( &mainIconSettings.area, &selected_area); 2702 copyAreaAttr( &mainIconSettings.area, &selected_area);
2703 copyAreaAttr( &mainIconWAP.area, &selected_area); 2703 copyAreaAttr( &mainIconWAP.area, &selected_area);
2704 copyAreaAttr( &mainIconRecentCalls.area, &selected_area); 2704 copyAreaAttr( &mainIconRecentCalls.area, &selected_area);
2705 copyAreaAttr( &mainIconCallDivert.area, &selected_area); 2705 copyAreaAttr( &mainIconCallDivert.area, &selected_area);
2706 copyAreaAttr( &mainIconSecurity.area, &selected_area); 2706 copyAreaAttr( &mainIconSecurity.area, &selected_area);
2707 copyAreaAttr( &mainIconMessages.area, &selected_area); 2707 copyAreaAttr( &mainIconMessages.area, &selected_area);
2708 copyAreaAttr( &mainIconPhonebook.area, &selected_area); 2708 copyAreaAttr( &mainIconPhonebook.area, &selected_area);
2709 2709
2710 /* 2710 /*
2711 #ifdef COLOURDISPLAY 2711 #ifdef COLOURDISPLAY
2712 #ifdef USE110X110 2712 #ifdef USE110X110
2713 //No 110x110 for sim toolkit yet 2713 //No 110x110 for sim toolkit yet
2714 mainIconSimToolkit.area.sx = 96; 2714 mainIconSimToolkit.area.sx = 96;
2715 mainIconSimToolkit.area.sy = 96; 2715 mainIconSimToolkit.area.sy = 96;
2716 #else 2716 #else
2717 //Applications icon is 1 pixel wider than the rest 2717 //Applications icon is 1 pixel wider than the rest
2718 mainIconCalculator.area.sx = 97; 2718 mainIconCalculator.area.sx = 97;
2719 mainIconCalculator.area.sy = 96; 2719 mainIconCalculator.area.sy = 96;
2720 #endif 2720 #endif
2721 #endif*/ 2721 #endif*/
2722 } 2722 }
2723 2723
2724 2724
2725 /******************************************************************************* 2725 /*******************************************************************************
2726 2726
2727 $Function: () 2727 $Function: ()
2728 2728
2729 $Description: 2729 $Description:
2730 2730
2731 $Returns: None 2731 $Returns: None
2732 2732
2733 $Arguments: None 2733 $Arguments: None
2734 2734
2735 *******************************************************************************/ 2735 *******************************************************************************/
2736 #ifdef COLOURDISPLAY 2736 #ifdef COLOURDISPLAY
2737 static T_BITMAP bgdBmpBubbles = {{0,0,120,120},1,COLOUR_ICON_XX,BMP_FORMAT_32BIT_COLOUR,(char*) bmpDataBubbles}; 2737 static T_BITMAP bgdBmpBubbles = {{0,0,120,120},1,COLOUR_ICON_XX,BMP_FORMAT_32BIT_COLOUR,(char*) bmpDataBubbles};
2738 static T_BITMAP bgdBmpCloud = {{0,0,120,100},1,COLOUR_ICON_XX,BMP_FORMAT_32BIT_COLOUR,(char*) bmpDataCloud}; 2738 static T_BITMAP bgdBmpCloud = {{0,0,120,100},1,COLOUR_ICON_XX,BMP_FORMAT_32BIT_COLOUR,(char*) bmpDataCloud};
2739 /* x0039928 - Lint warning removal 2739 /* x0039928 - Lint warning removal
2740 static T_BITMAP bgdBmpSquares = {{0,0,176,220},1,COLOUR_ICON_XX, ICON_TYPE_16BIT_COL, (char *)bmpDataSquares }; 2740 static T_BITMAP bgdBmpSquares = {{0,0,176,220},1,COLOUR_ICON_XX, ICON_TYPE_16BIT_COL, (char *)bmpDataSquares };
2741 static T_BITMAP bgdBmpO2 = {{0,0,120,100},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR,(char*) bmpDataSquares}; 2741 static T_BITMAP bgdBmpO2 = {{0,0,120,100},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR,(char*) bmpDataSquares};
2742 static T_BITMAP bgdBmpTree = {{0,0,120,100},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR,(char*) bmpDataSquares}; */ 2742 static T_BITMAP bgdBmpTree = {{0,0,120,100},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR,(char*) bmpDataSquares}; */
2743 // by Nitin to set the TI Logo position 2743 // by Nitin to set the TI Logo position
2744 // This has to be permamnantly done for Neptune 2744 // This has to be permamnantly done for Neptune
2745 #if (BOARD == 61) 2745 #if (BOARD == 61)
2746 static T_BITMAP TI_Bgd = {{32,50,176,220},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*) Ti_bgd_bmp}; 2746 static T_BITMAP TI_Bgd = {{32,50,176,220},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*) Ti_bgd_bmp};
2747 #else 2747 #else
2748 static T_BITMAP TI_Bgd = {{0,0,176,220},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*) Ti_bgd_bmp}; 2748 static T_BITMAP TI_Bgd = {{0,0,176,220},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*) Ti_bgd_bmp};
2749 #endif //(BOARD == 61) 2749 #endif //(BOARD == 61)
2750 2750
2751 static T_BITMAP call_backdrop = {{2,8,120,170},1,COLOUR_ICON_XX,ICON_TYPE_1BIT_UNPACKED, (char *) iconInCallBackDrop}; 2751 static T_BITMAP call_backdrop = {{2,8,120,170},1,COLOUR_ICON_XX,ICON_TYPE_1BIT_UNPACKED, (char *) iconInCallBackDrop};
2752 2752
2753 static T_BITMAP Edinburgh1_Bgd = {{0,0,175,220},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR, (char*) Edinburgh1_bgd_bmp}; 2753 static T_BITMAP Edinburgh1_Bgd = {{0,0,175,220},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR, (char*) Edinburgh1_bgd_bmp};
2754 static T_BITMAP Edinburgh2_Bgd = {{0,0,175,220},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR, (char*) &Edinburgh1_bgd_bmp[2]}; 2754 static T_BITMAP Edinburgh2_Bgd = {{0,0,175,220},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR, (char*) &Edinburgh1_bgd_bmp[2]};
2755 static T_BITMAP Edinburgh3_Bgd = {{0,0,175,220},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR, (char*) Edinburgh3_bgd_bmp}; 2755 static T_BITMAP Edinburgh3_Bgd = {{0,0,175,220},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR, (char*) Edinburgh3_bgd_bmp};
2756 static T_BITMAP Edinburgh4_Bgd = {{0,0,175,220},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR, (char*) &Edinburgh3_bgd_bmp[2]}; 2756 static T_BITMAP Edinburgh4_Bgd = {{0,0,175,220},1,COLOUR_ICON_XX,BMP_FORMAT_16BIT_LCD_COLOUR, (char*) &Edinburgh3_bgd_bmp[2]};
2757 2757
2758 #endif 2758 #endif
2759 2759
2760 T_BITMAP* icon_getBgdBitmap( int bgdId ) 2760 T_BITMAP* icon_getBgdBitmap( int bgdId )
2761 { 2761 {
2762 TRACE_FUNCTION("icon_getBgdBitmap()"); 2762 TRACE_FUNCTION("icon_getBgdBitmap()");
2763 #ifdef COLOURDISPLAY 2763 #ifdef COLOURDISPLAY
2764 switch (bgdId) 2764 switch (bgdId)
2765 { 2765 {
2766 case BGD_NONE: 2766 case BGD_NONE:
2767 return (NULL); 2767 return (NULL);
2768 case BGD_BUBBLES: 2768 case BGD_BUBBLES:
2769 return (&bgdBmpBubbles); 2769 return (&bgdBmpBubbles);
2770 case BGD_CLOUD: 2770 case BGD_CLOUD:
2771 return (&bgdBmpCloud); 2771 return (&bgdBmpCloud);
2772 case BGD_SQUARE: 2772 case BGD_SQUARE:
2773 // return (&bgdBmpSquares); 2773 // return (&bgdBmpSquares);
2774 break; 2774 break;
2775 case BGD_TI_LOGO: 2775 case BGD_TI_LOGO:
2776 return (&TI_Bgd); 2776 return (&TI_Bgd);
2777 case BGD_O2: 2777 case BGD_O2:
2778 return (NULL); 2778 return (NULL);
2779 case BGD_TREE: 2779 case BGD_TREE:
2780 return (NULL); 2780 return (NULL);
2781 case BGD_SUNSET: 2781 case BGD_SUNSET:
2782 return (NULL); 2782 return (NULL);
2783 case BGD_EDINBURGH1: 2783 case BGD_EDINBURGH1:
2784 return (&Edinburgh1_Bgd); 2784 return (&Edinburgh1_Bgd);
2785 case BGD_EDINBURGH2: 2785 case BGD_EDINBURGH2:
2786 return (&Edinburgh2_Bgd); 2786 return (&Edinburgh2_Bgd);
2787 case BGD_EDINBURGH3: 2787 case BGD_EDINBURGH3:
2788 return (&Edinburgh3_Bgd); 2788 return (&Edinburgh3_Bgd);
2789 case BGD_EDINBURGH4: 2789 case BGD_EDINBURGH4:
2790 return (&Edinburgh4_Bgd); 2790 return (&Edinburgh4_Bgd);
2791 case BGD_INCALL: 2791 case BGD_INCALL:
2792 return(&call_backdrop); 2792 return(&call_backdrop);
2793 2793
2794 } 2794 }
2795 #endif 2795 #endif
2796 return (NULL); 2796 return (NULL);
2797 } 2797 }
2798 2798
2799 2799
2800 #ifdef COLOURDISPLAY 2800 #ifdef COLOURDISPLAY
2801 /******************************************************************************* 2801 /*******************************************************************************
2802 2802
2803 $Function: addnetwork 2803 $Function: addnetwork
2804 2804
2805 $Description: This function adds a link between a bitmap and a network number. 2805 $Description: This function adds a link between a bitmap and a network number.
2806 2806
2807 $Returns: None 2807 $Returns: None
2808 2808
2809 $Arguments: networkBitmap - pointer to the bitmap data 2809 $Arguments: networkBitmap - pointer to the bitmap data
2810 networkNo - pointer to the UBYTE array containing the network number 2810 networkNo - pointer to the UBYTE array containing the network number
2811 2811
2812 *******************************************************************************/ 2812 *******************************************************************************/
2813 #define MAX_NETWORK_NUMBER 50 2813 #define MAX_NETWORK_NUMBER 50
2814 typedef struct { 2814 typedef struct {
2815 char *num; 2815 char *num;
2816 T_BITMAP *bmp; 2816 T_BITMAP *bmp;
2817 } T_NETWORK_BITMAP; 2817 } T_NETWORK_BITMAP;
2818 static T_NETWORK_BITMAP networkBitmap[MAX_NETWORK_NUMBER]; 2818 static T_NETWORK_BITMAP networkBitmap[MAX_NETWORK_NUMBER];
2819 2819
2820 static void addnetwork(T_BITMAP *networkBmp, char* networkNo) 2820 static void addnetwork(T_BITMAP *networkBmp, char* networkNo)
2821 { 2821 {
2822 int i=0; 2822 int i=0;
2823 while (i<MAX_NETWORK_NUMBER) 2823 while (i<MAX_NETWORK_NUMBER)
2824 { 2824 {
2825 if (networkBitmap[i].num == NULL) 2825 if (networkBitmap[i].num == NULL)
2826 { 2826 {
2827 networkBitmap[i].num = networkNo; 2827 networkBitmap[i].num = networkNo;
2828 networkBitmap[i].bmp = networkBmp; 2828 networkBitmap[i].bmp = networkBmp;
2829 return; 2829 return;
2830 } 2830 }
2831 i++; 2831 i++;
2832 } 2832 }
2833 } 2833 }
2834 2834
2835 T_BITMAP Bouygues_icon = {{0,0,175,50},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*)Bouygues_bmp}; 2835 T_BITMAP Bouygues_icon = {{0,0,175,50},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*)Bouygues_bmp};
2836 T_BITMAP SFR_icon = {{0,0,103,64},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*)SFR_bmp}; 2836 T_BITMAP SFR_icon = {{0,0,103,64},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*)SFR_bmp};
2837 T_BITMAP VodafoneD2_icon = {{0,0,107,64},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*)VodafoneD2_bmp}; 2837 T_BITMAP VodafoneD2_icon = {{0,0,107,64},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*)VodafoneD2_bmp};
2838 T_BITMAP Chinamobile_icon = {{0,0,175,51},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*)Chinamobile_bmp}; 2838 T_BITMAP Chinamobile_icon = {{0,0,175,51},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*)Chinamobile_bmp};
2839 T_BITMAP Fareast_icon = {{0,0,110,64},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*)Fareast_bmp}; 2839 T_BITMAP Fareast_icon = {{0,0,110,64},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*)Fareast_bmp};
2840 T_BITMAP orange_icon = {{0,0, 64,64},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*)orange_bmp}; 2840 T_BITMAP orange_icon = {{0,0, 64,64},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*)orange_bmp};
2841 T_BITMAP sonofon_icon = {{0,0,174,64},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*)sonofon_bmp}; 2841 T_BITMAP sonofon_icon = {{0,0,174,64},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*)sonofon_bmp};
2842 T_BITMAP Vodafone_icon = {{0,0,108,64},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*)Vodafone_bmp}; 2842 T_BITMAP Vodafone_icon = {{0,0,108,64},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*)Vodafone_bmp};
2843 T_BITMAP Tmobile_icon = {{0,0,175,49},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*) Tmobile_bmp}; 2843 T_BITMAP Tmobile_icon = {{0,0,175,49},1,COLOUR_ICON_XX,ICON_TYPE_256_COL, (char*) Tmobile_bmp};
2844 2844
2845 /******************************************************************************* 2845 /*******************************************************************************
2846 2846
2847 $Function: icon_initNetworkBitmaps 2847 $Function: icon_initNetworkBitmaps
2848 2848
2849 $Description: This procedure initialises the link between a network icon and a network 2849 $Description: This procedure initialises the link between a network icon and a network
2850 number. 2850 number.
2851 NB This data should probably be stored in flash. 2851 NB This data should probably be stored in flash.
2852 2852
2853 $Returns: None 2853 $Returns: None
2854 2854
2855 $Arguments: None 2855 $Arguments: None
2856 2856
2857 *******************************************************************************/ 2857 *******************************************************************************/
2858 void icon_initNetworkBitmaps( void ) 2858 void icon_initNetworkBitmaps( void )
2859 { 2859 {
2860 int i; 2860 int i;
2861 for (i=0;i< MAX_NETWORK_NUMBER;i++) 2861 for (i=0;i< MAX_NETWORK_NUMBER;i++)
2862 { 2862 {
2863 networkBitmap[i].num = NULL; 2863 networkBitmap[i].num = NULL;
2864 networkBitmap[i].bmp = NULL; 2864 networkBitmap[i].bmp = NULL;
2865 } 2865 }
2866 //AP - 29-01-03 - initialise the value to true to show the Bitmap 2866 //AP - 29-01-03 - initialise the value to true to show the Bitmap
2867 //FFS_flashData.ProviderNetworkShow = FFS_flashData.ProviderNetworkShow; 2867 //FFS_flashData.ProviderNetworkShow = FFS_flashData.ProviderNetworkShow;
2868 /* API - 29-01-03 - Allowed to uses these service provider bitmaps O2 is still commented out we 2868 /* API - 29-01-03 - Allowed to uses these service provider bitmaps O2 is still commented out we
2869 dont have this bitmap yet. 2869 dont have this bitmap yet.
2870 */ 2870 */
2871 /* T MOBILE Bitmaps */ 2871 /* T MOBILE Bitmaps */
2872 addnetwork(&Tmobile_icon, "23430"); /* UK */ 2872 addnetwork(&Tmobile_icon, "23430"); /* UK */
2873 addnetwork(&Tmobile_icon, "23431"); /* UK */ 2873 addnetwork(&Tmobile_icon, "23431"); /* UK */
2874 addnetwork(&Tmobile_icon, "23432"); /* UK */ 2874 addnetwork(&Tmobile_icon, "23432"); /* UK */
2875 addnetwork(&Tmobile_icon, "23203"); /* Austria */ 2875 addnetwork(&Tmobile_icon, "23203"); /* Austria */
2876 addnetwork(&Tmobile_icon, "23001"); /* Czeck */ 2876 addnetwork(&Tmobile_icon, "23001"); /* Czeck */
2877 addnetwork(&Tmobile_icon, "26201"); /* Germany */ 2877 addnetwork(&Tmobile_icon, "26201"); /* Germany */
2878 addnetwork(&Tmobile_icon, "TMO UK"); /* UK */ 2878 addnetwork(&Tmobile_icon, "TMO UK"); /* UK */
2879 2879
2880 addnetwork(&Tmobile_icon, "31016"); /* USA */ 2880 addnetwork(&Tmobile_icon, "31016"); /* USA */
2881 addnetwork(&Tmobile_icon, "31020"); /* USA */ 2881 addnetwork(&Tmobile_icon, "31020"); /* USA */
2882 addnetwork(&Tmobile_icon, "31021"); /* USA */ 2882 addnetwork(&Tmobile_icon, "31021"); /* USA */
2883 addnetwork(&Tmobile_icon, "31022"); /* USA */ 2883 addnetwork(&Tmobile_icon, "31022"); /* USA */
2884 addnetwork(&Tmobile_icon, "31023"); /* USA */ 2884 addnetwork(&Tmobile_icon, "31023"); /* USA */
2885 addnetwork(&Tmobile_icon, "31024"); /* USA */ 2885 addnetwork(&Tmobile_icon, "31024"); /* USA */
2886 addnetwork(&Tmobile_icon, "31025"); /* USA */ 2886 addnetwork(&Tmobile_icon, "31025"); /* USA */
2887 addnetwork(&Tmobile_icon, "31026"); /* USA */ 2887 addnetwork(&Tmobile_icon, "31026"); /* USA */
2888 addnetwork(&Tmobile_icon, "31027"); /* USA */ 2888 addnetwork(&Tmobile_icon, "31027"); /* USA */
2889 addnetwork(&Tmobile_icon, "31031"); /* USA */ 2889 addnetwork(&Tmobile_icon, "31031"); /* USA */
2890 addnetwork(&Tmobile_icon, "31058"); /* USA */ 2890 addnetwork(&Tmobile_icon, "31058"); /* USA */
2891 addnetwork(&Tmobile_icon, "31066"); /* USA */ 2891 addnetwork(&Tmobile_icon, "31066"); /* USA */
2892 addnetwork(&Tmobile_icon, "31080"); /* USA */ 2892 addnetwork(&Tmobile_icon, "31080"); /* USA */
2893 2893
2894 /* VODAFONE Bitmaps */ 2894 /* VODAFONE Bitmaps */
2895 addnetwork(&Vodafone_icon, "23415"); /* UK */ 2895 addnetwork(&Vodafone_icon, "23415"); /* UK */
2896 addnetwork(&Vodafone_icon, "26202"); /* Germany */ 2896 addnetwork(&Vodafone_icon, "26202"); /* Germany */
2897 addnetwork(&Vodafone_icon, "27201"); /* Ireland */ 2897 addnetwork(&Vodafone_icon, "27201"); /* Ireland */
2898 addnetwork(&Vodafone_icon, "20404"); /* Holand */ 2898 addnetwork(&Vodafone_icon, "20404"); /* Holand */
2899 addnetwork(&Vodafone_icon, "24008"); /* Sweden */ 2899 addnetwork(&Vodafone_icon, "24008"); /* Sweden */
2900 2900
2901 /* O2 Bitmaps */ 2901 /* O2 Bitmaps */
2902 // addnetwork(&O2UK_bmp, "23410"); 2902 // addnetwork(&O2UK_bmp, "23410");
2903 2903
2904 /* Orange Bitmaps */ 2904 /* Orange Bitmaps */
2905 addnetwork(&orange_icon, "34001"); 2905 addnetwork(&orange_icon, "34001");
2906 addnetwork(&orange_icon, "20801"); 2906 addnetwork(&orange_icon, "20801");
2907 addnetwork(&orange_icon, "23433"); 2907 addnetwork(&orange_icon, "23433");
2908 addnetwork(&orange_icon, "23830"); 2908 addnetwork(&orange_icon, "23830");
2909 2909
2910 2910
2911 } 2911 }
2912 2912
2913 /******************************************************************************* 2913 /*******************************************************************************
2914 2914
2915 $Function: 2915 $Function:
2916 2916
2917 $Description: function to convert 'n' characters in an UBYTE array into a positive integer. 2917 $Description: function to convert 'n' characters in an UBYTE array into a positive integer.
2918 2918
2919 $Returns: Value in the string 2919 $Returns: Value in the string
2920 2920
2921 $Arguments: str - pointer to the string 2921 $Arguments: str - pointer to the string
2922 maxChar - last possible char of the number 2922 maxChar - last possible char of the number
2923 2923
2924 *******************************************************************************/ 2924 *******************************************************************************/
2925 int UbyteToInt(UBYTE* str, int maxChar) 2925 int UbyteToInt(UBYTE* str, int maxChar)
2926 { 2926 {
2927 int num = 0; 2927 int num = 0;
2928 int i; 2928 int i;
2929 for (i=0;i<maxChar;i++) 2929 for (i=0;i<maxChar;i++)
2930 { 2930 {
2931 if ((str[i] >='0') && (str[i] <='9')) 2931 if ((str[i] >='0') && (str[i] <='9'))
2932 num = num*10+str[i]-'0'; 2932 num = num*10+str[i]-'0';
2933 else 2933 else
2934 return (num); 2934 return (num);
2935 } 2935 }
2936 return (num); 2936 return (num);
2937 } 2937 }
2938 2938
2939 /******************************************************************************* 2939 /*******************************************************************************
2940 2940
2941 $Function: icon_getNetworkIcon 2941 $Function: icon_getNetworkIcon
2942 2942
2943 $Description: This procedure returns a bitmap based on the suplied network number. 2943 $Description: This procedure returns a bitmap based on the suplied network number.
2944 2944
2945 $Returns: Pointer to the network logo bitmap 2945 $Returns: Pointer to the network logo bitmap
2946 2946
2947 $Arguments: networkNumber - array of data corresponding to the network number 2947 $Arguments: networkNumber - array of data corresponding to the network number
2948 NB This may not be null terminated. 2948 NB This may not be null terminated.
2949 2949
2950 *******************************************************************************/ 2950 *******************************************************************************/
2951 T_BITMAP* icon_getNetworkIcon( UBYTE* networkNumber) 2951 T_BITMAP* icon_getNetworkIcon( UBYTE* networkNumber)
2952 { 2952 {
2953 char num[SIZE_PLMN_NAME+1]; 2953 char num[SIZE_PLMN_NAME+1];
2954 int i; 2954 int i;
2955 static int init=1; 2955 static int init=1;
2956 TRACE_FUNCTION("icon_getNetworkIcon()"); 2956 TRACE_FUNCTION("icon_getNetworkIcon()");
2957 if (init) 2957 if (init)
2958 { 2958 {
2959 icon_initNetworkBitmaps( ); 2959 icon_initNetworkBitmaps( );
2960 init=0; 2960 init=0;
2961 } 2961 }
2962 // AP - 29-01-03 - IF this is satisfied we dont want to show provider icon 2962 // AP - 29-01-03 - IF this is satisfied we dont want to show provider icon
2963 if( FFS_flashData.ProviderNetworkShow == FALSE ) 2963 if( FFS_flashData.ProviderNetworkShow == FALSE )
2964 return ( NULL ); 2964 return ( NULL );
2965 2965
2966 //NB: NetworkNumber may not be null terminated 2966 //NB: NetworkNumber may not be null terminated
2967 for (i=0;i<SIZE_PLMN_NAME;i++) 2967 for (i=0;i<SIZE_PLMN_NAME;i++)
2968 num[i] = (char)networkNumber[i]; 2968 num[i] = (char)networkNumber[i];
2969 num[SIZE_PLMN_NAME] = 0x00; 2969 num[SIZE_PLMN_NAME] = 0x00;
2970 for (i=0;i<MAX_NETWORK_NUMBER;i++) 2970 for (i=0;i<MAX_NETWORK_NUMBER;i++)
2971 { 2971 {
2972 if (strcmp(num,networkBitmap[i].num)==0) 2972 if (strcmp(num,networkBitmap[i].num)==0)
2973 return (networkBitmap[i].bmp); 2973 return (networkBitmap[i].bmp);
2974 } 2974 }
2975 TRACE_EVENT_P1("No match for %s",num); 2975 TRACE_EVENT_P1("No match for %s",num);
2976 return (NULL); 2976 return (NULL);
2977 } 2977 }
2978 /******************************************************************************* 2978 /*******************************************************************************
2979 2979
2980 $Function: icon_getBitmapIdFromText() 2980 $Function: icon_getBitmapIdFromText()
2981 2981
2982 $Description: This procedure selects a bitmap Id depending on the textid passed to it. 2982 $Description: This procedure selects a bitmap Id depending on the textid passed to it.
2983 2983
2984 $Returns: data - enumerated type corresponding to the desired bitmap 2984 $Returns: data - enumerated type corresponding to the desired bitmap
2985 2985
2986 $Arguments: mnuId - text id corresponding to the desired bitmap 2986 $Arguments: mnuId - text id corresponding to the desired bitmap
2987 2987
2988 *******************************************************************************/ 2988 *******************************************************************************/
2989 int icon_getBitmapIdFromText( int mnuId ) 2989 int icon_getBitmapIdFromText( int mnuId )
2990 { 2990 {
2991 int data; 2991 int data;
2992 TRACE_FUNCTION("icon_getBitmapIdFromText()"); 2992 TRACE_FUNCTION("icon_getBitmapIdFromText()");
2993 switch (mnuId) 2993 switch (mnuId)
2994 { 2994 {
2995 case TxtNone: 2995 case TxtNone:
2996 data = BGD_NONE; 2996 data = BGD_NONE;
2997 break; 2997 break;
2998 case TxtBgdSquares: 2998 case TxtBgdSquares:
2999 data = BGD_SQUARE; 2999 data = BGD_SQUARE;
3000 break; 3000 break;
3001 case TxtBgdO2: 3001 case TxtBgdO2:
3002 data = BGD_O2; 3002 data = BGD_O2;
3003 break; 3003 break;
3004 case TxtBgdTree: 3004 case TxtBgdTree:
3005 data = BGD_TREE; 3005 data = BGD_TREE;
3006 break; 3006 break;
3007 case TxtBgdSunset: 3007 case TxtBgdSunset:
3008 data = BGD_SUNSET; 3008 data = BGD_SUNSET;
3009 break; 3009 break;
3010 case TxtBgdEdinburgh1: 3010 case TxtBgdEdinburgh1:
3011 data = BGD_EDINBURGH1; 3011 data = BGD_EDINBURGH1;
3012 break; 3012 break;
3013 case TxtBgdEdinburgh2: 3013 case TxtBgdEdinburgh2:
3014 data = BGD_EDINBURGH2; 3014 data = BGD_EDINBURGH2;
3015 break; 3015 break;
3016 case TxtBgdEdinburgh3: 3016 case TxtBgdEdinburgh3:
3017 data = BGD_EDINBURGH3; 3017 data = BGD_EDINBURGH3;
3018 break; 3018 break;
3019 case TxtBgdEdinburgh4: 3019 case TxtBgdEdinburgh4:
3020 data = BGD_EDINBURGH4; 3020 data = BGD_EDINBURGH4;
3021 break; 3021 break;
3022 case TxtBgdTILogo: 3022 case TxtBgdTILogo:
3023 data = BGD_TI_LOGO ; 3023 data = BGD_TI_LOGO ;
3024 break; 3024 break;
3025 default: 3025 default:
3026 data = BGD_NONE; 3026 data = BGD_NONE;
3027 break; 3027 break;
3028 } 3028 }
3029 return (data); 3029 return (data);
3030 } 3030 }
3031 3031
3032 /******************************************************************************* 3032 /*******************************************************************************
3033 3033
3034 $Function: icon_getBitmapFromId 3034 $Function: icon_getBitmapFromId
3035 3035
3036 $Description: This procedure selects a bitmap depending on the bgd id passed to it. 3036 $Description: This procedure selects a bitmap depending on the bgd id passed to it.
3037 The procedure can return a pointer to the data or, if a data structure is 3037 The procedure can return a pointer to the data or, if a data structure is
3038 already in use, can copy the data out into the new structure. 3038 already in use, can copy the data out into the new structure.
3039 3039
3040 $Returns: data - pointer to the bitmap 3040 $Returns: data - pointer to the bitmap
3041 3041
3042 $Arguments: bgdId - enumerated type corresponding to the desired bitmap 3042 $Arguments: bgdId - enumerated type corresponding to the desired bitmap
3043 *bmpData - pointer to a structure that can store the bitmap data (if required) 3043 *bmpData - pointer to a structure that can store the bitmap data (if required)
3044 3044
3045 *******************************************************************************/ 3045 *******************************************************************************/
3046 T_BITMAP *icon_getBitmapFromId( int bgdId, T_BITMAP *bmpData) 3046 T_BITMAP *icon_getBitmapFromId( int bgdId, T_BITMAP *bmpData)
3047 { 3047 {
3048 T_BITMAP* data; 3048 T_BITMAP* data;
3049 TRACE_FUNCTION("icon_getBitmapFromId()"); 3049 TRACE_FUNCTION("icon_getBitmapFromId()");
3050 3050
3051 data = icon_getBgdBitmap( bgdId ); 3051 data = icon_getBgdBitmap( bgdId );
3052 //Update the supplied data structure (if any) 3052 //Update the supplied data structure (if any)
3053 if (bmpData != NULL) 3053 if (bmpData != NULL)
3054 { 3054 {
3055 if (data == NULL) 3055 if (data == NULL)
3056 { 3056 {
3057 bmpData->area.sx = 0; 3057 bmpData->area.sx = 0;
3058 bmpData->area.sy = 0; 3058 bmpData->area.sy = 0;
3059 } 3059 }
3060 else 3060 else
3061 { 3061 {
3062 bmpData->area.px = data->area.px; 3062 bmpData->area.px = data->area.px;
3063 bmpData->area.py = data->area.py; 3063 bmpData->area.py = data->area.py;
3064 bmpData->area.sx = data->area.sx; 3064 bmpData->area.sx = data->area.sx;
3065 bmpData->area.sy = data->area.sy; 3065 bmpData->area.sy = data->area.sy;
3066 bmpData->area.sx = data->area.sx; 3066 bmpData->area.sx = data->area.sx;
3067 bmpData->nIcons = data->nIcons; 3067 bmpData->nIcons = data->nIcons;
3068 bmpData->iconCol = data->iconCol; 3068 bmpData->iconCol = data->iconCol;
3069 bmpData->icnType = data->icnType; 3069 bmpData->icnType = data->icnType;
3070 bmpData->icons = data->icons; 3070 bmpData->icons = data->icons;
3071 } 3071 }
3072 } 3072 }
3073 return (data); 3073 return (data);
3074 } 3074 }
3075 3075
3076 3076
3077 /******************************************************************************* 3077 /*******************************************************************************
3078 3078
3079 $Function: icon_bgdMenuSelected() 3079 $Function: icon_bgdMenuSelected()
3080 3080
3081 $Description: This procedure is called when a background image is selected from a menu. 3081 $Description: This procedure is called when a background image is selected from a menu.
3082 3082
3083 $Returns: None 3083 $Returns: None
3084 3084
3085 $Arguments: None 3085 $Arguments: None
3086 3086
3087 *******************************************************************************/ 3087 *******************************************************************************/
3088 int icon_bgdMenuSelected(MfwMnu* mnu, MfwMnuItem* mnuItem) 3088 int icon_bgdMenuSelected(MfwMnu* mnu, MfwMnuItem* mnuItem)
3089 { 3089 {
3090 T_MFW_HND win = mfw_parent(mfw_header()); 3090 T_MFW_HND win = mfw_parent(mfw_header());
3091 int mnuId; 3091 int mnuId;
3092 /* int colDisplayType; */ /* Warning */ 3092 /* int colDisplayType; */ /* Warning */
3093 /* int colType; */ /* Warning */ 3093 /* int colType; */ /* Warning */
3094 /* int colFgdSelect = FALSE; */ /* Warning */ 3094 /* int colFgdSelect = FALSE; */ /* Warning */
3095 int bmpId; 3095 int bmpId;
3096 /* T_BITMAP *backgroundBmp; */ /* Warning */ 3096 /* T_BITMAP *backgroundBmp; */ /* Warning */
3097 int storedMenuId; 3097 int storedMenuId;
3098 3098
3099 //The destination for the bitmap has been storeed by the previous menu selection 3099 //The destination for the bitmap has been storeed by the previous menu selection
3100 storedMenuId = MmiBook_getStoredOption(); 3100 storedMenuId = MmiBook_getStoredOption();
3101 mnuId = (int)mnuItem->str; 3101 mnuId = (int)mnuItem->str;
3102 3102
3103 //Get the BMI index corresponding to the text string 3103 //Get the BMI index corresponding to the text string
3104 bmpId = icon_getBitmapIdFromText(mnuId); 3104 bmpId = icon_getBitmapIdFromText(mnuId);
3105 3105
3106 //Depending on where this is to be displayed, we need either a pointer to the data or we 3106 //Depending on where this is to be displayed, we need either a pointer to the data or we
3107 //must copy the data out of the structure to update another structure. 3107 //must copy the data out of the structure to update another structure.
3108 switch (storedMenuId) 3108 switch (storedMenuId)
3109 { 3109 {
3110 case TxtIdleScreen: 3110 case TxtIdleScreen:
3111 /* Update idle screen bitmap */ 3111 /* Update idle screen bitmap */
3112 idle_setBgdBitmap(bmpId); 3112 idle_setBgdBitmap(bmpId);
3113 FFS_flashData.IdleScreenBgd = bmpId; 3113 FFS_flashData.IdleScreenBgd = bmpId;
3114 break; 3114 break;
3115 case TxtMenuScreen: 3115 case TxtMenuScreen:
3116 /* The menu screen bitmap is a fixed structure - we need to update the data within*/ 3116 /* The menu screen bitmap is a fixed structure - we need to update the data within*/
3117 icon_setMainBgdBitmap(bmpId); 3117 icon_setMainBgdBitmap(bmpId);
3118 FFS_flashData.MainMenuBgd = bmpId; 3118 FFS_flashData.MainMenuBgd = bmpId;
3119 break; 3119 break;
3120 3120
3121 default: //unknown option 3121 default: //unknown option
3122 break; 3122 break;
3123 } 3123 }
3124 3124
3125 info_screen(win, TxtBackground, TxtSelected, 0); 3125 info_screen(win, TxtBackground, TxtSelected, 0);
3126 flash_write(); 3126 flash_write();
3127 return(0); 3127 return(0);
3128 } 3128 }
3129 /******************************************************************************* 3129 /*******************************************************************************
3130 3130
3131 $Function: icon_networkShow 3131 $Function: icon_networkShow
3132 3132
3133 $Description: Procedure to show acivation of Provider Bitmap 3133 $Description: Procedure to show acivation of Provider Bitmap
3134 3134
3135 $Returns: Event consumed 3135 $Returns: Event consumed
3136 3136
3137 $Arguments: None 3137 $Arguments: None
3138 3138
3139 *******************************************************************************/ 3139 *******************************************************************************/
3140 3140
3141 int icon_networkShow (MfwMnu* m, MfwMnuItem* i) 3141 int icon_networkShow (MfwMnu* m, MfwMnuItem* i)
3142 { 3142 {
3143 T_MFW_HND win = mfwParent(mfw_header()); 3143 T_MFW_HND win = mfwParent(mfw_header());
3144 T_DISPLAY_DATA display_info; 3144 T_DISPLAY_DATA display_info;
3145 3145
3146 if(FFS_flashData.ProviderNetworkShow == FALSE ) 3146 if(FFS_flashData.ProviderNetworkShow == FALSE )
3147 { 3147 {
3148 FFS_flashData.ProviderNetworkShow = TRUE; 3148 FFS_flashData.ProviderNetworkShow = TRUE;
3149 flash_write(); 3149 flash_write();
3150 }// SPR:12822 vvadiraj 3150 }// SPR:12822 vvadiraj
3151 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtProviderIcon, TxtOn, COLOUR_STATUS); 3151 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtProviderIcon, TxtOn, COLOUR_STATUS);
3152 dlg_initDisplayData_events( &display_info, NULL, THREE_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT ); 3152 dlg_initDisplayData_events( &display_info, NULL, THREE_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
3153 3153
3154 info_dialog(win, &display_info); 3154 info_dialog(win, &display_info);
3155 3155
3156 return MFW_EVENT_CONSUMED; 3156 return MFW_EVENT_CONSUMED;
3157 // SPR:12822 vvadiraj } 3157 // SPR:12822 vvadiraj }
3158 } 3158 }
3159 /******************************************************************************* 3159 /*******************************************************************************
3160 3160
3161 $Function: icon_networkDontShow 3161 $Function: icon_networkDontShow
3162 3162
3163 $Description: Procedure to show deActivate of Provider Bitmap 3163 $Description: Procedure to show deActivate of Provider Bitmap
3164 3164
3165 $Returns: None 3165 $Returns: None
3166 3166
3167 $Arguments: None 3167 $Arguments: None
3168 3168
3169 *******************************************************************************/ 3169 *******************************************************************************/
3170 3170
3171 int icon_networkDontShow (MfwMnu* m, MfwMnuItem* i) 3171 int icon_networkDontShow (MfwMnu* m, MfwMnuItem* i)
3172 { 3172 {
3173 T_MFW_HND win = mfwParent(mfw_header()); 3173 T_MFW_HND win = mfwParent(mfw_header());
3174 T_DISPLAY_DATA display_info; 3174 T_DISPLAY_DATA display_info;
3175 3175
3176 if(FFS_flashData.ProviderNetworkShow == TRUE ) 3176 if(FFS_flashData.ProviderNetworkShow == TRUE )
3177 { 3177 {
3178 FFS_flashData.ProviderNetworkShow = FALSE; 3178 FFS_flashData.ProviderNetworkShow = FALSE;
3179 flash_write(); 3179 flash_write();
3180 }// SPR:12822 vvadiraj 3180 }// SPR:12822 vvadiraj
3181 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtProviderIcon, TxtOff, COLOUR_STATUS); 3181 dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtProviderIcon, TxtOff, COLOUR_STATUS);
3182 dlg_initDisplayData_events( &display_info, NULL, THREE_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT ); 3182 dlg_initDisplayData_events( &display_info, NULL, THREE_SECS, KEY_CLEAR|KEY_LEFT|KEY_RIGHT );
3183 3183
3184 info_dialog(win, &display_info); 3184 info_dialog(win, &display_info);
3185 3185
3186 return MFW_EVENT_CONSUMED; 3186 return MFW_EVENT_CONSUMED;
3187 // SPR:12822 vvadiraj} 3187 // SPR:12822 vvadiraj}
3188 } 3188 }
3189 #endif 3189 #endif
3190 3190
3191 #ifndef COLOURDISPLAY 3191 #ifndef COLOURDISPLAY
3192 3192
3193 /******************************************************************************* 3193 /*******************************************************************************
3194 3194
3195 $Function: icon_getNetworkIcon 3195 $Function: icon_getNetworkIcon
3196 3196
3197 $Description: Dummy procedure for non-colour displays 3197 $Description: Dummy procedure for non-colour displays
3198 3198
3199 $Returns: None 3199 $Returns: None
3200 3200
3201 $Arguments: None 3201 $Arguments: None
3202 3202
3203 *******************************************************************************/ 3203 *******************************************************************************/
3204 T_BITMAP* icon_getNetworkIcon( UBYTE* networkNumber) 3204 T_BITMAP* icon_getNetworkIcon( UBYTE* networkNumber)
3205 { 3205 {
3206 return (NULL); 3206 return (NULL);
3207 } 3207 }
3208 /******************************************************************************* 3208 /*******************************************************************************
3209 3209
3210 $Function: icon_getBitmapFromId 3210 $Function: icon_getBitmapFromId
3211 3211
3212 $Description: Dummy procedure for non-colour displays 3212 $Description: Dummy procedure for non-colour displays
3213 3213
3214 $Returns: None 3214 $Returns: None
3215 3215
3216 $Arguments: None 3216 $Arguments: None
3217 3217
3218 *******************************************************************************/ 3218 *******************************************************************************/
3219 3219
3220 T_BITMAP *icon_getBitmapFromId( int bgdId, T_BITMAP *bmpData) 3220 T_BITMAP *icon_getBitmapFromId( int bgdId, T_BITMAP *bmpData)
3221 { 3221 {
3222 return (NULL); 3222 return (NULL);
3223 } 3223 }
3224 #endif 3224 #endif
3225 3225
3226 /******************************************************************************* 3226 /*******************************************************************************
3227 3227