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