uifw/EikStd/coctlsrc/AknClearer.cpp
branchRCL_3
changeset 4 8ca85d2f0db7
parent 0 2f259fa3e83a
child 18 0aa5fbdfbc30
equal deleted inserted replaced
0:2f259fa3e83a 4:8ca85d2f0db7
     1 /*
     1 /*
     2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   226 	{
   226 	{
   227 	CWindowGc& gc = SystemGc();
   227 	CWindowGc& gc = SystemGc();
   228     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
   228     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
   229     AknsDrawUtils::Background( skin, iExtension->iBgContext, this, gc, Rect() );
   229     AknsDrawUtils::Background( skin, iExtension->iBgContext, this, gc, Rect() );
   230 
   230 
   231 	if (Layout_Meta_Data::IsPenEnabled() && Layout_Meta_Data::IsLandscapeOrientation())
       
   232 		{
       
   233 #if 0
       
   234 	    TRect application_window( KWholeScreen );
       
   235 		TAknLayoutRect area_side_right_pane;
       
   236 		TInt variety = 0;
       
   237 		area_side_right_pane.LayoutRect(application_window, AknLayoutScalable_Avkon::area_side_right_pane(variety));
       
   238 
       
   239 		CFbsBitmap *mask1 = AknsUtils::GetCachedBitmap( skin, KAknsIIDQgnIndiSctrlSkMaskLsc );
       
   240 		CFbsBitmap *mask5 = AknsUtils::GetCachedBitmap( skin, KAknsIIDQgnIndiSctrlSkMaskLsc );
       
   241 
       
   242 		CFbsBitmap *bitmap = new(ELeave)CFbsBitmap;
       
   243 		CleanupStack::PushL(bitmap);
       
   244 		bitmap->Create(area_side_right_pane.Rect().Size(), EColor16MA);
       
   245         CFbsBitGc* bitmapContext = NULL;
       
   246         CFbsBitmapDevice* bitmapDevice =
       
   247             CFbsBitmapDevice::NewL( bitmap );
       
   248         CleanupStack::PushL( bitmapDevice );
       
   249         bitmapDevice->CreateContext( bitmapContext );
       
   250         CleanupStack::PushL( bitmapContext );
       
   251 
       
   252         TRect area_side_right_pane_rect = area_side_right_pane.Rect();
       
   253         area_side_right_pane_rect.iTl = TPoint(0,0);
       
   254         
       
   255 		TAknLayoutRect sctrl_sk_top_pane;
       
   256 		sctrl_sk_top_pane.LayoutRect(area_side_right_pane_rect, AknLayoutScalable_Avkon::sctrl_sk_top_pane(0));
       
   257 	
       
   258 		TAknLayoutRect sctrl_sk_bottom_pane;
       
   259 		sctrl_sk_bottom_pane.LayoutRect(area_side_right_pane_rect, AknLayoutScalable_Avkon::sctrl_sk_bottom_pane(0));
       
   260 	
       
   261 		TAknLayoutRect grid_sctrl_middle_pane;
       
   262 		grid_sctrl_middle_pane.LayoutRect(area_side_right_pane_rect, AknLayoutScalable_Avkon::grid_sctrl_middle_pane(0));
       
   263 	
       
   264 		TAknLayoutRect cell_sctrl_middle_pane1;
       
   265 		cell_sctrl_middle_pane1.LayoutRect(grid_sctrl_middle_pane.Rect(), AknLayoutScalable_Avkon::cell_sctrl_middle_pane(0,0,0));
       
   266 		TAknLayoutRect cell_sctrl_middle_pane2;
       
   267 		cell_sctrl_middle_pane2.LayoutRect(grid_sctrl_middle_pane.Rect(), AknLayoutScalable_Avkon::cell_sctrl_middle_pane(0,0,1));
       
   268 		TAknLayoutRect cell_sctrl_middle_pane3;
       
   269 		cell_sctrl_middle_pane3.LayoutRect(grid_sctrl_middle_pane.Rect(), AknLayoutScalable_Avkon::cell_sctrl_middle_pane(0,0,2));
       
   270 	
       
   271 		AknsDrawUtils::DrawFrame( skin, *bitmapContext, sctrl_sk_top_pane.Rect(), Convert(sctrl_sk_top_pane.Rect()), KAknsIIDQgnFrSctrlSkButton, KAknsIIDQgnFrSctrlSkButtonCenter);
       
   272 		AknsDrawUtils::DrawFrame( skin, *bitmapContext, cell_sctrl_middle_pane1.Rect(), Convert2(cell_sctrl_middle_pane1.Rect()), KAknsIIDQgnFrSctrlButton, KAknsIIDQgnFrSctrlButtonCenter);
       
   273 		AknsDrawUtils::DrawFrame( skin, *bitmapContext, cell_sctrl_middle_pane2.Rect(), Convert2(cell_sctrl_middle_pane2.Rect()), KAknsIIDQgnFrSctrlButton, KAknsIIDQgnFrSctrlButtonCenter);
       
   274 		AknsDrawUtils::DrawFrame( skin, *bitmapContext, cell_sctrl_middle_pane3.Rect(), Convert2(cell_sctrl_middle_pane3.Rect()), KAknsIIDQgnFrSctrlButton, KAknsIIDQgnFrSctrlButtonCenter);
       
   275 		AknsDrawUtils::DrawFrame( skin, *bitmapContext, sctrl_sk_bottom_pane.Rect(), Convert(sctrl_sk_bottom_pane.Rect()), KAknsIIDQgnFrSctrlSkButton, KAknsIIDQgnFrSctrlSkButtonCenter);
       
   276 
       
   277 		TSize size1 = sctrl_sk_top_pane.Rect().Size();
       
   278 		TSize size5 = sctrl_sk_bottom_pane.Rect().Size();
       
   279         AknIconUtils::SetSize(mask1, size1, EAspectRatioNotPreserved);
       
   280         AknIconUtils::SetSize(mask5, size5, EAspectRatioNotPreserved);
       
   281 
       
   282 		gc.BitBltMasked( area_side_right_pane.Rect().iTl+sctrl_sk_top_pane.Rect().iTl, bitmap, sctrl_sk_top_pane.Rect(), mask1, EFalse);
       
   283         gc.BitBltMasked( area_side_right_pane.Rect().iTl+sctrl_sk_bottom_pane.Rect().iTl, bitmap, sctrl_sk_bottom_pane.Rect(), mask5, EFalse);
       
   284 		
       
   285         CleanupStack::PopAndDestroy(3); // bitmap, bitmapdevice, bitmapcontext
       
   286 #endif
       
   287 		}
       
   288 
       
   289 
       
   290     iEikonEnv->WsSession().Flush();
   231     iEikonEnv->WsSession().Flush();
   291     return;
   232     return;
   292 	}
   233 	}
   293 	
   234 	
   294 EXPORT_C void CAknScreenClearerBase::HandlePointerEventL(const TPointerEvent& aPointerEvent) 
   235 EXPORT_C void CAknScreenClearerBase::HandlePointerEventL(const TPointerEvent& aPointerEvent) 
   370           ( R_AVKON_STATUS_PANE_LAYOUT_USUAL_MIRRORED !=
   311           ( R_AVKON_STATUS_PANE_LAYOUT_USUAL_MIRRORED !=
   371                 AVKONENV->StatusPaneResIdForCurrentLayout(
   312                 AVKONENV->StatusPaneResIdForCurrentLayout(
   372                     R_AVKON_STATUS_PANE_LAYOUT_USUAL ) ) );
   313                     R_AVKON_STATUS_PANE_LAYOUT_USUAL ) ) );
   373 
   314 
   374     TBool flatStatuspaneusedInLandscape =
   315     TBool flatStatuspaneusedInLandscape =
       
   316         ( R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT ==
       
   317             AVKONENV->StatusPaneResIdForCurrentLayout(
       
   318                 R_AVKON_STATUS_PANE_LAYOUT_USUAL ) );
   375         ( R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT ==
   319         ( R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT ==
   376             AVKONENV->StatusPaneResIdForCurrentLayout(
   320             AVKONENV->StatusPaneResIdForCurrentLayout(
   377                 R_AVKON_STATUS_PANE_LAYOUT_USUAL ) );
   321                 R_AVKON_STATUS_PANE_LAYOUT_USUAL ) );
   378     
   322     
   379 
   323 
   751 	
   695 	
   752 EXPORT_C void CAknLocalScreenClearer::HandleResourceChange(TInt aType)
   696 EXPORT_C void CAknLocalScreenClearer::HandleResourceChange(TInt aType)
   753 	{
   697 	{
   754 	if (aType == KEikDynamicLayoutVariantSwitch)
   698 	if (aType == KEikDynamicLayoutVariantSwitch)
   755 		{
   699 		{
   756 		SetShapeL();
   700         TRAP_IGNORE(
   757 		SetSkinShapeL();
   701             SetShapeL();
       
   702             SetSkinShapeL();
       
   703             );
   758 		DrawDeferred();		
   704 		DrawDeferred();		
   759 		}
   705 		}
   760 	}
   706 	}
   761 	
   707