|
1 /******************************************************************************* |
|
2 * Copyright (c) 2005, 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. This program and the accompanying materials |
|
4 * are made available under the terms of the Eclipse Public License v1.0 |
|
5 * which accompanies this distribution, and is available at |
|
6 * http://www.eclipse.org/legal/epl-v10.html |
|
7 * |
|
8 * Contributors: |
|
9 * Nokia Corporation - S60 implementation |
|
10 *******************************************************************************/ |
|
11 |
|
12 |
|
13 #ifndef SWTGRIMAGEDATA_H |
|
14 #define SWTGRIMAGEDATA_H |
|
15 |
|
16 |
|
17 #include "eswtgraphics.h" |
|
18 |
|
19 |
|
20 class CSwtGrPaletteData; |
|
21 |
|
22 |
|
23 /** |
|
24 * CSwtGrImageData |
|
25 * @lib eswt |
|
26 */ |
|
27 NONSHARABLE_CLASS(CSwtGrImageData) |
|
28 : public CBase |
|
29 , public MSwtImageData |
|
30 { |
|
31 // Methods |
|
32 public: |
|
33 static CSwtGrImageData* NewL(const TInfo& aInfo, CSwtGrPaletteData* aPalette, |
|
34 HBufC8* aPixelBuffer, HBufC8* aMaskBuffer, HBufC8* aAlphaBuffer); |
|
35 ~CSwtGrImageData(); |
|
36 |
|
37 private: |
|
38 CSwtGrImageData(const TInfo& aInfo, CSwtGrPaletteData* aPalette, |
|
39 HBufC8* aPixelBuffer, HBufC8* aMaskBuffer, HBufC8* aAlphaBuffer); |
|
40 |
|
41 // From MSwtImageData |
|
42 public: |
|
43 const TInfo& Info() const; |
|
44 const MSwtPaletteData& Palette() const; |
|
45 const HBufC8& PixelBuffer() const; |
|
46 const HBufC8* MaskBuffer() const; |
|
47 const HBufC8* AlphaBuffer() const; |
|
48 |
|
49 // Data |
|
50 private: |
|
51 TInfo iInfo; // Information about the image |
|
52 CSwtGrPaletteData* iPalette; // The color table for the image. |
|
53 HBufC8* iPixelBuffer; // The pixel data of the image. |
|
54 HBufC8* iMaskBuffer; // An icon-specific field containing the data from the icon mask. |
|
55 HBufC8* iAlphaBuffer; // The alpha data of the image. |
|
56 }; |
|
57 |
|
58 |
|
59 #endif // SWTGRIMAGEDATA_H |