2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Defines public item data classes.
19 #ifndef AKNSITEMDATA_H
20 #define AKNSITEMDATA_H
23 #include <AknsItemID.h>
24 #include <AknsRlEffect.h>
27 // FORWARD DECLARATIONS
29 struct TAknsAppIconInfo;
30 struct TAknsImageAttributeData;
31 struct TAknsColorTableEntry;
32 struct TAknsBmpAnimFrameInfo;
33 class CAknsEffectParameter;
34 class MAknsRlCommandIterator;
35 class MAknsAlIterator;
36 class CAknsNamedReference;
37 class CAknsSizeBoundParameter;
38 struct TAknsAlAnimationCommandData;
39 struct TAknsAlTimingModelData;
40 struct TAknsAlAnimationValueData;
41 struct TAknsAlNamedReferenceData;
42 struct TAknsAlSizeBoundParameterData;
47 * Base class for item data classes.
48 * Item data encapsulates type information and resource instance (such as
49 * CFbsBitmap object) of a specific skin item. Since actual data entries vary
50 * depending on the type of the item, CAknsItemData contains only type
51 * information and can not be instantiated.
53 * This is a public class with exported functions.
54 * The class is not intended for derivation outside the library.
60 NONSHARABLE_CLASS(CAknsItemData) : public CBase
62 public: // Constructors and destructor
66 * CAknsItemData itself has no dynamically allocated members, but
67 * derived classes may have them.
69 virtual ~CAknsItemData();
71 public: // New functions
74 * Sets the perceived type of this item without affecting the
75 * real instance inheritance.
81 * @param aType New type.
83 void SetType( const TAknsItemType aType );
86 * Returns the type of the item data object.
87 * This method can be used to provide run-time type information.
88 * Corresponding classes are listed in definition of ::TAknsItemType.
92 * @return Type of the item data as TAknsItemType.
94 IMPORT_C TAknsItemType Type() const;
96 protected: // C++ protected constructor for derived classes
99 * C++ constructor for derived classes.
100 * Constructs item data object with given item type.
102 * @param aType Item type of the new item data object.
106 CAknsItemData( const TAknsItemType aType );
110 TAknsItemType iType; //!< Type of the item data object.
116 * Image item data contains (in addition to base class members) image
117 * attributes, such as size or alignment. Item type for image item data
118 * objects is ::EAknsITImage.
120 * This is a public class with exported functions.
121 * The class is not intended for derivation outside the library.
127 NONSHARABLE_CLASS(CAknsImageItemData) : public CAknsItemData
129 public: // Constructors and destructor
134 virtual ~CAknsImageItemData();
136 public: // New functions
139 * Sets the image attributes for this image item data object.
143 * @param aAttributes Attribute data structure containing the new
146 IMPORT_C void SetAttributesL(
147 const TAknsImageAttributeData& aAttributes );
150 * Returns a pointer to the image attribute structure owned by the
155 * @return Pointer to the image attribute structure, or @c NULL if
158 IMPORT_C const TAknsImageAttributeData* Attributes() const;
160 IMPORT_C void SetParentIID(const TAknsItemID& aIID);
161 IMPORT_C void SetDrawRect(const TRect& aRect);
162 IMPORT_C TAknsItemID ParentIID();
163 IMPORT_C TRect DrawRect();
166 protected: // C++ protected constructor for derived classes
169 * C++ constructor for derived classes.
170 * Constructs an image item data object with given item type.
172 * @param aType Item type of the new item data object.
176 CAknsImageItemData( const TAknsItemType aType );
180 TAknsImageAttributeData* iAttributeData;
181 TAknsItemID iParentIID;
189 * Bitmap item data contains (in addition to base class members) CFbsBitmap
190 * instance of the bitmap. Item type for bitmap item data is always
193 * This is a public class with exported functions.
194 * The class is not intended for derivation outside the library.
200 NONSHARABLE_CLASS(CAknsBitmapItemData) : public CAknsImageItemData
202 public: // Constructors and destructor
205 * Two-phased constructor.
206 * Constructs a new CAknsBitmapItemData object with bitmap set to
207 * @c NULL. Bitmap must be set afterwards by using
208 * SetBitmap(CFbsBitmap* aBitmap) method.
210 * @return Newly constructed CAknsBitmapItemData object.
213 * If allocation fails, function leaves with a system-wide error
216 IMPORT_C static CAknsBitmapItemData* NewL();
220 * Deletes bitmap object, if present.
222 virtual ~CAknsBitmapItemData();
224 public: // New functions
227 * Sets the bitmap object for this item data instance.
231 * @c NULL value can be used to detach bitmap from item data.
233 * @param aBitmap Pointer to bitmap instance. Ownership of the bitmap
234 * object is transferred to item data. @c NULL value is also valid.
236 IMPORT_C void SetBitmap( CFbsBitmap* aBitmap );
239 * Sets the bitmap object for this item data instance and destroys
240 * previous one, if any.
244 * @param aBitmap Pointer to bitmap instance. Ownership of the bitmap
245 * object is transferred to item data. @c NULL value is also valid.
247 IMPORT_C void DestroyAndSetBitmap( CFbsBitmap* aBitmap );
250 * Returns the current bitmap object owned by item data instance.
254 * @return Pointer to bitmap instance, or @c NULL if none is currently
255 * associated with this item data.
257 IMPORT_C CFbsBitmap* Bitmap();
259 protected: // C++ protected constructor
262 * C++ protected constructor.
263 * Constructs a new CAknsBitmapItemData with bitmap set to @c NULL.
265 * @param aType Item type of the new item data object. While this
266 * is always ::EAknsITBitmap for instances of this class, derived
267 * classes may specify another value.
271 CAknsBitmapItemData( const TAknsItemType aType );
274 CFbsBitmap* iBitmap; //!< Pointer to associated bitmap instance.
279 * Masked bitmap item data.
280 * Masked bitmap item data contains (in addition to base class members) an
281 * additional member of type CFbsBitmap for the bitmap mask.
282 * Item type for bitmap item data is always ::EAknsITMaskedBitmap.
284 * This is a public class with exported functions.
285 * The class is not intended for derivation outside the library.
291 NONSHARABLE_CLASS(CAknsMaskedBitmapItemData) : public CAknsBitmapItemData
293 public: // Constructors and destructor
296 * Two-phased constructor.
297 * Constructs a new CAknsMaskedBitmapItemData object with bitmaps set to
298 * @c NULL. Bitmaps must be set afterwards by using
299 * SetBitmap(CFbsBitmap* aBitmap) and SetMask(CFbsBitmap* aBitmap) methods.
301 * @return Newly constructed CAknsMaskedBitmapItemData object.
304 * If allocation fails, function leaves with a system-wide error
307 IMPORT_C static CAknsMaskedBitmapItemData* NewL();
311 * Deletes bitmap objects, if present.
313 virtual ~CAknsMaskedBitmapItemData();
315 public: // New functions
318 * Sets the mask bitmap object for this item data instance.
319 * @c NULL value can be used to detach bitmap mask from item data.
323 * @param aMask Pointer to mask instance. Ownership of the bitmap
324 * object is transferred to item data. @c NULL value is also valid.
326 IMPORT_C void SetMask( CFbsBitmap* aMask );
329 * Sets the mask bitmap object for this item data instance and destroys
330 * previous one, if any.
334 * @param aMask Pointer to mask instance. Ownership of the bitmap
335 * object is transferred to item data. @c NULL value is also valid.
337 IMPORT_C void DestroyAndSetMask( CFbsBitmap* aMask );
340 * Returns the current bitmap mask object owned by item data instance.
344 * @return Pointer to mask instance, or @c NULL if none is currently
345 * associated with this item data.
347 IMPORT_C CFbsBitmap* Mask();
349 protected: // C++ protected constructor
352 * C++ protected constructor.
353 * Constructs a new CAknsMaskedBitmapItemData with bitmaps set to @c NULL.
355 * @param aType Item type of the new item data object. While this
356 * is always ::EAknsITMaskedBitmap for instances of this class, derived
357 * classes may specify another value.
361 CAknsMaskedBitmapItemData( const TAknsItemType aType );
364 CFbsBitmap* iMask; //!< Pointer to associated mask bitmap instance.
369 * Color table item data.
370 * Color table item data contains (in addition to base class members) color
371 * array of TRGB values. Item type for color item data is always
372 * ::EAknsITColorTable.
374 * This is a public class with exported functions.
375 * The class is not intended for derivation outside the library.
381 NONSHARABLE_CLASS(CAknsColorTableItemData) : public CAknsImageItemData
383 public: // Constructors and destructor
386 * Two-phased constructor.
387 * Constructs a new CAknsColorTableItemData object. Values must
388 * be set separately using SetColorsL.
390 * @return Newly constructed CAknsColorTableItemData object.
393 * If allocation fails, function leaves with a system-wide error
396 IMPORT_C static CAknsColorTableItemData* NewL();
400 * Destroys color value array.
402 virtual ~CAknsColorTableItemData();
404 public: // New functions
407 * Sets color values for this item data instance.
411 * @param aNumberOfColors Number of colors in aColors.
413 * @param aColors Pointer to first color value. Values are copied
414 * into an internal array.
416 IMPORT_C void SetColorsL( const TInt aNumberOfColors,
417 const TAknsColorTableEntry* aColors );
420 * Returns the indexed color value.
424 * @param aIndex Index of the color to be retrieved. This must
425 * be within 0 (inclusive) and aNumberOfColors (exclusive).
427 * @return Color value as TInt. If the value is -1, RGB value
428 * should be queried instead.
431 * This method does not perform any bounds checking. An access
432 * violation or panic will occur, if the given index is not
433 * within the bounds of the internal array. Use @c GetColorL
434 * instead, if such checking is required.
436 IMPORT_C TInt ColorIndexed( const TInt aIndex ) const;
439 * Returns the RGB color value.
443 * @param aIndex Index of the color to be retrieved. This must
444 * be within 0 (inclusive) and aNumberOfColors (exclusive).
446 * @return Color value as TRgb. Note that the value is only
447 * valid if ColorIndexed() returned -1.
450 * This method does not perform any bounds checking. An access
451 * violation or panic will occur, if the given index is not
452 * within the bounds of the internal array. Use @c GetColorL
453 * instead, if such checking is required.
455 IMPORT_C TRgb ColorRgb( const TInt aIndex ) const;
458 * Retrieves a color value (indexed or RGB) with bounds checking.
462 * @param aIndex Index of the color to be retrieved.
464 * @param aColor On return, contains the color as an RGB value.
465 * If the color is indexed, the appropriate mapping using current
469 * If the given index is outside the bounds of the array,
470 * the method leaves with an error code.
472 IMPORT_C void GetColorL( const TInt aIndex, TRgb& aColor ) const;
474 protected: // C++ protected constructor
477 * C++ protected constructor.
478 * Constructs a new CAknsColorItemData without an array.
480 * @param aType Item type of the new item data object. While this
481 * is always ::EAknsITColorTable for instances of this class, derived
482 * classes may specify another value.
486 CAknsColorTableItemData( const TAknsItemType aType );
490 TAknsColorTableEntry* iColorArray; //!< Color array.
491 TInt iColorArraySize;
496 * Icon table item data.
497 * Icon table item data contains (in addition to base class members), an
498 * array containing item IDs of images. Item type for
499 * image table item data objects is always ::EAknsITImageTable.
501 * This is a public class with exported functions.
502 * The class is not intended for derivation outside the library.
508 NONSHARABLE_CLASS(CAknsImageTableItemData) : public CAknsImageItemData
510 public: // Constructors and destructor
513 * Two-phased constructor.
514 * Constructs a new CAknsImageTableItemData object. Values must
515 * be set separately using SetImagesL.
517 * @return Newly constructed CAknsImageTableItemData object.
520 * If allocation fails, function leaves with a system-wide error
523 IMPORT_C static CAknsImageTableItemData* NewL();
527 * Destroys image array.
529 virtual ~CAknsImageTableItemData();
531 public: // New functions
534 * Sets image table values for this item data instance.
538 * @param aNumberOfImages Number of images in aImages.
540 * @param aImages Pointer to first image ID. Values are
541 * copied into an internal array.
543 IMPORT_C void SetImagesL( const TInt aNumberOfImages,
544 const TAknsItemID* aImages );
547 * Returns the item ID of an image.
551 * @param aIndex Index of the image. This value must
552 * be within 0 (inclusive) and NumberOfImages (exclusive).
554 * @return Item ID of the image.
556 IMPORT_C TAknsItemID ImageIID( const TInt aIndex ) const;
559 * Returns pointer to the first entry in the image array,
560 * owned by this object.
564 * @return Pointer to TAknsItemID.
566 IMPORT_C TAknsItemID* Images() const;
569 * Returns the number of images.
573 * @return Number of images as an integer.
575 IMPORT_C TInt NumberOfImages() const;
577 protected: // C++ protected constructor
580 * C++ protected constructor.
581 * Constructs a new CAknsImageTableItemData without an array.
583 * @param aType Item type of the new item data object. While this
584 * is always ::EAknsITImageTable for instances of this class, derived
585 * classes may specify another value.
589 CAknsImageTableItemData( const TAknsItemType aType );
593 TInt iNumberOfImages; //!< Number of images.
594 TAknsItemID* iImageArray; //!< Image array.
599 * Bitmap animation item data.
600 * Bitmap animation item data contains (in addition to base class members),
601 * animation properties as well as an array containing frame properties
602 * Item type for bitmap animation item data objects is always ::EAknsITBmpAnim.
604 * This is a public class with exported functions.
605 * The class is not intended for derivation outside the library.
611 NONSHARABLE_CLASS(CAknsBmpAnimItemData) : public CAknsImageTableItemData
613 public: // Constructors and destructor
616 * Two-phased constructor.
617 * Constructs a new CAknsBmpAnimItemData object. Values must
618 * be set separately using SetImagesL and SetFrameInfosL.
620 * @return Newly constructed CAknsBmpAnimItemData object.
623 * If allocation fails, function leaves with a system-wide error
626 IMPORT_C static CAknsBmpAnimItemData* NewL();
632 virtual ~CAknsBmpAnimItemData();
634 public: // New functions
637 * Sets frame property values for this item data instance.
639 * The number of entries in the given array must match
640 * the number of images in the image table. Therefore
641 * SetFrameInfosL must be called only after SetImagesL
642 * has already been called.
646 * @param aFrameInfos Pointer to first frame info. Values are
647 * copied into an internal array.
649 IMPORT_C void SetFrameInfosL( const TAknsBmpAnimFrameInfo* aFrameInfos );
652 * Returns pointer to the first entry in the frame property array,
653 * owned by this object.
657 * @return Pointer to TAknsBmpAnimFrameInfo.
659 IMPORT_C TAknsBmpAnimFrameInfo* FrameInfos() const;
662 * Sets the flag indicating whether the last frame should be
663 * interpreted as the background (i.e. excluded from the animation
668 * @param aLastFrameBg Boolean value.
670 IMPORT_C void SetLastFrameBackground( TBool aLastFrameBg );
673 * Retrieves the flag value indicating whether the last frame
674 * should be interpreted as the background.
678 * @return Boolean value.
680 IMPORT_C TBool LastFrameBackground() const;
683 * Sets the frame interval for the entire animation.
687 * @param aFrameInterval Frame interval in milliseconds or -1.
689 IMPORT_C void SetFrameInterval( const TInt16 aFrameInterval );
692 * Retrieves the frame interval.
696 * @return Frame interval in milliseconds or -1.
698 IMPORT_C TInt16 FrameInterval() const;
701 * Sets the play mode for the entire animation.
705 * @param aPlayMode Play mode.
707 IMPORT_C void SetPlayMode( const TInt16 aPlayMode );
710 * Retrieves the play mode.
716 IMPORT_C TInt16 PlayMode() const;
719 * Sets the flash property for the entire animation.
723 * @param aFlash Flash flag value.
725 IMPORT_C void SetFlash( const TBool aFlash );
728 * Retrieves the flash property.
732 * @return Flash flag value.
734 IMPORT_C TBool Flash() const;
736 protected: // C++ protected constructor
739 * C++ protected constructor.
740 * Constructs a new CAknsBmpAnimItemData without an array.
742 * @param aType Item type of the new item data object. While this
743 * is always ::EAknsITBmpAnim for instances of this class, derived
744 * classes may specify another value.
748 CAknsBmpAnimItemData( const TAknsItemType aType );
752 TAknsBmpAnimFrameInfo* iFrameArray; //!< Frame info array.
754 TBool iLastFrameBackground; //!< Last frame used as background flag.
755 TInt16 iFrameInterval; //!< Frame interval.
756 TInt16 iPlayMode; //!< Play mode.
757 TBool iFlash; //!< Flash flag.
763 * String item data contains (in addition to base class members),
764 * a single string value.
765 * Item type for string item data objects is always ::EAknsITString.
767 * This is a public class with exported functions.
768 * The class is not intended for derivation outside the library.
774 NONSHARABLE_CLASS(CAknsStringItemData) : public CAknsItemData
776 public: // Constructors and destructor
779 * Two-phased constructor.
780 * Constructs a new CAknsStringItemData object. String value must
781 * be set separately using SetStringL.
783 * @return Newly constructed CAknsStringItemData object.
786 * If allocation fails, function leaves with a system-wide error
789 IMPORT_C static CAknsStringItemData* NewL();
793 * Destroys owned string instance.
795 virtual ~CAknsStringItemData();
797 public: // New functions
800 * Sets the string value of this item data instance.
804 * @param aValue New value. The value is copied to a newly created
805 * internal buffer, and any previous value is discarded.
807 IMPORT_C void SetStringL( const TDesC& aValue );
810 * Returns a reference to the string value. The value is still owned
811 * by the item data object and caller must take its lifetime properly
816 * @return Reference to the value.
818 IMPORT_C const TDesC& String() const;
820 protected: // C++ protected constructor
823 * C++ protected constructor.
824 * Constructs a new CAknsStringItemData without an array.
826 * @param aType Item type of the new item data object. While this
827 * is always ::EAknsITString for instances of this class, derived
828 * classes may specify another value.
832 CAknsStringItemData( const TAknsItemType aType );
836 HBufC* iString; //!< Buffer for string value.
841 * Effect command data class.
842 * Effect command class encapsulates the information of a single effect
843 * command that is used with effect queue item data objects.
845 * This is a public class with exported functions.
846 * The class is not intended for derivation outside the library.
852 NONSHARABLE_CLASS(CAknsEffectCommand) : public CBase
854 public: // Constructors and destructor
857 * Two-phased constructor.
859 * @return Newly constructed object.
862 * If allocation fails, function leaves with a system-wide error
865 IMPORT_C static CAknsEffectCommand* NewL();
870 virtual ~CAknsEffectCommand();
872 public: // New functions
875 * Sets the effect UID.
879 * @param aValue New effect UID.
881 IMPORT_C void SetEffectUid( const TUid aValue );
884 * Returns the effect UID.
888 * @return Effect UID.
890 IMPORT_C TUid EffectUid() const;
893 * Sets the layer configuration.
897 * @param aValue New layer configuration.
899 IMPORT_C void SetLayerConf( const TAknsRlRenderOpParam aValue );
902 * Returns the layer configuration.
906 * @return Layer configuration.
908 IMPORT_C TAknsRlRenderOpParam LayerConf() const;
911 * Appends a paramater to this effect command.
915 * @param aParameter Parameter to be appended. The given data is copied,
916 * and thus no ownership is transferred.
918 IMPORT_C void AppendParameterL(
919 const TAknsRlParameterData& aParameter );
922 * Creates and returns a new parameter iterator.
926 * @return A new parameter iterator. Multiple iterators can be created.
927 * The ownership of the iterator is transferred to the caller, and
928 * the caller must ensure that the lifetime of the iterator
929 * does not exceed the lifetime of this object.
931 IMPORT_C MAknsRlParameterIterator* CreateParameterIteratorL();
933 protected: // C++ protected constructor
936 * C++ protected constructor.
940 CAknsEffectCommand();
944 TUid iUid; //!< Effect UID.
945 TAknsRlRenderOpParam iLayerConf; //!< Layer configuration.
946 RPointerArray<CAknsEffectParameter> iParameters; //!< Parameters array.
951 * Effect queue item data.
952 * Effect queue item data contains (in addition to base class members),
953 * the information required to render a single effect queue based
956 * Item type for effect queue item data objects is always ::EAknsITEffectQueue.
958 * This is a public class with exported functions.
959 * The class is not intended for derivation outside the library.
965 NONSHARABLE_CLASS(CAknsEffectQueueItemData) : public CAknsItemData
967 public: // Constructors and destructor
970 * Two-phased constructor.
971 * Constructs a new CAknsEffectQueueItemData object.
973 * @return Newly constructed CAknsEffectQueueItemData object.
976 * If allocation fails, function leaves with a system-wide error
979 IMPORT_C static CAknsEffectQueueItemData* NewL();
984 virtual ~CAknsEffectQueueItemData();
986 public: // New functions
989 * Sets the referenced item ID.
995 IMPORT_C void SetRefItem( const TAknsItemID aValue );
998 * Returns the referenced item ID.
1002 * @return Referenced item ID, or @c KAknsIIDDefault if none.
1004 IMPORT_C TAknsItemID RefItem() const;
1007 * Sets the input layer index value.
1013 IMPORT_C void SetInputLayer( const TInt aValue );
1016 * Returns the input layer index value.
1020 * @return Input layer index, or -1 if not used.
1022 IMPORT_C TInt InputLayer() const;
1025 * Sets the input layer mode value.
1031 IMPORT_C void SetInputLayerMode( const TInt aValue );
1034 * Returns the input layer mode value.
1038 * @return Input layer mode.
1040 IMPORT_C TInt InputLayerMode() const;
1043 * Sets the output layer index value.
1049 IMPORT_C void SetOutputLayer( const TInt aValue );
1052 * Returns the output layer index value.
1056 * @return Output layer index.
1058 IMPORT_C TInt OutputLayer() const;
1061 * Sets the output layer mode value.
1067 IMPORT_C void SetOutputLayerMode( const TInt aValue );
1070 * Returns the output layer mode value.
1074 * @return Output layer mode.
1076 IMPORT_C TInt OutputLayerMode() const;
1079 * Appends a command to this effect queue.
1083 * @param aCommand Command to be appended. The ownership of the
1084 * given instance is transferred to this object, even if the method
1087 IMPORT_C void AppendCommandL( const CAknsEffectCommand* aCommand );
1090 * Creates and returns a new command iterator.
1094 * @return A new command iterator. Multiple iterators can be created.
1095 * The ownership of the iterator is transferred to the caller, and
1096 * the caller must ensure that the lifetime of the iterator
1097 * does not exceed the lifetime of this object.
1099 IMPORT_C MAknsRlCommandIterator* CreateCommandIteratorL();
1101 protected: // C++ protected constructor
1104 * C++ protected constructor.
1105 * Constructs a new CAknsEffectQueueItemData.
1107 * @param aType Item type of the new item data object. While this
1108 * is always ::EAknsITEffectQueue for instances of this class, derived
1109 * classes may specify another value.
1113 CAknsEffectQueueItemData( const TAknsItemType aType );
1117 TAknsItemID iRefId; //!< Referenced item ID.
1118 TInt iInputLayer; //!< Input layer value.
1119 TInt iInputLayerMode; //!< Input layer mode value.
1120 TInt iOutputLayer; //!< Output layer value.
1121 TInt iOutputLayerMode; //!< Output layer mode value.
1122 RPointerArray<CAknsEffectCommand> iCommands; //!< Commands array.
1127 * Timing model data class.
1128 * Timing model class encapsulates the information of a single timing model that
1129 * is used with animation command item data objects.
1131 * The class is not intended for derivation outside the library.
1137 class CAknsTimingModel: public CBase
1139 public: // Constructors and destructor
1140 static CAknsTimingModel* NewL();
1141 virtual ~CAknsTimingModel();
1143 protected: // C++ protected constructor
1147 void SetTimingModelUid( const TUid aValue );
1148 TUid TimingModelUid() const;
1150 void AppendParameterL( const TAknsRlParameterData& aParameter );
1151 MAknsRlParameterIterator* CreateParameterIteratorL();
1153 public: // Iteration support (internal)
1154 void AssignOutL( TAknsAlTimingModelData& aData );
1156 static void InitializeOut( TAknsAlTimingModelData& aData );
1157 static void ReleaseOut( TAknsAlTimingModelData& aData );
1160 TUid iTimingModelUid;
1161 RPointerArray<CAknsEffectParameter> iParameters;
1165 * Animation value data class.
1166 * Animation value class encapsulates the information of a single animation
1167 * value (animation value uid, parameters for animation value and timing model
1168 * reference id) that is used with animation command item data objects.
1170 * The class is not intended for derivation outside the library.
1176 class CAknsAnimationValue: public CBase
1179 static CAknsAnimationValue* NewL();
1180 virtual ~CAknsAnimationValue();
1183 CAknsAnimationValue();
1186 void SetAnimationValueUid( const TUid aValue );
1187 TUid AnimationValueUid() const;
1189 void SetTimingModelId( const TInt aId );
1190 TInt TimingModelId() const;
1192 void AppendParameterL( const TAknsRlParameterData& aParameter );
1193 MAknsRlParameterIterator* CreateParameterIteratorL();
1195 public: // Iteration support (internal)
1196 void AssignOutL( TAknsAlAnimationValueData& aData );
1198 static void InitializeOut( TAknsAlAnimationValueData& aData );
1199 static void ReleaseOut( TAknsAlAnimationValueData& aData );
1202 TInt iTimingModelId;
1203 TUid iAnimationValueUid;
1204 RPointerArray<CAknsEffectParameter> iParameters;
1208 * Animation command data class.
1209 * Animation command class encapsulates the information of a single animation
1210 * command (in addition to base class members) that is used with animation item
1213 * The class is not intended for derivation outside the library.
1219 class CAknsAnimationCommand: public CAknsEffectCommand
1222 static CAknsAnimationCommand* NewL();
1223 virtual ~CAknsAnimationCommand();
1226 CAknsAnimationCommand();
1229 void AppendNamedReferenceL( const TAknsAlNamedReferenceData& aData );
1230 MAknsAlIterator* CreateNamedReferenceIteratorL();
1232 public: // Iteration support (internal)
1233 void AssignOutL( TAknsAlAnimationCommandData& aData );
1235 static void InitializeOut( TAknsAlAnimationCommandData& aData );
1236 static void ReleaseOut( TAknsAlAnimationCommandData& aData );
1239 RPointerArray<CAknsNamedReference> iNamedReferences;
1243 * Animation item data.
1244 * Animation item data contains (in addition to base class members) the
1245 * information required to create an AnimationLibrary animation.
1247 * Item type for animation item data objects is always ::EAknsITAnimation.
1249 * The class is not intended for derivation outside the library.
1255 class CAknsAnimationItemData: public CAknsItemData
1258 static CAknsAnimationItemData* NewL();
1259 virtual ~CAknsAnimationItemData();
1261 protected: // C++ protected constructor
1262 CAknsAnimationItemData();
1264 public: // New functions
1265 void SetMinInterval( TInt aMin );
1266 TInt MinInterval() const;
1268 void SetMorphing( TBool aMorphing );
1269 TBool Morphing() const;
1271 void SetInputLayer( const TInt aValue );
1272 TInt InputLayer() const;
1274 void SetInputLayerMode( const TInt aValue );
1275 TInt InputLayerMode() const;
1277 void SetOutputLayer( const TInt aValue );
1278 TInt OutputLayer() const;
1280 void SetOutputLayerMode( const TInt aValue );
1281 TInt OutputLayerMode() const;
1284 * @param aCommand Ownership is transferred
1286 void AppendPreprocessCommandL( CAknsEffectCommand* aCommand );
1287 MAknsRlCommandIterator* PreprocessCommandIteratorL() const;
1290 * @param aCommand Ownership is transferred
1292 void AppendCommandL( CAknsAnimationCommand* aCommand );
1293 MAknsAlIterator* CommandIteratorL() const;
1296 * @param aValue Ownership is transferred
1298 void AppendTimingModelL( CAknsTimingModel* aModel );
1299 MAknsAlIterator* TimingModelIteratorL() const;
1302 * @param aValue Ownership is transferred
1304 void AppendAnimationValueL( CAknsAnimationValue* aValue );
1305 MAknsAlIterator* AnimationValueIteratorL() const;
1307 void AppendSizeBoundParamL( const TAknsAlSizeBoundParameterData& aParam );
1308 MAknsAlIterator* SizeBoundParamIteratorL() const;
1311 TInt iMinInterval; // In milliseconds
1315 TInt iInputLayerMode;
1317 TInt iOutputLayerMode;
1319 RPointerArray<CAknsEffectCommand> iPreprocessCommands;
1320 RPointerArray<CAknsAnimationCommand> iAnimationCommands;
1321 RPointerArray<CAknsTimingModel> iTimingModels;
1322 RPointerArray<CAknsAnimationValue> iAnimationValues;
1323 RPointerArray<CAknsSizeBoundParameter> iSizeBoundParams;
1326 #endif // AKNSITEMDATA_H