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