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