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;
24 using Tizen.NUI.BaseComponents;
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>
33 public class Animation : BaseHandle
35 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
37 internal Animation(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Animation_SWIGUpcast(cPtr), cMemoryOwn)
39 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
42 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Animation obj)
44 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
48 /// To make Animation instance be disposed.
50 public override void Dispose()
52 if (!Window.IsInstalled())
54 DisposeQueue.Instance.Add(this);
60 if (swigCPtr.Handle != global::System.IntPtr.Zero)
65 NDalicPINVOKE.delete_Animation(swigCPtr);
67 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
69 global::System.GC.SuppressFinalize(this);
75 /// Create an initialized Animation.<br>
76 /// The animation will not loop.<br>
77 /// The default end action is "Cancel".<br>
78 /// The default Alpha function is linear.<br>
80 /// <remarks>DurationmSeconds must be greater than zero.</remarks>
81 /// <param name="durationMilliSeconds">The duration in milli seconds.</param>
82 public Animation(int durationMilliSeconds) : this(NDalicPINVOKE.Animation_New((float)durationMilliSeconds / 1000.0f), true)
84 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
87 private AnimationFinishedEventCallbackType _animationFinishedEventCallback;
88 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
89 private delegate void AnimationFinishedEventCallbackType(IntPtr data);
90 private event EventHandler _animationFinishedEventHandler;
92 * @brief Event for Finished signal which can be used to subscribe/unsubscribe the event handler.
93 * Finished signal is emitted when an Animation's animations have finished.
95 public event EventHandler Finished
99 if (_animationFinishedEventHandler == null)
102 Tizen.Log.Debug("NUI", "con1) FinishedSignal().Empty = " + FinishedSignal().Empty());
103 Tizen.Log.Debug("NUI", "con2) FinishedSignal().GetConnectionCount = " + FinishedSignal().GetConnectionCount());
105 _animationFinishedEventCallback = OnFinished;
106 FinishedSignal().Connect(_animationFinishedEventCallback);
108 Tizen.Log.Debug("NUI", "con3) FinishedSignal().Empty = " + FinishedSignal().Empty());
109 Tizen.Log.Debug("NUI", "con4) FinishedSignal().GetConnectionCount = " + FinishedSignal().GetConnectionCount());
113 _animationFinishedEventHandler += value;
117 _animationFinishedEventHandler -= value;
119 if (_animationFinishedEventHandler == null && FinishedSignal().Empty() == false)
122 Tizen.Log.Debug("NUI", "discon1) FinishedSignal().Empty = " + FinishedSignal().Empty());
123 Tizen.Log.Debug("NUI", "discon2) FinishedSignal().GetConnectionCount = " + FinishedSignal().GetConnectionCount());
125 FinishedSignal().Disconnect(_animationFinishedEventCallback);
127 Tizen.Log.Debug("NUI", "discon3) FinishedSignal().Empty = " + FinishedSignal().Empty());
128 Tizen.Log.Debug("NUI", "discon4) FinishedSignal().GetConnectionCount = " + FinishedSignal().GetConnectionCount());
133 private void OnFinished(IntPtr data)
135 if (_animationFinishedEventHandler != null)
137 //here we send all data to user event handlers
138 _animationFinishedEventHandler(this, null);
143 internal static Animation GetAnimationFromPtr(global::System.IntPtr cPtr)
145 Animation ret = new Animation(cPtr, false);
146 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150 private float MilliSecondsToSeconds(int millisec)
152 return (float)millisec / 1000.0f;
155 private int SecondsToMilliSeconds(float sec)
157 return (int)(sec * 1000);
162 /// Gets/Sets the duration in milli seconds of the animation.
168 SetDuration(MilliSecondsToSeconds(value));
172 return SecondsToMilliSeconds(GetDuration());
177 /// Gets/Sets the default alpha function for the animation.
179 public AlphaFunction DefaultAlphaFunction
183 SetDefaultAlphaFunction(value);
187 AlphaFunction ret = GetDefaultAlphaFunction();
193 /// Queries the state of the animation.
204 /// Set : Enables looping for 'count' repeats. A zero is the same as Looping = true; i.e.repeat forever.<br>
205 /// If Play() Stop() or 'count' loops is reached, the loop counter will reset.<br>
206 /// Setting this parameter does not cause the animation to Play().<br>
207 /// Get : Gets the loop count. A zero is the same as Looping = true; ie repeat forever.<br>
208 /// The loop count is initially 1 for play once.<br>
218 int ret = GetLoopCount();
224 /// Gets/Sets the status of whether the animation will loop.<br>
225 /// This property resets the loop count and should not be used with LoopCount property.<br>
226 /// Setting this parameter does not cause the animation to Play().<br>
236 bool ret = IsLooping();
243 /// Gets/Sets the end action of the animation.<br>
244 /// This action is performed when the animation ends or if it is stopped.<br>
245 /// Default end action is Cancel.<br>
247 public EndActions EndAction
255 return GetEndAction();
261 /// Stops the animation.
263 /// <param name="action">end action can be set</param>
264 public void Stop(EndActions action = EndActions.Cancel)
266 SetEndAction(action);
267 NDalicPINVOKE.Animation_Stop(swigCPtr);
268 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
272 /// Gets the current loop count.<br>
273 /// A value 0 indicating the current loop count when looping.<br>
275 public int CurrentLoop
279 return GetCurrentLoop();
284 /// Gets/Sets the disconnect action.<br>
285 /// If any of the animated property owners are disconnected from the stage while the animation is being played, then this action is performed.<br>
286 /// Default action is to Cancel.<br>
288 public EndActions DisconnectAction
292 NDalicPINVOKE.Animation_SetDisconnectAction(swigCPtr, (int)value);
293 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
297 Animation.EndActions ret = (Animation.EndActions)NDalicPINVOKE.Animation_GetDisconnectAction(swigCPtr);
298 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
305 /// Gets/Sets the progress of the animation.<br>
306 /// The animation will play(or continue playing) from this point.<br>
307 /// The progress must be in the 0-1 interval or in the play range interval if defined.<br>
308 /// otherwise, it will be ignored.<br>
310 public float CurrentProgress
314 NDalicPINVOKE.Animation_SetCurrentProgress(swigCPtr, value);
315 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
319 float ret = NDalicPINVOKE.Animation_GetCurrentProgress(swigCPtr);
320 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
326 /// Gets/Sets Specifies a speed factor for the animation.<br>
327 /// The speed factor is a multiplier of the normal velocity of the animation.<br>
328 /// Values between[0, 1] will slow down the animation and values above one will speed up the animation.<br>
329 /// It is also possible to specify a negative multiplier to play the animation in reverse.<br>
331 public float SpeedFactor
335 NDalicPINVOKE.Animation_SetSpeedFactor(swigCPtr, value);
336 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
340 float ret = NDalicPINVOKE.Animation_GetSpeedFactor(swigCPtr);
341 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
347 /// Gets/Sets the playing range.<br>
348 /// Animation will play between the values specified. Both values(range.x and range.y ) should be between 0-1,
349 /// otherwise they will be ignored.If the range provided is not in proper order(minimum, maximum ), it will be reordered.<br>
351 public RelativeVector2 PlayRange
355 NDalicPINVOKE.Animation_SetPlayRange(swigCPtr, Vector2.getCPtr(value));
356 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
360 Vector2 ret = new Vector2(NDalicPINVOKE.Animation_GetPlayRange(swigCPtr), true);
361 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
367 /// Animates a property value by a relative amount.<br>
369 /// <param name="target">The target object to animate</param>
370 /// <param name="property">The target property to animate</param>
371 /// <param name="relativeValue">The property value will change by this amount</param>
372 /// <param name="alphaFunction">The alpha function to apply</param>
373 public void AnimateBy(View target, string property, object relativeValue, AlphaFunction alphaFunction = null)
375 string _str1 = property.Substring(0, 1);
376 string _str2 = property.Substring(1);
377 string _str = _str1.ToLower() + _str2;
379 Property _prop = new Property(target, _str);
380 if (_prop.propertyIndex == Property.INVALID_INDEX)
382 throw new System.ArgumentException("second argument string property is invalid parameter!");
385 PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
386 if(propertyType.Equals(PropertyType.Float))
388 System.Type type = relativeValue.GetType();
389 if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
391 int num = (int)relativeValue;
392 relativeValue = (float)num;
396 PropertyValue val = PropertyValue.CreateFromObject(relativeValue);
398 if (alphaFunction != null)
400 AnimateBy(_prop, val, alphaFunction);
404 AnimateBy(_prop, val);
409 /// Animates a property value by a relative amount.<br>
411 /// <param name="target">The target object to animate</param>
412 /// <param name="property">The target property to animate</param>
413 /// <param name="relativeValue">The property value will change by this amount</param>
414 /// <param name="startTime">Start time of animation</param>
415 /// <param name="endTime">End time of animation</param>
416 /// <param name="alphaFunction">The alpha function to apply</param>
417 public void AnimateBy(View target, string property, object relativeValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
419 string _str1 = property.Substring(0, 1);
420 string _str2 = property.Substring(1);
421 string _str = _str1.ToLower() + _str2;
423 Property _prop = new Property(target, _str);
424 if (_prop.propertyIndex == Property.INVALID_INDEX)
426 throw new System.ArgumentException("second argument string property is invalid parameter!");
429 PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
430 if(propertyType.Equals(PropertyType.Float))
432 System.Type type = relativeValue.GetType();
433 if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
435 int num = (int)relativeValue;
436 relativeValue = (float)num;
440 PropertyValue val = PropertyValue.CreateFromObject(relativeValue);
442 if (alphaFunction != null)
444 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
445 AnimateBy(_prop, val, alphaFunction, time);
449 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
450 AnimateBy(_prop, val, time);
455 /// Animates a property to a destination value.<br>
457 /// <param name="target">The target object to animate</param>
458 /// <param name="property">The target property to animate</param>
459 /// <param name="destinationValue">The destination value</param>
460 /// <param name="alphaFunction">The alpha function to apply</param>
461 public void AnimateTo(View target, string property, object destinationValue, AlphaFunction alphaFunction = null)
463 string _str1 = property.Substring(0, 1);
464 string _str2 = property.Substring(1);
465 string _str = _str1.ToLower() + _str2;
467 Property _prop = new Property(target, _str);
468 if (_prop.propertyIndex == Property.INVALID_INDEX)
470 throw new System.ArgumentException("second argument string property is invalid parameter!");
473 PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
474 if(propertyType.Equals(PropertyType.Float))
476 System.Type type = destinationValue.GetType();
477 if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
479 int num = (int)destinationValue;
480 destinationValue = (float)num;
484 PropertyValue val = PropertyValue.CreateFromObject(destinationValue);
486 if (alphaFunction != null)
488 AnimateTo(_prop, val, alphaFunction);
492 AnimateTo(_prop, val);
497 /// Animates a property to a destination value.<br>
499 /// <param name="target">The target object to animate</param>
500 /// <param name="property">The target property to animate</param>
501 /// <param name="destinationValue">The destination value</param>
502 /// <param name="alphaFunction">The alpha function to apply</param>
503 /// <param name="startTime">Start time of animation</param>
504 /// <param name="endTime">End time of animation</param>
505 /// <param name="alphaFunction">The alpha function to apply</param>
506 public void AnimateTo(View target, string property, object destinationValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
508 string _str1 = property.Substring(0, 1);
509 string _str2 = property.Substring(1);
510 string _str = _str1.ToLower() + _str2;
512 Property _prop = new Property(target, _str);
513 if (_prop.propertyIndex == Property.INVALID_INDEX)
515 throw new System.ArgumentException("second argument string property is invalid parameter!");
518 PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
519 if(propertyType.Equals(PropertyType.Float))
521 System.Type type = destinationValue.GetType();
522 if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
524 int num = (int)destinationValue;
525 destinationValue = (float)num;
529 PropertyValue val = PropertyValue.CreateFromObject(destinationValue);
531 if (alphaFunction != null)
533 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
534 AnimateTo(_prop, val, alphaFunction, time);
538 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
539 AnimateTo(_prop, val, time);
544 /// Animates a property between keyframes.
546 /// <param name="target">The target object to animate</param>
547 /// <param name="property">The target property to animate</param>
548 /// <param name="keyFrames">The set of time/value pairs between which to animate</param>
549 /// <param name="interpolation">The method used to interpolate between values</param>
550 /// <param name="alphaFunction">The alpha function to apply</param>
551 public void AnimateBetween(View target, string property, KeyFrames keyFrames, Interpolation interpolation = Interpolation.Linear, AlphaFunction alphaFunction = null)
553 string _str1 = property.Substring(0, 1);
554 string _str2 = property.Substring(1);
555 string _str = _str1.ToLower() + _str2;
557 Property _prop = new Property(target, _str);
558 if (_prop.propertyIndex == Property.INVALID_INDEX)
560 throw new System.ArgumentException("second argument string property is invalid parameter!");
563 if (alphaFunction != null)
565 AnimateBetween(_prop, keyFrames, alphaFunction, interpolation);
569 AnimateBetween(_prop, keyFrames, interpolation);
575 /// Animates a property between keyframes.
577 /// <param name="target">The target object to animate</param>
578 /// <param name="property">The target property to animate</param>
579 /// <param name="keyFrames">The set of time/value pairs between which to animate</param>
580 /// <param name="startTime">Start time of animation in milli seconds</param>
581 /// <param name="endTime">End time of animation in milli seconds</param>
582 /// <param name="interpolation">The method used to interpolate between values</param>
583 /// <param name="alphaFunction">The alpha function to apply</param>
584 public void AnimateBetween(View target, string property, KeyFrames keyFrames, int startTime, int endTime, Interpolation interpolation = Interpolation.Linear, AlphaFunction alphaFunction = null)
586 string _str1 = property.Substring(0, 1);
587 string _str2 = property.Substring(1);
588 string _str = _str1.ToLower() + _str2;
590 Property _prop = new Property(target, _str);
591 if (_prop.propertyIndex == Property.INVALID_INDEX)
593 throw new System.ArgumentException("second argument string property is invalid parameter!");
596 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
597 if (alphaFunction != null)
599 AnimateBetween(_prop, keyFrames, alphaFunction, time, interpolation);
603 AnimateBetween(_prop, keyFrames, time, interpolation);
608 /// Animates an view's position and orientation through a predefined path.<br>
609 /// The view will rotate to orient the supplied forward vector with the path's tangent.<br>
610 /// If forward is the zero vector then no rotation will happen.<br>
612 /// <param name="view">The view to animate</param>
613 /// <param name="path">It defines position and orientation</param>
614 /// <param name="forward">The vector (in local space coordinate system) that will be oriented with the path's tangent direction</param>
615 /// <param name="alphaFunction">The alpha function to apply</param>
616 public void AnimatePath(View view, Path path, Vector3 forward, AlphaFunction alphaFunction = null)
618 if (alphaFunction == null)
620 Animate(view, path, forward);
624 Animate(view, path, forward, alphaFunction);
629 /// Animates an view's position and orientation through a predefined path.<br>
630 /// The view will rotate to orient the supplied forward vector with the path's tangent.<br>
631 /// If forward is the zero vector then no rotation will happen.<br>
633 /// <param name="view">The view to animate</param>
634 /// <param name="path">It defines position and orientation</param>
635 /// <param name="forward">The vector (in local space coordinate system) that will be oriented with the path's tangent direction</param>
636 /// <param name="startTime">Start time of animation</param>
637 /// <param name="endTime">End time of animation</param>
638 /// <param name="alphaFunction">The alpha function to apply</param>
639 public void AnimatePath(View view, Path path, Vector3 forward, int startTime, int endTime, AlphaFunction alphaFunction = null)
641 TimePeriod time = new TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
642 if (alphaFunction == null)
644 Animate(view, path, forward, time);
648 Animate(view, path, forward, alphaFunction, time);
653 /// Creates an initialized Animation.<br>
654 /// The animation will not loop.<br>
655 /// The default end action is "Cancel".<br>
656 /// The default alpha function is linear.<br>
658 public Animation() : this(NDalicPINVOKE.Animation_New(0.0f), true)
660 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
663 internal Animation(float durationSeconds) : this(NDalicPINVOKE.Animation_New(durationSeconds), true)
665 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
670 /// Downcasts a handle to Animation handle.<br>
671 /// If handle points to an Animation object, the downcast produces valid handle.<br>
672 /// If not, the returned handle is left uninitialized.<br>
674 /// <param name="handle">Handle to an object</param>
675 /// <returns>Handle to an Animation object or an uninitialized handle</returns>
676 public static Animation DownCast(BaseHandle handle)
678 Animation ret = new Animation(NDalicPINVOKE.Animation_DownCast(BaseHandle.getCPtr(handle)), true);
679 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
683 internal Animation(Animation handle) : this(NDalicPINVOKE.new_Animation__SWIG_1(Animation.getCPtr(handle)), true)
685 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
688 internal Animation Assign(Animation rhs)
690 Animation ret = new Animation(NDalicPINVOKE.Animation_Assign(swigCPtr, Animation.getCPtr(rhs)), false);
691 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
695 internal void SetDuration(float seconds)
697 NDalicPINVOKE.Animation_SetDuration(swigCPtr, seconds);
698 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
701 internal float GetDuration()
703 float ret = NDalicPINVOKE.Animation_GetDuration(swigCPtr);
704 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
708 internal void SetLooping(bool looping)
710 NDalicPINVOKE.Animation_SetLooping(swigCPtr, looping);
711 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
714 internal void SetLoopCount(int count)
716 NDalicPINVOKE.Animation_SetLoopCount(swigCPtr, count);
717 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
720 internal int GetLoopCount()
722 int ret = NDalicPINVOKE.Animation_GetLoopCount(swigCPtr);
723 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
727 internal int GetCurrentLoop()
729 int ret = NDalicPINVOKE.Animation_GetCurrentLoop(swigCPtr);
730 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
734 internal bool IsLooping()
736 bool ret = NDalicPINVOKE.Animation_IsLooping(swigCPtr);
737 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
741 internal void SetEndAction(Animation.EndActions action)
743 NDalicPINVOKE.Animation_SetEndAction(swigCPtr, (int)action);
744 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
747 internal Animation.EndActions GetEndAction()
749 Animation.EndActions ret = (Animation.EndActions)NDalicPINVOKE.Animation_GetEndAction(swigCPtr);
750 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
754 internal void SetDisconnectAction(Animation.EndActions disconnectAction)
756 NDalicPINVOKE.Animation_SetDisconnectAction(swigCPtr, (int)disconnectAction);
757 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
760 internal Animation.EndActions GetDisconnectAction()
762 Animation.EndActions ret = (Animation.EndActions)NDalicPINVOKE.Animation_GetDisconnectAction(swigCPtr);
763 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
767 internal void SetDefaultAlphaFunction(AlphaFunction alpha)
769 NDalicPINVOKE.Animation_SetDefaultAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha));
770 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
773 internal AlphaFunction GetDefaultAlphaFunction()
775 AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.Animation_GetDefaultAlphaFunction(swigCPtr), true);
776 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
780 internal void SetCurrentProgress(float progress)
782 NDalicPINVOKE.Animation_SetCurrentProgress(swigCPtr, progress);
783 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
786 internal float GetCurrentProgress()
788 float ret = NDalicPINVOKE.Animation_GetCurrentProgress(swigCPtr);
789 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
793 internal void SetSpeedFactor(float factor)
795 NDalicPINVOKE.Animation_SetSpeedFactor(swigCPtr, factor);
796 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
799 internal float GetSpeedFactor()
801 float ret = NDalicPINVOKE.Animation_GetSpeedFactor(swigCPtr);
802 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
806 internal void SetPlayRange(Vector2 range)
808 NDalicPINVOKE.Animation_SetPlayRange(swigCPtr, Vector2.getCPtr(range));
809 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
812 internal Vector2 GetPlayRange()
814 Vector2 ret = new Vector2(NDalicPINVOKE.Animation_GetPlayRange(swigCPtr), true);
815 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
820 /// Plays the animation.
824 NDalicPINVOKE.Animation_Play(swigCPtr);
825 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
826 #if DISABLE_ANIMATION
827 Stop(EndActions.StopFinal);
832 /// Plays the animation from a given point.<br>
833 /// The progress must be in the 0-1 interval or in the play range interval if defined,
834 /// otherwise, it will be ignored.<br>
836 /// <param name="progress">A value between [0,1], or between the play range if specified, from where the animation should start playing</param>
837 public void PlayFrom(float progress)
839 NDalicPINVOKE.Animation_PlayFrom(swigCPtr, progress);
840 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
844 /// Pauses the animation.
848 NDalicPINVOKE.Animation_Pause(swigCPtr);
849 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
852 internal Animation.States GetState()
854 Animation.States ret = (Animation.States)NDalicPINVOKE.Animation_GetState(swigCPtr);
855 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
860 /// Stops the animation.
864 NDalicPINVOKE.Animation_Stop(swigCPtr);
865 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
869 /// Clears the animation.<br>
870 /// This disconnects any objects that were being animated, effectively stopping the animation.<br>
874 NDalicPINVOKE.Animation_Clear(swigCPtr);
875 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
878 internal AnimationSignal FinishedSignal()
880 AnimationSignal ret = new AnimationSignal(NDalicPINVOKE.Animation_FinishedSignal(swigCPtr), false);
881 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
885 internal void AnimateBy(Property target, PropertyValue relativeValue)
887 NDalicPINVOKE.Animation_AnimateBy__SWIG_0(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue));
888 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
891 internal void AnimateBy(Property target, PropertyValue relativeValue, AlphaFunction alpha)
893 NDalicPINVOKE.Animation_AnimateBy__SWIG_1(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue), AlphaFunction.getCPtr(alpha));
894 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
897 internal void AnimateBy(Property target, PropertyValue relativeValue, TimePeriod period)
899 NDalicPINVOKE.Animation_AnimateBy__SWIG_2(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue), TimePeriod.getCPtr(period));
900 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
903 internal void AnimateBy(Property target, PropertyValue relativeValue, AlphaFunction alpha, TimePeriod period)
905 NDalicPINVOKE.Animation_AnimateBy__SWIG_3(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
906 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
909 internal void AnimateTo(Property target, PropertyValue destinationValue)
911 NDalicPINVOKE.Animation_AnimateTo__SWIG_0(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue));
912 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
915 internal void AnimateTo(Property target, PropertyValue destinationValue, AlphaFunction alpha)
917 NDalicPINVOKE.Animation_AnimateTo__SWIG_1(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue), AlphaFunction.getCPtr(alpha));
918 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
921 internal void AnimateTo(Property target, PropertyValue destinationValue, TimePeriod period)
923 NDalicPINVOKE.Animation_AnimateTo__SWIG_2(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue), TimePeriod.getCPtr(period));
924 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
927 internal void AnimateTo(Property target, PropertyValue destinationValue, AlphaFunction alpha, TimePeriod period)
929 NDalicPINVOKE.Animation_AnimateTo__SWIG_3(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
930 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
933 internal void AnimateBetween(Property target, KeyFrames keyFrames)
935 NDalicPINVOKE.Animation_AnimateBetween__SWIG_0(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames));
936 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
939 internal void AnimateBetween(Property target, KeyFrames keyFrames, Animation.Interpolation interpolation)
941 NDalicPINVOKE.Animation_AnimateBetween__SWIG_1(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), (int)interpolation);
942 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
945 internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha)
947 NDalicPINVOKE.Animation_AnimateBetween__SWIG_2(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha));
948 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
951 internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, Animation.Interpolation interpolation)
953 NDalicPINVOKE.Animation_AnimateBetween__SWIG_3(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), (int)interpolation);
954 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
957 internal void AnimateBetween(Property target, KeyFrames keyFrames, TimePeriod period)
959 NDalicPINVOKE.Animation_AnimateBetween__SWIG_4(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), TimePeriod.getCPtr(period));
960 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
963 internal void AnimateBetween(Property target, KeyFrames keyFrames, TimePeriod period, Animation.Interpolation interpolation)
965 NDalicPINVOKE.Animation_AnimateBetween__SWIG_5(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), TimePeriod.getCPtr(period), (int)interpolation);
966 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
969 internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period)
971 NDalicPINVOKE.Animation_AnimateBetween__SWIG_6(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
972 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
975 internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period, Animation.Interpolation interpolation)
977 NDalicPINVOKE.Animation_AnimateBetween__SWIG_7(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period), (int)interpolation);
978 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
981 internal void Animate(View view, Path path, Vector3 forward)
983 NDalicPINVOKE.Animation_Animate__SWIG_0(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward));
984 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
987 internal void Animate(View view, Path path, Vector3 forward, AlphaFunction alpha)
989 NDalicPINVOKE.Animation_Animate__SWIG_1(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward), AlphaFunction.getCPtr(alpha));
990 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
993 internal void Animate(View view, Path path, Vector3 forward, TimePeriod period)
995 NDalicPINVOKE.Animation_Animate__SWIG_2(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward), TimePeriod.getCPtr(period));
996 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
999 internal void Animate(View view, Path path, Vector3 forward, AlphaFunction alpha, TimePeriod period)
1001 NDalicPINVOKE.Animation_Animate__SWIG_3(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
1002 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1005 internal void Show(View view, float delaySeconds)
1007 NDalicPINVOKE.Animation_Show(swigCPtr, View.getCPtr(view), delaySeconds);
1008 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1011 internal void Hide(View view, float delaySeconds)
1013 NDalicPINVOKE.Animation_Hide(swigCPtr, View.getCPtr(view), delaySeconds);
1014 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1018 /// Enumeration for what to do when the animation ends, is stopped, or is destroyed.
1020 public enum EndActions
1023 /// When the animation ends, the animated property values are saved.
1027 /// When the animation ends, the animated property values are forgotten.
1031 /// If the animation is stopped, the animated property values are saved as if the animation had run to completion, otherwise behaves like Cancel.
1037 /// Enumeration for what interpolation method to use on key-frame animations.
1039 public enum Interpolation
1042 /// Values in between key frames are interpolated using a linear polynomial. (Default)
1046 /// Values in between key frames are interpolated using a cubic polynomial.
1052 /// Enumeration for what state the animation is in.
1054 /// <remarks>Calling Reset() on this class will NOT reset the animation. It will call BaseHandle.Reset() which drops the object handle.</remarks>
1058 /// Animation has stopped
1062 /// The animation is playing
1066 /// The animation is paused