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