TAdvancedPointerEvent Class Reference

#include <advancedpointerevent.h>

class TAdvancedPointerEvent : public TPointerEvent

Inherits from

Detailed Description

Subclass of TPointerEvent created in order to maintain binary compatibility while extending TPointerEvent with new data: (1) pointer number of the pointer whose state change is described by the event, (2) proximity of the pointer to the screen's surface, (3) pressure applied by the pointer to the screen.

These new attributes will be present only on devices that support them, otherwise they will be set to 0.

See also: TPointerEvent TPointerEvent::AdvancedPointerEvent() TPointerEvent::IsAdvancedPointerEvent() TWsEvent::Pointer()

Member Attribute Documentation

data

struct TAdvancedPointerEvent::@3::@6data

iEventData

TUint32 iEventData

iPointerNumber

TUint8 iPointerNumber

iPosZ

TInt32 iPosZ

iSpare1

TInt iSpare1

iSpare2

TInt iSpare2

ints

struct TAdvancedPointerEvent::@3::@4ints

multiPos3D

struct TAdvancedPointerEvent::@3::@5multiPos3D

Member Enumeration Documentation

Enum anonymous

EnumeratorValueDescription
EDefaultPointerNumber0

The value used by Symbian OS as the default pointer number for pointer-related event objects which do not contain a pointer number member.

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

EMaximumWServNumberOfPointers8

Maximum number of pointers that WServ is able to support. On each particular platform, the number of supported pointers must be less than or equal to this value.

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

Constructor & Destructor Documentation

TAdvancedPointerEvent ( )

TAdvancedPointerEvent()[inline]

Default Constructor for TAdvancedPointerEvent

TAdvancedPointerEvent ( const TAdvancedPointerEvent & )

IMPORT_CTAdvancedPointerEvent(const TAdvancedPointerEvent &aPointerEvent)

Copy Constructor for TAdvancedPointerEvent

Member Function Documentation

Data ( )

TUint Data()const [inline]

EventWithData ( )

const CWsEventWithData *EventWithData()const [inline]

PointerNumber ( )

TInt PointerNumber()const [inline]

Gets the pointer number of the pointer whose state change is described by this event.

As soon as the pointer (for example a finger) is detected by the device's sensors, it is assigned a pointer number. Then all events related to this pointer always use the same pointer number. When the device loses track of the pointer, TPointerEvent::EOutOfRange is sent with its pointer number and the number is released
  • from this time it may be re-used to identify another pointer coming into range.

On a particular device, the pointer number is always an integer in the range 0 to HALData::EPointerNumberOfPointers - 1. If the device doesn't provide value for this attribute, it is assumed to be 1.

Please note that in order to receive events from multiple pointers in a window, the method RWindowBase::EnableAdvancedPointers() has to be called for this window's instance before it is activated. Otherwise this window will only receive TPointerEvents from one emulated pointer, which will always have pointer number 0.

See also: RWindowBase::EnableAdvancedPointers() HALData::EPointerNumberOfPointers

Return Value
Pointer number of the pointer whose state change is described by this event.

Position3D ( )

TPoint3D Position3D()const [inline]
Return Value
Pointer's X and Y coordinates plus pointer's proximity to the screen as Z coordinate. Please note that returned Z coordinate will be always negative or 0.

PositionAndPressure3D ( )

TPoint3D PositionAndPressure3D()const [inline]
Return Value
Pointer's X and Y coordinates plus combined proximity and pressure as Z coordinate.

Pressure ( )

TInt Pressure()const [inline]

Gets the pressure applied by the pointer to the screen. Pressure units may vary between devices and may be non-linear. Returned value will be a positive integer as the maximum supported pressure range in Symbian OS is from 0 to KMaxTInt. HALData attributes provide more information about pressure support on particular device.

On platforms without pointer pressure support, pressure is always assumed to be 0.

See also: TAdvancedPointerEvent::Pressure3D() TAdvancedPointerEvent::ProximityAndPressure() HALData::EPointer3DMaxPressure HALData::EPointer3DPressureStep

Return Value
Pressure applied by the pointer to the screen.

Pressure3D ( )

TPoint3D Pressure3D()const [inline]
Return Value
Pointer's X and Y coordinates plus pressure applied by the pointer to the screen as Z coordinate.

Proximity ( )

TInt Proximity()const [inline]

Gets the proximity of the pointer to the screen's surface. Proximity units may vary between devices and may be non-linear. Returned value will be a negative integer as the maximum supported proximity range in Symbian OS is from KMinTInt to 0, where KMinTInt means the highest proximity that Symbian OS can support and 0 means touching the screen. HALData attributes provide more information about proximity support on particular device.

On platforms without pointer proximity support, proximity is always assumed to be 0.

See also: TAdvancedPointerEvent::Position3D() TAdvancedPointerEvent::ProximityAndPressure() HALData::EPointer3DMaxProximity HALData::EPointer3DProximityStep

Return Value
Proximity of the pointer to the screen's surface.

ProximityAndPressure ( )

TInt ProximityAndPressure()const [inline]

Gets pressure applied by the pointer to the screen and proximity of the pointer to the screen as one value. This is possible because the pointer is never in proximity to the screen and pressing the screen at the same time.

See also: TAdvancedPointerEvent::Proximity() TAdvancedPointerEvent::Pressure() TAdvancedPointerEvent::PositionAndPressure3D()

Return Value
The value of proximity if the pointer is in proximity to the screen; proximity is always represented as negative TInt. The value of pressure if the pointer is touching the screen; pressure is always represented as positive TInt.

SetData ( TUint )

IMPORT_C TIntSetData(TUintaData)

Sets the pointer data Also sets the event modifier so that the PointerEvent is marked as an AdvancedPointerEvent

Return Value
KErrNone if successful, KErrNotSupported if pointer event not of type EDataCWsEventWithData or EDataCCoeEventData

operator= ( const TAdvancedPointerEvent & )

IMPORT_C TAdvancedPointerEvent &operator=(const TAdvancedPointerEvent &aPointerEvent)

Operator= overload for TAdvancedPointerEvent