2 * Copyright(c) 2017 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 MemberInfo memberInfo;
676 string converterTypeName = GetTypeConverterTypeName(toType.GetTypeInfo().CustomAttributes);
677 if (converterTypeName == null)
680 Type convertertype = Type.GetType(converterTypeName);
681 return Activator.CreateInstance(convertertype);
684 return ConvertTo(value, toType, getConverter);
687 internal object ConvertTo(object value, Type toType, Func<object> getConverter)
692 var str = value as string;
695 //If there's a [TypeConverter], use it
696 object converter = getConverter?.Invoke();
697 var xfTypeConverter = converter as Tizen.NUI.Binding.TypeConverter;
698 if (xfTypeConverter != null)
699 return value = xfTypeConverter.ConvertFromInvariantString(str);
700 var converterType = converter?.GetType();
701 if (converterType != null)
703 var convertFromStringInvariant = converterType.GetRuntimeMethod("ConvertFromInvariantString",
704 new[] { typeof(string) });
705 if (convertFromStringInvariant != null)
706 return value = convertFromStringInvariant.Invoke(converter, new object[] { str });
709 //If the type is nullable, as the value is not null, it's safe to assume we want the built-in conversion
710 if (toType.GetTypeInfo().IsGenericType && toType.GetGenericTypeDefinition() == typeof(Nullable<>))
711 toType = Nullable.GetUnderlyingType(toType);
713 //Obvious Built-in conversions
714 if (toType.GetTypeInfo().IsEnum)
715 return Enum.Parse(toType, str, true);
716 if (toType == typeof(SByte))
717 return SByte.Parse(str, CultureInfo.InvariantCulture);
718 if (toType == typeof(Int16))
719 return Int16.Parse(str, CultureInfo.InvariantCulture);
720 if (toType == typeof(Int32))
721 return Int32.Parse(str, CultureInfo.InvariantCulture);
722 if (toType == typeof(Int64))
723 return Int64.Parse(str, CultureInfo.InvariantCulture);
724 if (toType == typeof(Byte))
725 return Byte.Parse(str, CultureInfo.InvariantCulture);
726 if (toType == typeof(UInt16))
727 return UInt16.Parse(str, CultureInfo.InvariantCulture);
728 if (toType == typeof(UInt32))
729 return UInt32.Parse(str, CultureInfo.InvariantCulture);
730 if (toType == typeof(UInt64))
731 return UInt64.Parse(str, CultureInfo.InvariantCulture);
732 if (toType == typeof(Single))
733 return Single.Parse(str, CultureInfo.InvariantCulture);
734 if (toType == typeof(Double))
735 return Double.Parse(str, CultureInfo.InvariantCulture);
736 if (toType == typeof(Boolean))
737 return Boolean.Parse(str);
738 if (toType == typeof(TimeSpan))
739 return TimeSpan.Parse(str, CultureInfo.InvariantCulture);
740 if (toType == typeof(DateTime))
741 return DateTime.Parse(str, CultureInfo.InvariantCulture);
742 if (toType == typeof(Char))
745 Char.TryParse(str, out c);
748 if (toType == typeof(String) && str.StartsWith("{}", StringComparison.Ordinal))
749 return str.Substring(2);
750 if (toType == typeof(String))
752 if (toType == typeof(Decimal))
753 return Decimal.Parse(str, CultureInfo.InvariantCulture);
756 //if the value is not assignable and there's an implicit conversion, convert
757 if (value != null && !toType.IsAssignableFrom(value.GetType()))
759 var opImplicit = GetImplicitConversionOperator(value.GetType(), value.GetType(), toType)
760 ?? GetImplicitConversionOperator(toType, value.GetType(), toType);
761 //var opImplicit = value.GetType().GetImplicitConversionOperator(fromType: value.GetType(), toType: toType)
762 // ?? toType.GetImplicitConversionOperator(fromType: value.GetType(), toType: toType);
764 if (opImplicit != null)
766 value = opImplicit.Invoke(null, new[] { value });
771 var nativeValueConverterService = DependencyService.Get<INativeValueConverterService>();
773 object nativeValue = null;
774 if (nativeValueConverterService != null && nativeValueConverterService.ConvertTo(value, toType, out nativeValue))
780 internal string GetTypeConverterTypeName(IEnumerable<CustomAttributeData> attributes)
782 var converterAttribute =
783 attributes.FirstOrDefault(cad => Tizen.NUI.Binding.TypeConverterAttribute.TypeConvertersType.Contains(cad.AttributeType.FullName));
784 if (converterAttribute == null)
786 if (converterAttribute.ConstructorArguments[0].ArgumentType == typeof(string))
787 return (string)converterAttribute.ConstructorArguments[0].Value;
788 if (converterAttribute.ConstructorArguments[0].ArgumentType == typeof(Type))
789 return ((Type)converterAttribute.ConstructorArguments[0].Value).AssemblyQualifiedName;
793 internal MethodInfo GetImplicitConversionOperator(Type onType, Type fromType, Type toType)
796 var mi = onType.GetRuntimeMethod("op_Implicit", new[] { fromType });
798 var bindingFlags = BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy;
799 var mi = onType.GetMethod("op_Implicit", bindingFlags, null, new[] { fromType }, null);
801 if (mi == null) return null;
802 if (!mi.IsSpecialName) return null;
803 if (!mi.IsPublic) return null;
804 if (!mi.IsStatic) return null;
805 if (!toType.IsAssignableFrom(mi.ReturnType)) return null;
812 /// Animates a property to a destination value.<br />
814 /// <param name="target">The target object to animate.</param>
815 /// <param name="property">The target property to animate.</param>
816 /// <param name="destinationValue">The destination value.</param>
817 /// <param name="startTime">The start time of the animation.</param>
818 /// <param name="endTime">The end time of the animation.</param>
819 /// <param name="alphaFunction">The alpha function to apply.</param>
820 /// <since_tizen> 3 </since_tizen>
821 public void AnimateTo(View target, string property, object destinationValue, int startTime, int endTime, AlphaFunction alphaFunction = null)
823 Property _prop = PropertyHelper.GetPropertyFromString(target, property);
825 PropertyType propertyType = target.GetPropertyType(_prop.propertyIndex);
826 if(propertyType.Equals(PropertyType.Float))
828 System.Type type = destinationValue.GetType();
829 if (type.Equals(typeof(System.Int32)) || type.Equals(typeof(int)))
831 int num = (int)destinationValue;
832 destinationValue = (float)num;
836 PropertyValue val = PropertyValue.CreateFromObject(destinationValue);
838 if (alphaFunction != null)
840 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
841 AnimateTo(_prop, val, alphaFunction, time);
845 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
846 AnimateTo(_prop, val, time);
851 /// Animates a property between keyframes.
853 /// <param name="target">The target object to animate.</param>
854 /// <param name="property">The target property to animate.</param>
855 /// <param name="keyFrames">The set of time or value pairs between which to animate.</param>
856 /// <param name="interpolation">The method used to interpolate between values.</param>
857 /// <param name="alphaFunction">The alpha function to apply.</param>
858 /// <since_tizen> 3 </since_tizen>
859 public void AnimateBetween(View target, string property, KeyFrames keyFrames, Interpolation interpolation = Interpolation.Linear, AlphaFunction alphaFunction = null)
861 Property _prop = PropertyHelper.GetPropertyFromString(target, property);
863 if (_prop.propertyIndex == Property.INVALID_INDEX)
865 throw new System.ArgumentException("second argument string property is invalid parameter!");
868 if (alphaFunction != null)
870 AnimateBetween(_prop, keyFrames, alphaFunction, interpolation);
874 AnimateBetween(_prop, keyFrames, interpolation);
880 /// Animates a property between keyframes.
882 /// <param name="target">The target object to animate</param>
883 /// <param name="property">The target property to animate</param>
884 /// <param name="keyFrames">The set of time/value pairs between which to animate</param>
885 /// <param name="startTime">The start time of animation in milliseconds.</param>
886 /// <param name="endTime">The end time of animation in milliseconds.</param>
887 /// <param name="interpolation">The method used to interpolate between values.</param>
888 /// <param name="alphaFunction">The alpha function to apply.</param>
889 /// <since_tizen> 3 </since_tizen>
890 public void AnimateBetween(View target, string property, KeyFrames keyFrames, int startTime, int endTime, Interpolation interpolation = Interpolation.Linear, AlphaFunction alphaFunction = null)
892 Property _prop = PropertyHelper.GetPropertyFromString(target, property);
894 Tizen.NUI.TimePeriod time = new Tizen.NUI.TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
895 if (alphaFunction != null)
897 AnimateBetween(_prop, keyFrames, alphaFunction, time, interpolation);
901 AnimateBetween(_prop, keyFrames, time, interpolation);
906 /// Animates the view's position and orientation through a predefined path.<br />
907 /// The view will rotate to orient the supplied forward vector with the path's tangent.<br />
908 /// If forward is the zero vector then no rotation will happen.<br />
910 /// <param name="view">The view to animate.</param>
911 /// <param name="path">It defines position and orientation.</param>
912 /// <param name="forward">The vector (in local space coordinate system) will be oriented with the path's tangent direction.</param>
913 /// <param name="alphaFunction">The alpha function to apply.</param>
914 /// <since_tizen> 3 </since_tizen>
915 public void AnimatePath(View view, Path path, Vector3 forward, AlphaFunction alphaFunction = null)
917 if (alphaFunction == null)
919 Animate(view, path, forward);
923 Animate(view, path, forward, alphaFunction);
928 /// Animates the view's position and orientation through a predefined path.<br />
929 /// The view will rotate to orient the supplied forward vector with the path's tangent.<br />
930 /// If forward is the zero vector then no rotation will happen.<br />
932 /// <param name="view">The view to animate.</param>
933 /// <param name="path">It defines position and orientation.</param>
934 /// <param name="forward">The vector (in local space coordinate system) will be oriented with the path's tangent direction.</param>
935 /// <param name="startTime">The start time of the animation.</param>
936 /// <param name="endTime">The end time of the animation.</param>
937 /// <param name="alphaFunction">The alpha function to apply.</param>
938 /// <since_tizen> 3 </since_tizen>
939 public void AnimatePath(View view, Path path, Vector3 forward, int startTime, int endTime, AlphaFunction alphaFunction = null)
941 TimePeriod time = new TimePeriod(MilliSecondsToSeconds(startTime), MilliSecondsToSeconds(endTime - startTime));
942 if (alphaFunction == null)
944 Animate(view, path, forward, time);
948 Animate(view, path, forward, alphaFunction, time);
953 /// Creates an initialized animation.<br />
954 /// The animation will not loop.<br />
955 /// The default end action is "Cancel".<br />
956 /// The default alpha function is linear.<br />
958 /// <since_tizen> 3 </since_tizen>
959 public Animation() : this(NDalicPINVOKE.Animation_New(0.0f), true)
961 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
964 internal Animation(float durationSeconds) : this(NDalicPINVOKE.Animation_New(durationSeconds), true)
966 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
971 /// Downcasts a handle to animation handle.<br />
972 /// If handle points to an animation object, the downcast produces a valid handle.<br />
973 /// If not, the returned handle is left uninitialized.<br />
975 /// <param name="handle">Handle to an object.</param>
976 /// <returns>Handle to an animation object or an uninitialized handle.</returns>
977 /// <since_tizen> 3 </since_tizen>
978 public static Animation DownCast(BaseHandle handle)
980 Animation ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Animation;
981 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
985 internal Animation(Animation handle) : this(NDalicPINVOKE.new_Animation__SWIG_1(Animation.getCPtr(handle)), true)
987 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
990 internal Animation Assign(Animation rhs)
992 Animation ret = new Animation(NDalicPINVOKE.Animation_Assign(swigCPtr, Animation.getCPtr(rhs)), false);
993 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
997 internal void SetDuration(float seconds)
999 NDalicPINVOKE.Animation_SetDuration(swigCPtr, seconds);
1000 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1003 internal float GetDuration()
1005 float ret = NDalicPINVOKE.Animation_GetDuration(swigCPtr);
1006 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1010 internal void SetLooping(bool looping)
1012 NDalicPINVOKE.Animation_SetLooping(swigCPtr, looping);
1013 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1016 internal void SetLoopCount(int count)
1018 NDalicPINVOKE.Animation_SetLoopCount(swigCPtr, count);
1019 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1022 internal int GetLoopCount()
1024 int ret = NDalicPINVOKE.Animation_GetLoopCount(swigCPtr);
1025 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1029 internal int GetCurrentLoop()
1031 int ret = NDalicPINVOKE.Animation_GetCurrentLoop(swigCPtr);
1032 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1036 internal bool IsLooping()
1038 bool ret = NDalicPINVOKE.Animation_IsLooping(swigCPtr);
1039 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1043 internal void SetEndAction(Animation.EndActions action)
1045 NDalicPINVOKE.Animation_SetEndAction(swigCPtr, (int)action);
1046 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1049 internal Animation.EndActions GetEndAction()
1051 Animation.EndActions ret = (Animation.EndActions)NDalicPINVOKE.Animation_GetEndAction(swigCPtr);
1052 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1056 internal void SetDisconnectAction(Animation.EndActions disconnectAction)
1058 NDalicPINVOKE.Animation_SetDisconnectAction(swigCPtr, (int)disconnectAction);
1059 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1062 internal Animation.EndActions GetDisconnectAction()
1064 Animation.EndActions ret = (Animation.EndActions)NDalicPINVOKE.Animation_GetDisconnectAction(swigCPtr);
1065 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1069 internal void SetDefaultAlphaFunction(AlphaFunction alpha)
1071 NDalicPINVOKE.Animation_SetDefaultAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha));
1072 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1075 internal AlphaFunction GetDefaultAlphaFunction()
1077 AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.Animation_GetDefaultAlphaFunction(swigCPtr), true);
1078 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1082 internal void SetCurrentProgress(float progress)
1084 NDalicPINVOKE.Animation_SetCurrentProgress(swigCPtr, progress);
1085 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1088 internal float GetCurrentProgress()
1090 float ret = NDalicPINVOKE.Animation_GetCurrentProgress(swigCPtr);
1091 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1095 internal void SetSpeedFactor(float factor)
1097 NDalicPINVOKE.Animation_SetSpeedFactor(swigCPtr, factor);
1098 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1101 internal float GetSpeedFactor()
1103 float ret = NDalicPINVOKE.Animation_GetSpeedFactor(swigCPtr);
1104 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1108 internal void SetPlayRange(Vector2 range)
1110 NDalicPINVOKE.Animation_SetPlayRange(swigCPtr, Vector2.getCPtr(range));
1111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1114 internal Vector2 GetPlayRange()
1116 Vector2 ret = new Vector2(NDalicPINVOKE.Animation_GetPlayRange(swigCPtr), true);
1117 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1121 private static bool? disableAnimation = null;
1122 private bool DisableAnimation
1126 if (disableAnimation.HasValue == false)
1128 string type = Environment.GetEnvironmentVariable("PlatformSmartType");
1129 if (type == "Entry")
1130 disableAnimation = true;
1132 disableAnimation = false;
1134 return disableAnimation.Value;
1139 /// Plays the animation.
1141 /// <since_tizen> 3 </since_tizen>
1144 NDalicPINVOKE.Animation_Play(swigCPtr);
1145 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1147 if (DisableAnimation == true)
1148 Stop(EndActions.StopFinal);
1152 /// Plays the animation from a given point.<br />
1153 /// The progress must be in the 0-1 interval or in the play range interval if defined,
1154 /// otherwise, it will be ignored.<br />
1156 /// <param name="progress">A value between [0,1], or between the play range if specified, from where the animation should start playing.</param>
1157 /// <since_tizen> 3 </since_tizen>
1158 public void PlayFrom(float progress)
1160 NDalicPINVOKE.Animation_PlayFrom(swigCPtr, progress);
1161 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1165 /// Plays the animation after a given delay time.<br/>
1166 /// The delay time is not included in the looping time.<br/>
1167 /// When the delay time is a negative value, it would treat as play immediately.<br/>
1169 /// <param name="delayMilliseconds">The delay time.</param>
1170 /// <since_tizen> 4 </since_tizen>
1171 public void PlayAfter(int delayMilliseconds)
1173 NDalicPINVOKE.Animation_PlayAfter(swigCPtr, MilliSecondsToSeconds(delayMilliseconds));
1174 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1178 /// Pauses the animation.
1180 /// <since_tizen> 3 </since_tizen>
1183 NDalicPINVOKE.Animation_Pause(swigCPtr);
1184 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1187 internal Animation.States GetState()
1189 Animation.States ret = (Animation.States)NDalicPINVOKE.Animation_GetState(swigCPtr);
1190 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1195 /// Stops the animation.
1197 /// <since_tizen> 3 </since_tizen>
1200 NDalicPINVOKE.Animation_Stop(swigCPtr);
1201 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1205 /// Clears the animation.<br />
1206 /// This disconnects any objects that were being animated, effectively stopping the animation.<br />
1208 /// <since_tizen> 3 </since_tizen>
1211 NDalicPINVOKE.Animation_Clear(swigCPtr);
1212 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1215 internal AnimationSignal FinishedSignal()
1217 AnimationSignal ret = new AnimationSignal(NDalicPINVOKE.Animation_FinishedSignal(swigCPtr), false);
1218 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1222 internal AnimationSignal ProgressReachedSignal()
1224 AnimationSignal ret = new AnimationSignal(NDalicPINVOKE.Animation_ProgressReachedSignal(swigCPtr), false);
1225 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1229 internal void AnimateBy(Property target, PropertyValue relativeValue)
1231 NDalicPINVOKE.Animation_AnimateBy__SWIG_0(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue));
1232 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1235 internal void AnimateBy(Property target, PropertyValue relativeValue, AlphaFunction alpha)
1237 NDalicPINVOKE.Animation_AnimateBy__SWIG_1(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue), AlphaFunction.getCPtr(alpha));
1238 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1241 internal void AnimateBy(Property target, PropertyValue relativeValue, TimePeriod period)
1243 NDalicPINVOKE.Animation_AnimateBy__SWIG_2(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue), TimePeriod.getCPtr(period));
1244 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1247 internal void AnimateBy(Property target, PropertyValue relativeValue, AlphaFunction alpha, TimePeriod period)
1249 NDalicPINVOKE.Animation_AnimateBy__SWIG_3(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(relativeValue), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
1250 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1253 internal void AnimateTo(Property target, PropertyValue destinationValue)
1255 NDalicPINVOKE.Animation_AnimateTo__SWIG_0(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue));
1256 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1259 internal void AnimateTo(Property target, PropertyValue destinationValue, AlphaFunction alpha)
1261 NDalicPINVOKE.Animation_AnimateTo__SWIG_1(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue), AlphaFunction.getCPtr(alpha));
1262 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1265 internal void AnimateTo(Property target, PropertyValue destinationValue, TimePeriod period)
1267 NDalicPINVOKE.Animation_AnimateTo__SWIG_2(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue), TimePeriod.getCPtr(period));
1268 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1271 internal void AnimateTo(Property target, PropertyValue destinationValue, AlphaFunction alpha, TimePeriod period)
1273 NDalicPINVOKE.Animation_AnimateTo__SWIG_3(swigCPtr, Property.getCPtr(target), PropertyValue.getCPtr(destinationValue), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
1274 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1277 internal void AnimateBetween(Property target, KeyFrames keyFrames)
1279 NDalicPINVOKE.Animation_AnimateBetween__SWIG_0(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames));
1280 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1283 internal void AnimateBetween(Property target, KeyFrames keyFrames, Animation.Interpolation interpolation)
1285 NDalicPINVOKE.Animation_AnimateBetween__SWIG_1(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), (int)interpolation);
1286 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1289 internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha)
1291 NDalicPINVOKE.Animation_AnimateBetween__SWIG_2(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha));
1292 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1295 internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, Animation.Interpolation interpolation)
1297 NDalicPINVOKE.Animation_AnimateBetween__SWIG_3(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), (int)interpolation);
1298 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1301 internal void AnimateBetween(Property target, KeyFrames keyFrames, TimePeriod period)
1303 NDalicPINVOKE.Animation_AnimateBetween__SWIG_4(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), TimePeriod.getCPtr(period));
1304 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1307 internal void AnimateBetween(Property target, KeyFrames keyFrames, TimePeriod period, Animation.Interpolation interpolation)
1309 NDalicPINVOKE.Animation_AnimateBetween__SWIG_5(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), TimePeriod.getCPtr(period), (int)interpolation);
1310 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1313 internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period)
1315 NDalicPINVOKE.Animation_AnimateBetween__SWIG_6(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
1316 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1319 internal void AnimateBetween(Property target, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period, Animation.Interpolation interpolation)
1321 NDalicPINVOKE.Animation_AnimateBetween__SWIG_7(swigCPtr, Property.getCPtr(target), KeyFrames.getCPtr(keyFrames), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period), (int)interpolation);
1322 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1325 internal void Animate(View view, Path path, Vector3 forward)
1327 NDalicPINVOKE.Animation_Animate__SWIG_0(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward));
1328 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1331 internal void Animate(View view, Path path, Vector3 forward, AlphaFunction alpha)
1333 NDalicPINVOKE.Animation_Animate__SWIG_1(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward), AlphaFunction.getCPtr(alpha));
1334 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1337 internal void Animate(View view, Path path, Vector3 forward, TimePeriod period)
1339 NDalicPINVOKE.Animation_Animate__SWIG_2(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward), TimePeriod.getCPtr(period));
1340 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1343 internal void Animate(View view, Path path, Vector3 forward, AlphaFunction alpha, TimePeriod period)
1345 NDalicPINVOKE.Animation_Animate__SWIG_3(swigCPtr, View.getCPtr(view), Path.getCPtr(path), Vector3.getCPtr(forward), AlphaFunction.getCPtr(alpha), TimePeriod.getCPtr(period));
1346 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1349 internal void Show(View view, float delaySeconds)
1351 NDalicPINVOKE.Animation_Show(swigCPtr, View.getCPtr(view), delaySeconds);
1352 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1355 internal void Hide(View view, float delaySeconds)
1357 NDalicPINVOKE.Animation_Hide(swigCPtr, View.getCPtr(view), delaySeconds);
1358 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1362 /// Enumeration for what to do when the animation ends, stopped, or destroyed.
1364 /// <since_tizen> 3 </since_tizen>
1365 public enum EndActions
1368 /// When the animation ends, the animated property values are saved.
1372 /// When the animation ends, the animated property values are forgotten.
1376 /// If the animation is stopped, the animated property values are saved as if the animation had run to completion, otherwise behaves like cancel.
1382 /// Enumeration for what interpolation method to use on key-frame animations.
1384 /// <since_tizen> 3 </since_tizen>
1385 public enum Interpolation
1388 /// Values in between key frames are interpolated using a linear polynomial. (Default)
1392 /// Values in between key frames are interpolated using a cubic polynomial.
1398 /// Enumeration for what state the animation is in.
1400 /// <remarks>Calling Reset() on this class will not reset the animation. It will call the BaseHandle.Reset() which drops the object handle.</remarks>
1401 /// <since_tizen> 3 </since_tizen>
1405 /// The animation has stopped.
1409 /// The animation is playing.
1413 /// The animation is paused.