diff -r 51a74ef9ed63 -r ae94777fff8f Symbian3/SDK/Source/GUID-786D76B7-B827-43B7-8202-BA7A7E5EE03E.dita --- a/Symbian3/SDK/Source/GUID-786D76B7-B827-43B7-8202-BA7A7E5EE03E.dita Wed Mar 31 11:11:55 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-786D76B7-B827-43B7-8202-BA7A7E5EE03E.dita Fri Jun 11 12:39:03 2010 +0100 @@ -1,99 +1,99 @@ - - - - - -Providing -tactile feedback for touch events -

The Tactile feedback client API provides area registry based feedback and -direct feedback to Symbian applications and UI components. You can use the -API to add, modify and remove feedback areas, trigger direct feedback and -disable feedback for certain UI components or the whole application.

-

To provide tactile -feedback using the using the Tactile feedback client API, follow the steps -below:

    -
  1. Include the Tactile Feedback -Client library touchfeedback.lib in your .mmp file.
  2. -
  3. Include the header files touchfeedback.h and touchlogicalfeedback.h.

  4. -
  5. Use the MTouchFeedback::Instance function -for acquiring a pointer to the interface.
  6. -
  7. Set feedback areas for -your UI controls using the SizeChanged function (or in another -approriate place).
  8. -
  9. Update the feedback areas -using the PositionChanged function (for non-window-owning -controls).
  10. -
  11. Call RemoveFeedbackForControl in -your control's destructor.
  12. -
  13. If you want to use direct -feedback, trigger it in the HandlePointerEventL function -with a call to InstantFeedback.
  14. -
-
Use cases -Tactile feedback client API use cases - -

To provide tactile feedback for touch events in your applications, -implement the following use cases:

    -
  • Using direct -feedback

      -
    • Feedback effect is played according to given logical feedback type.
    • -
  • -
  • Using area registry -based feedback

      -
    • Set feedback area

        -
      • New feedback area is added to area registry.
      • -
      • Can also be used for modifying existing feedback area.
      • -
    • -
    • Change feedback area

        -
      • Change feedback area coordinates, or feedback type for a given area.
      • -
    • -
    • Remove feedback area

        -
      • Given feedback area is removed from the registry
      • -
    • -
  • -
  • Removing feedback -from a control

      -
    • All feedback areas belonging to given control are removed from registry.
    • -
    • All cached information about the control is also removed.
    • -
  • -

The following use cases are optional, allowing you to use additional -tactile feedback features:

    -
  • Disabling and -enabling feedback

      -
    • Enable or disable feedback for you application

        -
      • Disable feedback for this application at run-time.
      • -
      • Enable feedback for this application at run-time.
      • -
      • Query whether feedback is currently enabled for this application.
      • -
      • Enable only audio- or vibra feedback for this application at run-time.
      • -
    • -
    • Enable or disable feedback for a control

        -
      • Temporarily disable feedback for given control.
      • -
      • Re-enable feedback for given control.
      • -
      • Temporarily enable only audio or vibra feedback.
      • -
    • -
  • -
  • Querying if -feedback is supported

      -
    • Check if tactile feedback is supported in this device.
    • -
  • -
  • Managing feedback -areas

      -
    • You can sort feedback areas for achieving desired functionality in case -of overlapping areas.
    • -
  • -
  • Optimizing feedback -latency

  • -
-

For an overview -of using tactile feedback in your application, see Tactile -feedback implementation example.

-
Main implementation -files

The implementation files for the Tactile feedback client API -are touchfeedback.h and touchlogicalfeedback.h.

+ + + + + +Providing +tactile feedback for touch events +

The Tactile feedback client API provides area registry based feedback and +direct feedback to Symbian applications and UI components. You can use the +API to add, modify and remove feedback areas, trigger direct feedback and +disable feedback for certain UI components or the whole application.

+

To provide tactile +feedback using the using the Tactile feedback client API, follow the steps +below:

    +
  1. Include the Tactile Feedback +Client library touchfeedback.lib in your .mmp file.
  2. +
  3. Include the header files touchfeedback.h and touchlogicalfeedback.h.

  4. +
  5. Use the MTouchFeedback::Instance function +for acquiring a pointer to the interface.
  6. +
  7. Set feedback areas for +your UI controls using the SizeChanged function (or in another +approriate place).
  8. +
  9. Update the feedback areas +using the PositionChanged function (for non-window-owning +controls).
  10. +
  11. Call RemoveFeedbackForControl in +your control's destructor.
  12. +
  13. If you want to use direct +feedback, trigger it in the HandlePointerEventL function +with a call to InstantFeedback.
  14. +
+
Use cases +Tactile feedback client API use cases + +

To provide tactile feedback for touch events in your applications, +implement the following use cases:

    +
  • Using direct +feedback

      +
    • Feedback effect is played according to given logical feedback type.
    • +
  • +
  • Using area registry +based feedback

      +
    • Set feedback area

        +
      • New feedback area is added to area registry.
      • +
      • Can also be used for modifying existing feedback area.
      • +
    • +
    • Change feedback area

        +
      • Change feedback area coordinates, or feedback type for a given area.
      • +
    • +
    • Remove feedback area

        +
      • Given feedback area is removed from the registry
      • +
    • +
  • +
  • Removing feedback +from a control

      +
    • All feedback areas belonging to given control are removed from registry.
    • +
    • All cached information about the control is also removed.
    • +
  • +

The following use cases are optional, allowing you to use additional +tactile feedback features:

    +
  • Disabling and +enabling feedback

      +
    • Enable or disable feedback for you application

        +
      • Disable feedback for this application at run-time.
      • +
      • Enable feedback for this application at run-time.
      • +
      • Query whether feedback is currently enabled for this application.
      • +
      • Enable only audio- or vibra feedback for this application at run-time.
      • +
    • +
    • Enable or disable feedback for a control

        +
      • Temporarily disable feedback for given control.
      • +
      • Re-enable feedback for given control.
      • +
      • Temporarily enable only audio or vibra feedback.
      • +
    • +
  • +
  • Querying if +feedback is supported

      +
    • Check if tactile feedback is supported in this device.
    • +
  • +
  • Managing feedback +areas

      +
    • You can sort feedback areas for achieving desired functionality in case +of overlapping areas.
    • +
  • +
  • Optimizing feedback +latency

  • +
+

For an overview +of using tactile feedback in your application, see Tactile +feedback implementation example.

+
Main implementation +files

The implementation files for the Tactile feedback client API +are touchfeedback.h and touchlogicalfeedback.h.

\ No newline at end of file