|
1 /* |
|
2 * Copyright (c) 2002 - 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: for testing the method of the CHuiVisual |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <uiacceltk\huitexturemanager.h> |
|
19 #include <uiacceltk\HuiImageLoaderUtil.h> |
|
20 |
|
21 #include "testuiaifcoretoolkit.h" |
|
22 |
|
23 const TInt KTextureId = 0x80000001; |
|
24 const TInt KTextureNewId = 0x80000002; |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // Ctestplatalfcoretoolkit::TestHuiTxureManagerEnv |
|
28 // ----------------------------------------------------------------------------- |
|
29 // |
|
30 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerEnvL( CStifItemParser& /*aItem*/ ) |
|
31 { |
|
32 |
|
33 // Print to UI |
|
34 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
35 _LIT( KTestHuiTxureManagerEnv, "In TestHuiTxureManagerEnv" ); |
|
36 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerEnv ); |
|
37 // Print to log file |
|
38 iLog->Log( KTestHuiTxureManagerEnv ); |
|
39 |
|
40 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
41 |
|
42 CHuiEnv* env = &( txureManager->Env() ); |
|
43 |
|
44 STIF_ASSERT_NOT_NULL( env ); |
|
45 |
|
46 return KErrNone; |
|
47 |
|
48 } |
|
49 |
|
50 // ----------------------------------------------------------------------------- |
|
51 // Ctestplatalfcoretoolkit::TestHuiTxureManagerTexture |
|
52 // ----------------------------------------------------------------------------- |
|
53 // |
|
54 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerTextureL( CStifItemParser& /*aItem*/ ) |
|
55 { |
|
56 |
|
57 // Print to UI |
|
58 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
59 _LIT( KTestHuiTxureManagerTexture, "In TestHuiTxureManagerTexture" ); |
|
60 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerTexture ); |
|
61 // Print to log file |
|
62 iLog->Log( KTestHuiTxureManagerTexture ); |
|
63 |
|
64 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
65 |
|
66 CHuiTexture* texture = txureManager->Texture( KTextureId ); |
|
67 CleanupStack::PushL( texture ); |
|
68 STIF_ASSERT_NOT_NULL( texture ) |
|
69 CleanupStack::PopAndDestroy( texture ); |
|
70 |
|
71 return KErrNone; |
|
72 |
|
73 } |
|
74 |
|
75 // ----------------------------------------------------------------------------- |
|
76 // Ctestplatalfcoretoolkit::TestHuiTxureManagerTextureConst |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerTextureConstL( CStifItemParser& /*aItem*/ ) |
|
80 { |
|
81 |
|
82 // Print to UI |
|
83 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
84 _LIT( KTestHuiTxureManagerTextureConst, "In TestHuiTxureManagerTextureConst" ); |
|
85 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerTextureConst ); |
|
86 // Print to log file |
|
87 iLog->Log( KTestHuiTxureManagerTextureConst ); |
|
88 |
|
89 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
90 |
|
91 const CHuiTexture* texture = const_cast<const CHuiTextureManager*>( txureManager )->Texture( KTextureId ); |
|
92 |
|
93 STIF_ASSERT_NOT_NULL( texture ); |
|
94 |
|
95 return KErrNone; |
|
96 |
|
97 } |
|
98 |
|
99 // ----------------------------------------------------------------------------- |
|
100 // Ctestplatalfcoretoolkit::TestHuiTxureManagerTextureL |
|
101 // ----------------------------------------------------------------------------- |
|
102 // |
|
103 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerTextureLL( CStifItemParser& /*aItem*/ ) |
|
104 { |
|
105 |
|
106 // Print to UI |
|
107 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
108 _LIT( KTestHuiTxureManagerTextureL, "In TestHuiTxureManagerTextureL" ); |
|
109 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerTextureL ); |
|
110 // Print to log file |
|
111 iLog->Log( KTestHuiTxureManagerTextureL ); |
|
112 |
|
113 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
114 |
|
115 CHuiTexture* texture = txureManager->TextureL( KTextureId ); |
|
116 |
|
117 STIF_ASSERT_NOT_NULL( texture ); |
|
118 |
|
119 return KErrNone; |
|
120 |
|
121 } |
|
122 |
|
123 // ----------------------------------------------------------------------------- |
|
124 // Ctestplatalfcoretoolkit::TestHuiTxureManagerSetImagePathL |
|
125 // ----------------------------------------------------------------------------- |
|
126 // |
|
127 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerSetImagePathL( CStifItemParser& /*aItem*/ ) |
|
128 { |
|
129 |
|
130 // Print to UI |
|
131 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
132 _LIT( KTestHuiTxureManagerSetImagePathL, "In TestHuiTxureManagerSetImagePathL" ); |
|
133 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerSetImagePathL ); |
|
134 // Print to log file |
|
135 iLog->Log( KTestHuiTxureManagerSetImagePathL ); |
|
136 |
|
137 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
138 |
|
139 TRAPD( error, txureManager->SetImagePathL( _L("c:\\data\\images\\") ) ); |
|
140 |
|
141 return error; |
|
142 |
|
143 } |
|
144 |
|
145 // ----------------------------------------------------------------------------- |
|
146 // Ctestplatalfcoretoolkit::TestHuiTxureManagerImagePath |
|
147 // ----------------------------------------------------------------------------- |
|
148 // |
|
149 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerImagePath( CStifItemParser& /*aItem*/ ) |
|
150 { |
|
151 |
|
152 // Print to UI |
|
153 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
154 _LIT( KTestHuiTxureManagerImagePath, "In TestHuiTxureManagerImagePath" ); |
|
155 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerImagePath ); |
|
156 // Print to log file |
|
157 iLog->Log( KTestHuiTxureManagerImagePath ); |
|
158 |
|
159 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
160 |
|
161 txureManager->ImagePath(); |
|
162 |
|
163 return KErrNone; |
|
164 |
|
165 } |
|
166 |
|
167 // ----------------------------------------------------------------------------- |
|
168 // Ctestplatalfcoretoolkit::TestHuiTxureManagerBlankTextureConstL |
|
169 // ----------------------------------------------------------------------------- |
|
170 // |
|
171 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerBlankTextureConstL( CStifItemParser& /*aItem*/ ) |
|
172 { |
|
173 |
|
174 // Print to UI |
|
175 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
176 _LIT( KTestHuiTxureManagerBlankTextureConst, "In TestHuiTxureManagerBlankTextureConst" ); |
|
177 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerBlankTextureConst ); |
|
178 // Print to log file |
|
179 iLog->Log( KTestHuiTxureManagerBlankTextureConst ); |
|
180 |
|
181 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
182 |
|
183 const CHuiTexture* texture = &( const_cast<const CHuiTextureManager*>( txureManager )->BlankTexture() ); |
|
184 |
|
185 STIF_ASSERT_NOT_NULL( texture ); |
|
186 |
|
187 return KErrNone; |
|
188 |
|
189 } |
|
190 |
|
191 // ----------------------------------------------------------------------------- |
|
192 // Ctestplatalfcoretoolkit::TestHuiTxureManagerBlankTexture |
|
193 // ----------------------------------------------------------------------------- |
|
194 // |
|
195 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerBlankTextureL( CStifItemParser& /*aItem*/ ) |
|
196 { |
|
197 |
|
198 // Print to UI |
|
199 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
200 _LIT( KTestHuiTxureManagerBlankTexture, "In TestHuiTxureManagerBlankTexture" ); |
|
201 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerBlankTexture ); |
|
202 // Print to log file |
|
203 iLog->Log( KTestHuiTxureManagerBlankTexture ); |
|
204 |
|
205 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
206 |
|
207 CHuiTexture* texture = &( txureManager->BlankTexture() ); |
|
208 |
|
209 STIF_ASSERT_NOT_NULL( texture ); |
|
210 |
|
211 return KErrNone; |
|
212 |
|
213 } |
|
214 |
|
215 // ----------------------------------------------------------------------------- |
|
216 // Ctestplatalfcoretoolkit::TestHuiTxureManagerLoadTextureL |
|
217 // ----------------------------------------------------------------------------- |
|
218 // |
|
219 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerLoadTextureL( CStifItemParser& /*aItem*/ ) |
|
220 { |
|
221 |
|
222 // Print to UI |
|
223 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
224 _LIT( KTestHuiTxureManagerLoadTextureL, "In TestHuiTxureManagerLoadTextureL" ); |
|
225 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerLoadTextureL ); |
|
226 // Print to log file |
|
227 iLog->Log( KTestHuiTxureManagerLoadTextureL ); |
|
228 |
|
229 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
230 |
|
231 txureManager->LoadTextureL( _L("test.bmp") ); |
|
232 |
|
233 return KErrNone; |
|
234 |
|
235 } |
|
236 |
|
237 // ----------------------------------------------------------------------------- |
|
238 // Ctestplatalfcoretoolkit::TestHuiTxureManagerLoadTextureLWithSize |
|
239 // ----------------------------------------------------------------------------- |
|
240 // |
|
241 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerLoadTextureLWithIdL( CStifItemParser& /*aItem*/ ) |
|
242 { |
|
243 |
|
244 // Print to UI |
|
245 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
246 _LIT( KTestHuiTxureManagerLoadTextureLWithSize, "In TestHuiTxureManagerLoadTextureLWithSize" ); |
|
247 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerLoadTextureLWithSize ); |
|
248 // Print to log file |
|
249 iLog->Log( KTestHuiTxureManagerLoadTextureLWithSize ); |
|
250 |
|
251 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
252 |
|
253 txureManager->LoadTextureL( KTextureId ); |
|
254 |
|
255 return KErrNone; |
|
256 |
|
257 } |
|
258 |
|
259 // ----------------------------------------------------------------------------- |
|
260 // Ctestplatalfcoretoolkit::TestHuiTxureManagerLoadTextureLWithSizeImage |
|
261 // ----------------------------------------------------------------------------- |
|
262 // |
|
263 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerLoadTextureLWithSizeImageL( CStifItemParser& /*aItem*/ ) |
|
264 { |
|
265 |
|
266 // Print to UI |
|
267 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
268 _LIT( KTestHuiTxureManagerLoadTextureLWithSizeImage, "In TestHuiTxureManagerLoadTextureLWithSizeImage" ); |
|
269 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerLoadTextureLWithSizeImage ); |
|
270 // Print to log file |
|
271 iLog->Log( KTestHuiTxureManagerLoadTextureLWithSizeImage ); |
|
272 |
|
273 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
274 |
|
275 txureManager->LoadTextureL( _L("test.bmp"), TSize( 0, 0 ) ); |
|
276 |
|
277 return KErrNone; |
|
278 |
|
279 } |
|
280 |
|
281 // ----------------------------------------------------------------------------- |
|
282 // Ctestplatalfcoretoolkit::TestHuiTxureManagerCreateTextureL |
|
283 // ----------------------------------------------------------------------------- |
|
284 // |
|
285 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerCreateTextureL( CStifItemParser& /*aItem*/ ) |
|
286 { |
|
287 |
|
288 // Print to UI |
|
289 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
290 _LIT( KTestHuiTxureManagerCreateTextureL, "In TestHuiTxureManagerCreateTextureL" ); |
|
291 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerCreateTextureL ); |
|
292 // Print to log file |
|
293 iLog->Log( KTestHuiTxureManagerCreateTextureL ); |
|
294 |
|
295 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
296 |
|
297 CHuiImageLoaderUtil* iImageLoaderUtil = new (ELeave) CHuiImageLoaderUtil(); |
|
298 |
|
299 THuiTextureUploadFlags flag = (THuiTextureUploadFlags)( |
|
300 EHuiTextureUploadFlagGenerateShadow | |
|
301 EHuiTextureUploadFlagRetainResolution ); |
|
302 |
|
303 TUid tUid = { KTextureId }; |
|
304 |
|
305 MHuiBitmapProvider* bmpProvider = iImageLoaderUtil->CreateImageLoaderL( tUid, EAknsAppIconTypeList ); |
|
306 |
|
307 CHuiTexture* tex = & ( txureManager->CreateTextureL( KTextureId, bmpProvider, flag ) ); |
|
308 |
|
309 STIF_ASSERT_NOT_NULL( tex ); |
|
310 |
|
311 return KErrNone; |
|
312 |
|
313 } |
|
314 |
|
315 // ----------------------------------------------------------------------------- |
|
316 // Ctestplatalfcoretoolkit::TestHuiTxureManagerUpdateTextureFromBitmapL |
|
317 // ----------------------------------------------------------------------------- |
|
318 // |
|
319 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerUpdateTextureFromBitmapL( CStifItemParser& /*aItem*/ ) |
|
320 { |
|
321 |
|
322 // Print to UI |
|
323 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
324 _LIT( KTestHuiTxureManagerUpdateTextureFromBitmapL, "In TestHuiTxureManagerUpdateTextureFromBitmapL" ); |
|
325 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerUpdateTextureFromBitmapL ); |
|
326 // Print to log file |
|
327 iLog->Log( KTestHuiTxureManagerUpdateTextureFromBitmapL ); |
|
328 |
|
329 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
330 |
|
331 txureManager->UpdateTextureFromBitmapL( KTextureId ); |
|
332 |
|
333 return KErrNone; |
|
334 |
|
335 } |
|
336 |
|
337 // ----------------------------------------------------------------------------- |
|
338 // Ctestplatalfcoretoolkit::TestHuiTxureManagerUnloadTexture |
|
339 // ----------------------------------------------------------------------------- |
|
340 // |
|
341 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerUnloadTexture( CStifItemParser& /*aItem*/ ) |
|
342 { |
|
343 |
|
344 // Print to UI |
|
345 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
346 _LIT( KTestHuiTxureManagerUnloadTexture, "In TestHuiTxureManagerUnloadTexture" ); |
|
347 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerUnloadTexture ); |
|
348 // Print to log file |
|
349 iLog->Log( KTestHuiTxureManagerUnloadTexture ); |
|
350 |
|
351 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
352 |
|
353 txureManager->UnloadTexture( _L("test.bmp") ); |
|
354 |
|
355 return KErrNone; |
|
356 |
|
357 } |
|
358 |
|
359 // ----------------------------------------------------------------------------- |
|
360 // Ctestplatalfcoretoolkit::TestHuiTxureManagerUnloadTextureWithID |
|
361 // ----------------------------------------------------------------------------- |
|
362 // |
|
363 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerUnloadTextureWithID( CStifItemParser& /*aItem*/ ) |
|
364 { |
|
365 |
|
366 // Print to UI |
|
367 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
368 _LIT( KTestHuiTxureManagerUnloadTextureWithID, "In TestHuiTxureManagerUnloadTextureWithID" ); |
|
369 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerUnloadTextureWithID ); |
|
370 // Print to log file |
|
371 iLog->Log( KTestHuiTxureManagerUnloadTextureWithID ); |
|
372 |
|
373 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
374 |
|
375 txureManager->UnloadTexture( KTextureId ); |
|
376 |
|
377 return KErrNone; |
|
378 |
|
379 } |
|
380 |
|
381 // ----------------------------------------------------------------------------- |
|
382 // Ctestplatalfcoretoolkit::TestHuiTxureManagerDefineFileNameL |
|
383 // ----------------------------------------------------------------------------- |
|
384 // |
|
385 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerDefineFileNameL( CStifItemParser& /*aItem*/ ) |
|
386 { |
|
387 |
|
388 // Print to UI |
|
389 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
390 _LIT( KTestHuiTxureManagerDefineFileNameL, "In TestHuiTxureManagerDefineFileNameL" ); |
|
391 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerDefineFileNameL ); |
|
392 // Print to log file |
|
393 iLog->Log( KTestHuiTxureManagerDefineFileNameL ); |
|
394 |
|
395 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
396 |
|
397 txureManager->DefineFileNameL( KTextureId, _L("test.bmp") ); |
|
398 |
|
399 return KErrNone; |
|
400 |
|
401 } |
|
402 |
|
403 // ----------------------------------------------------------------------------- |
|
404 // Ctestplatalfcoretoolkit::TestHuiTxureManagerLoadQueueCount |
|
405 // ----------------------------------------------------------------------------- |
|
406 // |
|
407 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerLoadQueueCount( CStifItemParser& /*aItem*/ ) |
|
408 { |
|
409 |
|
410 // Print to UI |
|
411 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
412 _LIT( KTestHuiTxureManagerLoadQueueCount, "In TestHuiTxureManagerLoadQueueCount" ); |
|
413 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerLoadQueueCount ); |
|
414 // Print to log file |
|
415 iLog->Log( KTestHuiTxureManagerLoadQueueCount ); |
|
416 |
|
417 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
418 |
|
419 txureManager->LoadQueueCount(); |
|
420 |
|
421 return KErrNone; |
|
422 |
|
423 } |
|
424 |
|
425 // ----------------------------------------------------------------------------- |
|
426 // Ctestplatalfcoretoolkit::TestHuiTxureManagerState |
|
427 // ----------------------------------------------------------------------------- |
|
428 // |
|
429 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerState( CStifItemParser& /*aItem*/ ) |
|
430 { |
|
431 |
|
432 // Print to UI |
|
433 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
434 _LIT( KTestHuiTxureManagerState, "In TestHuiTxureManagerState" ); |
|
435 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerState ); |
|
436 // Print to log file |
|
437 iLog->Log( KTestHuiTxureManagerState ); |
|
438 |
|
439 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
440 |
|
441 txureManager->State(); |
|
442 |
|
443 return KErrNone; |
|
444 |
|
445 } |
|
446 |
|
447 // ----------------------------------------------------------------------------- |
|
448 // Ctestplatalfcoretoolkit::TestHuiTxureManagerProcessor |
|
449 // ----------------------------------------------------------------------------- |
|
450 // |
|
451 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerProcessorL( CStifItemParser& /*aItem*/ ) |
|
452 { |
|
453 |
|
454 // Print to UI |
|
455 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
456 _LIT( KTestHuiTxureManagerProcessor, "In TestHuiTxureManagerProcessor" ); |
|
457 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerProcessor ); |
|
458 // Print to log file |
|
459 iLog->Log( KTestHuiTxureManagerProcessor ); |
|
460 |
|
461 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
462 |
|
463 CHuiTextureProcessor* processor = &( txureManager->Processor() ); |
|
464 |
|
465 STIF_ASSERT_NOT_NULL( processor ); |
|
466 |
|
467 return KErrNone; |
|
468 |
|
469 } |
|
470 |
|
471 // ----------------------------------------------------------------------------- |
|
472 // Ctestplatalfcoretoolkit::TestHuiTxureManagerPrependImagePath |
|
473 // ----------------------------------------------------------------------------- |
|
474 // |
|
475 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerPrependImagePath( CStifItemParser& /*aItem*/ ) |
|
476 { |
|
477 |
|
478 // Print to UI |
|
479 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
480 _LIT( KTestHuiTxureManagerPrependImagePath, "In TestHuiTxureManagerPrependImagePath" ); |
|
481 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerPrependImagePath ); |
|
482 // Print to log file |
|
483 iLog->Log( KTestHuiTxureManagerPrependImagePath ); |
|
484 |
|
485 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
486 |
|
487 TBuf<30> buf; |
|
488 |
|
489 txureManager->PrependImagePath( buf ); |
|
490 |
|
491 return KErrNone; |
|
492 |
|
493 } |
|
494 |
|
495 // ----------------------------------------------------------------------------- |
|
496 // Ctestplatalfcoretoolkit::TestHuiTxureManagerSetTextureId |
|
497 // ----------------------------------------------------------------------------- |
|
498 // |
|
499 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerSetTextureId( CStifItemParser& /*aItem*/ ) |
|
500 { |
|
501 |
|
502 // Print to UI |
|
503 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
504 _LIT( KTestHuiTxureManagerSetTextureId, "In TestHuiTxureManagerSetTextureId" ); |
|
505 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerSetTextureId ); |
|
506 // Print to log file |
|
507 iLog->Log( KTestHuiTxureManagerSetTextureId ); |
|
508 |
|
509 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
510 |
|
511 CHuiTexture* texture = txureManager->Texture( KTextureId ); |
|
512 |
|
513 txureManager->SetTextureId( texture, KTextureNewId ); |
|
514 |
|
515 return KErrNone; |
|
516 |
|
517 } |
|
518 |
|
519 // ----------------------------------------------------------------------------- |
|
520 // Ctestplatalfcoretoolkit::TestHuiTxureManagerIsLoaded |
|
521 // ----------------------------------------------------------------------------- |
|
522 // |
|
523 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerIsLoaded( CStifItemParser& /*aItem*/ ) |
|
524 { |
|
525 |
|
526 // Print to UI |
|
527 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
528 _LIT( KTestHuiTxureManagerIsLoaded, "In TestHuiTxureManagerIsLoaded" ); |
|
529 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerIsLoaded ); |
|
530 // Print to log file |
|
531 iLog->Log( KTestHuiTxureManagerIsLoaded ); |
|
532 |
|
533 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
534 |
|
535 txureManager->IsLoaded( _L("test.bmp") ); |
|
536 |
|
537 return KErrNone; |
|
538 |
|
539 } |
|
540 |
|
541 // ----------------------------------------------------------------------------- |
|
542 // Ctestplatalfcoretoolkit::TestHuiTxureManagerIsLoadedWithID |
|
543 // ----------------------------------------------------------------------------- |
|
544 // |
|
545 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerIsLoadedWithID( CStifItemParser& /*aItem*/ ) |
|
546 { |
|
547 |
|
548 // Print to UI |
|
549 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
550 _LIT( KTestHuiTxureManagerIsLoadedWithID, "In TestHuiTxureManagerIsLoadedWithID" ); |
|
551 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerIsLoadedWithID ); |
|
552 // Print to log file |
|
553 iLog->Log( KTestHuiTxureManagerIsLoadedWithID ); |
|
554 |
|
555 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
556 |
|
557 TBool flag = txureManager->IsLoaded( KTextureId ); |
|
558 |
|
559 STIF_ASSERT_TRUE( flag ); |
|
560 |
|
561 return KErrNone; |
|
562 |
|
563 } |
|
564 |
|
565 // ----------------------------------------------------------------------------- |
|
566 // Ctestplatalfcoretoolkit::TestHuiTxureManagerIsLoadedWithTexture |
|
567 // ----------------------------------------------------------------------------- |
|
568 // |
|
569 TInt CTestUiAifCoreToolkit::TestHuiTxureManagerIsLoadedWithTexture( CStifItemParser& /*aItem*/ ) |
|
570 { |
|
571 |
|
572 // Print to UI |
|
573 _LIT( Ktestplatalfcoretoolkit, "testplatalfcoretoolkit" ); |
|
574 _LIT( KTestHuiTxureManagerIsLoadedWithTexture, "In TestHuiTxureManagerIsLoadedWithTexture" ); |
|
575 TestModuleIf().Printf( 0, Ktestplatalfcoretoolkit, KTestHuiTxureManagerIsLoadedWithTexture ); |
|
576 // Print to log file |
|
577 iLog->Log( KTestHuiTxureManagerIsLoadedWithTexture ); |
|
578 |
|
579 CHuiTextureManager* txureManager = &( iHuiEnv->TextureManager() ); |
|
580 |
|
581 CHuiTexture* texture = txureManager->Texture( KTextureId ); |
|
582 |
|
583 TBool flag = txureManager->IsLoaded( texture ); |
|
584 |
|
585 STIF_ASSERT_TRUE( flag ); |
|
586 |
|
587 return KErrNone; |
|
588 |
|
589 } |
|
590 |
|
591 // End of file |