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