2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiAnimSequentialAnimationGroup.h
20 * @brief This is the header file for the %SequentialAnimationGroup class.
22 * This header file contains the declarations of the %SequentialAnimationGroup class.
25 #ifndef _FUI_ANIM_SEQUENTIAL_ANIMATION_GROUP_H_
26 #define _FUI_ANIM_SEQUENTIAL_ANIMATION_GROUP_H_
28 #include <FBaseTypes.h>
29 #include <FBaseObject.h>
31 #include <FUiAnimAnimationBase.h>
32 #include <FUiAnimAnimationGroup.h>
35 namespace Tizen { namespace Ui { namespace Animations
40 * @class SequentialAnimationGroup
41 * @brief This class is used to group a set of animations together.
45 * @final This class is not intended for extension.
47 * The %SequentialAnimationGroup class is used to group a set of animations together in sequence.
49 class _OSP_EXPORT_ SequentialAnimationGroup
50 : public AnimationGroup
55 * This is the default constructor for this class.
59 * @exception E_SUCCESS The method is successful.
60 * @exception E_OUT_OF_MEMORY The memory is insufficient.
61 * @remarks The specific error code can be accessed using the GetLastResult() method.
63 SequentialAnimationGroup(void);
67 * This is the destructor for this class.
71 virtual ~SequentialAnimationGroup(void);
75 * This is the copy constructor for the %SequentialAnimationGroup class.
79 * @param[in] animationGroup An instance of %SequentialAnimationGroup
80 * @exception E_SUCCESS The method is successful.
81 * @exception E_OUT_OF_MEMORY The memory is insufficient.
82 * @remarks The specific error code can be accessed using the GetLastResult() method.
84 SequentialAnimationGroup(const SequentialAnimationGroup& animationGroup);
88 * Assigns the value of the specified instance to the current instance of %SequentialAnimationGroup.
92 * @param[in] rhs An instance of %SequentialAnimationGroup
93 * @exception E_SUCCESS The method is successful.
94 * @exception E_OUT_OF_MEMORY The memory is insufficient.
95 * @remarks The specific error code can be accessed using the GetLastResult() method.
97 SequentialAnimationGroup& operator =(const SequentialAnimationGroup& rhs);
101 * Checks whether the specified instance and the current instance of %SequentialAnimationGroup have equal animation values.
105 * @return @c true if the animation of the two instances of %SequentialAnimationGroup have equal values, @n
107 * @param[in] rhs An instance of %SequentialAnimationGroup
109 bool operator ==(const SequentialAnimationGroup& rhs) const;
113 * Checks whether the specified instance and the current instance of %SequentialAnimationGroup have different animation values.
117 * @return @c true if the values of the animations of the two instances of %SequentialAnimationGroup are not equal, @n
119 * @param[in] rhs An instance of %SequentialAnimationGroup
121 bool operator !=(const SequentialAnimationGroup& rhs) const;
125 * Checks whether the value of the current instance of %SequentialAnimationGroup is equal to the value of the specified instance.
129 * @return @c true if the value of the current instance is equal to the value of the specified instance, @n
131 * @param[in] obj An instance of %SequentialAnimationGroup
132 * @remarks The %SequentialAnimationGroup class has a semantic value. @n
133 * This means that this method checks whether the two instances have the same animation.
135 virtual bool Equals(const Tizen::Base::Object& obj) const;
139 * Gets the hash value of the current instance.
143 * @return The hash value of the current instance
144 * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random
145 * distribution for all inputs.
147 virtual int GetHashCode(void) const;
151 * Removes all the animations from the animation group.
155 virtual void RemoveAllAnimations(void);
159 * Gets the number of animations currently stored in a group.
163 * @return The total number of animations stored in a group
165 virtual int GetAnimationCount(void) const;
169 * Adds the specified animation to the animation group.
173 * @return An error code
174 * @param[in] animTarget The animation target type @n
175 * The animation is applied to the specified animation target type.
176 * @param[in] animation An instance of AnimationBase
177 * @exception E_SUCCESS The method is successful.
178 * @exception E_INVALID_ARG A specified input parameter is invalid.
179 * @exception E_SYSTEM A system error has occurred.
181 result AddAnimation(AnimationTargetType animTarget, const AnimationBase& animation);
185 * Sets the specified @c animation to the animation group.
189 * @return An error code
190 * @param[in] index The index at which the animation is set
191 * @param[in] animTarget The AnimationTargetType to which the animation is applied
192 * @param[in] animation An instance of AnimationBase
193 * @exception E_SUCCESS The method is successful.
194 * @exception E_INVALID_ARG A specified input parameter is invalid.
195 * @exception E_OUT_OF_RANGE The specified @c index is out of range.
196 * @exception E_SYSTEM A system error has occurred.
197 * @remarks If an animation is added to the same index which already has an animation associated with it, the old animation will be overwritten with the new one.
199 result SetAnimationAt(int index, AnimationTargetType animTarget, const AnimationBase& animation);
203 * Inserts the specified @c animation to the animation group.
207 * @return An error code
208 * @param[in] index The index at which the animation is inserted
209 * @param[in] animTarget The AnimationTargetType to which the animation is applied
210 * @param[in] animation An instance of AnimationBase
211 * @exception E_SUCCESS The method is successful.
212 * @exception E_INVALID_ARG A specified input parameter is invalid.
213 * @exception E_OUT_OF_RANGE The specified @c index is out of range.
214 * @exception E_SYSTEM A system error has occurred.
216 result InsertAnimationAt(int index, AnimationTargetType animTarget, const AnimationBase& animation);
220 * Removes the animation from the animation group at the specified @c index.
224 * @return An error code
225 * @param[in] index An index value in the animation group list
226 * @exception E_SUCCESS The method is successful.
227 * @exception E_OUT_OF_RANGE The specified @c index is out of range.
228 * @exception E_SYSTEM A system error has occurred.
230 result RemoveAnimationAt(int index);
234 * Gets the animation object at the specified @c index.
238 * @return The animation object at the specified @c index value in the animation group, @n
239 * else @c null if the @c index is invalid
240 * @param[in] index The index value in the animation group list
242 AnimationBase* GetAnimationAtN(int index) const;
246 * Gets the target type of the animation at the specified @c index.
250 * @return The target type of the animation at the specified @c index value in the animation group, @n
251 * else @c ANIMATION_TARGET_NONE if the specified @c index is invalid
252 * @param[in] index The index value in the animation group list
254 AnimationTargetType GetAnimationTargetTypeAt(int index) const;
258 * Gets the type information of this instance.
262 * @return The type information of this instance
264 virtual AnimationGroupType GetType(void) const;
269 friend class _SequentialAnimationGroupImpl;
273 // This variable is for internal use only. Using this variable can cause behavioral, security-related,
274 // and consistency-related issues in the application.
276 // This variable is for internal usage.
280 class _SequentialAnimationGroupImpl* _pSequentialAnimationGroupImpl;
281 }; // SequentialAnimationGroup
284 }}} // Tizen::Ui::Animations
286 #endif // _FUI_ANIM_SEQUENTIAL_ANIMATION_GROUP_H_