TWsEvent Class Reference

#include <w32std.h>

class TWsEvent

Detailed Description

Window server event.

All events generated by the window server, except redraw events and priority key events, are delivered to the client in a TWsEvent. The client obtains the TWsEvent by calling RWsSession::GetEvent(). The type of data contained in the TWsEvent depends on the type of event. The client can inquire the event type using Type(), and then retrieve the appropriate type of data.

Member Attribute Documentation

iEventData

TUint8 iEventData[protected]

WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only.

iHandle

TUint iHandle[protected]

WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only.

iTime

TTime iTime[protected]

WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only.

iType

TInt iType[protected]

WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only.

Member Enumeration Documentation

Enum anonymous

Event data size.

EnumeratorValueDescription
EWsEventDataSizesizeof(TAdvancedPointerEvent)

This is the maximum number of bytes of data that can be returned by EventData(). Note: this value is 32 bytes.

Constructor & Destructor Documentation

TWsEvent ( )

TWsEvent()[inline]

Constructor. Zero Initialise Data

Member Function Documentation

DisplayChanged ( )

TWsDisplayChangedEvent *DisplayChanged()[inline]

Gets information about the display changed event.

This function can be used to get information about the display changed event if Type() returns an event of type EEventDisplayChanged.

Return Value
Structure containing display changed event data

DisplayChanged ( )

const TWsDisplayChangedEvent *DisplayChanged()const [inline]

Gets information about the display changed event.

This function can be used to get information about the display changed event if Type() returns an event of type EEventDisplayChanged.

Return Value
Structure containing display changed event data

ErrorMessage ( )

TWsErrorMessage *ErrorMessage()const [inline]

Gets an error event.

This function can be used to get information about the error event if Type() returns an event of type EEventErrorMessage.

Return Value
The error event.

EventData ( )

TUint8 *EventData()const [inline]

Gets information about the event.

This function gives you direct access to the event data as a whole. The event can be a key or pointer event or it could be a new special event that only you and another application know about. You are limited to EWsEventDataSize bytes worth of data.

Return Value
A pointer to the event data.

Handle ( )

TUint Handle()const [inline]

Gets the window handle.

This is the handle that was passed to the window's Construct() function: typically it will be a pointer to the client-side object owning the window, providing access to its member functions.

Return Value
The window handle.

InitAdvancedPointerEvent ( TPointerEvent::TType, TUint, const TPoint3D &, TUint8 )

IMPORT_C voidInitAdvancedPointerEvent(TPointerEvent::TTypeaType,
TUintaModifiers,
const TPoint3D &aPoint3D,
TUint8aPointerNumber
)

Initializes TAdvancedPointerEvent contained in this TWsEvent.

See also: TWsEvent::Pointer() TAdvancedPointerEvent::PositionAndPressure3D() TAdvancedPointerEvent::PointerNumber() To become publishedAll with WSERV NGA APIs To become released with WSERV NGA APIs

Parameters
aTypetype of TAdvancedPointerEvent
aModifiersthe state of the modifier keys at the time when the event occured, defined in TEventModifier
aPoint3Dx and y coordinates of the pointer plus z coordinate representing proximity of the pointer combined with its pressure, as returned by TAdvancedPointerEvent::PositionAndPressure3D()
aPointerNumberpointer number of the pointer whose state change is described by this event

Int ( )

TInt *Int()const [inline]

Gets the event data as a TInt.

For TWsEvents of type EEventPointerEnter and EEventPointerExit this is the pointer number of the pointer that entered/exited the window. Please note that on platforms that use the older Symbian OS, without multipointer support, pointer number is not initialized for EEventPointerEnter and EEventPointerExit and thus it is random.

If the value of the attribute returned from HALData::EPointerNumberOfPointers is greater than 1, then the system has multipointer support.

See also: HALData::EPointerNumberOfPointers HAL::Get(TAttribute,TInt&)

Key ( )

TKeyEvent *Key()const [inline]

Gets the key event.

This function can be used to get information about the key event if Type() returns an event of type EEventKey, EEventKeyUp or EEventKeyDown.

Return Value
Structure containing key event data

ModifiersChanged ( )

TModifiersChangedEvent *ModifiersChanged()const [inline]

Gets information about the modifier changed event.

This function can be used to get information about the modifier changed event if Type() returns an event of type EEventModifiersChanged.

Return Value
Structure containing modifier changed event data

Pointer ( )

TAdvancedPointerEvent *Pointer()const [inline]

Gets the pointer event.

This method can be used to get information about the pointer event if Type() returns an event of type EEventPointer or EEventDragDrop.

If the event has been received by the window without advanced pointer events enabled, this method will return a pointer to TPointerEvent with additional fields of TAdvancedPointerEvent being cleared to 0.

See also: TPointerEvent::AdvancedPointerEvent() RWindowBase::EnableAdvancedPointers()

Return Value
Structure containing advanced pointer event data.

SetHandle ( TUint )

voidSetHandle(TUintaHandle)[inline]

Sets the event handle.

This is the client handle of the window that is being sent the event.

Parameters
aHandleThe event handle.

SetPointerNumber ( TUint8 )

IMPORT_C voidSetPointerNumber(TUint8aPointerNumber)

Changes pointer number of TAdvancedPointerEvent contained in this TWsEvent.

See also: TWsEvent::Pointer() TAdvancedPointerEvent::PointerNumber() To become publishedAll with WSERV NGA APIs To become released with WSERV NGA APIs

Parameters
aPointerNumbernew pointer number to set in TAdvancedPointerEvent contained in this TWsEvent

SetPointerZ ( TInt )

IMPORT_C voidSetPointerZ(TIntaZ)

Changes pressure and proximity of TAdvancedPointerEvent contained in this TWsEvent.

See also: TWsEvent::Pointer() TAdvancedPointerEvent::ProximityAndPressure() To become publishedAll with WSERV NGA APIs To become released with WSERV NGA APIs

Parameters
aZnew pressure and proximity to set, combined the same way as returned by TAdvancedPointerEvent::ProximityAndPressure()

SetTimeNow ( )

voidSetTimeNow()[inline]

Sets the event time to the current time.

SetType ( TInt )

voidSetType(TIntaType)[inline]

Sets the event type.

Parameters
aTypeThe event type. Event types are defined in TEventCode.

Time ( )

TTime Time()const [inline]

Gets the time when the event occurred.

Return Value
The time when the event occurred.

Type ( )

TInt Type()const [inline]

Gets the type of event that occurred.

Return Value
The event type. Event types are defined in TEventCode.

VisibilityChanged ( )

TWsVisibilityChangedEvent *VisibilityChanged()[inline]

Gets information about the visibility changed event.

This function can be used to get information about the visibility changed event if Type() returns an event of type EEventWindowVisibilityChanged.

Return Value
Structure containing visibility changed event data

VisibilityChanged ( )

const TWsVisibilityChangedEvent *VisibilityChanged()const [inline]

Gets information about the visibility changed event.

This function can be used to get information about the visibility changed event if Type() returns an event of type EEventWindowVisibilityChanged.

Return Value
Structure containing visibility changed event data