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 // [INCLUDE FILES] |
|
19 #include <e32svr.h> |
|
20 #include <gdi.h> |
|
21 #include <stifparser.h> |
|
22 #include <stiftestinterface.h> |
|
23 #include <uiacceltk/huienv.h> |
|
24 #include <uiacceltk/huistatic.h> |
|
25 #include <uiacceltk/huitextstylemanager.h> |
|
26 |
|
27 #include "testuiaifcoretoolkit.h" |
|
28 |
|
29 //the const variable |
|
30 const TInt KTextStyle = 2; |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CTestUiAifCoreToolkit::TestTHuiTextCHuiEnvL |
|
34 // ----------------------------------------------------------------------------- |
|
35 // |
|
36 TInt CTestUiAifCoreToolkit::TestTHuiTextCHuiEnvL( CStifItemParser& /*aItem*/ ) |
|
37 { |
|
38 |
|
39 // Print to UI |
|
40 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
41 _LIT( KTestTHuiTextCHuiEnvL, "In TestTHuiTextCHuiEnvL" ); |
|
42 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestTHuiTextCHuiEnvL ); |
|
43 // Print to log file |
|
44 iLog->Log( KTestTHuiTextCHuiEnvL ); |
|
45 |
|
46 CHuiTextStyleManager* styleManager = &iHuiEnv->TextStyleManager(); |
|
47 styleManager->CreatePlatformTextStyleL( KTextStyle ); |
|
48 |
|
49 return KErrNone; |
|
50 } |
|
51 |
|
52 // ----------------------------------------------------------------------------- |
|
53 // CTestUiAifCoreToolkit::TestTHuiTextTextStyle |
|
54 // ----------------------------------------------------------------------------- |
|
55 // |
|
56 TInt CTestUiAifCoreToolkit::TestTHuiTextTextStyle( CStifItemParser& /*aItem*/ ) |
|
57 { |
|
58 |
|
59 // Print to UI |
|
60 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
61 _LIT( KTestTHuiTextTextStyle, "In TestTHuiTextTextStyle" ); |
|
62 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestTHuiTextTextStyle ); |
|
63 // Print to log file |
|
64 iLog->Log( KTestTHuiTextTextStyle ); |
|
65 |
|
66 CHuiTextStyleManager* styleManager = &iHuiEnv->TextStyleManager(); |
|
67 styleManager->TextStyle( KTextStyle ); |
|
68 |
|
69 return KErrNone; |
|
70 } |
|
71 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // CTestUiAifCoreToolkit::TestTHuiTextCopyTextStyleL |
|
74 // ----------------------------------------------------------------------------- |
|
75 // |
|
76 TInt CTestUiAifCoreToolkit::TestTHuiTextCopyTextStyleL( CStifItemParser& /*aItem*/ ) |
|
77 { |
|
78 |
|
79 // Print to UI |
|
80 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
81 _LIT( KTestTHuiTextCopyTextStyleL, "In TestTHuiTextCopyTextStyleL" ); |
|
82 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, |
|
83 KTestTHuiTextCopyTextStyleL ); |
|
84 // Print to log file |
|
85 iLog->Log( KTestTHuiTextCopyTextStyleL ); |
|
86 |
|
87 CHuiTextStyleManager* styleManager = &iHuiEnv->TextStyleManager(); |
|
88 styleManager->CopyTextStyleL( KTextStyle ); |
|
89 |
|
90 return KErrNone; |
|
91 } |
|
92 |
|
93 // ----------------------------------------------------------------------------- |
|
94 // CTestUiAifCoreToolkit::TestTHuiTextDeleteTextStyle |
|
95 // ----------------------------------------------------------------------------- |
|
96 // |
|
97 TInt CTestUiAifCoreToolkit::TestTHuiTextDeleteTextStyle( CStifItemParser& /*aItem*/ ) |
|
98 { |
|
99 |
|
100 // Print to UI |
|
101 _LIT( Ktestuiaifcoretoolkit, "testuiaifcoretoolkit" ); |
|
102 _LIT( KTestTHuiTextDeleteTextStyle, "In TestTHuiTextDeleteTextStyle" ); |
|
103 TestModuleIf().Printf( 0, Ktestuiaifcoretoolkit, KTestTHuiTextDeleteTextStyle ); |
|
104 // Print to log file |
|
105 iLog->Log( KTestTHuiTextDeleteTextStyle ); |
|
106 |
|
107 CHuiTextStyleManager* styleManager = &iHuiEnv->TextStyleManager(); |
|
108 styleManager->DeleteTextStyle( KTextStyle ); |
|
109 |
|
110 return KErrNone; |
|
111 } |
|
112 |
|
113 // [End of File] |
|