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