|
1 /* |
|
2 * Copyright (c) 2006-2006 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 to observe events in text control |
|
15 |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 #ifndef MCATAPEVENTOBSERVER_H |
|
23 |
|
24 #define MCATAPEVENTOBSERVER_H |
|
25 |
|
26 |
|
27 |
|
28 #include <e32def.h> |
|
29 |
|
30 |
|
31 |
|
32 /** |
|
33 |
|
34 * Interface to observe events in touchable controls |
|
35 |
|
36 * @lib chat.exe |
|
37 |
|
38 * @since S60 v3.2 |
|
39 |
|
40 */ |
|
41 |
|
42 class MCATapEventObserver |
|
43 |
|
44 { |
|
45 |
|
46 public: |
|
47 |
|
48 |
|
49 |
|
50 /** Tap event types */ |
|
51 |
|
52 enum TTapEvent |
|
53 |
|
54 { |
|
55 |
|
56 ESingleTap = 0, // This pure single tap on one item. |
|
57 |
|
58 // User needs to start and release the |
|
59 |
|
60 // tap on same item |
|
61 |
|
62 EDoubleTap, // Double tap on single item. |
|
63 |
|
64 // There's no time limit between the taps |
|
65 |
|
66 EStartTap, // When user puts stylus on control |
|
67 |
|
68 EReleaseTap, // When user raises the stylus off the control |
|
69 |
|
70 |
|
71 |
|
72 // NOTE: When DoubleTap event happens, the observer |
|
73 |
|
74 // is also notified about SingleTap and Release. |
|
75 |
|
76 }; |
|
77 |
|
78 |
|
79 |
|
80 /** |
|
81 |
|
82 * This method is called when observed object is tapped |
|
83 |
|
84 * @since S60 v3.2 |
|
85 |
|
86 * @param aEvent Event which happened in touchable control |
|
87 |
|
88 * @param aControlId in which control the event occured |
|
89 |
|
90 * @return none |
|
91 |
|
92 */ |
|
93 |
|
94 virtual void HandleTapEventL( TTapEvent aEvent, TUint aControlId ) = 0; |
|
95 |
|
96 |
|
97 |
|
98 protected: |
|
99 |
|
100 |
|
101 |
|
102 ~MCATapEventObserver() {} |
|
103 |
|
104 }; |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 #endif // MCATAPEVENTOBSERVER_H |
|
111 |