idlehomescreen/nativeuicontroller/src/appui.cpp
branchRCL_3
changeset 9 f966699dea19
parent 0 f72a12da539e
child 15 ff572dfe6d86
equal deleted inserted replaced
5:c743ef5928ba 9:f966699dea19
    14 * Description: 
    14 * Description: 
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 #include "appui.h"
    19 // System includes
    20 #include "ainativeui.hrh"
       
    21 #include "ainativeuistrings.h" // string literals
       
    22 #include "ainativeuiview.h"
       
    23 #include "application.h"
       
    24 #include "nativeuicontroller.h"
       
    25 #include "aiuiframeworkobserver.h"
       
    26 #include "aifweventhandler.h"
       
    27 #include <AiNativeUi.rsg>
       
    28 
       
    29 #include "aipropertyextension.h"
       
    30 #include "aicontentmodel.h"
       
    31 #include "aiuiidleintegration.h"
       
    32 #include "activeidle2domaincrkeys.h"
       
    33 #include "activeidle2domainpskeys.h"
       
    34 #include "extrstandbycontainerif.h"
       
    35 #include "debug.h"
       
    36 
       
    37 #include <startupdomainpskeys.h>
    20 #include <startupdomainpskeys.h>
    38 #include <aipspropertyobserver.h>
       
    39 #include <centralrepository.h>
    21 #include <centralrepository.h>
    40 #include <e32base.h>
    22 #include <e32base.h>
    41 #include <e32property.h>
    23 #include <e32property.h>
    42 #include <avkon.rsg>                    // for status pane layout resource ids
    24 #include <avkon.rsg>                    // for status pane layout resource ids
    43 #include <eikon.hrh>
    25 #include <eikon.hrh>
    49 #include <avkondomainpskeys.h>
    31 #include <avkondomainpskeys.h>
    50 #include <AknUtils.h>
    32 #include <AknUtils.h>
    51 #include <layoutmetadata.cdl.h>
    33 #include <layoutmetadata.cdl.h>
    52 #include <aknlayoutscalable_avkon.cdl.h>
    34 #include <aknlayoutscalable_avkon.cdl.h>
    53 
    35 
       
    36 // User includes
       
    37 #include <hscontentpublisher.h>
       
    38 #include <aipspropertyobserver.h>
       
    39 
       
    40 #include "appui.h"
       
    41 #include "ainativeui.hrh"
       
    42 #include "ainativeuistrings.h" // string literals
       
    43 #include "ainativeuiview.h"
       
    44 #include "application.h"
       
    45 #include "nativeuicontroller.h"
       
    46 #include "aifweventhandler.h"
       
    47 #include <AiNativeUi.rsg>
       
    48 
       
    49 #include "aicontentmodel.h"
       
    50 #include "aiuiidleintegration.h"
       
    51 #include "activeidle2domaincrkeys.h"
       
    52 #include "activeidle2domainpskeys.h"
       
    53 #include "extrstandbycontainerif.h"
       
    54 #include "debug.h"
       
    55 
       
    56 
    54 namespace
    57 namespace
    55     {
    58     {
    56     _LIT( KResourceDrive, "Z:" );
    59     _LIT( KResourceDrive, "Z:" );
    57     _LIT( KResourceFile, "ainativeui.rsc" );
    60     _LIT( KResourceFile, "ainativeui.rsc" );
    58     #define KResourcePath KDC_APP_RESOURCE_DIR
    61     #define KResourcePath KDC_APP_RESOURCE_DIR
   191         User::Leave(KErrNotFound);
   194         User::Leave(KErrNotFound);
   192         return; // for lint
   195         return; // for lint
   193         }
   196         }
   194 
   197 
   195     iFwEventHandler = iUiCtl->FwEventHandler();
   198     iFwEventHandler = iUiCtl->FwEventHandler();
   196 
   199    
   197     iUiFwObserver = iUiCtl->UiFrameworkObserver();
       
   198 
       
   199     TAiIdleKeySoundConfig keySoundConfig;
   200     TAiIdleKeySoundConfig keySoundConfig;
   200     keySoundConfig.iKeySounds = KeySounds();
   201     keySoundConfig.iKeySounds = KeySounds();
   201     keySoundConfig.iContextResId = R_NATIVEUI_DEFAULT_SKEY_LIST;
   202     keySoundConfig.iContextResId = R_NATIVEUI_DEFAULT_SKEY_LIST;
   202     iIdleIntegration = CAiUiIdleIntegration::NewL
   203     iIdleIntegration = CAiUiIdleIntegration::NewL
   203         ( *iEikonEnv, keySoundConfig, iFwEventHandler );
   204         ( *iEikonEnv, keySoundConfig, iFwEventHandler );
   326     }
   327     }
   327 
   328 
   328 void CAppUi::HandleForegroundEventL(TBool aForeground)
   329 void CAppUi::HandleForegroundEventL(TBool aForeground)
   329     {
   330     {
   330     CAknAppUi::HandleForegroundEventL( aForeground );
   331     CAknAppUi::HandleForegroundEventL( aForeground );
   331 
       
   332     if ( iUiFwObserver )
       
   333         {
       
   334         iUiFwObserver->HandleForegroundEvent( aForeground );
       
   335         }
       
   336     }
   332     }
   337 
   333 
   338 void CAppUi::HandleCommandL(TInt aCommand)
   334 void CAppUi::HandleCommandL(TInt aCommand)
   339     {
   335     {
   340     switch (aCommand)
   336     switch (aCommand)
   460             {
   456             {
   461             iAppView->SetRect( ClientRect() );
   457             iAppView->SetRect( ClientRect() );
   462             iAppView->DrawNow();
   458             iAppView->DrawNow();
   463             }
   459             }
   464 
   460 
   465         }
       
   466 
       
   467     if ( iUiFwObserver )
       
   468         {
       
   469         iUiFwObserver->HandleResourceChange(aType);
       
   470         }
   461         }
   471     }
   462     }
   472 
   463 
   473 void CAppUi::HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination)
   464 void CAppUi::HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination)
   474     {
   465     {