34 #include <uiacceltk/HuiBorderBrush.h> |
34 #include <uiacceltk/HuiBorderBrush.h> |
35 #include <uiacceltk/HuiUtil.h> |
35 #include <uiacceltk/HuiUtil.h> |
36 #include <uiacceltk/HuiTextVisual.h> |
36 #include <uiacceltk/HuiTextVisual.h> |
37 #include <uiacceltk/HuiGradientBrush.h> |
37 #include <uiacceltk/HuiGradientBrush.h> |
38 #include <apgwgnam.h> |
38 #include <apgwgnam.h> |
|
39 #include <akntransitionutils.h> |
|
40 #include "alfeffectutils.h" |
39 |
41 |
40 #ifdef ALF_USE_CANVAS |
42 #ifdef ALF_USE_CANVAS |
41 #include <uiacceltk/HuiCanvasVisual.h> |
43 #include <uiacceltk/HuiCanvasVisual.h> |
42 #endif |
44 #endif |
43 |
45 |
464 if (iWindowGc) |
466 if (iWindowGc) |
465 { |
467 { |
466 if(iWindowGc->Construct() == KErrNone) |
468 if(iWindowGc->Construct() == KErrNone) |
467 { |
469 { |
468 iWindowGc->Activate(*iWindow); |
470 iWindowGc->Activate(*iWindow); |
|
471 iWindow->BeginRedraw(); |
469 iWindowGc->SetBrushColor(0xffffffff); |
472 iWindowGc->SetBrushColor(0xffffffff); |
470 iWindowGc->Clear(); |
473 iWindowGc->Clear(); |
|
474 iWindow->EndRedraw(); |
471 iWindowGc->Deactivate(); |
475 iWindowGc->Deactivate(); |
472 } |
476 } |
473 } |
477 } |
474 |
478 |
475 iWindowGroup.SetOrdinalPosition(-1,ECoeWinPriorityNeverAtFront); |
479 iWindowGroup.SetOrdinalPosition(-1,ECoeWinPriorityNeverAtFront); |
516 iScreenDevice->SetAppScreenMode(iScreenDevice->CurrentScreenMode()); |
520 iScreenDevice->SetAppScreenMode(iScreenDevice->CurrentScreenMode()); |
517 iWindow->SetSize(iScreenDevice->SizeInPixels()); |
521 iWindow->SetSize(iScreenDevice->SizeInPixels()); |
518 #endif |
522 #endif |
519 |
523 |
520 // This is a workaround for possibly missing command buffers at layout switch |
524 // This is a workaround for possibly missing command buffers at layout switch |
521 iWsSession.ClearAllRedrawStores(); |
525 // iWsSession.ClearAllRedrawStores(); |
522 |
526 |
523 __ALFLOGSTRING2("ALF EventWin: Size(%d,%d)", iWindow->Size().iWidth, iWindow->Size().iHeight ); |
527 __ALFLOGSTRING2("ALF EventWin: Size(%d,%d)", iWindow->Size().iWidth, iWindow->Size().iHeight ); |
524 //and fall through |
528 //and fall through |
525 } |
529 } |
526 |
530 |
639 #endif // #ifdef SYMBIAN_BUILD_GCE |
643 #endif // #ifdef SYMBIAN_BUILD_GCE |
640 RWindow* iPlainWindow; |
644 RWindow* iPlainWindow; |
641 CHuiDisplay* iMainDisplay; |
645 CHuiDisplay* iMainDisplay; |
642 CHuiDisplay* iTVDisplay; |
646 CHuiDisplay* iTVDisplay; |
643 CAlfEventBridge* iEventAo; |
647 CAlfEventBridge* iEventAo; |
644 RAlfTfxClient iDsServer; |
|
645 TBool iDsActivated; |
|
646 }; |
648 }; |
647 |
649 |
648 // ======== MEMBER FUNCTIONS ======== |
650 // ======== MEMBER FUNCTIONS ======== |
649 |
651 |
650 // --------------------------------------------------------------------------- |
652 // --------------------------------------------------------------------------- |
1404 // NotifyLowMemory |
1406 // NotifyLowMemory |
1405 // --------------------------------------------------------------------------- |
1407 // --------------------------------------------------------------------------- |
1406 // |
1408 // |
1407 void CAlfAppUi::NotifyLowMemory(TInt aAmountOfFreeMemRequested) |
1409 void CAlfAppUi::NotifyLowMemory(TInt aAmountOfFreeMemRequested) |
1408 { |
1410 { |
1409 if (!iData->iDsActivated) |
|
1410 { |
|
1411 if (iData->iDsServer.Open() == KErrNone) |
|
1412 { |
|
1413 iData->iDsActivated = ETrue; |
|
1414 } |
|
1415 } |
|
1416 |
|
1417 if (iData->iDsActivated ) |
|
1418 { |
|
1419 if (!aAmountOfFreeMemRequested) |
|
1420 { |
|
1421 iData->iDsServer.SendSynch(KAlfCompositionGoodOnGraphicsMemory, TIpcArgs()); |
|
1422 } |
|
1423 else |
|
1424 { |
|
1425 iData->iDsServer.SendSynch(KAlfCompositionLowOnGraphicsMemory, TIpcArgs()); |
|
1426 } |
|
1427 } |
|
1428 |
|
1429 /* |
1411 /* |
1430 // Toggle between normal & low memory levels |
1412 // Toggle between normal & low memory levels |
1431 if (!aAmountOfFreeMemRequested) |
1413 if (!aAmountOfFreeMemRequested) |
1432 { |
1414 { |
1433 iData->iBridgeObj->SetMemoryLevel(EHuiMemoryLevelNormal); |
1415 iData->iBridgeObj->SetMemoryLevel(EHuiMemoryLevelNormal); |
1456 TInt CAlfAppUi::ForceSwRendering( TBool aEnabled ) |
1438 TInt CAlfAppUi::ForceSwRendering( TBool aEnabled ) |
1457 { |
1439 { |
1458 return iData->iBridgeObj->ForceSwRendering( aEnabled ); |
1440 return iData->iBridgeObj->ForceSwRendering( aEnabled ); |
1459 } |
1441 } |
1460 |
1442 |
|
1443 // --------------------------------------------------------------------------- |
|
1444 // GetSizeAndRotation |
|
1445 // --------------------------------------------------------------------------- |
|
1446 // |
|
1447 TInt CAlfAppUi::GetSizeAndRotation(TSize& aSize, TInt& aRotation) |
|
1448 { |
|
1449 return iData->iBridgeObj->GetSizeAndRotation(aSize, aRotation); |
|
1450 } |
|
1451 |
|
1452 // --------------------------------------------------------------------------- |
|
1453 // ReadPixels |
|
1454 // --------------------------------------------------------------------------- |
|
1455 // |
|
1456 TInt CAlfAppUi::ReadPixels(CFbsBitmap* aBitmap) |
|
1457 { |
|
1458 return iData->iBridgeObj->ReadPixels(aBitmap); |
|
1459 } |
|
1460 |
1461 void CAlfAppUi::SetAlfAppWindowGroup( TInt aID ) |
1461 void CAlfAppUi::SetAlfAppWindowGroup( TInt aID ) |
1462 { |
1462 { |
1463 iData->iBridgeObj->SetWindowGroupAsAlfApp( aID ); |
1463 iData->iBridgeObj->SetWindowGroupAsAlfApp( aID ); |
1464 } |
1464 } |
|
1465 |
|
1466 CAlfAppSrvSessionBase* CAlfAppUi::SrvSessionForControlGroup(CHuiControlGroup& aGroup) |
|
1467 { |
|
1468 return iData->iServer->SrvSessionForControlGroup(aGroup); |
|
1469 } |
|
1470 |
|
1471 void CAlfAppUi::DoBlankScreen(const RMessage2& aMessage) |
|
1472 { |
|
1473 __ALFLOGSTRING("CAlfAppUi::DoBlankScreen >>"); |
|
1474 TSecureId capServerId(0x10207218); |
|
1475 TSecurityPolicy policy(capServerId); |
|
1476 if (!policy.CheckPolicy(aMessage)) |
|
1477 { |
|
1478 User::Leave(KErrPermissionDenied); |
|
1479 } |
|
1480 |
|
1481 // if (iData->iBridgeObj->LayoutSwitchEffectCoordinator()) |
|
1482 // { |
|
1483 // iData->iBridgeObj->LayoutSwitchEffectCoordinator()->EnableSafeCounter(EFalse); // let capserver rule |
|
1484 // } |
|
1485 |
|
1486 TBool pause = aMessage.Int0(); |
|
1487 |
|
1488 iData->iBridgeObj->LayoutSwitchEffectCoordinator()->Blank(pause); |
|
1489 |
|
1490 __ALFLOGSTRING("CAlfAppUi::DoBlankScreen <<"); |
|
1491 // let the session complete message |
|
1492 } |
|
1493 |
1465 // end of file |
1494 // end of file |