2 * Copyright(c) 2018 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
22 using System.ComponentModel;
23 using System.Runtime.InteropServices;
24 using Tizen.NUI.BaseComponents;
26 using System.Collections;
27 using System.Collections.Generic;
29 using System.Reflection;
31 using Tizen.NUI.Binding.Internals;
32 using Tizen.NUI.Binding;
33 using System.Globalization;
34 using Tizen.NUI.Xaml.Internals;
37 /// Animation can be used to animate the properties of any number of objects, typically view.<br />
38 /// If the "Finished" event is connected to a member function of an object, it must be disconnected before the object is destroyed.<br />
39 /// This is typically done in the object destructor, and requires either the animation handle to be stored.<br />
40 /// 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 />
41 /// If any of the individual calls to those functions exceeds the overall animation time (Duration), then the overall animation time is automatically extended.<br />
43 /// <since_tizen> 3 </since_tizen>
44 public class Animation : BaseHandle
46 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
48 internal Animation(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Animation_SWIGUpcast(cPtr), cMemoryOwn)
50 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
52 _animationFinishedEventCallback = OnFinished;
53 _finishedCallbackOfNative = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(_animationFinishedEventCallback);
56 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Animation obj)
58 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
62 /// To make animation instance be disposed.
64 /// <since_tizen> 3 </since_tizen>
65 protected override void Dispose(DisposeTypes type)
69 if (_animationFinishedEventCallback != null)
71 FinishedSignal().Disconnect(_finishedCallbackOfNative);
74 if (_animationProgressReachedEventCallback != null)
77 ProgressReachedSignal().Disconnect(_animationProgressReachedEventCallback);
85 if(type == DisposeTypes.Explicit)
88 //Release your own managed resources here.
89 //You should release all of your own disposable objects here.
92 else if(type == DisposeTypes.Implicit)
102 //Release your own unmanaged resources here.
103 //You should not access any managed member here except static instance.
104 //because the execution order of Finalizes is non-deterministic.
106 if (swigCPtr.Handle != global::System.IntPtr.Zero)
111 NDalicPINVOKE.delete_Animation(swigCPtr);
113 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
120 /// Creates an initialized animation.<br />
121 /// The animation will not loop.<br />
122 /// The default end action is "Cancel".<br />
123 /// The default alpha function is linear.<br />
125 /// <remarks>DurationmSeconds must be greater than zero.</remarks>
126 /// <param name="durationMilliSeconds">The duration in milliseconds.</param>
127 /// <since_tizen> 3 </since_tizen>
128 public Animation(int durationMilliSeconds) : this(NDalicPINVOKE.Animation_New((float)durationMilliSeconds / 1000.0f), true)
130 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133 private AnimationFinishedEventCallbackType _animationFinishedEventCallback;
134 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
135 private delegate void AnimationFinishedEventCallbackType(IntPtr data);
136 private event EventHandler _animationFinishedEventHandler;
138 private System.IntPtr _finishedCallbackOfNative;
141 * @brief Event for the finished signal which can be used to subscribe or unsubscribe the event handler.
142 * The finished signal is emitted when an animation's animations have finished.
144 /// <since_tizen> 3 </since_tizen>
145 public event EventHandler Finished
149 if (_animationFinishedEventHandler == null && disposed == false)
151 FinishedSignal().Connect(_finishedCallbackOfNative);
153 _animationFinishedEventHandler += value;
157 _animationFinishedEventHandler -= value;
159 if (_animationFinishedEventHandler == null && FinishedSignal().Empty() == false)
161 FinishedSignal().Disconnect(_finishedCallbackOfNative);
165 private void OnFinished(IntPtr data)
167 if (_animationFinishedEventHandler != null)
169 //here we send all data to user event handlers
170 _animationFinishedEventHandler(this, null);
174 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
175 private delegate void AnimationProgressReachedEventCallbackType(IntPtr data);
176 private AnimationProgressReachedEventCallbackType _animationProgressReachedEventCallback;
177 private event EventHandler _animationProgressReachedEventHandler;
179 * @brief Event for the ProgressReached signal, which can be used to subscribe or unsubscribe the event handler.
180 * The ProgressReached signal is emitted when the animation has reached a given progress percentage, this is set in the api SetProgressNotification.
182 /// <since_tizen> 3 </since_tizen>
183 public event EventHandler ProgressReached
187 if (_animationProgressReachedEventHandler == null)
189 _animationProgressReachedEventCallback = OnProgressReached;
190 ProgressReachedSignal().Connect(_animationProgressReachedEventCallback);
193 _animationProgressReachedEventHandler += value;
197 _animationProgressReachedEventHandler -= value;
199 if (_animationProgressReachedEventHandler == null && ProgressReachedSignal().Empty() == false)
201 ProgressReachedSignal().Disconnect(_animationProgressReachedEventCallback);
205 private void OnProgressReached(IntPtr data)
207 if (_animationProgressReachedEventHandler != null)
209 //here we send all data to user event handlers
210 _animationProgressReachedEventHandler(this, null);
214 private float MilliSecondsToSeconds(int millisec)
216 return (float)millisec / 1000.0f;
219 private int SecondsToMilliSeconds(float sec)
221 return (int)(sec * 1000);
226 /// Gets or sets the duration in milliseconds of the animation.
228 /// <since_tizen> 3 </since_tizen>
233 SetDuration(MilliSecondsToSeconds(value));
237 return SecondsToMilliSeconds(GetDuration());
242 /// Gets or sets the default alpha function for the animation.
244 /// <since_tizen> 3 </since_tizen>
245 public AlphaFunction DefaultAlphaFunction
249 SetDefaultAlphaFunction(value);
253 AlphaFunction ret = GetDefaultAlphaFunction();
259 /// Queries the state of the animation.
261 /// <since_tizen> 3 </since_tizen>
271 /// Set: Enables looping for a specified number of repeats. A zero is the same as Looping = true; i.e., repeat forever.<br />
272 /// This property resets the looping value and should not be used with the Looping property.<br />
273 /// Setting this parameter does not cause the animation to Play().<br />
274 /// Get: Gets the loop count. A zero is the same as Looping = true; i.e., repeat forever.<br />
275 /// The loop count is initially 1 for play once.<br />
277 /// <since_tizen> 3 </since_tizen>
286 int ret = GetLoopCount();
292 /// Gets or sets the status of whether the animation will loop.<br />
293 /// This property resets the loop count and should not be used with the LoopCount property.<br />
294 /// Setting this parameter does not cause the animation to Play().<br />
296 /// <since_tizen> 3 </since_tizen>
305 bool ret = IsLooping();
312 /// Gets or sets the end action of the animation.<br />
313 /// This action is performed when the animation ends or if it is stopped.<br />
314 /// The default end action is cancel.<br />
316 /// <since_tizen> 3 </since_tizen>
317 public EndActions EndAction
325 return GetEndAction();
331 /// Stops the animation.
333 /// <param name="action">The end action can be set.</param>
334 /// <since_tizen> 3 </since_tizen>
335 public void Stop(EndActions action = EndActions.Cancel)
337 SetEndAction(action);
338 NDalicPINVOKE.Animation_Stop(swigCPtr);
339 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
343 /// Gets the current loop count.<br />
344 /// A value 0 indicating the current loop count when looping.<br />
346 /// <since_tizen> 3 </since_tizen>
347 public int CurrentLoop
351 return GetCurrentLoop();
356 /// Gets or sets the disconnect action.<br />
357 /// If any of the animated property owners are disconnected from the stage while the animation is being played, then this action is performed.<br />
358 /// The default action is cancel.<br />
360 /// <since_tizen> 3 </since_tizen>
361 public EndActions DisconnectAction
365 NDalicPINVOKE.Animation_SetDisconnectAction(swigCPtr, (int)value);
366 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
370 Animation.EndActions ret = (Animation.EndActions)NDalicPINVOKE.Animation_GetDisconnectAction(swigCPtr);
371 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
378 /// Gets or sets the progress of the animation.<br />
379 /// The animation will play (or continue playing) from this point.<br />
380 /// The progress must be in the 0-1 interval or in the play range interval if defined<br />
381 /// otherwise, it will be ignored.<br />
383 /// <since_tizen> 3 </since_tizen>
384 public float CurrentProgress
388 NDalicPINVOKE.Animation_SetCurrentProgress(swigCPtr, value);
389 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
393 float ret = NDalicPINVOKE.Animation_GetCurrentProgress(swigCPtr);
394 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
400 /// Gets or sets specificifications of a speed factor for the animation.<br />
401 /// The speed factor is a multiplier of the normal velocity of the animation.<br />
402 /// Values between [0, 1] will slow down the animation and values above one will speed up the animation.<br />
403 /// It is also possible to specify a negative multiplier to play the animation in reverse.<br />
405 /// <since_tizen> 3 </since_tizen>
406 public float SpeedFactor
410 NDalicPINVOKE.Animation_SetSpeedFactor(swigCPtr, value);
411 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
415 float ret = NDalicPINVOKE.Animation_GetSpeedFactor(swigCPtr);
416 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
422 /// Gets or sets the playing range.<br />
423 /// Animation will play between the values specified. Both values (range.x and range.y ) should be between 0-1,
424 /// otherwise they will be ignored. If the range provided is not in proper order (minimum, maximum ), it will be reordered.<br />
426 /// <since_tizen> 3 </since_tizen>
427 public RelativeVector2 PlayRange
431 NDalicPINVOKE.Animation_SetPlayRange(swigCPtr, Vector2.getCPtr(value));
432 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
436 Vector2 ret = new Vector2(NDalicPINVOKE.Animation_GetPlayRange(swigCPtr), true);
437 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
444 /// Gets or sets the progress notification marker which triggers the ProgressReachedSignal.<br />
445 /// Percentage of animation progress should be greater than 0 and less than 1, for example, 0.3 for 30% <br />
446 /// One notification can be set on each animation.
448 /// <since_tizen> 3 </since_tizen>
449 public float ProgressNotification
453 NDalicPINVOKE.Animation_SetProgressNotification(swigCPtr, value);
454 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
458 float ret = NDalicPINVOKE.Animation_GetProgressNotification(swigCPtr);
459 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
465 /// Animates a property value by a relative amount.<br />
467 /// <param name="target">The target object to animate.</param>
468 /// <param name="property">The target property to animate.</param>
469 /// <param name="relativeValue">The property value will change by this amount.</param>
470 /// <param name="alphaFunction">The alpha function to apply.</param>
471 /// <since_tizen> 3 </since_tizen>
472 public void AnimateBy(View target, string property, object relativeValue, AlphaFunction alphaFunction = null)
474 Property _prop = PropertyHelper.GetPropertyFromString(target, property);
476 PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
477 if(propertyType.Equals(PropertyType.Float))
479 System.Type type = relativeValue.GetType();
480 if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
482 int num = (int)relativeValue;
483 relativeValue = (float)num;
487 PropertyValue val = PropertyValue.CreateFromObject(relativeValue);
489 if (alphaFunction != null)
491 AnimateBy(_prop, val, alphaFunction);
495 AnimateBy(_prop, val);
500 /// Animates a property value by a relative amount.<br />
502 /// <param name="target">The target object to animate.</param>
503 /// <param name="property">The target property to animate.</param>
504 /// <param name="relativeValue">The property value will change by this amount.</param>
505 /// <param name="startTime">The start time of the animation.</param>
506 /// <param name="endTime">The end time of the animation.</param>
507 /// <param name="alphaFunction">The alpha function to apply.</param>
508 /// <since_tizen> 3 </since_tizen>
509 public void AnimateBy(View target, string property, object relativeValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
511 Property _prop = PropertyHelper.GetPropertyFromString(target, property);
513 PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
514 if(propertyType.Equals(PropertyType.Float))
516 System.Type type = relativeValue.GetType();
517 if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
519 int num = (int)relativeValue;
520 relativeValue = (float)num;
524 PropertyValue val = PropertyValue.CreateFromObject(relativeValue);
526 if (alphaFunction != null)
528 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
529 AnimateBy(_prop, val, alphaFunction, time);
533 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
534 AnimateBy(_prop, val, time);
539 /// Animates a property to a destination value.<br />
541 /// <param name="target">The target object to animate.</param>
542 /// <param name="property">The target property to animate.</param>
543 /// <param name="destinationValue">The destination value.</param>
544 /// <param name="alphaFunction">The alpha function to apply.</param>
545 /// <since_tizen> 3 </since_tizen>
546 public void AnimateTo(View target, string property, object destinationValue, AlphaFunction alphaFunction = null)
548 Property _prop = PropertyHelper.GetPropertyFromString(target, property);
550 PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
551 if(propertyType.Equals(PropertyType.Float))
553 System.Type type = destinationValue.GetType();
554 if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
556 int num = (int)destinationValue;
557 destinationValue = (float)num;
561 PropertyValue val = PropertyValue.CreateFromObject(destinationValue);
563 if (alphaFunction != null)
565 AnimateTo(_prop, val, alphaFunction);
569 AnimateTo(_prop, val);
572 private string[] _properties = null;
575 /// Gets or sets the properties of the animation.
577 public string[] Properties
589 private string[] _destValue = null;
592 /// Gets or sets the destination value for each property of the animation.
594 public string[] DestValue
606 private int[] _startTime = null;
609 /// Gets or sets the start time for each property of the animation.
611 public int[] StartTime
623 private int[] _endTime = null;
626 /// Gets or sets the end time for each property of the animation.
641 /// Animates one or more properties to a destination value.<br />
643 /// <param name="target">The target object to animate.</param>
644 public void PlayAnimateTo(View target)
647 if (_properties.Length == _destValue.Length && _startTime.Length == _endTime.Length && _properties.Length == _startTime.Length)
649 int length = _properties.Length;
650 for (int index = 0; index < length; index++)
652 //object destinationValue = _destValue[index];
653 var elementType = target.GetType();
654 PropertyInfo propertyInfo = elementType.GetProperties().FirstOrDefault(fi => fi.Name == _properties[index]);
655 //var propertyInfo = elementType.GetRuntimeProperties().FirstOrDefault(p => p.Name == localName);
656 if (propertyInfo != null)
658 object destinationValue = ConvertTo(_destValue[index], propertyInfo.PropertyType);
660 if(destinationValue != null)
662 AnimateTo(target, _properties[index], destinationValue, _startTime[index], _endTime[index]);
670 internal object ConvertTo(object value, Type toType)
672 Func<object> getConverter = () =>
674 string converterTypeName = GetTypeConverterTypeName(toType.GetTypeInfo().CustomAttributes);
675 if (converterTypeName == null)
678 Type convertertype = Type.GetType(converterTypeName);
679 return Activator.CreateInstance(convertertype);
682 return ConvertTo(value, toType, getConverter);
685 internal object ConvertTo(object value, Type toType, Func<object> getConverter)
690 var str = value as string;
693 //If there's a [TypeConverter], use it
694 object converter = getConverter?.Invoke();
695 var xfTypeConverter = converter as Tizen.NUI.Binding.TypeConverter;
696 if (xfTypeConverter != null)
697 return value = xfTypeConverter.ConvertFromInvariantString(str);
698 var converterType = converter?.GetType();
699 if (converterType != null)
701 var convertFromStringInvariant = converterType.GetRuntimeMethod("ConvertFromInvariantString",
702 new[] { typeof(string) });
703 if (convertFromStringInvariant != null)
704 return value = convertFromStringInvariant.Invoke(converter, new object[] { str });
707 //If the type is nullable, as the value is not null, it's safe to assume we want the built-in conversion
708 if (toType.GetTypeInfo().IsGenericType && toType.GetGenericTypeDefinition() == typeof(Nullable<>))
709 toType = Nullable.GetUnderlyingType(toType);
711 //Obvious Built-in conversions
712 if (toType.GetTypeInfo().IsEnum)
713 return Enum.Parse(toType, str, true);
714 if (toType == typeof(SByte))
715 return SByte.Parse(str, CultureInfo.InvariantCulture);
716 if (toType == typeof(Int16))
717 return Int16.Parse(str, CultureInfo.InvariantCulture);
718 if (toType == typeof(Int32))
719 return Int32.Parse(str, CultureInfo.InvariantCulture);
720 if (toType == typeof(Int64))
721 return Int64.Parse(str, CultureInfo.InvariantCulture);
722 if (toType == typeof(Byte))
723 return Byte.Parse(str, CultureInfo.InvariantCulture);
724 if (toType == typeof(UInt16))
725 return UInt16.Parse(str, CultureInfo.InvariantCulture);
726 if (toType == typeof(UInt32))
727 return UInt32.Parse(str, CultureInfo.InvariantCulture);
728 if (toType == typeof(UInt64))
729 return UInt64.Parse(str, CultureInfo.InvariantCulture);
730 if (toType == typeof(Single))
731 return Single.Parse(str, CultureInfo.InvariantCulture);
732 if (toType == typeof(Double))
733 return Double.Parse(str, CultureInfo.InvariantCulture);
734 if (toType == typeof(Boolean))
735 return Boolean.Parse(str);
736 if (toType == typeof(TimeSpan))
737 return TimeSpan.Parse(str, CultureInfo.InvariantCulture);
738 if (toType == typeof(DateTime))
739 return DateTime.Parse(str, CultureInfo.InvariantCulture);
740 if (toType == typeof(Char))
743 Char.TryParse(str, out c);
746 if (toType == typeof(String) && str.StartsWith("{}", StringComparison.Ordinal))
747 return str.Substring(2);
748 if (toType == typeof(String))
750 if (toType == typeof(Decimal))
751 return Decimal.Parse(str, CultureInfo.InvariantCulture);
754 //if the value is not assignable and there's an implicit conversion, convert
755 if (value != null && !toType.IsAssignableFrom(value.GetType()))
757 var opImplicit = GetImplicitConversionOperator(value.GetType(), value.GetType(), toType)
758 ?? GetImplicitConversionOperator(toType, value.GetType(), toType);
759 //var opImplicit = value.GetType().GetImplicitConversionOperator(fromType: value.GetType(), toType: toType)
760 // ?? toType.GetImplicitConversionOperator(fromType: value.GetType(), toType: toType);
762 if (opImplicit != null)
764 value = opImplicit.Invoke(null, new[] { value });
769 var nativeValueConverterService = DependencyService.Get<INativeValueConverterService>();
771 object nativeValue = null;
772 if (nativeValueConverterService != null && nativeValueConverterService.ConvertTo(value, toType, out nativeValue))
778 internal string GetTypeConverterTypeName(IEnumerable<CustomAttributeData> attributes)
780 var converterAttribute =
781 attributes.FirstOrDefault(cad => Tizen.NUI.Binding.TypeConverterAttribute.TypeConvertersType.Contains(cad.AttributeType.FullName));
782 if (converterAttribute == null)
784 if (converterAttribute.ConstructorArguments[0].ArgumentType == typeof(string))
785 return (string)converterAttribute.ConstructorArguments[0].Value;
786 if (converterAttribute.ConstructorArguments[0].ArgumentType == typeof(Type))
787 return ((Type)converterAttribute.ConstructorArguments[0].Value).AssemblyQualifiedName;
791 internal MethodInfo GetImplicitConversionOperator(Type onType, Type fromType, Type toType)
794 var mi = onType.GetRuntimeMethod("op_Implicit", new[] { fromType });
796 var bindingFlags = BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy;
797 var mi = onType.GetMethod("op_Implicit", bindingFlags, null, new[] { fromType }, null);
799 if (mi == null) return null;
800 if (!mi.IsSpecialName) return null;
801 if (!mi.IsPublic) return null;
802 if (!mi.IsStatic) return null;
803 if (!toType.IsAssignableFrom(mi.ReturnType)) return null;
810 /// Animates a property to a destination value.<br />
812 /// <param name="target">The target object to animate.</param>
813 /// <param name="property">The target property to animate.</param>
814 /// <param name="destinationValue">The destination value.</param>
815 /// <param name="startTime">The start time of the animation.</param>
816 /// <param name="endTime">The end time of the animation.</param>
817 /// <param name="alphaFunction">The alpha function to apply.</param>
818 /// <since_tizen> 3 </since_tizen>
819 public void AnimateTo(View target, string property, object destinationValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
821 Property _prop = PropertyHelper.GetPropertyFromString(target, property);
823 PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
824 if(propertyType.Equals(PropertyType.Float))
826 System.Type type = destinationValue.GetType();
827 if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
829 int num = (int)destinationValue;
830 destinationValue = (float)num;
834 PropertyValue val = PropertyValue.CreateFromObject(destinationValue);
836 if (alphaFunction != null)
838 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
839 AnimateTo(_prop, val, alphaFunction, time);
843 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
844 AnimateTo(_prop, val, time);
849 /// Animates a property between keyframes.
851 /// <param name="target">The target object to animate.</param>
852 /// <param name="property">The target property to animate.</param>
853 /// <param name="keyFrames">The set of time or value pairs between which to animate.</param>
854 /// <param name="interpolation">The method used to interpolate between values.</param>
855 /// <param name="alphaFunction">The alpha function to apply.</param>
856 /// <since_tizen> 3 </since_tizen>
857 public void AnimateBetween(View target, string property, KeyFrames keyFrames, Interpolation interpolation = Interpolation.Linear, AlphaFunction alphaFunction = null)
859 Property _prop = PropertyHelper.GetPropertyFromString(target, property);
861 if (_prop.propertyIndex == Property.INVALID_INDEX)
863 throw new System.ArgumentException("second argument string property is invalid parameter!");
866 if (alphaFunction != null)
868 AnimateBetween(_prop, keyFrames, alphaFunction, interpolation);
872 AnimateBetween(_prop, keyFrames, interpolation);
878 /// Animates a property between keyframes.
880 /// <param name="target">The target object to animate</param>
881 /// <param name="property">The target property to animate</param>
882 /// <param name="keyFrames">The set of time/value pairs between which to animate</param>
883 /// <param name="startTime">The start time of animation in milliseconds.</param>
884 /// <param name="endTime">The end time of animation in milliseconds.</param>
885 /// <param name="interpolation">The method used to interpolate between values.</param>
886 /// <param name="alphaFunction">The alpha function to apply.</param>
887 /// <since_tizen> 3 </since_tizen>
888 public void AnimateBetween(View target, string property, KeyFrames keyFrames, int startTime, int endTime, Interpolation interpolation = Interpolation.Linear, AlphaFunction alphaFunction = null)
890 Property _prop = PropertyHelper.GetPropertyFromString(target, property);
892 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
893 if (alphaFunction != null)
895 AnimateBetween(_prop, keyFrames, alphaFunction, time, interpolation);
899 AnimateBetween(_prop, keyFrames, time, interpolation);
904 /// Animates the view's position and orientation through a predefined path.<br />
905 /// The view will rotate to orient the supplied forward vector with the path's tangent.<br />
906 /// If forward is the zero vector then no rotation will happen.<br />
908 /// <param name="view">The view to animate.</param>
909 /// <param name="path">It defines position and orientation.</param>
910 /// <param name="forward">The vector (in local space coordinate system) will be oriented with the path's tangent direction.</param>
911 /// <param name="alphaFunction">The alpha function to apply.</param>
912 /// <since_tizen> 3 </since_tizen>
913 public void AnimatePath(View view, Path path, Vector3 forward, AlphaFunction alphaFunction = null)
915 if (alphaFunction == null)
917 Animate(view, path, forward);
921 Animate(view, path, forward, alphaFunction);
926 /// Animates the view's position and orientation through a predefined path.<br />
927 /// The view will rotate to orient the supplied forward vector with the path's tangent.<br />
928 /// If forward is the zero vector then no rotation will happen.<br />
930 /// <param name="view">The view to animate.</param>
931 /// <param name="path">It defines position and orientation.</param>
932 /// <param name="forward">The vector (in local space coordinate system) will be oriented with the path's tangent direction.</param>
933 /// <param name="startTime">The start time of the animation.</param>
934 /// <param name="endTime">The end time of the animation.</param>
935 /// <param name="alphaFunction">The alpha function to apply.</param>
936 /// <since_tizen> 3 </since_tizen>
937 public void AnimatePath(View view, Path path, Vector3 forward, int startTime, int endTime, AlphaFunction alphaFunction = null)
939 TimePeriod time = new TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
940 if (alphaFunction == null)
942 Animate(view, path, forward, time);
946 Animate(view, path, forward, alphaFunction, time);
951 /// Creates an initialized animation.<br />
952 /// The animation will not loop.<br />
953 /// The default end action is "Cancel".<br />
954 /// The default alpha function is linear.<br />
956 /// <since_tizen> 3 </since_tizen>
957 public Animation() : this(NDalicPINVOKE.Animation_New(0.0f), true)
959 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
962 internal Animation(float durationSeconds) : this(NDalicPINVOKE.Animation_New(durationSeconds), true)
964 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
969 /// Downcasts a handle to animation handle.<br />
970 /// If handle points to an animation object, the downcast produces a valid handle.<br />
971 /// If not, the returned handle is left uninitialized.<br />
973 /// <param name="handle">Handle to an object.</param>
974 /// <returns>Handle to an animation object or an uninitialized handle.</returns>
975 /// <since_tizen> 3 </since_tizen>
976 public static Animation DownCast(BaseHandle handle)
978 Animation ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Animation;
979 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
983 internal Animation(Animation handle) : this(NDalicPINVOKE.new_Animation__SWIG_1(Animation.getCPtr(handle)), true)
985 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
988 internal Animation Assign(Animation rhs)
990 Animation ret = new Animation(NDalicPINVOKE.Animation_Assign(swigCPtr, Animation.getCPtr(rhs)), false);
991 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
995 internal void SetDuration(float seconds)
997 NDalicPINVOKE.Animation_SetDuration(swigCPtr, seconds);
998 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1001 internal float GetDuration()
1003 float ret = NDalicPINVOKE.Animation_GetDuration(swigCPtr);
1004 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1008 internal void SetLooping(bool looping)
1010 NDalicPINVOKE.Animation_SetLooping(swigCPtr, looping);
1011 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1014 internal void SetLoopCount(int count)
1016 NDalicPINVOKE.Animation_SetLoopCount(swigCPtr, count);
1017 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1020 internal int GetLoopCount()
1022 int ret = NDalicPINVOKE.Animation_GetLoopCount(swigCPtr);
1023 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1027 internal int GetCurrentLoop()
1029 int ret = NDalicPINVOKE.Animation_GetCurrentLoop(swigCPtr);
1030 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1034 internal bool IsLooping()
1036 bool ret = NDalicPINVOKE.Animation_IsLooping(swigCPtr);
1037 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1041 internal void SetEndAction(Animation.EndActions action)
1043 NDalicPINVOKE.Animation_SetEndAction(swigCPtr, (int)action);
1044 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1047 internal Animation.EndActions GetEndAction()
1049 Animation.EndActions ret = (Animation.EndActions)NDalicPINVOKE.Animation_GetEndAction(swigCPtr);
1050 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1054 internal void SetDisconnectAction(Animation.EndActions disconnectAction)
1056 NDalicPINVOKE.Animation_SetDisconnectAction(swigCPtr, (int)disconnectAction);
1057 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1060 internal Animation.EndActions GetDisconnectAction()
1062 Animation.EndActions ret = (Animation.EndActions)NDalicPINVOKE.Animation_GetDisconnectAction(swigCPtr);
1063 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1067 internal void SetDefaultAlphaFunction(AlphaFunction alpha)
1069 NDalicPINVOKE.Animation_SetDefaultAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha));
1070 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1073 internal AlphaFunction GetDefaultAlphaFunction()
1075 AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.Animation_GetDefaultAlphaFunction(swigCPtr), true);
1076 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1080 internal void SetCurrentProgress(float progress)
1082 NDalicPINVOKE.Animation_SetCurrentProgress(swigCPtr, progress);
1083 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1086 internal float GetCurrentProgress()
1088 float ret = NDalicPINVOKE.Animation_GetCurrentProgress(swigCPtr);
1089 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1093 internal void SetSpeedFactor(float factor)
1095 NDalicPINVOKE.Animation_SetSpeedFactor(swigCPtr, factor);
1096 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1099 internal float GetSpeedFactor()
1101 float ret = NDalicPINVOKE.Animation_GetSpeedFactor(swigCPtr);
1102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1106 internal void SetPlayRange(Vector2 range)
1108 NDalicPINVOKE.Animation_SetPlayRange(swigCPtr, Vector2.getCPtr(range));
1109 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1112 internal Vector2 GetPlayRange()
1114 Vector2 ret = new Vector2(NDalicPINVOKE.Animation_GetPlayRange(swigCPtr), true);
1115 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1119 private static bool? disableAnimation = null;
1120 private bool DisableAnimation
1124 if (disableAnimation.HasValue == false)
1126 string type = Environment.GetEnvironmentVariable("PlatformSmartType");
1127 if (type == "Entry")
1128 disableAnimation = true;
1130 disableAnimation = false;
1132 return disableAnimation.Value;
1137 /// Plays the animation.
1139 /// <since_tizen> 3 </since_tizen>
1142 NDalicPINVOKE.Animation_Play(swigCPtr);
1143 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1145 if (DisableAnimation == true)
1146 Stop(EndActions.StopFinal);
1150 /// Plays the animation from a given point.<br />
1151 /// The progress must be in the 0-1 interval or in the play range interval if defined,
1152 /// otherwise, it will be ignored.<br />
1154 /// <param name="progress">A value between [0,1], or between the play range if specified, from where the animation should start playing.</param>
1155 /// <since_tizen> 3 </since_tizen>
1156 public void PlayFrom(float progress)
1158 NDalicPINVOKE.Animation_PlayFrom(swigCPtr, progress);
1159 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1163 /// Plays the animation after a given delay time.<br/>
1164 /// The delay time is not included in the looping time.<br/>
1165 /// When the delay time is a negative value, it would treat as play immediately.<br/>
1167 /// <param name="delayMilliseconds">The delay time.</param>
1168 /// <since_tizen> 4 </since_tizen>
1169 public void PlayAfter(int delayMilliseconds)
1171 NDalicPINVOKE.Animation_PlayAfter(swigCPtr, MilliSecondsToSeconds(delayMilliseconds));
1172 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1176 /// Pauses the animation.
1178 /// <since_tizen> 3 </since_tizen>
1181 NDalicPINVOKE.Animation_Pause(swigCPtr);
1182 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1185 internal Animation.States GetState()
1187 Animation.States ret = (Animation.States)NDalicPINVOKE.Animation_GetState(swigCPtr);
1188 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1193 /// Stops the animation.
1195 /// <since_tizen> 3 </since_tizen>
1198 NDalicPINVOKE.Animation_Stop(swigCPtr);
1199 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1203 /// Clears the animation.<br />
1204 /// This disconnects any objects that were being animated, effectively stopping the animation.<br />
1206 /// <since_tizen> 3 </since_tizen>
1209 NDalicPINVOKE.Animation_Clear(swigCPtr);
1210 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1213 internal AnimationSignal FinishedSignal()
1215 AnimationSignal ret = new AnimationSignal(NDalicPINVOKE.Animation_FinishedSignal(swigCPtr), false);
1216 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1220 internal AnimationSignal ProgressReachedSignal()
1222 AnimationSignal ret = new AnimationSignal(NDalicPINVOKE.Animation_ProgressReachedSignal(swigCPtr), false);
1223 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1227 internal void AnimateBy(Property target, PropertyValue relativeValue)
1229 NDalicPINVOKE.Animation_AnimateBy__SWIG_0(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue));
1230 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1233 internal void AnimateBy(Property target, PropertyValue relativeValue, AlphaFunction alpha)
1235 NDalicPINVOKE.Animation_AnimateBy__SWIG_1(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue), AlphaFunction.getCPtr(alpha));
1236 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1239 internal void AnimateBy(Property target, PropertyValue relativeValue, TimePeriod period)
1241 NDalicPINVOKE.Animation_AnimateBy__SWIG_2(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue), TimePeriod.getCPtr(period));
1242 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1245 internal void AnimateBy(Property target, PropertyValue relativeValue, AlphaFunction alpha, TimePeriod period)
1247 NDalicPINVOKE.Animation_AnimateBy__SWIG_3(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
1248 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1251 internal void AnimateTo(Property target, PropertyValue destinationValue)
1253 NDalicPINVOKE.Animation_AnimateTo__SWIG_0(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue));
1254 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1257 internal void AnimateTo(Property target, PropertyValue destinationValue, AlphaFunction alpha)
1259 NDalicPINVOKE.Animation_AnimateTo__SWIG_1(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue), AlphaFunction.getCPtr(alpha));
1260 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1263 internal void AnimateTo(Property target, PropertyValue destinationValue, TimePeriod period)
1265 NDalicPINVOKE.Animation_AnimateTo__SWIG_2(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue), TimePeriod.getCPtr(period));
1266 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1269 internal void AnimateTo(Property target, PropertyValue destinationValue, AlphaFunction alpha, TimePeriod period)
1271 NDalicPINVOKE.Animation_AnimateTo__SWIG_3(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
1272 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1275 internal void AnimateBetween(Property target, KeyFrames keyFrames)
1277 NDalicPINVOKE.Animation_AnimateBetween__SWIG_0(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames));
1278 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1281 internal void AnimateBetween(Property target, KeyFrames keyFrames, Animation.Interpolation interpolation)
1283 NDalicPINVOKE.Animation_AnimateBetween__SWIG_1(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), (int)interpolation);
1284 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1287 internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha)
1289 NDalicPINVOKE.Animation_AnimateBetween__SWIG_2(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha));
1290 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1293 internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, Animation.Interpolation interpolation)
1295 NDalicPINVOKE.Animation_AnimateBetween__SWIG_3(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), (int)interpolation);
1296 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1299 internal void AnimateBetween(Property target, KeyFrames keyFrames, TimePeriod period)
1301 NDalicPINVOKE.Animation_AnimateBetween__SWIG_4(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), TimePeriod.getCPtr(period));
1302 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1305 internal void AnimateBetween(Property target, KeyFrames keyFrames, TimePeriod period, Animation.Interpolation interpolation)
1307 NDalicPINVOKE.Animation_AnimateBetween__SWIG_5(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), TimePeriod.getCPtr(period), (int)interpolation);
1308 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1311 internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period)
1313 NDalicPINVOKE.Animation_AnimateBetween__SWIG_6(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
1314 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1317 internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period, Animation.Interpolation interpolation)
1319 NDalicPINVOKE.Animation_AnimateBetween__SWIG_7(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period), (int)interpolation);
1320 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1323 internal void Animate(View view, Path path, Vector3 forward)
1325 NDalicPINVOKE.Animation_Animate__SWIG_0(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward));
1326 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1329 internal void Animate(View view, Path path, Vector3 forward, AlphaFunction alpha)
1331 NDalicPINVOKE.Animation_Animate__SWIG_1(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward), AlphaFunction.getCPtr(alpha));
1332 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1335 internal void Animate(View view, Path path, Vector3 forward, TimePeriod period)
1337 NDalicPINVOKE.Animation_Animate__SWIG_2(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward), TimePeriod.getCPtr(period));
1338 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1341 internal void Animate(View view, Path path, Vector3 forward, AlphaFunction alpha, TimePeriod period)
1343 NDalicPINVOKE.Animation_Animate__SWIG_3(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
1344 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1347 internal void Show(View view, float delaySeconds)
1349 NDalicPINVOKE.Animation_Show(swigCPtr, View.getCPtr(view), delaySeconds);
1350 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1353 internal void Hide(View view, float delaySeconds)
1355 NDalicPINVOKE.Animation_Hide(swigCPtr, View.getCPtr(view), delaySeconds);
1356 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1360 /// Enumeration for what to do when the animation ends, stopped, or destroyed.
1362 /// <since_tizen> 3 </since_tizen>
1363 public enum EndActions
1366 /// When the animation ends, the animated property values are saved.
1370 /// When the animation ends, the animated property values are forgotten.
1374 /// If the animation is stopped, the animated property values are saved as if the animation had run to completion, otherwise behaves like cancel.
1380 /// Enumeration for what interpolation method to use on key-frame animations.
1382 /// <since_tizen> 3 </since_tizen>
1383 public enum Interpolation
1386 /// Values in between key frames are interpolated using a linear polynomial. (Default)
1390 /// Values in between key frames are interpolated using a cubic polynomial.
1396 /// Enumeration for what state the animation is in.
1398 /// <remarks>Calling Reset() on this class will not reset the animation. It will call the BaseHandle.Reset() which drops the object handle.</remarks>
1399 /// <since_tizen> 3 </since_tizen>
1403 /// The animation has stopped.
1407 /// The animation is playing.
1411 /// The animation is paused.