diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-DB2E0959-C24E-4E6E-BC6D-064B91BDE662.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-DB2E0959-C24E-4E6E-BC6D-064B91BDE662.dita Tue Mar 30 11:56:28 2010 +0100 @@ -0,0 +1,42 @@ + + + + + +Checking +for touch support at runtimeThe Symbian platform now includes AknLayoutUtils::PenEnabled() to +check for touch support at runtime to allow for reduced run-time memory consumption +if the device does not support touch. +

Typical cases where AknLayoutUtils::PenEnabled() might +be useful include:

+ +

AknLayoutUtils::PenEnabled() is supported from S60 +3rd Edition, FP1, onwards.

+void CMyAppContainer::ConstructL( const TRect& aRect ) + { + CreateWindowL(); + SetRect( aRect ); + + // If the device supports touch, construct long tap detector + if ( AknLayoutUtils::PenEnabled() ) + { + iLongTapDetector = CAknLongTapDetector::NewL( this ); + } + ActivateL(); + } +

You cannot use AknLayoutUtils::PenEnabled() in .rss resource +files.

+
\ No newline at end of file