Symbian platform (C++)
SDK native APIs, runtime and tooling
Loading...
Searching...
No Matches
touchfeedback.h
Go to the documentation of this file.
1/*
2* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
3* All rights reserved.
4* This component and the accompanying materials are made available
5* under the terms of "Eclipse Public License v1.0"
6* which accompanies this distribution, and is available
7* at the URL "http://www.eclipse.org/legal/epl-v10.html".
8*
9* Initial Contributors:
10* Nokia Corporation - initial contribution.
11*
12* Contributors:
13*
14* Description: Interface for using area registry and direct feedback from
15* applications and UI controls.
16* Part of: Tactile Feedback.
17*
18*/
19
20
21
22#ifndef M_TOUCHFEEDBACK_H
23#define M_TOUCHFEEDBACK_H
24
25#include <e32std.h>
26#include <e32base.h>
27#include <coemain.h>
28
30#include <touchfeedbackspec.h>
31
32class CCoeControl;
33
63 {
64public:
65
80 IMPORT_C static MTouchFeedback* Instance();
81
94 IMPORT_C static MTouchFeedback* CreateInstanceL();
95
106 IMPORT_C static void DestroyInstance();
107
128 virtual TBool TouchFeedbackSupported() = 0;
129
158 virtual void SetFeedbackEnabledForThisApp( TBool aEnabled ) = 0;
159
174 virtual TBool FeedbackEnabledForThisApp() = 0;
175
233 virtual TInt SetFeedbackArea( const CCoeControl* aControl,
234 TUint32 aIndex,
235 TRect aRect,
236 TTouchLogicalFeedback aFeedbackType,
237 TTouchEventType aEventType ) = 0;
238
251 virtual void RemoveFeedbackArea( const CCoeControl* aControl,
252 TUint32 aIndex ) = 0;
253
277 virtual void RemoveFeedbackForControl( const CCoeControl* aControl ) = 0;
278
297 virtual void ChangeFeedbackArea( const CCoeControl* aControl,
298 TUint32 aIndex,
299 TRect aNewRect ) = 0;
300
325 virtual void ChangeFeedbackType( const CCoeControl* aControl,
326 TUint32 aIndex,
327 TTouchLogicalFeedback aNewType ) = 0;
328
329
350 virtual void MoveFeedbackAreaToFirstPriority( const CCoeControl* aControl,
351 TUint32 aIndex ) = 0;
352
372 virtual void FlushRegistryUpdates( ) = 0;
373
386 virtual void InstantFeedback( TTouchLogicalFeedback aType ) = 0;
387
408 virtual void InstantFeedback( const CCoeControl* aControl,
409 TTouchLogicalFeedback aType ) = 0;
410
411
430 virtual TBool ControlHasFeedback( const CCoeControl* aControl ) = 0;
431
451 virtual TBool ControlHasFeedback( const CCoeControl* aControl,
452 TUint32 aIndex ) = 0;
453
478 virtual void EnableFeedbackForControl( const CCoeControl* aControl,
479 TBool aEnable ) = 0;
480
502 virtual void EnableFeedbackForControl( const CCoeControl* aControl,
503 TBool aEnableVibra,
504 TBool aEnableAudio ) = 0;
505
522 virtual void SetFeedbackEnabledForThisApp( TBool aVibraEnabled,
523 TBool aAudioEnabled ) = 0;
524
525
538 virtual TBool FeedbackEnabledForThisApp( TTouchFeedbackType aFeedbackType ) = 0;
539
568 virtual void StartFeedback( const CCoeControl* aControl,
570 const TPointerEvent* aPointerEvent,
571 TInt aIntensity,
572 TTimeIntervalMicroSeconds32 aTimeout ) = 0;
573
574
582 virtual void ModifyFeedback( const CCoeControl* aControl,
583 TInt aIntensity ) = 0;
584
585
592 virtual void StopFeedback( const CCoeControl* aControl ) = 0;
593
594
613 virtual TInt SetFeedbackEnabledForDevice( TTouchFeedbackType aFeedbackType ) = 0;
614
615
628
629
642 virtual void InstantFeedback( const CCoeControl* aControl,
644 const TPointerEvent& aPointerEvent ) = 0;
645
646
670 virtual TInt SetFeedbackArea( const CCoeControl* aControl,
671 TUint32 aIndex,
672 TRect aRect,
673 CFeedbackSpec* aFeedbackSpec ) = 0;
674
692 virtual void InstantFeedback( const CCoeControl* aControl,
694 TTouchFeedbackType aFeedbackType,
695 const TPointerEvent& aPointerEvent ) = 0;
696
715 TTouchFeedbackType aFeedbackType ) = 0;
716
717
718 };
719
720
721
722#endif // M_TOUCHFEEDBACK_H
Contains feedback types used for setting feedback area.
Definition touchfeedbackspec.h:44
This is the Tactile Feedback interface for UI Controls.
Definition touchfeedback.h:63
virtual void RemoveFeedbackArea(const CCoeControl *aControl, TUint32 aIndex)=0
Removes feedback area from the registry.
static IMPORT_C void DestroyInstance()
Destroys the touch feedback instance and clears pointer in thread local storage.
virtual TTouchFeedbackType FeedbackEnabledForDevice()=0
Used to check enabled feedback types for the device.
virtual TInt SetFeedbackArea(const CCoeControl *aControl, TUint32 aIndex, TRect aRect, CFeedbackSpec *aFeedbackSpec)=0
Sets or updates rectangular feedback area to registry.
virtual void SetFeedbackEnabledForThisApp(TBool aVibraEnabled, TBool aAudioEnabled)=0
Used for disabling/enabling audio/vibra feedback in the application.
virtual TInt SetFeedbackArea(const CCoeControl *aControl, TUint32 aIndex, TRect aRect, TTouchLogicalFeedback aFeedbackType, TTouchEventType aEventType)=0
Sets or updates rectangular feedback area to registry.
virtual void InstantFeedback(TTouchLogicalFeedback aType)=0
Gives direct feedback.
virtual void InstantFeedback(const CCoeControl *aControl, TTouchLogicalFeedback aType, TTouchFeedbackType aFeedbackType, const TPointerEvent &aPointerEvent)=0
Gives direct feedback if given control has not disabled it.
virtual TBool FeedbackEnabledForThisApp(TTouchFeedbackType aFeedbackType)=0
Used to check whether audio or vibra feedback is enabled for this application.
virtual void InstantFeedback(const CCoeControl *aControl, TTouchLogicalFeedback aType, const TPointerEvent &aPointerEvent)=0
Gives direct feedback if given control has not disabled it.
static IMPORT_C MTouchFeedback * Instance()
Used for acquiring a pointer to touch feedback instance.
virtual void SetFeedbackEnabledForThisApp(TBool aEnabled)=0
Used for disabling or enabling feedback in the application.
virtual void MoveFeedbackAreaToFirstPriority(const CCoeControl *aControl, TUint32 aIndex)=0
Makes the given feedback area the first priority area in the window where it is located.
virtual void EnableFeedbackForControl(const CCoeControl *aControl, TBool aEnableVibra, TBool aEnableAudio)=0
This function can be used for separately enabling or disabling audio- and vibra feedback for the give...
virtual void FlushRegistryUpdates()=0
This function forces all registry changes made on client side to be sent to server side immediately.
virtual void StopFeedback(const CCoeControl *aControl)=0
This function stops continuous feedback.
virtual void InstantFeedback(const CCoeControl *aControl, TTouchLogicalFeedback aType)=0
Gives direct feedback if given control has not disabled it.
virtual void ChangeFeedbackType(const CCoeControl *aControl, TUint32 aIndex, TTouchLogicalFeedback aNewType)=0
Changes feedback type in the registry.
virtual TInt SetFeedbackEnabledForDevice(TTouchFeedbackType aFeedbackType)=0
This function enables or disables audio or/and vibra feedback in whole device.
virtual void StartFeedback(const CCoeControl *aControl, TTouchContinuousFeedback aType, const TPointerEvent *aPointerEvent, TInt aIntensity, TTimeIntervalMicroSeconds32 aTimeout)=0
Starts continuous feedback if given control has not disabled it.
virtual void InstantFeedback(TTouchLogicalFeedback aType, TTouchFeedbackType aFeedbackType)=0
Gives direct feedback.
virtual TBool TouchFeedbackSupported()=0
This function can be used to check, whether touch feedback is supported at all in the device.
virtual void EnableFeedbackForControl(const CCoeControl *aControl, TBool aEnable)=0
This function enables or disables all feedback areas registered for the given control.
virtual TBool ControlHasFeedback(const CCoeControl *aControl)=0
Can be used for querying, whether given control has any feedback areas registered.
static IMPORT_C MTouchFeedback * CreateInstanceL()
Creates a new touch feedback instance.
virtual void RemoveFeedbackForControl(const CCoeControl *aControl)=0
Removes all feedback areas of specified control from registry.
virtual void ChangeFeedbackArea(const CCoeControl *aControl, TUint32 aIndex, TRect aNewRect)=0
Changes feedback area in the registry.
virtual TBool FeedbackEnabledForThisApp()=0
Used to check whether feedback is enabled for this application.
virtual void ModifyFeedback(const CCoeControl *aControl, TInt aIntensity)=0
This function modifies intensity of continuous feedback on the fly.
virtual TBool ControlHasFeedback(const CCoeControl *aControl, TUint32 aIndex)=0
Can be used for querying, whether given control has a feedback area defined with given index number.
TTouchContinuousFeedback
Logical feedback types for producing continuous feedback.
Definition touchlogicalfeedback.h:109
TTouchEventType
Pointer event types, that can be used when registering areas to registry.
Definition touchlogicalfeedback.h:30
TTouchLogicalFeedback
Logical feedback types, that can be used when producing direct feedback, or when registering areas to...
Definition touchlogicalfeedback.h:67
TTouchFeedbackType
Physical feedback types as bitmask.
Definition touchlogicalfeedback.h:122