1 /* |
|
2 * Copyright (c) 2005 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: |
|
15 * See class description. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef MPHONEKEYEVENTS_H |
|
21 #define MPHONEKEYEVENTS_H |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32def.h> |
|
26 #include <e32keys.h> |
|
27 #include <w32std.h> |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * MPhoneKeyEvents: |
|
33 * An abstract class whose purpose is to define an interface from the key |
|
34 * event handler to the UI controller. |
|
35 */ |
|
36 |
|
37 class MPhoneKeyEvents |
|
38 { |
|
39 public: // Message Ids |
|
40 |
|
41 enum TPhoneKeyEventMessages |
|
42 { |
|
43 // Processed key-events. |
|
44 // Most classes are expected to act upon processed events only. |
|
45 EPhoneKeyShortPress, // Args: TKeyCode |
|
46 EPhoneKeyLongPress, // Args: TKeyCode |
|
47 }; |
|
48 |
|
49 public: |
|
50 |
|
51 /** |
|
52 * Destructor |
|
53 */ |
|
54 virtual ~MPhoneKeyEvents(){}; |
|
55 |
|
56 public: // Message handling functions |
|
57 |
|
58 virtual void HandleKeyMessageL( |
|
59 TPhoneKeyEventMessages aMessage, |
|
60 TKeyCode aCode ) = 0; |
|
61 |
|
62 virtual void HandleKeyEventL( |
|
63 const TKeyEvent& aKeyEvent, |
|
64 TEventCode aEventCode ) = 0; |
|
65 |
|
66 virtual void HandleKeyPressDurationL( |
|
67 TKeyCode aCode, |
|
68 TTimeIntervalMicroSeconds aKeyPressDuration ) = 0; |
|
69 |
|
70 virtual void HandleLongHashL() = 0; |
|
71 |
|
72 virtual TBool IsNoteVisibleL() = 0; |
|
73 |
|
74 virtual TBool IsMenuBarVisibleL() const = 0; |
|
75 |
|
76 virtual void HandleCreateNumberEntryL( const TKeyEvent& aKeyEvent, |
|
77 TEventCode aEventCode ) = 0; |
|
78 |
|
79 virtual void HandleDtmfKeyToneL( const TKeyEvent& aKeyEvent, |
|
80 TEventCode aEventCode ) = 0; |
|
81 |
|
82 virtual TBool IsAlphanumericSupportedAndCharInput( |
|
83 const TKeyEvent& aKeyEvent ) = 0 ; |
|
84 }; |
|
85 |
|
86 #endif // __MPHONEKEYEVENTS_H |
|