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