48 #include <akntransitionutils.h> |
48 #include <akntransitionutils.h> |
49 #endif |
49 #endif |
50 |
50 |
51 enum TAknScreenClearerBaseFlags |
51 enum TAknScreenClearerBaseFlags |
52 { |
52 { |
53 EAknScreenClearerBlankAppStatusPane |
53 EAknScreenClearerDrawNavi, |
|
54 EAknScreenClearerBlankAppStatusPane, |
|
55 EAknScreenClearerDrawNaviSolid, |
54 }; |
56 }; |
55 |
57 |
56 enum |
58 enum |
57 { |
59 { |
58 ELayerBackground = 0, |
60 ELayerCbaBackground=0, |
59 ELayerExtension = 1, |
61 ELayerBackground = 1, |
60 ELayerStripe = 2, |
62 ELayerExtension = 2, |
61 ELayerWallpaper = 3, |
63 ELayerStripe = 3, |
62 ELayerN = 4 |
64 ELayerWallpaper = 4, |
|
65 ELayerN = 5 |
63 }; |
66 }; |
|
67 |
|
68 enum |
|
69 { |
|
70 ELayerStaconCbaBackground=0, |
|
71 ELayerStaconTop = 1, |
|
72 ELayerStaconBottom = 2, |
|
73 ELayerStaconMain = 3, |
|
74 ELayerStaconWallpaper = 4, |
|
75 ELayerStaconN = 5 |
|
76 }; |
64 |
77 |
65 enum |
78 enum |
66 { |
79 { |
67 ELayerStaconTop = 0, |
80 ELayerFlatCbaBackground=0, |
68 ELayerStaconBottom = 1, |
81 ELayerFlatBackground = 1, |
69 ELayerStaconMain = 2, |
82 ELayerFlatTl = 2, |
70 ELayerStaconWallpaper = 3, |
83 ELayerFlatTr = 3, |
71 ELayerStaconN = 4 |
84 ELayerFlatBl = 4, |
72 }; |
85 ELayerFlatBr = 5, |
73 |
86 ELayerFlatT = 6, |
74 enum |
87 ELayerFlatB = 7, |
75 { |
88 ELayerFlatR = 8, |
76 ELayerFlatBackground = 0, |
89 ELayerFlatL = 9, |
77 ELayerFlatTl = 1, |
90 ELayerFlatCenter = 10, |
78 ELayerFlatTr = 2, |
91 ELayerFlatMain = 11, |
79 ELayerFlatBl = 3, |
92 ELayerFlatWallpaper = 12, |
80 ELayerFlatBr = 4, |
93 ELayerSCtrl1 = 13, |
81 ELayerFlatT = 5, |
94 ELayerSCtrl2 = 14, |
82 ELayerFlatB = 6, |
95 ELayerSCtrl3 = 15, |
83 ELayerFlatR = 7, |
96 ELayerSCtrl4 = 16, |
84 ELayerFlatL = 8, |
97 ELayerSCtrl5 = 17, |
85 ELayerFlatCenter = 9, |
98 ELayerFlatN = 18 |
86 ELayerFlatMain = 10, |
|
87 ELayerFlatWallpaper = 11, |
|
88 ELayerFlatN = 12 |
|
89 }; |
99 }; |
90 |
100 |
91 |
101 |
92 class CAknScreenClearerBaseExtension : public CBase |
102 class CAknScreenClearerBaseExtension : public CBase |
93 { |
103 { |
94 public: |
104 public: |
95 ~CAknScreenClearerBaseExtension() |
105 ~CAknScreenClearerBaseExtension() |
96 { |
106 { |
97 delete iBgContext; |
107 delete iNaviWipe; |
|
108 delete iNaviMask; |
|
109 delete iBgContext; |
|
110 } |
|
111 public: |
|
112 CFbsBitmap* iNaviWipe; |
|
113 CFbsBitmap* iNaviMask; |
|
114 CAknsLayeredBackgroundControlContext* iBgContext; |
|
115 TInt iOrdinalPosition; |
|
116 }; |
|
117 |
|
118 /* THIS FUNCTION IS NOT USED |
|
119 |
|
120 static void LoadAndFlipBitmapL( |
|
121 CFbsBitmap* aTrg, const TDesC& aFile, const TInt aIndex ) |
|
122 { |
|
123 User::LeaveIfNull(aTrg); |
|
124 |
|
125 CFbsBitmap* sourceBitmap = new (ELeave) CFbsBitmap(); |
|
126 CleanupStack::PushL(sourceBitmap); |
|
127 User::LeaveIfError(sourceBitmap->Load(aFile, aIndex, ETrue)); |
|
128 TSize sourceBitmapSize = sourceBitmap->SizeInPixels(); |
|
129 |
|
130 User::LeaveIfError(aTrg->Create(sourceBitmapSize, sourceBitmap->DisplayMode())); |
|
131 |
|
132 CFbsBitmapDevice* destinationDevice = CFbsBitmapDevice::NewL( aTrg ); |
|
133 CleanupStack::PushL(destinationDevice); |
|
134 |
|
135 CFbsBitGc* destinationGc; |
|
136 User::LeaveIfError( destinationDevice->CreateContext( destinationGc ) ); |
|
137 |
|
138 TRect sourceBitmapBlittingRect( 0,0,1,sourceBitmapSize.iHeight ); |
|
139 |
|
140 for ( TInt xPos=sourceBitmapSize.iWidth-1; xPos >= 0; xPos-- ) |
|
141 { |
|
142 destinationGc->BitBlt( TPoint(xPos,0), sourceBitmap, sourceBitmapBlittingRect ); |
|
143 sourceBitmapBlittingRect.iTl.iX++; |
|
144 sourceBitmapBlittingRect.iBr.iX++; |
98 } |
145 } |
99 public: |
146 |
100 CAknsLayeredBackgroundControlContext* iBgContext; |
147 delete destinationGc; |
101 TInt iOrdinalPosition; |
148 CleanupStack::PopAndDestroy(2); // sourceBitmap, destinationDevice |
102 TBool iTransparent; |
149 } |
103 }; |
150 */ |
104 |
151 |
|
152 /* THIS FUNCTION IS NOT USED |
|
153 |
|
154 static CFbsBitmap* FlipBitmapL( CFbsBitmap* aBitmap ) |
|
155 { |
|
156 User::LeaveIfNull(aBitmap); |
|
157 |
|
158 TSize sourceBitmapSize = aBitmap->SizeInPixels(); |
|
159 |
|
160 // get a copy of wanted rect of source bitmap to tmpBitmap |
|
161 CFbsBitmap* tmpBitmap = new (ELeave) CFbsBitmap(); |
|
162 CleanupStack::PushL( tmpBitmap ); |
|
163 |
|
164 User::LeaveIfError( tmpBitmap->Create( sourceBitmapSize, aBitmap->DisplayMode() ) ); |
|
165 |
|
166 CFbsBitmapDevice* destinationDevice = CFbsBitmapDevice::NewL( tmpBitmap ); |
|
167 CleanupStack::PushL( destinationDevice ); |
|
168 |
|
169 CFbsBitGc* destinationGc; |
|
170 User::LeaveIfError( destinationDevice->CreateContext( destinationGc ) ); |
|
171 |
|
172 TRect sourceBitmapBlittingRect( 0,0,1,sourceBitmapSize.iHeight ); |
|
173 |
|
174 for ( TInt xPos=sourceBitmapSize.iWidth-1; xPos >= 0; xPos-- ) |
|
175 { |
|
176 destinationGc->BitBlt( TPoint(xPos,0), aBitmap, sourceBitmapBlittingRect ); |
|
177 sourceBitmapBlittingRect.iTl.iX++; |
|
178 sourceBitmapBlittingRect.iBr.iX++; |
|
179 } |
|
180 |
|
181 delete destinationGc; |
|
182 CleanupStack::PopAndDestroy(); // destinationDevice |
|
183 CleanupStack::Pop(); // tmpBitmap |
|
184 |
|
185 return tmpBitmap; |
|
186 } |
|
187 */ |
105 |
188 |
106 EXPORT_C CAknScreenClearerBase::~CAknScreenClearerBase() |
189 EXPORT_C CAknScreenClearerBase::~CAknScreenClearerBase() |
107 { |
190 { |
108 delete iExtension; |
191 delete iExtension; |
109 } |
192 } |
110 |
193 |
111 |
|
112 void CAknScreenClearerBase::CreateExtensionL() |
|
113 { |
|
114 if ( !iExtension ) |
|
115 { |
|
116 iExtension = new (ELeave) CAknScreenClearerBaseExtension; |
|
117 } |
|
118 } |
|
119 |
|
120 |
|
121 void CAknScreenClearerBase::SetTransparent( TBool aTransparent ) |
|
122 { |
|
123 iExtension->iTransparent = aTransparent; |
|
124 } |
|
125 |
|
126 |
|
127 EXPORT_C void CAknScreenClearerBase::ConstructL(RWindowGroup& aParent, TInt aOrdinalPos, TBool aBlankAppStatusPane) |
194 EXPORT_C void CAknScreenClearerBase::ConstructL(RWindowGroup& aParent, TInt aOrdinalPos, TBool aBlankAppStatusPane) |
128 { |
195 { |
129 CreateExtensionL(); |
196 iExtension = new (ELeave) CAknScreenClearerBaseExtension(); |
130 |
197 |
131 CreateWindowL(&aParent); |
198 CreateWindowL(&aParent); |
132 |
|
133 if ( iExtension->iTransparent ) |
|
134 { |
|
135 EnableWindowTransparency(); |
|
136 } |
|
137 |
|
138 CAlfEffectObserver* alfEffectObserver = CAlfEffectObserver::NewL(); |
|
139 alfEffectObserver->SetDistractionWindow(*DrawableWindow()); |
|
140 delete alfEffectObserver; |
|
141 |
199 |
142 iFlags.Assign(EAknScreenClearerBlankAppStatusPane, aBlankAppStatusPane); |
200 iFlags.Assign(EAknScreenClearerBlankAppStatusPane, aBlankAppStatusPane); |
143 |
201 |
144 SetShapeL(); |
202 SetShapeL(); |
145 |
203 |
166 |
224 |
167 EXPORT_C void CAknScreenClearerBase::Draw(const TRect& /*aRect*/) const |
225 EXPORT_C void CAknScreenClearerBase::Draw(const TRect& /*aRect*/) const |
168 { |
226 { |
169 CWindowGc& gc = SystemGc(); |
227 CWindowGc& gc = SystemGc(); |
170 MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
228 MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
171 |
229 AknsDrawUtils::Background( skin, iExtension->iBgContext, this, gc, Rect() ); |
172 if ( !iExtension->iTransparent ) |
230 |
173 { |
231 if (Layout_Meta_Data::IsPenEnabled() && Layout_Meta_Data::IsLandscapeOrientation()) |
174 AknsDrawUtils::Background( skin, iExtension->iBgContext, this, gc, Rect() ); |
232 { |
175 } |
233 #if 0 |
176 else |
234 TRect application_window( KWholeScreen ); |
177 { |
235 TAknLayoutRect area_side_right_pane; |
178 gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha ); |
236 TInt variety = 0; |
179 gc.Clear( Rect() ); |
237 area_side_right_pane.LayoutRect(application_window, AknLayoutScalable_Avkon::area_side_right_pane(variety)); |
180 gc.Reset(); |
238 |
181 } |
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 |
182 |
289 |
183 iEikonEnv->WsSession().Flush(); |
290 iEikonEnv->WsSession().Flush(); |
184 return; |
291 return; |
185 } |
292 } |
186 |
293 |
209 RRegion appStatuspaneShape; |
316 RRegion appStatuspaneShape; |
210 CleanupClosePushL(appStatuspaneShape); |
317 CleanupClosePushL(appStatuspaneShape); |
211 |
318 |
212 CEikStatusPaneBase* sp = CEikStatusPaneBase::Current(); |
319 CEikStatusPaneBase* sp = CEikStatusPaneBase::Current(); |
213 |
320 |
214 // Set the clearer window's size so that it covers the screen in both |
321 if (iFlags[EAknScreenClearerBlankAppStatusPane]) |
215 // portrait and landscape orientations simultaneously. |
322 { |
216 // This is done in order to prevent NGA from drawing control groups |
323 shape.AddRect(KWholeScreen); |
217 // underneath the fullscreen foreground application in cases the clearer |
|
218 // orientation can't be readily updated during the layout switch, due |
|
219 // to e.g. application startup taking a long time. |
|
220 // Note that only the clearer window's size is set to be larger, the |
|
221 // skin background is still the screen size so that the skin background |
|
222 // won't get stretched. |
|
223 TRect screenRect( KWholeScreen ); |
|
224 TRect squareScreenRect( screenRect ); |
|
225 if ( squareScreenRect.Width() > squareScreenRect.Height() ) |
|
226 { |
|
227 squareScreenRect.SetHeight( squareScreenRect.Width() ); |
|
228 } |
324 } |
229 else |
325 else |
230 { |
326 { |
231 squareScreenRect.SetWidth( squareScreenRect.Height() ); |
327 shape.AddRect(KWholeScreen); |
|
328 sp->GetShapeL(appStatuspaneShape, !iFlags[EAknScreenClearerBlankAppStatusPane], ETrue); |
|
329 shape.SubRegion(appStatuspaneShape); |
232 } |
330 } |
233 |
331 |
234 if ( iFlags[EAknScreenClearerBlankAppStatusPane] ) |
332 if (shape.CheckError()) |
235 { |
333 User::Leave(KErrNoMemory); |
236 shape.AddRect( squareScreenRect ); |
334 |
237 } |
335 SetRect(KWholeScreen); |
238 else |
336 DrawableWindow()->SetShape(shape); |
239 { |
337 |
240 // Square shape is used only if the clearer is used to clear the |
338 CleanupStack::PopAndDestroy(2); // close shapes |
241 // whole screen. |
339 |
242 shape.AddRect( screenRect ); |
340 TBool drawNavi = |
243 sp->GetShapeL( appStatuspaneShape, |
341 iFlags[EAknScreenClearerBlankAppStatusPane] && |
244 !iFlags[EAknScreenClearerBlankAppStatusPane], |
342 sp->IsVisible() && |
245 ETrue ); |
343 sp->PaneCapabilities(TUid::Uid(EEikStatusPaneUidNavi)).IsInCurrentLayout(); |
246 shape.SubRegion( appStatuspaneShape ); |
344 |
247 } |
345 iFlags.Assign(EAknScreenClearerDrawNavi, drawNavi); |
248 |
|
249 if ( shape.CheckError() ) |
|
250 { |
|
251 User::Leave( KErrNoMemory ); |
|
252 } |
|
253 |
|
254 SetRect( iFlags[EAknScreenClearerBlankAppStatusPane] ? squareScreenRect : |
|
255 screenRect ); |
|
256 DrawableWindow()->SetShape( shape ); |
|
257 |
|
258 CleanupStack::PopAndDestroy( 2, &shape ); // close shapes |
|
259 } |
346 } |
260 |
347 |
261 |
348 |
262 |
349 |
263 void CAknScreenClearerBase::SetSkinShapeL() |
350 void CAknScreenClearerBase::SetSkinShapeL() |
265 for (TInt n=0; n<ELayerFlatN; n++) |
352 for (TInt n=0; n<ELayerFlatN; n++) |
266 { |
353 { |
267 iExtension->iBgContext->SetLayerImage( n, KAknsIIDNone ); |
354 iExtension->iBgContext->SetLayerImage( n, KAknsIIDNone ); |
268 } |
355 } |
269 |
356 |
270 CAknEnv* aknEnv = AVKONENV; |
357 TBool widescreenPaneUsed( |
|
358 R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL == |
|
359 AVKONENV->StatusPaneResIdForCurrentLayout( |
|
360 R_AVKON_STATUS_PANE_LAYOUT_USUAL ) || |
|
361 R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE == |
|
362 AVKONENV->StatusPaneResIdForCurrentLayout( |
|
363 R_AVKON_STATUS_PANE_LAYOUT_IDLE ) ); |
271 |
364 |
272 TInt usualSpLayout = |
365 // Check that if in landscape mode statuspane is changed to stacon pane |
273 aknEnv->StatusPaneResIdForCurrentLayout( |
366 TBool staconPaneUsedInLandscape = |
274 R_AVKON_STATUS_PANE_LAYOUT_USUAL ); |
367 ( ( R_AVKON_STATUS_PANE_LAYOUT_USUAL != |
275 |
368 AVKONENV->StatusPaneResIdForCurrentLayout( |
276 TInt idleSpLayout = |
369 R_AVKON_STATUS_PANE_LAYOUT_USUAL ) ) && |
277 aknEnv->StatusPaneResIdForCurrentLayout( |
370 ( R_AVKON_STATUS_PANE_LAYOUT_USUAL_MIRRORED != |
278 R_AVKON_STATUS_PANE_LAYOUT_IDLE ); |
371 AVKONENV->StatusPaneResIdForCurrentLayout( |
279 |
372 R_AVKON_STATUS_PANE_LAYOUT_USUAL ) ) ); |
280 TBool widescreenPaneUsed = |
373 |
281 ( usualSpLayout == R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL ) || |
|
282 ( idleSpLayout == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE ); |
|
283 |
|
284 TBool flatStatuspaneusedInLandscape = |
374 TBool flatStatuspaneusedInLandscape = |
285 ( usualSpLayout == R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT ) || |
375 ( R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT == |
286 ( usualSpLayout == R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT ); |
376 AVKONENV->StatusPaneResIdForCurrentLayout( |
|
377 R_AVKON_STATUS_PANE_LAYOUT_USUAL ) ); |
287 |
378 |
288 |
379 |
289 // TRect application_window = iAvkonAppUi->ApplicationRect(); |
380 // TRect application_window = iAvkonAppUi->ApplicationRect(); |
290 // This is sometimes needed before iAvkonAppUi->ApplicationRect() is updated |
381 // This is sometimes needed before iAvkonAppUi->ApplicationRect() is updated |
291 TRect application_window( KWholeScreen ); |
382 TRect application_window( KWholeScreen ); |
473 iExtension->iBgContext->SetLayerImage( 4, KAknsIIDNone ); |
564 iExtension->iBgContext->SetLayerImage( 4, KAknsIIDNone ); |
474 |
565 |
475 iExtension->iBgContext->SetLayerRect( 0, main_pane.Rect() ); |
566 iExtension->iBgContext->SetLayerRect( 0, main_pane.Rect() ); |
476 iExtension->iBgContext->SetLayerRect( 1, staconTop ); |
567 iExtension->iBgContext->SetLayerRect( 1, staconTop ); |
477 iExtension->iBgContext->SetLayerRect( 2, staconBottom ); |
568 iExtension->iBgContext->SetLayerRect( 2, staconBottom ); |
478 } |
569 } |
|
570 |
|
571 if (Layout_Meta_Data::IsPenEnabled()) |
|
572 { |
|
573 TAknLayoutRect area_side_right_pane; |
|
574 TInt variety = 0; |
|
575 area_side_right_pane.LayoutRect(application_window, AknLayoutScalable_Avkon::area_side_right_pane(variety)); |
|
576 |
|
577 TAknLayoutRect sctrl_sk_top_pane; |
|
578 sctrl_sk_top_pane.LayoutRect(area_side_right_pane.Rect(), AknLayoutScalable_Avkon::sctrl_sk_top_pane(0)); |
|
579 |
|
580 TAknLayoutRect sctrl_sk_bottom_pane; |
|
581 sctrl_sk_bottom_pane.LayoutRect(area_side_right_pane.Rect(), AknLayoutScalable_Avkon::sctrl_sk_bottom_pane(0)); |
|
582 |
|
583 TAknLayoutRect grid_sctrl_middle_pane; |
|
584 grid_sctrl_middle_pane.LayoutRect(area_side_right_pane.Rect(), AknLayoutScalable_Avkon::grid_sctrl_middle_pane(0)); |
|
585 |
|
586 TAknLayoutRect cell_sctrl_middle_pane1; |
|
587 cell_sctrl_middle_pane1.LayoutRect(grid_sctrl_middle_pane.Rect(), AknLayoutScalable_Avkon::cell_sctrl_middle_pane(0,0,0)); |
|
588 TAknLayoutRect cell_sctrl_middle_pane2; |
|
589 cell_sctrl_middle_pane2.LayoutRect(grid_sctrl_middle_pane.Rect(), AknLayoutScalable_Avkon::cell_sctrl_middle_pane(0,0,1)); |
|
590 TAknLayoutRect cell_sctrl_middle_pane3; |
|
591 cell_sctrl_middle_pane3.LayoutRect(grid_sctrl_middle_pane.Rect(), AknLayoutScalable_Avkon::cell_sctrl_middle_pane(0,0,2)); |
|
592 |
|
593 |
|
594 |
|
595 iExtension->iBgContext->SetLayerImage( ELayerFlatCbaBackground, KAknsIIDQsnBgScreen ); |
|
596 |
|
597 |
|
598 iExtension->iBgContext->SetLayerRect( ELayerFlatCbaBackground, application_window ); |
|
599 } |
|
600 |
|
601 |
|
602 |
|
603 |
479 } |
604 } |
480 else |
605 else |
481 { |
606 { |
482 // Default is portrait |
607 // Default is portrait |
483 TInt spRes = CEikStatusPaneBase::Current()->CurrentLayoutResId(); |
608 TInt spRes = CEikStatusPaneBase::Current()->CurrentLayoutResId(); |
615 CEikonEnv& eikEnv = *static_cast<CEikonEnv*>(self->ControlEnv()); |
740 CEikonEnv& eikEnv = *static_cast<CEikonEnv*>(self->ControlEnv()); |
616 self->ConstructL(eikEnv.RootWin(), 0, aBlankAppStatusPane); |
741 self->ConstructL(eikEnv.RootWin(), 0, aBlankAppStatusPane); |
617 return(self); |
742 return(self); |
618 } |
743 } |
619 |
744 |
620 |
|
621 EXPORT_C CAknLocalScreenClearer* CAknLocalScreenClearer::NewLC(TBool aBlankAppStatusPane, TBool aTransparent) |
|
622 { |
|
623 CAknLocalScreenClearer* self=new(ELeave) CAknLocalScreenClearer; |
|
624 CleanupStack::PushL(self); |
|
625 self->CreateExtensionL(); |
|
626 self->SetTransparent(aTransparent); |
|
627 CEikonEnv& eikEnv = *static_cast<CEikonEnv*>(self->ControlEnv()); |
|
628 self->ConstructL(eikEnv.RootWin(), 0, aBlankAppStatusPane); |
|
629 return(self); |
|
630 } |
|
631 |
|
632 |
|
633 EXPORT_C CAknLocalScreenClearer* CAknLocalScreenClearer::NewL(TBool aBlankAppStatusPane) |
745 EXPORT_C CAknLocalScreenClearer* CAknLocalScreenClearer::NewL(TBool aBlankAppStatusPane) |
634 { |
746 { |
635 CAknLocalScreenClearer* self = CAknLocalScreenClearer::NewLC(aBlankAppStatusPane); |
747 CAknLocalScreenClearer* self = CAknLocalScreenClearer::NewLC(aBlankAppStatusPane); |
636 CleanupStack::Pop(self); |
748 CleanupStack::Pop(self); |
637 return(self); |
749 return(self); |
638 } |
750 } |
639 |
751 |
640 |
|
641 EXPORT_C CAknLocalScreenClearer* CAknLocalScreenClearer::NewL(TBool aBlankAppStatusPane, TBool aTransparent) |
|
642 { |
|
643 CAknLocalScreenClearer* self = CAknLocalScreenClearer::NewLC(aBlankAppStatusPane, aTransparent); |
|
644 CleanupStack::Pop(self); |
|
645 return(self); |
|
646 } |
|
647 |
|
648 |
|
649 EXPORT_C void CAknLocalScreenClearer::HandleResourceChange(TInt aType) |
752 EXPORT_C void CAknLocalScreenClearer::HandleResourceChange(TInt aType) |
650 { |
753 { |
651 if (aType == KEikDynamicLayoutVariantSwitch) |
754 if (aType == KEikDynamicLayoutVariantSwitch) |
652 { |
755 { |
653 TRAP_IGNORE( |
756 SetShapeL(); |
654 SetShapeL(); |
757 SetSkinShapeL(); |
655 SetSkinShapeL(); |
|
656 ); |
|
657 DrawDeferred(); |
758 DrawDeferred(); |
658 } |
759 } |
659 } |
760 } |
660 |
761 |