|
1 /* |
|
2 * Copyright (c) 2009 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 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef HGKEYUTILS_H_ |
|
20 #define HGKEYUTILS_H_ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <w32std.h> |
|
24 #include <e32property.h> |
|
25 #include <featmgr.h> |
|
26 #include <centralrepository.h> |
|
27 #include <cenrepnotifyhandler.h> |
|
28 #include <AknFepInternalCRKeys.h> // KAknFepHashKeySelection |
|
29 #include <AvkonInternalCRKeys.h> // KAknQwertyInputModeActive |
|
30 #include <eikcmobs.h> |
|
31 #include <coedef.h> |
|
32 |
|
33 // Forward declarations |
|
34 class CPeriodic; |
|
35 struct TKeyEvent; |
|
36 class CHgScroller; |
|
37 class CEikButtonGroupContainer; |
|
38 class CCoeControl; |
|
39 class CEikCba; |
|
40 |
|
41 NONSHARABLE_CLASS( CHgKeyUtils ) : |
|
42 public CBase, |
|
43 public MCenRepNotifyHandlerCallback, |
|
44 public MEikCommandObserver |
|
45 { |
|
46 public: |
|
47 static CHgKeyUtils* NewL( CHgScroller& aScroller ); |
|
48 |
|
49 virtual ~CHgKeyUtils(); |
|
50 |
|
51 void HandleLosingFocus(); |
|
52 void HandleGainingFocus(); |
|
53 |
|
54 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
55 |
|
56 public: // from MCenRepNotifyHandlerCallback |
|
57 |
|
58 void HandleNotifyInt(TUint32 aId, TInt aNewValue); |
|
59 |
|
60 private: |
|
61 CHgKeyUtils( CHgScroller& aScroller ); |
|
62 |
|
63 void ConstructL(); |
|
64 |
|
65 void UpdateMSKVars(); |
|
66 |
|
67 TBool SelectionMode( const TKeyEvent& aKeyEvent ); |
|
68 |
|
69 void ProcessCommandL(TInt aCommandId); |
|
70 |
|
71 void CreateMSKObserver(); |
|
72 |
|
73 void RemoveMSKObserver(); |
|
74 |
|
75 private: |
|
76 |
|
77 CHgScroller& iScroller; // Not Own. |
|
78 CRepository* iCenRep; // Own. |
|
79 CCenRepNotifyHandler* iCenRepNotifyHandler; // Own. |
|
80 CEikCba* iCba; // Not own |
|
81 |
|
82 TBool iSelectionModeEnabled; |
|
83 TBool iAknFepHashKeySelection; |
|
84 TBool iShiftKeyPressed; |
|
85 TBool iMskEnabledInPlatform; |
|
86 TBool iMSKButtonGroupAlive; // status of buttongroup, which is used for MSK observer |
|
87 |
|
88 }; |
|
89 |
|
90 #endif // HGKEYUTILS_H_ |