28 |
28 |
29 // forward decleration |
29 // forward decleration |
30 class CGlxActiveCallBack; |
30 class CGlxActiveCallBack; |
31 class CGlxHdmiDecoderAO; |
31 class CGlxHdmiDecoderAO; |
32 class CImageDecoder; |
32 class CImageDecoder; |
|
33 class CAlfCompositionSource; |
33 class TSurfaceConfiguration; |
34 class TSurfaceConfiguration; |
|
35 |
34 class MGlxGenCallback |
36 class MGlxGenCallback |
35 { |
37 { |
36 public: |
38 public: |
37 virtual void DoGenCallback() = 0; |
39 virtual void DoGenCallback() = 0; |
38 }; |
40 }; |
42 public: |
44 public: |
43 /* |
45 /* |
44 * NewL |
46 * NewL |
45 */ |
47 */ |
46 static CGlxHdmiSurfaceUpdater* NewL(RWindow* aWindow, const TDesC& aImageFile, |
48 static CGlxHdmiSurfaceUpdater* NewL(RWindow* aWindow, const TDesC& aImageFile, |
47 CFbsBitmap* aFsBitmap, MGlxGenCallback* aCallBack); |
49 CFbsBitmap* aFsBitmap, MGlxGenCallback* aCallBack,TBool aEffectsOn); |
48 |
50 |
49 /* |
51 /* |
50 * Destructor |
52 * Destructor |
51 */ |
53 */ |
52 ~CGlxHdmiSurfaceUpdater(); |
54 ~CGlxHdmiSurfaceUpdater(); |
83 /* |
81 /* |
84 ShiftToPostingMode |
82 ShiftToPostingMode |
85 */ |
83 */ |
86 void ShiftToPostingMode(); |
84 void ShiftToPostingMode(); |
87 |
85 |
|
86 /* |
|
87 * Fadeing of the Surface |
|
88 * @param1 ETrue - FadeIn ( as in gaining brightness ) |
|
89 * EFalse - FadeOut ( as in loosing brightness ) |
|
90 */ |
|
91 void FadeTheSurface(TBool aFadeInOut); |
|
92 |
88 private: |
93 private: |
89 /* |
94 /* |
90 * Constructor |
95 * Constructor |
91 */ |
96 */ |
92 CGlxHdmiSurfaceUpdater(RWindow* aWindow, MGlxGenCallback* aCallBack); |
97 CGlxHdmiSurfaceUpdater(RWindow* aWindow, MGlxGenCallback* aCallBack,TBool aEffectsOn); |
93 |
98 |
94 /* |
99 /* |
95 * ConstructL() |
100 * ConstructL() |
96 */ |
101 */ |
97 void ConstructL(CFbsBitmap* aFsBitmap,const TDesC& aImageFile); |
102 void ConstructL(CFbsBitmap* aFsBitmap,const TDesC& aImageFile); |
143 * by default it is not required |
148 * by default it is not required |
144 */ |
149 */ |
145 void CreateHdmiL(TBool aCreateSurface = ETrue); |
150 void CreateHdmiL(TBool aCreateSurface = ETrue); |
146 |
151 |
147 /* |
152 /* |
|
153 * Zoom in our out depending on parameter |
|
154 */ |
|
155 void Zoom(TBool aZoom); |
|
156 |
|
157 /* |
148 * This if for zoom timer timeout |
158 * This if for zoom timer timeout |
149 */ |
159 */ |
150 static TInt TimeOut(TAny* aSelf); |
160 static TInt TimeOut(TAny* aSelf); |
151 |
161 |
|
162 /* |
|
163 * Animation time out timer |
|
164 */ |
|
165 static TInt AnimationTimeOut(TAny* aSelf); |
|
166 |
152 /* |
167 /* |
153 * ModifySurface positions of the surface to be displayed on screen |
168 * ModifySurface positions of the surface to be displayed on screen |
154 */ |
169 */ |
155 void ModifySurfacePostion(); |
170 void ModifySurfacePostion(); |
156 |
171 |
187 /* |
202 /* |
188 * InitiateHDMI |
203 * InitiateHDMI |
189 */ |
204 */ |
190 void InitiateHdmiL(CFbsBitmap* aFsBitmap,const TDesC& aImageFile); |
205 void InitiateHdmiL(CFbsBitmap* aFsBitmap,const TDesC& aImageFile); |
191 |
206 |
|
207 /* |
|
208 * Animate untill loop is complete |
|
209 */ |
|
210 void Animate(); |
|
211 |
192 private: |
212 private: |
193 RWindow* iWindow; // window object |
213 RWindow* iWindow; // window object |
194 CFbsBitmap* iFsBitmap; // FS bitmap |
214 CFbsBitmap* iFsBitmap; // FS bitmap |
195 MGlxGenCallback* iCallBack; // callback to the HdmiContainer window |
215 MGlxGenCallback* iCallBack; // callback to the HdmiContainer window |
196 HBufC* iImagePath; // To store the image uri path |
216 HBufC* iImagePath; // To store the image uri path |
197 |
217 TBool iEffectsOn; |
|
218 |
|
219 TBool iShwFsThumbnail; // If the Fs thumbnail is to be shown before decoding HD images |
|
220 TBool iIsNonJpeg; // If the item is non jpeg |
|
221 TBool iFadeIn; // If FadeIn or Out for only SLideshow animation |
|
222 |
198 // GCE Surface |
223 // GCE Surface |
199 RSurfaceUpdateSession iSurfUpdateSession; |
224 RSurfaceUpdateSession iSurfUpdateSession; |
200 TSurfaceId iSurfId; // TSurfaceId |
225 TSurfaceId iSurfId; // TSurfaceId |
201 RSurfaceManager* iSurfManager; // RSurfaceManager |
226 RSurfaceManager* iSurfManager; // RSurfaceManager |
202 RChunk* iSurfChunk; // RChunk |
227 RChunk* iSurfChunk; // RChunk |
208 // (optional)3-Scaled png/bmp images |
233 // (optional)3-Scaled png/bmp images |
209 |
234 |
210 void* iSurfBuffer; // Surface buffer |
235 void* iSurfBuffer; // Surface buffer |
211 CGlxActiveCallBack* iSurfBufferAO; // Surface buffer AO |
236 CGlxActiveCallBack* iSurfBufferAO; // Surface buffer AO |
212 |
237 |
|
238 CAlfCompositionSource* ialfCompositionSurface; |
|
239 |
213 //ICL |
240 //ICL |
214 CGlxHdmiDecoderAO* iGlxDecoderAO; // Internal Image decoder AO |
241 CGlxHdmiDecoderAO* iGlxDecoderAO; // Internal Image decoder AO |
215 CImageDecoder* iImageDecoder; // Image Decoder |
242 CImageDecoder* iImageDecoder; // Image Decoder |
216 RFs iFsSession; // RFs |
243 RFs iFsSession; // RFs |
217 |
244 |
218 TPoint iLeftCornerForZoom; // |
245 TPoint iLeftCornerForZoom; // |
219 CPeriodic* iTimer; // Timer for Zoom |
246 CPeriodic* iTimer; // Timer for Zoom |
220 |
247 CPeriodic* iAnimTimer; // Timer for Animation |
|
248 TInt iAnimCounter; |
|
249 |
221 // Various objects to store sizes and count |
250 // Various objects to store sizes and count |
222 TSize iTvScreenSize; // to store the Tv screen size |
251 TSize iTvScreenSize; // to store the Tv screen size |
223 TSize iTargetBitmapSize; // To Store the target bitmap size to display(as per Aspect Ratio) |
252 TSize iTargetBitmapSize; // To Store the target bitmap size to display(as per Aspect Ratio) |
224 |
253 |
225 // Various flags to store values |
254 // Various flags to store values |
226 TBool iZoom; // Is zoomed |
255 TBool iZoom; // Is zoomed |
227 TBool iBitmapReady; // If the bitmap is decoded and ready |
256 TBool iBitmapReady; // If the bitmap is decoded and ready |
228 TBool iAutoZoomOut; // If the UI has asked for auto zoomout |
257 TBool iAutoZoomOut; // If the UI has asked for auto zoomout |
229 TBool iSurfSessionConnected; // If surface session is connected |
258 TBool iSurfSessionConnected; // If surface session is connected |
230 TBool iShiftToCloning; |
259 TBool iShiftToCloning; |
231 TBool iShwFsThumbnail; // If the Fs thumbnail is to be shown before decoding HD images |
|
232 TBool iIsNonJpeg; // If the item is non jpeg |
|
233 |
|
234 #ifdef _DEBUG |
260 #ifdef _DEBUG |
235 TTime iStartTime; |
261 TTime iStartTime; |
236 TTime iStopTime; |
262 TTime iStopTime; |
237 #endif |
263 #endif |
238 // The bitmap index in the array of bitmaps |
264 // The bitmap index in the array of bitmaps |