|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @test |
|
19 @internalComponent - Internal Symbian test code |
|
20 */ |
|
21 |
|
22 #ifndef __TBITMAP_H |
|
23 #define __TBITMAP_H |
|
24 |
|
25 #include <eikappui.h> |
|
26 #include <eikapp.h> |
|
27 #include <eikdoc.h> |
|
28 #include <eikenv.h> |
|
29 #include <apgcli.h> |
|
30 #include <eikon.mbg> |
|
31 |
|
32 #include <test/testexecutestepbase.h> |
|
33 #include "appfwk_test_AppUi.h" |
|
34 |
|
35 |
|
36 _LIT16(KTestBitmapStep, "TBitMap"); |
|
37 |
|
38 const TUid KUidBitmap = {0xA000110E}; |
|
39 const TInt KErrBitMapDoesNotMatch = -1234; |
|
40 |
|
41 |
|
42 // |
|
43 // |
|
44 // CBitmapAppUi |
|
45 // |
|
46 // |
|
47 class CBitmapAppUi : public CTestAppUi |
|
48 { |
|
49 public: |
|
50 CBitmapAppUi(); |
|
51 void ConstructL(); |
|
52 ~CBitmapAppUi(); |
|
53 |
|
54 private: |
|
55 void RunTestStepL(TInt aNumStep); |
|
56 // from CEikAppUi |
|
57 void HandleCommandL(TInt aCommand); |
|
58 |
|
59 private: |
|
60 void TestCreateBitmapL(); |
|
61 void CompareBitmapsL(CFbsBitmap& aBmp1, CFbsBitmap& aBmp2, TDisplayMode aDispMode) const; |
|
62 }; |
|
63 |
|
64 |
|
65 // |
|
66 // |
|
67 // CBitmapDocument |
|
68 // |
|
69 // |
|
70 class CBitmapDocument : public CEikDocument |
|
71 { |
|
72 public: |
|
73 static CBitmapDocument* NewL(CEikApplication& aApp); |
|
74 CBitmapDocument(CEikApplication& aApp); |
|
75 void ConstructL(); |
|
76 |
|
77 private: |
|
78 // Inherited from CEikDocument |
|
79 CEikAppUi* CreateAppUiL(); |
|
80 }; |
|
81 |
|
82 |
|
83 // |
|
84 // |
|
85 // CBitmapApplication |
|
86 // |
|
87 // |
|
88 class CBitmapApplication : public CEikApplication |
|
89 { |
|
90 private: |
|
91 // Inherited from class CApaApplication |
|
92 CApaDocument* CreateDocumentL(); |
|
93 TUid AppDllUid() const; |
|
94 |
|
95 private: |
|
96 CApaDocument* CreateDocumentL(CApaProcess* a) { return CEikApplication::CreateDocumentL(a); } |
|
97 }; |
|
98 |
|
99 #endif |
|
100 |
|
101 |