Merge "[Multimedia] Replaced the type of the buffer of MediaPacket with the common...
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Animation.cs
1 // Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15 //
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 // Some have been manually changed
18
19 namespace Tizen.NUI
20 {
21
22     using System;
23     using System.Runtime.InteropServices;
24     using Tizen.NUI.BaseComponents;
25
26     /// <summary>
27     /// Animation can be used to animate the properties of any number of objects, typically view.<br>
28     /// If the "Finished" event is connected to a member function of an object, it must be disconnected before the object is destroyed.<br>
29     /// This is typically done in the object destructor, and requires either the animation handle to be stored.<br>
30     /// The overall animation time is superseded by the values given in the animation time used when calling the AnimateTo(), AnimateBy(), AnimateBetween() and AnimatePath() methods.<br>
31     /// If any of the individual calls to those functions exceeds the overall animation time (Duration), then the overall animation time is automatically extended.<br>
32     /// </summary>
33     public class Animation : BaseHandle
34     {
35         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
36
37         internal Animation(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Animation_SWIGUpcast(cPtr), cMemoryOwn)
38         {
39             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
40         }
41
42         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Animation obj)
43         {
44             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
45         }
46
47         /// <summary>
48         /// To make animation instance be disposed.
49         /// </summary>
50         protected override void Dispose(DisposeTypes type)
51         {
52             if(disposed)
53             {
54                 return;
55             }
56             if(type == DisposeTypes.Explicit)
57             {
58                 //Called by User
59                 //Release your own managed resources here.
60                 //You should release all of your own disposable objects here.
61
62             }
63             else if(type == DisposeTypes.Implicit)
64             {
65
66             }
67
68             if (_animationFinishedEventCallback != null)
69             {
70                 FinishedSignal().Disconnect(_animationFinishedEventCallback);
71             }
72
73             if (_animationProgressReachedEventCallback != null)
74             {
75
76                 ProgressReachedSignal().Disconnect(_animationProgressReachedEventCallback);
77             }
78
79             if(this)
80             {
81                 this.Clear();
82                 this.Reset();
83                 NUILog.Error("Now Animation is playing! Clear and Reset here!");
84                 //throw new System.InvalidOperationException("Animation Instance should not be disposed until getting Finished event. Should be a global variable");
85             }
86
87             //Release your own unmanaged resources here.
88             //You should not access any managed member here except static instance.
89             //because the execution order of Finalizes is non-deterministic.
90
91             if (swigCPtr.Handle != global::System.IntPtr.Zero)
92             {
93                 if (swigCMemOwn)
94                 {
95                     swigCMemOwn = false;
96                     NDalicPINVOKE.delete_Animation(swigCPtr);
97                 }
98                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
99             }
100
101             base.Dispose(type);
102         }
103
104         /// <summary>
105         /// Creates an initialized animation.<br>
106         /// The animation will not loop.<br>
107         /// The default end action is "Cancel".<br>
108         /// The default alpha function is linear.<br>
109         /// </summary>
110         /// <remarks>DurationmSeconds must be greater than zero.</remarks>
111         /// <param name="durationMilliSeconds">The duration in milliseconds.</param>
112         public Animation(int durationMilliSeconds) : this(NDalicPINVOKE.Animation_New((float)durationMilliSeconds / 1000.0f), true)
113         {
114             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
115         }
116
117         private AnimationFinishedEventCallbackType _animationFinishedEventCallback;
118         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
119         private delegate void AnimationFinishedEventCallbackType(IntPtr data);
120         private event EventHandler _animationFinishedEventHandler;
121         /**
122         * @brief Event for the finished signal which can be used to subscribe or unsubscribe the event handler.
123         * The finished signal is emitted when an animation's animations have finished.
124         */
125         public event EventHandler Finished
126         {
127             add
128             {
129                 if (_animationFinishedEventHandler == null)
130                 {
131                     NUILog.Debug("[add before]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
132                     _animationFinishedEventCallback = OnFinished;
133                     FinishedSignal().Connect(_animationFinishedEventCallback);
134                     NUILog.Debug("[add after]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
135                 }
136                 _animationFinishedEventHandler += value;
137             }
138             remove
139             {
140                 _animationFinishedEventHandler -= value;
141
142                 if (_animationFinishedEventHandler == null && FinishedSignal().Empty() == false)
143                 {
144                     NUILog.Debug("[remove before]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
145                     FinishedSignal().Disconnect(_animationFinishedEventCallback);
146                     NUILog.Debug("[remove after]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
147                 }
148             }
149         }
150         private void OnFinished(IntPtr data)
151         {
152             if (_animationFinishedEventHandler != null)
153             {
154                 //here we send all data to user event handlers
155                 _animationFinishedEventHandler(this, null);
156             }
157         }
158
159         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
160         private delegate void AnimationProgressReachedEventCallbackType(IntPtr data);
161         private AnimationProgressReachedEventCallbackType _animationProgressReachedEventCallback;
162         private event EventHandler _animationProgressReachedEventHandler;
163         /**
164         * @brief Event for the ProgressReached signal, which can be used to subscribe or unsubscribe the event handler.
165         * The ProgressReached signal is emitted when the animation has reached a given progress percentage, this is set in the api SetProgressNotification.
166         */
167         public event EventHandler ProgressReached
168         {
169             add
170             {
171                 if (_animationProgressReachedEventHandler == null)
172                 {
173                     NUILog.Debug("[add before]ProgressReachedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
174                     _animationProgressReachedEventCallback = OnProgressReached;
175                     ProgressReachedSignal().Connect(_animationProgressReachedEventCallback);
176                     NUILog.Debug("[add after]ProgressReachedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
177                 }
178
179                 _animationProgressReachedEventHandler += value;
180             }
181             remove
182             {
183                 _animationProgressReachedEventHandler -= value;
184
185                 if (_animationProgressReachedEventHandler == null && ProgressReachedSignal().Empty() == false)
186                 {
187                     NUILog.Debug("[remove before]ProgressReachedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
188                     ProgressReachedSignal().Disconnect(_animationProgressReachedEventCallback);
189                     NUILog.Debug("[remove after]ProgressReachedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
190                 }
191             }
192         }
193         private void OnProgressReached(IntPtr data)
194         {
195             if (_animationProgressReachedEventHandler != null)
196             {
197                 //here we send all data to user event handlers
198                 _animationProgressReachedEventHandler(this, null);
199             }
200         }
201
202         private float MilliSecondsToSeconds(int millisec)
203         {
204             return (float)millisec / 1000.0f;
205         }
206
207         private int SecondsToMilliSeconds(float sec)
208         {
209             return (int)(sec * 1000);
210         }
211
212
213         /// <summary>
214         /// Gets or sets the duration in milliseconds of the animation.
215         /// </summary>
216         public int Duration
217         {
218             set
219             {
220                 SetDuration(MilliSecondsToSeconds(value));
221             }
222             get
223             {
224                 return SecondsToMilliSeconds(GetDuration());
225             }
226         }
227
228         /// <summary>
229         ///  Gets or sets the default alpha function for the animation.
230         /// </summary>
231         public AlphaFunction DefaultAlphaFunction
232         {
233             set
234             {
235                 SetDefaultAlphaFunction(value);
236             }
237             get
238             {
239                 AlphaFunction ret = GetDefaultAlphaFunction();
240                 return ret;
241             }
242         }
243
244         /// <summary>
245         /// Queries the state of the animation.
246         /// </summary>
247         public States State
248         {
249             get
250             {
251                 return GetState();
252             }
253         }
254
255         /// <summary>
256         /// Set: Enables looping for 'count' repeats. A zero is the same as Looping = true; i.e., repeat forever.<br>
257         /// If Play() Stop() or 'count' loops is reached, the loop counter will reset.<br>
258         /// Setting this parameter does not cause the animation to Play().<br>
259         /// Get: Gets the loop count. A zero is the same as Looping = true; i.e., repeat forever.<br>
260         /// The loop count is initially 1 for play once.<br>
261         /// </summary>
262         public int LoopCount
263         {
264             set
265             {
266                 SetLoopCount(value);
267             }
268             get
269             {
270                 int ret = GetLoopCount();
271                 return ret;
272             }
273         }
274
275         /// <summary>
276         /// Gets or sets the status of whether the animation will loop.<br>
277         /// This property resets the loop count and should not be used with the LoopCount property.<br>
278         /// Setting this parameter does not cause the animation to Play().<br>
279         /// </summary>
280         public bool Looping
281         {
282             set
283             {
284                 SetLooping(value);
285             }
286             get
287             {
288                 bool ret = IsLooping();
289                 return ret;
290             }
291         }
292
293
294         /// <summary>
295         /// Gets or sets the end action of the animation.<br>
296         /// This action is performed when the animation ends or if it is stopped.<br>
297         /// The default end action is cancel.<br>
298         /// </summary>
299         public EndActions EndAction
300         {
301             set
302             {
303                 SetEndAction(value);
304             }
305             get
306             {
307                 return GetEndAction();
308             }
309         }
310
311
312         /// <summary>
313         /// Stops the animation.
314         /// </summary>
315         /// <param name="action">The end action can be set.</param>
316         public void Stop(EndActions action = EndActions.Cancel)
317         {
318             SetEndAction(action);
319             NDalicPINVOKE.Animation_Stop(swigCPtr);
320             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
321         }
322
323         /// <summary>
324         /// Gets the current loop count.<br>
325         /// A value 0 indicating the current loop count when looping.<br>
326         /// </summary>
327         public int CurrentLoop
328         {
329             get
330             {
331                 return GetCurrentLoop();
332             }
333         }
334
335         /// <summary>
336         /// Gets or sets the disconnect action.<br>
337         /// If any of the animated property owners are disconnected from the stage while the animation is being played, then this action is performed.<br>
338         /// The default action is cancel.<br>
339         /// </summary>
340         public EndActions DisconnectAction
341         {
342             set
343             {
344                 NDalicPINVOKE.Animation_SetDisconnectAction(swigCPtr, (int)value);
345                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
346             }
347             get
348             {
349                 Animation.EndActions ret = (Animation.EndActions)NDalicPINVOKE.Animation_GetDisconnectAction(swigCPtr);
350                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
351                 return ret;
352             }
353         }
354
355
356         /// <summary>
357         /// Gets or sets the progress of the animation.<br>
358         /// The animation will play (or continue playing) from this point.<br>
359         /// The progress must be in the 0-1 interval or in the play range interval if defined<br>
360         /// otherwise, it will be ignored.<br>
361         /// </summary>
362         public float CurrentProgress
363         {
364             set
365             {
366                 NDalicPINVOKE.Animation_SetCurrentProgress(swigCPtr, value);
367                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
368             }
369             get
370             {
371                 float ret = NDalicPINVOKE.Animation_GetCurrentProgress(swigCPtr);
372                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
373                 return ret;
374             }
375         }
376
377         /// <summary>
378         /// Gets or sets specificifications of a speed factor for the animation.<br>
379         /// The speed factor is a multiplier of the normal velocity of the animation.<br>
380         /// Values between [0, 1] will slow down the animation and values above one will speed up the animation.<br>
381         /// It is also possible to specify a negative multiplier to play the animation in reverse.<br>
382         /// </summary>
383         public float SpeedFactor
384         {
385             set
386             {
387                 NDalicPINVOKE.Animation_SetSpeedFactor(swigCPtr, value);
388                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
389             }
390             get
391             {
392                 float ret = NDalicPINVOKE.Animation_GetSpeedFactor(swigCPtr);
393                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
394                 return ret;
395             }
396         }
397
398         /// <summary>
399         /// Gets or sets the playing range.<br>
400         /// Animation will play between the values specified. Both values (range.x and range.y ) should be between 0-1,
401         /// otherwise they will be ignored. If the range provided is not in proper order (minimum, maximum ), it will be reordered.<br>
402         /// </summary>
403         public RelativeVector2 PlayRange
404         {
405             set
406             {
407                 NDalicPINVOKE.Animation_SetPlayRange(swigCPtr, Vector2.getCPtr(value));
408                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
409             }
410             get
411             {
412                 Vector2 ret = new Vector2(NDalicPINVOKE.Animation_GetPlayRange(swigCPtr), true);
413                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
414                 return ret;
415             }
416         }
417
418
419         /// <summary>
420         /// Gets or sets the progress notification marker which triggers the ProgressReachedSignal.<br>
421         /// Percentage of animation progress should be greater than 0 and less than 1, for example, 0.3 for 30% <br>
422         /// One notification can be set on each animation.
423         /// </summary>
424         public float ProgressNotification
425         {
426             set
427             {
428                 NDalicPINVOKE.Animation_SetProgressNotification(swigCPtr, value);
429                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
430             }
431             get
432             {
433                 float ret = NDalicPINVOKE.Animation_GetProgressNotification(swigCPtr);
434                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
435                 return ret;
436             }
437         }
438
439         /// <summary>
440         /// Animates a property value by a relative amount.<br>
441         /// </summary>
442         /// <param name="target">The target object to animate.</param>
443         /// <param name="property">The target property to animate.</param>
444         /// <param name="relativeValue">The property value will change by this amount.</param>
445         /// <param name="alphaFunction">The alpha function to apply.</param>
446         public void AnimateBy(View target, string property, object relativeValue, AlphaFunction alphaFunction = null)
447         {
448             Property _prop = PropertyHelper.GetPropertyFromString(target, property);
449
450             PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
451             if(propertyType.Equals(PropertyType.Float))
452             {
453                 System.Type type = relativeValue.GetType();
454                 if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
455                 {
456                     int num = (int)relativeValue;
457                     relativeValue = (float)num;
458                 }
459             }
460
461             PropertyValue val = PropertyValue.CreateFromObject(relativeValue);
462
463             if (alphaFunction != null)
464             {
465                 AnimateBy(_prop, val, alphaFunction);
466             }
467             else
468             {
469                 AnimateBy(_prop, val);
470             }
471         }
472
473         /// <summary>
474         /// Animates a property value by a relative amount.<br>
475         /// </summary>
476         /// <param name="target">The target object to animate.</param>
477         /// <param name="property">The target property to animate.</param>
478         /// <param name="relativeValue">The property value will change by this amount.</param>
479         /// <param name="startTime">The start time of the animation.</param>
480         /// <param name="endTime">The end time of the animation.</param>
481         /// <param name="alphaFunction">The alpha function to apply.</param>
482         public void AnimateBy(View target, string property, object relativeValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
483         {
484             Property _prop = PropertyHelper.GetPropertyFromString(target, property);
485
486             PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
487             if(propertyType.Equals(PropertyType.Float))
488             {
489                 System.Type type = relativeValue.GetType();
490                 if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
491                 {
492                     int num = (int)relativeValue;
493                     relativeValue = (float)num;
494                 }
495             }
496
497             PropertyValue val = PropertyValue.CreateFromObject(relativeValue);
498
499             if (alphaFunction != null)
500             {
501                 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
502                 AnimateBy(_prop, val, alphaFunction, time);
503             }
504             else
505             {
506                 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
507                 AnimateBy(_prop, val, time);
508             }
509         }
510
511         /// <summary>
512         /// Animates a property to a destination value.<br>
513         /// </summary>
514         /// <param name="target">The target object to animate.</param>
515         /// <param name="property">The target property to animate.</param>
516         /// <param name="destinationValue">The destination value.</param>
517         /// <param name="alphaFunction">The alpha function to apply.</param>
518         public void AnimateTo(View target, string property, object destinationValue, AlphaFunction alphaFunction = null)
519         {
520             Property _prop = PropertyHelper.GetPropertyFromString(target, property);
521
522             PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
523             if(propertyType.Equals(PropertyType.Float))
524             {
525                 System.Type type = destinationValue.GetType();
526                 if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
527                 {
528                     int num = (int)destinationValue;
529                     destinationValue = (float)num;
530                 }
531             }
532
533             PropertyValue val = PropertyValue.CreateFromObject(destinationValue);
534
535             if (alphaFunction != null)
536             {
537                 AnimateTo(_prop, val, alphaFunction);
538             }
539             else
540             {
541                 AnimateTo(_prop, val);
542             }
543         }
544
545         /// <summary>
546         /// Animates a property to a destination value.<br>
547         /// </summary>
548         /// <param name="target">The target object to animate.</param>
549         /// <param name="property">The target property to animate.</param>
550         /// <param name="destinationValue">The destination value.</param>
551         /// <param name="alphaFunction">The alpha function to apply.</param>
552         /// <param name="startTime">The start time of the animation.</param>
553         /// <param name="endTime">The end time of the animation.</param>
554         /// <param name="alphaFunction">The alpha function to apply.</param>
555         public void AnimateTo(View target, string property, object destinationValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
556         {
557             Property _prop = PropertyHelper.GetPropertyFromString(target, property);
558
559             PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
560             if(propertyType.Equals(PropertyType.Float))
561             {
562                 System.Type type = destinationValue.GetType();
563                 if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
564                 {
565                     int num = (int)destinationValue;
566                     destinationValue = (float)num;
567                 }
568             }
569
570             PropertyValue val = PropertyValue.CreateFromObject(destinationValue);
571
572             if (alphaFunction != null)
573             {
574                 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
575                 AnimateTo(_prop, val, alphaFunction, time);
576             }
577             else
578             {
579                 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
580                 AnimateTo(_prop, val, time);
581             }
582         }
583
584         /// <summary>
585         /// Animates a property between keyframes.
586         /// </summary>
587         /// <param name="target">The target object to animate.</param>
588         /// <param name="property">The target property to animate.</param>
589         /// <param name="keyFrames">The set of time or value pairs between which to animate.</param>
590         /// <param name="interpolation">The method used to interpolate between values.</param>
591         /// <param name="alphaFunction">The alpha function to apply.</param>
592         public void AnimateBetween(View target, string property, KeyFrames keyFrames, Interpolation interpolation = Interpolation.Linear, AlphaFunction alphaFunction = null)
593         {
594             Property _prop = PropertyHelper.GetPropertyFromString(target, property);
595
596             if (_prop.propertyIndex == Property.INVALID_INDEX)
597             {
598                 throw new System.ArgumentException("second argument string property is invalid parameter!");
599             }
600
601             if (alphaFunction != null)
602             {
603                 AnimateBetween(_prop, keyFrames, alphaFunction, interpolation);
604             }
605             else
606             {
607                 AnimateBetween(_prop, keyFrames, interpolation);
608             }
609         }
610
611
612         /// <summary>
613         /// Animates a property between keyframes.
614         /// </summary>
615         /// <param name="target">The target object to animate</param>
616         /// <param name="property">The target property to animate</param>
617         /// <param name="keyFrames">The set of time/value pairs between which to animate</param>
618         /// <param name="startTime">The start time of animation in milliseconds.</param>
619         /// <param name="endTime">The end time of animation in milliseconds.</param>
620         /// <param name="interpolation">The method used to interpolate between values.</param>
621         /// <param name="alphaFunction">The alpha function to apply.</param>
622         public void AnimateBetween(View target, string property, KeyFrames keyFrames, int startTime, int endTime, Interpolation interpolation = Interpolation.Linear, AlphaFunction alphaFunction = null)
623         {
624             Property _prop = PropertyHelper.GetPropertyFromString(target, property);
625
626             Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
627             if (alphaFunction != null)
628             {
629                 AnimateBetween(_prop, keyFrames, alphaFunction, time, interpolation);
630             }
631             else
632             {
633                 AnimateBetween(_prop, keyFrames, time, interpolation);
634             }
635         }
636
637         /// <summary>
638         /// Animates the view's position and orientation through a predefined path.<br>
639         /// The view will rotate to orient the supplied forward vector with the path's tangent.<br>
640         /// If forward is the zero vector then no rotation will happen.<br>
641         /// </summary>
642         /// <param name="view">The view to animate.</param>
643         /// <param name="path">It defines position and orientation.</param>
644         /// <param name="forward">The vector (in local space coordinate system) will be oriented with the path's tangent direction.</param>
645         /// <param name="alphaFunction">The alpha function to apply.</param>
646         public void AnimatePath(View view, Path path, Vector3 forward, AlphaFunction alphaFunction = null)
647         {
648             if (alphaFunction == null)
649             {
650                 Animate(view, path, forward);
651             }
652             else
653             {
654                 Animate(view, path, forward, alphaFunction);
655             }
656         }
657
658         /// <summary>
659         /// Animates the view's position and orientation through a predefined path.<br>
660         /// The view will rotate to orient the supplied forward vector with the path's tangent.<br>
661         /// If forward is the zero vector then no rotation will happen.<br>
662         /// </summary>
663         /// <param name="view">The view to animate.</param>
664         /// <param name="path">It defines position and orientation.</param>
665         /// <param name="forward">The vector (in local space coordinate system) will be oriented with the path's tangent direction.</param>
666         /// <param name="startTime">The start time of the animation.</param>
667         /// <param name="endTime">The end time of the animation.</param>
668         /// <param name="alphaFunction">The alpha function to apply.</param>
669         public void AnimatePath(View view, Path path, Vector3 forward, int startTime, int endTime, AlphaFunction alphaFunction = null)
670         {
671             TimePeriod time = new TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
672             if (alphaFunction == null)
673             {
674                 Animate(view, path, forward, time);
675             }
676             else
677             {
678                 Animate(view, path, forward, alphaFunction, time);
679             }
680         }
681
682         /// <summary>
683         /// Creates an initialized animation.<br>
684         /// The animation will not loop.<br>
685         /// The default end action is "Cancel".<br>
686         /// The default alpha function is linear.<br>
687         /// </summary>
688         public Animation() : this(NDalicPINVOKE.Animation_New(0.0f), true)
689         {
690             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
691         }
692
693         internal Animation(float durationSeconds) : this(NDalicPINVOKE.Animation_New(durationSeconds), true)
694         {
695             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
696
697         }
698
699         /// <summary>
700         /// Downcasts a handle to animation handle.<br>
701         /// If handle points to an animation object, the downcast produces a valid handle.<br>
702         /// If not, the returned handle is left uninitialized.<br>
703         /// </summary>
704         /// <param name="handle">Handle to an object.</param>
705         /// <returns>Handle to an animation object or an uninitialized handle.</returns>
706         public static Animation DownCast(BaseHandle handle)
707         {
708             Animation ret =  Registry.GetManagedBaseHandleFromNativePtr(handle) as Animation;
709             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
710             return ret;
711         }
712
713         internal Animation(Animation handle) : this(NDalicPINVOKE.new_Animation__SWIG_1(Animation.getCPtr(handle)), true)
714         {
715             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
716         }
717
718         internal Animation Assign(Animation rhs)
719         {
720             Animation ret = new Animation(NDalicPINVOKE.Animation_Assign(swigCPtr, Animation.getCPtr(rhs)), false);
721             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
722             return ret;
723         }
724
725         internal void SetDuration(float seconds)
726         {
727             NDalicPINVOKE.Animation_SetDuration(swigCPtr, seconds);
728             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
729         }
730
731         internal float GetDuration()
732         {
733             float ret = NDalicPINVOKE.Animation_GetDuration(swigCPtr);
734             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
735             return ret;
736         }
737
738         internal void SetLooping(bool looping)
739         {
740             NDalicPINVOKE.Animation_SetLooping(swigCPtr, looping);
741             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
742         }
743
744         internal void SetLoopCount(int count)
745         {
746             NDalicPINVOKE.Animation_SetLoopCount(swigCPtr, count);
747             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
748         }
749
750         internal int GetLoopCount()
751         {
752             int ret = NDalicPINVOKE.Animation_GetLoopCount(swigCPtr);
753             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
754             return ret;
755         }
756
757         internal int GetCurrentLoop()
758         {
759             int ret = NDalicPINVOKE.Animation_GetCurrentLoop(swigCPtr);
760             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
761             return ret;
762         }
763
764         internal bool IsLooping()
765         {
766             bool ret = NDalicPINVOKE.Animation_IsLooping(swigCPtr);
767             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
768             return ret;
769         }
770
771         internal void SetEndAction(Animation.EndActions action)
772         {
773             NDalicPINVOKE.Animation_SetEndAction(swigCPtr, (int)action);
774             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
775         }
776
777         internal Animation.EndActions GetEndAction()
778         {
779             Animation.EndActions ret = (Animation.EndActions)NDalicPINVOKE.Animation_GetEndAction(swigCPtr);
780             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
781             return ret;
782         }
783
784         internal void SetDisconnectAction(Animation.EndActions disconnectAction)
785         {
786             NDalicPINVOKE.Animation_SetDisconnectAction(swigCPtr, (int)disconnectAction);
787             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
788         }
789
790         internal Animation.EndActions GetDisconnectAction()
791         {
792             Animation.EndActions ret = (Animation.EndActions)NDalicPINVOKE.Animation_GetDisconnectAction(swigCPtr);
793             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
794             return ret;
795         }
796
797         internal void SetDefaultAlphaFunction(AlphaFunction alpha)
798         {
799             NDalicPINVOKE.Animation_SetDefaultAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha));
800             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
801         }
802
803         internal AlphaFunction GetDefaultAlphaFunction()
804         {
805             AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.Animation_GetDefaultAlphaFunction(swigCPtr), true);
806             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
807             return ret;
808         }
809
810         internal void SetCurrentProgress(float progress)
811         {
812             NDalicPINVOKE.Animation_SetCurrentProgress(swigCPtr, progress);
813             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
814         }
815
816         internal float GetCurrentProgress()
817         {
818             float ret = NDalicPINVOKE.Animation_GetCurrentProgress(swigCPtr);
819             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
820             return ret;
821         }
822
823         internal void SetSpeedFactor(float factor)
824         {
825             NDalicPINVOKE.Animation_SetSpeedFactor(swigCPtr, factor);
826             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
827         }
828
829         internal float GetSpeedFactor()
830         {
831             float ret = NDalicPINVOKE.Animation_GetSpeedFactor(swigCPtr);
832             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
833             return ret;
834         }
835
836         internal void SetPlayRange(Vector2 range)
837         {
838             NDalicPINVOKE.Animation_SetPlayRange(swigCPtr, Vector2.getCPtr(range));
839             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
840         }
841
842         internal Vector2 GetPlayRange()
843         {
844             Vector2 ret = new Vector2(NDalicPINVOKE.Animation_GetPlayRange(swigCPtr), true);
845             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
846             return ret;
847         }
848
849         private static bool? disableAnimation = null;
850         private bool DisableAnimation
851         {
852             get
853             {
854                 if (disableAnimation.HasValue == false)
855                 {
856                     string type = Environment.GetEnvironmentVariable("PlatformSmartType");
857                     if (type == "Entry")
858                         disableAnimation = true;
859                     else
860                         disableAnimation = false;
861                 }
862                 return disableAnimation.Value;
863             }
864         }
865
866         /// <summary>
867         /// Plays the animation.
868         /// </summary>
869         public void Play()
870         {
871             NDalicPINVOKE.Animation_Play(swigCPtr);
872             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
873
874             if (DisableAnimation == true)
875                 Stop(EndActions.StopFinal);
876         }
877
878         /// <summary>
879         /// Plays the animation from a given point.<br>
880         /// The progress must be in the 0-1 interval or in the play range interval if defined,
881         /// otherwise, it will be ignored.<br>
882         /// </summary>
883         /// <param name="progress">A value between [0,1], or between the play range if specified, from where the animation should start playing.</param>
884         public void PlayFrom(float progress)
885         {
886             NDalicPINVOKE.Animation_PlayFrom(swigCPtr, progress);
887             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
888         }
889
890         /// <summary>
891         /// Plays the animation after a given delay time.<br/>
892         /// The delay time is not included in the looping time.<br/>
893         /// When the delay time is a negative value, it would treat as play immediately.<br/>
894         /// </summary>
895         /// <param name="delayMilliseconds">The delay time.</param>
896         public void PlayAfter(int delayMilliseconds)
897         {
898             NDalicPINVOKE.Animation_PlayAfter(swigCPtr, MilliSecondsToSeconds(delayMilliseconds));
899             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
900         }
901
902         /// <summary>
903         /// Pauses the animation.
904         /// </summary>
905         public void Pause()
906         {
907             NDalicPINVOKE.Animation_Pause(swigCPtr);
908             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
909         }
910
911         internal Animation.States GetState()
912         {
913             Animation.States ret = (Animation.States)NDalicPINVOKE.Animation_GetState(swigCPtr);
914             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
915             return ret;
916         }
917
918         /// <summary>
919         /// Stops the animation.
920         /// </summary>
921         public void Stop()
922         {
923             NDalicPINVOKE.Animation_Stop(swigCPtr);
924             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
925         }
926
927         /// <summary>
928         /// Clears the animation.<br>
929         /// This disconnects any objects that were being animated, effectively stopping the animation.<br>
930         /// </summary>
931         public void Clear()
932         {
933             NDalicPINVOKE.Animation_Clear(swigCPtr);
934             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
935         }
936
937         internal AnimationSignal FinishedSignal()
938         {
939             AnimationSignal ret = new AnimationSignal(NDalicPINVOKE.Animation_FinishedSignal(swigCPtr), false);
940             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
941             return ret;
942         }
943
944         internal AnimationSignal ProgressReachedSignal()
945         {
946             AnimationSignal ret = new AnimationSignal(NDalicPINVOKE.Animation_ProgressReachedSignal(swigCPtr), false);
947             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
948             return ret;
949         }
950
951         internal void AnimateBy(Property target, PropertyValue relativeValue)
952         {
953             NDalicPINVOKE.Animation_AnimateBy__SWIG_0(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue));
954             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
955         }
956
957         internal void AnimateBy(Property target, PropertyValue relativeValue, AlphaFunction alpha)
958         {
959             NDalicPINVOKE.Animation_AnimateBy__SWIG_1(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue), AlphaFunction.getCPtr(alpha));
960             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
961         }
962
963         internal void AnimateBy(Property target, PropertyValue relativeValue, TimePeriod period)
964         {
965             NDalicPINVOKE.Animation_AnimateBy__SWIG_2(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue), TimePeriod.getCPtr(period));
966             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
967         }
968
969         internal void AnimateBy(Property target, PropertyValue relativeValue, AlphaFunction alpha, TimePeriod period)
970         {
971             NDalicPINVOKE.Animation_AnimateBy__SWIG_3(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
972             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
973         }
974
975         internal void AnimateTo(Property target, PropertyValue destinationValue)
976         {
977             NDalicPINVOKE.Animation_AnimateTo__SWIG_0(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue));
978             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
979         }
980
981         internal void AnimateTo(Property target, PropertyValue destinationValue, AlphaFunction alpha)
982         {
983             NDalicPINVOKE.Animation_AnimateTo__SWIG_1(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue), AlphaFunction.getCPtr(alpha));
984             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
985         }
986
987         internal void AnimateTo(Property target, PropertyValue destinationValue, TimePeriod period)
988         {
989             NDalicPINVOKE.Animation_AnimateTo__SWIG_2(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue), TimePeriod.getCPtr(period));
990             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
991         }
992
993         internal void AnimateTo(Property target, PropertyValue destinationValue, AlphaFunction alpha, TimePeriod period)
994         {
995             NDalicPINVOKE.Animation_AnimateTo__SWIG_3(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
996             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
997         }
998
999         internal void AnimateBetween(Property target, KeyFrames keyFrames)
1000         {
1001             NDalicPINVOKE.Animation_AnimateBetween__SWIG_0(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames));
1002             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1003         }
1004
1005         internal void AnimateBetween(Property target, KeyFrames keyFrames, Animation.Interpolation interpolation)
1006         {
1007             NDalicPINVOKE.Animation_AnimateBetween__SWIG_1(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), (int)interpolation);
1008             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1009         }
1010
1011         internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha)
1012         {
1013             NDalicPINVOKE.Animation_AnimateBetween__SWIG_2(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha));
1014             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1015         }
1016
1017         internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, Animation.Interpolation interpolation)
1018         {
1019             NDalicPINVOKE.Animation_AnimateBetween__SWIG_3(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), (int)interpolation);
1020             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1021         }
1022
1023         internal void AnimateBetween(Property target, KeyFrames keyFrames, TimePeriod period)
1024         {
1025             NDalicPINVOKE.Animation_AnimateBetween__SWIG_4(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), TimePeriod.getCPtr(period));
1026             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1027         }
1028
1029         internal void AnimateBetween(Property target, KeyFrames keyFrames, TimePeriod period, Animation.Interpolation interpolation)
1030         {
1031             NDalicPINVOKE.Animation_AnimateBetween__SWIG_5(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), TimePeriod.getCPtr(period), (int)interpolation);
1032             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1033         }
1034
1035         internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period)
1036         {
1037             NDalicPINVOKE.Animation_AnimateBetween__SWIG_6(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
1038             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1039         }
1040
1041         internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period, Animation.Interpolation interpolation)
1042         {
1043             NDalicPINVOKE.Animation_AnimateBetween__SWIG_7(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period), (int)interpolation);
1044             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1045         }
1046
1047         internal void Animate(View view, Path path, Vector3 forward)
1048         {
1049             NDalicPINVOKE.Animation_Animate__SWIG_0(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward));
1050             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1051         }
1052
1053         internal void Animate(View view, Path path, Vector3 forward, AlphaFunction alpha)
1054         {
1055             NDalicPINVOKE.Animation_Animate__SWIG_1(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward), AlphaFunction.getCPtr(alpha));
1056             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1057         }
1058
1059         internal void Animate(View view, Path path, Vector3 forward, TimePeriod period)
1060         {
1061             NDalicPINVOKE.Animation_Animate__SWIG_2(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward), TimePeriod.getCPtr(period));
1062             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1063         }
1064
1065         internal void Animate(View view, Path path, Vector3 forward, AlphaFunction alpha, TimePeriod period)
1066         {
1067             NDalicPINVOKE.Animation_Animate__SWIG_3(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
1068             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1069         }
1070
1071         internal void Show(View view, float delaySeconds)
1072         {
1073             NDalicPINVOKE.Animation_Show(swigCPtr, View.getCPtr(view), delaySeconds);
1074             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1075         }
1076
1077         internal void Hide(View view, float delaySeconds)
1078         {
1079             NDalicPINVOKE.Animation_Hide(swigCPtr, View.getCPtr(view), delaySeconds);
1080             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1081         }
1082
1083         /// <summary>
1084         /// Enumeration for what to do when the animation ends, stopped, or destroyed.
1085         /// </summary>
1086         public enum EndActions
1087         {
1088             /// <summary>
1089             /// When the animation ends, the animated property values are saved.
1090             /// </summary>
1091             Cancel,
1092             /// <summary>
1093             /// When the animation ends, the animated property values are forgotten.
1094             /// </summary>
1095             Discard,
1096             /// <summary>
1097             /// If the animation is stopped, the animated property values are saved as if the animation had run to completion, otherwise behaves like cancel.
1098             /// </summary>
1099             StopFinal
1100         }
1101
1102         /// <summary>
1103         /// Enumeration for what interpolation method to use on key-frame animations.
1104         /// </summary>
1105         public enum Interpolation
1106         {
1107             /// <summary>
1108             /// Values in between key frames are interpolated using a linear polynomial. (Default)
1109             /// </summary>
1110             Linear,
1111             /// <summary>
1112             /// Values in between key frames are interpolated using a cubic polynomial.
1113             /// </summary>
1114             Cubic
1115         }
1116
1117         /// <summary>
1118         /// Enumeration for what state the animation is in.
1119         /// </summary>
1120         /// <remarks>Calling Reset() on this class will not reset the animation. It will call the BaseHandle.Reset() which drops the object handle.</remarks>
1121         public enum States
1122         {
1123             /// <summary>
1124             /// The animation has stopped.
1125             /// </summary>
1126             Stopped,
1127             /// <summary>
1128             /// The animation is playing.
1129             /// </summary>
1130             Playing,
1131             /// <summary>
1132             /// The animation is paused.
1133             /// </summary>
1134             Paused
1135         }
1136
1137     }
1138
1139 }