FreeCalypso > hg > fc-tourmaline
diff src/ui/bmi/mmiResources.c @ 92:c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 08 Nov 2020 06:39:16 +0000 |
parents | 67bfe9f274f6 |
children | 2d19a232f9eb |
line wrap: on
line diff
--- a/src/ui/bmi/mmiResources.c Sun Nov 08 05:12:05 2020 +0000 +++ b/src/ui/bmi/mmiResources.c Sun Nov 08 06:39:16 2020 +0000 @@ -2,24 +2,24 @@ CONDAT (UK) -******************************************************************************** +******************************************************************************** This software product is the property of Condat (UK) Ltd and may not be - disclosed to any third party without the express permission of the owner. - + disclosed to any third party without the express permission of the owner. + ******************************************************************************** - $Project name: Basic MMI - $Project code: BMI (6349) + $Project name: Basic MMI + $Project code: BMI (6349) $Module: Resource Manager $File: MmiResources.c - $Revision: 1.0 - - $Author: Condat(UK) - $Date: 25/10/00 - + $Revision: 1.0 + + $Author: Condat(UK) + $Date: 25/10/00 + ******************************************************************************** - + Description: Simple wrapper for the MMI Block Resources @@ -39,27 +39,27 @@ fastest implementation. It is therefore not a reentrant module, however given it only performs read only actions this should not be a problem. - + ******************************************************************************** $History: MmiResources.c Sep 14, 2007 REF: OMAPS00145860 Adrian Salido Description: FT - MMI: Wrong trace class of new_getDataColour - Solution: changed event traces to function traces because the information content of + Solution: changed event traces to function traces because the information content of this is low for non-MMI people and against TI coding convention. - + Nov 07, 2006 ER:OMAPS00070661 R.Prabakar(a0393213) R99 network compliancy : Implemented Language Notification and Provide Local Information (Language setting) SAT proactive commands and Language Selection SAT event - + May 30, 2006 DR: OMAPS00070657 x0pleela Description: CPHS feature on Locosto-Lite Solution: For ALS feature, a) Modified "MmiRsrcGetText" function to return the string from FFS for the current active line - + March 01, 2005 REF: ENH 29313 Deepa M.D Isolating colour build related changes from MMI LITE flag. - The proper Feature flag COLORDISPLAY was used for all color + The proper Feature flag COLORDISPLAY was used for all color related changes. Oct 19, 2004 REF: CRR MMI-SPR-26002 xkundadu. @@ -69,28 +69,28 @@ Aug 25, 2004 REF: CRR 24904 Deepa M.D Bug:cleanup compile switches used for Go-lite - Fix:COLOURDISPLAY compiler switch has been added to the functions which are + Fix:COLOURDISPLAY compiler switch has been added to the functions which are used only for the normal color build. - Aug 25, 2004 REF: CRR 24297 Deepa M.D + Aug 25, 2004 REF: CRR 24297 Deepa M.D Bug:Reduction of the size of the variable ColArray Fix:The size of the structure T_COLDATA has been reduced for the Go-lite version. For Go-lite only two colors are being used(Black&White), hence the members of the T_COLDATA structure can be reduced to U8. - 25/10/00 Original Condat(UK) BMI version. - 03/10/02 Replaced most of the file with version on branch for issue 1150 (MC, SPR 1242) + 25/10/00 Original Condat(UK) BMI version. + 03/10/02 Replaced most of the file with version on branch for issue 1150 (MC, SPR 1242) $End *******************************************************************************/ /******************************************************************************* - - Include Files - + + Include Files + *******************************************************************************/ #define ENTITY_MFW @@ -239,8 +239,8 @@ #define ALLOFFSET (LINE_HEIGHT*2) #define MNUOFFSET (LINE_HEIGHT) -#define NLINES_LATIN (SCREEN_SIZE_Y/LINE_HEIGHT_LATIN) -#define NLINES_CHINESE (SCREEN_SIZE_Y/LINE_HEIGHT_CHINESE) +#define NLINES_LATIN (SCREEN_SIZE_Y/LINE_HEIGHT_LATIN) +#define NLINES_CHINESE (SCREEN_SIZE_Y/LINE_HEIGHT_CHINESE) #define CHINESE_MENU_VERTICAL_SIZE ((NLINES_CHINESE*LINE_HEIGHT_CHINESE)-SK_HEIGHT_CHINESE) #define STANDARD_MENU_VERTICAL_SIZE ((NLINES_LATIN*LINE_HEIGHT_LATIN)-SK_HEIGHT_LATIN) @@ -249,9 +249,9 @@ /******************************************************************************* - + Static data elements - + *******************************************************************************/ /* Define static data elements to give the global @@ -266,7 +266,7 @@ /* Define a unique key value to determine if the constructor - has been called. This is slightly dangerous as there is + has been called. This is slightly dangerous as there is a chance that the key value powers up in this state, however this is unlikely in a cold boot situation. (In a warm boot, if the RAM contents are preserved then the block resource @@ -295,7 +295,7 @@ /*MC, if English and Chinese Available*/ #ifdef CHINESE_MMI static const CountryLangEntry LanguageTableEntries[7]= -{ +{ {"001", ENGLISH_LANGUAGE}, /*USA*/ {"044", ENGLISH_LANGUAGE}, /*UK*/ {"061", ENGLISH_LANGUAGE}, /*Australia*/ @@ -309,7 +309,7 @@ { 7, (CountryLangEntry*)LanguageTableEntries}; #else /*MC, if English and German Available*/ static const CountryLangEntry LanguageTableEntries[7]= -{ +{ {"001", ENGLISH_LANGUAGE}, /*USA*/ {"044", ENGLISH_LANGUAGE}, /*UK*/ {"061", ENGLISH_LANGUAGE}, /*Australia*/ @@ -325,7 +325,7 @@ #endif -typedef struct +typedef struct { // cp_resource_file_t rf; RESOURCE_DIRECTORY_HEADER language_table; @@ -358,13 +358,13 @@ COL_TYPE_MAX }; /***************************Go-lite Optimization changes Start***********************/ -//Aug 25, 2004 REF: CRR 24297 Deepa M.D +//Aug 25, 2004 REF: CRR 24297 Deepa M.D //T_COLDATA structure for the Go-lite has been reduced in size. //March 01, 2005 REF: ENH 29313 Deepa M.D // Isolating colour build related changes from MMI LITE flag. -// The proper Feature flag COLORDISPLAY was used for all color +// The proper Feature flag COLORDISPLAY was used for all color //related changes. -#ifdef COLOURDISPLAY +#ifdef COLOURDISPLAY typedef struct { U32 fgd; U32 bgd; @@ -435,9 +435,9 @@ /******************************************************************************* - + Private Routines - + *******************************************************************************/ static void LanguageEnable( int newLanguage ) @@ -464,9 +464,9 @@ /******************************************************************************* - + Public Routines - + *******************************************************************************/ /******************************************************************************* @@ -477,14 +477,14 @@ be invoked and will automatically start, we will use the key value above to ensure we detect the startup conditions. - + The calling routine for this function should check - for NULL values which will be returned if the + for NULL values which will be returned if the $Returns: Pointer to resource indicated by Id (Or NULL) $Arguments: Id of requested resource - + *******************************************************************************/ char *MmiRsrcGetText( int Id ) @@ -527,7 +527,7 @@ Mmi_layout_areas(); FFS_flashData.language = lang; -// Oct 19, 2004 REF: CRR MMI-SPR-26002 xkundadu +// Oct 19, 2004 REF: CRR MMI-SPR-26002 xkundadu // Issue description: Golite booting problem. // Solution: If the FFS is not formatted, prevent writing into the FFS. if(flash_formatted() == TRUE) @@ -537,45 +537,45 @@ } -/*MC SPR 1150, Simplified menu interface functions. +/*MC SPR 1150, Simplified menu interface functions. It should be simpler to add new functions for new languages We still need to write individual functions for each language to interface with the menus as the menu architecture does not allow passing parmeters*/ /*OMAPS00070661 (SAT-Lang selection) a0393213(R.Prabakar) language selection sent to mfw*/ void Mmi_Set2English( void ) { - TRACE_EVENT("English Language Selected"); - Mmi_Set2Language(ENGLISH_LANGUAGE); + TRACE_EVENT("English Language Selected"); + Mmi_Set2Language(ENGLISH_LANGUAGE); #ifdef FF_MMI_R99_SAT_LANG satLanguageSelected (ENGLISH_LANGUAGE); #endif } void Mmi_Set2German( void ) -{ +{ TRACE_EVENT("German Language Selected"); - Mmi_Set2Language(GERMAN_LANGUAGE); - #ifdef FF_MMI_R99_SAT_LANG + Mmi_Set2Language(GERMAN_LANGUAGE); + #ifdef FF_MMI_R99_SAT_LANG satLanguageSelected (GERMAN_LANGUAGE); #endif } void Mmi_Set2Chinese( void ) { - TRACE_EVENT("Chinese Language Selected"); - Mmi_Set2Language(CHINESE_LANGUAGE); + TRACE_EVENT("Chinese Language Selected"); + Mmi_Set2Language(CHINESE_LANGUAGE); #ifdef FF_MMI_R99_SAT_LANG - satLanguageSelected (CHINESE_LANGUAGE); + satLanguageSelected (CHINESE_LANGUAGE); #endif } #ifdef LANG_CHANGE_TEST void Mmi_Set2Martian( void ) { - TRACE_EVENT("Martian Language Selected"); - Mmi_Set2Language(MARTIAN_LANGUAGE); + TRACE_EVENT("Martian Language Selected"); + Mmi_Set2Language(MARTIAN_LANGUAGE); #ifdef FF_MMI_R99_SAT_LANG - satLanguageSelected (MARTIAN_LANGUAGE); + satLanguageSelected (MARTIAN_LANGUAGE); #endif } #endif @@ -588,13 +588,13 @@ resources_Init(win); MmiRsrcSetLang(lang); SEND_EVENT (resources_data.resources_win, SHOW_CONFIRM, 0, 0); - #else + #else /*OMAPS00070661 The sequence is changed to prevent the crash when the language is changed in quick succession*/ MmiRsrcSetLang(lang); if(!resources_data.resources_win) { resources_Init(win); - SEND_EVENT (resources_data.resources_win, SHOW_CONFIRM, 0, 0); + SEND_EVENT (resources_data.resources_win, SHOW_CONFIRM, 0, 0); } #endif @@ -611,7 +611,7 @@ #ifndef LSCREEN //All numbers are 8 bits high (whether chinese or latin chars) return (8); -#else +#else //all text is 12 bits high return (12); #endif @@ -636,9 +636,9 @@ case 4: return FOURTH_LINE_CHINESE; //We are now asking for an invalid line default: return FOURTH_LINE_CHINESE; - + } - } + } else { switch (lineNo) @@ -658,7 +658,7 @@ //We are now asking for an invalid line default: return SIXTH_LINE; } - } + } #else //assume both fonts are now the same height. switch (lineNo) @@ -666,7 +666,7 @@ case SECOND_LAST_LINE_TOP: return ( (UBYTE)(SCREEN_SIZE_Y-Mmi_layout_softkeyHeight()-LINE_HEIGHT)); case LAST_LINE_TOP: return ( (UBYTE)(SCREEN_SIZE_Y-Mmi_layout_softkeyHeight())); case LAST_LINE: return ( (UBYTE) SCREEN_SIZE_Y); - + default: return (lineNo*LINE_HEIGHT); } #endif @@ -690,9 +690,9 @@ case 4: return FOURTH_LINE_CHINESE; //We are now asking for an invalid line default: return FOURTH_LINE_CHINESE; - + } - } + } else { switch (lineNo) @@ -711,7 +711,7 @@ case LAST_LINE: case 6: return SIXTH_LINE; } - + } #else switch (lineNo) @@ -720,7 +720,7 @@ case LAST_LINE_TOP: return((UBYTE)(SCREEN_SIZE_Y-(Mmi_layout_softkeyHeight()))); case LAST_LINE: return((UBYTE)(SCREEN_SIZE_Y)); default: return(Mmi_layout_IconHeight()+Mmi_layout_line_height()*lineNo); - + } #endif } @@ -786,7 +786,7 @@ else return 4; } -#else +#else return NLINES_MAX-1; #endif } @@ -806,7 +806,7 @@ #endif } -//GW 10/02/03 Modified code - icon position is now sorted out by 'iconsMainIconsAreaSet' - the code +//GW 10/02/03 Modified code - icon position is now sorted out by 'iconsMainIconsAreaSet' - the code // here only supplies the available screen size void Mmi_layout_areas(void) { @@ -825,10 +825,10 @@ Mmi_set_area_attr(&sat_select_menuArea, 0,0,SCREEN_SIZE_X,SCREEN_SIZE_Y-Mmi_layout_softkeyHeight()); Mmi_set_area_attr(&smscb_M_CBArea, 0,0,SCREEN_SIZE_X,SCREEN_SIZE_Y-Mmi_layout_softkeyHeight()); Mmi_set_area_attr(&smscb_M_CB_ACTArea, 0,0,SCREEN_SIZE_X,SCREEN_SIZE_Y-Mmi_layout_softkeyHeight()); - Mmi_set_area_attr(&smscb_M_CB_TOPArea, 0,0,SCREEN_SIZE_X,SCREEN_SIZE_Y-Mmi_layout_softkeyHeight()); + Mmi_set_area_attr(&smscb_M_CB_TOPArea, 0,0,SCREEN_SIZE_X,SCREEN_SIZE_Y-Mmi_layout_softkeyHeight()); Mmi_set_area_attr(&smscb_M_CB_TOP_CONSArea, 0,0,SCREEN_SIZE_X,SCREEN_SIZE_Y-Mmi_layout_softkeyHeight()); Mmi_set_area_attr(&smscb_M_CB_TOP_CONS_SELArea, 0,0,SCREEN_SIZE_X,SCREEN_SIZE_Y-Mmi_layout_softkeyHeight()); - Mmi_set_area_attr(&smscb_CBArea, 0,0,SCREEN_SIZE_X,SCREEN_SIZE_Y-Mmi_layout_softkeyHeight()); + Mmi_set_area_attr(&smscb_CBArea, 0,0,SCREEN_SIZE_X,SCREEN_SIZE_Y-Mmi_layout_softkeyHeight()); Mmi_set_area_attr(&smscb_CB_OPTArea, 0,0,SCREEN_SIZE_X,SCREEN_SIZE_Y-Mmi_layout_softkeyHeight()); Mmi_set_area_attr(&readSMS_menuArea, 0,0,SCREEN_SIZE_X,SCREEN_SIZE_Y-Mmi_layout_softkeyHeight()); #ifdef FF_MMI_FILEMANAGER @@ -855,12 +855,12 @@ $Function: resources_Init - $Description: - + $Description: + $Returns: window $Arguments: parent window - + *******************************************************************************/ T_MFW_HND resources_Init(T_MFW_HND parent_window) { @@ -888,9 +888,9 @@ } else { - TRACE_EVENT("File Not Created in FFS"); + TRACE_EVENT("File Not Created in FFS"); } - + } void colour_initial_colours (void) { @@ -912,11 +912,11 @@ $Function: resources_Exit $Description: exit network handling (Backward Compatibility interface) - + $Returns: none $Arguments: window - + *******************************************************************************/ void resources_Exit (T_MFW_HND own_window) { @@ -935,11 +935,11 @@ $Function: resources_create $Description: create network top window - + $Returns: window $Arguments: parent_window - + *******************************************************************************/ T_MFW_HND resources_create (T_MFW_HND parent_window) { @@ -961,7 +961,7 @@ win = ((T_MFW_HDR *)data->resources_win)->data; win->user = (void *) data; - + winShow(data->resources_win); /* * return window handle @@ -975,12 +975,12 @@ $Function: resources_destroy - $Description: - + $Description: + $Returns: none $Arguments: window - + *******************************************************************************/ void resources_destroy (T_MFW_HND own_window) { @@ -1012,11 +1012,11 @@ $Function: resources_win_cb $Description: network top window - + $Returns: status int $Arguments: event, window - + *******************************************************************************/ static int resources_win_cb (T_MFW_EVENT event, T_MFW_WIN * win) { @@ -1034,12 +1034,12 @@ $Function: resources_language_confirm - $Description: - + $Description: + $Returns: void $Arguments: void - + *******************************************************************************/ static void resources_language_confirm(void) { @@ -1049,7 +1049,7 @@ dlg_initDisplayData_TextId( &display_info, TxtNull, TxtNull, TxtDone, TxtNull , COLOUR_STATUS_PINS); dlg_initDisplayData_events( &display_info, (T_VOID_FUNC)resources_dialog_cb, THREE_SECS, KEY_CLEAR | KEY_RIGHT ); - + /* * Call Info Screen */ @@ -1061,18 +1061,18 @@ $Function: resources_dialog_cb - $Description: - + $Description: + $Returns: void $Arguments: window, identifier, reason - + *******************************************************************************/ void resources_dialog_cb(T_MFW_HND win, UBYTE identifier, UBYTE reason) { TRACE_FUNCTION ("resources_dialog_cb()"); - switch (reason) + switch (reason) { case INFO_TIMEOUT: /* no break; */ @@ -1092,12 +1092,12 @@ $Function: resources - $Description: - + $Description: + $Returns: void $Arguments: window, event, value, parameter - + *******************************************************************************/ void resources (T_MFW_HND win, USHORT event, SHORT value, void * parameter) { @@ -1120,11 +1120,11 @@ $Function: resources_reset_language $Description: Reset language using Pseudo-SS string - + $Returns: TRUE if reset successful, FALSE otherwise $Arguments: Pseudo-SS string - + *******************************************************************************/ BOOL resources_reset_language(char* string) { @@ -1134,12 +1134,12 @@ memcpy(country_code, &string[3], 3); country_code[3] = NULL; - /*for each entry in Language table*/ + /*for each entry in Language table*/ for(i=0; i<LanguageTable.no_of_entries; i++) { /*if country matches that of entry*/ - + if (!strcmp(country_code, LanguageTable.entries[i].country_dialling_code)) - { /*MC SPR 1150, check language fits in allowed range, rather than checking for each + { /*MC SPR 1150, check language fits in allowed range, rather than checking for each and every language (easier to add more languages this way)*/ if (LanguageTable.entries[i].language>0 && LanguageTable.entries[i].language <= NO_OF_LANGUAGES) { MmiRsrcSetLang(LanguageTable.entries[i].language); @@ -1148,26 +1148,26 @@ } } /*if no matches found*/ - return FALSE; + return FALSE; } /******************************************************************************* - $Function: + $Function: + + $Description: - $Description: - - $Returns: + $Returns: - $Arguments: - + $Arguments: + $History - GW 28/11/02 - + GW 28/11/02 - *******************************************************************************/ #define NO_COLOUR_DEFINED (0x01010101) /***************************Go-lite Optimization changes Start***********************/ -//Aug 25, 2004 REF: CRR 24297 Deepa M.D +//Aug 25, 2004 REF: CRR 24297 Deepa M.D //This function is called only for Color build. #ifdef COLOURDISPLAY void init_getDataColour(int screenType, int colType, U32 *fgd, U32 *bgd) @@ -1187,12 +1187,12 @@ { case COLOUR_STATUS_WELCOME: //start screen case COLOUR_STATUS_GOODBYE: //end screen - fgColor = COL_Black; - bgColor = COL_White; + fgColor = COL_Black; + bgColor = COL_White; fgSKColor = COL_Blue; bgSKColor = COL_Yellow; break; - + /* GW#2294 Use a more legible colour as default background colour.*/ case COLOUR_POPUP: case COLOUR_STATUS: //generic status window @@ -1201,7 +1201,7 @@ fgSKColor = COL_Red; bgSKColor = COL_TRANSPARENT; break; - + case COLOUR_EDITOR: fgTColor = COL_White; bgTColor = COL_Blue; @@ -1214,15 +1214,15 @@ case COLOUR_LIST_MAIN: fgTColor = COL_White; bgTColor = COL_BLK; - fgColor = COL_Yellow ; + fgColor = COL_Yellow ; bgColor = COL_Blue; - fgColor = COL_Black ; + fgColor = COL_Black ; bgColor = COL_White; fgSKColor = COL_W; bgSKColor = COL_BLK; //0x00FFFF00; - bgHLColor = COL_MidGrey; + bgHLColor = COL_MidGrey; break; - + case COLOUR_LIST_SUBMENU: case COLOUR_LIST_SUBMENU1: case COLOUR_LIST_SUBMENU2: @@ -1230,58 +1230,58 @@ case COLOUR_LIST_SUBMENU4: fgTColor = COL_Blue; bgTColor = COL_PaleYellow; - fgColor = COL_Black ; + fgColor = COL_Black ; bgColor = COL_White; - bgHLColor = COL_MidGrey; + bgHLColor = COL_MidGrey; fgSKColor = COL_Blue; bgSKColor = COL_PaleYellow; //0x00FFFF00; break; case COLOUR_LIST_COLOUR: - fgColor = COL_RG2; + fgColor = COL_RG2; bgColor = COL_W2; - fgSKColor = COL_W; - bgSKColor = COL_B; + fgSKColor = COL_W; + bgSKColor = COL_B; fgTColor = COL_RG; bgTColor = COL_B; - fgHLColor = dspl_GetBgdColour(); - bgHLColor = dspl_GetFgdColour(); + fgHLColor = dspl_GetBgdColour(); + bgHLColor = dspl_GetFgdColour(); break; - + //Colours for specific displays case COLOUR_GAME: - fgColor = COL_BLK ; + fgColor = COL_BLK ; bgColor = COL_W; - fgSKColor = COL_BLK ; + fgSKColor = COL_BLK ; bgSKColor = COL_Orange; - fgHLColor = COL_B; - bgHLColor = COL_W; + fgHLColor = COL_B; + bgHLColor = COL_W; fgTColor = COL_RB; bgTColor = COL_G; break; - + case COLOUR_IDLE: - fgColor = COL_BLK;//Green ; + fgColor = COL_BLK;//Green ; bgColor = COL_TRANSPARENT;//White ; - fgSKColor = COL_Blue; + fgSKColor = COL_Blue; bgSKColor = COL_TRANSPARENT; //Colours are for the icons fgTColor = COL_RB; bgTColor = COL_G; break; - + case COLOUR_INCALL: - fgColor = COL_RG ; + fgColor = COL_RG ; bgColor = COL_BLK; fgSKColor = COL_B ; /* SPR#1699 - SH - Modified so softkeys visible */ bgSKColor = COL_TRANSPARENT; - fgHLColor = COL_B; - bgHLColor = COL_W; + fgHLColor = COL_B; + bgHLColor = COL_W; fgTColor = COL_RB; bgTColor = COL_G; break; - + default: fgColor = 0x002020FF; bgColor = COL_GR;//0x00FFFFFF; @@ -1289,20 +1289,20 @@ bgSKColor = COL_GR;//0x00FF0000; break; } - + /*If we have no preference for the other colours - set to default*/ - if (fgHLColor == NO_COLOUR_DEFINED) + if (fgHLColor == NO_COLOUR_DEFINED) fgHLColor = bgColor; - if (bgHLColor == NO_COLOUR_DEFINED) + if (bgHLColor == NO_COLOUR_DEFINED) bgHLColor = fgColor; - - if (fgSKColor == NO_COLOUR_DEFINED) + + if (fgSKColor == NO_COLOUR_DEFINED) fgSKColor = fgColor; - if (bgSKColor == NO_COLOUR_DEFINED) + if (bgSKColor == NO_COLOUR_DEFINED) bgSKColor = bgColor; - if (fgTColor == NO_COLOUR_DEFINED) + if (fgTColor == NO_COLOUR_DEFINED) fgTColor = fgColor; - if (bgTColor == NO_COLOUR_DEFINED) + if (bgTColor == NO_COLOUR_DEFINED) bgTColor = bgColor; switch (colType) @@ -1324,7 +1324,7 @@ *fgd = fgTColor; *bgd = bgTColor; break; - + } if (*fgd == *bgd) { @@ -1334,32 +1334,32 @@ } #endif /***************************Go-lite Optimization changes end***********************/ -//This array will be used to store all the colour info for each colour type. +//This array will be used to store all the colour info for each colour type. //This will allow us to let the user change the colour selected /******************************************************************************* - $Function: + $Function: + + $Description: - $Description: - - $Returns: + $Returns: - $Arguments: - + $Arguments: + $History *******************************************************************************/ /***************************Go-lite Optimization changes Start***********************/ //Aug 25, 2004 REF: CRR 24904 Deepa M.D -//This function is used only for the Color build.Hence it is put under the +//This function is used only for the Color build.Hence it is put under the //COLOURDISPLAY compiler switch #ifdef COLOURDISPLAY void setDataColour(int screenType, int colType, U32 fgdORbgd, U32 newColour) { TRACE_EVENT("setDataColour"); - + if ((newColour == NO_COLOUR_DEFINED) || (fgdORbgd ==NO_COL)) return; if ((screenType < LAST_COLOUR_DEF) && @@ -1385,14 +1385,14 @@ /******************************************************************************* - $Function: + $Function: + + $Description: - $Description: - - $Returns: + $Returns: - $Arguments: - + $Arguments: + $History *******************************************************************************/ @@ -1406,14 +1406,14 @@ for (j=0; j<COL_TYPE_MAX;j++) { /***************************Go-lite Optimization changes Start***********************/ - //Aug 25, 2004 REF: CRR 24297 Deepa M.D + //Aug 25, 2004 REF: CRR 24297 Deepa M.D //For Go-lite build, do the initialization of the colArray with black and white. //March 01, 2005 REF: ENH 29313 Deepa M.D // Isolating colour build related changes from MMI LITE flag. - // The proper Feature flag COLORDISPLAY was used for all color + // The proper Feature flag COLORDISPLAY was used for all color //related changes. -#ifdef COLOURDISPLAY - init_getDataColour(i, j, &colArray[i][j].fgd, &colArray[i][j].bgd); +#ifdef COLOURDISPLAY + init_getDataColour(i, j, &colArray[i][j].fgd, &colArray[i][j].bgd); #else colArray[i][j].fgd = COL_Lite_Black; colArray[i][j].bgd = COL_Lite_White; @@ -1426,16 +1426,16 @@ void getDataColour(int screenType, int colType, U32 *fgd, U32 *bgd) { - + TRACE_EVENT("getDataColour"); - + if ((screenType == COLOUR_LIST_COLOUR) && (colType ==COL_TYPE_HL)) { /* x0083025 on Sep 14, 2007 for OMAPS00145860 (adrian) */ - MMI_TRACE_EVENT("new_getDataColour IF"); + MMI_TRACE_EVENT("new_getDataColour IF"); - *fgd = dspl_GetBgdColour(); - *bgd = dspl_GetFgdColour(); + *fgd = dspl_GetBgdColour(); + *bgd = dspl_GetFgdColour(); } else if ((screenType < LAST_COLOUR_DEF) && (screenType >=0) && @@ -1447,14 +1447,14 @@ *fgd = colArray[screenType][colType].fgd; *bgd = colArray[screenType][colType].bgd; /***************************Go-lite Optimization changes Start***********************/ - //Aug 25, 2004 REF: CRR 24297 Deepa M.D - //Set the fgd and bgd color for Go-lite version based + //Aug 25, 2004 REF: CRR 24297 Deepa M.D + //Set the fgd and bgd color for Go-lite version based //on the value stored in the colArray //March 01, 2005 REF: ENH 29313 Deepa M.D // Isolating colour build related changes from MMI LITE flag. - // The proper Feature flag COLORDISPLAY was used for all color + // The proper Feature flag COLORDISPLAY was used for all color //related changes. -#ifndef COLOURDISPLAY +#ifndef COLOURDISPLAY if(*fgd==COL_Lite_Black) *fgd=COL_Black; else @@ -1463,7 +1463,7 @@ *bgd=COL_Black; else *bgd=COL_White; -#endif +#endif /***************************Go-lite Optimization changes end***********************/ } else @@ -1471,16 +1471,16 @@ /* x0083025 on Sep 14, 2007 for OMAPS00145860 (adrian) */ MMI_TRACE_EVENT("new_getDataColour ELSE"); *fgd = colArray[0][0].fgd; - *bgd = colArray[0][0].bgd; - /***************************Go-lite Optimization changes Start***********************/ - //Aug 25, 2004 REF: CRR 24297 Deepa M.D + *bgd = colArray[0][0].bgd; + /***************************Go-lite Optimization changes Start***********************/ + //Aug 25, 2004 REF: CRR 24297 Deepa M.D //Set the fgd and bgd color for Go-lite version based //on the value stored in the colArray //March 01, 2005 REF: ENH 29313 Deepa M.D // Isolating colour build related changes from MMI LITE flag. - // The proper Feature flag COLORDISPLAY was used for all color + // The proper Feature flag COLORDISPLAY was used for all color //related changes. -#ifndef COLOURDISPLAY +#ifndef COLOURDISPLAY if(*fgd==COL_Lite_Black) *fgd=COL_Black; else @@ -1499,14 +1499,14 @@ /******************************************************************************* - $Function: + $Function: + + $Description: - $Description: - - $Returns: + $Returns: - $Arguments: - + $Arguments: + $History *******************************************************************************/ @@ -1527,14 +1527,14 @@ } /******************************************************************************* - $Function: + $Function: + + $Description: - $Description: - - $Returns: + $Returns: - $Arguments: - + $Arguments: + $History *******************************************************************************/ @@ -1547,14 +1547,14 @@ } /******************************************************************************* - $Function: + $Function: + + $Description: - $Description: - - $Returns: + $Returns: - $Arguments: - + $Arguments: + $History *******************************************************************************/ @@ -1569,17 +1569,17 @@ bgdColour = dspl_GetFgdColour(); //If one colour is black/white, make other colour the opposite if (fgdColour == COL_Black) - bgdColour = COL_White; + bgdColour = COL_White; else if (bgdColour == COL_Black) - fgdColour = COL_White; + fgdColour = COL_White; else if (fgdColour == COL_White) - bgdColour = COL_Black; + bgdColour = COL_Black; else if (bgdColour == COL_White) fgdColour = COL_Black; else { //Default : assume the rest of the display is black on white=> highlight is white on black. fgdColour = COL_White; - bgdColour = COL_Black; + bgdColour = COL_Black; } #endif @@ -1588,14 +1588,14 @@ } /******************************************************************************* - $Function: + $Function: + + $Description: - $Description: - - $Returns: + $Returns: - $Arguments: - + $Arguments: + $History *******************************************************************************/ @@ -1608,14 +1608,14 @@ } /******************************************************************************* - $Function: + $Function: + + $Description: - $Description: - - $Returns: + $Returns: - $Arguments: - + $Arguments: + $History *******************************************************************************/ @@ -1626,16 +1626,16 @@ } /******************************************************************************* - $Function: + $Function: + + $Description: - $Description: - - $Returns: + $Returns: - $Arguments: - + $Arguments: + $History - GW 28/11/02 - + GW 28/11/02 - *******************************************************************************/ void resources_restoreMnuColour(void) @@ -1647,16 +1647,16 @@ /******************************************************************************* - $Function: + $Function: + + $Description: - $Description: - - $Returns: + $Returns: - $Arguments: - + $Arguments: + $History - GW 28/11/02 - + GW 28/11/02 - *******************************************************************************/ void getDisplayData(int txtId,int *colDisplayType, int *colType, int *colFgdSelect) @@ -1667,95 +1667,95 @@ switch (txtId) { -default: - *colFgdSelect = NO_COL; +default: + *colFgdSelect = NO_COL; break; -case TxtIdleScreenBackground: +case TxtIdleScreenBackground: *colDisplayType = COLOUR_IDLE; *colType = COL_TYPE_SCREEN; *colFgdSelect = BGD_COL; - break; + break; case TxtIdleScreenSoftKey: *colDisplayType = COLOUR_IDLE; *colType = COL_TYPE_SK; *colFgdSelect = FGD_COL; - break; + break; case TxtIdleScreenText: *colDisplayType = COLOUR_IDLE; *colType = COL_TYPE_SCREEN; *colFgdSelect = FGD_COL; - break; -case TxtIdleScreenNetworkName: + break; +case TxtIdleScreenNetworkName: *colDisplayType = COLOUR_IDLE; *colType = COL_TYPE_SCREEN; *colFgdSelect = FGD_COL; - break; -case TxtGeneralBackground: + break; +case TxtGeneralBackground: *colDisplayType = COLOUR_LIST_MAIN; *colType = COL_TYPE_SCREEN; *colFgdSelect = BGD_COL; - break; -case TxtMenuSoftKeyForeground: + break; +case TxtMenuSoftKeyForeground: *colDisplayType = COLOUR_LIST_MAIN; *colType = COL_TYPE_SK; *colFgdSelect = FGD_COL; - break; -case TxtMenuSoftKeyBackground: + break; +case TxtMenuSoftKeyBackground: *colDisplayType = COLOUR_LIST_MAIN; *colType = COL_TYPE_SK; *colFgdSelect = BGD_COL; - break; -case TxtSubMenuHeadingText: + break; +case TxtSubMenuHeadingText: *colDisplayType = COLOUR_LIST_SUBMENU; *colType = COL_TYPE_TITLE; *colFgdSelect = FGD_COL; - break; + break; -case TxtSubMenuHeadingBackground: +case TxtSubMenuHeadingBackground: *colDisplayType = COLOUR_LIST_SUBMENU; *colType = COL_TYPE_TITLE; *colFgdSelect = BGD_COL; - break; -case TxtSubMenuTextForeground: + break; +case TxtSubMenuTextForeground: *colDisplayType = COLOUR_LIST_SUBMENU; *colType = COL_TYPE_SCREEN; *colFgdSelect = FGD_COL; - break; + break; -case TxtSubMenuTextBackground: +case TxtSubMenuTextBackground: *colDisplayType = COLOUR_LIST_SUBMENU; *colType = COL_TYPE_SCREEN; *colFgdSelect = BGD_COL; - break; -case TxtSubMenuSelectionBar: + break; +case TxtSubMenuSelectionBar: *colDisplayType = COLOUR_LIST_SUBMENU; *colType = COL_TYPE_HL; *colFgdSelect = BGD_COL; - break; + break; case TxtPopUpTextForeground: /* GW#2294 COLOUR_STATUS has been used for all popups - change this colour instead of COLOUR_POPUP .*/ *colDisplayType = COLOUR_STATUS; *colType = COL_TYPE_SCREEN; *colFgdSelect = FGD_COL; - break; + break; case TxtPopUpTextBackground: /* GW#2294 COLOUR_STATUS has been used for all popups - change this colour instead of COLOUR_POPUP .*/ *colDisplayType = COLOUR_STATUS; *colType = COL_TYPE_SCREEN; *colFgdSelect = BGD_COL; - break; + break; } /**/ } /******************************************************************************* - $Function: + $Function: + + $Description: - $Description: - - $Returns: + $Returns: - $Arguments: - + $Arguments: + $History *******************************************************************************/ @@ -1788,16 +1788,16 @@ /******************************************************************************* - $Function: + $Function: + + $Description: - $Description: - - $Returns: + $Returns: - $Arguments: - + $Arguments: + $History - GW 28/11/02 - + GW 28/11/02 - *******************************************************************************/ void resources_setColourMnuItem( int txtId) @@ -1831,23 +1831,23 @@ { dspl_SetFgdColour( COL_Black ); dspl_SetBgdColour( COL_Magenta ); - + } - } + } } /******************************************************************************* - $Function: + $Function: + + $Description: - $Description: - - $Returns: + $Returns: - $Arguments: - + $Arguments: + $History *******************************************************************************/ @@ -1871,7 +1871,7 @@ $Returns: length of string $Arguments: string, maximum possibel length, whether unicode or not - + *******************************************************************************/ int string_len_in_bytes(char* string, int max_len, int unicode) { int i; @@ -1905,24 +1905,24 @@ /******************************************************************************* $Function: resources_truncate_to_screen_width - $Description: Copies and truncates the input string to the passed screen width + $Description: Copies and truncates the input string to the passed screen width and puts it into the output string. Note: this function only works for Unicode strings which have a unicode - tag at the beginning, or if the unicode parameter is set to TRUE. - If the input length is zero, then this function calculates + tag at the beginning, or if the unicode parameter is set to TRUE. + If the input length is zero, then this function calculates the actual length of the input string. $Returns: length of truncated string - $Arguments: input sctring and it's length, ouput string and it's length, + $Arguments: input sctring and it's length, ouput string and it's length, screen width desired (pixels), unicode flag (TRUE/FALSE) - + *******************************************************************************/ -//GW #1541 16/01/03 - Modified code to first test if string will fit and return string if it does. +//GW #1541 16/01/03 - Modified code to first test if string will fit and return string if it does. int resources_truncate_to_screen_width(char* IpStr, int IpLen, char* OpStr, int OpLen, int ScreenWidth, BOOL unicode) -{ +{ int start_position = 0; #ifdef LSCREEN char* ellipse_str = "..."; @@ -1935,7 +1935,7 @@ int calc_input_len = 0; int no_of_chars = 0; int len; - + memset(OpStr, 0, OpLen); /*if input string length 0, we calculate the string len ourselves*/ @@ -1945,14 +1945,14 @@ else { calc_input_len = IpLen; } /*Test for string alrady fitting */ - + if (dspl_GetTextExtent(IpStr, 0) < ScreenWidth) { for (i=0; i<OpLen && i<calc_input_len; ) { //if length of string less that width of screen //if unicode copy two chars if (IpStr[0] == (char)0x80 || unicode == TRUE)/*a0393213 lint warnings removal-typecasting done*/ - { + { OpStr[i] = IpStr[i]; OpStr[i+1] = IpStr[i+1]; i+=2; @@ -1962,9 +1962,9 @@ i++; } } - return string_len_in_bytes(OpStr, OpLen, unicode); + return string_len_in_bytes(OpStr, OpLen, unicode); } - /*SPR 1541, use function dspl_GetNcharToFit rather than loop to work + /*SPR 1541, use function dspl_GetNcharToFit rather than loop to work out how many chars will fit in line*/ no_of_chars = dspl_GetNcharToFit (IpStr, ScreenWidth - ellipsis_len); /*copy characters*/ @@ -1972,14 +1972,14 @@ memcpy(OpStr, IpStr, no_of_chars); else memcpy(OpStr, IpStr, OpLen); - + /*SPR 1541, end*/ TRACE_EVENT_P1("trunc string len:%d", dspl_GetTextExtent(OpStr, 0)); /*we need to add the ellipsis if we've truncated the string*/ if(string_len_in_bytes(OpStr, OpLen, unicode) < calc_input_len) { /*if unicode*/ if (OpStr[0] == (char)0x80|| unicode == TRUE) /*a0393213 lint warnings removal - typecasting done*/ - { + { if (string_len_in_bytes(OpStr, OpLen, TRUE) < (OpLen -2*TRUNC_LENGTH+2)) { start_position = string_len_in_bytes(OpStr, OpLen, unicode); } @@ -1995,7 +1995,7 @@ OpStr[start_position+ 2*TRUNC_LENGTH+1] = NULL; } else /*if ASCII*/ - { len = strlen(OpStr); + { len = strlen(OpStr); if (len < (OpLen -(TRUNC_LENGTH+1))) { start_position = string_len_in_bytes(OpStr, OpLen, FALSE); } @@ -2007,28 +2007,28 @@ } TRACE_EVENT_P1("trunc string len post ellipsis:%d", dspl_GetTextExtent(OpStr, 0)); - + return string_len_in_bytes(OpStr, OpLen, unicode); } /******************************************************************************* - $Function: + $Function: + + $Description: - $Description: - - $Returns: + $Returns: - $Arguments: - + $Arguments: + $History - GW 28/11/02 - + GW 28/11/02 - *******************************************************************************/ /***************************Go-lite Optimization changes Start***********************/ //Aug 25, 2004 REF: CRR 24904 Deepa M.D -//This function is used only for the Color build.Hence it is put under the +//This function is used only for the Color build.Hence it is put under the //COLOURDISPLAY compiler switch #ifdef COLOURDISPLAY int colMenuSelected(MfwMnu* mnu, MfwMnuItem* mnuItem) @@ -2048,18 +2048,18 @@ mnuColour=resources_getColourFromText(mnuId); getDisplayData(storedMenuId, &colDisplayType, &colType,&colFgdSelect); - + setDataColour(colDisplayType, colType, colFgdSelect,mnuColour); info_screen(win, TxtColour, TxtSelected, 0); // API/GW - Saved the selected colour so the flash file structure after selected flash_data_write(colourFileDir, colourFileName, colArray, sizeof(colArray)); - + return(0); } -#endif +#endif /***************************Go-lite Optimization changes Start***********************/ @@ -2068,16 +2068,16 @@ $Description: Changes the value of the SAT main menu entry title. - $Returns: + $Returns: $Arguments: New SAT Title. - + *******************************************************************************/ void res_set_SIMToolkit_title_string(char* SAT_string) { - SIMToolKitString = SAT_string; + SIMToolKitString = SAT_string; } /*API - 27/07/03 - CQ10203 - New function to reset the SMS VP in flash on factory reset*/ @@ -2085,19 +2085,19 @@ $Function: resetSMSValidityPeriod $Description: Resets the value of the SMS VP in flash - - $Returns: + + $Returns: $Arguments: None - + *******************************************************************************/ void resetSMSValidityPeriod() { /* x0045876, 14-Aug-2006 (WR - "sms_settings" was set but never used) */ #ifndef NEPTUNE_BOARD - T_MFW_SMS_INFO sms_settings; + T_MFW_SMS_INFO sms_settings; #endif - + TRACE_EVENT("resetSMSValidityPeriod()"); if ( FFS_flashData.vp_rel != VP_REL_24_HOURS) @@ -2119,8 +2119,8 @@ } /*API - CQ10203 - END*/ /******************************************************************************* - + End of File - + *******************************************************************************/