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: Utility class for keyboard handling |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MULKEYBOARDUTILITY_H_ |
|
20 #define MULKEYBOARDUTILITY_H_ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32std.h> |
|
24 #include <e32property.h> |
|
25 #include <centralrepository.h> |
|
26 #include <AknFepInternalCRKeys.h> |
|
27 #include <AvkonInternalCRKeys.h> // KAknQwertyInputModeActive |
|
28 #include <coemain.h> |
|
29 |
|
30 class CQwertySubscriber : public CActive |
|
31 { |
|
32 public: |
|
33 CQwertySubscriber(TCallBack aCallBack, RProperty& aProperty); |
|
34 ~CQwertySubscriber(); |
|
35 |
|
36 public: // New functions |
|
37 |
|
38 void SubscribeL(); |
|
39 void StopSubscribe(); |
|
40 |
|
41 private: // from CActive |
|
42 |
|
43 void RunL(); |
|
44 void DoCancel(); |
|
45 |
|
46 private: |
|
47 TCallBack iCallBack; |
|
48 RProperty& iProperty; |
|
49 }; |
|
50 |
|
51 class CKeyBoardUtility: public CCoeStatic |
|
52 { |
|
53 public: |
|
54 static CKeyBoardUtility* NewL(); |
|
55 private: |
|
56 static TInt QwertyModeChangeNotification(TAny* aObj); |
|
57 private: |
|
58 ~CKeyBoardUtility(); |
|
59 CKeyBoardUtility(); |
|
60 bool bQwerty; |
|
61 /** Qwerty Notification */ |
|
62 CQwertySubscriber* iQwertyModeStatusSubscriber; |
|
63 RProperty iQwertyModeStatusProperty; |
|
64 void HandleQwertyModeChangeNotification(); |
|
65 public: |
|
66 bool IsQwerty(); |
|
67 }; |
|
68 #endif //MULKEYBOARDUTILITY_H_ |
|