|
1 /* |
|
2 * Copyright (c) 2007-2007 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 C_APPUI_H |
|
20 #define C_APPUI_H |
|
21 |
|
22 #include <aknappui.h> |
|
23 #include <cenrepnotifyhandler.h> |
|
24 |
|
25 class CAiUiIdleIntegration; |
|
26 class MAiUiFrameworkObserver; |
|
27 class MAiFwEventHandler; |
|
28 class CExtrStandbyContainerIF; |
|
29 class CCenRepNotifyHandler; |
|
30 class CRepository; |
|
31 class RConeResourceLoader; |
|
32 class MAiPSPropertyObserver; |
|
33 |
|
34 namespace AiNativeUiController |
|
35 { |
|
36 |
|
37 class CNativeUiController; |
|
38 class CAiNativeUiView; |
|
39 |
|
40 /** |
|
41 * @ingroup group_nativeuicontroller |
|
42 * |
|
43 * AppUI class of Native UI Controller application |
|
44 * |
|
45 * @lib ainatiui |
|
46 * @since S60 3.2 |
|
47 */ |
|
48 class CAppUi : public CAknAppUi, |
|
49 public MCenRepNotifyHandlerCallback |
|
50 { |
|
51 public: // Constructors and destructor |
|
52 |
|
53 static CAppUi* NewL(CNativeUiController* aUiCtl); |
|
54 |
|
55 ~CAppUi(); |
|
56 |
|
57 // new functions |
|
58 |
|
59 CCoeEnv* CoeEnv() { return iCoeEnv; } |
|
60 |
|
61 void StartL(); |
|
62 |
|
63 // from CCoeAppUi |
|
64 |
|
65 TKeyResponse HandleKeyEventL( |
|
66 const TKeyEvent& aKeyEvent, |
|
67 TEventCode aType ); |
|
68 |
|
69 // From MCenRepNotifyHandlerCallback |
|
70 |
|
71 void HandleNotifyInt( TUint32 aId, TInt aNewValue ); |
|
72 |
|
73 void ExtHSThemeChanged(); |
|
74 |
|
75 private: |
|
76 |
|
77 // Functions from CAknAppUi |
|
78 |
|
79 void HandleForegroundEventL(TBool aForeground); |
|
80 |
|
81 void HandleCommandL(TInt aCommand); |
|
82 |
|
83 void HandleResourceChangeL(TInt aType); |
|
84 |
|
85 void HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination); |
|
86 |
|
87 void HandleScreenDeviceChangedL(); |
|
88 |
|
89 void PrepareToExit(); |
|
90 |
|
91 void SkipVoiceDial(); |
|
92 |
|
93 static TInt TimerDone(TAny* aSelf); |
|
94 |
|
95 /** |
|
96 * Handles powerkey events. |
|
97 * |
|
98 * @since S60 v3.2 |
|
99 */ |
|
100 static TInt HandlePowerkeyEvent( TAny* aPtr ); |
|
101 |
|
102 // Construction |
|
103 |
|
104 CAppUi(CNativeUiController* aUiCtl); |
|
105 |
|
106 void ConstructL(); |
|
107 |
|
108 void HandlePointerEvent( TPointerEvent &aEvent ); |
|
109 |
|
110 private: // Data |
|
111 |
|
112 |
|
113 /** |
|
114 * Framework event handler. |
|
115 */ |
|
116 MAiFwEventHandler* iFwEventHandler; |
|
117 |
|
118 /** |
|
119 * UI Controller implementation. Not own. |
|
120 */ |
|
121 CNativeUiController* iUiCtl; |
|
122 |
|
123 /** |
|
124 * Ui framework event observer. Not own. |
|
125 */ |
|
126 MAiUiFrameworkObserver* iUiFwObserver; |
|
127 |
|
128 /** |
|
129 * Idle Integration helper object. Own. |
|
130 */ |
|
131 CAiUiIdleIntegration* iIdleIntegration; |
|
132 |
|
133 /** |
|
134 * Main view. |
|
135 * Own. |
|
136 */ |
|
137 CAiNativeUiView* iAppView; |
|
138 |
|
139 /** |
|
140 * Homescreen IF. Own. |
|
141 */ |
|
142 CExtrStandbyContainerIF* iStanbyContainerIF; |
|
143 |
|
144 /** |
|
145 * Notify handler for cenrep. |
|
146 * Own. |
|
147 */ |
|
148 CCenRepNotifyHandler* iNotifyHandler; |
|
149 |
|
150 /** |
|
151 * Repository for notify handler. |
|
152 * Own. |
|
153 */ |
|
154 CRepository* iAIRepository; |
|
155 |
|
156 /** |
|
157 * Last set status pane layout. |
|
158 */ |
|
159 TInt iCurrentStatusPaneLayout; |
|
160 |
|
161 /** |
|
162 * Timer to handle long key press. |
|
163 */ |
|
164 CPeriodic* iTimer; |
|
165 |
|
166 /** |
|
167 * Voice dial key down indicator. |
|
168 */ |
|
169 TBool iSINDKeyDown; |
|
170 |
|
171 /** |
|
172 * Resource file loader for ainativeui resource. |
|
173 */ |
|
174 RConeResourceLoader* iResourceLoader; |
|
175 |
|
176 /** |
|
177 * Flag to indicate that device has no power key. |
|
178 */ |
|
179 TBool iFeatureNoPowerKey; |
|
180 |
|
181 /** |
|
182 * Power key PS observer. Only used if no power key exists. |
|
183 * Own. |
|
184 */ |
|
185 MAiPSPropertyObserver* iPowerkeyStatusObserver; |
|
186 |
|
187 }; |
|
188 |
|
189 } // namespace AiNativeUiController |
|
190 |
|
191 #endif // C_APPUI_H |
|
192 |
|
193 // End of File. |