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