photosgallery/viewframework/uiutilities/src/glxanimationfactory.cpp
branchRCL_3
changeset 26 5b3385a43d68
equal deleted inserted replaced
25:8e5f6eea9c9f 26:5b3385a43d68
       
     1 /*
       
     2 * Copyright (c) 2008-2009 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:    Factory for gallery animations
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 /**
       
    22  * @internal reviewed 11/07/2007 by Michael Yip
       
    23  */
       
    24 
       
    25 #include "glxanimationfactory.h"
       
    26 
       
    27 #include "glxanimationview.h"
       
    28 #include "glxanimationimageloading.h"
       
    29 
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // CreateViewAnimationL
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 EXPORT_C MGlxAnimation* GlxAnimationFactory::CreateViewAnimationL(
       
    36         TGlxViewswitchAnimation aAnimType, 
       
    37         TGlxNavigationDirection aDirection, 
       
    38         CAlfControlGroup* aControlGroup)
       
    39     {
       
    40     CGlxAnimationView* anim = NULL;
       
    41     
       
    42     RPointerArray<CAlfControlGroup> controlGroupArray;
       
    43 	CleanupClosePushL(controlGroupArray);
       
    44     controlGroupArray.AppendL(aControlGroup);
       
    45     anim = CGlxAnimationView::NewL(aAnimType, aDirection, controlGroupArray);
       
    46     CleanupStack::PopAndDestroy(&controlGroupArray);
       
    47     
       
    48     return anim;
       
    49     }
       
    50 
       
    51 // -----------------------------------------------------------------------------
       
    52 // CreateViewAnimationL
       
    53 // -----------------------------------------------------------------------------
       
    54 //
       
    55 EXPORT_C MGlxAnimation* GlxAnimationFactory::CreateViewAnimationL(
       
    56         TGlxViewswitchAnimation aAnimType, 
       
    57         TGlxNavigationDirection aDirection, 
       
    58         RPointerArray<CAlfControlGroup>& aControlGroups)
       
    59     {
       
    60     return CGlxAnimationView::NewL(aAnimType, aDirection, aControlGroups);
       
    61     }
       
    62 
       
    63 // -----------------------------------------------------------------------------
       
    64 // CreateImageLoadingAnimationL
       
    65 // -----------------------------------------------------------------------------
       
    66 //
       
    67 EXPORT_C MGlxAnimation* GlxAnimationFactory::CreateImageLoadingAnimationL(
       
    68         CAlfVisual& aVisual, 
       
    69         CAlfTexture& aFlashTexture)
       
    70     {
       
    71     return CGlxAnimationImageLoading::NewL(aVisual, aFlashTexture);
       
    72     }