2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
3 <!-- This component and the accompanying materials are made available under the terms of the License |
3 <!-- This component and the accompanying materials are made available under the terms of the License |
4 "Eclipse Public License v1.0" which accompanies this distribution, |
4 "Eclipse Public License v1.0" which accompanies this distribution, |
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
6 <!-- Initial Contributors: |
6 <!-- Initial Contributors: |
7 Nokia Corporation - initial contribution. |
7 Nokia Corporation - initial contribution. |
8 Contributors: |
8 Contributors: |
9 --> <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"><concept id="GUID-786D76B7-B827-43B7-8202-BA7A7E5EE03E" xml:lang="en"><title>Providing |
9 --> |
10 tactile feedback for touch events</title><prolog><metadata><keywords></keywords></metadata></prolog><conbody> |
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-786D76B7-B827-43B7-8202-BA7A7E5EE03E" xml:lang="en"><title>Providing |
|
13 tactile feedback for touch events</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
11 <p>The Tactile feedback client API provides area registry based feedback and |
14 <p>The Tactile feedback client API provides area registry based feedback and |
12 direct feedback to Symbian applications and UI components. You |
15 direct feedback to Symbian applications and UI components. You can use the |
13 can use the API to add, modify and remove feedback areas, trigger direct feedback |
16 API to add, modify and remove feedback areas, trigger direct feedback and |
14 and disable feedback for certain UI components or the whole application. </p> |
17 disable feedback for certain UI components or the whole application. </p> |
15 <section id="GUID-F1980AF1-191A-4D61-AAA9-EF76BA173C5D"><p>To provide tactile |
18 <section id="GUID-F1980AF1-191A-4D61-AAA9-EF76BA173C5D"><p>To provide tactile |
16 feedback using the using the Tactile feedback client API, follow the steps |
19 feedback using the using the Tactile feedback client API, follow the steps |
17 below:</p><ol> |
20 below:</p><ol> |
18 <li id="GUID-5FA4DF79-88DD-43DA-B666-D3FC398C73B4">Include the Tactile Feedback |
21 <li id="GUID-5FA4DF79-88DD-43DA-B666-D3FC398C73B4">Include the Tactile Feedback |
19 Client library <codeph>touchfeedback.lib</codeph> in your <codeph>.mmp</codeph> file.</li> |
22 Client library <codeph>touchfeedback.lib</codeph> in your <codeph>.mmp</codeph> file.</li> |
20 <li id="GUID-7FA6526A-0D2C-4F2A-A2ED-67291FA1AD31"><p>Include the header files touchfeedback.h and touchlogicalfeedback.h.</p></li> |
23 <li id="GUID-7FA6526A-0D2C-4F2A-A2ED-67291FA1AD31"><p>Include the header files <codeph>touchfeedback.h</codeph> and <codeph>touchlogicalfeedback.h</codeph>.</p></li> |
21 <li id="GUID-A508E628-FEBF-4BDC-B235-731948C11BF6">Use the <codeph>MTouchFeedback::Instance</codeph> function |
24 <li id="GUID-A508E628-FEBF-4BDC-B235-731948C11BF6">Use the <codeph>MTouchFeedback::Instance</codeph> function |
22 for acquiring a pointer to the interface.</li> |
25 for acquiring a pointer to the interface.</li> |
23 <li id="GUID-23CB9F1A-9090-4B2D-8531-1BFFD7A963F6">Set feedback areas for |
26 <li id="GUID-23CB9F1A-9090-4B2D-8531-1BFFD7A963F6">Set feedback areas for |
24 your UI controls using the <codeph>SizeChanged</codeph> function (or in another |
27 your UI controls using the <codeph>SizeChanged</codeph> function (or in another |
25 approriate place).</li> |
28 approriate place).</li> |
32 feedback, trigger it in the <codeph>HandlePointerEventL</codeph> function |
35 feedback, trigger it in the <codeph>HandlePointerEventL</codeph> function |
33 with a call to <codeph>InstantFeedback</codeph>.</li> |
36 with a call to <codeph>InstantFeedback</codeph>.</li> |
34 </ol></section> |
37 </ol></section> |
35 <section id="GUID-158ECB24-37E7-48DE-80F4-9606AC58F183"><title>Use cases</title><fig id="GUID-B8FF99CA-CC09-4B25-BEB6-0DA7053D1B7F"> |
38 <section id="GUID-158ECB24-37E7-48DE-80F4-9606AC58F183"><title>Use cases</title><fig id="GUID-B8FF99CA-CC09-4B25-BEB6-0DA7053D1B7F"> |
36 <title>Tactile feedback client API use cases</title> |
39 <title>Tactile feedback client API use cases</title> |
37 <image href="GUID-7E8C363C-5908-445D-8595-D53F217186ED_d0e76345_href.png" scale="90" placement="inline"></image> |
40 <image href="GUID-7E8C363C-5908-445D-8595-D53F217186ED_d0e106684_href.png" scale="90" placement="inline"/> |
38 </fig><p>To provide tactile feedback for touch events in your applications, |
41 </fig><p>To provide tactile feedback for touch events in your applications, |
39 implement the following use cases:</p><ul> |
42 implement the following use cases:</p><ul> |
40 <li><p><xref href="GUID-27897E0D-D9D6-4007-A45E-62C366F1267C.dita">Using direct |
43 <li><p><xref href="GUID-27897E0D-D9D6-4007-A45E-62C366F1267C.dita">Using direct |
41 feedback</xref></p><ul> |
44 feedback</xref></p><ul> |
42 <li>Feedback effect is played according to given logical feedback type.</li> |
45 <li>Feedback effect is played according to given logical feedback type.</li> |
90 <section id="GUID-0F6F2C15-23C0-47A7-916C-15C92DDED877"><p>For an overview |
93 <section id="GUID-0F6F2C15-23C0-47A7-916C-15C92DDED877"><p>For an overview |
91 of using tactile feedback in your application, see <xref href="GUID-2632A013-AA87-485E-855D-C50E211057D6.dita">Tactile |
94 of using tactile feedback in your application, see <xref href="GUID-2632A013-AA87-485E-855D-C50E211057D6.dita">Tactile |
92 feedback implementation example</xref>.</p></section> |
95 feedback implementation example</xref>.</p></section> |
93 <section id="GUID-03DB8FD1-D1FE-434E-B15F-D4B5DD80926B"><title>Main implementation |
96 <section id="GUID-03DB8FD1-D1FE-434E-B15F-D4B5DD80926B"><title>Main implementation |
94 files</title><p>The implementation files for the Tactile feedback client API |
97 files</title><p>The implementation files for the Tactile feedback client API |
95 are touchfeedback.h and touchlogicalfeedback.h.</p></section> |
98 are <codeph>touchfeedback.h</codeph> and <codeph>touchlogicalfeedback.h</codeph>.</p></section> |
96 </conbody></concept> |
99 </conbody></concept> |