touchfeedback.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name        : touchfeedback.h
00004 *  Part of     : Tactile Feedback / Tactile Feedback Client  
00005 *  Interface   : Tactile Feedback Client API
00006 *  Description : Interface for using area registry and direct feedback from
00007 *                applications and UI controls.
00008 *  Version     : %version:  7 %
00009 *
00010 *  Copyright © 2007-2008 Nokia.  All rights reserved.
00011 *  This material, including documentation and any related computer
00012 *  programs, is protected by copyright controlled by Nokia.  All
00013 *  rights are reserved.  Copying, including reproducing, storing,
00014 *  adapting or translating, any or all of this material requires the
00015 *  prior written consent of Nokia.  This material also contains
00016 *  confidential information which may not be disclosed to others
00017 *  without the prior written consent of Nokia.
00018 * ============================================================================
00019 * Template version: 4.0
00020 */
00021 
00022 
00023 #ifndef M_TOUCHFEEDBACK_H
00024 #define M_TOUCHFEEDBACK_H
00025 
00026 #include <e32std.h>
00027 #include <e32base.h>
00028 #include <coemain.h>
00029 
00030 #include <touchlogicalfeedback.h>
00031 
00032 class CCoeControl;
00033 
00034 
00063 class MTouchFeedback
00064     {
00065 public:
00066 
00081     IMPORT_C static MTouchFeedback* Instance();
00082 
00095     IMPORT_C static MTouchFeedback* CreateInstanceL();
00096 
00107     IMPORT_C static void DestroyInstance();
00108 
00129     virtual TBool TouchFeedbackSupported() = 0;
00130 
00159     virtual void SetFeedbackEnabledForThisApp( TBool aEnabled ) = 0;
00160 
00175     virtual TBool FeedbackEnabledForThisApp() = 0;
00176 
00234     virtual TInt SetFeedbackArea( const CCoeControl* aControl, 
00235                                   TUint32 aIndex,
00236                                   TRect aRect, 
00237                                   TTouchLogicalFeedback aFeedbackType, 
00238                                   TTouchEventType aEventType ) = 0;
00239     
00252     virtual void RemoveFeedbackArea( const CCoeControl* aControl, 
00253                                      TUint32 aIndex ) = 0;
00254     
00278     virtual void RemoveFeedbackForControl( const CCoeControl* aControl ) = 0;
00279 
00298     virtual void ChangeFeedbackArea( const CCoeControl* aControl, 
00299                                      TUint32 aIndex, 
00300                                      TRect aNewRect ) = 0;
00301 
00321     virtual void ChangeFeedbackType( const CCoeControl* aControl, 
00322                                      TUint32 aIndex, 
00323                                      TTouchLogicalFeedback aNewType ) = 0;
00324 
00325     
00346     virtual void MoveFeedbackAreaToFirstPriority( const CCoeControl* aControl, 
00347                                                   TUint32 aIndex ) = 0;
00348 
00368     virtual void FlushRegistryUpdates( ) = 0;
00369     
00382     virtual void InstantFeedback( TTouchLogicalFeedback aType ) = 0;
00383 
00404     virtual void InstantFeedback( const CCoeControl* aControl,
00405                                   TTouchLogicalFeedback aType ) = 0;
00406                                   
00407     
00426     virtual TBool ControlHasFeedback( const CCoeControl* aControl ) = 0;
00427     
00447     virtual TBool ControlHasFeedback( const CCoeControl* aControl, 
00448                                       TUint32 aIndex ) = 0;
00449             
00474     virtual void EnableFeedbackForControl( const CCoeControl* aControl,
00475                                            TBool aEnable ) = 0;       
00476                                            
00498     virtual void EnableFeedbackForControl( const CCoeControl* aControl,
00499                                            TBool aEnableVibra,
00500                                            TBool aEnableAudio ) = 0; 
00501                                            
00517     virtual void SetFeedbackEnabledForThisApp( TBool aVibraEnabled,
00518                                                TBool aAudioEnabled ) = 0;                                                 
00519     };
00520 
00521 
00522 
00523 #endif //  M_TOUCHFEEDBACK_H

Copyright © Nokia Corporation 2001-2007
Back to top