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-3729C075-4958-4874-9DD7-02A68D17E043" xml:lang="en"><title>Other |
12 <concept id="GUID-3729C075-4958-4874-9DD7-02A68D17E043" xml:lang="en"><title>Other |
13 window server events</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
13 window server events</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
14 <p> When an event occurs under the window server, the framework calls the <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Control_Environment/CCoeAppUiClass.html#%3a%3aCCoeAppUi%3a%3aHandleWsEventL%28const%20TWsEvent%20%26amp%3b%2cCCoeControl%20%2a%29" format="application/java-archive"><parmname>HandleWsEventL()</parmname></xref> function of the UI controller |
14 <p> When an event occurs under the window server, the framework calls the <xref href="GUID-3AC2CDAC-0291-309F-A020-049BC9F2CF90.dita#GUID-3AC2CDAC-0291-309F-A020-049BC9F2CF90/GUID-1ADF5125-A91A-3C5D-8422-50A84D7D6493"><apiname>CCoeAppUi::HandleWsEventL()</apiname></xref> function |
15 object. To implement an event-handling code for a certain event, <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Control_Environment/CCoeAppUiClass.html#%3a%3aCCoeAppUi%3a%3aHandleWsEventL%28const%20TWsEvent%20%26amp%3b%2cCCoeControl%20%2a%29" format="application/java-archive"><parmname>HandleWsEventL()</parmname></xref> must be overridden. In |
15 of the UI controller object. To implement an event-handling code for a certain |
16 order to ensure that the system works correctly, after catching an event in |
16 event, <xref href="GUID-3AC2CDAC-0291-309F-A020-049BC9F2CF90.dita#GUID-3AC2CDAC-0291-309F-A020-049BC9F2CF90/GUID-1ADF5125-A91A-3C5D-8422-50A84D7D6493"><apiname>CCoeAppUi::HandleWsEventL()</apiname></xref> must be overridden. |
17 the overridden <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Control_Environment/CCoeAppUiClass.html#%3a%3aCCoeAppUi%3a%3aHandleWsEventL%28const%20TWsEvent%20%26amp%3b%2cCCoeControl%20%2a%29" format="application/java-archive"><parmname>HandleWsEventL()</parmname></xref> function the base class |
17 To ensure that the system works correctly, after catching an event in the |
18 implementation should be called. The event type is identified by <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Window_Server/W32STD.HGlobals.html#%3a%3aTEventCode" format="application/java-archive"><parmname>TEventCode</parmname></xref>, which is a data member of the |
18 overridden <xref href="GUID-3AC2CDAC-0291-309F-A020-049BC9F2CF90.dita#GUID-3AC2CDAC-0291-309F-A020-049BC9F2CF90/GUID-1ADF5125-A91A-3C5D-8422-50A84D7D6493"><apiname>CCoeAppUi::HandleWsEventL()</apiname></xref> function the base |
19 window server event, <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Window_Server/TWsEventClass.html#_top%20title=" format="application/java-archive"><parmname>TWsEvent</parmname></xref>. </p> |
19 class implementation should be called. The event type is identified by <parmname>TEventCode</parmname>, |
|
20 which is a data member of the window server event, <parmname>TWsEvent</parmname>. </p> |
20 <codeblock id="GUID-C3C94D39-9BDF-4F89-9DEE-B1078A2AD04E" xml:space="preserve">void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination ) |
21 <codeblock id="GUID-C3C94D39-9BDF-4F89-9DEE-B1078A2AD04E" xml:space="preserve">void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination ) |
21 </codeblock> |
22 </codeblock> |
22 <p> All the event types are defined in the <parmname>w32std.h</parmname> header.</p> |
23 <p> All the event types are defined in the <parmname>w32std.h</parmname>.</p> |
23 <p>Note that some event types are not implemented in the system or are |
24 <note> |
24 not available for third-party applications. All event codes from <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Window_Server/W32STD.HGlobals.html#%3a%3aTEventCode" format="application/java-archive"><parmname>TEventCode:EEventUser</parmname></xref> upwards can be used |
25 <p>Some event types are not implemented in the system or are not available |
25 for the application-specific events (discussed in <xref href="GUID-95DD1440-01C9-4997-8DD4-FFD33D7DEAFF.dita">Application-specific |
26 for third-party applications. All event codes from <xref href="GUID-420348F5-4A82-3780-9D27-A3E1F4780F0B.dita#GUID-420348F5-4A82-3780-9D27-A3E1F4780F0B/GUID-5FADC321-7A9E-3CF6-B59F-D142E7A2EFF4"><apiname>TEventCode::EEventUser()</apiname></xref> upwards |
26 events</xref>). |
27 can be used for the application-specific events (discussed in <xref href="GUID-95DD1440-01C9-4997-8DD4-FFD33D7DEAFF.dita">Application-specific |
27 The following is a code example of the usage of a window server event:</p> |
28 events</xref>).</p> |
|
29 </note> |
|
30 <p> The following is a code example of the usage of a window server event:</p> |
28 <codeblock id="GUID-CF247807-C0BF-4C84-B8DF-8C636F895043" xml:space="preserve">void CMyAppUi::HandleWsEventL( const TWsEvent& aEvent, |
31 <codeblock id="GUID-CF247807-C0BF-4C84-B8DF-8C636F895043" xml:space="preserve">void CMyAppUi::HandleWsEventL( const TWsEvent& aEvent, |
29 CCoeControl* aDestination ) |
32 CCoeControl* aDestination ) |
30 { |
33 { |
31 // Call the base class implementation |
34 // Call the base class implementation |
32 CEikAppUi::HandleWsEventL( aEvent, aDestination ); |
35 CEikAppUi::HandleWsEventL( aEvent, aDestination ); |