photosgallery/slideshow/engine/inc/shweffectmanager.h
changeset 0 4e91876724a2
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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:    The effect manager interface
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __MSHWEFFECTMANAGER_H__
       
    22 #define __MSHWEFFECTMANAGER_H__
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32std.h>
       
    26 #include <e32base.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class MShwEffect;
       
    30 class TShwEffectInfo;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  *  MShwEffectManager
       
    36  * @internal reviewed 07/06/2007 by Loughlin 
       
    37  */
       
    38 class MShwEffectManager
       
    39 	{
       
    40 	public:
       
    41 	    /**
       
    42 	     * The order that the effects are shown.
       
    43 	     */
       
    44 	    enum TShwEffectOrder
       
    45 	        {
       
    46 	        EEffectOrderLinear,
       
    47 	        EEffectOrderRandom,
       
    48 	        EEffectOrderProgrammed
       
    49 	        };
       
    50 
       
    51 	protected:
       
    52 
       
    53 		/**
       
    54 		 * Destructor. Dont allow deleting objects through this interface.
       
    55 		 */
       
    56 		virtual ~MShwEffectManager() {};
       
    57 
       
    58 	public: // the API
       
    59 
       
    60 		/**
       
    61 		 * This method is used by the framework to give the effect manager the
       
    62 		 * ownership of the effect objects.
       
    63 		 * @param aEffect a effect
       
    64 		 */
       
    65 		virtual void AddEffectL( MShwEffect* aEffect ) = 0;
       
    66 
       
    67 		/**
       
    68 		 * @return the current effect object.
       
    69 		 */
       
    70 		virtual MShwEffect* CurrentEffect() = 0;
       
    71 
       
    72 		/**
       
    73 		 * @param aIndex the direction that the list is traversed to retrieve
       
    74 		 *			 the effect. A positive value gets a "next" effect, 
       
    75 		 * 			 negative gets "previous".
       
    76 		 * @return the next effect object. Note! this may be the same as current
       
    77 		 */
       
    78 		virtual MShwEffect* Effect(TInt aDirection) = 0;
       
    79 
       
    80 		/**
       
    81 		 * Tells the effect manager to proceed to the next or previous effect.
       
    82 		 * @param aDirection, positive for "next" or negative 
       
    83 		 *			for "previous" effect.
       
    84 		 */
       
    85 		virtual void ProceedToEffect( TInt aDirection ) = 0;
       
    86         
       
    87         /**
       
    88 		 * Sets the effect order.
       
    89 		 * @param aOrder the order in which the effects are retrieved.
       
    90 		 */
       
    91 		virtual void SetEffectOrder( TShwEffectOrder aOrder ) = 0;
       
    92         
       
    93         /**
       
    94 		 * @return the effect order.
       
    95 		 */
       
    96 		virtual TShwEffectOrder EffectOrder() = 0;
       
    97 
       
    98         /**
       
    99 		 * Sets the programmable effect order.
       
   100 		 * Note that the effect order must be set to
       
   101 		 * EShwEffectOrderProgrammable for the parameter to be stored.
       
   102 		 * @param aEffects array of effects
       
   103 		 */
       
   104 		virtual void SetProgrammedEffects( RArray< TShwEffectInfo >&
       
   105 			aEffects ) = 0;
       
   106 		
       
   107 		 /**
       
   108 		 * Sets the default effect to use.
       
   109 		 * @param aInfo effect info
       
   110 		 */
       
   111 		virtual void SetDefaultEffectL(TShwEffectInfo aInfo) = 0;
       
   112 		
       
   113         /**
       
   114 		 * Gets the active effects.
       
   115 		 * This array will contain pointers to all the effects that
       
   116 		 * are used in this show
       
   117 		 * @param aEffects array of effects
       
   118 		 */
       
   119 		virtual void GetActiveEffectsL( RPointerArray< MShwEffect >&
       
   120 			aEffects ) = 0;
       
   121 				        
       
   122 	};
       
   123 
       
   124 #endif // __MSHWEFFECTMANAGER_H__