Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Revision as of 04:36, 30 May 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Advanced pointer events for multi touch

From Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: symbianyucca (21 Dec 2010)
Last edited: hamishwillee (30 May 2013)

Advanced pointer events were introduced for Symbian^3, and thus they are not working on previous platform versions. To enable receiving the advanced pointer events for a window, a new function called EnableAdvancedPointers() needs to be called before the window is activated. For CCoeControl derived classed this can be handled with following line of code:


Then if you wish also to get any drag events, then you should also remember to call EnableDragEvents() for the CCoeControl derived class.

The actual advanced pointer events are then delivered to the application via normal HandlePointerEventL() function, and in it you could get the actual advanced pointer event by calling the AdvancedPointerEvent() for the normal pointer event like this:

const TAdvancedPointerEvent* AddPoinv = aPointerEvent.AdvancedPointerEvent();

The TAdvancedPointerEvent has several functions that return more information on the pointer event such as:

  • Proximity() that returns the proximity.
  • Pressure() that returns the pressure.
  • ProximityAndPressure() that returns the proximity and pressure combined
  • Position3D() that returns the proximity and the X, Y and Z coordinates.
  • Pressure3D() that returns the pressure and the X and Y coordinates.

And to distinguish between different pointers you could use the PointerNumber() function. It is returning an index of the pointer event can have value between zero and Max number of pointers defined for the device.

Full example on how advanced pointer events can be used for detecting multi touch events can be downloaded from: Advanced

This page was last modified on 30 May 2013, at 04:36.
48 page views in the last 30 days.