|
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 api of alf_core_toolkit |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // [INCLUDE FILES] |
|
20 #include <e32svr.h> |
|
21 #include <gdi.h> |
|
22 #include <stifparser.h> |
|
23 #include <stiftestinterface.h> |
|
24 #include <uiacceltk/huienv.h> |
|
25 #include <uiacceltk/huistatic.h> |
|
26 #include <uiacceltk/huishadowborderbrush.h> |
|
27 |
|
28 #include "testuiaifcoretoolkit.h" |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // CTestUiAifCoreToolkit::TestH60BordBrushNewLL |
|
32 // ----------------------------------------------------------------------------- |
|
33 // |
|
34 TInt CTestUiAifCoreToolkit::TestH60BordBrushNewLL( CStifItemParser& /*aItem*/ ) |
|
35 { |
|
36 |
|
37 // Print to UI |
|
38 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
39 _LIT( KTestH60BordBrushNewLL, "In TestH60BordBrushNewLL" ); |
|
40 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestH60BordBrushNewLL ); |
|
41 // Print to log file |
|
42 iLog->Log( KTestH60BordBrushNewLL ); |
|
43 |
|
44 THuiMetric metric; |
|
45 CHuiShadowBorderBrush* brush = CHuiShadowBorderBrush::NewL( metric ); |
|
46 delete brush; |
|
47 |
|
48 return KErrNone; |
|
49 |
|
50 } |
|
51 |
|
52 // ----------------------------------------------------------------------------- |
|
53 // CTestUiAifCoreToolkit::TestH60BordBrushNewLCL |
|
54 // ----------------------------------------------------------------------------- |
|
55 // |
|
56 TInt CTestUiAifCoreToolkit::TestH60BordBrushNewLCL( CStifItemParser& /*aItem*/ ) |
|
57 { |
|
58 |
|
59 // Print to UI |
|
60 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
61 _LIT( KTestH60BordBrushNewLCL, "In TestH60BordBrushNewLCL" ); |
|
62 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestH60BordBrushNewLCL ); |
|
63 // Print to log file |
|
64 iLog->Log( KTestH60BordBrushNewLCL ); |
|
65 |
|
66 THuiMetric metric; |
|
67 CHuiShadowBorderBrush* brush = CHuiShadowBorderBrush::NewLC( metric ); |
|
68 CleanupStack::PopAndDestroy( brush ); |
|
69 |
|
70 return KErrNone; |
|
71 |
|
72 } |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // CTestUiAifCoreToolkit::TestH60BordBrushNewLTIntL |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 TInt CTestUiAifCoreToolkit::TestH60BordBrushNewLTIntL( CStifItemParser& /*aItem*/ ) |
|
79 { |
|
80 |
|
81 // Print to UI |
|
82 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
83 _LIT( KTestH60BordBrushNewLTIntL, "In TestH60BordBrushNewLTIntL" ); |
|
84 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestH60BordBrushNewLTIntL ); |
|
85 // Print to log file |
|
86 iLog->Log( KTestH60BordBrushNewLTIntL ); |
|
87 |
|
88 TInt temp = 10; |
|
89 CHuiShadowBorderBrush* brush = CHuiShadowBorderBrush::NewL( temp ); |
|
90 delete brush; |
|
91 |
|
92 return KErrNone; |
|
93 |
|
94 } |
|
95 |
|
96 // ----------------------------------------------------------------------------- |
|
97 // CTestUiAifCoreToolkit::TestH60BordBrushNewLCTIntL |
|
98 // ----------------------------------------------------------------------------- |
|
99 // |
|
100 TInt CTestUiAifCoreToolkit::TestH60BordBrushNewLCTIntL( CStifItemParser& /*aItem*/ ) |
|
101 { |
|
102 |
|
103 // Print to UI |
|
104 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
105 _LIT( KTestH60BordBrushNewLTIntL, "In TestH60BordBrushNewLTIntL" ); |
|
106 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestH60BordBrushNewLTIntL ); |
|
107 // Print to log file |
|
108 iLog->Log( KTestH60BordBrushNewLTIntL ); |
|
109 |
|
110 TInt temp = 10; |
|
111 CHuiShadowBorderBrush* brush = CHuiShadowBorderBrush::NewLC( temp ); |
|
112 CleanupStack::PopAndDestroy( brush ); |
|
113 |
|
114 return KErrNone; |
|
115 |
|
116 } |
|
117 |
|
118 // ----------------------------------------------------------------------------- |
|
119 // CTestUiAifCoreToolkit::TestH60BordBrushSetWidthL |
|
120 // ----------------------------------------------------------------------------- |
|
121 // |
|
122 TInt CTestUiAifCoreToolkit::TestH60BordBrushSetWidthL( CStifItemParser& /*aItem*/ ) |
|
123 { |
|
124 |
|
125 // Print to UI |
|
126 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
127 _LIT( KTestH60BordBrushNewLTIntL, "In TestH60BordBrushNewLTIntL" ); |
|
128 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestH60BordBrushNewLTIntL ); |
|
129 // Print to log file |
|
130 iLog->Log( KTestH60BordBrushNewLTIntL ); |
|
131 |
|
132 THuiMetric metric; |
|
133 CHuiShadowBorderBrush* brush = CHuiShadowBorderBrush::NewL( metric ); |
|
134 CleanupStack::PushL( brush ); |
|
135 brush->SetWidth( metric ); |
|
136 CleanupStack::PopAndDestroy( brush ); |
|
137 |
|
138 return KErrNone; |
|
139 |
|
140 } |
|
141 |
|
142 // [End of File] |