diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-4102F39E-6215-44AD-9E30-6D8E86114D7D.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-4102F39E-6215-44AD-9E30-6D8E86114D7D.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,38 @@ + + + + + +Creating +the long-tap detector +

To use the long-tap detector in your application, create an instance of +the class CAknLongTapDetector.

+

You must give the long-tap detector constructor a pointer to the owner; +otherwise the detector doesn’t know where to report long tap events.

+

You cannot set other long-tap detector parameters in the constructor. To +change these parameters, use the other methods in the API after the detector +is succesfully constructed.

+

You also need to pass any pointer events from the client side component +to the long-tap detector and enable pointer grab for the control’s window.

+void CMyContainer::ConstructL( const TRect& aRect ) + { + … + iLongTapDetector = CAknLongTapDetector::NewL( this ); + DrawableWindow()->SetPointerGrab( ETrue ); + … + } + +void CMyContainer::HandlePointerEventL( const TPointerEvent& aEvent ) + { + … + iLongTapDetector->PointerEventL( aEvent ); + … + } + +
\ No newline at end of file