362 // Disable all animated textures for the session |
362 // Disable all animated textures for the session |
363 for (TInt index = 0; index < iAnimatedTextures.Count(); index++) |
363 for (TInt index = 0; index < iAnimatedTextures.Count(); index++) |
364 { |
364 { |
365 iAnimatedTextures.operator[](index)->EnableAnimation(EFalse); |
365 iAnimatedTextures.operator[](index)->EnableAnimation(EFalse); |
366 } |
366 } |
367 |
367 #ifndef SYMBIAN_BUILD_GCE |
368 StoreControlGroupOrderL(*display, EFalse ); // do not hide |
368 StoreControlGroupOrderL(*display, EFalse ); // do not hide |
369 // background must be drawn as long as the effect is displayed |
369 #endif |
|
370 // background must be drawn as long as the effect is displayed |
370 // as the background will be visible if the effect does not cover full screen |
371 // as the background will be visible if the effect does not cover full screen |
371 // or is partially transparent. |
372 // or is partially transparent. |
372 } |
373 } |
373 /* |
374 /* |
374 #else |
375 #else |
419 if ( GetHandleFromInterface(EHuiObjectTypeControlGroup, &group) != KErrNotFound ) |
420 if ( GetHandleFromInterface(EHuiObjectTypeControlGroup, &group) != KErrNotFound ) |
420 { |
421 { |
421 iControlGroupOrder.AppendL( &group ); |
422 iControlGroupOrder.AppendL( &group ); |
422 } |
423 } |
423 } |
424 } |
|
425 |
424 // at the end the lowest index the bottom most and the biggest index the top most. |
426 // at the end the lowest index the bottom most and the biggest index the top most. |
425 |
427 |
426 // hide at the end so it does not affect the order of the group in the roster |
428 // hide at the end so it does not affect the order of the group in the roster |
427 if ( aAlsoHide ) |
429 if ( aAlsoHide ) |
428 { |
430 { |
429 for ( TInt i = 0 ; i < iControlGroupOrder.Count() ; i++ ) |
431 for ( TInt i = 0 ; i < iControlGroupOrder.Count() ; i++ ) |
430 { |
432 { |
431 CHuiLayout* hostContainer = iControlGroupOrder[i]->Control(0).ContainerLayout( NULL ); |
433 CHuiLayout* hostContainer = iControlGroupOrder[i]->Control(0).ContainerLayout( NULL ); |
432 hostContainer->iOpacity.Set(0.f); |
434 |
433 aDisplay.Roster().Hide( *iControlGroupOrder[i] ); |
435 aDisplay.Roster().Hide( *iControlGroupOrder[i] ); |
434 } |
436 } |
435 } |
437 } |
436 } |
438 } |
437 |
439 |
438 void CAlfAppSrvSession::ShowControlGroupsInOrderL(CHuiDisplay& aDisplay) |
440 void CAlfAppSrvSession::ShowControlGroupsInOrderL(CHuiDisplay& aDisplay) |
439 { |
441 { |
|
442 #ifdef SYMBIAN_BUILD_GCE |
|
443 iControlGroupOrder.Reset(); |
|
444 // gather all the control groups that belong to this session |
|
445 for ( TInt g = 0 ; g < aDisplay.Roster().Count() ; g++ ) |
|
446 { |
|
447 // first append the bottom one |
|
448 CHuiControlGroup& group = aDisplay.Roster().ControlGroup( g ); |
|
449 |
|
450 // make sure we only store control groups for this session |
|
451 if ( GetHandleFromInterface(EHuiObjectTypeControlGroup, &group) != KErrNotFound ) |
|
452 { |
|
453 iControlGroupOrder.AppendL( &group ); |
|
454 } |
|
455 } |
|
456 #endif |
|
457 // put this session's controlgroups on top |
440 while ( iControlGroupOrder.Count() ) |
458 while ( iControlGroupOrder.Count() ) |
441 { |
459 { |
442 CHuiControlGroup& group = *iControlGroupOrder[iControlGroupOrder.Count()-1]; |
460 CHuiControlGroup& group = *iControlGroupOrder[iControlGroupOrder.Count()-1]; |
443 |
461 |
444 // make sure that the group still exists. |
462 // make sure that the group still exists. |
445 if ( GetHandleFromInterface(EHuiObjectTypeControlGroup, &group) != KErrNotFound ) |
463 if ( GetHandleFromInterface(EHuiObjectTypeControlGroup, &group) != KErrNotFound ) |
446 { |
464 { |
447 CHuiLayout* hostContainer = group.Control(0).ContainerLayout( NULL ); |
465 CHuiLayout* hostContainer = group.Control(0).ContainerLayout( NULL ); |
448 hostContainer->iOpacity.Set(1.f); |
466 |
449 #ifdef SYMBIAN_BUILD_GCE |
467 #ifdef SYMBIAN_BUILD_GCE |
450 AlfAppUi()->ShowControlGroupL(aDisplay.Roster(), group, KAlfRosterShowAtBottom, 0); |
468 |
|
469 AlfAppUi()->ShowControlGroupL(aDisplay.Roster(), group, KHuiRosterShowAtTop, 0); |
|
470 |
451 #else |
471 #else |
452 aDisplay.Roster().ShowL( group, KAlfRosterShowAtBottom ); |
472 aDisplay.Roster().ShowL( group, KAlfRosterShowAtBottom ); |
453 #endif |
473 #endif |
454 iControlGroupOrder.Remove(iControlGroupOrder.Count()-1); |
474 iControlGroupOrder.Remove(iControlGroupOrder.Count()-1); |
455 } |
475 } |
662 |
682 |
663 // Show only if session is focused, otherwise delay until focus is gained |
683 // Show only if session is focused, otherwise delay until focus is gained |
664 if (iFocused) |
684 if (iFocused) |
665 { |
685 { |
666 #ifdef SYMBIAN_BUILD_GCE |
686 #ifdef SYMBIAN_BUILD_GCE |
667 AlfAppUi()->ShowControlGroupL(display.Roster(), controlGroup, where, 0); |
687 CHuiLayout* hostContainer = controlGroup.Control(0).ContainerLayout( NULL ); |
|
688 if(hostContainer) |
|
689 hostContainer->ClearFlags( EHuiVisualFlagUnderOpaqueHint); |
|
690 AlfAppUi()->ShowControlGroupL(display.Roster(), controlGroup, where, 0); |
668 #else |
691 #else |
669 display.Roster().ShowL(controlGroup, where); |
692 display.Roster().ShowL(controlGroup, where); |
670 #endif |
693 #endif |
671 AlfServer()->AdjustWindowGroupPositionL( |
694 AlfServer()->AdjustWindowGroupPositionL( |
672 *CHuiStatic::RootWin(), |
695 *CHuiStatic::RootWin(), |
673 ClientWindowGroup(), |
696 ClientWindowGroup(), |
674 PreferredWindowGroupPosition() ); |
697 PreferredWindowGroupPosition() ); |
675 |
|
676 } |
698 } |
677 else |
699 else |
678 { |
700 { |
|
701 #ifdef SYMBIAN_BUILD_GCE |
|
702 CHuiLayout* hostContainer = controlGroup.Control(0).ContainerLayout( NULL ); |
|
703 if(hostContainer) |
|
704 hostContainer->ClearFlags(EHuiVisualFlagUnderOpaqueHint); |
|
705 AlfAppUi()->ShowControlGroupL(display.Roster(), controlGroup, where, 0); |
|
706 #else |
|
707 |
679 if (where == KHuiRosterShowAtTop) |
708 if (where == KHuiRosterShowAtTop) |
680 { |
709 { |
681 if (iControlGroupOrder.Count()) |
710 if (iControlGroupOrder.Count()) |
682 { |
711 { |
683 iControlGroupOrder.InsertL(&controlGroup, 0); |
712 iControlGroupOrder.InsertL(&controlGroup, 0); |
2832 TBool enabled = aMessage.Int0(); |
2888 TBool enabled = aMessage.Int0(); |
2833 TInt err = AlfAppUi()->ForceSwRendering( enabled ); |
2889 TInt err = AlfAppUi()->ForceSwRendering( enabled ); |
2834 aMessage.Complete( err ); |
2890 aMessage.Complete( err ); |
2835 } |
2891 } |
2836 |
2892 |
|
2893 // --------------------------------------------------------------------------- |
|
2894 // EnvGetSizeAndRotation |
|
2895 // --------------------------------------------------------------------------- |
|
2896 // |
|
2897 void CAlfAppSrvSession::EnvGetSizeAndRotation(const RMessage2& aMessage) |
|
2898 { |
|
2899 TPckgBuf<TSize> size; |
|
2900 TPckgBuf<TInt> rotation; |
|
2901 TInt err = AlfAppUi()->GetSizeAndRotation(size(), rotation()); |
|
2902 if ( err == KErrNone ) |
|
2903 { |
|
2904 aMessage.Write(0, size); |
|
2905 aMessage.Write(1, rotation); |
|
2906 } |
|
2907 aMessage.Complete( err ); |
|
2908 } |
|
2909 |
|
2910 // --------------------------------------------------------------------------- |
|
2911 // EnvReadPixels |
|
2912 // --------------------------------------------------------------------------- |
|
2913 // |
|
2914 void CAlfAppSrvSession::EnvReadPixels(const RMessage2& aMessage) |
|
2915 { |
|
2916 TInt bitmapHandle = aMessage.Int0(); |
|
2917 CFbsBitmap* bmp = new CFbsBitmap; |
|
2918 TInt err = KErrNoMemory; |
|
2919 |
|
2920 if ( bmp ) |
|
2921 { |
|
2922 err = bmp->Duplicate( bitmapHandle ); |
|
2923 if ( err == KErrNone ) |
|
2924 { |
|
2925 err = AlfAppUi()->ReadPixels( bmp ); |
|
2926 } |
|
2927 delete bmp; |
|
2928 } |
|
2929 |
|
2930 aMessage.Complete( err ); |
|
2931 } |
|
2932 |
|
2933 |
2837 // End of file |
2934 // End of file |