TPointerEvent Struct Reference

#include <pointerevent.h>

struct TPointerEvent

Detailed Description

Pointer event details.

The function TWsEvent::Pointer() is used to get this structure for a pointer event.

Member Attribute Documentation

iModifiers

TUint iModifiers

The state of the modifier keys, defined in TEventModifier.

iParentPosition

TPoint iParentPosition

Co-ordinates of the pointer event relative to the parent window of the window it occurred in.

Positive co-ordinates indicate a position to the right of and down from the window's origin, negative co-ordinates indicate a position to the left and up.

iPosition

TPoint iPosition

Co-ordinates of the pointer event relative to the origin of the window it occurred in.

Positive co-ordinates indicate a position to the right of and down from the window's origin, negative co-ordinates indicate a position to the left and up.

iType

TType iType

The type of pointer event.

Member Enumeration Documentation

Enum TType

Pointer event types.

Note that the user actions that cause these events will vary according to the type of pointing device used.

EnumeratorValueDescription
EButton1Down

Button 1 or pen down.

EButton1Up

Button 1 or pen up.

EButton2Down

Button 2 down.

This is the middle button of a 3 button mouse.

EButton2Up

Button 2 up.

This is the middle button of a 3 button mouse.

EButton3Down

Button 3 down.

EButton3Up

Button 3 up.

EDrag

Drag event.

These events are only received when button 1 is down.

EMove

Move event.

These events are only received when button 1 is up and the XY input mode is not pen.

EButtonRepeat

Button repeat event.

ESwitchOn

Switch on event caused by a screen tap.

EOutOfRange

Out Of Range event caused by 3D pointer leaving the detection volume. It implies that the pointer cannot be tracked any more by device's sensors and that from now the pointer number of this pointer may be used for identifying another physical pointer (for example another finger). As EOutOfRange event is generated when pointer's position is unknown, it contains last known coordinates of the pointer and is delivered to the window based on these coordinates.

See also: TAdvancedPointerEvent::PointerNumber()

EEnterCloseProximity

Caused by a 3D pointer getting close to the screen. It is fired when a pointer's Z coordinate crosses the threshold for EEnterCloseProximity from the OutOfRange state or from the Up/OutOfCloseProximity state. Please refer to the system documentation for an explanation of pointer states.

See also: RWsSession::SetCloseProximityThresholds RWsSession::GetEnterCloseProximityThreshold

EExitCloseProximity

Caused by a 3D pointer moving away from the screen. It is generally fired when a pointer's Z coordinate crosses the threshold for EExitCloseProximity from the Up/InCloseProximity state. Please refer to the system documentation for an explanation of pointer states.

See also: RWsSession::SetCloseProximityThresholds RWsSession::GetExitCloseProximityThreshold

EEnterHighPressure

Caused by a 3D pointer pressing the screen. It is generally fired when a pointer's Z coordinate crosses the threshold for EEnterHighPressure from the Down/OutOfHighPressure state. Please refer to the system documentation for an explanation of pointer states.

See also: RWsSession::SetHighPressureThresholds RWsSession::GetEnterHighPressureThreshold

EExitHighPressure

Caused by s 3D pointer pressing the screen with reducing force. It is fired when a pointer's Z coordinate crosses the threshold for EExitHighPressure from the Down/InHighPressure state. Please refer to the system documentation for an explanation of pointer states.

See also: RWsSession::SetHighPressureThresholds RWsSession::GetExitHighPressureThreshold

EDataCWsEventWithData

Event contains a handle for the given data type

EDataCCoeEventData
ENullType-1

WSERV will never generate TPointerEvent with this type.

WARNING: Enum for internal use ONLY. Compatibility is not guaranteed in future releases.

Constructor & Destructor Documentation

TPointerEvent ( )

TPointerEvent()[inline]

Default Constructor

TPointerEvent ( const TPointerEvent & )

TPointerEvent(const TPointerEvent &aPointerEvent)[inline]

Copy Constructor

Parameters
aPointerEventthe pointer event to copy

TPointerEvent ( TType, TUint, const TPoint &, const TPoint & )

TPointerEvent(TTypeaType,
TUintaModifiers,
const TPoint &aPosition,
const TPoint &aParentPosition
)[inline]

Member Function Documentation

AdvancedPointerEvent ( )

const TAdvancedPointerEvent *AdvancedPointerEvent()const [inline]

Casts this TPointerEvent to TAdvancedPointerEvent in order to provide access to event's pointer number, pressure and proximity (these attributes are accessible through appropriate getters of TAdvancedPointerEvent class).

If this is not an instance of TAdvancedPointerEvent, NULL will be returned. Please note that TAdvancedPointerEvents are delivered only to windows for which they have been enabled using RWindowBase::EnableAdvancedPointers() method.

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

Return Value
A pointer to this object as TAdvancedPointerEvent or NULL if this is not an instance of TAdvancedPointerEvent.

Copy ( const TPointerEvent & )

voidCopy(const TPointerEvent &aPointerEvent)[inline]

Copies from a TPointerEvent object

Parameters
aPointerEventthe pointer event to copy

IsAdvancedPointerEvent ( )

TBool IsAdvancedPointerEvent()const [inline]

Check if this pointer event is an instance of TAdvancedPointerEvent containing pointer number, proximity and pressure.

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

Return Value
ETrue if this pointer event is an instance of TAdvancedPointerEvent; EFalse otherwise.

operator= ( const TPointerEvent & )

TPointerEvent &operator=(const TPointerEvent &aPointerEvent)[inline]

Operator= override

Parameters
aPointerEventthe pointer event to copy