|
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: test functions for alfvisual.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // [INCLUDE FILES] |
|
21 #include <e32svr.h> |
|
22 #include <stifparser.h> |
|
23 #include <stiftestinterface.h> |
|
24 |
|
25 #include "testplatalfvisual.h" |
|
26 |
|
27 |
|
28 // ============================ MEMBER FUNCTIONS =============================== |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // CTestPlatAlfVisual::TestAlfDisplayBgItemConstructor |
|
32 // ----------------------------------------------------------------------------- |
|
33 // |
|
34 TInt CTestPlatAlfVisual::TestAlfDisplayBgItemConstructor( CStifItemParser& /*aItem*/ ) |
|
35 { |
|
36 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
37 _LIT( KTestAlfDisplayBgItemConstructor, "TestAlfDisplayBgItemConstructor" ); |
|
38 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfDisplayBgItemConstructor ); |
|
39 // Print to log file |
|
40 iLog->Log( KTestAlfDisplayBgItemConstructor ); |
|
41 |
|
42 TAlfDisplayBackgroundItem vItem1; |
|
43 |
|
44 TRect rect( 0, 0, 1, 1 ); |
|
45 TAlfDisplayBackgroundItem vItem2( rect ); |
|
46 |
|
47 TAknsItemID vId; |
|
48 TAlfDisplayBackgroundItem vItem3( rect, vId ); |
|
49 |
|
50 TAlfDisplayBackgroundItem vItem4( rect, vId, 0 ); |
|
51 |
|
52 TRgb vRgb( KRgbBlack ); |
|
53 TAlfDisplayBackgroundItem vItem5( rect, vRgb ); |
|
54 |
|
55 return KErrNone; |
|
56 } |
|
57 |
|
58 // ----------------------------------------------------------------------------- |
|
59 // CTestPlatAlfVisual::TestAlfDisplayBgItemSetAttributes |
|
60 // ----------------------------------------------------------------------------- |
|
61 // |
|
62 TInt CTestPlatAlfVisual::TestAlfDisplayBgItemSetAttributes( CStifItemParser& /*aItem*/ ) |
|
63 { |
|
64 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
65 _LIT( KTestAlfDisplayBgItemSetAttributes, "TestAlfDisplayBgItemSetAttributes" ); |
|
66 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfDisplayBgItemSetAttributes ); |
|
67 // Print to log file |
|
68 iLog->Log( KTestAlfDisplayBgItemSetAttributes ); |
|
69 |
|
70 TRgb vRgb( KRgbBlack ); |
|
71 TAknsItemID vId; |
|
72 TRect rect( 0, 0, 1, 1 ); |
|
73 TAlfDisplayBackgroundItem vItem; |
|
74 vItem.SetRect( rect ); |
|
75 vItem.SetColor( vRgb ); |
|
76 vItem.SetColor( vId, 0 ); |
|
77 vItem.SetSkinBackground( vId ); |
|
78 return KErrNone; |
|
79 } |
|
80 |
|
81 // End of file |
|
82 |
|
83 |