X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Fanimation%2Fanimation.h;h=65abe6f2ad86bb93657591346567aa6bf22c3dcf;hb=refs%2Fchanges%2F02%2F171502%2F1;hp=7480ff1da466f7ef19c4fcb7ed8e580d0b301266;hpb=dccb112f833a42ac69e9b6fd4adac70606aba0b6;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/animation/animation.h b/dali/public-api/animation/animation.h index 7480ff1..65abe6f 100644 --- a/dali/public-api/animation/animation.h +++ b/dali/public-api/animation/animation.h @@ -1,5 +1,5 @@ -#ifndef __DALI_ANIMATION_H__ -#define __DALI_ANIMATION_H__ +#ifndef DALI_ANIMATION_H +#define DALI_ANIMATION_H /* * Copyright (c) 2017 Samsung Electronics Co., Ltd. @@ -102,6 +102,8 @@ class Animation; * * Using AnimateTo and AnimateBy for the same property of the same Actor will yield undefined behaviour especially if the TimePeriod overlaps. * + * After calling Animation::Play(), Handle::GetProperty will return the target value of the animated property. + * * Signals * | %Signal Name | Method | * |--------------|--------------------------| @@ -159,6 +161,17 @@ public: }; /** + * @brief Enumeration for what looping mode is in. + * + * @SINCE_1_2.60 + */ + enum LoopingMode + { + RESTART, ///< When the animation arrives at the end in looping mode, the animation restarts from the beginning. @SINCE_1_2.60 + AUTO_REVERSE ///< When the animation arrives at the end in looping mode, the animation reverses direction and runs backwards again. @SINCE_1_2.60 + }; + + /** * @brief Creates an uninitialized Animation; this can be initialized with Animation::New(). * * Calling member functions with an uninitialized Animation handle is not allowed. @@ -248,7 +261,7 @@ public: * @brief Enables looping for 'count' repeats. * * A zero is the same as SetLooping(true) i.e. repeat forever. - * If Play() Stop() or 'count' loops is reached, the loop counter will reset. + * This function resets the looping value and should not be used with SetLooping(bool). * Setting this parameter does not cause the animation to Play(). * * @SINCE_1_1.20 @@ -338,7 +351,7 @@ public: */ AlphaFunction GetDefaultAlphaFunction() const; - /* + /** * @brief Sets the progress of the animation. * * The animation will play (or continue playing) from this point. The progress @@ -417,6 +430,16 @@ public: void PlayFrom( float progress ); /** + * @brief Play the animation after a given delay time. + * + * The delay time is not included in the looping time. + * When the delay time is negative value, it would treat as play immediately. + * @SINCE_1_2.60 + * @param[in] delaySeconds The delay time + */ + void PlayAfter( float delaySeconds ); + + /** * @brief Pauses the animation. * @SINCE_1_0.0 */ @@ -444,6 +467,23 @@ public: void Clear(); /** + * @brief Sets the looping mode. + * + * Animation plays forwards and then restarts from the beginning or runs backwards again. + * @SINCE_1_2.60 + * @param[in] loopingMode The looping mode is one of RESTART and AUTO_REVERSE + */ + void SetLoopingMode( LoopingMode loopingMode ); + + /** + * @brief Gets one of the current looping mode. + * + * @SINCE_1_2.60 + * @return The current looping mode + */ + LoopingMode GetLoopingMode() const; + + /** * @brief Connects to this signal to be notified when an Animation's animations have finished. * * @SINCE_1_0.0 @@ -595,7 +635,7 @@ public: * @SINCE_1_0.0 * @param[in] target The target object property to animate * @param[in] keyFrames The set of time/value pairs between which to animate - * @param[in] period The effect will occur duing this time period + * @param[in] period The effect will occur during this time period * @param[in] interpolation The method used to interpolate between values */ void AnimateBetween(Property target, KeyFrames& keyFrames, TimePeriod period, Interpolation interpolation); @@ -618,7 +658,7 @@ public: * @param[in] target The target object property to animate * @param[in] keyFrames The set of time/value pairs between which to animate * @param[in] alpha The alpha function to apply to the overall progress - * @param[in] period The effect will occur duing this time period + * @param[in] period The effect will occur during this time period * @param[in] interpolation The method used to interpolate between values */ void AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation); @@ -718,4 +758,4 @@ public: // Not intended for use by Application developers */ } // namespace Dali -#endif // __DALI_ANIMATION_H__ +#endif // DALI_ANIMATION_H