1 // Copyright (c) 2017 Samsung Electronics Co., Ltd.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 // Some have been manually changed
23 using System.Runtime.InteropServices;
26 /// Animation can be used to animate the properties of any number of objects, typically Actors.<br>
27 /// If the "Finished" event is connected to a member function of an object, it must be disconnected before the object is destroyed.<br>
28 /// This is typically done in the object destructor, and requires either the Animation handle to be stored.<br>
29 /// The overall animation time is superseded by the values given in the Duration property used when calling the AnimateTo(), AnimateBy(), AnimateBetween() and AnimatePath() methods.<br>
30 /// 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 public class Animation : BaseHandle
34 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
36 internal Animation(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Animation_SWIGUpcast(cPtr), cMemoryOwn)
38 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
41 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Animation obj)
43 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
48 DisposeQueue.Instance.Add(this);
52 /// To make Animation instance be disposed.
54 public override void Dispose()
56 if (!Stage.IsInstalled())
58 DisposeQueue.Instance.Add(this);
64 if (swigCPtr.Handle != global::System.IntPtr.Zero)
69 NDalicPINVOKE.delete_Animation(swigCPtr);
71 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
73 global::System.GC.SuppressFinalize(this);
79 /// Create an initialized Animation.<br>
80 /// The animation will not loop.<br>
81 /// The default end action is "Cancel".<br>
82 /// The default Alpha function is linear.<br>
83 /// Precodition : DurationmSeconds must be greater than zero.<br>
85 /// <param name="durationMilliSeconds">The duration in milli seconds (int).</param>
86 public Animation(int durationMilliSeconds) : this(NDalicPINVOKE.Animation_New((float)durationMilliSeconds / 1000.0f), true)
88 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
91 private AnimationFinishedEventCallbackType _animationFinishedEventCallback;
92 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
93 private delegate void AnimationFinishedEventCallbackType(IntPtr data);
94 private event EventHandler _animationFinishedEventHandler;
96 * @brief Event for Finished signal which can be used to subscribe/unsubscribe the event handler.
97 * Finished signal is emitted when an Animation's animations have finished.
99 public event EventHandler Finished
103 if (_animationFinishedEventHandler == null)
106 Tizen.Log.Debug("NUI", "con1) FinishedSignal().Empty = " + FinishedSignal().Empty());
107 Tizen.Log.Debug("NUI", "con2) FinishedSignal().GetConnectionCount = " + FinishedSignal().GetConnectionCount());
109 _animationFinishedEventCallback = OnFinished;
110 FinishedSignal().Connect(_animationFinishedEventCallback);
112 Tizen.Log.Debug("NUI", "con3) FinishedSignal().Empty = " + FinishedSignal().Empty());
113 Tizen.Log.Debug("NUI", "con4) FinishedSignal().GetConnectionCount = " + FinishedSignal().GetConnectionCount());
117 _animationFinishedEventHandler += value;
121 _animationFinishedEventHandler -= value;
123 if (_animationFinishedEventHandler == null && FinishedSignal().Empty() == false)
126 Tizen.Log.Debug("NUI", "discon1) FinishedSignal().Empty = " + FinishedSignal().Empty());
127 Tizen.Log.Debug("NUI", "discon2) FinishedSignal().GetConnectionCount = " + FinishedSignal().GetConnectionCount());
129 FinishedSignal().Disconnect(_animationFinishedEventCallback);
131 Tizen.Log.Debug("NUI", "discon3) FinishedSignal().Empty = " + FinishedSignal().Empty());
132 Tizen.Log.Debug("NUI", "discon4) FinishedSignal().GetConnectionCount = " + FinishedSignal().GetConnectionCount());
137 private void OnFinished(IntPtr data)
139 if (_animationFinishedEventHandler != null)
141 //here we send all data to user event handlers
142 _animationFinishedEventHandler(this, null);
147 internal static Animation GetAnimationFromPtr(global::System.IntPtr cPtr)
149 Animation ret = new Animation(cPtr, false);
150 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
154 private float MilliSecondsToSeconds(int millisec)
156 return (float)millisec / 1000.0f;
159 private int SecondsToMilliSeconds(float sec)
161 return (int)(sec * 1000);
166 /// Gets/Sets the duration of animation.
172 SetDuration(MilliSecondsToSeconds(value));
176 return SecondsToMilliSeconds(GetDuration());
181 /// Gets/Sets the default alpha function for an animation.
183 public AlphaFunction DefaultAlphaFunction
187 SetDefaultAlphaFunction(value);
191 AlphaFunction ret = GetDefaultAlphaFunction();
197 /// Queries the state of the animation.
208 /// Set : Enables looping for 'count' repeats. A zero is the same as Looping = true; i.e.repeat forever.<br>
209 /// If Play() Stop() or 'count' loops is reached, the loop counter will reset.<br>
210 /// Setting this parameter does not cause the animation to Play().<br>
211 /// Get : Gets the loop count. A zero is the same as Looping = true; ie repeat forever.<br>
212 /// The loop count is initially 1 for play once.<br>
222 int ret = GetLoopCount();
228 /// Gets/Sets the status of whether the animation will loop.<br>
229 /// This property resets the loop count and should not be used with LoopCount property.<br>
230 /// Setting this parameter does not cause the animation to Play().<br>
240 bool ret = IsLooping();
247 /// Gets/Sets the end action of the animation.<br>
248 /// This action is performed when the animation ends or if it is stopped.<br>
249 /// Default end action is Cancel.<br>
251 public EndActions EndAction
259 return GetEndAction();
265 /// Stops the animation.
267 /// <param name="action">end action can be set</param>
268 public void Stop(EndActions action = EndActions.Cancel)
270 SetEndAction(action);
271 NDalicPINVOKE.Animation_Stop(swigCPtr);
272 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
276 /// Gets the current loop count.<br>
277 /// A value 0 to CurrentLoop indicating the current loop count when looping.<br>
279 public int CurrentLoop
283 return GetCurrentLoop();
288 /// Gets/Sets the disconnect action.<br>
289 /// If any of the animated property owners are disconnected from the stage while the animation is being played, then this action is performed.<br>
290 /// Default action is to Cancel.<br>
292 public EndActions DisconnectAction
296 NDalicPINVOKE.Animation_SetDisconnectAction(swigCPtr, (int)value);
297 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
301 Animation.EndActions ret = (Animation.EndActions)NDalicPINVOKE.Animation_GetDisconnectAction(swigCPtr);
302 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
309 /// Gets/Sets the progress of the animation.<br>
310 /// The animation will play(or continue playing) from this point.<br>
311 /// The progress must be in the 0-1 interval or in the play range interval if defined.<br>
312 /// otherwise, it will be ignored.<br>
314 public float CurrentProgress
318 NDalicPINVOKE.Animation_SetCurrentProgress(swigCPtr, value);
319 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323 float ret = NDalicPINVOKE.Animation_GetCurrentProgress(swigCPtr);
324 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
330 /// Gets/Sets Specifies a speed factor for the animation.<br>
331 /// The speed factor is a multiplier of the normal velocity of the animation.<br>
332 /// Values between[0, 1] will slow down the animation and values above one will speed up the animation.<br>
333 /// It is also possible to specify a negative multiplier to play the animation in reverse.<br>
335 public float SpeedFactor
339 NDalicPINVOKE.Animation_SetSpeedFactor(swigCPtr, value);
340 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
344 float ret = NDalicPINVOKE.Animation_GetSpeedFactor(swigCPtr);
345 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
351 /// Gets/Sets the playing range.<br>
352 /// Animation will play between the values specified. Both values(range.x and range.y ) should be between 0-1,
353 /// otherwise they will be ignored.If the range provided is not in proper order(minimum, maximum ), it will be reordered.<br>
355 public RelativeVector2 PlayRange
359 NDalicPINVOKE.Animation_SetPlayRange(swigCPtr, Vector2.getCPtr(value));
360 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
364 Vector2 ret = new Vector2(NDalicPINVOKE.Animation_GetPlayRange(swigCPtr), true);
365 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
371 /// Animates a property value by a relative amount.<br>
372 /// The default alpha function will be used.<br>
373 /// The effect will start & end when the animation begins & ends.<br>
375 /// <param name="target">The target object to animate</param>
376 /// <param name="property">The target property to animate</param>
377 /// <param name="relativeValue">The property value will change by this amount</param>
378 /// <param name="alphaFunction">The alpha function to apply</param>
379 public void AnimateBy(Actor target, string property, object relativeValue, AlphaFunction alphaFunction = null)
381 string _str1 = property.Substring(0, 1);
382 string _str2 = property.Substring(1);
383 string _str = _str1.ToLower() + _str2;
385 Property _prop = new Property(target, _str);
386 if (_prop.propertyIndex == Property.INVALID_INDEX)
388 throw new System.Exception("second argument string property is invalid parameter!");
391 //dynamic obj = (object)relativeValue;
392 PropertyValue val = PropertyValue.CreateFromObject(relativeValue);
394 if (alphaFunction != null)
396 AnimateBy(_prop, new PropertyValue(val), alphaFunction);
400 AnimateBy(_prop, new PropertyValue(val));
405 /// Animates a property value by a relative amount.<br>
406 /// The default alpha function will be used.<br>
407 /// The effect will start & end when the animation begins & ends.<br>
409 /// <param name="target">The target object to animate</param>
410 /// <param name="property">The target property to animate</param>
411 /// <param name="relativeValue">The property value will change by this amount</param>
412 /// <param name="startTime">Start time of animation</param>
413 /// <param name="endTime">End time of animation</param>
414 /// <param name="alphaFunction">The alpha function to apply</param>
415 public void AnimateBy(Actor target, string property, object relativeValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
417 string _str1 = property.Substring(0, 1);
418 string _str2 = property.Substring(1);
419 string _str = _str1.ToLower() + _str2;
421 Property _prop = new Property(target, _str);
422 if (_prop.propertyIndex == Property.INVALID_INDEX)
424 throw new System.Exception("second argument string property is invalid parameter!");
427 //dynamic obj = (object)relativeValue;
428 PropertyValue val = PropertyValue.CreateFromObject(relativeValue);
430 if (alphaFunction != null)
432 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
433 AnimateBy(_prop, new PropertyValue(val), alphaFunction, time);
437 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
438 AnimateBy(_prop, new PropertyValue(val), time);
443 /// Animates a property to a destination value.<br>
444 /// The default alpha function will be used.<br>
445 /// The effect will start & end when the animation begins & ends.<br>
447 /// <param name="target">The target object to animate</param>
448 /// <param name="property">The target property to animate</param>
449 /// <param name="destinationValue">The destination value</param>
450 /// <param name="alphaFunction">The alpha function to apply</param>
451 public void AnimateTo(Actor target, string property, object destinationValue, AlphaFunction alphaFunction = null)
453 string _str1 = property.Substring(0, 1);
454 string _str2 = property.Substring(1);
455 string _str = _str1.ToLower() + _str2;
457 Property _prop = new Property(target, _str);
458 if (_prop.propertyIndex == Property.INVALID_INDEX)
460 throw new System.Exception("second argument string property is invalid parameter!");
463 //dynamic obj = (object)destinationValue;
464 PropertyValue val = PropertyValue.CreateFromObject(destinationValue);
466 if (alphaFunction != null)
468 AnimateTo(_prop, new PropertyValue(val), alphaFunction);
472 AnimateTo(_prop, new PropertyValue(val));
477 /// Animates a property to a destination value.<br>
478 /// The default alpha function will be used.<br>
479 /// The effect will start & end when the animation begins & ends.<br>
481 /// <param name="target">The target object to animate</param>
482 /// <param name="property">The target property to animate</param>
483 /// <param name="destinationValue">The destination value</param>
484 /// <param name="alphaFunction">The alpha function to apply</param>
485 /// <param name="startTime">Start time of animation</param>
486 /// <param name="endTime">End time of animation</param>
487 /// <param name="alphaFunction"></param>
488 public void AnimateTo(Actor target, string property, object destinationValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
490 string _str1 = property.Substring(0, 1);
491 string _str2 = property.Substring(1);
492 string _str = _str1.ToLower() + _str2;
494 Property _prop = new Property(target, _str);
495 if (_prop.propertyIndex == Property.INVALID_INDEX)
497 throw new System.Exception("second argument string property is invalid parameter!");
500 //dynamic obj = (object)destinationValue;
501 PropertyValue val = PropertyValue.CreateFromObject(destinationValue);
503 if (alphaFunction != null)
505 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
506 AnimateTo(_prop, new PropertyValue(val), alphaFunction, time);
510 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
511 AnimateTo(_prop, new PropertyValue(val), time);
516 /// Animates a property between keyframes.
518 /// <param name="target">The target object to animate</param>
519 /// <param name="property">The target property to animate</param>
520 /// <param name="keyFrames">The set of time/value pairs between which to animate</param>
521 /// <param name="interpolation">The method used to interpolate between values</param>
522 /// <param name="alphaFunction">The alpha function to apply</param>
523 public void AnimateBetween(Actor target, string property, KeyFrames keyFrames, Interpolation interpolation = Interpolation.Linear, AlphaFunction alphaFunction = null)
525 string _str1 = property.Substring(0, 1);
526 string _str2 = property.Substring(1);
527 string _str = _str1.ToLower() + _str2;
529 Property _prop = new Property(target, _str);
530 if (_prop.propertyIndex == Property.INVALID_INDEX)
532 throw new System.Exception("second argument string property is invalid parameter!");
535 if (alphaFunction != null)
537 AnimateBetween(_prop, keyFrames, alphaFunction, interpolation);
541 AnimateBetween(_prop, keyFrames, interpolation);
547 /// Animates a property between keyframes.
549 /// <param name="target">The target object to animate</param>
550 /// <param name="property">The target property to animate</param>
551 /// <param name="keyFrames">The set of time/value pairs between which to animate</param>
552 /// <param name="startTime">Start time of animation</param>
553 /// <param name="endTime">End time of animation</param>
554 /// <param name="interpolation">The method used to interpolate between values</param>
555 /// <param name="alphaFunction">The alpha function to apply</param>
556 public void AnimateBetween(Actor target, string property, KeyFrames keyFrames, int startTime, int endTime, Interpolation interpolation = Interpolation.Linear, AlphaFunction alphaFunction = null)
558 string _str1 = property.Substring(0, 1);
559 string _str2 = property.Substring(1);
560 string _str = _str1.ToLower() + _str2;
562 Property _prop = new Property(target, _str);
563 if (_prop.propertyIndex == Property.INVALID_INDEX)
565 throw new System.Exception("second argument string property is invalid parameter!");
568 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
569 if (alphaFunction != null)
571 AnimateBetween(_prop, keyFrames, alphaFunction, time, interpolation);
575 AnimateBetween(_prop, keyFrames, time, interpolation);
580 /// Animates an actor's position and orientation through a predefined path.<br>
581 /// The actor will rotate to orient the supplied forward vector with the path's tangent.<br>
582 /// If forward is the zero vector then no rotation will happen.<br>
584 /// <param name="actor">The actor to animate</param>
585 /// <param name="path">It defines position and orientation</param>
586 /// <param name="forward">The vector (in local space coordinate system) that will be oriented with the path's tangent direction</param>
587 /// <param name="alphaFunction">The alpha function to apply</param>
588 public void AnimatePath(Actor actor, Path path, Vector3 forward, AlphaFunction alphaFunction = null)
590 if (alphaFunction == null)
592 Animate(actor, path, forward);
596 Animate(actor, path, forward, alphaFunction);
601 /// Animates an actor's position and orientation through a predefined path.<br>
602 /// The actor will rotate to orient the supplied forward vector with the path's tangent.<br>
603 /// If forward is the zero vector then no rotation will happen.<br>
605 /// <param name="actor">The actor to animate</param>
606 /// <param name="path">It defines position and orientation</param>
607 /// <param name="forward">The vector (in local space coordinate system) that will be oriented with the path's tangent direction</param>
608 /// <param name="startTime">Start time of animation</param>
609 /// <param name="endTime">End time of animation</param>
610 /// <param name="alphaFunction">The alpha function to apply</param>
611 public void AnimatePath(Actor actor, Path path, Vector3 forward, int startTime, int endTime, AlphaFunction alphaFunction = null)
613 TimePeriod time = new TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
614 if (alphaFunction == null)
616 Animate(actor, path, forward, time);
620 Animate(actor, path, forward, alphaFunction, time);
625 /// Creates an initialized Animation.<br>
626 /// The animation will not loop.<br>
627 /// The default end action is "Cancel".<br>
628 /// The default alpha function is linear.<br>
630 public Animation() : this(NDalicPINVOKE.Animation_New(0.0f), true)
632 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
635 internal Animation(float durationSeconds) : this(NDalicPINVOKE.Animation_New(durationSeconds), true)
637 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
642 /// Downcasts a handle to Animation handle.<br>
643 /// If handle points to an Animation object, the downcast produces valid handle.<br>
644 /// If not, the returned handle is left uninitialized.<br>
646 /// <param name="handle">Handle to an object</param>
647 /// <returns>Handle to an Animation object or an uninitialized handle</returns>
648 public static Animation DownCast(BaseHandle handle)
650 Animation ret = new Animation(NDalicPINVOKE.Animation_DownCast(BaseHandle.getCPtr(handle)), true);
651 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
655 internal Animation(Animation handle) : this(NDalicPINVOKE.new_Animation__SWIG_1(Animation.getCPtr(handle)), true)
657 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
660 internal Animation Assign(Animation rhs)
662 Animation ret = new Animation(NDalicPINVOKE.Animation_Assign(swigCPtr, Animation.getCPtr(rhs)), false);
663 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
667 internal void SetDuration(float seconds)
669 NDalicPINVOKE.Animation_SetDuration(swigCPtr, seconds);
670 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
673 internal float GetDuration()
675 float ret = NDalicPINVOKE.Animation_GetDuration(swigCPtr);
676 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
680 internal void SetLooping(bool looping)
682 NDalicPINVOKE.Animation_SetLooping(swigCPtr, looping);
683 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
686 internal void SetLoopCount(int count)
688 NDalicPINVOKE.Animation_SetLoopCount(swigCPtr, count);
689 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
692 internal int GetLoopCount()
694 int ret = NDalicPINVOKE.Animation_GetLoopCount(swigCPtr);
695 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
699 internal int GetCurrentLoop()
701 int ret = NDalicPINVOKE.Animation_GetCurrentLoop(swigCPtr);
702 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
706 internal bool IsLooping()
708 bool ret = NDalicPINVOKE.Animation_IsLooping(swigCPtr);
709 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
713 internal void SetEndAction(Animation.EndActions action)
715 NDalicPINVOKE.Animation_SetEndAction(swigCPtr, (int)action);
716 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
719 internal Animation.EndActions GetEndAction()
721 Animation.EndActions ret = (Animation.EndActions)NDalicPINVOKE.Animation_GetEndAction(swigCPtr);
722 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
726 internal void SetDisconnectAction(Animation.EndActions disconnectAction)
728 NDalicPINVOKE.Animation_SetDisconnectAction(swigCPtr, (int)disconnectAction);
729 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
732 internal Animation.EndActions GetDisconnectAction()
734 Animation.EndActions ret = (Animation.EndActions)NDalicPINVOKE.Animation_GetDisconnectAction(swigCPtr);
735 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
739 internal void SetDefaultAlphaFunction(AlphaFunction alpha)
741 NDalicPINVOKE.Animation_SetDefaultAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha));
742 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
745 internal AlphaFunction GetDefaultAlphaFunction()
747 AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.Animation_GetDefaultAlphaFunction(swigCPtr), true);
748 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
752 internal void SetCurrentProgress(float progress)
754 NDalicPINVOKE.Animation_SetCurrentProgress(swigCPtr, progress);
755 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
758 internal float GetCurrentProgress()
760 float ret = NDalicPINVOKE.Animation_GetCurrentProgress(swigCPtr);
761 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
765 internal void SetSpeedFactor(float factor)
767 NDalicPINVOKE.Animation_SetSpeedFactor(swigCPtr, factor);
768 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
771 internal float GetSpeedFactor()
773 float ret = NDalicPINVOKE.Animation_GetSpeedFactor(swigCPtr);
774 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
778 internal void SetPlayRange(Vector2 range)
780 NDalicPINVOKE.Animation_SetPlayRange(swigCPtr, Vector2.getCPtr(range));
781 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
784 internal Vector2 GetPlayRange()
786 Vector2 ret = new Vector2(NDalicPINVOKE.Animation_GetPlayRange(swigCPtr), true);
787 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
792 /// Play the animation.
796 NDalicPINVOKE.Animation_Play(swigCPtr);
797 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
801 /// Plays the animation from a given point.<br>
802 /// The progress must be in the 0-1 interval or in the play range interval if defined,
803 /// otherwise, it will be ignored.<br>
805 /// <param name="progress">A value between [0,1], or between the play range if specified, from where the animation should start playing</param>
806 public void PlayFrom(float progress)
808 NDalicPINVOKE.Animation_PlayFrom(swigCPtr, progress);
809 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
813 /// Pauses the animation.
817 NDalicPINVOKE.Animation_Pause(swigCPtr);
818 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
821 internal Animation.States GetState()
823 Animation.States ret = (Animation.States)NDalicPINVOKE.Animation_GetState(swigCPtr);
824 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
829 /// Stops the animation.
833 NDalicPINVOKE.Animation_Stop(swigCPtr);
834 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
838 /// Clears the animation.<br>
839 /// This disconnects any objects that were being animated, effectively stopping the animation.<br>
843 NDalicPINVOKE.Animation_Clear(swigCPtr);
844 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
847 internal AnimationSignal FinishedSignal()
849 AnimationSignal ret = new AnimationSignal(NDalicPINVOKE.Animation_FinishedSignal(swigCPtr), false);
850 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
854 internal void AnimateBy(Property target, PropertyValue relativeValue)
856 NDalicPINVOKE.Animation_AnimateBy__SWIG_0(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue));
857 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
860 internal void AnimateBy(Property target, PropertyValue relativeValue, AlphaFunction alpha)
862 NDalicPINVOKE.Animation_AnimateBy__SWIG_1(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue), AlphaFunction.getCPtr(alpha));
863 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
866 internal void AnimateBy(Property target, PropertyValue relativeValue, TimePeriod period)
868 NDalicPINVOKE.Animation_AnimateBy__SWIG_2(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue), TimePeriod.getCPtr(period));
869 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
872 internal void AnimateBy(Property target, PropertyValue relativeValue, AlphaFunction alpha, TimePeriod period)
874 NDalicPINVOKE.Animation_AnimateBy__SWIG_3(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
875 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
878 internal void AnimateTo(Property target, PropertyValue destinationValue)
880 NDalicPINVOKE.Animation_AnimateTo__SWIG_0(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue));
881 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
884 internal void AnimateTo(Property target, PropertyValue destinationValue, AlphaFunction alpha)
886 NDalicPINVOKE.Animation_AnimateTo__SWIG_1(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue), AlphaFunction.getCPtr(alpha));
887 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
890 internal void AnimateTo(Property target, PropertyValue destinationValue, TimePeriod period)
892 NDalicPINVOKE.Animation_AnimateTo__SWIG_2(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue), TimePeriod.getCPtr(period));
893 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
896 internal void AnimateTo(Property target, PropertyValue destinationValue, AlphaFunction alpha, TimePeriod period)
898 NDalicPINVOKE.Animation_AnimateTo__SWIG_3(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
899 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
902 internal void AnimateBetween(Property target, KeyFrames keyFrames)
904 NDalicPINVOKE.Animation_AnimateBetween__SWIG_0(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames));
905 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
908 internal void AnimateBetween(Property target, KeyFrames keyFrames, Animation.Interpolation interpolation)
910 NDalicPINVOKE.Animation_AnimateBetween__SWIG_1(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), (int)interpolation);
911 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
914 internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha)
916 NDalicPINVOKE.Animation_AnimateBetween__SWIG_2(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha));
917 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
920 internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, Animation.Interpolation interpolation)
922 NDalicPINVOKE.Animation_AnimateBetween__SWIG_3(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), (int)interpolation);
923 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
926 internal void AnimateBetween(Property target, KeyFrames keyFrames, TimePeriod period)
928 NDalicPINVOKE.Animation_AnimateBetween__SWIG_4(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), TimePeriod.getCPtr(period));
929 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
932 internal void AnimateBetween(Property target, KeyFrames keyFrames, TimePeriod period, Animation.Interpolation interpolation)
934 NDalicPINVOKE.Animation_AnimateBetween__SWIG_5(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), TimePeriod.getCPtr(period), (int)interpolation);
935 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
938 internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period)
940 NDalicPINVOKE.Animation_AnimateBetween__SWIG_6(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
941 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
944 internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period, Animation.Interpolation interpolation)
946 NDalicPINVOKE.Animation_AnimateBetween__SWIG_7(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period), (int)interpolation);
947 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
950 internal void Animate(Actor actor, Path path, Vector3 forward)
952 NDalicPINVOKE.Animation_Animate__SWIG_0(swigCPtr, Actor.getCPtr(actor), Path.getCPtr(path), Vector3.getCPtr(forward));
953 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
956 internal void Animate(Actor actor, Path path, Vector3 forward, AlphaFunction alpha)
958 NDalicPINVOKE.Animation_Animate__SWIG_1(swigCPtr, Actor.getCPtr(actor), Path.getCPtr(path), Vector3.getCPtr(forward), AlphaFunction.getCPtr(alpha));
959 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
962 internal void Animate(Actor actor, Path path, Vector3 forward, TimePeriod period)
964 NDalicPINVOKE.Animation_Animate__SWIG_2(swigCPtr, Actor.getCPtr(actor), Path.getCPtr(path), Vector3.getCPtr(forward), TimePeriod.getCPtr(period));
965 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
968 internal void Animate(Actor actor, Path path, Vector3 forward, AlphaFunction alpha, TimePeriod period)
970 NDalicPINVOKE.Animation_Animate__SWIG_3(swigCPtr, Actor.getCPtr(actor), Path.getCPtr(path), Vector3.getCPtr(forward), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
971 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
974 internal void Show(Actor actor, float delaySeconds)
976 NDalicPINVOKE.Animation_Show(swigCPtr, Actor.getCPtr(actor), delaySeconds);
977 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
980 internal void Hide(Actor actor, float delaySeconds)
982 NDalicPINVOKE.Animation_Hide(swigCPtr, Actor.getCPtr(actor), delaySeconds);
983 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
987 /// Enumeration for what to do when the animation ends, is stopped, or is destroyed.<br>
988 /// Cancel : When the animation ends, the animated property values are saved.<br>
989 /// Discard : When the animation ends, the animated property values are forgotten.<br>
990 /// StopFinal : If the animation is stopped, the animated property values are saved as if the animation had run to completion, otherwise behaves like Cancel.<br>
992 public enum EndActions
1000 /// Enumeration for what interpolation method to use on key-frame animations.<br>
1001 /// Linear : Values in between key frames are interpolated using a linear polynomial. (Default).<br>
1002 /// Cubic : Values in between key frames are interpolated using a cubic polynomial.<br>
1004 public enum Interpolation
1011 /// Enumeration for what state the animation is in.<br>
1012 /// Note: Calling Reset() on this class will NOT reset the animation. It will call BaseHandle.Reset() which drops the object handle.<br>