|
1 /* |
|
2 * Copyright (c) 2006 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 the License "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 class represents the Widget Renderer object |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __WIDGETENGINERENDERER |
|
19 #define __WIDGETENGINERENDERER |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 #include "WidgetEngineCallbacks.h" |
|
24 |
|
25 // CONSTANTS |
|
26 |
|
27 // MACROS |
|
28 |
|
29 // DATA TYPES |
|
30 |
|
31 // FUNCTION PROTOTYPES |
|
32 |
|
33 // FORWARD DECLARATION |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * WidgetRenderer |
|
39 * |
|
40 * @lib widgetengine.dll |
|
41 * @since 3.1 |
|
42 */ |
|
43 class WidgetRenderer |
|
44 { |
|
45 |
|
46 public: |
|
47 WidgetRenderer(MWidgetEngineCallbacks& aWidgetEngineCallback); |
|
48 ~WidgetRenderer(); |
|
49 |
|
50 public: |
|
51 void prepareForTransitionL(const TDesC& aTransition); |
|
52 void performTransitionL(); |
|
53 |
|
54 public: |
|
55 void transitionCb(); |
|
56 TBool transitionInProgress() { return m_transitionbitmap!=0; } |
|
57 void preparetodrawTransition(); |
|
58 void drawTransition(CWindowGc& gc, CFbsBitmap* aCurrentBitmap); |
|
59 |
|
60 protected: |
|
61 void createTransitionBitmapL(); |
|
62 void destroyTransitionBitmap(); |
|
63 void createFadeMaskL(); |
|
64 void destroyFadeMask(); |
|
65 void drawFadeMaskL(); |
|
66 |
|
67 private: |
|
68 CFbsBitmap* m_transitionbitmap; |
|
69 CFbsBitmap* m_fademask; |
|
70 CPeriodic* m_transitiontimer; |
|
71 TUint8 m_transitioncount; |
|
72 TUint8 m_maxtransitions; |
|
73 MWidgetEngineCallbacks* m_widgetenginecallback; |
|
74 |
|
75 }; |
|
76 |
|
77 #endif |