equal
deleted
inserted
replaced
9 --> |
9 --> |
10 <!DOCTYPE concept |
10 <!DOCTYPE concept |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept id="GUID-3B441CDC-AB7A-4D8D-A595-57C21E1D426C" xml:lang="en"><title>Foreground |
12 <concept id="GUID-3B441CDC-AB7A-4D8D-A595-57C21E1D426C" xml:lang="en"><title>Foreground |
13 events</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
13 events</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
14 <p>The application framework calls <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Control_Environment/CCoeAppUiClass.html#%3a%3aCCoeAppUi%3a%3aHandleForegroundEventL%28TBool%29" format="application/java-archive"><parmname>CCoeAppUI::HandleForegroundEventL()</parmname></xref> when the application |
14 <p>The application framework calls <xref href="GUID-92361912-7768-3D2C-835E-BD3EF1366D6D.dita#GUID-92361912-7768-3D2C-835E-BD3EF1366D6D/GUID-71F5C50E-2595-3B8E-850A-6DB0CFBB091D"><apiname>CCoeAppUI::HandleForegroundEventL()</apiname></xref> when |
15 is switched to the foreground or background.</p> |
15 the application is switched to the foreground or background.</p> |
16 <p>While the default implementation of this method is empty, it can be, |
16 <p>While the default implementation of this method is empty, it can be, |
17 for example, used to display messages or pause a game when a focus change |
17 for example, used to display messages or pause a game when a focus change |
18 event occurs.</p> |
18 event occurs.</p> |
19 <p>An example of such a foreground event implementation is as follows:</p> |
19 <p>An example of such a foreground event implementation is as follows:</p> |
20 <codeblock id="GUID-ECF10193-AB06-4267-A47F-D5EC2C561D9C" xml:space="preserve">// ------------------------------------------------------------------------------ |
20 <codeblock id="GUID-ECF10193-AB06-4267-A47F-D5EC2C561D9C" xml:space="preserve">// ------------------------------------------------------------------------------ |
28 void CMyViewAppUi::HandleForegroundEventL(TBool aForeground) |
28 void CMyViewAppUi::HandleForegroundEventL(TBool aForeground) |
29 { |
29 { |
30 if( aForeground == TRUE ) |
30 if( aForeground == TRUE ) |
31 { |
31 { |
32 iEikonEnv->InfoMsg( _L( "Foreground true" ) ); |
32 iEikonEnv->InfoMsg( _L( "Foreground true" ) ); |
33 } |
33 } |
34 else |
34 else |
35 { |
35 { |
36 iEikonEnv->InfoMsg( _L( "Foreground false" ) ); |
36 iEikonEnv->InfoMsg( _L( "Foreground false" ) ); |
37 } |
37 } |
38 } |
38 } |
39 </codeblock> |
39 </codeblock> |
40 <p>The <parmname>aForeground</parmname> parameter is true if the application |
40 <p>The <parmname>aForeground</parmname> parameter is true if the application |
41 is switched to the foreground (is visible) and false if the application has |
41 is switched to the foreground (is visible) and false if the application has |
42 gone to the background</p> |
42 gone to the background.</p> |
43 <note> |
43 <note> |
44 <p>The above code snippet uses the <i>MyView</i> example application provided |
44 <p>The above code snippet uses the <i>MyView</i> example application provided |
45 in the <i>S60 Platform: Platform Application Views</i> package available from <xref href="http://www.forum.nokia.com/info/sw.nokia.com/id/9c5f21fd-2162-42da-aaf6-17a59b943475/S60_Platform_Application_Views_v2_0_en.zip.html" scope="external">Forum |
45 in the <i> Platform Application Views</i> package available from <xref href="http://www.forum.nokia.com/info/sw.nokia.com/id/226649f9-4118-4c8a-92e6-6d72fb251ae1/S60_Platform_Application_Views_v2_1_en.zip.html" scope="external">Forum |
46 Nokia</xref> . </p> |
46 Nokia</xref> . </p> |
47 </note> |
47 </note> |
48 </conbody></concept> |
48 </conbody></concept> |