1 /* |
|
2 * Copyright (c) 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 the License "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: Gesture helper implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef RT_GESTURELISTENER_H_ |
|
19 #define RT_GESTURELISTENER_H_ |
|
20 |
|
21 #include <rt_gestureif.h> |
|
22 |
|
23 namespace stmGesture |
|
24 { |
|
25 /*! |
|
26 * The gesture listener interface. This interface needs to be implemented by the |
|
27 * listener of the standard gestures implemented in the gesture framework. |
|
28 */ |
|
29 class MGestureListener |
|
30 { |
|
31 public: |
|
32 /*! |
|
33 * The method that will be called by the gesture framework |
|
34 * to inform about a gesture being recognised. |
|
35 * \param theGesture: contains the recognised gesture. |
|
36 * The MGestureIf contains generic part and gesture specific part |
|
37 * so the listener needs to know how to handle specific gestures. |
|
38 */ |
|
39 virtual void gestureEnter(MGestureIf& theGesture) = 0 ; |
|
40 /*! |
|
41 * The method to inform the listener that the gesture has ended. |
|
42 * This happens if another gesture is recognised or e.g. the Release UI |
|
43 * event is handled. |
|
44 * \note Some gestures produce only gestureEnter() callback and no gestureExit(). |
|
45 */ |
|
46 virtual void gestureExit(TGestureUid gestureUid) = 0 ; |
|
47 /*! |
|
48 * The listener needs to provide the target control (CCoeControl*) to the |
|
49 * standard gestures. Since the gesture framework processes all events in the |
|
50 * application, the gesture recognisers check whether the events are targeted |
|
51 * to the listener owning control. |
|
52 * Not all gesture recognisers need to perform this check. |
|
53 * \return the owning CCoeControl of the gesture listener. |
|
54 */ |
|
55 virtual CCoeControl* getOwner() = 0 ; |
|
56 }; |
|
57 |
|
58 } |
|
59 #endif /* RT_GESTURELISTENER_H_ */ |
|