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