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