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 FUiAnimParallelAnimationGroup.h
20 * @brief This is the header file for the %ParallelAnimationGroup class.
22 * This header file contains the declarations of the %ParallelAnimationGroup class.
25 #ifndef _FUI_ANIM_PARALLEL_ANIMATION_GROUP_H_
26 #define _FUI_ANIM_PARALLEL_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 ParallelAnimationGroup
41 * @brief This class is used to group a set of animations together.
45 * @final This class is not intended for extension.
47 * The %ParallelAnimationGroup class is used to group a set of animations together in parallel.
49 class _OSP_EXPORT_ ParallelAnimationGroup
50 : public AnimationGroup
55 * This is the default constructor for this class.
58 * @exception E_SUCCESS The method is successful.
59 * @exception E_OUT_OF_MEMORY The memory is insufficient.
60 * @remarks The specific error code can be accessed using the GetLastResult() method.
62 ParallelAnimationGroup(void);
66 * This is the destructor for this class.
70 virtual ~ParallelAnimationGroup(void);
74 * This is the copy constructor for the %ParallelAnimationGroup class.
78 * @param[in] animationGroup An instance of %ParallelAnimationGroup
79 * @exception E_SUCCESS The method is successful.
80 * @exception E_OUT_OF_MEMORY The memory is insufficient.
81 * @remarks The specific error code can be accessed using the GetLastResult() method.
83 ParallelAnimationGroup(const ParallelAnimationGroup& animationGroup);
87 * Assigns the value of the specified instance to the current instance of %ParallelAnimationGroup.
91 * @param[in] rhs An instance of %ParallelAnimationGroup
92 * @exception E_SUCCESS The method is successful.
93 * @exception E_OUT_OF_MEMORY The memory is insufficient.
94 * @remarks The specific error code can be accessed using the GetLastResult() method.
96 ParallelAnimationGroup& operator =(const ParallelAnimationGroup& rhs);
100 * Checks whether the specified instance and the current instance of %ParallelAnimationGroup have equal animation values.
104 * @return @c true if the animation of the two instances of %ParallelAnimationGroup have equal values, @n
106 * @param[in] rhs An instance of %ParallelAnimationGroup
108 bool operator ==(const ParallelAnimationGroup& rhs) const;
112 * Checks whether the specified instance and the current instance of %ParallelAnimationGroup have different animation values.
116 * @return @c true if the values of the animations of the two instances of %ParallelAnimationGroup are not equal, @n
118 * @param[in] rhs An instance of %ParallelAnimationGroup
120 bool operator !=(const ParallelAnimationGroup& rhs) const;
124 * Checks whether the value of the current instance of %ParallelAnimationGroup equals the value of the specified instance.
128 * @return @c true if the value of the current instance is equal to the value of the specified instance, @n
130 * @param[in] obj An instance of %ParallelAnimationGroup
131 * @remarks The %ParallelAnimationGroup class has a semantic value. @n
132 * This means that this method checks whether the two instances have the same animation.
134 virtual bool Equals(const Tizen::Base::Object& obj) const;
138 * Gets the hash value of the current instance.
142 * @return The hash value of the current instance
143 * @remarks The two equal instances must return the same hash value. For better performance, the used hash function must generate a random
144 * distribution for all inputs.
146 virtual int GetHashCode(void) const;
150 * Removes all the animations from the animation group.
154 virtual void RemoveAllAnimations(void);
158 * Gets the total number of animations currently stored in a group.
162 * @return The total number of animations stored in a group
164 virtual int GetAnimationCount(void) const;
168 * Adds an animation to the animation group. @n
169 * Each animation target can have only one animation.
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 object of type 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.
180 * @remarks If an animation is added to a target type that already has an animation associated with it, the old animation is overwritten with the new animation.
182 result AddAnimation(AnimationTargetType animTarget, const AnimationBase& animation);
186 * Removes an animation from the animation group with the specified animation target.
190 * @return An error code
191 * @param[in] animTarget The animation target
192 * @exception E_SUCCESS The method is successful.
193 * @exception E_INVALID_ARG The specified input parameter is invalid.
194 * @exception E_OBJ_NOT_FOUND The animation with the specified animation target does not exist in the animation group.
195 * @exception E_SYSTEM A system error has occurred.
197 result RemoveAnimation(AnimationTargetType animTarget);
201 * Gets the animation object for the specified animation target.
205 * @return An animation for the specified animation target in the animation group, @n
206 * else @c null if the animation target is empty
207 * @param[in] animTarget The animation target type to get an animation object
209 AnimationBase* GetAnimationN(AnimationTargetType animTarget) const;
213 * Checks whether an animation is added for the specified target type.
217 * @return @c true if an animation is associated with the specified target type, @n
219 * @param[in] animTarget The animation target type
221 bool IsAnimationAdded(AnimationTargetType animTarget);
225 * Gets the type information of this instance.
229 * @return The type information of this instance
231 virtual AnimationGroupType GetType(void) const;
236 friend class _ParallelAnimationGroupImpl;
240 // This variable is for internal use only. Using this variable can cause behavioral, security-related,
241 // and consistency-related issues in the application.
243 // This variable is for internal usage.
247 class _ParallelAnimationGroupImpl* _pParallelAnimationGroupImpl;
248 }; // ParallelAnimationGroup
251 }}} // Tizen::Ui::Animations
253 #endif // _FUI_ANIM_PARALLEL_ANIMATION_GROUP_H_