22 #include "WidgetUiWindow.h" |
22 #include "WidgetUiWindow.h" |
23 #include "WidgetUiAsyncExit.h" |
23 #include "WidgetUiAsyncExit.h" |
24 #include "widgetappdefs.rh" |
24 #include "widgetappdefs.rh" |
25 #include <WidgetUi.rsg> |
25 #include <WidgetUi.rsg> |
26 #include "WidgetUi.hrh" |
26 #include "WidgetUi.hrh" |
27 #include <s32mem.h> |
27 #include <S32MEM.H> |
28 #include <avkon.hrh> |
28 #include <avkon.hrh> |
29 #include <e32std.h> |
29 #include <e32std.h> |
30 #include <bautils.h> |
30 #include <bautils.h> |
31 #include <oommonitorplugin.h> |
31 #include <oommonitorplugin.h> |
32 #include <BrowserDialogsProvider.h> |
32 #include <browserdialogsprovider.h> |
33 #include <e32property.h> |
33 #include <e32property.h> |
34 |
34 |
35 #ifdef BRDO_WRT_HS_FF |
35 #ifdef BRDO_WRT_HS_FF |
36 #include <akntoolbar.h> |
36 #include <AknToolbar.h> |
37 #endif |
37 #endif |
38 |
38 |
39 // EXTERNAL DATA STRUCTURES |
39 // EXTERNAL DATA STRUCTURES |
40 |
40 |
41 // EXTERNAL FUNCTION PROTOTYPES |
41 // EXTERNAL FUNCTION PROTOTYPES |
286 void CWidgetUiAppUi::HandleResourceChangeL( TInt aType ) |
286 void CWidgetUiAppUi::HandleResourceChangeL( TInt aType ) |
287 { |
287 { |
288 CAknViewAppUi::HandleResourceChangeL( aType ); |
288 CAknViewAppUi::HandleResourceChangeL( aType ); |
289 if ( aType == KEikDynamicLayoutVariantSwitch && iWindowManager && iWindowManager->ActiveWindow()) |
289 if ( aType == KEikDynamicLayoutVariantSwitch && iWindowManager && iWindowManager->ActiveWindow()) |
290 { |
290 { |
291 iWindowManager->ActiveWindow()->Relayout(); |
291 iWindowManager->ActiveWindow()->RelayoutL( aType ); |
292 } |
292 } |
293 } |
293 } |
294 |
294 |
295 // ------------------------------------------------------------------------------ |
295 // ------------------------------------------------------------------------------ |
296 // CWidgetUiAppUi::HandleWsEventL |
296 // CWidgetUiAppUi::HandleWsEventL |
302 const TWsEvent& aEvent, CCoeControl* aDestination ) |
302 const TWsEvent& aEvent, CCoeControl* aDestination ) |
303 { |
303 { |
304 |
304 |
305 if ( aEvent.Type() == KAknUidValueEndKeyCloseEvent ) |
305 if ( aEvent.Type() == KAknUidValueEndKeyCloseEvent ) |
306 { |
306 { |
|
307 |
|
308 #ifdef BRDO_MULTITOUCH_ENABLED_FF |
|
309 if( IsDisplayingDialog() ) |
|
310 { |
|
311 //Get the top dialog |
|
312 CCoeControl* control = TopFocusedControl(); |
|
313 delete control; |
|
314 control = NULL; |
|
315 } |
|
316 #endif |
307 // Close the current active widget |
317 // Close the current active widget |
308 iWindowManager->CloseWindowsAsync(EFalse); |
318 iWindowManager->CloseWindowsAsync(EFalse); |
309 return; |
319 return; |
310 } |
320 } |
311 |
321 |
376 { |
386 { |
377 if(aEventType == KAppOomMonitor_FreeRam ) |
387 if(aEventType == KAppOomMonitor_FreeRam ) |
378 { |
388 { |
379 #ifdef OOM_WIDGET_CLOSEALL |
389 #ifdef OOM_WIDGET_CLOSEALL |
380 CloseAllWidgetsAndExit(); |
390 CloseAllWidgetsAndExit(); |
381 #else if // OOM_WIDGET_CLOSEALL |
391 #else //if OOM_WIDGET_CLOSEALL |
382 iWindowManager->HandleOOMEventL(iIsForeground); |
392 iWindowManager->HandleOOMEventL(iIsForeground); |
383 CloseAndExitIfNoneLeft(); |
393 CloseAndExitIfNoneLeft(); |
384 #endif |
394 #endif |
385 } |
395 } |
386 } |
396 } |
398 TApaTaskList taskList( CEikonEnv::Static()->WsSession() ); |
408 TApaTaskList taskList( CEikonEnv::Static()->WsSession() ); |
399 TUid wapUid( TUid::Uid( KWidgetAppUid ) ); |
409 TUid wapUid( TUid::Uid( KWidgetAppUid ) ); |
400 TApaTask task = taskList.FindApp( wapUid ); |
410 TApaTask task = taskList.FindApp( wapUid ); |
401 task.SendToBackground(); |
411 task.SendToBackground(); |
402 } |
412 } |
403 |
413 |
|
414 |
|
415 // ----------------------------------------------------------------------------- |
|
416 // CWidgetUiAppUi::SendAppToForeground |
|
417 // force the application to the foreground |
|
418 // |
|
419 // ----------------------------------------------------------------------------- |
|
420 // |
|
421 void CWidgetUiAppUi::SendAppToForeground() |
|
422 { |
|
423 TApaTaskList taskList( CEikonEnv::Static()->WsSession() ); |
|
424 TUid wapUid( TUid::Uid( KWidgetAppUid ) ); |
|
425 TApaTask task = taskList.FindApp( wapUid ); |
|
426 task.BringToForeground(); |
|
427 } |
|
428 |
404 // ----------------------------------------------------------------------------- |
429 // ----------------------------------------------------------------------------- |
405 // CWidgetUiAppUi::SetRotationSupport() |
430 // CWidgetUiAppUi::SetRotationSupport() |
406 // check to see if screen oriantation can be changed |
431 // check to see if screen oriantation can be changed |
407 // this code must match Widget::Widget in WidgetEngine |
432 // this code must match Widget::Widget in WidgetEngine |
408 // |
433 // |
541 const TDesC8& aLine, |
566 const TDesC8& aLine, |
542 TUid& aUid, |
567 TUid& aUid, |
543 TUint32& aOperation ) |
568 TUint32& aOperation ) |
544 { |
569 { |
545 __UHEAP_MARK; |
570 __UHEAP_MARK; |
546 TUint32 version( -1 ); |
571 TUint32 version( 0 ); |
547 TPtrC ptr( NULL, 0 ); |
572 TPtrC ptr( NULL, 0 ); |
548 |
573 |
549 RDesReadStream stream( aLine ); |
574 RDesReadStream stream( aLine ); |
550 CleanupClosePushL( stream ); |
575 CleanupClosePushL( stream ); |
551 |
576 |