diff -r 000000000000 -r 89d6a7a84779 Symbian3/SDK/Source/GUID-3729C075-4958-4874-9DD7-02A68D17E043.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-3729C075-4958-4874-9DD7-02A68D17E043.dita Thu Jan 21 18:18:20 2010 +0000 @@ -0,0 +1,40 @@ + + + + + +Other +window server events +

When an event occurs under the window server, the framework calls the HandleWsEventL() function of the UI controller +object. To implement an event-handling code for a certain event, HandleWsEventL() must be overridden. In +order to ensure that the system works correctly, after catching an event in +the overridden HandleWsEventL() function the base class +implementation should be called. The event type is identified by TEventCode, which is a data member of the +window server event, TWsEvent.

+void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination ) + +

All the event types are defined in the w32std.h header.

+

Note that some event types are not implemented in the system or are +not available for third-party applications. All event codes from TEventCode:EEventUser upwards can be used +for the application-specific events (discussed in Application-specific +events). +The following is a code example of the usage of a window server event:

+void CMyAppUi::HandleWsEventL( const TWsEvent& aEvent, + CCoeControl* aDestination ) + { + // Call the base class implementation + CEikAppUi::HandleWsEventL( aEvent, aDestination ); + if( aEvent.Type() == EEventKeyDown ) + { + // Do something + iEikonEnv->InfoMsg( _L( “Key was pressed” ) ); + } + } + +
\ No newline at end of file