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