diff -r 000000000000 -r 89d6a7a84779 Symbian3/SDK/Source/GUID-B830A1F7-9220-5879-80BE-C494A4CD155B.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-B830A1F7-9220-5879-80BE-C494A4CD155B.dita Thu Jan 21 18:18:20 2010 +0000 @@ -0,0 +1,28 @@ + + + + + +Handling General Events

When a Window Server event is received, the active scheduler calls the RunL() function to handle the event. Use RWsSession::GetEvent() to get the event, a TWsEvent. An event object always has an event type, a TEventCode, accessed through TWsEvent::Type(), and other data that is useful in handling specific types of event.

Variant: ScreenPlay and non-ScreenPlay. Target audience: Application developers.

The following example uses a switch statement to execute some function when the associated event type is received.

/* Called by active scheduler when an event occurs +Processes events according to their type */ +void CExampleWsClient::RunL() + { + // Get the event from the Window Server session iWs + iWs.GetEvent(iWsEvent); + // Get the event type: types are defined in TEventCode + TInt eventType=iWsEvent.Type();/ Process event + switch (eventType) + { + /* Window-group related event types */ + + ... + + }
General Events Declaring a + Window Server Event-Handling Class Processing Window-Group + Events Processing Window Events Processing System Events
\ No newline at end of file