|
1 /* |
|
2 * Copyright (c) 2007-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: This file defines class CFsBitmapProvider. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __FSBITMAPPROVIDER_H__ |
|
20 #define __FSBITMAPPROVIDER_H__ |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 #include <e32base.h> |
|
25 |
|
26 //<cmail> removed __FS_ALFRED_SUPPORT flag |
|
27 //#include <fsconfig.h> |
|
28 //</cmail> removed __FS_ALFRED_SUPPORT flag |
|
29 //<cmail> SF |
|
30 #include <alf/alfbitmapprovider.h> |
|
31 #include <alf/alftexture.h> |
|
32 //</cmail> |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class CFbsBitmap; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * CFsTextureLoader |
|
41 * Loader |
|
42 */ |
|
43 class CFsBitmapProvider |
|
44 : public CBase |
|
45 ,public MAlfBitmapProvider |
|
46 |
|
47 |
|
48 { |
|
49 public: |
|
50 static CFsBitmapProvider* NewL( const CFbsBitmap* aBitmap, |
|
51 const CFbsBitmap* aBitmapMask, |
|
52 const TInt aId |
|
53 ); |
|
54 public: // |
|
55 virtual ~CFsBitmapProvider(); |
|
56 |
|
57 public: |
|
58 TInt Id() const; |
|
59 |
|
60 private: // Constructors |
|
61 /** |
|
62 * C++ Constructor |
|
63 * @param aId Provider identifier |
|
64 */ |
|
65 CFsBitmapProvider( const TInt aId ); |
|
66 |
|
67 /** |
|
68 * Symbian 2nd-phase constructor |
|
69 * @param aId Provider identifier |
|
70 */ |
|
71 void ConstructL( const CFbsBitmap* aBitmap, |
|
72 const CFbsBitmap* aBitmapMask |
|
73 ); |
|
74 |
|
75 private: // from MHuiBitmapProvider |
|
76 /** |
|
77 * Provide a bitmap and mask from the given UID. |
|
78 * This method should create a bitmap and its mask, usually by loading it from disk. |
|
79 * |
|
80 * @param aId TextureManager id of this bitmap, may be used for extracting |
|
81 * an icon resource. |
|
82 * @param aBitmap Output parameter for the provider: On return, has to store |
|
83 * a pointer to the generated bitmap. Ownership transferred to caller. |
|
84 * The support for input CFbsBitmap formats varies between |
|
85 * different renderers. See \ref cfbsbitmapsupport |
|
86 * Table describing renderer bitmap support. |
|
87 * @param aMaskBitmap |
|
88 * Output parameter for the provider: On return, has to store |
|
89 * a pointer to the generated alpha mask or <code>NULL</code> |
|
90 * if there is no mask. Ownership of the bitmap is transferred |
|
91 * to the caller. |
|
92 * |
|
93 * @see CHuiTextureManager::CreateTextureL() |
|
94 */ |
|
95 |
|
96 virtual void ProvideBitmapL( TInt aId, |
|
97 CFbsBitmap*& aBitmap, |
|
98 CFbsBitmap*& aMaskBitmap |
|
99 ); |
|
100 private: // Data |
|
101 /** Owns: */ |
|
102 CFbsBitmap* iBitmap; |
|
103 |
|
104 /** Owns: */ |
|
105 CFbsBitmap* iBitmapMask; |
|
106 |
|
107 /** Identifier */ |
|
108 const TInt iId; |
|
109 }; |
|
110 |
|
111 #endif // __FSBITMAPPROVIDER_H__ |
|
112 |
|
113 // End of File |