143 iCoeEnv->WsSession().Flush(); |
143 iCoeEnv->WsSession().Flush(); |
144 #endif |
144 #endif |
145 |
145 |
146 |
146 |
147 SetMopParent( aParent ); |
147 SetMopParent( aParent ); |
148 SetFlags( EHgVgMediaWallUninitialized ); |
148 SetFlags( EHgVgMediaWallDrawToWindowGC | EHgVgMediaWallUninitialized ); |
149 |
149 |
150 } |
150 } |
151 |
151 |
152 // ----------------------------------------------------------------------------- |
152 // ----------------------------------------------------------------------------- |
153 // CHgVgMediaWall::InitScreenL() |
153 // CHgVgMediaWall::InitScreenL() |
187 if( /*iMediaWallStyle == EHgVgMediaWallStyleGrid ||*/ |
187 if( /*iMediaWallStyle == EHgVgMediaWallStyleGrid ||*/ |
188 (aIndex >= FirstIndexOnScreen() |
188 (aIndex >= FirstIndexOnScreen() |
189 && aIndex <= FirstIndexOnScreen() + ItemsOnScreen()) ) |
189 && aIndex <= FirstIndexOnScreen() + ItemsOnScreen()) ) |
190 { |
190 { |
191 UpdateLabelsAndPopup(); |
191 UpdateLabelsAndPopup(); |
192 DrawNow(); |
192 if(iFlags & EHgVgMediaWallDrawToWindowGC) |
|
193 { |
|
194 DrawNow(); |
|
195 } |
|
196 else |
|
197 { |
|
198 DrawOpenVG(); |
|
199 } |
|
200 |
193 } |
201 } |
194 } |
202 } |
195 } |
203 } |
196 |
204 |
197 // ----------------------------------------------------------------------------- |
205 // ----------------------------------------------------------------------------- |
365 { |
373 { |
366 FillSystemGcWithSkin( ); |
374 FillSystemGcWithSkin( ); |
367 return; |
375 return; |
368 } |
376 } |
369 |
377 |
370 if(iFlags & EHgVgMediaWallDrawToWindowGC) |
378 CHgVgMediaWall* self = const_cast<CHgVgMediaWall*>(this); |
371 { |
379 |
372 CHgVgMediaWall* self = const_cast<CHgVgMediaWall*>(this); |
380 if( iFlags & EHgVgMediaWallDrawToWindowGC ) |
373 self->ClearFlags(EHgVgMediaWallDrawToWindowGC); |
381 { |
374 FillSystemGcWithSkin( ); |
382 CFbsBitmap* screenshot = NULL; |
375 return; |
383 screenshot = self->DrawToBitmap(); |
376 } |
384 if (screenshot) |
377 |
385 { |
378 // draw with alpha to make a hole to composition layer |
386 SystemGc().BitBlt( Rect().iTl,screenshot ); |
379 SystemGc().SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha); |
387 delete screenshot; |
380 SystemGc().SetBrushColor(TRgb(0,0,0,0)); |
388 } |
381 SystemGc().Clear(); |
389 else |
382 DrawOpenVG(); |
390 { |
|
391 // draw with alpha to make a hole to composition layer |
|
392 SystemGc().SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha); |
|
393 SystemGc().SetBrushColor(TRgb(0,0,0,0)); |
|
394 SystemGc().Clear(); |
|
395 DrawOpenVG(); |
|
396 } |
|
397 } |
|
398 else |
|
399 { |
|
400 // draw with alpha to make a hole to composition layer |
|
401 SystemGc().SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha); |
|
402 SystemGc().SetBrushColor(TRgb(0,0,0,0)); |
|
403 SystemGc().Clear(); |
|
404 DrawOpenVG(); |
|
405 } |
383 } |
406 } |
384 |
407 |
385 // ----------------------------------------------------------------------------- |
408 // ----------------------------------------------------------------------------- |
386 // CHgVgMediaWall::FillSystemGcWithSkin() |
409 // CHgVgMediaWall::FillSystemGcWithSkin() |
387 // Draws the display. |
410 // Draws the display. |
1162 else |
1185 else |
1163 iAnimationState = EHgVgMediaWallAnimationStateIdle; |
1186 iAnimationState = EHgVgMediaWallAnimationStateIdle; |
1164 |
1187 |
1165 iAnimationTimer->Cancel(); |
1188 iAnimationTimer->Cancel(); |
1166 } |
1189 } |
|
1190 |
|
1191 SetFlags( EHgVgMediaWallDrawToWindowGC ); |
|
1192 DrawNow(); |
1167 } |
1193 } |
1168 |
1194 |
1169 if( aType == KEikMessageUnfadeWindows ) |
1195 if( aType == KEikMessageUnfadeWindows ) |
1170 { |
1196 { |
1171 ClearFlags( EHgVgMediaWallDrawToWindowGC ); |
1197 ClearFlags( EHgVgMediaWallDrawToWindowGC ); |
1172 DrawNow(); |
1198 DrawNow(); |
1173 } |
1199 } |
1174 } |
1200 |
|
1201 if( aType == KEikDynamicLayoutVariantSwitch && !(iFlags & EHgVgMediaWallDrawToWindowGC) ) |
|
1202 { |
|
1203 SetFlags( EHgVgMediaWallDrawToWindowGC ); |
|
1204 DrawNow(); |
|
1205 } |
|
1206 } |
|
1207 |
1175 |
1208 |
1176 // --------------------------------------------------------------------------- |
1209 // --------------------------------------------------------------------------- |
1177 // CHgVgMediaWall::InitItemsL() |
1210 // CHgVgMediaWall::InitItemsL() |
1178 // --------------------------------------------------------------------------- |
1211 // --------------------------------------------------------------------------- |
1179 // |
1212 // |
1224 iAnimationTimer->Cancel(); |
1257 iAnimationTimer->Cancel(); |
1225 } |
1258 } |
1226 |
1259 |
1227 iIsForeground = EFalse; |
1260 iIsForeground = EFalse; |
1228 |
1261 |
|
1262 // draw screenshot using window gc, this is needed |
|
1263 // for nga effects to work |
|
1264 DrawNow(); |
|
1265 |
1229 // free textures |
1266 // free textures |
1230 FreeItemsImages(); |
1267 FreeItemsImages(); |
1231 // free other resources |
1268 // free other resources |
1232 DestroyRendering(); |
1269 DestroyRendering(); |
1233 |
1270 |
1234 SetFlags( EHgVgMediaWallUninitialized ); |
1271 SetFlags( EHgVgMediaWallUninitialized | EHgVgMediaWallDrawToWindowGC ); |
1235 DrawNow(); |
|
1236 |
1272 |
1237 iCoeEnv->WsSession().Flush(); |
1273 iCoeEnv->WsSession().Flush(); |
1238 } |
1274 } |
1239 |
1275 |
1240 // --------------------------------------------------------------------------- |
1276 // --------------------------------------------------------------------------- |