|
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::TestAlfDisplayForBackgroundL |
|
32 // ----------------------------------------------------------------------------- |
|
33 // |
|
34 TInt CTestPlatAlfVisual::TestAlfDisplayForBackgroundL( CStifItemParser& /*aItem*/ ) |
|
35 { |
|
36 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
37 _LIT( KTestAlfDisplayForBackgroundL, "TestAlfDisplayForBackgroundL" ); |
|
38 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfDisplayForBackgroundL ); |
|
39 // Print to log file |
|
40 iLog->Log( KTestAlfDisplayForBackgroundL ); |
|
41 |
|
42 iAlfDisplay->SetClearBackgroundL( CAlfDisplay::EClearWithColor ); |
|
43 RArray<TAlfDisplayBackgroundItem> vArray( 1 ); |
|
44 iAlfDisplay->SetBackgroundItemsL( vArray ); |
|
45 |
|
46 return KErrNone; |
|
47 } |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CTestPlatAlfVisual::TestAlfDisplayForRoster |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 TInt CTestPlatAlfVisual::TestAlfDisplayForRoster( CStifItemParser& /*aItem*/ ) |
|
54 { |
|
55 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
56 _LIT( KTestAlfDisplayForRoster, "TestAlfDisplayForRoster" ); |
|
57 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfDisplayForRoster ); |
|
58 // Print to log file |
|
59 iLog->Log( KTestAlfDisplayForRoster ); |
|
60 |
|
61 iAlfDisplay->Roster(); |
|
62 ( ( const CAlfDisplay*) iAlfDisplay )->Roster(); |
|
63 |
|
64 return KErrNone; |
|
65 } |
|
66 |
|
67 // ----------------------------------------------------------------------------- |
|
68 // CTestPlatAlfVisual::TestAlfDisplayForVisibleArea |
|
69 // ----------------------------------------------------------------------------- |
|
70 // |
|
71 TInt CTestPlatAlfVisual::TestAlfDisplayForVisibleArea( CStifItemParser& /*aItem*/ ) |
|
72 { |
|
73 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
74 _LIT( KTestAlfDisplayForVisibleAreaL, "TestAlfDisplayForVisibleAreaL" ); |
|
75 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfDisplayForVisibleAreaL ); |
|
76 // Print to log file |
|
77 iLog->Log( KTestAlfDisplayForVisibleAreaL ); |
|
78 TRect rect( 0, 0, 1, 1 ); |
|
79 iAlfDisplay->SetVisibleArea( rect ); |
|
80 // iAlfDisplay->ForceSetVisibleArea( rect ); |
|
81 iAlfDisplay->VisibleArea(); |
|
82 |
|
83 return KErrNone; |
|
84 } |
|
85 |
|
86 // ----------------------------------------------------------------------------- |
|
87 // CTestPlatAlfVisual::TestAlfDisplayForSetAttributesL |
|
88 // ----------------------------------------------------------------------------- |
|
89 // |
|
90 TInt CTestPlatAlfVisual::TestAlfDisplayForSetAttributesL( CStifItemParser& /*aItem*/ ) |
|
91 { |
|
92 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
93 _LIT( KTestAlfDisplayForSetAttributesL, "TestAlfDisplayForSetAttributesL" ); |
|
94 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfDisplayForSetAttributesL ); |
|
95 // Print to log file |
|
96 iLog->Log( KTestAlfDisplayForSetAttributesL ); |
|
97 |
|
98 // iAlfDisplay->SetFocusedEditor( NULL ); |
|
99 iAlfDisplay->SetQuality( EAlfQualityFast ); |
|
100 iAlfDisplay->SetDirty(); |
|
101 iAlfDisplay->SetUseDepth( EFalse ); |
|
102 iAlfDisplay->SetUsageL( EAlfDisplayUsageGeneric ); |
|
103 return KErrNone; |
|
104 } |
|
105 |
|
106 // ----------------------------------------------------------------------------- |
|
107 // CTestPlatAlfVisual::TestAlfDisplayGetAttributes |
|
108 // ----------------------------------------------------------------------------- |
|
109 // |
|
110 TInt CTestPlatAlfVisual::TestAlfDisplayGetAttributes( CStifItemParser& /*aItem*/ ) |
|
111 { |
|
112 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
113 _LIT( KTestAlfDisplayGetAttributes, "TestAlfDisplayGetAttributes" ); |
|
114 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfDisplayGetAttributes ); |
|
115 // Print to log file |
|
116 iLog->Log( KTestAlfDisplayGetAttributes ); |
|
117 |
|
118 iAlfDisplay->Env(); |
|
119 iAlfDisplay->Quality(); |
|
120 iAlfDisplay->ObjectProvider(); |
|
121 |
|
122 return KErrNone; |
|
123 } |
|
124 |
|
125 // ----------------------------------------------------------------------------- |
|
126 // CTestPlatAlfVisual::TestAlfDisplayFading |
|
127 // ----------------------------------------------------------------------------- |
|
128 // |
|
129 TInt CTestPlatAlfVisual::TestAlfDisplayFading( CStifItemParser& /*aItem*/ ) |
|
130 { |
|
131 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
132 _LIT( KTestAlfDisplayFading, "TestAlfDisplayFading" ); |
|
133 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfDisplayFading ); |
|
134 // Print to log file |
|
135 iLog->Log( KTestAlfDisplayFading ); |
|
136 |
|
137 iAlfDisplay->SuppressAutomaticFading(); |
|
138 |
|
139 return KErrNone; |
|
140 } |
|
141 |
|
142 // ----------------------------------------------------------------------------- |
|
143 // CTestPlatAlfVisual::TestAlfDisplayHandlePointerEventL |
|
144 // ----------------------------------------------------------------------------- |
|
145 // |
|
146 TInt CTestPlatAlfVisual::TestAlfDisplayHandlePointerEventL( CStifItemParser& /*aItem*/ ) |
|
147 { |
|
148 _LIT( KTestPlatAlfVisual, "TestPlatAlfVisual" ); |
|
149 _LIT( KTestAlfDisplayHandlePointerEventL, "TestAlfDisplayHandlePointerEventL" ); |
|
150 TestModuleIf().Printf( 0, KTestPlatAlfVisual, KTestAlfDisplayHandlePointerEventL ); |
|
151 // Print to log file |
|
152 iLog->Log( KTestAlfDisplayHandlePointerEventL ); |
|
153 |
|
154 TPointerEvent vEvent; |
|
155 iAlfDisplay->HandlePointerEventL( vEvent ); |
|
156 |
|
157 return KErrNone; |
|
158 } |
|
159 |
|
160 |
|
161 // End of file |
|
162 |