f44a1b19a266a95b280a92fac6286fdc9f159ca7
[platform/core/uifw/dali-core.git] / dali / public-api / animation / animation.h
1 #ifndef DALI_ANIMATION_H
2 #define DALI_ANIMATION_H
3
4 /*
5  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali/public-api/animation/alpha-function.h>
23 #include <dali/public-api/animation/key-frames.h>
24 #include <dali/public-api/animation/path.h>
25 #include <dali/public-api/animation/time-period.h>
26 #include <dali/public-api/object/any.h>
27 #include <dali/public-api/object/handle.h>
28 #include <dali/public-api/object/property.h>
29 #include <dali/public-api/signals/dali-signal.h>
30
31 namespace Dali
32 {
33 /**
34  * @addtogroup dali_core_animation
35  * @{
36  */
37
38 class Actor;
39 struct Property;
40 struct Vector2;
41 struct Vector3;
42
43 namespace Internal DALI_INTERNAL
44 {
45 class Animation;
46 }
47
48 /**
49  * @brief Dali::Animation can be used to animate the properties of any number of objects, typically Actors.
50  *
51  * An example animation setup is shown below:
52  *
53  * @code
54  *
55  * struct MyProgram
56  * {
57  *   Actor mActor; // The object we wish to animate
58  *   Animation mAnimation; // Keep this to control the animation
59  * }
60  *
61  * // ...To play the animation
62  *
63  * mAnimation = Animation::New(3.0f); // duration 3 seconds
64  * mAnimation.AnimateTo(Property(mActor, Actor::Property::POSITION), Vector3(10.0f, 50.0f, 0.0f));
65  * mAnimation.Play();
66  *
67  * @endcode
68  *
69  * Dali::Animation supports "fire and forget" behaviour i.e. an animation continues to play if the handle is discarded.
70  * Note that in the following example, the "Finish" signal will be emitted:
71  *
72  * @code
73  *
74  * void ExampleCallback( Animation& source )
75  * {
76  *   std::cout << "Animation has finished" << std::endl;
77  * }
78  *
79  * void ExampleAnimation( Actor actor )
80  * {
81  *   Animation animation = Animation::New(2.0f); // duration 2 seconds
82  *   animation.AnimateTo(Property(actor, Actor::Property::POSITION), 10.0f, 50.0f, 0.0f);
83  *   animation.FinishedSignal().Connect( ExampleCallback );
84  *   animation.Play();
85  * } // At this point the animation handle has gone out of scope
86  *
87  * Actor actor = Actor::New();
88  * Stage::GetCurrent().Add( actor );
89  *
90  * // Fire animation and forget about it
91  * ExampleAnimation( actor );
92  *
93  * // However the animation will continue, and "Animation has finished" will be printed after 2 seconds.
94  *
95  * @endcode
96  *
97  * If the "Finish" signal is connected to a member function of an object, it must be disconnected before the object is destroyed.
98  * This is typically done in the object destructor, and requires either the Dali::Connection object or Dali::Animation handle to be stored.
99  *
100  * The overall animation time is superseded by the values given in the TimePeriod structure used when calling the AnimateTo(), AnimateBy(), AnimateBetween() and Animate() methods.
101  * If any of the individual calls to those functions exceeds the overall animation time, then the overall animation time is automatically extended.
102  *
103  * Using AnimateTo and AnimateBy for the same property of the same Actor will yield undefined behaviour especially if the TimePeriod overlaps.
104  *
105  * After calling Animation::Play(), Handle::GetProperty will return the target value of the animated property.
106  *
107  * Signals
108  * | %Signal Name | Method                   |
109  * |--------------|--------------------------|
110  * | finished     | @ref FinishedSignal()    |
111  *
112  * Actions
113  * | %Action Name | %Animation method called |
114  * |--------------|--------------------------|
115  * | play         | Play()                   |
116  * | stop         | Stop()                   |
117  * | pause        | Pause()                  |
118  * @SINCE_1_0.0
119  */
120 class DALI_IMPORT_API Animation : public BaseHandle
121 {
122 public:
123
124   typedef Signal< void (Animation&) > AnimationSignalType; ///< Animation finished signal type @SINCE_1_0.0
125
126   typedef Any AnyFunction; ///< Interpolation function @SINCE_1_0.0
127
128   /**
129    * @brief Enumeration for what to do when the animation ends, is stopped, or is destroyed.
130    * @SINCE_1_0.0
131    */
132   enum EndAction
133   {
134     Bake,     ///< When the animation ends, the animated property values are saved. @SINCE_1_0.0
135     Discard,  ///< When the animation ends, the animated property values are forgotten. @SINCE_1_0.0
136     BakeFinal ///< If the animation is stopped, the animated property values are saved as if the animation had run to completion, otherwise behaves like Bake. @SINCE_1_0.0
137   };
138
139   /**
140    * @brief Enumeration for what interpolation method to use on key-frame animations.
141    * @SINCE_1_0.0
142    */
143   enum Interpolation
144   {
145     Linear,   ///< Values in between key frames are interpolated using a linear polynomial. (Default) @SINCE_1_0.0
146     Cubic     ///< Values in between key frames are interpolated using a cubic polynomial. @SINCE_1_0.0
147   };
148
149   /**
150    * @brief Enumeration for what state the animation is in.
151    *
152    * Note: Calling Reset() on this class will NOT reset the animation. It will call BaseHandle::Reset() which drops the object handle.
153    *
154    * @SINCE_1_1.21
155    */
156   enum State
157   {
158     STOPPED,   ///< Animation has stopped @SINCE_1_1.21
159     PLAYING,   ///< The animation is playing @SINCE_1_1.21
160     PAUSED     ///< The animation is paused @SINCE_1_1.21
161   };
162
163   /**
164    * @brief Enumeration for what looping mode is in.
165    *
166    * @SINCE_1_2.60
167    */
168   enum LoopingMode
169   {
170     RESTART,      ///< When the animation arrives at the end in looping mode, the animation restarts from the beginning. @SINCE_1_2.60
171     AUTO_REVERSE  ///< When the animation arrives at the end in looping mode, the animation reverses direction and runs backwards again. @SINCE_1_2.60
172   };
173
174   /**
175    * @brief Creates an uninitialized Animation; this can be initialized with Animation::New().
176    *
177    * Calling member functions with an uninitialized Animation handle is not allowed.
178    * @SINCE_1_0.0
179    */
180   Animation();
181
182   /**
183    * @brief Creates an initialized Animation.
184    *
185    * The animation will not loop.
186    * The default end action is "Bake".
187    * The default alpha function is linear.
188    * @SINCE_1_0.0
189    * @param[in] durationSeconds The duration in seconds
190    * @return A handle to a newly allocated Dali resource
191    * @note durationSeconds can not be negative.
192    */
193   static Animation New(float durationSeconds);
194
195   /**
196    * @brief Downcasts a handle to Animation handle.
197    *
198    * If handle points to an Animation object, the downcast produces valid handle.
199    * If not, the returned handle is left uninitialized.
200    *
201    * @SINCE_1_0.0
202    * @param[in] handle Handle to an object
203    * @return Handle to an Animation object or an uninitialized handle
204    */
205   static Animation DownCast( BaseHandle handle );
206
207   /**
208    * @brief Destructor.
209    *
210    * This is non-virtual since derived Handle types must not contain data or virtual methods.
211    * @SINCE_1_0.0
212    */
213   ~Animation();
214
215   /**
216    * @brief This copy constructor is required for (smart) pointer semantics.
217    *
218    * @SINCE_1_0.0
219    * @param[in] handle A reference to the copied handle
220    */
221   Animation(const Animation& handle);
222
223   /**
224    * @brief This assignment operator is required for (smart) pointer semantics.
225    *
226    * @SINCE_1_0.0
227    * @param[in] rhs A reference to the copied handle
228    * @return A reference to this
229    */
230   Animation& operator=(const Animation& rhs);
231
232   /**
233    * @brief Sets the duration of an animation.
234    *
235    * @SINCE_1_0.0
236    * @param[in] seconds The duration in seconds
237    * @pre DurationSeconds must be greater than zero.
238    */
239   void SetDuration(float seconds);
240
241   /**
242    * @brief Retrieves the duration of an animation.
243    *
244    * @SINCE_1_0.0
245    * @return The duration in seconds
246    */
247   float GetDuration() const;
248
249   /**
250    * @brief Sets whether the animation will loop.
251    *
252    * This function resets the loop count and should not be used with SetLoopCount(int).
253    * Setting this parameter does not cause the animation to Play().
254    *
255    * @SINCE_1_0.0
256    * @param[in] looping True if the animation will loop
257    */
258   void SetLooping(bool looping);
259
260   /**
261    * @brief Enables looping for 'count' repeats.
262    *
263    * A zero is the same as SetLooping(true) i.e. repeat forever.
264    * This function resets the looping value and should not be used with SetLooping(bool).
265    * Setting this parameter does not cause the animation to Play().
266    *
267    * @SINCE_1_1.20
268    * @param[in] count The number of times to loop
269    */
270   void SetLoopCount(int count);
271
272   /**
273    * @brief Gets the loop count.
274    *
275    * A zero is the same as SetLooping(true) ie repeat forever.
276    * The loop count is initially 1 for play once.
277    *
278    * @SINCE_1_1.20
279    * @return The number of times to loop
280    */
281   int GetLoopCount();
282
283   /**
284    * @brief Gets the current loop count.
285    *
286    * A value 0 to GetLoopCount() indicating the current loop count when looping.
287    *
288    * @SINCE_1_1.20
289    * @return The current number of loops that have occured
290    */
291   int GetCurrentLoop();
292
293   /**
294    * @brief Queries whether the animation will loop.
295    *
296    * @SINCE_1_0.0
297    * @return True if the animation will loop
298    */
299   bool IsLooping() const;
300
301   /**
302    * @brief Sets the end action of the animation.
303    *
304    * This action is performed when the animation ends or if it is stopped.
305    * Default end action is bake.
306    * @SINCE_1_0.0
307    * @param[in] action The end action
308    */
309   void SetEndAction(EndAction action);
310
311   /**
312    * @brief Returns the end action of the animation.
313    *
314    * @SINCE_1_0.0
315    * @return The end action
316    */
317   EndAction GetEndAction() const;
318
319   /**
320    * @brief Sets the disconnect action.
321    *
322    * If any of the animated property owners are disconnected from the stage while the animation is being played, then this action is performed.
323    * Default action is to BakeFinal.
324    * @SINCE_1_0.0
325    * @param[in] disconnectAction The disconnect action
326    */
327   void SetDisconnectAction( EndAction disconnectAction );
328
329   /**
330    * @brief Returns the disconnect action.
331    *
332    * @SINCE_1_0.0
333    * @return The disconnect action
334    */
335   EndAction GetDisconnectAction() const;
336
337   /**
338    * @brief Sets the default alpha function for an animation.
339    *
340    * This is applied to individual property animations, if no further alpha functions are supplied.
341    * @SINCE_1_0.0
342    * @param[in] alpha The default alpha function
343    */
344   void SetDefaultAlphaFunction(AlphaFunction alpha);
345
346   /**
347    * @brief Retrieves the default alpha function for an animation.
348    *
349    * @SINCE_1_0.0
350    * @return The default alpha function
351    */
352   AlphaFunction GetDefaultAlphaFunction() const;
353
354   /**
355    * @brief Sets the progress of the animation.
356    *
357    * The animation will play (or continue playing) from this point. The progress
358    * must be in the 0-1 interval or in the play range interval if defined ( See @ref Animation::SetPlayRange ),
359    * otherwise, it will be ignored.
360    *
361    * @SINCE_1_0.0
362    * @param[in] progress The new progress as a normalized value between [0,1]
363    * or between the play range if specified
364    */
365   void SetCurrentProgress( float progress );
366
367   /**
368   * @brief Retrieves the current progress of the animation.
369   *
370   * @SINCE_1_0.0
371   * @return The current progress as a normalized value between [0,1]
372   */
373   float GetCurrentProgress();
374
375   /**
376    * @brief Specifies a speed factor for the animation.
377    *
378    * The speed factor is a multiplier of the normal velocity of the animation. Values between [0,1] will
379    * slow down the animation and values above one will speed up the animation. It is also possible to specify a negative multiplier
380    * to play the animation in reverse.
381    *
382    * @SINCE_1_0.0
383    * @param[in] factor A value which will multiply the velocity
384    */
385   void SetSpeedFactor( float factor );
386
387   /**
388    * @brief Retrieves the speed factor of the animation.
389    *
390    * @SINCE_1_0.0
391    * @return Speed factor
392    */
393   float GetSpeedFactor() const;
394
395   /**
396    * @brief Sets the playing range.
397    *
398    * Animation will play between the values specified. Both values ( range.x and range.y ) should be between 0-1,
399    * otherwise they will be ignored. If the range provided is not in proper order ( minimum,maximum ), it will be reordered.
400    *
401    * @SINCE_1_0.0
402    * @param[in] range Two values between [0,1] to specify minimum and maximum progress. The
403    * animation will play between those values
404    */
405   void SetPlayRange( const Vector2& range );
406
407   /**
408    * @brief Gets the playing range.
409    *
410    * @SINCE_1_0.0
411    * @return The play range defined for the animation
412    */
413   Vector2 GetPlayRange() const;
414
415   /**
416    * @brief Play the animation.
417    * @SINCE_1_0.0
418    */
419   void Play();
420
421   /**
422    * @brief Plays the animation from a given point.
423    *
424    * The progress must be in the 0-1 interval or in the play range interval if defined ( See @ref Animation::SetPlayRange ),
425    * otherwise, it will be ignored.
426    *
427    * @SINCE_1_0.0
428    * @param[in] progress A value between [0,1], or between the play range if specified, from where the animation should start playing
429    */
430   void PlayFrom( float progress );
431
432   /**
433    * @brief Play the animation after a given delay time.
434    *
435    * The delay time is not included in the looping time.
436    * When the delay time is negative value, it would treat as play immediately.
437    * @SINCE_1_2.60
438    * @param[in] delaySeconds The delay time
439    */
440   void PlayAfter( float delaySeconds );
441
442   /**
443    * @brief Pauses the animation.
444    * @SINCE_1_0.0
445    */
446   void Pause();
447
448   /**
449    * @brief Queries the state of the animation.
450    * @SINCE_1_1.21
451    * @return The Animation::State
452    */
453   State GetState() const;
454
455   /**
456    * @brief Stops the animation.
457    * @SINCE_1_0.0
458    */
459   void Stop();
460
461   /**
462    * @brief Clears the animation.
463    *
464    * This disconnects any objects that were being animated, effectively stopping the animation.
465    * @SINCE_1_0.0
466    */
467   void Clear();
468
469   /**
470    * @brief Sets the looping mode.
471    *
472    * Animation plays forwards and then restarts from the beginning or runs backwards again.
473    * @SINCE_1_2.60
474    * @param[in] loopingMode The looping mode is one of RESTART and AUTO_REVERSE
475    */
476   void SetLoopingMode( LoopingMode loopingMode );
477
478   /**
479    * @brief Gets one of the current looping mode.
480    *
481    * @SINCE_1_2.60
482    * @return The current looping mode
483    */
484   LoopingMode GetLoopingMode() const;
485
486   /**
487    * @brief Connects to this signal to be notified when an Animation's animations have finished.
488    *
489    * @SINCE_1_0.0
490    * @return A signal object to connect with
491    */
492   AnimationSignalType& FinishedSignal();
493
494   /**
495    * @brief Animates a property value by a relative amount.
496    *
497    * The default alpha function will be used.
498    * The effect will start & end when the animation begins & ends.
499    * @SINCE_1_0.0
500    * @param[in] target The target object/property to animate
501    * @param[in] relativeValue The property value will change by this amount
502    */
503   void AnimateBy(Property target, Property::Value relativeValue);
504
505   /**
506    * @brief Animates a property value by a relative amount.
507    *
508    * The effect will start & end when the animation begins & ends.
509    * @SINCE_1_0.0
510    * @param[in] target The target object/property to animate
511    * @param[in] relativeValue The property value will change by this amount
512    * @param[in] alpha The alpha function to apply
513    */
514   void AnimateBy(Property target, Property::Value relativeValue, AlphaFunction alpha);
515
516   /**
517    * @brief Animates a property value by a relative amount.
518    *
519    * The default alpha function will be used.
520    * @SINCE_1_0.0
521    * @param[in] target The target object/property to animate
522    * @param[in] relativeValue The property value will increase/decrease by this amount
523    * @param[in] period The effect will occur during this time period
524    */
525   void AnimateBy(Property target, Property::Value relativeValue, TimePeriod period);
526
527   /**
528    * @brief Animates a property value by a relative amount.
529    *
530    * @SINCE_1_0.0
531    * @param[in] target The target object/property to animate
532    * @param[in] relativeValue The property value will increase/decrease by this amount
533    * @param[in] alpha The alpha function to apply
534    * @param[in] period The effect will occur during this time period
535    */
536   void AnimateBy(Property target, Property::Value relativeValue, AlphaFunction alpha, TimePeriod period);
537
538   /**
539    * @brief Animates a property to a destination value.
540    *
541    * The default alpha function will be used.
542    * The effect will start & end when the animation begins & ends.
543    * @SINCE_1_0.0
544    * @param[in] target The target object/property to animate
545    * @param[in] destinationValue The destination value
546    */
547   void AnimateTo(Property target, Property::Value destinationValue);
548
549   /**
550    * @brief Animates a property to a destination value.
551    *
552    * The effect will start & end when the animation begins & ends.
553    * @SINCE_1_0.0
554    * @param[in] target The target object/property to animate
555    * @param[in] destinationValue The destination value
556    * @param[in] alpha The alpha function to apply
557    */
558   void AnimateTo(Property target, Property::Value destinationValue, AlphaFunction alpha);
559
560   /**
561    * @brief Animates a property to a destination value.
562    *
563    * The default alpha function will be used.
564    * @SINCE_1_0.0
565    * @param[in] target The target object/property to animate
566    * @param[in] destinationValue The destination value
567    * @param[in] period The effect will occur during this time period
568    */
569   void AnimateTo(Property target, Property::Value destinationValue, TimePeriod period);
570
571   /**
572    * @brief Animates a property to a destination value.
573    *
574    * @SINCE_1_0.0
575    * @param[in] target The target object/property to animate
576    * @param[in] destinationValue The destination value
577    * @param[in] alpha The alpha function to apply
578    * @param[in] period The effect will occur during this time period
579    */
580   void AnimateTo(Property target, Property::Value destinationValue, AlphaFunction alpha, TimePeriod period);
581
582    /**
583    * @brief Animates a property between keyframes.
584    *
585    * @SINCE_1_0.0
586    * @param[in] target The target object property to animate
587    * @param[in] keyFrames The set of time/value pairs between which to animate
588    */
589   void AnimateBetween(Property target, KeyFrames& keyFrames);
590
591   /**
592    * @brief Animates a property between keyframes.
593    *
594    * @SINCE_1_0.0
595    * @param[in] target The target object property to animate
596    * @param[in] keyFrames The set of time/value pairs between which to animate
597    * @param[in] interpolation The method used to interpolate between values
598    */
599   void AnimateBetween(Property target, KeyFrames& keyFrames, Interpolation interpolation);
600
601   /**
602    * @brief Animates a property between keyframes.
603    *
604    * @SINCE_1_0.0
605    * @param[in] target The target object property to animate
606    * @param[in] keyFrames The set of time/value pairs between which to animate
607    * @param[in] alpha The alpha function to apply
608    */
609   void AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha);
610
611   /**
612    * @brief Animates a property between keyframes.
613    *
614    * @SINCE_1_0.0
615    * @param[in] target The target object property to animate
616    * @param[in] keyFrames The set of time/value pairs between which to animate
617    * @param[in] alpha The alpha function to apply
618    * @param[in] interpolation The method used to interpolate between values
619    */
620   void AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, Interpolation interpolation);
621
622   /**
623    * @brief Animates a property between keyframes.
624    *
625    * @SINCE_1_0.0
626    * @param[in] target The target object property to animate
627    * @param[in] keyFrames The set of time/value pairs between which to animate
628    * @param[in] period The effect will occur during this time period
629    */
630   void AnimateBetween(Property target, KeyFrames& keyFrames, TimePeriod period);
631
632   /**
633    * @brief Animates a property between keyframes.
634    *
635    * @SINCE_1_0.0
636    * @param[in] target The target object property to animate
637    * @param[in] keyFrames The set of time/value pairs between which to animate
638    * @param[in] period The effect will occur duing this time period
639    * @param[in] interpolation The method used to interpolate between values
640    */
641   void AnimateBetween(Property target, KeyFrames& keyFrames, TimePeriod period, Interpolation interpolation);
642
643   /**
644    * @brief Animates a property between keyframes.
645    *
646    * @SINCE_1_0.0
647    * @param[in] target The target object property to animate
648    * @param[in] keyFrames The set of time/value pairs between which to animate
649    * @param[in] alpha The alpha function to apply
650    * @param[in] period The effect will occur during this time period
651    */
652   void AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period);
653
654   /**
655    * @brief Animates a property between keyframes.
656    *
657    * @SINCE_1_0.0
658    * @param[in] target The target object property to animate
659    * @param[in] keyFrames The set of time/value pairs between which to animate
660    * @param[in] alpha The alpha function to apply to the overall progress
661    * @param[in] period The effect will occur duing this time period
662    * @param[in] interpolation The method used to interpolate between values
663    */
664   void AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation);
665
666
667   // Actor-specific convenience methods
668
669   /**
670    * @brief Animates an actor's position and orientation through a predefined path.
671    *
672    * The actor will rotate to orient the supplied
673    * forward vector with the path's tangent. If forward is the zero vector then no rotation will happen.
674    *
675    * @SINCE_1_0.0
676    * @param[in] actor The actor to animate
677    * @param[in] path The path. It defines position and orientation
678    * @param[in] forward The vector (in local space coordinate system) that will be oriented with the path's tangent direction
679    */
680   void Animate( Actor actor, Path path, const Vector3& forward );
681
682   /**
683    * @brief Animates an actor's position and orientation through a predefined path.
684    *
685    * The actor will rotate to orient the supplied
686    * forward vector with the path's tangent. If forward is the zero vector then no rotation will happen.
687    *
688    * @SINCE_1_0.0
689    * @param[in] actor The actor to animate
690    * @param[in] path The path. It defines position and orientation
691    * @param[in] forward The vector (in local space coordinate system) that will be oriented with the path's tangent direction
692    * @param[in] alpha The alpha function to apply
693    */
694   void Animate( Actor actor, Path path, const Vector3& forward, AlphaFunction alpha );
695
696   /**
697    * @brief Animates an actor's position and orientation through a predefined path.
698    *
699    * The actor will rotate to orient the supplied
700    * forward vector with the path's tangent. If forward is the zero vector then no rotation will happen.
701    *
702    * @SINCE_1_0.0
703    * @param[in] actor The actor to animate
704    * @param[in] path The path. It defines position and orientation
705    * @param[in] forward The vector (in local space coordinate system) that will be oriented with the path's tangent direction
706    * @param[in] period The effect will occur during this time period
707    */
708   void Animate( Actor actor, Path path, const Vector3& forward, TimePeriod period );
709
710   /**
711    * @brief Animates an actor's position and orientation through a predefined path.
712    *
713    * The actor will rotate to orient the supplied
714    * forward vector with the path's tangent. If forward is the zero vector then no rotation will happen.
715    *
716    * @SINCE_1_0.0
717    * @param[in] actor The actor to animate
718    * @param[in] path The path. It defines position and orientation
719    * @param[in] forward The vector (in local space coordinate system) that will be oriented with the path's tangent direction
720    * @param[in] alpha The alpha function to apply
721    * @param[in] period The effect will occur during this time period
722    */
723   void Animate( Actor actor, Path path, const Vector3& forward, AlphaFunction alpha, TimePeriod period);
724
725   /**
726    * @brief Shows an actor during the animation.
727    *
728    * @SINCE_1_0.0
729    * @param[in] actor The actor to animate
730    * @param[in] delaySeconds The initial delay from the start of the animation
731    */
732   void Show(Actor actor, float delaySeconds);
733
734   /**
735    * @brief Hides an actor during the animation.
736    *
737    * @SINCE_1_0.0
738    * @param[in] actor The actor to animate
739    * @param[in] delaySeconds The initial delay from the start of the animation
740    */
741   void Hide(Actor actor, float delaySeconds);
742
743 public: // Not intended for use by Application developers
744
745   /// @cond internal
746   /**
747    * @brief This constructor is used by Animation::New() methods.
748    * @SINCE_1_0.0
749    * @param[in] animation A pointer to a newly allocated Dali resource
750    */
751   explicit DALI_INTERNAL Animation(Internal::Animation* animation);
752   /// @endcond
753
754 };
755
756 /**
757  * @}
758  */
759 } // namespace Dali
760
761 #endif // DALI_ANIMATION_H