|
1 /* |
|
2 * Copyright (c) 2007-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: The effect interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __SHWEFFECT_H__ |
|
22 #define __SHWEFFECT_H__ |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32std.h> |
|
26 #include <e32base.h> |
|
27 #include <alf/alfvisual.h> |
|
28 #include <alf/alfenv.h> |
|
29 |
|
30 #include "shweffectinfo.h" |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class MGlxVisualList; |
|
34 class MGlxMediaList; |
|
35 class CAlfEnv; |
|
36 class MGlxLayout; |
|
37 class CAlfVisual; |
|
38 class TShwEffectInfo; |
|
39 |
|
40 // CLASS DECLARATION |
|
41 /** |
|
42 * MShwEffect, interface for the effects. |
|
43 * Effect gets the visual and media list and the HUI environment in |
|
44 * initialisation as well as the screen size. |
|
45 */ |
|
46 class MShwEffect |
|
47 { |
|
48 public: // Construction & destruction |
|
49 |
|
50 /** |
|
51 * Destructor. Allow deletion through this interface |
|
52 */ |
|
53 virtual ~MShwEffect() {}; |
|
54 |
|
55 /** |
|
56 * Clone the effect, this is needed when same effect |
|
57 * is used multiple times in a row. |
|
58 * @return a clone of the effect. |
|
59 */ |
|
60 virtual MShwEffect* CloneLC() = 0; |
|
61 |
|
62 public: // the API |
|
63 |
|
64 /** |
|
65 * Initialize the effect. |
|
66 * @param aHuiEnv, the HUI environment for the slideshow |
|
67 * @param aVisualList, the visual list used for the slideshow |
|
68 * @param aMediaList, the media list used for the slideshow |
|
69 * @param aScreenSize, the screen size for the slideshow |
|
70 */ |
|
71 virtual void InitializeL( |
|
72 CAlfEnv* aAlfEnv, |
|
73 MGlxVisualList* aVisualList, |
|
74 MGlxMediaList* aMediaList, |
|
75 TSize aScreenSize ) = 0; |
|
76 |
|
77 /** |
|
78 * This method is called before the view mode of the effect for |
|
79 * the given visual is about to start |
|
80 * @param aVisual the HUI visual that is the target for the effect |
|
81 * @param aSize the size of the image to view |
|
82 * @param the size of the thumbnail to load for the effect |
|
83 */ |
|
84 virtual TSize PrepareViewL( |
|
85 CAlfVisual* aVisual, TSize aImageSize ) = 0; |
|
86 |
|
87 /** |
|
88 * Enter view mode. The effect may fade-in itself, |
|
89 * the duration for this is given as a parameter. |
|
90 * @param aVisual the HUI visual that is the target for the view |
|
91 * @param aDuration the whole view mode time |
|
92 * @param aFadeInDuration the entry "fade-in" time |
|
93 * @return the layout chain that applies for the view mode |
|
94 */ |
|
95 virtual MGlxLayout* EnterViewL( |
|
96 CAlfVisual* aVisual, TInt aDuration, TInt aFadeInDuration ) = 0; |
|
97 |
|
98 /** |
|
99 * Exit view mode. This gets called just before the transition |
|
100 * phase starts. |
|
101 * @param aVisual the HUI visual that was the target for the view |
|
102 */ |
|
103 virtual void ExitView( CAlfVisual* aVisual ) = 0; |
|
104 |
|
105 /** |
|
106 * Enter transition mode. The duration for the transition is given |
|
107 * as a parameter, during this time the effect can animate its exit. |
|
108 * @param aVisual the HUI visual that is the target for the transition |
|
109 * @param aDuration the length of the transition |
|
110 * @return the layout chain that applies for the transition mode |
|
111 */ |
|
112 virtual MGlxLayout* EnterTransitionL( |
|
113 CAlfVisual* aVisual, TInt aDuration ) = 0; |
|
114 |
|
115 /** |
|
116 * Exit from transition mode. This method is called once the transition |
|
117 * has ended and the corresponding visual is no longer visible on screen. |
|
118 * @param aVisual the HUI visual that was the target for the transition |
|
119 */ |
|
120 virtual void ExitTransition( CAlfVisual* aVisual ) = 0; |
|
121 |
|
122 /** |
|
123 * Go to pause. While on pause the effect is expected to be frozen |
|
124 */ |
|
125 virtual void PauseL() = 0; |
|
126 |
|
127 /** |
|
128 * Resume from pause. |
|
129 */ |
|
130 virtual void Resume() = 0; |
|
131 |
|
132 /** |
|
133 * Encapsulates the effect's display name and uid |
|
134 * @return the effect's information |
|
135 */ |
|
136 virtual TShwEffectInfo EffectInfo() = 0; |
|
137 |
|
138 }; |
|
139 |
|
140 #endif // __SHWEFFECT_H__ |