FreeCalypso > hg > fc-tourmaline
diff src/ui/bmi/mmiBookMenuWindow.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 | ec9f955fc487 |
line wrap: on
line diff
--- a/src/ui/bmi/mmiBookMenuWindow.c Sun Nov 08 05:12:05 2020 +0000 +++ b/src/ui/bmi/mmiBookMenuWindow.c Sun Nov 08 06:39:16 2020 +0000 @@ -2,55 +2,55 @@ 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: PhoneBook $File: MmiBookMenuWindow.c - $Revision: 1.0 - - $Author: Condat(UK) - $Date: 25/10/00 - + $Revision: 1.0 + + $Author: Condat(UK) + $Date: 25/10/00 + ******************************************************************************** - + Description: Menu handling for the phone book - + ******************************************************************************** $History: MmiBookMenuWindow.c - Mar 30, 2007 OMAPS00123019 a0393213(R.Prabakar) + Mar 30, 2007 OMAPS00123019 a0393213(R.Prabakar) Description : Reboot of the target when you unplug/plug USB cable using camera application - + xrashmic 28 Jun 2006, OMAPS00084172 On pressing back from options menu in camera, the midi stopped playing. Hence added stopRingerVolSettingInactivityTimer under the if(getSoundsReason() == SettingVolume) - + Sep 01, 2005 REF: CRR 32707 x0021334 Description: Select Softkey dosen't work for the second time on choosing Volume option in Ringer menu - Fix: Select soft key operation in volume menu has been modified to fix this problem. - + Fix: Select soft key operation in volume menu has been modified to fix this problem. + Apr 05, 2005 REF: ENH 29994 xdeepadh Description: Implementation of Generic Midi Ringer and Modification of existing Midi Test Application Solution: Generic Midi Ringer and Midi Test Application were implemented. - - 25/10/00 Original Condat(UK) BMI version. - + + 25/10/00 Original Condat(UK) BMI version. + $End *******************************************************************************/ /******************************************************************************* - + Include Files - + *******************************************************************************/ #define ENTITY_MFW @@ -137,9 +137,9 @@ extern UBYTE HUPKeyOrigin; // Variable to indicate that long end key press is coming from menu -/******************************************************************************* +/******************************************************************************* External Function Prototype - + *******************************************************************************/ /* Fix for the melody and volume settings. 3/4/01 MZ */ extern BOOL getScrollSelectMenuItem(void); @@ -155,9 +155,9 @@ #endif /******************************************************************************* - + Private Methods - + *******************************************************************************/ @@ -167,12 +167,12 @@ $Function: bookMenuMenuCB $Description: Menu handler for the menu window - + $Returns: MFW_EVENT_CONSUMED if event handled, otherwise MFW_EVENT_PASSED $Arguments: e, event, m, menu handle - + *******************************************************************************/ static int bookMenuMenuCB( MfwEvt e, MfwMnu *m ) @@ -226,14 +226,14 @@ $Function: bookMenuDialog $Description: Menu window dialog function - + $Returns: none $Arguments: win, window handle event, event to be handled value, not used parameter, not used - + *******************************************************************************/ void bookMenuDialog( T_MFW_HND win, USHORT event, SHORT value, void *parameter ) @@ -241,7 +241,7 @@ T_MFW_WIN *win_data = ((T_MFW_HDR *)win)->data; tBookStandard *data = (tBookStandard *) win_data->user; /* MfwMnu *mnu; */ /* RAVI */ - + TRACE_FUNCTION( "bookMenuDialog()" ); /* The menu dialog function has to deal with initialisation @@ -276,13 +276,13 @@ 4 second time out. */ /* RAVI - 20-1-2006 */ -#ifdef NEPTUNE_BOARD +#ifdef NEPTUNE_BOARD setSoundsReason(SettingVolume); #endif /* END RAVI */ startRingerVolSettingInactivityTimer(); } - + } break; @@ -297,17 +297,17 @@ case DEFAULT_OPTION: { /* Highlight an option in the menu when it is opened. Parameter points to a UBYTE. */ - + mnuChooseVisibleItem(data->menu, *((UBYTE *)parameter)); } break; - + case PIN2_OK: { /* We have received a PIN2 authorisation, so we can execute the the requested function */ - + TRACE_EVENT("PIN2_OK: Should carry on to perform phonebook op"); (data->phbk->pin2_next)( data->phbk->menu, data->phbk->item); @@ -338,11 +338,11 @@ $Function: bookMenuTimCB $Description: Menu tim handler - - $Returns: - - $Arguments: - + + $Returns: + + $Arguments: + *******************************************************************************/ static int bookMenuTimCB (T_MFW_EVENT event, T_MFW_TIM *tc) @@ -369,12 +369,12 @@ $Function: bookMenuWindowCB $Description: Menu window handler - + $Returns: MFW_EVENT_CONSUMED if event handled, otherwise MFW_EVENT_PASSED $Arguments: e, event, m, window handle - + *******************************************************************************/ static int bookMenuWindowCB( MfwEvt e, MfwWin *w ) @@ -403,7 +403,7 @@ softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour); else softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, COLOUR_LIST_SUBMENU); - + } else softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, COLOUR_LIST_SUBMENU); @@ -435,11 +435,11 @@ $Function: bookMenuKbdCB $Description: tbd - + $Returns: MFW_EVENT_CONSUMED always $Arguments: e, event, k, key handle - + *******************************************************************************/ static int bookMenuKbdCB( MfwEvt e, MfwKbd *k ) @@ -460,28 +460,28 @@ case KCD_MNUUP: { // keypadLock will not activate anymore - data->status_of_timer = TRUE; + data->status_of_timer = TRUE; /* Update the window with the previous element */ mnuUp( data->menu ); /* - Special case when setting up ringer volume, the current ringer + Special case when setting up ringer volume, the current ringer is played as user scrolls the volume settings Silent -> cresendo. MZ. */ /* RAVI - 20-1-2006 */ -#ifdef NEPTUNE_BOARD +#ifdef NEPTUNE_BOARD if (getSoundsReason () == SettingVolume) { volumeMenuScrollUp(); } -#endif +#endif /* END RAVI */ - + if(getScrollSelectMenuItem() == TRUE ||(getSoundsReason() == SettingVolume) ) { mnuSelect(data->menu); - /* Scroll up in volume setting */ + /* Scroll up in volume setting */ restartVolSettingInactivityTimer(); } } @@ -490,13 +490,13 @@ case KCD_MNUDOWN: { // keypadLock will not activate anymore - data->status_of_timer = TRUE; + data->status_of_timer = TRUE; /* Update the window with the next element */ mnuDown( data->menu ); /* - Special case when setting up ringer volume, the current ringer + Special case when setting up ringer volume, the current ringer is played as user scrolls the volume settings Silent -> cresendo. MZ. */ @@ -504,15 +504,15 @@ #ifdef NEPTUNE_BOARD if (getSoundsReason () == SettingVolume) { - volumeMenuScrollDown(); + volumeMenuScrollDown(); } -#endif - /* END RAVI */ +#endif + /* END RAVI */ if((getScrollSelectMenuItem() == TRUE) || (getSoundsReason() == SettingVolume)) { mnuSelect(data->menu); - restartVolSettingInactivityTimer(); + restartVolSettingInactivityTimer(); } } @@ -522,7 +522,7 @@ case KCD_LEFT: { // keypadLock will not activate anymore - data->status_of_timer = TRUE; + data->status_of_timer = TRUE; // Select this element mnuSelect( data->menu ); @@ -538,7 +538,7 @@ data->menu==((tBookStandard*)(((MfwWin*)(((T_MFW_HDR *)usb_opt_win)->data))->user))->menu) { bookMenuDestroy(usb_opt_win); - usb_opt_win=NULL; + usb_opt_win=NULL; break; } #endif @@ -553,13 +553,13 @@ softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour); } } - + // A volume or tone setting menu has been entered. MZ 2/4/01 if((getScrollSelectMenuItem() == TRUE) || (getSoundsReason() == SettingVolume)) { TRACE_FUNCTION("@@@@ A volume or tone settin"); - /* + /* First time pcm flag is false, subsequent selection of menu item will select and terminate the volume settings menu. 3/4/01 MZ. */ @@ -572,9 +572,9 @@ if(getSoundsReason() == SettingVolume) { setSoundsReason(SoundsNone); - stopRingerVolSettingInactivityTimer(); + stopRingerVolSettingInactivityTimer(); } -//Apr 05, 2005 REF: ENH 29994 xdeepadh +//Apr 05, 2005 REF: ENH 29994 xdeepadh #ifdef FF_MIDI_RINGER //Delete the timer for volume scrolling if(hPlayerStartTimer!=NULL) @@ -583,32 +583,32 @@ break; } /* - Second time the left soft key is used, store the setting in pcm and terminate the + Second time the left soft key is used, store the setting in pcm and terminate the volume settings menu. */ storeSelectedItemToPcm =TRUE; - + } } break; // POWER key takes us to idle screen. case KCD_POWER: - data->status_of_timer = TRUE; - + data->status_of_timer = TRUE; + HUPKeyOrigin = 0; // sbh - we're coming from the menu screen, so don't shut down right away //return to idle screen - + if (data->Callback) (data->Callback) (data->parent_win, NULL, NULL); - + bookMenuDestroy(data->win); stopRingerVolSettingInactivityTimer(); - + SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, 0); break; - + case KCD_RIGHT: case KCD_HUP: { @@ -621,7 +621,7 @@ storeSelectedItemToPcm = FALSE; HUPKeyOrigin = 0; // sbh - we're coming from the menu screen, so don't shut down right away - + /* get us out of here */ mnuEscape( data->menu ); @@ -631,11 +631,11 @@ if (mnu->curAttr != NULL) { // API - 24-01-03 - 1606 - Soft Key updating add this win Focus check - if( winIsFocussed(window) ) + if( winIsFocussed(window) ) softKeys_displayId( TxtSoftSelect, TxtSoftBack, 0, mnu->curAttr->mnuColour); } } - + // Return the menu scroll behavior to normal. if(getScrollSelectMenuItem() == TRUE) { @@ -644,48 +644,48 @@ /* If user exits the volume settings menu from the Idle or Incoming call screen. clear the soundsReason. - */ + */ if(getSoundsReason() == SettingVolume) { /* RAVI - 20-1-2006 */ -#ifdef NEPTUNE_BOARD +#ifdef NEPTUNE_BOARD /* Restore the volume setting */ restorePreviousVolumeSetting (); #endif /* END RAVI */ - stopRingerVolSettingInactivityTimer(); + stopRingerVolSettingInactivityTimer(); setSoundsReason(SoundsNone); -//Apr 05, 2005 REF: ENH 29994 xdeepadh +//Apr 05, 2005 REF: ENH 29994 xdeepadh #ifdef FF_MIDI_RINGER //Delete teh timer for volume scrolling if(hPlayerStartTimer!=NULL) timDelete(hPlayerStartTimer); #endif } - + } break; - + case KCD_STAR: - { - + { + /* - * Keypadlock will lock only + * Keypadlock will lock only * within two seconds by press "*" - */ - + */ + if(data->status_of_timer EQ FALSE) { TRACE_EVENT ("activate KEYpadLOCK"); mnuEscape( data->menu ); settingsKeyPadLockOn (); } - + /* SPR#1608 - SH - Otherwise, send '*' keypress to idle screen */ - + else if (window == data->phbk->menu_main_win) - { - /* Number key presses in phonebook menu returns user to idle screen, + { + /* Number key presses in phonebook menu returns user to idle screen, add key press to Idle edit screen. */ keycode = k->code; @@ -698,11 +698,11 @@ break; case KCD_HASH: - { + { /* - * Keypadlock will lock only + * Keypadlock will lock only * within two seconds by press "*" - */ + */ if(data->status_of_timer EQ FALSE) { TRACE_EVENT ("activate Silent mode"); @@ -719,10 +719,10 @@ } /* SPR#1608 - SH - Otherwise, send '#' keypress to idle screen */ - + else if (window == data->phbk->menu_main_win) - { - /* Number key presses in phonebook menu returns user to idle screen, + { + /* Number key presses in phonebook menu returns user to idle screen, add key press to Idle edit screen. */ keycode = k->code; @@ -733,7 +733,7 @@ } } break; - + default: { TRACE_EVENT("bookMenuKbdCb - DEFAULT!"); @@ -741,9 +741,9 @@ if (window == data->phbk->menu_main_win) { /* keypadLock will not activate anymore */ - data->status_of_timer = TRUE; + data->status_of_timer = TRUE; - /* Number key presses in phonebook menu returns user to idle screen, + /* Number key presses in phonebook menu returns user to idle screen, add key press to Idle edit screen. */ keycode = k->code; @@ -756,7 +756,7 @@ { TRACE_EVENT("Idle Editor Start!"); SEND_EVENT(idle_get_window(), IDLE_START_DIALLING_NUMBER, 0, &keycode); - } + } } } break; @@ -778,11 +778,11 @@ $Function: bookMenuKbdLongCB $Description: keyboard long press event handler - + $Returns: MFW_EVENT_CONSUMED always $Arguments: e, event, k, key handle - + *******************************************************************************/ static int bookMenuKbdLongCB( MfwEvt e, MfwKbd *k ) @@ -798,30 +798,30 @@ return MFW_EVENT_CONSUMED; } /*if long press on END key*/ - if ( ( e & KEY_HUP) && ( e & KEY_LONG ) ) + if ( ( e & KEY_HUP) && ( e & KEY_LONG ) ) { U8 keycode; - U8 uMode; + U8 uMode; uMode = dspl_Enable(0); // keypadLock will not activate anymore - data->status_of_timer = TRUE; + data->status_of_timer = TRUE; //return to idle screen keycode = k->code; - + if (data->Callback) (data->Callback) (data->parent_win, NULL, NULL); - + bookMenuDestroy(data->win); stopRingerVolSettingInactivityTimer(); - + SEND_EVENT(idle_get_window(), IDLE_UPDATE, 0, &keycode); - + dspl_Enable(uMode); } - + return MFW_EVENT_CONSUMED; } @@ -835,11 +835,11 @@ $Function: bookMenuCreate $Description: Create the menu window - + $Returns: handle of newly created window, or NULL if error $Arguments: parent, handle of the parent window - + *******************************************************************************/ static T_MFW_HND bookMenuCreate( MfwHnd parent ) @@ -881,7 +881,7 @@ data->menu_tim = tim_create (data->win, THREE_SECS, (MfwCb) bookMenuTimCB); data->Callback = NULL; // Use standard menu callback (changed by sending event ADD_CALLBACK) - + /* And return the handle of the newly created window */ return data->win; @@ -892,9 +892,9 @@ /******************************************************************************* - + Public Methods - + *******************************************************************************/ /******************************************************************************* @@ -902,11 +902,11 @@ $Function: bookMenuStart $Description: tbd - + $Returns: tbd $Arguments: tbd - + *******************************************************************************/ T_MFW_HND bookMenuStart( MfwHnd parent, MfwMnuAttr *menuAttr,SHORT reason ) @@ -926,12 +926,12 @@ $Function: bookMenuDestroy - $Description: Destroy the menu window - + $Description: Destroy the menu window + $Returns: none $Arguments: window, handle of the window being destroyed - + *******************************************************************************/ void bookMenuDestroy( MfwHnd window ) @@ -990,7 +990,7 @@ /******************************************************************************* - + End of File - + *******************************************************************************/