|
1 /* |
|
2 * Copyright (c) 2004-2008 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: Class for providing effect context for effect plugins. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef AKNSALEFFECTCONTEXT_H |
|
20 #define AKNSALEFFECTCONTEXT_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <AknsRlEffectContext.h> |
|
24 |
|
25 // CONSTANTS |
|
26 const TInt KAknsAlEffectContextLayerN = 5; |
|
27 |
|
28 // CLASS DECLARATION |
|
29 /** |
|
30 * Internal class for providing effect context for effect plugins used in |
|
31 * animations. This class is used by AnimatorBmp for managing input/output |
|
32 * layers during the lifetime of the animator. |
|
33 * |
|
34 * @since 3.0 |
|
35 */ |
|
36 NONSHARABLE_CLASS( CAknsAlEffectContext ): |
|
37 public CBase, public MAknsRlEffectContext |
|
38 { |
|
39 protected: // Protected constructors |
|
40 CAknsAlEffectContext(); |
|
41 |
|
42 public: // New methods |
|
43 |
|
44 static CAknsAlEffectContext* NewL(); |
|
45 |
|
46 ~CAknsAlEffectContext(); |
|
47 |
|
48 void ConfigureL( const TSize& aSize, |
|
49 TDisplayMode aRgbMode, |
|
50 TInt aInputLayerIndex, |
|
51 TInt aInputLayerMode ); |
|
52 |
|
53 /// @return May return NULL if the bitmap does not exist. |
|
54 CFbsBitmap* RgbBitmap( TInt aLayerIndex ) const; |
|
55 /// @return May return NULL if the bitmap does not exist. |
|
56 CFbsBitmap* AlphaBitmap( TInt aLayerIndex ) const; |
|
57 |
|
58 CFbsBitGc* RgbGc( TInt aIndex ) const; |
|
59 CFbsBitGc* AlphaGc( TInt aIndex ) const; |
|
60 |
|
61 /** |
|
62 * Releases all layers but the output layer. |
|
63 */ |
|
64 void ReleaseInputLayers( TInt aOutputLayerIndex ); |
|
65 |
|
66 void SetSkinSrvSession( RAknsSrvSession* aSession ); |
|
67 |
|
68 public: // From MAknsRlEffectContext |
|
69 const TSize LayerSize(); |
|
70 void GetLayerDataL( TAknsRlLayerData& aData, const TInt aLayerIndex, |
|
71 const TInt aLayerStatus, const TBool aInitialize ); |
|
72 RAknsSrvSession* GetSkinSrvSession(); |
|
73 |
|
74 private: // New methods |
|
75 |
|
76 void CreateIfNeededL( TInt aLayerIndex, const TInt aLayerStatus, |
|
77 TBool aInitialize ); |
|
78 void ReleaseLayers(); |
|
79 void ReleaseLayer( TInt aLayerIndex ); |
|
80 |
|
81 private: |
|
82 RAknsSrvSession* iSession; // Referenced only |
|
83 TSize iLayerSize; |
|
84 TDisplayMode iRgbMode; |
|
85 TAknsRlLayerData iLayers[KAknsAlEffectContextLayerN]; |
|
86 }; |
|
87 |
|
88 #endif // AKNSALEFFECTCONTEXT_H |
|
89 |
|
90 // End of File |