mmsharing/mmshui/inc/musuinavimediaanimator.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 0 f0cf47e981f9
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
       
     1 /*
       
     2 * Copyright (c) 2005 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 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MUSUINAVIMEDIAANIMATOR_H
       
    21 #define MUSUINAVIMEDIAANIMATOR_H
       
    22 
       
    23 #include "musuidefinitions.h"
       
    24 #include "musuinavimediaanimatorobserver.h"
       
    25 
       
    26 #include <coecntrl.h>
       
    27 #include <AknUtils.h>
       
    28 
       
    29 class CAknIconArray;
       
    30 class MAknsSkinInstance;
       
    31 class CPeriodic;
       
    32 
       
    33 /**
       
    34  * CMusUiNaviMediaDecorator
       
    35  *
       
    36  * @lib musui.exe
       
    37  */
       
    38 class CMusUiNaviMediaAnimator : public CBase
       
    39     {
       
    40 
       
    41     public:  // constructors and destructor
       
    42 
       
    43         /**
       
    44          * Two-phased constructor.
       
    45          *
       
    46          */
       
    47         static CMusUiNaviMediaAnimator* NewL(
       
    48                  MMusUiNaviMediaAnimatorObserver& aObserver, TSize aImageSize );
       
    49 
       
    50         /**
       
    51          *
       
    52          *
       
    53          */
       
    54         virtual ~CMusUiNaviMediaAnimator();
       
    55 
       
    56 
       
    57     private: // constructors
       
    58 
       
    59         /**
       
    60          * C++ default constructor.
       
    61          *
       
    62          */
       
    63         CMusUiNaviMediaAnimator( 
       
    64                 MMusUiNaviMediaAnimatorObserver& aObserver, TSize aImageSize );
       
    65 
       
    66         /**
       
    67          * By default Symbian second-phase constructor is private.
       
    68          *
       
    69          */
       
    70         void ConstructL();
       
    71 
       
    72 
       
    73     public: // API
       
    74 
       
    75         /**
       
    76          * Sets animation timer interval eq. speed of animation
       
    77          *
       
    78          * @param aAnimationInterval Milliseconds between image transitions
       
    79          */
       
    80         void SetInterval( const TInt aAnimationInterval );
       
    81 
       
    82 
       
    83     private: // Perioidic timer CallBack
       
    84 
       
    85         static TInt AnimationInterval( TAny* aThis );
       
    86 	    
       
    87 
       
    88     private: // HELPERS
       
    89 
       
    90         /**
       
    91          * Layouts all images.  And also set size.
       
    92          *
       
    93          */
       
    94         void LoadImagesL();
       
    95 
       
    96 
       
    97         /**
       
    98          * Construct image from resourse file
       
    99          *
       
   100          */
       
   101         void ConstructImageL( MAknsSkinInstance* aSkin,
       
   102                               const TAknsItemID& aId,
       
   103                               TInt aBitmapId,
       
   104                               TInt aMaskId,
       
   105                               TParse parse );
       
   106 
       
   107 
       
   108 
       
   109     private: // DATA
       
   110 
       
   111         /**
       
   112         *
       
   113         */
       
   114         CAknIconArray* iBitmapArray;
       
   115 
       
   116         /**
       
   117         *
       
   118         */
       
   119         //CAknIconArray* iMaskArray;
       
   120 
       
   121         /**
       
   122         * resource file location ( eq. Z or C )
       
   123         */
       
   124         TBool iResourceRam;
       
   125 
       
   126         /**
       
   127         * Animation image index
       
   128         */
       
   129         TInt iIndex;
       
   130 
       
   131         /**
       
   132         *
       
   133         */
       
   134         MMusUiNaviMediaAnimatorObserver& iObserver;
       
   135 
       
   136         /**
       
   137         *
       
   138         */
       
   139         TInt iInterval;
       
   140         
       
   141         /**
       
   142         * Image size
       
   143         */
       
   144         TSize iSize;
       
   145         
       
   146         /**
       
   147         *
       
   148         */
       
   149         CPeriodic* iAnimationTimer;   // owned
       
   150 
       
   151 
       
   152     };
       
   153 
       
   154 #endif // MUSUINAVIMEDIADECORATOR_H
       
   155 
       
   156 // end of file