equal
deleted
inserted
replaced
112 iDisplay->Roster().ShowL( *iControlGroup); |
112 iDisplay->Roster().ShowL( *iControlGroup); |
113 |
113 |
114 // Hide the Zoom at the construction |
114 // Hide the Zoom at the construction |
115 ShowZoom(EFalse); |
115 ShowZoom(EFalse); |
116 iZoomActive = EFalse; |
116 iZoomActive = EFalse; |
|
117 iIsHDMIconnected = EFalse; |
|
118 |
117 //To know if HDMi cable is connected. |
119 //To know if HDMi cable is connected. |
118 iGlxTvOut = CGlxTv::NewL(*this); |
120 iGlxTvOut = CGlxTv::NewL(*this); |
119 iTimer = CPeriodic::NewL( CActive::EPriorityStandard ); |
121 iTimer = CPeriodic::NewL( CActive::EPriorityStandard ); |
120 } |
122 } |
121 |
123 |
228 if(iTimer->IsActive()) |
230 if(iTimer->IsActive()) |
229 { |
231 { |
230 iTimer->Cancel(); |
232 iTimer->Cancel(); |
231 } |
233 } |
232 delete iTimer; |
234 delete iTimer; |
|
235 |
233 if(iGlxTvOut) |
236 if(iGlxTvOut) |
234 { |
237 { |
235 delete iGlxTvOut; |
238 delete iGlxTvOut; |
236 } |
239 } |
|
240 |
237 if(iEventHandler) |
241 if(iEventHandler) |
238 { |
242 { |
239 delete iEventHandler; |
243 delete iEventHandler; |
240 iEventHandler = NULL ; |
244 iEventHandler = NULL ; |
241 } |
245 } |
271 // |
275 // |
272 EXPORT_C void CGlxZoomControl::ActivateL(TInt aInitialZoomRatio, TZoomStartMode aStartMode, |
276 EXPORT_C void CGlxZoomControl::ActivateL(TInt aInitialZoomRatio, TZoomStartMode aStartMode, |
273 TInt aFocusIndex, TGlxMedia& aItem, TPoint* aZoomFocus) |
277 TInt aFocusIndex, TGlxMedia& aItem, TPoint* aZoomFocus) |
274 { |
278 { |
275 TRACER("CGlxZoomControl::ActivateL()"); |
279 TRACER("CGlxZoomControl::ActivateL()"); |
|
280 |
|
281 //To know if HDMi cable is connected. |
276 if ( !iZoomActive ) |
282 if ( !iZoomActive ) |
277 { |
283 { |
278 //This Varaiable updates that we are in zoom state now. |
284 //This Varaiable updates that we are in zoom state now. |
279 iZoomActive = ETrue; |
285 iZoomActive = ETrue; |
280 //To Retrive the image details |
286 //To Retrive the image details |
284 //Get the texture Created in fullscreen View. |
290 //Get the texture Created in fullscreen View. |
285 iImageTexture = &(iTextureMgr->CreateNewTextureForMediaL( |
291 iImageTexture = &(iTextureMgr->CreateNewTextureForMediaL( |
286 ScreenSize(),aItem, idspace, this )); |
292 ScreenSize(),aItem, idspace, this )); |
287 iImageVisual->SetImage(*iImageTexture); |
293 iImageVisual->SetImage(*iImageTexture); |
288 |
294 |
289 if(iGlxTvOut->IsConnected()) |
295 |
|
296 if(iGlxTvOut->IsHDMIConnected()) |
290 { |
297 { |
|
298 iIsHDMIconnected = ETrue; |
291 StartZoomAnimation(); |
299 StartZoomAnimation(); |
292 } |
300 } |
293 else |
301 else |
294 { |
302 { |
295 ShowZoom(ETrue); |
303 ShowZoom(ETrue); |
406 // ---------------------------------------------------------------------------------- |
414 // ---------------------------------------------------------------------------------- |
407 // |
415 // |
408 EXPORT_C void CGlxZoomControl::Deactivate() |
416 EXPORT_C void CGlxZoomControl::Deactivate() |
409 { |
417 { |
410 TRACER("CGlxZoomControl::Deactivate()"); |
418 TRACER("CGlxZoomControl::Deactivate()"); |
411 |
419 iIsHDMIconnected = EFalse; |
|
420 |
412 if ( iZoomActive ) |
421 if ( iZoomActive ) |
413 { |
422 { |
414 if(iTimer->IsActive()) |
423 if(iTimer->IsActive()) |
415 { |
424 { |
416 iTimer->Cancel(); |
425 iTimer->Cancel(); |
880 // HandleTvStatusChangedL |
889 // HandleTvStatusChangedL |
881 // ----------------------------------------------------------------------------- |
890 // ----------------------------------------------------------------------------- |
882 void CGlxZoomControl::HandleTvStatusChangedL( TTvChangeType aChangeType ) |
891 void CGlxZoomControl::HandleTvStatusChangedL( TTvChangeType aChangeType ) |
883 { |
892 { |
884 TRACER("CGlxZoomControl::HandleTvStatusChangedL()"); |
893 TRACER("CGlxZoomControl::HandleTvStatusChangedL()"); |
885 if ( aChangeType == ETvConnectionChanged ) |
894 if ( aChangeType == ETvConnectionChanged && !iIsHDMIconnected && iZoomActive) |
886 { |
895 { |
887 if ( iGlxTvOut->IsConnected() ) |
896 if ( iGlxTvOut->IsHDMIConnected() ) |
888 { |
897 { |
889 //go to fullscreen. |
898 //go to fullscreen. |
890 HandleZoomOutL(KGlxZoomOutCommand); |
899 HandleZoomOutL(KGlxZoomOutCommand); |
891 } |
900 } |
892 } |
901 } |