Added scrollMode property to ScrollView to simplify Rulers
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / internal / 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 //------------------------------------------------------------------------------
18 // <auto-generated />
19 //
20 // This file was automatically generated by SWIG (http://www.swig.org).
21 // Version 3.0.10
22 //
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
26
27 namespace Dali
28 {
29
30     using System;
31     using System.Runtime.InteropServices;
32
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         ~Animation()
48         {
49             DisposeQueue.Instance.Add(this);
50         }
51
52         public override void Dispose()
53         {
54             if (!Window.IsInstalled())
55             {
56                 DisposeQueue.Instance.Add(this);
57                 return;
58             }
59
60             lock (this)
61             {
62                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
63                 {
64                     if (swigCMemOwn)
65                     {
66                         swigCMemOwn = false;
67                         NDalicPINVOKE.delete_Animation(swigCPtr);
68                     }
69                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
70                 }
71                 global::System.GC.SuppressFinalize(this);
72                 base.Dispose();
73             }
74         }
75
76
77
78
79         private EventCallbackDelegateType1<IntPtr> _animationFinishedEventCallbackDelegate;
80
81         private event EventHandler _animationFinishedEventHandler;
82
83         /**
84       * @brief Event for Finished signal which can be used to subscribe/unsubscribe the event handler
85       * Finished signal is emitted when an Animation's animations have finished.
86       */
87         public event EventHandler Finished
88         {
89             add
90             {
91                 lock (this)
92                 {
93                     _animationFinishedEventHandler += value;
94                     _animationFinishedEventCallbackDelegate = OnFinished;
95                     this.FinishedSignal().Connect(_animationFinishedEventCallbackDelegate);
96                 }
97             }
98             remove
99             {
100                 lock (this)
101                 {
102                     if (_animationFinishedEventHandler != null)
103                     {
104                         this.FinishedSignal().Disconnect(_animationFinishedEventCallbackDelegate);
105                     }
106                     _animationFinishedEventHandler -= value;
107                 }
108             }
109         }
110
111         // Callback for Animation FinishedSignal
112         private void OnFinished(IntPtr data)
113         {
114             if (_animationFinishedEventHandler != null)
115             {
116                 //here we send all data to user event handlers
117                 _animationFinishedEventHandler(this, null);
118             }
119         }
120
121         public static Animation GetAnimationFromPtr(global::System.IntPtr cPtr)
122         {
123             Animation ret = new Animation(cPtr, false);
124             if (NDalicPINVOKE.SWIGPendingException.Pending)
125                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126             return ret;
127         }
128
129         private float MilliSecondsToSeconds(int millisec)
130         {
131             return (float)millisec / 1000.0f;
132         }
133
134         private int SecondsToMilliSeconds(float sec)
135         {
136             return (int)(sec * 1000);
137         }
138
139         public int Duration
140         {
141             set
142             {
143                 SetDuration(MilliSecondsToSeconds(value));
144             }
145             get
146             {
147                 return SecondsToMilliSeconds(GetDuration());
148             }
149         }
150
151         public AlphaFunction DefaultAlphaFunction
152         {
153             set
154             {
155                 SetDefaultAlphaFunction(value);
156             }
157             get
158             {
159                 AlphaFunction ret = GetDefaultAlphaFunction();
160                 return ret;
161             }
162         }
163
164         public Animation.State Status
165         {
166             get
167             {
168                 return GetState();
169             }
170         }
171
172         public int LoopCount
173         {
174             set
175             {
176                 SetLoopCount(value);
177             }
178             get
179             {
180                 int ret = GetLoopCount();
181                 return ret;
182             }
183         }
184
185         public bool Looping
186         {
187             set
188             {
189                 SetLooping(value);
190             }
191             get
192             {
193                 bool ret = IsLooping();
194                 return ret;
195             }
196         }
197
198         public Animation.EndActions EndAction
199         {
200             set
201             {
202                 SetEndAction(value);
203             }
204             get
205             {
206                 return GetEndAction();
207             }
208         }
209
210         public void Stop(Animation.EndActions action)
211         {
212             SetEndAction(action);
213             NDalicPINVOKE.Animation_Stop(swigCPtr);
214             if (NDalicPINVOKE.SWIGPendingException.Pending)
215                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
216         }
217
218         public int StartTime { set; get; }
219
220         public int EndTime { set; get; }
221
222         public string TargetProperty { set; get; }
223
224         public object Destination { set; get; }
225
226         public Dali.AlphaFunction AlphaFunction { set; get; }
227
228
229         public void AnimateBy(View target)
230         {
231             string _str1 = TargetProperty.Substring(0, 1);
232             string _str2 = TargetProperty.Substring(1);
233             string _str = _str1.ToLower() + _str2;
234
235             dynamic obj = (object)Destination;
236
237             if (this.AlphaFunction != null)
238             {
239                 if (this.StartTime == 0 && this.EndTime == 0)
240                 {
241                     AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction);
242                 }
243                 else
244                 {
245                     Dali.TimePeriod time = new Dali.TimePeriod(MilliSecondsToSeconds(this.StartTime), MilliSecondsToSeconds(this.EndTime - this.StartTime));
246                     AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time);
247                 }
248             }
249             else
250             {
251                 if (this.StartTime == 0 && this.EndTime == 0)
252                 {
253                     AnimateBy(new Property(target, _str), new Property.Value(obj));
254                 }
255                 else
256                 {
257                     Dali.TimePeriod time = new Dali.TimePeriod(MilliSecondsToSeconds(this.StartTime), MilliSecondsToSeconds(this.EndTime - this.StartTime));
258                     AnimateBy(new Property(target, _str), new Property.Value(obj), time);
259                 }
260             }
261         }
262
263         public void AnimateBy(View target, string propertyIndex)
264         {
265             string _str1 = propertyIndex.Substring(0, 1);
266             string _str2 = propertyIndex.Substring(1);
267             string _str = _str1.ToLower() + _str2;
268
269             dynamic obj = (object)Destination;
270
271             if (this.AlphaFunction != null)
272             {
273                 if (this.StartTime == 0 && this.EndTime == 0)
274                 {
275                     AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction);
276                 }
277                 else
278                 {
279                     Dali.TimePeriod time = new Dali.TimePeriod(MilliSecondsToSeconds(this.StartTime), MilliSecondsToSeconds(this.EndTime - this.StartTime));
280                     AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time);
281                 }
282             }
283             else
284             {
285                 if (this.StartTime == 0 && this.EndTime == 0)
286                 {
287                     AnimateBy(new Property(target, _str), new Property.Value(obj));
288                 }
289                 else
290                 {
291                     Dali.TimePeriod time = new Dali.TimePeriod(MilliSecondsToSeconds(this.StartTime), MilliSecondsToSeconds(this.EndTime - this.StartTime));
292                     AnimateBy(new Property(target, _str), new Property.Value(obj), time);
293                 }
294             }
295         }
296
297         public void AnimateBy(View target, string propertyIndex, object relativeValue)
298         {
299             string _str1 = propertyIndex.Substring(0, 1);
300             string _str2 = propertyIndex.Substring(1);
301             string _str = _str1.ToLower() + _str2;
302
303             dynamic obj = (object)relativeValue;
304
305             if (this.AlphaFunction != null)
306             {
307                 if (this.StartTime == 0 && this.EndTime == 0)
308                 {
309                     AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction);
310                 }
311                 else
312                 {
313                     Dali.TimePeriod time = new Dali.TimePeriod(MilliSecondsToSeconds(this.StartTime), MilliSecondsToSeconds(this.EndTime - this.StartTime));
314                     AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time);
315                 }
316             }
317             else
318             {
319                 if (this.StartTime == 0 && this.EndTime == 0)
320                 {
321                     AnimateBy(new Property(target, _str), new Property.Value(obj));
322                 }
323                 else
324                 {
325                     Dali.TimePeriod time = new Dali.TimePeriod(MilliSecondsToSeconds(this.StartTime), MilliSecondsToSeconds(this.EndTime - this.StartTime));
326                     AnimateBy(new Property(target, _str), new Property.Value(obj), time);
327                 }
328             }
329         }
330
331         public void AnimateTo(View target)
332         {
333             string _str1 = TargetProperty.Substring(0, 1);
334             string _str2 = TargetProperty.Substring(1);
335             string _str = _str1.ToLower() + _str2;
336
337             dynamic obj = (object)Destination;
338
339             if (this.AlphaFunction != null)
340             {
341                 if (this.StartTime == 0 && this.EndTime == 0)
342                 {
343                     AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction);
344                 }
345                 else
346                 {
347                     Dali.TimePeriod time = new Dali.TimePeriod(MilliSecondsToSeconds(this.StartTime), MilliSecondsToSeconds(this.EndTime - this.StartTime));
348                     AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time);
349                 }
350             }
351             else
352             {
353                 if (this.StartTime == 0 && this.EndTime == 0)
354                 {
355                     AnimateTo(new Property(target, _str), new Property.Value(obj));
356                 }
357                 else
358                 {
359                     Dali.TimePeriod time = new Dali.TimePeriod(MilliSecondsToSeconds(this.StartTime), MilliSecondsToSeconds(this.EndTime - this.StartTime));
360                     AnimateTo(new Property(target, _str), new Property.Value(obj), time);
361                 }
362             }
363         }
364
365         public void AnimateTo(View target, string propertyIndex)
366         {
367             string _str1 = propertyIndex.Substring(0, 1);
368             string _str2 = propertyIndex.Substring(1);
369             string _str = _str1.ToLower() + _str2;
370
371             dynamic obj = (object)Destination;
372
373             if (this.AlphaFunction != null)
374             {
375                 if (this.StartTime == 0 && this.EndTime == 0)
376                 {
377                     AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction);
378                 }
379                 else
380                 {
381                     Dali.TimePeriod time = new Dali.TimePeriod(MilliSecondsToSeconds(this.StartTime), MilliSecondsToSeconds(this.EndTime - this.StartTime));
382                     AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time);
383                 }
384             }
385             else
386             {
387                 if (this.StartTime == 0 && this.EndTime == 0)
388                 {
389                     AnimateTo(new Property(target, _str), new Property.Value(obj));
390                 }
391                 else
392                 {
393                     Dali.TimePeriod time = new Dali.TimePeriod(MilliSecondsToSeconds(this.StartTime), MilliSecondsToSeconds(this.EndTime - this.StartTime));
394                     AnimateTo(new Property(target, _str), new Property.Value(obj), time);
395                 }
396             }
397         }
398
399         public void AnimateTo(View target, string propertyIndex, object destinationValue)
400         {
401             string _str1 = propertyIndex.Substring(0, 1);
402             string _str2 = propertyIndex.Substring(1);
403             string _str = _str1.ToLower() + _str2;
404
405             dynamic obj = (object)destinationValue;
406
407             if (this.AlphaFunction != null)
408             {
409                 if (this.StartTime == 0 && this.EndTime == 0)
410                 {
411                     AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction);
412                 }
413                 else
414                 {
415                     Dali.TimePeriod time = new Dali.TimePeriod(MilliSecondsToSeconds(this.StartTime), MilliSecondsToSeconds(this.EndTime - this.StartTime));
416                     AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time);
417                 }
418             }
419             else
420             {
421                 if (this.StartTime == 0 && this.EndTime == 0)
422                 {
423                     AnimateTo(new Property(target, _str), new Property.Value(obj));
424                 }
425                 else
426                 {
427                     Dali.TimePeriod time = new Dali.TimePeriod(MilliSecondsToSeconds(this.StartTime), MilliSecondsToSeconds(this.EndTime - this.StartTime));
428                     AnimateTo(new Property(target, _str), new Property.Value(obj), time);
429                 }
430             }
431         }
432
433         public void AnimateBetween(View target, KeyFrames keyFrames)
434         {
435             string _str1 = TargetProperty.Substring(0, 1);
436             string _str2 = TargetProperty.Substring(1);
437             string _str = _str1.ToLower() + _str2;
438
439
440             if (this.AlphaFunction != null)
441             {
442                 if (this.StartTime == 0 && this.EndTime == 0)
443                 {
444                     AnimateBetween(new Property(target, _str), keyFrames, this.AlphaFunction);
445                 }
446                 else
447                 {
448                     Dali.TimePeriod time = new Dali.TimePeriod(MilliSecondsToSeconds(this.StartTime), MilliSecondsToSeconds(this.EndTime - this.StartTime));
449                     AnimateBetween(new Property(target, _str), keyFrames, this.AlphaFunction, time);
450                 }
451             }
452             else
453             {
454                 if (this.StartTime == 0 && this.EndTime == 0)
455                 {
456                     AnimateBetween(new Property(target, _str), keyFrames);
457                 }
458                 else
459                 {
460                     Dali.TimePeriod time = new Dali.TimePeriod(MilliSecondsToSeconds(this.StartTime), MilliSecondsToSeconds(this.EndTime - this.StartTime));
461                     AnimateBetween(new Property(target, _str), keyFrames, time);
462                 }
463             }
464         }
465
466         public void AnimateBetween(View target, KeyFrames keyFrames, Animation.Interpolation interpolation)
467         {
468             string _str1 = TargetProperty.Substring(0, 1);
469             string _str2 = TargetProperty.Substring(1);
470             string _str = _str1.ToLower() + _str2;
471
472
473             if (this.AlphaFunction != null)
474             {
475                 if (this.StartTime == 0 && this.EndTime == 0)
476                 {
477                     AnimateBetween(new Property(target, _str), keyFrames, this.AlphaFunction, interpolation);
478                 }
479                 else
480                 {
481                     Dali.TimePeriod time = new Dali.TimePeriod(MilliSecondsToSeconds(this.StartTime), MilliSecondsToSeconds(this.EndTime - this.StartTime));
482                     AnimateBetween(new Property(target, _str), keyFrames, this.AlphaFunction, time, interpolation);
483                 }
484             }
485             else
486             {
487                 if (this.StartTime == 0 && this.EndTime == 0)
488                 {
489                     AnimateBetween(new Property(target, _str), keyFrames, interpolation);
490                 }
491                 else
492                 {
493                     Dali.TimePeriod time = new Dali.TimePeriod(MilliSecondsToSeconds(this.StartTime), MilliSecondsToSeconds(this.EndTime - this.StartTime));
494                     AnimateBetween(new Property(target, _str), keyFrames, time, interpolation);
495                 }
496             }
497         }
498
499
500         /**
501    * @brief Create an initialized Animation.
502    *
503    * The animation will not loop.
504    * The default end action is "Bake".
505    * The default Alpha function is linear.
506    * @since 1.0.0
507    * @param [in] durationmSeconds The duration in milli seconds (int).
508    * @return A handle to a newly allocated Dali resource.
509    * @pre DurationmSeconds must be greater than zero.
510    */
511         public Animation(int durationmSeconds) : this(NDalicPINVOKE.Animation_New((float)durationmSeconds / 1000.0f), true)
512         {
513             if (NDalicPINVOKE.SWIGPendingException.Pending)
514                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
515         }
516
517         public Animation() : this(NDalicPINVOKE.Animation_New(0.0f), true)
518         {
519             if (NDalicPINVOKE.SWIGPendingException.Pending)
520                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
521         }
522
523
524         public Animation(float durationSeconds) : this(NDalicPINVOKE.Animation_New(durationSeconds), true)
525         {
526             if (NDalicPINVOKE.SWIGPendingException.Pending)
527                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
528
529         }
530
531         public static Animation DownCast(BaseHandle handle)
532         {
533             Animation ret = new Animation(NDalicPINVOKE.Animation_DownCast(BaseHandle.getCPtr(handle)), true);
534             if (NDalicPINVOKE.SWIGPendingException.Pending)
535                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
536             return ret;
537         }
538
539         public Animation(Animation handle) : this(NDalicPINVOKE.new_Animation__SWIG_1(Animation.getCPtr(handle)), true)
540         {
541             if (NDalicPINVOKE.SWIGPendingException.Pending)
542                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
543         }
544
545         public Animation Assign(Animation rhs)
546         {
547             Animation ret = new Animation(NDalicPINVOKE.Animation_Assign(swigCPtr, Animation.getCPtr(rhs)), false);
548             if (NDalicPINVOKE.SWIGPendingException.Pending)
549                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
550             return ret;
551         }
552
553         public void SetDuration(float seconds)
554         {
555             NDalicPINVOKE.Animation_SetDuration(swigCPtr, seconds);
556             if (NDalicPINVOKE.SWIGPendingException.Pending)
557                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
558         }
559
560         public float GetDuration()
561         {
562             float ret = NDalicPINVOKE.Animation_GetDuration(swigCPtr);
563             if (NDalicPINVOKE.SWIGPendingException.Pending)
564                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
565             return ret;
566         }
567
568         public void SetLooping(bool looping)
569         {
570             NDalicPINVOKE.Animation_SetLooping(swigCPtr, looping);
571             if (NDalicPINVOKE.SWIGPendingException.Pending)
572                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
573         }
574
575         public void SetLoopCount(int count)
576         {
577             NDalicPINVOKE.Animation_SetLoopCount(swigCPtr, count);
578             if (NDalicPINVOKE.SWIGPendingException.Pending)
579                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
580         }
581
582         public int GetLoopCount()
583         {
584             int ret = NDalicPINVOKE.Animation_GetLoopCount(swigCPtr);
585             if (NDalicPINVOKE.SWIGPendingException.Pending)
586                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
587             return ret;
588         }
589
590         public int GetCurrentLoop()
591         {
592             int ret = NDalicPINVOKE.Animation_GetCurrentLoop(swigCPtr);
593             if (NDalicPINVOKE.SWIGPendingException.Pending)
594                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
595             return ret;
596         }
597
598         public bool IsLooping()
599         {
600             bool ret = NDalicPINVOKE.Animation_IsLooping(swigCPtr);
601             if (NDalicPINVOKE.SWIGPendingException.Pending)
602                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
603             return ret;
604         }
605
606         public void SetEndAction(Animation.EndActions action)
607         {
608             NDalicPINVOKE.Animation_SetEndAction(swigCPtr, (int)action);
609             if (NDalicPINVOKE.SWIGPendingException.Pending)
610                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
611         }
612
613         public Animation.EndActions GetEndAction()
614         {
615             Animation.EndActions ret = (Animation.EndActions)NDalicPINVOKE.Animation_GetEndAction(swigCPtr);
616             if (NDalicPINVOKE.SWIGPendingException.Pending)
617                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
618             return ret;
619         }
620
621         public void SetDisconnectAction(Animation.EndActions disconnectAction)
622         {
623             NDalicPINVOKE.Animation_SetDisconnectAction(swigCPtr, (int)disconnectAction);
624             if (NDalicPINVOKE.SWIGPendingException.Pending)
625                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
626         }
627
628         public Animation.EndActions GetDisconnectAction()
629         {
630             Animation.EndActions ret = (Animation.EndActions)NDalicPINVOKE.Animation_GetDisconnectAction(swigCPtr);
631             if (NDalicPINVOKE.SWIGPendingException.Pending)
632                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
633             return ret;
634         }
635
636         public void SetDefaultAlphaFunction(AlphaFunction alpha)
637         {
638             NDalicPINVOKE.Animation_SetDefaultAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha));
639             if (NDalicPINVOKE.SWIGPendingException.Pending)
640                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
641         }
642
643         public AlphaFunction GetDefaultAlphaFunction()
644         {
645             AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.Animation_GetDefaultAlphaFunction(swigCPtr), true);
646             if (NDalicPINVOKE.SWIGPendingException.Pending)
647                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
648             return ret;
649         }
650
651         public void SetCurrentProgress(float progress)
652         {
653             NDalicPINVOKE.Animation_SetCurrentProgress(swigCPtr, progress);
654             if (NDalicPINVOKE.SWIGPendingException.Pending)
655                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
656         }
657
658         public float GetCurrentProgress()
659         {
660             float ret = NDalicPINVOKE.Animation_GetCurrentProgress(swigCPtr);
661             if (NDalicPINVOKE.SWIGPendingException.Pending)
662                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
663             return ret;
664         }
665
666         public void SetSpeedFactor(float factor)
667         {
668             NDalicPINVOKE.Animation_SetSpeedFactor(swigCPtr, factor);
669             if (NDalicPINVOKE.SWIGPendingException.Pending)
670                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
671         }
672
673         public float GetSpeedFactor()
674         {
675             float ret = NDalicPINVOKE.Animation_GetSpeedFactor(swigCPtr);
676             if (NDalicPINVOKE.SWIGPendingException.Pending)
677                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
678             return ret;
679         }
680
681         public void SetPlayRange(Vector2 range)
682         {
683             NDalicPINVOKE.Animation_SetPlayRange(swigCPtr, Vector2.getCPtr(range));
684             if (NDalicPINVOKE.SWIGPendingException.Pending)
685                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
686         }
687
688         public Vector2 GetPlayRange()
689         {
690             Vector2 ret = new Vector2(NDalicPINVOKE.Animation_GetPlayRange(swigCPtr), true);
691             if (NDalicPINVOKE.SWIGPendingException.Pending)
692                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
693             return ret;
694         }
695
696         public void Play()
697         {
698             NDalicPINVOKE.Animation_Play(swigCPtr);
699             if (NDalicPINVOKE.SWIGPendingException.Pending)
700                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
701         }
702
703         public void PlayFrom(float progress)
704         {
705             NDalicPINVOKE.Animation_PlayFrom(swigCPtr, progress);
706             if (NDalicPINVOKE.SWIGPendingException.Pending)
707                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
708         }
709
710         public void Pause()
711         {
712             NDalicPINVOKE.Animation_Pause(swigCPtr);
713             if (NDalicPINVOKE.SWIGPendingException.Pending)
714                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
715         }
716
717         public Animation.State GetState()
718         {
719             Animation.State ret = (Animation.State)NDalicPINVOKE.Animation_GetState(swigCPtr);
720             if (NDalicPINVOKE.SWIGPendingException.Pending)
721                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
722             return ret;
723         }
724
725         public void Stop()
726         {
727             NDalicPINVOKE.Animation_Stop(swigCPtr);
728             if (NDalicPINVOKE.SWIGPendingException.Pending)
729                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
730         }
731
732         public void Clear()
733         {
734             NDalicPINVOKE.Animation_Clear(swigCPtr);
735             if (NDalicPINVOKE.SWIGPendingException.Pending)
736                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
737         }
738
739         public AnimationSignal FinishedSignal()
740         {
741             AnimationSignal ret = new AnimationSignal(NDalicPINVOKE.Animation_FinishedSignal(swigCPtr), false);
742             if (NDalicPINVOKE.SWIGPendingException.Pending)
743                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
744             return ret;
745         }
746
747         public void AnimateBy(Property target, Property.Value relativeValue)
748         {
749             NDalicPINVOKE.Animation_AnimateBy__SWIG_0(swigCPtr, Property.getCPtr(target), Property.Value.getCPtr(relativeValue));
750             if (NDalicPINVOKE.SWIGPendingException.Pending)
751                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
752         }
753
754         public void AnimateBy(Property target, Property.Value relativeValue, AlphaFunction alpha)
755         {
756             NDalicPINVOKE.Animation_AnimateBy__SWIG_1(swigCPtr, Property.getCPtr(target), Property.Value.getCPtr(relativeValue), AlphaFunction.getCPtr(alpha));
757             if (NDalicPINVOKE.SWIGPendingException.Pending)
758                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
759         }
760
761         public void AnimateBy(Property target, Property.Value relativeValue, TimePeriod period)
762         {
763             NDalicPINVOKE.Animation_AnimateBy__SWIG_2(swigCPtr, Property.getCPtr(target), Property.Value.getCPtr(relativeValue), TimePeriod.getCPtr(period));
764             if (NDalicPINVOKE.SWIGPendingException.Pending)
765                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
766         }
767
768         public void AnimateBy(Property target, Property.Value relativeValue, AlphaFunction alpha, TimePeriod period)
769         {
770             NDalicPINVOKE.Animation_AnimateBy__SWIG_3(swigCPtr, Property.getCPtr(target), Property.Value.getCPtr(relativeValue), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
771             if (NDalicPINVOKE.SWIGPendingException.Pending)
772                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
773         }
774
775         public void AnimateTo(Property target, Property.Value destinationValue)
776         {
777             NDalicPINVOKE.Animation_AnimateTo__SWIG_0(swigCPtr, Property.getCPtr(target), Property.Value.getCPtr(destinationValue));
778             if (NDalicPINVOKE.SWIGPendingException.Pending)
779                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
780         }
781
782         public void AnimateTo(Property target, Property.Value destinationValue, AlphaFunction alpha)
783         {
784             NDalicPINVOKE.Animation_AnimateTo__SWIG_1(swigCPtr, Property.getCPtr(target), Property.Value.getCPtr(destinationValue), AlphaFunction.getCPtr(alpha));
785             if (NDalicPINVOKE.SWIGPendingException.Pending)
786                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
787         }
788
789         public void AnimateTo(Property target, Property.Value destinationValue, TimePeriod period)
790         {
791             NDalicPINVOKE.Animation_AnimateTo__SWIG_2(swigCPtr, Property.getCPtr(target), Property.Value.getCPtr(destinationValue), TimePeriod.getCPtr(period));
792             if (NDalicPINVOKE.SWIGPendingException.Pending)
793                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
794         }
795
796         public void AnimateTo(Property target, Property.Value destinationValue, AlphaFunction alpha, TimePeriod period)
797         {
798             NDalicPINVOKE.Animation_AnimateTo__SWIG_3(swigCPtr, Property.getCPtr(target), Property.Value.getCPtr(destinationValue), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
799             if (NDalicPINVOKE.SWIGPendingException.Pending)
800                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
801         }
802
803         public void AnimateBetween(Property target, KeyFrames keyFrames)
804         {
805             NDalicPINVOKE.Animation_AnimateBetween__SWIG_0(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames));
806             if (NDalicPINVOKE.SWIGPendingException.Pending)
807                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
808         }
809
810         public void AnimateBetween(Property target, KeyFrames keyFrames, Animation.Interpolation interpolation)
811         {
812             NDalicPINVOKE.Animation_AnimateBetween__SWIG_1(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), (int)interpolation);
813             if (NDalicPINVOKE.SWIGPendingException.Pending)
814                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
815         }
816
817         public void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha)
818         {
819             NDalicPINVOKE.Animation_AnimateBetween__SWIG_2(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha));
820             if (NDalicPINVOKE.SWIGPendingException.Pending)
821                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
822         }
823
824         public void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, Animation.Interpolation interpolation)
825         {
826             NDalicPINVOKE.Animation_AnimateBetween__SWIG_3(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), (int)interpolation);
827             if (NDalicPINVOKE.SWIGPendingException.Pending)
828                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
829         }
830
831         public void AnimateBetween(Property target, KeyFrames keyFrames, TimePeriod period)
832         {
833             NDalicPINVOKE.Animation_AnimateBetween__SWIG_4(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), TimePeriod.getCPtr(period));
834             if (NDalicPINVOKE.SWIGPendingException.Pending)
835                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
836         }
837
838         public void AnimateBetween(Property target, KeyFrames keyFrames, TimePeriod period, Animation.Interpolation interpolation)
839         {
840             NDalicPINVOKE.Animation_AnimateBetween__SWIG_5(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), TimePeriod.getCPtr(period), (int)interpolation);
841             if (NDalicPINVOKE.SWIGPendingException.Pending)
842                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
843         }
844
845         public void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period)
846         {
847             NDalicPINVOKE.Animation_AnimateBetween__SWIG_6(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
848             if (NDalicPINVOKE.SWIGPendingException.Pending)
849                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
850         }
851
852         public void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period, Animation.Interpolation interpolation)
853         {
854             NDalicPINVOKE.Animation_AnimateBetween__SWIG_7(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period), (int)interpolation);
855             if (NDalicPINVOKE.SWIGPendingException.Pending)
856                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
857         }
858
859         public void Animate(View view, Path path, Vector3 forward)
860         {
861             NDalicPINVOKE.Animation_Animate__SWIG_0(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward));
862             if (NDalicPINVOKE.SWIGPendingException.Pending)
863                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
864         }
865
866         public void Animate(View view, Path path, Vector3 forward, AlphaFunction alpha)
867         {
868             NDalicPINVOKE.Animation_Animate__SWIG_1(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward), AlphaFunction.getCPtr(alpha));
869             if (NDalicPINVOKE.SWIGPendingException.Pending)
870                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
871         }
872
873         public void Animate(View view, Path path, Vector3 forward, TimePeriod period)
874         {
875             NDalicPINVOKE.Animation_Animate__SWIG_2(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward), TimePeriod.getCPtr(period));
876             if (NDalicPINVOKE.SWIGPendingException.Pending)
877                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
878         }
879
880         public void Animate(View view, Path path, Vector3 forward, AlphaFunction alpha, TimePeriod period)
881         {
882             NDalicPINVOKE.Animation_Animate__SWIG_3(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
883             if (NDalicPINVOKE.SWIGPendingException.Pending)
884                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
885         }
886
887         public void Show(View view, float delaySeconds)
888         {
889             NDalicPINVOKE.Animation_Show(swigCPtr, View.getCPtr(view), delaySeconds);
890             if (NDalicPINVOKE.SWIGPendingException.Pending)
891                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
892         }
893
894         public void Hide(View view, float delaySeconds)
895         {
896             NDalicPINVOKE.Animation_Hide(swigCPtr, View.getCPtr(view), delaySeconds);
897             if (NDalicPINVOKE.SWIGPendingException.Pending)
898                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
899         }
900
901         public enum EndActions
902         {
903             Cancel,
904             Discard,
905             StopFinal
906         }
907
908         public enum Interpolation
909         {
910             Linear,
911             Cubic
912         }
913
914         public enum State
915         {
916             Stopped,
917             Playing,
918             Paused
919         }
920
921     }
922
923 }