NONSHARABLE_CLASS | ( | CCoeEventData | ) |
Class for grouping together events per control.
void CExampleAppControl::HandlePointerEventL( const TPointerEvent& aPointerEvent ) { if ( aPointerEvent.iType == TPointerEvent::EDataCCoeEventData ) { // Only advanced pointers can be data type pointer events. const TAdvancedPointerEvent* advEvent = aPointerEvent.AdvancedPointerEvent(); if ( advEvent ) { // We know we're this data type advanced pointer event. const CCoeEventData& eventData = CCoeEventData::EventData( *advEvent ); // We have data, check the data type. switch ( eventData.Type() ) { case CWsEventWithData::EPointerEvent: // This enum is now for a general pointer event, not an advanced pointer event { const TPointerEvent* pointerEvent = NULL; TUint count = eventData.Count(); for ( TUint event = 0; event < count; ++event ) { // This API now returns a TPointerEvent, not a TAdvancedPointerEvent. pointerEvent = eventData.Pointer( event ); advEvent = pointerEvent->AdvancedPointerEvent(); if ( advEvent ) { RDebug::Print( _L( "Multi Pointer %d %d,%d" ), advEvent->PointerNumber(), advEvent->iPosition.iX, advEvent->iPosition.iY ); } else { RDebug::Print( _L( "Single Pointer %d,%d" ), pointerEvent->iPosition.iX, pointerEvent->iPosition.iY ); } } break; } ...