Merge remote-tracking branch 'origin/tizen' into new_text
[platform/core/uifw/dali-core.git] / dali / internal / event / animation / animation-impl.h
1 #ifndef __DALI_INTERNAL_ANIMATION_H__
2 #define __DALI_INTERNAL_ANIMATION_H__
3
4 /*
5  * Copyright (c) 2014 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/common/vector-wrapper.h>
23 #include <dali/public-api/object/ref-object.h>
24 #include <dali/public-api/animation/animation.h>
25 #include <dali/public-api/object/base-object.h>
26 #include <dali/internal/event/animation/animator-connector-base.h>
27 #include <dali/internal/event/animation/key-frames-impl.h>
28 #include <dali/internal/event/animation/path-impl.h>
29
30 namespace Dali
31 {
32
33 namespace Internal
34 {
35
36 namespace SceneGraph
37 {
38 class Animation;
39 class UpdateManager;
40 }
41
42 class Actor;
43 class Animation;
44 class AnimationPlaylist;
45 class ProxyObject;
46 class ShaderEffect;
47
48 typedef IntrusivePtr<Animation> AnimationPtr;
49 typedef std::vector<AnimationPtr> AnimationContainer;
50
51 typedef AnimationContainer::iterator AnimationIter;
52 typedef AnimationContainer::const_iterator AnimationConstIter;
53
54 /**
55  * Animation is a proxy for a SceneGraph::Animation object.
56  * The UpdateManager owns the Animation object, but the lifetime of the animation is
57  * indirectly controlled by the Animation.
58  */
59 class Animation : public BaseObject
60 {
61 public:
62
63   typedef Dali::Animation::EndAction EndAction;
64   typedef Dali::Animation::Interpolation Interpolation;
65
66   typedef void (*FinishedCallback)(Object* object);
67
68   /**
69    * Create a new Animation object.
70    * @param[in] durationSeconds The duration of the animation.
71    * @return A smart-pointer to the newly allocated Animation.
72    */
73   static AnimationPtr New(float durationSeconds);
74
75   /**
76    * @copydoc Dali::Animation::SetDuration()
77    */
78   void SetDuration(float seconds);
79
80   /**
81    * @copydoc Dali::Animation::GetDuration()
82    */
83   float GetDuration() const;
84
85   /**
86    * @copydoc Dali::Animation::SetLooping()
87    */
88   void SetLooping(bool looping);
89
90   /**
91    * @copydoc Dali::Animation::IsLooping()
92    */
93   bool IsLooping() const;
94
95   /**
96    * @copydoc Dali::Animation::SetEndAction()
97    */
98   void SetEndAction(EndAction action);
99
100   /**
101    * @copydoc Dali::Animation::GetEndAction()
102    */
103   EndAction GetEndAction() const;
104
105   /**
106    * @copydoc Dali::Animation::SetDisconnectAction()
107    */
108   void SetDisconnectAction(EndAction action);
109
110   /**
111    * @copydoc Dali::Animation::GetDisconnectAction()
112    */
113   EndAction GetDisconnectAction() const;
114
115   /**
116    * @copydoc Dali::Animation::SetDefaultAlphaFunction()
117    */
118   void SetDefaultAlphaFunction(AlphaFunction alpha)
119   {
120     mDefaultAlpha = alpha;
121   }
122
123   /**
124    * @copydoc Dali::Animation::GetDefaultAlphaFunction()
125    */
126   AlphaFunction GetDefaultAlphaFunction() const
127   {
128     return mDefaultAlpha;
129   }
130
131   /**
132    * @copydoc Dali::Animation::Play()
133    */
134   void Play();
135
136   /**
137    * @copydoc Dali::Animation::PlayFrom()
138    */
139   void PlayFrom( float progress );
140
141   /**
142    * @copydoc Dali::Animation::Pause()
143    */
144   void Pause();
145
146   /**
147    * @copydoc Dali::Animation::Stop()
148    */
149   void Stop();
150
151   /**
152    * @copydoc Dali::Animation::Clear()
153    */
154   void Clear();
155
156   /**
157    * Query whether a Finished signal should be emitted for this animation.
158    * This should only be called by NotificationManager, before signals are emitted.
159    * @post HasFinished() will return false on subsequent calls, until the animation is replayed to completion.
160    */
161   bool HasFinished();
162
163   /**
164    * @copydoc Dali::Animation::FinishedSignal()
165    */
166   Dali::Animation::AnimationSignalV2& FinishedSignal();
167
168   /**
169    * Emit the Finished signal
170    */
171   void EmitSignalFinish();
172
173   /**
174    * Connects a callback function with the object's signals.
175    * @param[in] object The object providing the signal.
176    * @param[in] tracker Used to disconnect the signal.
177    * @param[in] signalName The signal to connect to.
178    * @param[in] functor A newly allocated FunctorDelegate.
179    * @return True if the signal was connected.
180    * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
181    */
182   static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
183
184   /**
185    * Performs actions as requested using the action name.
186    * @param[in] object The object on which to perform the action.
187    * @param[in] actionName The action to perform.
188    * @param[in] attributes The attributes with which to perfrom this action.
189    * @return true if action was done
190    */
191   static bool DoAction(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes);
192
193   /**
194    * This callback is intended for internal use only, to avoid the overhead of using a signal.
195    * @param[in] callback The callback function to connect.
196    * @param[in] object The internal object requesting the callback, or NULL.
197    */
198   void SetFinishedCallback( FinishedCallback callback, Object* object );
199
200   /**
201    * @copydoc Dali::Animation::AnimateBy(Property target, Property::Value relativeValue)
202    */
203   void AnimateBy(Property& target, Property::Value& relativeValue);
204
205   /**
206    * @copydoc Dali::Animation::AnimateBy(Property target, Property::Value relativeValue, AlphaFunction alpha)
207    */
208   void AnimateBy(Property& target, Property::Value& relativeValue, AlphaFunction alpha);
209
210   /**
211    * @copydoc Dali::Animation::AnimateBy(Property target, Property::Value relativeValue, TimePeriod period)
212    */
213   void AnimateBy(Property& target, Property::Value& relativeValue, TimePeriod period);
214
215   /**
216    * @copydoc Dali::Animation::AnimateBy(Property target, Property::Value relativeValue, AlphaFunction alpha, TimePeriod period)
217    */
218   void AnimateBy(Property& target, Property::Value& relativeValue, AlphaFunction alpha, TimePeriod period);
219
220   /**
221    * @copydoc Dali::Animation::AnimateTo(Property target, Property::Value destinationValue)
222    */
223   void AnimateTo(Property& target, Property::Value& destinationValue);
224
225   /**
226    * @copydoc Dali::Animation::AnimateTo(Property target, Property::Value destinationValue, AlphaFunction alpha)
227    */
228   void AnimateTo(Property& target, Property::Value& destinationValue, AlphaFunction alpha);
229
230   /**
231    * @copydoc Dali::Animation::AnimateTo(Property target, Property::Value destinationValue, TimePeriod period)
232    */
233   void AnimateTo(Property& target, Property::Value& destinationValue, TimePeriod period);
234
235   /**
236    * @copydoc Dali::Animation::AnimateTo(Property target, Property::Value destinationValue, AlphaFunction alpha, TimePeriod period)
237    */
238   void AnimateTo(Property& target, Property::Value& destinationValue, AlphaFunction alpha, TimePeriod period);
239
240   /**
241    * Animate a property to a destination value.
242    * @param [in] targetObject The target object to animate.
243    * @param [in] targetPropertyIndex The index of the target property.
244    * @param [in] componentIndex Index to a sub component of a property, for use with Vector2, Vector3 and Vector4
245    * @param [in] destinationValue The destination value.
246    * @param [in] alpha The alpha function to apply.
247    * @param [in] period The effect will occur during this time period.
248    */
249   void AnimateTo(ProxyObject& targetObject, Property::Index targetPropertyIndex, int componentIndex, Property::Value& destinationValue, AlphaFunction alpha, TimePeriod period);
250
251   /**
252    * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames)
253    */
254   void AnimateBetween(Property target, const KeyFrames& keyFrames);
255
256   /**
257    * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, Interpolation interpolation)
258    */
259   void AnimateBetween(Property target, const KeyFrames& keyFrames, Interpolation interpolation );
260
261   /**
262    * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, TimePeriod period)
263    */
264   void AnimateBetween(Property target, const KeyFrames& keyFrames, TimePeriod period);
265
266   /**
267    * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, TimePeriod period, Interpolation interpolation)
268    */
269   void AnimateBetween(Property target, const KeyFrames& keyFrames, TimePeriod period, Interpolation interpolation);
270
271   /**
272    * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha)
273    */
274   void AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha);
275
276   /**
277    * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, Interpolation interpolation)
278    */
279   void AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha, Interpolation interpolation);
280
281   /**
282    * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period)
283    */
284   void AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period);
285
286   /**
287    * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation )
288    */
289   void AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation );
290
291   // Actor-specific convenience functions
292
293   /**
294    * @copydoc Dali::Animation::Animate( Actor actor, Path path, const Vector3& forward )
295    */
296   void Animate( Actor& actor, const Path& path, const Vector3& forward );
297
298   /**
299    * @copydoc Dali::Animation::Animate( Actor actor, Path path, const Vector3& forward, AlphaFunction alpha )
300    */
301   void Animate( Actor& actor, const Path& path, const Vector3& forward, AlphaFunction alpha );
302
303   /**
304    * @copydoc Dali::Animation::Animate( Actor actor, Path path, const Vector3& forward, TimePeriod period )
305    */
306   void Animate( Actor& actor, const Path& path, const Vector3& forward, TimePeriod period );
307
308   /**
309    * @copydoc Dali::Animation::Animate( Actor actor, Path path, const Vector3& forward, AlphaFunction alpha, TimePeriod period)
310    */
311   void Animate( Actor& actor, const Path& path, const Vector3& forward, AlphaFunction alpha, TimePeriod period);
312
313   /**
314    * @copydoc Dali::Animation::MoveBy(Actor actor, float x, float y, float z)
315    */
316   void MoveBy(Actor& actor, float x, float y, float z);
317
318   /**
319    * @copydoc Dali::Animation::MoveBy(Actor actor, Vector3 displacement, AlphaFunction alpha)
320    */
321   void MoveBy(Actor& actor, const Vector3& translation, AlphaFunction alpha);
322
323   /**
324    * @copydoc Dali::Animation::MoveBy(Actor actor, Vector3 displacement, AlphaFunction alpha, float delaySeconds, float durationSeconds)
325    */
326   void MoveBy(Actor& actor, const Vector3& translation, AlphaFunction alpha, float delaySeconds, float durationSeconds);
327
328   /**
329    * @copydoc Dali::Animation::MoveTo(Actor actor, float x, float y, float z)
330    */
331   void MoveTo(Actor& actor, float x, float y, float z);
332
333   /**
334    * @copydoc Dali::Animation::MoveTo(Actor actor, Vector3 position, AlphaFunction alpha)
335    */
336   void MoveTo(Actor& actor, const Vector3& translation, AlphaFunction alpha);
337
338   /**
339    * @copydoc Dali::Animation::MoveTo(Actor actor, Vector3 position, AlphaFunction alpha, float delaySeconds, float durationSeconds)
340    */
341   void MoveTo(Actor& actor, const Vector3& translation, AlphaFunction alpha,  float delaySeconds, float durationSeconds);
342
343   /**
344    * @copydoc Dali::Animation::RotateBy(Actor actor, Radian angle, Vector3 axis)
345    */
346   void RotateBy(Actor& actor, Radian angle, const Vector3& axis);
347
348   /**
349    * @copydoc Dali::Animation::RotateBy(Actor actor, Radian angle, Vector3 axis, AlphaFunction alpha)()
350    */
351   void RotateBy(Actor& actor, Radian angle, const Vector3& axis, AlphaFunction alpha);
352
353   /**
354    * @copydoc Dali::Animation::RotateBy(Actor actor, Radian angle, Vector3 axis, AlphaFunction alpha, float delaySeconds, float durationSeconds)
355    */
356   void RotateBy(Actor& actor, Radian angle, const Vector3& axis, AlphaFunction alpha, float delaySeconds, float durationSeconds);
357
358   /**
359    * @copydoc Dali::Animation::RotateTo(Actor actor, Radian angle, Vector3 axis)
360    */
361   void RotateTo(Actor& actor, Radian angle, const Vector3& axis);
362
363   /**
364    * @copydoc Dali::Animation::RotateTo(Actor actor, Quaternion orientation)
365    */
366   void RotateTo(Actor& actor, const Quaternion& orientation);
367
368   /**
369    * @copydoc Dali::Animation::RotateTo(Actor actor, Radian angle, Vector3 axis, AlphaFunction alpha)
370    */
371   void RotateTo(Actor& actor, Radian angle, const Vector3& axis, AlphaFunction alpha);
372
373   /**
374    * @copydoc Dali::Animation::RotateTo(Actor actor, Quaternion orientation, AlphaFunction alpha)
375    */
376   void RotateTo(Actor& actor, const Quaternion& orientation, AlphaFunction alpha);
377
378   /**
379    * @copydoc Dali::Animation::RotateTo(Actor actor, Quaternion orientation, AlphaFunction alpha, float delaySeconds, float durationSeconds)
380    */
381   void RotateTo(Actor& actor, const Quaternion& orientation, AlphaFunction alpha, float delaySeconds, float durationSeconds);
382
383   /**
384    * @copydoc Dali::Animation::RotateTo(Actor actor, Radian angle, Vector3 axis, AlphaFunction alpha, float delaySeconds, float durationSeconds)()
385    */
386   void RotateTo(Actor& actor, Radian angle, const Vector3& axis, AlphaFunction alpha, float delaySeconds, float durationSeconds);
387
388   /**
389    * @copydoc Dali::Animation::ScaleBy(Actor actor, float x, float y, float z)()
390    */
391   void ScaleBy(Actor& actor, float x, float y, float z);
392
393   /**
394    * @copydoc Dali::Animation::ScaleBy(Actor actor, Vector3 scale, AlphaFunction alpha)
395    */
396   void ScaleBy(Actor& actor, const Vector3& scale, AlphaFunction alpha);
397
398   /**
399    * @copydoc Dali::Animation::ScaleBy(Actor actor, Vector3 scale, AlphaFunction alpha, float delaySeconds, float durationSeconds)
400    */
401   void ScaleBy(Actor& actor, const Vector3& scale, AlphaFunction alpha, float delaySeconds, float durationSeconds);
402
403   /**
404    * @copydoc Dali::Animation::ScaleTo(Actor actor, float x, float y, float z)
405    */
406   void ScaleTo(Actor& actor, float x, float y, float z);
407
408   /**
409    * @copydoc Dali::Animation::ScaleTo(Actor actor, Vector3 scale, AlphaFunction alpha)
410    */
411   void ScaleTo(Actor& actor, const Vector3& scale, AlphaFunction alpha);
412
413   /**
414    * @copydoc Dali::Animation::ScaleTo(Actor actor, Vector3 scale, AlphaFunction alpha, float delaySeconds, float durationSeconds)
415    */
416   void ScaleTo(Actor& actor, const Vector3& scale, AlphaFunction alpha, float delaySeconds, float durationSeconds);
417
418   /**
419    * @copydoc Dali::Animation::Show()
420    */
421   void Show(Actor& actor, float delaySeconds);
422
423   /**
424    * @copydoc Dali::Animation::Hide()
425    */
426   void Hide(Actor& actor, float delaySeconds);
427
428   /**
429    * @copydoc Dali::Animation::OpacityBy(Actor actor, float opacity)
430    */
431   void OpacityBy(Actor& actor, float opacity);
432
433   /**
434    * @copydoc Dali::Animation::OpacityBy(Actor actor, float opacity, AlphaFunction alpha)
435    */
436   void OpacityBy(Actor& actor, float opacity, AlphaFunction alpha);
437
438   /**
439    * @copydoc Dali::Animation::OpacityBy(Actor actor, float opacity, AlphaFunction alpha, float delaySeconds, float durationSeconds)()
440    */
441   void OpacityBy(Actor& actor, float opacity, AlphaFunction alpha, float delaySeconds, float durationSeconds);
442
443   /**
444    * @copydoc Dali::Animation::OpacityTo(Actor actor, float opacity)
445    */
446   void OpacityTo(Actor& actor, float opacity);
447
448   /**
449    * @copydoc Dali::Animation::OpacityTo(Actor actor, float opacity, AlphaFunction alpha)
450    */
451   void OpacityTo(Actor& actor, float opacity, AlphaFunction alpha);
452
453   /**
454    * @copydoc Dali::Animation::OpacityTo(Actor actor, float opacity, AlphaFunction alpha, float delaySeconds, float durationSeconds)
455    */
456   void OpacityTo(Actor& actor, float opacity, AlphaFunction alpha, float delaySeconds, float durationSeconds);
457
458   /**
459    * @copydoc Dali::Animation::ColorBy(Actor actor, Vector4 color)
460    */
461   void ColorBy(Actor& actor, const Vector4& color);
462
463   /**
464    * @copydoc Dali::Animation::ColorBy(Actor actor, Vector4 color, AlphaFunction alpha)
465    */
466   void ColorBy(Actor& actor, const Vector4& color, AlphaFunction alpha);
467
468   /**
469    * @copydoc Dali::Animation::ColorBy(Actor actor, Vector4 color, AlphaFunction alpha, float delaySeconds, float durationSeconds)
470    */
471   void ColorBy(Actor& actor, const Vector4& color, AlphaFunction alpha, float delaySeconds, float durationSeconds);
472
473   /**
474    * @copydoc Dali::Animation::ColorTo(Actor actor, Vector4 color)
475    */
476   void ColorTo(Actor& actor, const Vector4& color);
477
478   /**
479    * @copydoc Dali::Animation::ColorTo(Actor actor, Vector4 color, AlphaFunction alpha)
480    */
481   void ColorTo(Actor& actor, const Vector4& color, AlphaFunction alpha);
482
483   /**
484    * @copydoc Dali::Animation::ColorTo(Actor actor, Vector4 color, AlphaFunction alpha, float delaySeconds, float durationSeconds)
485    */
486   void ColorTo(Actor& actor, const Vector4& color, AlphaFunction alpha, float delaySeconds, float durationSeconds);
487
488   /**
489    * @copydoc Dali::Animation::Resize(Actor actor, float width, float height)
490    */
491   void Resize(Actor& actor, float width, float height);
492
493   /**
494    * @copydoc Dali::Animation::Resize(Actor actor, float width, float height, AlphaFunction alpha)
495    */
496   void Resize(Actor& actor, float width, float height, AlphaFunction alpha);
497
498   /**
499    * @copydoc Dali::Animation::Resize(Actor actor, float width, float height, AlphaFunction alpha, float delaySeconds, float durationSeconds)
500    */
501   void Resize(Actor& actor, float width, float height, AlphaFunction alpha, float delaySeconds, float durationSeconds);
502
503   /**
504    * @copydoc Dali::Animation::Resize(Actor actor, Vector3 size)
505    */
506   void Resize(Actor& actor, const Vector3& size);
507
508   /**
509    * @copydoc Dali::Animation::Resize(Actor actor, Vector3 size, AlphaFunction alpha)
510    */
511   void Resize(Actor& actor, const Vector3& size, AlphaFunction alpha);
512
513   /**
514    * @copydoc Dali::Animation::Resize(Actor actor, Vector3 size, AlphaFunction alpha, float delaySeconds, float durationSeconds)
515    */
516   void Resize(Actor& actor, const Vector3& size, AlphaFunction alpha, float delaySeconds, float durationSeconds);
517
518   /*
519    * @copydoc Dali::Animation::SetCurrentProgress()
520    */
521   void SetCurrentProgress(float progress);
522
523   /*
524    * @copydoc Dali::Animation::GetCurrentProgress()
525    */
526   float GetCurrentProgress();
527
528   /*
529    * @copydoc Dali::Animation::SetSpeedFactor()
530    */
531   void SetSpeedFactor( float factor );
532
533   /*
534    * @copydoc Dali::Animation::GetSpeedFactor()
535    */
536   float GetSpeedFactor() const;
537
538   /*
539    * @copydoc Dali::Animation::SetPlayRange()
540    */
541   void SetPlayRange( const Vector2& range );
542
543   /*
544    * @copydoc Dali::Animation::GetPlayRange
545    */
546   Vector2 GetPlayRange() const;
547
548 public: // For connecting animators to animations
549
550   /**
551    * Add an animator connector.
552    * @param[in] connector The animator connector.
553    */
554   void AddAnimatorConnector( AnimatorConnectorBase* connector );
555
556   /**
557    * Retrieve the SceneGraph::Animation object.
558    * @return The animation.
559    */
560   const SceneGraph::Animation* GetSceneObject()
561   {
562     return mAnimation;
563   }
564
565   /**
566    * Retrieve the UpdateManager associated with this animation.
567    * @return The UpdateManager.
568    */
569   SceneGraph::UpdateManager& GetUpdateManager()
570   {
571     return mUpdateManager;
572   }
573
574 protected:
575
576   /**
577    * Construct a new Animation.
578    * @param[in] updateManager The UpdateManager associated with this animation.
579    * @param[in] playlist The list of currently playing animations.
580    * @param[in] durationSeconds The duration of the animation in seconds.
581    * @param[in] endAction The action to perform when the animation ends.
582    * @param[in] disconnectAction The action to perform when the property owner of an animator is disconnected.
583    * @param[in] defaultAlpha The default alpha function to apply to animators.
584    */
585   Animation( SceneGraph::UpdateManager& updateManager,
586              AnimationPlaylist& playlist,
587              float durationSeconds,
588              EndAction endAction,
589              EndAction disconnectAction,
590              AlphaFunction defaultAlpha);
591
592   /**
593    * Second-phase constructor.
594    */
595   void Initialize();
596
597   /**
598    * Helper to create a scene-graph animation
599    */
600   void CreateSceneObject();
601
602   /**
603    * Helper to create a scene-graph animation
604    */
605   void DestroySceneObject();
606
607   /**
608    * A reference counted object may only be deleted by calling Unreference()
609    */
610   virtual ~Animation();
611
612 private:
613
614   /**
615    * Extends the duration when an animator is added with TimePeriod that exceeds current duration.
616    * @param[in] timePeriod The time period for an animator.
617    */
618   void ExtendDuration( const TimePeriod& timePeriod );
619
620   // Undefined
621   Animation(const Animation&);
622
623   // Undefined
624   Animation& operator=(const Animation& rhs);
625
626 private:
627
628   SceneGraph::UpdateManager& mUpdateManager;
629   AnimationPlaylist& mPlaylist;
630
631   const SceneGraph::Animation* mAnimation;
632
633   int mNotificationCount; ///< Keep track of how many Finished signals have been emitted.
634
635   Dali::Animation::AnimationSignalV2 mFinishedSignal;
636
637   FinishedCallback mFinishedCallback;
638   Object* mFinishedCallbackObject;
639
640   AnimatorConnectorContainer mConnectors; ///< Owned by the Animation
641
642   // Cached for public getters
643   float mDurationSeconds;
644   float mSpeedFactor;
645   bool mIsLooping;
646   Vector2 mPlayRange;
647   EndAction mEndAction;
648   EndAction mDisconnectAction;
649   AlphaFunction mDefaultAlpha;
650
651 };
652
653 } // namespace Internal
654
655 // Helpers for public-api forwarding methods
656
657 inline Internal::Animation& GetImplementation(Dali::Animation& animation)
658 {
659   DALI_ASSERT_ALWAYS( animation && "Animation handle is empty" );
660
661   BaseObject& handle = animation.GetBaseObject();
662
663   return static_cast<Internal::Animation&>(handle);
664 }
665
666 inline const Internal::Animation& GetImplementation(const Dali::Animation& animation)
667 {
668   DALI_ASSERT_ALWAYS( animation && "Animation handle is empty" );
669
670   const BaseObject& handle = animation.GetBaseObject();
671
672   return static_cast<const Internal::Animation&>(handle);
673 }
674
675 } // namespace Dali
676
677 #endif // __DALI_INTERNAL_ANIMATION_H__