diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-3B441CDC-AB7A-4D8D-A595-57C21E1D426C.dita --- a/Symbian3/PDK/Source/GUID-3B441CDC-AB7A-4D8D-A595-57C21E1D426C.dita Tue Mar 30 11:42:04 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-3B441CDC-AB7A-4D8D-A595-57C21E1D426C.dita Tue Mar 30 11:56:28 2010 +0100 @@ -1,48 +1,48 @@ - - - - - -Foreground -events -

The application framework calls CCoeAppUI::HandleForegroundEventL() when the application -is switched to the foreground or background.

-

While the default implementation of this method is empty, it can be, -for example, used to display messages or pause a game when a focus change -event occurs.

-

An example of such a foreground event implementation is as follows:

-// ------------------------------------------------------------------------------ -// CMyViewAppUi::HandleForegroundEventL(TBool aForeground) -// This function is called by the framework when the screen loses or gains focus. -// i.e. when it goes to the background or to the foreground. Incoming call -// softnote is an example. -// This event applies to the entire application, all views. -// ------------------------------------------------------------------------------ -// -void CMyViewAppUi::HandleForegroundEventL(TBool aForeground) - { - if( aForeground == TRUE ) - { - iEikonEnv->InfoMsg( _L( "Foreground true" ) ); - } - else - { - iEikonEnv->InfoMsg( _L( "Foreground false" ) ); - } - } - -

The aForeground parameter is true if the application -is switched to the foreground (is visible) and false if the application has -gone to the background

- -

The above code snippet uses the MyView example application provided -in the S60 Platform: Platform Application Views package available from Forum -Nokia .

-
+ + + + + +Foreground +events +

The application framework calls CCoeAppUI::HandleForegroundEventL() when +the application is switched to the foreground or background.

+

While the default implementation of this method is empty, it can be, +for example, used to display messages or pause a game when a focus change +event occurs.

+

An example of such a foreground event implementation is as follows:

+// ------------------------------------------------------------------------------ +// CMyViewAppUi::HandleForegroundEventL(TBool aForeground) +// This function is called by the framework when the screen loses or gains focus. +// i.e. when it goes to the background or to the foreground. Incoming call +// softnote is an example. +// This event applies to the entire application, all views. +// ------------------------------------------------------------------------------ +// +void CMyViewAppUi::HandleForegroundEventL(TBool aForeground) + { + if( aForeground == TRUE ) + { + iEikonEnv->InfoMsg( _L( "Foreground true" ) ); + } + else + { + iEikonEnv->InfoMsg( _L( "Foreground false" ) ); + } + } + +

The aForeground parameter is true if the application +is switched to the foreground (is visible) and false if the application has +gone to the background.

+ +

The above code snippet uses the MyView example application provided +in the Platform Application Views package available from Forum +Nokia .

+
\ No newline at end of file