|
1 /* |
|
2 * Copyright (c) 2002-2004 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 * Avkon adapter for Xuikon |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef XNAPPUIADAPTER_H |
|
20 #define XNAPPUIADAPTER_H |
|
21 |
|
22 // System includes |
|
23 #include <aknViewAppUi.h> |
|
24 |
|
25 // Forward declarations |
|
26 class TXnUiEngineAppIf; |
|
27 class CXnNodeAppIf; |
|
28 class CXnDomNode; |
|
29 class CXnAppUiAdapterImpl; |
|
30 class CXnUiEngine; |
|
31 class CXnUiStateListener; |
|
32 class CXnViewManager; |
|
33 class CXnViewAdapter; |
|
34 class MHsContentControlUi; |
|
35 class CXnEffectManager; |
|
36 class MHsContentControl; |
|
37 // Class declaration |
|
38 /** |
|
39 * Avkon adapter for Xuikon. |
|
40 * |
|
41 * @ingroup group_xnlayoutengine |
|
42 * @lib xnlayoutengine.lib |
|
43 * @since Series 60 3.1 |
|
44 */ |
|
45 class CXnAppUiAdapter : public CAknViewAppUi |
|
46 { |
|
47 public: |
|
48 /** |
|
49 * C++ default constructor. |
|
50 * |
|
51 * @param aApplicationUid Application UID |
|
52 */ |
|
53 IMPORT_C CXnAppUiAdapter( TUid aApplicationUid ); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 IMPORT_C virtual ~CXnAppUiAdapter(); |
|
59 |
|
60 public: |
|
61 // New functions |
|
62 |
|
63 /** |
|
64 * Get the UI engine |
|
65 * |
|
66 * @since Series 60 3.1 |
|
67 * @return UI engine |
|
68 */ |
|
69 IMPORT_C TXnUiEngineAppIf* UiEngineL(); |
|
70 |
|
71 /** |
|
72 * Handle interaction notification from the engine |
|
73 * |
|
74 * @since Series 60 3.1 |
|
75 * @param aOrigin Node that originated the event |
|
76 * @param aTrigger Trigger information of the event, as created by event |
|
77 * originator |
|
78 * @param aTriggerDefinition Trigger information as it exists in the action |
|
79 * definition in xml |
|
80 * @param aEvent Event information of the event |
|
81 */ |
|
82 IMPORT_C virtual void HandleXuikonEventL( |
|
83 CXnNodeAppIf& aOrigin, |
|
84 CXnNodeAppIf& aTrigger, |
|
85 CXnDomNode& aTriggerDefinition, |
|
86 CXnDomNode& aEvent ); |
|
87 |
|
88 /** |
|
89 * Handles data plugin loading. |
|
90 * To be overriden by subclass. |
|
91 * |
|
92 * @since S60 5.0 |
|
93 * @param aList list of plugins to load |
|
94 */ |
|
95 IMPORT_C virtual void LoadDataPluginsL( |
|
96 RPointerArray< CXnNodeAppIf >& aList ); |
|
97 |
|
98 /** |
|
99 * Handles data plugin destroying. |
|
100 * To be overriden by subclass. |
|
101 * |
|
102 * @since S60 5.0 |
|
103 * @param aList list of plugins to destroy |
|
104 */ |
|
105 IMPORT_C virtual void DestroyDataPluginsL( |
|
106 RPointerArray< CXnNodeAppIf >& aList ); |
|
107 |
|
108 /** |
|
109 * Handles dynamic menuitem element initialisation. |
|
110 * To be overriden by subclass. |
|
111 * |
|
112 * @since S60 5.0 |
|
113 * @param aItemType Menuitem type |
|
114 * @param aList List of data plugins |
|
115 * @return ETrue if menuitem should be shown, EFalse otherwise |
|
116 */ |
|
117 IMPORT_C virtual TBool DynInitMenuItemL( |
|
118 const TDesC& aItemType, |
|
119 RPointerArray< CXnNodeAppIf >* aList = NULL ); |
|
120 |
|
121 /** |
|
122 * Determines and sets data plugins to online. |
|
123 * To be overriden by subclass. |
|
124 * |
|
125 * @since S60 5.0 |
|
126 * @param aList List of data plugins |
|
127 */ |
|
128 IMPORT_C virtual void SetOnlineStateL( |
|
129 RPointerArray< CXnNodeAppIf >& aList ); |
|
130 |
|
131 /* |
|
132 * Returns the Xml Ui view as CAknView reference. |
|
133 * |
|
134 * @since S60 5.0 |
|
135 * @return Xml Ui View |
|
136 */ |
|
137 IMPORT_C CAknView& CXnAppUiAdapter::View() const; |
|
138 |
|
139 /** |
|
140 * Handles page switch changes |
|
141 * To be overriden by subclass. |
|
142 * |
|
143 * @since S60 5.0 |
|
144 */ |
|
145 IMPORT_C virtual void HandlePageSwitch(); |
|
146 |
|
147 /** |
|
148 * Handles changes when entering or exiting edit mode |
|
149 * To be overriden by subclass. |
|
150 * |
|
151 * @since S60 5.0 |
|
152 * @param aEnter enter or exit edit mode |
|
153 */ |
|
154 IMPORT_C virtual void HandleEnterEditModeL( TBool aEnter ); |
|
155 |
|
156 public: |
|
157 /** |
|
158 * From CEikAppUi. |
|
159 * Second-phase constructor |
|
160 * |
|
161 * @since Series 60 3.1 |
|
162 */ |
|
163 IMPORT_C void ConstructL(); |
|
164 |
|
165 protected: |
|
166 |
|
167 /** |
|
168 * From CAknAppUi. |
|
169 * |
|
170 * @since Series 60 3.1 |
|
171 */ |
|
172 IMPORT_C void HandleResourceChangeL( TInt aType ); |
|
173 |
|
174 public: |
|
175 // new functions |
|
176 |
|
177 /** |
|
178 * Reloads the UI |
|
179 */ |
|
180 void ReloadUiL(); |
|
181 |
|
182 /** |
|
183 * Gets UiEngine |
|
184 * |
|
185 * @since S60 5.0 |
|
186 * @return UiEngine |
|
187 */ |
|
188 CXnUiEngine& UiEngine() const; |
|
189 |
|
190 /** |
|
191 * Gets ViewManager |
|
192 * |
|
193 * @since S60 5.0 |
|
194 * @return ViewManager |
|
195 */ |
|
196 CXnViewManager& ViewManager() const; |
|
197 |
|
198 /** |
|
199 * Gets ViewAdapter |
|
200 * |
|
201 * @since S60 5.0 |
|
202 * @return ViewAdapter |
|
203 */ |
|
204 CXnViewAdapter& ViewAdapter() const; |
|
205 |
|
206 /** |
|
207 * Gets UiStateListener |
|
208 * |
|
209 * @since S60 5.0 |
|
210 * @return UiStateListener |
|
211 */ |
|
212 CXnUiStateListener& UiStateListener() const; |
|
213 |
|
214 /** |
|
215 * Gets a Content Control UI |
|
216 * |
|
217 * @since S60 5.0 |
|
218 * @param aType Content control UI type |
|
219 * @return Interface to content control UI, NULL if not present |
|
220 */ |
|
221 MHsContentControlUi* HsContentController( const TDesC8& aType ) const; |
|
222 |
|
223 /** |
|
224 * Get effect manager |
|
225 * |
|
226 * @since S60 5.0 |
|
227 * @return effect manager |
|
228 */ |
|
229 CXnEffectManager* EffectManager() const; |
|
230 |
|
231 /** |
|
232 * Gets a Content Control server interface |
|
233 * |
|
234 * @since S60 5.0 |
|
235 * @return Interface to content control server, NULL if not present |
|
236 */ |
|
237 MHsContentControl* HsContentControlSrv() const; |
|
238 |
|
239 /** |
|
240 * Queries whether the focus control is visible |
|
241 * |
|
242 * @since S60 5.0 |
|
243 * @return ETrue focus is shown, EFalse otherwise |
|
244 */ |
|
245 TBool FocusShown() const; |
|
246 |
|
247 /** |
|
248 * Makes focus control invisible |
|
249 * |
|
250 * @since S60 5.0 |
|
251 */ |
|
252 void HideFocus(); |
|
253 |
|
254 /** |
|
255 * Makes focus control visible |
|
256 * |
|
257 * @since S60 5.0 |
|
258 */ |
|
259 void ShowFocus(); |
|
260 |
|
261 private: |
|
262 // Data |
|
263 |
|
264 /** |
|
265 * application uid |
|
266 */ |
|
267 TUid iApplicationUid; |
|
268 |
|
269 /** |
|
270 * appui adapter impl. |
|
271 * Own. |
|
272 */ |
|
273 CXnAppUiAdapterImpl* iImpl; |
|
274 |
|
275 /** |
|
276 * Proxy to UiEngine. |
|
277 * Own. |
|
278 */ |
|
279 TXnUiEngineAppIf* iUiEngineAppIf; |
|
280 }; |
|
281 |
|
282 #endif |
|
283 |
|
284 // End of file |