63 TEffectCleanupStruct( |
63 TEffectCleanupStruct( |
64 TInt aHandle, |
64 TInt aHandle, |
65 CHuiVisual* aEffectedVisual, |
65 CHuiVisual* aEffectedVisual, |
66 CHuiVisual* aTemporaryPresenterVisual, |
66 CHuiVisual* aTemporaryPresenterVisual, |
67 TBool aIsLayout, |
67 TBool aIsLayout, |
68 TBool aHideWhenFinished) |
68 TBool aHideWhenFinished, |
|
69 TBool aCanDestroyOrHideImmediately) |
69 : iHandle(aHandle), |
70 : iHandle(aHandle), |
70 iEffectedVisual(aEffectedVisual), |
71 iEffectedVisual(aEffectedVisual), |
71 iTemporaryPresenterVisual(aTemporaryPresenterVisual), |
72 iTemporaryPresenterVisual(aTemporaryPresenterVisual), |
72 iIsLayout(aIsLayout), |
73 iIsLayout(aIsLayout), |
73 iHideWhenFinished(aHideWhenFinished) |
74 iHideWhenFinished(aHideWhenFinished), |
|
75 iCanDestroyOrHideImmediately(aCanDestroyOrHideImmediately) |
74 { |
76 { |
75 // RDebug::Printf("TEffectCleanupStruct - 0x%x 0x%x, %d", iEffectedVisual, iTemporaryPresenterVisual, iIsLayout ); |
77 // RDebug::Printf("TEffectCleanupStruct - 0x%x 0x%x, %d", iEffectedVisual, iTemporaryPresenterVisual, iIsLayout ); |
76 }; |
78 }; |
77 |
79 |
78 TInt iHandle; |
80 TInt iHandle; |
79 |
81 |
80 TBool iIsLayout; |
82 TBool iIsLayout; |
81 |
83 |
82 TBool iHideWhenFinished; |
84 TBool iHideWhenFinished; |
|
85 |
|
86 TBool iCanDestroyOrHideImmediately; |
83 |
87 |
84 // not own, unless iEffectedVisual has EShouldDestroy flag enabled |
88 // not own, unless iEffectedVisual has EShouldDestroy flag enabled |
85 CHuiVisual* iEffectedVisual; |
89 CHuiVisual* iEffectedVisual; |
86 // owned |
90 // owned |
87 CHuiVisual* iTemporaryPresenterVisual; |
91 CHuiVisual* iTemporaryPresenterVisual; |
127 CHuiControl& aControl, |
131 CHuiControl& aControl, |
128 TBool& aFullscreenCovered, |
132 TBool& aFullscreenCovered, |
129 TRect& aFullscreen, |
133 TRect& aFullscreen, |
130 CAlfScreen* aScreen, |
134 CAlfScreen* aScreen, |
131 TBool& aSubtreeVisible, |
135 TBool& aSubtreeVisible, |
|
136 TBool& aHasVisualsWithLayers, |
132 TBool aChildCanBeOpaque ); |
137 TBool aChildCanBeOpaque ); |
|
138 |
|
139 /** |
|
140 * Updates layer visibilities. |
|
141 */ |
|
142 void HandleLayerVisibility( |
|
143 CHuiLayout* aLayout, |
|
144 CHuiControlGroup& aControlGroup, |
|
145 CHuiControl& aControl, |
|
146 TBool aVisible ); |
|
147 |
133 /** |
148 /** |
134 * This method shows the control group in roster, however the aWhere param |
149 * This method shows the control group in roster, however the aWhere param |
135 * is modified so that controlgroup appears at the right position depending on |
150 * is modified so that controlgroup appears at the right position depending on |
136 * controlgroup type |
151 * controlgroup type |
137 * |
152 * |
225 * Cancels all effects due to low memory. |
240 * Cancels all effects due to low memory. |
226 */ |
241 */ |
227 void LowMemoryCancelAllEffects(); |
242 void LowMemoryCancelAllEffects(); |
228 |
243 |
229 /** |
244 /** |
|
245 * Gets size & rotation. |
|
246 * @param aSize size. |
|
247 * @param aRotation rotation. |
|
248 * @return error code. |
|
249 */ |
|
250 TInt GetSizeAndRotation(TSize& aSize, TInt& aRotation); |
|
251 |
|
252 /** |
|
253 * Reads pixels to bitmap. |
|
254 * @param aBitmap bitmap. |
|
255 * @return error code. |
|
256 */ |
|
257 TInt ReadPixels(CFbsBitmap* aBitmap); |
|
258 |
|
259 /** |
230 * Sets HuiControlGroup as Alf application window group |
260 * Sets HuiControlGroup as Alf application window group |
231 */ |
261 */ |
232 void SetWindowGroupAsAlfApp(TInt aId); |
262 void SetWindowGroupAsAlfApp(TInt aId); |
233 |
263 |
234 // From MHuiSynchronizationObserver |
264 // From MHuiSynchronizationObserver |
243 * For application start effects we give N milliseconds timeout for application to finish drawing after |
273 * For application start effects we give N milliseconds timeout for application to finish drawing after |
244 * the first drawing has arrived. If after N milliseconds application has not drawn 75% of the screen, it |
274 * the first drawing has arrived. If after N milliseconds application has not drawn 75% of the screen, it |
245 * gets another N milliseconds. Most cases, the first N milliseconds is enough. |
275 * gets another N milliseconds. Most cases, the first N milliseconds is enough. |
246 */ |
276 */ |
247 void HandleGfxEndFullScreenTimeout(CFullScreenEffectState* aFullScreenEffectData); |
277 void HandleGfxEndFullScreenTimeout(CFullScreenEffectState* aFullScreenEffectData); |
248 |
278 |
|
279 // Experimental |
|
280 TBool IsFullScreenDrawn( TInt aOrientation); |
|
281 |
249 private: |
282 private: |
250 |
283 |
251 |
284 |
252 CAlfBridge( CAlfStreamerBridge** aHost ); |
285 CAlfBridge( CAlfStreamerBridge** aHost ); |
253 |
286 |
283 |
316 |
284 // remove effect |
317 // remove effect |
285 // This is needed if we have to abort an effect |
318 // This is needed if we have to abort an effect |
286 void HandleGfxStopEffectsL( TAlfBridgerData data ); |
319 void HandleGfxStopEffectsL( TAlfBridgerData data ); |
287 |
320 |
|
321 void HandleGfxStopControlEffectsL( TAlfBridgerData data ); |
|
322 |
288 /** |
323 /** |
289 * RemoveEffectFromApp |
324 * RemoveEffectFromApp |
290 * |
325 * |
291 * Removes effects on appui. |
326 * Removes effects on appui. |
292 */ |
327 */ |
293 void RemoveEffectFromApp(TInt aAppUid); |
328 void RemoveEffectFromApp(TInt aSecureId, TInt aWgId = -1 ); |
294 |
329 |
295 // component effect handling |
330 // component effect handling |
296 void HandleGfxControlEffectsL( TAlfBridgerData data ); |
331 void HandleGfxControlEffectsL( TAlfBridgerData data ); |
297 |
332 |
298 /** |
333 /** |
339 * |
374 * |
340 * |
375 * |
341 * @return ETrue, if layout have been initialized succesfully for the effect |
376 * @return ETrue, if layout have been initialized succesfully for the effect |
342 EFalse, if any visuals have been removed. Effect should not be applied. |
377 EFalse, if any visuals have been removed. Effect should not be applied. |
343 */ |
378 */ |
344 TBool SetupEffectLayoutContainerL(TInt aHandle,CHuiLayout* aSourceLayout, TBool aIsExitEffect); |
379 TBool SetupEffectLayoutContainerL(TInt aHandle,CHuiLayout* aSourceLayout, TBool aIsExitEffect, TBool aCanDestroyOrHideImmediately); |
345 |
380 |
346 /* |
381 /* |
347 * AddEffectItemL |
382 * AddEffectItemL |
348 * |
383 * |
349 * Prepares visual for the effect. Removes previous effect if necessary. @aItemDestroyed will return EFalse, |
384 * Prepares visual for the effect. Removes previous effect if necessary. @aItemDestroyed will return EFalse, |
356 CHuiVisual* aSourceVisual, |
391 CHuiVisual* aSourceVisual, |
357 CHuiLayout* aTargetLayout, |
392 CHuiLayout* aTargetLayout, |
358 CHuiControl* aEffectControl, |
393 CHuiControl* aEffectControl, |
359 TBool aInsertTemporaryVisual, |
394 TBool aInsertTemporaryVisual, |
360 TBool& aItemDestroyed, |
395 TBool& aItemDestroyed, |
361 TBool aIsExitEffect = EFalse); |
396 TBool aIsExitEffect = EFalse, |
|
397 TBool aCanDestroyOrHideImmediately = EFalse); |
362 |
398 |
363 |
399 |
364 /* |
400 /* |
365 * AddToEffectLayoutContainerL |
401 * AddToEffectLayoutContainerL |
366 */ |
402 */ |
369 CHuiLayout* aSourceLayout, |
405 CHuiLayout* aSourceLayout, |
370 CHuiLayout* aTargetLayout, |
406 CHuiLayout* aTargetLayout, |
371 CHuiControl* aEffectControlGroup, |
407 CHuiControl* aEffectControlGroup, |
372 TInt& aItemsDestroyed, |
408 TInt& aItemsDestroyed, |
373 TBool aAddLayout = ETrue, |
409 TBool aAddLayout = ETrue, |
374 TBool aIsExitEffect = EFalse); |
410 TBool aIsExitEffect = EFalse, |
|
411 TBool aCanDestroyOrHideImmediately = EFalse); |
375 |
412 |
376 /* |
413 /* |
377 * ListFamilyTreeL |
414 * ListFamilyTreeL |
378 */ |
415 */ |
379 void ListFamilyTreeL( RPointerArray<CHuiLayout>& aArray, const CHuiLayout* aLayout ); |
416 void ListFamilyTreeL( RPointerArray<CHuiLayout>& aArray, const CHuiLayout* aLayout ); |
380 /* |
|
381 * SetupEffectLayoutContainerL |
|
382 * |
|
383 * This method creates an own temporary presenter visual visual and binds it to aSourceVisul |
|
384 * using SetExternalContentL. Finally the effect entry is added to iEffectCleanupStack, |
|
385 * thus it can be cleaned after effect completion. |
|
386 */ |
|
387 void SetupEffectContainerL(TInt aHandle, CHuiCanvasVisual* aSourceVisual, TBool aIsExitEffect); |
|
388 |
417 |
389 /* |
418 /* |
390 * RemoveTemporaryPresenterItem |
419 * RemoveTemporaryPresenterItem |
391 * |
420 * |
392 * Effects are shown indirectly by a another visual, that is in iFullScreenEffect control group. |
421 * Effects are shown indirectly by a another visual, that is in iFullScreenEffect control group. |
476 void HandleSetWindowSizeL( TAlfBridgerData& aData ); |
505 void HandleSetWindowSizeL( TAlfBridgerData& aData ); |
477 |
506 |
478 void HandleSetWindowRotationL( TAlfBridgerData& aData ); |
507 void HandleSetWindowRotationL( TAlfBridgerData& aData ); |
479 |
508 |
480 void HandleSetWindowOpacityL( TAlfBridgerData& aData ); |
509 void HandleSetWindowOpacityL( TAlfBridgerData& aData ); |
|
510 |
|
511 void HandleSetTransparencyAlphaChannelL( TAlfBridgerData& aData ); |
|
512 |
|
513 void HandleIncludeToVisibilityCalculationL( TAlfBridgerData& aData ); |
|
514 |
|
515 void HandleSetWindowAreaL( TAlfBridgerData& aData ); |
481 |
516 |
482 void HandleReorderWindowL( TAlfBridgerData& aData ); |
517 void HandleReorderWindowL( TAlfBridgerData& aData ); |
483 |
518 |
484 void HandlePostCanvasBufferL( TAlfBridgerData& aData ); |
519 void HandlePostCanvasBufferL( TAlfBridgerData& aData ); |
485 |
520 |
603 CHuiControlGroup* FindControlGroupByWindowGroupId( |
638 CHuiControlGroup* FindControlGroupByWindowGroupId( |
604 TInt aWindowGroupId, |
639 TInt aWindowGroupId, |
605 TInt& aScreenNumber, |
640 TInt& aScreenNumber, |
606 TAlfControlGroupEntry** aAlfGroup = NULL ); |
641 TAlfControlGroupEntry** aAlfGroup = NULL ); |
607 |
642 |
608 CHuiControlGroup* FindControlGroupByAppId( TInt aAppId ); |
643 /** |
|
644 * Finds control group which matches the given secure ID. For more detailed search, |
|
645 * you can provide the client window group ID. |
|
646 * |
|
647 * @param aSecureId Secure ID to seacrh for |
|
648 * @param aWgId Client window group ID. Ignored if -1. |
|
649 * @return Pointer to found control gruop. NULL if not found. |
|
650 */ |
|
651 CHuiControlGroup* FindControlGroupBySecureId( TInt aSecureId, TInt aWgId = -1 ) const; |
|
652 |
|
653 /** |
|
654 * Finds control gruop which matches the full screen effect end state. |
|
655 * |
|
656 * @return Pointer to found control gruop. NULL if not found. |
|
657 */ |
|
658 CHuiControlGroup* FindControlGroupByFullScreenToEffect() const; |
|
659 |
|
660 /** |
|
661 * Finds control gruop which matches the full screen effect start state. |
|
662 * |
|
663 * @return Pointer to found control gruop. NULL if not found. |
|
664 */ |
|
665 CHuiControlGroup* FindControlGroupByFullScreenFromEffect() const; |
|
666 |
609 /** |
667 /** |
610 * This method deletes controlgroup which has been assosiated with given window group id. |
668 * This method deletes controlgroup which has been assosiated with given window group id. |
611 * Control group may or may not be active in roster. |
669 * Control group may or may not be active in roster. |
612 * |
670 * |
613 * @param aWindowGroupNodeId Node id of the window group, internal. |
671 * @param aWindowGroupNodeId Node id of the window group, internal. |
701 private: |
759 private: |
702 |
760 |
703 RPointerArray<CAlfScreen> iAlfScreens; |
761 RPointerArray<CAlfScreen> iAlfScreens; |
704 void SetCursorTimerL(TUint aTime = 0, CHuiVisual* aCursor = 0); |
762 void SetCursorTimerL(TUint aTime = 0, CHuiVisual* aCursor = 0); |
705 TBool IsAlfOriginatedWindow(CHuiCanvasVisual& aVisual); |
763 TBool IsAlfOriginatedWindow(CHuiCanvasVisual& aVisual); |
|
764 |
|
765 // Experimental |
|
766 TBool IsFullScreenDrawnRecursive( |
|
767 CHuiLayout* aLayout, |
|
768 CHuiControlGroup& aControlGroup, |
|
769 CHuiControl& aControl, |
|
770 TBool& aFullscreenCovered, |
|
771 TRect& aFullscreen, |
|
772 CAlfScreen* aScreen, |
|
773 TBool& aSubtreeVisible, |
|
774 TBool& aHasVisualsWithLayers, |
|
775 TBool aChildCanBeOpaque, |
|
776 TInt aOrientation); |
706 |
777 |
707 NONSHARABLE_CLASS ( TDeadControlGroup ) |
778 NONSHARABLE_CLASS ( TDeadControlGroup ) |
708 { |
779 { |
709 public: |
780 public: |
710 TDeadControlGroup(): |
781 TDeadControlGroup(): |
877 |
952 |
878 TBool iForcedSwRendering; |
953 TBool iForcedSwRendering; |
879 TBool iLowMemoryMode; |
954 TBool iLowMemoryMode; |
880 THuiMemoryLevel iCurrentMemoryLevel; |
955 THuiMemoryLevel iCurrentMemoryLevel; |
881 |
956 |
882 #ifdef USE_MODULE_TEST_HOOKS_FOR_ALF |
|
883 TInt iTempTotalActiveVisualCount; |
|
884 TInt iTempTotalPassiveVisualCount; |
|
885 #endif |
|
886 #ifdef ALF_DEBUG_PRINT_WINDOWGROUP_ORDER |
957 #ifdef ALF_DEBUG_PRINT_WINDOWGROUP_ORDER |
887 TInt activevisualcount; |
958 TInt activevisualcount; |
888 TInt passivevisualcount; |
959 TInt passivevisualcount; |
889 #endif |
960 #endif |
890 }; |
961 }; |