startupservices/Startup/src/StartupWelcomeAnimation.cpp
branchRCL_3
changeset 63 c2c61fdca848
parent 0 2e3d3ce01487
equal deleted inserted replaced
62:924385140d98 63:c2c61fdca848
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *     This class is the container class of the CStartupWelcomeAnimation.
       
    16 *     Is used to show welcome animation.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include <aknappui.h>
       
    23 #include <aknnotewrappers.h>
       
    24 #include <barsread.h> //use of TResourceReader
       
    25 #include <StarterClient.h>     //used for RemoveSplashScreen
       
    26 #include <aknbitmapanimation.h>
       
    27 #include <startup.mbg>
       
    28 #include "StartupWelcomeAnimation.h"
       
    29 #include <Startup.rsg>
       
    30 #include "StartupDefines.h"
       
    31 #include "Startup.hrh"
       
    32 #include "StartupAppUi.h"
       
    33 #include <akniconutils.h>
       
    34 
       
    35 // CONSTANTS
       
    36 const TInt KStartupAnimationShowingDuration( 4200 );//4.2 sec
       
    37 
       
    38 // ================= MEMBER FUNCTIONS =======================
       
    39 
       
    40 // ---------------------------------------------------------------------------
       
    41 // CStartupWelcomeAnimation::ConstructL(const TRect& aRect)
       
    42 // Symbian 2nd phase constructor can leave.
       
    43 // ---------------------------------------------------------------------------
       
    44 void CStartupWelcomeAnimation::ConstructL(const TRect& /*aRect*/)
       
    45     {
       
    46     TRACES("CStartupWelcomeAnimation::ConstructL()");
       
    47     iShowingTime = KStartupAnimationShowingDuration;
       
    48     UpdateDrawInfo( EStartupDIStart );
       
    49 
       
    50     iAvkonAppUi->StatusPane()->MakeVisible(EFalse);
       
    51     CreateWindowL();
       
    52     iAnimCancelTimer = CPeriodic::NewL( EPriorityNormal );
       
    53 
       
    54     TRACES("CStartupWelcomeAnimation::ConstructL(): animation loading started");
       
    55     iAnim = CAknBitmapAnimation::NewL();
       
    56     iAnim->ExcludeAnimationFramesFromCache();
       
    57     iAnim->SetContainerWindowL( *this );
       
    58     iAnim->SetScaleModeForAnimationFrames(EAspectRatioPreservedAndUnusedSpaceRemoved);
       
    59     TResourceReader rr;
       
    60     iCoeEnv->CreateResourceReaderLC(rr, R_ANIM_IMAGE);
       
    61     TRAPD(err, iAnim->ConstructFromResourceL( rr ))
       
    62     if (err != KErrNone)
       
    63         {
       
    64         TRACES1("CStartupWelcomeAnimation::ConstructL(): ConstructFromResourceL() leaves, err = %d", err );
       
    65         }
       
    66     CleanupStack::PopAndDestroy();
       
    67 
       
    68     SetRect(iAvkonAppUi->ApplicationRect());  // Results in a call to SizeChanged()
       
    69     ActivateL();
       
    70 
       
    71     TRACES("CStartupWelcomeAnimation::ConstructL(): animation loading ended");
       
    72     TRACES("CStartupWelcomeAnimation::ConstructL(): End");
       
    73     }
       
    74 
       
    75 // -----------------------------------------------------------------------------
       
    76 // CStartupWelcomeAnimation::NewL
       
    77 // Two-phased constructor.
       
    78 // -----------------------------------------------------------------------------
       
    79 //
       
    80 CStartupWelcomeAnimation* CStartupWelcomeAnimation::NewL( CStartupAppUi* aStartupAppUi,
       
    81                                                           const TRect& aRect)
       
    82     {
       
    83     TRACES("CStartupWelcomeAnimation::NewL()");
       
    84     CStartupWelcomeAnimation* self = new (ELeave) CStartupWelcomeAnimation( aStartupAppUi );
       
    85     CleanupStack::PushL(self);
       
    86     self->ConstructL(aRect);
       
    87     CleanupStack::Pop();
       
    88     TRACES("CStartupWelcomeAnimation::NewL(): End");
       
    89     return self;
       
    90     }
       
    91 
       
    92 // ---------------------------------------------------------
       
    93 // CStartupWelcomeAnimation::CStartupWelcomeAnimation()
       
    94 // ---------------------------------------------------------
       
    95 CStartupWelcomeAnimation::CStartupWelcomeAnimation( CStartupAppUi* aStartupAppUi ) :
       
    96     iBackgroundBitmap( NULL ),
       
    97     iSplashScreenRemoved( EFalse ),
       
    98     iStartupAppUi( aStartupAppUi ),
       
    99     iAnimationShowing( EFalse ),
       
   100     iAnimationCancelled ( EFalse )
       
   101     {
       
   102     TRACES("CStartupWelcomeAnimation::CStartupWelcomeAnimation()");
       
   103     }
       
   104 
       
   105 // ---------------------------------------------------------------------------
       
   106 // CStartupWelcomeAnimation::StartL()
       
   107 // ---------------------------------------------------------------------------
       
   108 void CStartupWelcomeAnimation::StartL()
       
   109     {
       
   110     TRACES("CStartupWelcomeAnimation::StartL()");
       
   111     iAnim->StartAnimationL();
       
   112     ControlEnv()->WsSession().Flush(); // force draw of the context
       
   113     TRACES("CStartupWelcomeAnimation::StartL(): End");
       
   114     }
       
   115 
       
   116 // ---------------------------------------------------------------------------
       
   117 // CStartupWelcomeAnimation::UpdateDrawInfo( TStartupDrawInfo aValue )
       
   118 // ---------------------------------------------------------------------------
       
   119 void CStartupWelcomeAnimation::UpdateDrawInfo( TStartupDrawInfo aValue )
       
   120     {
       
   121     TRACES("CStartupWelcomeAnimation::UpdateDrawInfo()");
       
   122     TRACES1("CStartupWelcomeAnimation::UpdateDrawInfo(): Value %d", aValue);
       
   123     //Prevent state change if already EStartupDISystemFatalError
       
   124     if( iDrawUpdateInfo == EStartupDISystemFatalError )
       
   125         {
       
   126         TRACES("CStartupWelcomeAnimation::UpdateDrawInfo(): End, preventing state change - EStartupDISystemFatalError");
       
   127         return;
       
   128         }
       
   129 
       
   130     iDrawUpdateInfo = aValue;
       
   131     TRACES("CStartupWelcomeAnimation::UpdateDrawInfo(): End");
       
   132     }
       
   133 
       
   134 // ---------------------------------------------------------------------------
       
   135 // CStartupWelcomeAnimation::DoDrawingL()
       
   136 // ---------------------------------------------------------------------------
       
   137 void CStartupWelcomeAnimation::DoDrawingL() const
       
   138     {
       
   139     TRACES("CStartupWelcomeAnimation::DoDrawingL()");
       
   140     switch ( iDrawUpdateInfo )
       
   141         {
       
   142         case EStartupDIStart:
       
   143             {
       
   144             TRACES("CStartupWelcomeAnimation::DoDrawingL(): EStartupDIStart");
       
   145             DrawBlankScreen(); // clears screen after code query emergency call
       
   146             }
       
   147             break;
       
   148         case EStartupDITouchScreenCalib:
       
   149             {
       
   150             TRACES("CStartupWelcomeAnimation::DoDrawingL(): EStartupDITouchScreenCalib");
       
   151             RemoveSplashScreen();
       
   152             DrawBlankScreen();
       
   153             }
       
   154             break;
       
   155         case EStartupDICharging:
       
   156             {
       
   157             TRACES("CStartupWelcomeAnimation::DoDrawingL(): EStartupDICharging");
       
   158             RemoveSplashScreen();
       
   159             DrawBlankScreen();
       
   160             }
       
   161             break;
       
   162         case EStartupDIAlarm:
       
   163             {
       
   164             TRACES("CStartupWelcomeAnimation::DoDrawingL(): EStartupDIAlarm");
       
   165             RemoveSplashScreen();
       
   166             DrawBlankScreen();
       
   167             }
       
   168             break;
       
   169         case EStartupDIHiddenReset:
       
   170             {
       
   171             TRACES("CStartupWelcomeAnimation::DoDrawingL(): EStartupDIHiddenReset");
       
   172             RemoveSplashScreen();
       
   173             DrawBlankScreen();            
       
   174             }
       
   175             break;
       
   176         case EStartupDIQueriesOn:
       
   177             {
       
   178             TRACES("CStartupWelcomeAnimation::DoDrawingL(): EStartupDIQueriesOn");
       
   179             RemoveSplashScreen();
       
   180             DrawBlankScreen();
       
   181             }
       
   182             break;
       
   183         case EStartupDIQueriesOff:
       
   184             {
       
   185             TRACES("CStartupWelcomeAnimation::DoDrawingL(): EStartupDIQueriesOff");
       
   186             }
       
   187             break;
       
   188         case EStartupDIWelcomeAnimStart:
       
   189             {
       
   190             TRACES("CStartupWelcomeAnimation::DoDrawingL(): EStartupDIWelcomeAnimStart");
       
   191 			RemoveSplashScreen();
       
   192 			DrawBlankScreen();
       
   193             }
       
   194             break;
       
   195         case EStartupDIWelcomeAnimCancelled:
       
   196             {
       
   197             TRACES("CStartupWelcomeAnimation::DoDrawingL(): EStartupDIWelcomeAnimCancelled");
       
   198             }
       
   199             break;
       
   200         case EStartupDIWelcomeAnimEnd:
       
   201             {
       
   202             TRACES("CStartupWelcomeAnimation::DoDrawingL(): EStartupDIWelcomeAnimEnd");
       
   203             DrawBlankScreen();
       
   204             }
       
   205             break;
       
   206         case EStartupDIOperatorAnimEnd:
       
   207             {
       
   208             TRACES("CStartupWelcomeAnimation::DoDrawingL(): EStartupDIOperatorAnimEnd");
       
   209             DrawBlankScreen();
       
   210             }
       
   211             break;
       
   212         case EStartupDICityTimeDateQueries:
       
   213             {
       
   214             TRACES("CStartupWelcomeAnimation::DoDrawingL(): EStartupDICityTimeDateQueries");
       
   215             DrawBlankScreen();
       
   216             }
       
   217             break;
       
   218         case EStartupDIEnd:
       
   219             {
       
   220             TRACES("CStartupWelcomeAnimation::DoDrawingL(): EStartupDIEnd");
       
   221             }
       
   222             break;
       
   223         case EStartupDISystemFatalError:
       
   224             {
       
   225             TRACES("CStartupWelcomeAnimation::DoDrawingL(): EStartupDISystemFatalError");
       
   226             }
       
   227             break;
       
   228         default:
       
   229             TRACES("CStartupWelcomeAnimation::DoDrawingL(): default");
       
   230             break;
       
   231         }
       
   232     TRACES("CStartupWelcomeAnimation::DoDrawingL(): End");
       
   233     }
       
   234 
       
   235 // ---------------------------------------------------------
       
   236 // CStartupWelcomeAnimation::RemoveSplashScreen()
       
   237 // ---------------------------------------------------------
       
   238 void CStartupWelcomeAnimation::RemoveSplashScreen() const
       
   239     {
       
   240     TRACES("CStartupWelcomeAnimation::RemoveSplashScreen()");
       
   241     //Remove SplashScreen
       
   242     if( !iSplashScreenRemoved )
       
   243         {
       
   244         TRACES("CStartupWelcomeAnimation::RemoveSplashScreen(): Connect to Starter");
       
   245         RStarterSession startersession;
       
   246         if( startersession.Connect() == KErrNone )
       
   247             {
       
   248             TRACES("CStartupWelcomeAnimation::RemoveSplashScreen(): Connected to Starter");
       
   249             startersession.EndSplashScreen();
       
   250             TRACES("CStartupWelcomeAnimation::RemoveSplashScreen(): Splash screen removed");
       
   251             startersession.Close();
       
   252             }
       
   253         }
       
   254     TRACES("CStartupWelcomeAnimation::RemoveSplashScreen(): End");
       
   255     }
       
   256 
       
   257 // ---------------------------------------------------------------------------
       
   258 // CStartupWelcomeAnimation::~CStartupWelcomeAnimation()
       
   259 // ---------------------------------------------------------------------------
       
   260 CStartupWelcomeAnimation::~CStartupWelcomeAnimation()
       
   261     {
       
   262     TRACES("CStartupWelcomeAnimation::~CStartupWelcomeAnimation()");
       
   263 
       
   264     if( iAnim )
       
   265         {
       
   266         if( iAnimationShowing )
       
   267             {
       
   268             iAnim->CancelAnimation();
       
   269             TRACES("CStartupWelcomeAnimation::~CStartupWelcomeAnimation(): Animation cancelled");
       
   270             }
       
   271         }
       
   272     delete iAnim;
       
   273     TRACES("CStartupWelcomeAnimation::~CStartupWelcomeAnimation(): iAnim deleted");
       
   274 
       
   275     if (iBackgroundBitmap)
       
   276         {
       
   277         delete iBackgroundBitmap;
       
   278         TRACES("CStartupWelcomeAnimation::~CStartupWelcomeAnimation(): iBackgroundBitmap deleted");
       
   279         }
       
   280 
       
   281     if( iAnimCancelTimer )
       
   282         {
       
   283         iAnimCancelTimer->Cancel();
       
   284         TRACES("CStartupWelcomeAnimation::~CStartupWelcomeAnimation(): Timer cancelled");
       
   285         }
       
   286     delete iAnimCancelTimer;
       
   287     TRACES("CStartupWelcomeAnimation::~CStartupWelcomeAnimation(): iAnimCancelTimer deleted");
       
   288 
       
   289     TRACES("CStartupWelcomeAnimation::~CStartupWelcomeAnimation(): End");
       
   290     }
       
   291 
       
   292 // ---------------------------------------------------------------------------
       
   293 // CStartupWelcomeAnimation::ComponentControl(TInt aIndex)
       
   294 // ---------------------------------------------------------------------------
       
   295 CCoeControl* CStartupWelcomeAnimation::ComponentControl(TInt aIndex) const
       
   296     {
       
   297     switch ( aIndex )
       
   298         {
       
   299         case 0:
       
   300             {
       
   301             return iAnim;
       
   302             }
       
   303         default:
       
   304             {
       
   305             return NULL;
       
   306             }
       
   307         }
       
   308     }
       
   309 
       
   310 // ---------------------------------------------------------------------------
       
   311 // CStartupWelcomeAnimation::CountComponentControls()
       
   312 // ---------------------------------------------------------------------------
       
   313 TInt CStartupWelcomeAnimation::CountComponentControls() const
       
   314     {
       
   315     return iAnim ? 1 : 0; // return nbr of controls inside this container
       
   316     }
       
   317 
       
   318 // ---------------------------------------------------------------------------
       
   319 // CStartupWelcomeAnimation::Draw(const TRect& aRect) const
       
   320 // ---------------------------------------------------------------------------
       
   321 void CStartupWelcomeAnimation::Draw(const TRect& /*aRect*/ ) const
       
   322     {
       
   323     TRACES("CStartupWelcomeAnimation::Draw()");
       
   324     TRAPD(err, DoDrawingL());
       
   325     if (err != KErrNone)
       
   326         {
       
   327         TRACES1("CStartupWelcomeAnimation::Draw(): DoDrawingL() leaves, err = %d", err );
       
   328         }
       
   329     }
       
   330 
       
   331 // ---------------------------------------------------------------------------
       
   332 // CStartupWelcomeAnimation::DrawBlankScreen() const
       
   333 // ---------------------------------------------------------------------------
       
   334 void CStartupWelcomeAnimation::DrawBlankScreen() const
       
   335     {
       
   336     TRACES("CStartupWelcomeAnimation::DrawBlankScreen()");
       
   337     CWindowGc& gc = SystemGc();
       
   338     TRect rect = Rect();
       
   339     gc.SetPenStyle(CGraphicsContext::ENullPen);
       
   340     gc.SetBrushColor(KRgbWhite);
       
   341     gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
       
   342     gc.DrawRect(rect);
       
   343     ControlEnv()->WsSession().Flush(); // force draw of the context
       
   344     TRACES("CStartupWelcomeAnimation::DrawBlankScreen(): End");
       
   345     }
       
   346 
       
   347 // ---------------------------------------------------------------------------
       
   348 // CStartupWelcomeAnimation::ShowingTime()
       
   349 // ---------------------------------------------------------------------------
       
   350 TInt CStartupWelcomeAnimation::ShowingTime()
       
   351     {
       
   352     TRACES1("CStartupWelcomeAnimation::ShowingTime(): time = %d", iShowingTime);
       
   353     return iShowingTime;
       
   354     }
       
   355 
       
   356 // ---------------------------------------------------------------------------
       
   357 // CStartupWelcomeAnimation::SizeChanged()
       
   358 // ---------------------------------------------------------------------------
       
   359 void CStartupWelcomeAnimation::SizeChanged()
       
   360     {
       
   361     if( iAnim )
       
   362         {
       
   363         iAnim->SetRect(Rect());
       
   364         iAnim->SetPosition( TPoint(
       
   365             (iAvkonAppUi->ApplicationRect().Width()/2) - (iAnim->BitmapAnimData()->Size().iWidth/2), 
       
   366             (iAvkonAppUi->ApplicationRect().Height()/2) - (iAnim->BitmapAnimData()->Size().iHeight/2)
       
   367             ) );
       
   368         }
       
   369     }
       
   370 
       
   371 // ---------------------------------------------------------------------------
       
   372 // CStartupWelcomeAnimation::EndAnimation()
       
   373 // ---------------------------------------------------------------------------
       
   374 void CStartupWelcomeAnimation::EndAnimation() const
       
   375     {
       
   376     TRACES("CStartupWelcomeAnimation::EndAnimation()");
       
   377     if( iAnim )
       
   378         {
       
   379         TRACES("CStartupWelcomeAnimation::EndAnimation(): Cancel animation");
       
   380         iAnim->CancelAnimation();
       
   381         }
       
   382     TRACES("CStartupWelcomeAnimation::EndAnimation(): End");
       
   383     }
       
   384 
       
   385 // ---------------------------------------------------------------------------
       
   386 // CStartupWelcomeAnimation::HandleControlEventL(...)
       
   387 // ---------------------------------------------------------------------------
       
   388 void CStartupWelcomeAnimation::HandleControlEventL(
       
   389         CCoeControl* /*aControl*/,
       
   390         TCoeEvent /*aEventType*/)
       
   391     {
       
   392     //pure virtual from MCoeControlObserver
       
   393     TRACES("CStartupWelcomeAnimation::HandleControlEventL()");
       
   394     }
       
   395 
       
   396 // ---------------------------------------------------------------------------
       
   397 // CStartupWelcomeAnimation::HandlePointerEventL(...)
       
   398 // ---------------------------------------------------------------------------
       
   399 void CStartupWelcomeAnimation::HandlePointerEventL(const TPointerEvent& aPointerEvent)
       
   400     {
       
   401     TRACES("CStartupWelcomeAnimation::HandlePointerEventL()");
       
   402     if (AknLayoutUtils::PenEnabled())
       
   403         {
       
   404         TRACES1("CStartupWelcomeAnimation::HandlePointerEventL: aPointerEvent.iType == %d",aPointerEvent.iType );
       
   405         switch (aPointerEvent.iType)
       
   406             {
       
   407             case TPointerEvent::EButton1Down:
       
   408                 CancelAnimation();
       
   409                 break;                    
       
   410 
       
   411             default:
       
   412                 break;
       
   413             }
       
   414         }
       
   415     TRACES("CStartupWelcomeAnimation::HandlePointerEventL(): End");
       
   416     }
       
   417 
       
   418 // ---------------------------------------------------------------------------
       
   419 // CStartupWelcomeAnimation::OfferKeyEventL(...)
       
   420 // ---------------------------------------------------------------------------
       
   421 TKeyResponse CStartupWelcomeAnimation::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode /*aType*/ )
       
   422     {
       
   423     TRACES("CStartupWelcomeAnimation::OfferKeyEventL()");
       
   424     TRACES1("CStartupWelcomeAnimation::OfferKeyEventL(): aKeyEvent.iCode == %d",aKeyEvent.iCode);
       
   425     TRACES1("CStartupWelcomeAnimation::OfferKeyEventL(): aKeyEvent.iScanCode == %d",aKeyEvent.iScanCode);
       
   426     TRACES1("CStartupWelcomeAnimation::OfferKeyEventL(): iAnimationShowing == %d",iAnimationShowing);
       
   427     TRACES1("CStartupWelcomeAnimation::OfferKeyEventL(): iAnimationCancelled == %d",iAnimationCancelled);
       
   428     
       
   429     if ( iStartupAppUi->GetOfflineModeQueryShown() )
       
   430         {
       
   431         TRACES("CStartupWelcomeAnimation::OfferKeyEventL(): Key event from offline mode query");
       
   432         // first key event comes from Offline Mode Query
       
   433         iStartupAppUi->SetOfflineModeQueryShown( EFalse );
       
   434         }
       
   435     else
       
   436         {
       
   437         if( iAnimationShowing && !iStartupAppUi->HiddenReset() && !iAnimationCancelled )
       
   438             {
       
   439             if (aKeyEvent.iScanCode == EStdKeyNkpAsterisk || aKeyEvent.iScanCode == 0x2a)
       
   440                 {               
       
   441                 TRACES("CStartupWelcomeAnimation::OfferKeyEventL(): Set clean boot");
       
   442                 iStartupAppUi->SetCleanBoot();                
       
   443                 }        
       
   444             // Cancel animation
       
   445             CancelAnimation();
       
   446             }
       
   447         else if( !iAnimationShowing && iStartupAppUi->StartupTonePlaying())
       
   448             {
       
   449             TRACES("CStartupWelcomeAnimation::OfferKeyEventL() Animation has completed but tone is still playing. Stop it.");
       
   450             iStartupAppUi->StopStartupTone();
       
   451             }
       
   452         }
       
   453     
       
   454     TRACES("CStartupWelcomeAnimation::OfferKeyEventL(): End");
       
   455     return EKeyWasConsumed;
       
   456     }
       
   457 
       
   458 // ---------------------------------------------------------------------------
       
   459 // CStartupWelcomeAnimation::CancelAnimCancelTimer()
       
   460 // ---------------------------------------------------------------------------
       
   461 void CStartupWelcomeAnimation::CancelAnimCancelTimer()
       
   462     {
       
   463     TRACES("CStartupWelcomeAnimation::CancelAnimCancelTimer()");
       
   464     iAnimCancelTimer->Cancel();
       
   465     TRACES("CStartupWelcomeAnimation::CancelAnimCancelTimer(): End");
       
   466     }
       
   467 
       
   468 // ---------------------------------------------------------------------------
       
   469 // CStartupWelcomeAnimation::CancelAnimation(...)
       
   470 // ---------------------------------------------------------------------------
       
   471 void CStartupWelcomeAnimation::CancelAnimation()
       
   472     {
       
   473     TRACES("CStartupWelcomeAnimation::CancelAnimation()");
       
   474     if( iAnimationShowing && !iStartupAppUi->HiddenReset() && !iAnimationCancelled )
       
   475         {
       
   476         UpdateDrawInfo( EStartupDIWelcomeAnimCancelled );
       
   477         EndAnimation();
       
   478         TRACES("CStartupWelcomeAnimation::CancelAnimation(): Timer activated - before");
       
   479         iAnimCancelTimer->Start( 10000, 10000, 
       
   480                            TCallBack( iStartupAppUi->DoStopTimingL, iStartupAppUi ) );
       
   481         TRACES("CStartupWelcomeAnimation::CancelAnimation(): Timer activated - after");
       
   482         iAnimationCancelled = ETrue;
       
   483         }
       
   484     TRACES("CStartupWelcomeAnimation::CancelAnimation(): End");
       
   485     }
       
   486 
       
   487 // ---------------------------------------------------------------------------
       
   488 // CStartupWelcomeAnimation::IsAnimationCancelled(...)
       
   489 // ---------------------------------------------------------------------------
       
   490 TBool CStartupWelcomeAnimation::IsAnimationCancelled()
       
   491     {
       
   492     TRACES1("CStartupWelcomeAnimation::IsAnimationCancelled(): iAnimationCancelled: %d", iAnimationCancelled);
       
   493     return iAnimationCancelled;
       
   494     }
       
   495 
       
   496 // ---------------------------------------------------------------------------
       
   497 // CStartupWelcomeAnimation::SetAnimationShowing(...)
       
   498 // ---------------------------------------------------------------------------
       
   499 void CStartupWelcomeAnimation::SetAnimationShowing(TBool aValue)
       
   500     {
       
   501     TRACES("CStartupWelcomeAnimation::SetAnimationShowing()");
       
   502     TRACES2("CStartupWelcomeAnimation::SetAnimationShowing(): iAnimationShowing changed from %d to %d",iAnimationShowing, aValue );
       
   503     iAnimationShowing = aValue;
       
   504     }
       
   505 
       
   506 // ---------------------------------------------------------------------------
       
   507 // CStartupWelcomeAnimation::HandleResourceChange(...)
       
   508 // ---------------------------------------------------------------------------
       
   509 void CStartupWelcomeAnimation::HandleResourceChange(TInt aType)
       
   510     {
       
   511     CCoeControl::HandleResourceChange(aType);
       
   512     if(aType==KEikDynamicLayoutVariantSwitch)
       
   513         {
       
   514         SetRect(iAvkonAppUi->ApplicationRect()); // update rect
       
   515         }
       
   516    }
       
   517 
       
   518 
       
   519 
       
   520 //  End of File