skins/AknSkins/alinc/AknsAlDataAccess.h
changeset 0 05e9090e2422
equal deleted inserted replaced
-1:000000000000 0:05e9090e2422
       
     1 /*
       
     2 * Copyright (c) 2004-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:  Contains data structures for animations.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef AKNSALDATAACCESS_H
       
    20 #define AKNSALDATAACCESS_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32std.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class MAknsRlParameterIterator;
       
    27 
       
    28 /**
       
    29 * Generic iterator interface.
       
    30 *
       
    31 * @since 3.0
       
    32 */
       
    33 class MAknsAlIterator
       
    34     {
       
    35     public: // Constructors and destructor
       
    36 
       
    37         /**
       
    38         * Destructor for internal use.
       
    39         *
       
    40         * Destructor is reserved for internal use. Client code usually does
       
    41         * not destroy iterators.
       
    42         */
       
    43         inline virtual ~MAknsAlIterator() {}
       
    44 
       
    45     public: // New functions
       
    46 
       
    47         /**
       
    48         * Checks whether there are more parameters available.
       
    49         *
       
    50         * @return @c ETrue if subsequent @c GetNextL should succeed,
       
    51         *   @c EFalse if @c GetNextL must not be called anymore.
       
    52         */
       
    53         virtual TBool HasNext() =0;
       
    54 
       
    55         /**
       
    56         * Gets the next parameter.
       
    57         *
       
    58         * @return Pointer to the parameter data. The ownership is not
       
    59         *   transferred. The data is guaranteed to be valid until
       
    60         *   the next call to @c HasNext, @c NextL, or the iterator is
       
    61         *   destroyed.
       
    62         */
       
    63         virtual const TAny* NextL() =0;
       
    64 
       
    65     public:
       
    66         inline static void CleanupOp( TAny* aIter )
       
    67             {
       
    68             MAknsAlIterator* iter =
       
    69                 static_cast<MAknsAlIterator*>( aIter );
       
    70             delete iter;
       
    71             }
       
    72     };
       
    73 
       
    74 /**
       
    75 * Named reference data structure. Named reference binds animation value with
       
    76 * name. Animator uses named references when parametrizing effect filters with
       
    77 * dynamic parameters. Because of named reference, one animation value can be
       
    78 * mapped to multiple effect filter parameters.
       
    79 *
       
    80 * @since 3.0
       
    81 */
       
    82 struct TAknsAlNamedReferenceData
       
    83     {
       
    84     const TDesC16* iName;
       
    85     TInt iAnimationValueId;
       
    86     };
       
    87 
       
    88 /**
       
    89 * Animation command data structure. Animation commands are similar to RL effect
       
    90 * commands but add support for named references.
       
    91 *
       
    92 * @since 3.0
       
    93 */
       
    94 struct TAknsAlAnimationCommandData
       
    95     {
       
    96     /**
       
    97     * UID of the effect that this command executes.
       
    98     */
       
    99     TUid iEffectUid;
       
   100 
       
   101     /**
       
   102     * Layer configuration for this command.
       
   103     */
       
   104     TAknsRlRenderOpParam iLayerConf;
       
   105 
       
   106     /**
       
   107     * Iterator for animation's initial parameters.
       
   108     * No ownership is vested in this structure.
       
   109     * If null-value is given, no parameters are used.
       
   110     */
       
   111     MAknsRlParameterIterator* iParamIterator;
       
   112 
       
   113     MAknsAlIterator* iNamedReferenceIterator;
       
   114     };
       
   115 
       
   116 /**
       
   117 * Data structure for timing models.
       
   118 *
       
   119 * @since 3.0
       
   120 */
       
   121 struct TAknsAlTimingModelData
       
   122     {
       
   123     TUid iTimingModelUid;
       
   124 
       
   125     /**
       
   126     * Pointer to the parameter iterator.
       
   127     * No ownership is vested in this structure.
       
   128     * If null-value is given, no parameters are used.
       
   129     */
       
   130     MAknsRlParameterIterator* iParamIterator;
       
   131     };
       
   132 
       
   133 /**
       
   134 * Data structure for AnimationValues.
       
   135 *
       
   136 * @since 3.0
       
   137 */
       
   138 struct TAknsAlAnimationValueData
       
   139     {
       
   140     TInt iTimingModelId;
       
   141 
       
   142     TUid iAnimationValueUid;
       
   143     // Iterator for animation value parameters
       
   144     MAknsRlParameterIterator* iParamIterator;
       
   145     };
       
   146 
       
   147 const TInt KAknsAlParamW  = 1;
       
   148 const TInt KAknsAlParamH  = 2;
       
   149 
       
   150 /**
       
   151 * Data structure for size bound parameters. Size bound parameters are animation
       
   152 * global parameters for animation values. When animation size changes the new
       
   153 * size information is applied to referenced animation value. This allows, for
       
   154 * example, creating animation values that animate pixel positions in layer size
       
   155 * independent manner.
       
   156 *
       
   157 * @since 3.0
       
   158 */
       
   159 struct TAknsAlSizeBoundParameterData
       
   160     {
       
   161     const TDesC16* iName;
       
   162     TInt iAnimationValueId;
       
   163     /**
       
   164     * Combination of KAknsAlParamW and/or KAknsAlParamH. If both flags are set,
       
   165     * both coordinates are used.
       
   166     * E.g. iParamFlags = KAknsAlParamW | * KAknsAlParamH.
       
   167     */
       
   168     TInt iParamFlags;
       
   169     };
       
   170 
       
   171 #endif // AKNSALDATAACCESS_H
       
   172 
       
   173 // End of File