Symbian3/SDK/Source/GUID-8661A7E0-F19A-41F8-9062-FBFAE70CF658.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
	Nokia Corporation - initial contribution.
Contributors: 
-->  <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"><concept id="GUID-8661A7E0-F19A-41F8-9062-FBFAE70CF658" xml:lang="en"><title>Tactile
feedback client API</title><shortdesc>The Tactile feedback client API is used for producing tactile feedback
for different touch events.</shortdesc><prolog><metadata><keywords></keywords></metadata></prolog><conbody>
<p>The Tactile feedback client API is a library API that has been implemented
with a client-server technique. A major part of the processing is done on
the client side, and thus API calls don't necessarily generate a client-server
transaction immediately. Instead for e.g. changes to area registry are buffered,
and then transferred to server-side at once.</p>
<p>You can use tactile feedback in, for example, the following cases:</p>
<ul>
<li>When the user starts to scroll with the scroll bar, user can feel and/or
hear when the scroll bar thumb has been caught.</li>
<li>When button is pressed, user can feel and/or hear the button being pressed.</li>
</ul>
<p>The concept of logical feedback type is very important from this API's
point of view. </p>
<p>In practice it means that, for example, you should not try to use this
API for producing vibrator feedback only. Instead, logical feedback types
such as "basic" or "sensitive" are used on this level, and the actual physical
effect then depends on the settings and device configuration. This way the
feedback works in a unified way from the end user point of view in the whole
device.</p>
<section id="GUID-44CAF194-6B6A-4661-AB29-88BF700BBC60"><p>For user experience guidelines on tactile feedback, see <xref href="GUID-581A8E4B-12BE-41C0-A20E-3087A80FEECF.dita">Tactile feedback</xref>.</p><p>For
information on using the API, see <xref href="GUID-786D76B7-B827-43B7-8202-BA7A7E5EE03E.dita">Providing
tactile feedback for touch events</xref>.</p><p>For the Tactile feedback client
API classes and header files, see Classes
and Definitions.</p></section>
<section id="GUID-E44747A5-92BF-4D7A-895C-C469112A4D32"><title>API class structure</title><p>All functionality of the Tactile
feedback client API is provided in the class <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classMTouchFeedback.html" format="application/java-archive"><codeph>MTouchFeedback</codeph></xref>.</p></section>
<section id="GUID-0D0648C0-5AAE-48C1-82BD-025D6908E3B1"><title>Constraints</title><p>This API is valid for all platforms
running on Symbian OS 9.4 or later.</p></section>
<section id="GUID-E8D3D7BC-F365-45D7-A4AE-4393CF1B6795"><title>Error handling</title><p>The leave mechanism of Symbian environment is used to handle memory exhaustion. The panic mechanism is not
used.</p> <p>The table below presents possible error conditions and responses
to them.</p> <table id="GUID-E9186B9F-2C9B-4C09-B054-69D093BBE41D"><title>Possible
error situations when using Tactile Feedback Client API</title>
<tgroup cols="2"><colspec colname="col1"></colspec><colspec colname="col2"></colspec>
<thead>
<row>
<entry>Error situation</entry>
<entry>Response</entry>
</row>
</thead>
<tbody>
<row>
<entry><codeph>SetFeedbackArea</codeph> returns <codeph>KErrNoMemory</codeph> in
case of an OOM situation.</entry>
<entry>This error can usually be ignored by the application.</entry>
</row>
<row>
<entry><codeph>SetFeedbackArea</codeph> returns <codeph>KErrArgument</codeph></entry>
<entry>The given <codeph>CCoeControl</codeph> pointer is a <codeph>NULL</codeph> pointer
or the control does not have any window associated with it (i.e., the feedback
area setting is attempted before <codeph>SetContainerWindow</codeph> has been
called on the control).</entry>
</row>
<row>
<entry><codeph>SetFeedbackArea</codeph> returns <codeph>KErrNotSupported</codeph>.</entry>
<entry>The given logical feedback type or triggering event type is out of
range.</entry>
</row>
<row>
<entry>A tactile feedback enabled control is moved with <codeph>CCoeControl::SetPosition</codeph>,
but the feedback area is not moved.</entry>
<entry>The control must override the <codeph>CCoeControl::PositionChanged</codeph> function,
and update the feedback area there the same way as in the <codeph>SizeChanged</codeph> function.</entry>
</row>
<row>
<entry>Area registry updates not are effective fast enough. This might happen
in some applications which use very many frequently running active objects,
so that the <codeph>CIdle</codeph> object used by the implementation of this
API gets no change to run.</entry>
<entry>Use the <codeph>FlushRegistryUpdates</codeph> function for forcing
an update to the server side after doing all updates on the client side.</entry>
</row>
<row>
<entry>A control's feedback areas are not automatically disabled when the
control is dimmed.</entry>
<entry><codeph>CCoeControl::SetMopParent</codeph> has not been called on the
control, and thus the object provider hierarchy is broken.</entry>
</row>
</tbody>
</tgroup>
</table></section>
<section id="GUID-2190CCB3-0569-4A43-A300-BBE83AAD64B6"><title>Memory overhead</title><p>Using direct feedback does not cause
additional memory overhead.</p> <p>Area registry based feedback consumes approximately
32 bytes for each feedback area.</p></section>
<section id="GUID-F903AC63-2526-4767-B326-56D43344B23B"><title>Extensions to the API</title><p>New logical feedback types
can be added in later releases. Otherwise the Tactile feedback client API
does not explicitly support any kinds of extensions to it.</p></section>
</conbody></concept>