%define Animation_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
%typemap(cscode) NameSpace::ClassName %{
- public static readonly int PARENT_ORIGIN = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_get();
- public static readonly int PARENT_ORIGIN_X = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_X_get();
- public static readonly int PARENT_ORIGIN_Y = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Y_get();
- public static readonly int PARENT_ORIGIN_Z = NDalicPINVOKE.Actor_Property_PARENT_ORIGIN_Z_get();
- public static readonly int ANCHOR_POINT = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_get();
- public static readonly int ANCHOR_POINT_X = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_X_get();
- public static readonly int ANCHOR_POINT_Y = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Y_get();
- public static readonly int ANCHOR_POINT_Z = NDalicPINVOKE.Actor_Property_ANCHOR_POINT_Z_get();
- public static readonly int SIZE = NDalicPINVOKE.Actor_Property_SIZE_get();
- public static readonly int SIZE_WIDTH = NDalicPINVOKE.Actor_Property_SIZE_WIDTH_get();
- public static readonly int SIZE_HEIGHT = NDalicPINVOKE.Actor_Property_SIZE_HEIGHT_get();
- public static readonly int SIZE_DEPTH = NDalicPINVOKE.Actor_Property_SIZE_DEPTH_get();
- public static readonly int POSITION = NDalicPINVOKE.Actor_Property_POSITION_get();
- public static readonly int POSITION_X = NDalicPINVOKE.Actor_Property_POSITION_X_get();
- public static readonly int POSITION_Y = NDalicPINVOKE.Actor_Property_POSITION_Y_get();
- public static readonly int POSITION_Z = NDalicPINVOKE.Actor_Property_POSITION_Z_get();
- public static readonly int WORLD_POSITION = NDalicPINVOKE.Actor_Property_WORLD_POSITION_get();
- public static readonly int WORLD_POSITION_X = NDalicPINVOKE.Actor_Property_WORLD_POSITION_X_get();
- public static readonly int WORLD_POSITION_Y = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Y_get();
- public static readonly int WORLD_POSITION_Z = NDalicPINVOKE.Actor_Property_WORLD_POSITION_Z_get();
- public static readonly int ORIENTATION = NDalicPINVOKE.Actor_Property_ORIENTATION_get();
- public static readonly int WORLD_ORIENTATION = NDalicPINVOKE.Actor_Property_WORLD_ORIENTATION_get();
- public static readonly int SCALE = NDalicPINVOKE.Actor_Property_SCALE_get();
- public static readonly int SCALE_X = NDalicPINVOKE.Actor_Property_SCALE_X_get();
- public static readonly int SCALE_Y = NDalicPINVOKE.Actor_Property_SCALE_Y_get();
- public static readonly int SCALE_Z = NDalicPINVOKE.Actor_Property_SCALE_Z_get();
- public static readonly int WORLD_SCALE = NDalicPINVOKE.Actor_Property_WORLD_SCALE_get();
- public static readonly int VISIBLE = NDalicPINVOKE.Actor_Property_VISIBLE_get();
- public static readonly int COLOR = NDalicPINVOKE.Actor_Property_COLOR_get();
- public static readonly int COLOR_RED = NDalicPINVOKE.Actor_Property_COLOR_RED_get();
- public static readonly int COLOR_GREEN = NDalicPINVOKE.Actor_Property_COLOR_GREEN_get();
- public static readonly int COLOR_BLUE = NDalicPINVOKE.Actor_Property_COLOR_BLUE_get();
- public static readonly int COLOR_ALPHA = NDalicPINVOKE.Actor_Property_COLOR_ALPHA_get();
- public static readonly int WORLD_COLOR = NDalicPINVOKE.Actor_Property_WORLD_COLOR_get();
- public static readonly int WORLD_MATRIX = NDalicPINVOKE.Actor_Property_WORLD_MATRIX_get();
- public static readonly int NAME = NDalicPINVOKE.Actor_Property_NAME_get();
- public static readonly int SENSITIVE = NDalicPINVOKE.Actor_Property_SENSITIVE_get();
- public static readonly int LEAVE_REQUIRED = NDalicPINVOKE.Actor_Property_LEAVE_REQUIRED_get();
- public static readonly int INHERIT_ORIENTATION = NDalicPINVOKE.Actor_Property_INHERIT_ORIENTATION_get();
- public static readonly int INHERIT_SCALE = NDalicPINVOKE.Actor_Property_INHERIT_SCALE_get();
- public static readonly int COLOR_MODE = NDalicPINVOKE.Actor_Property_COLOR_MODE_get();
- public static readonly int POSITION_INHERITANCE = NDalicPINVOKE.Actor_Property_POSITION_INHERITANCE_get();
- public static readonly int DRAW_MODE = NDalicPINVOKE.Actor_Property_DRAW_MODE_get();
- public static readonly int SIZE_MODE_FACTOR = NDalicPINVOKE.Actor_Property_SIZE_MODE_FACTOR_get();
- public static readonly int WIDTH_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_WIDTH_RESIZE_POLICY_get();
- public static readonly int HEIGHT_RESIZE_POLICY = NDalicPINVOKE.Actor_Property_HEIGHT_RESIZE_POLICY_get();
- public static readonly int SIZE_SCALE_POLICY = NDalicPINVOKE.Actor_Property_SIZE_SCALE_POLICY_get();
- public static readonly int WIDTH_FOR_HEIGHT = NDalicPINVOKE.Actor_Property_WIDTH_FOR_HEIGHT_get();
- public static readonly int HEIGHT_FOR_WIDTH = NDalicPINVOKE.Actor_Property_HEIGHT_FOR_WIDTH_get();
- public static readonly int PADDING = NDalicPINVOKE.Actor_Property_PADDING_get();
- public static readonly int MINIMUM_SIZE = NDalicPINVOKE.Actor_Property_MINIMUM_SIZE_get();
- public static readonly int MAXIMUM_SIZE = NDalicPINVOKE.Actor_Property_MAXIMUM_SIZE_get();
- public static readonly int INHERIT_POSITION = NDalicPINVOKE.Actor_Property_INHERIT_POSITION_get();
- public static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
- public static readonly int BATCH_PARENT = NDalicPINVOKE.Actor_Property_BATCH_PARENT_get();
-
- /**
- * @brief Event arguments that passed via Finished signal
- *
- */
- public class FinishedEventArgs : EventArgs
- {
- private Animation _animation;
-
- /**
- * @brief Animation - is the Animation which has finished with the animation.
- *
- */
- public Animation Animation
- {
- get
- {
- return _animation;
- }
- set
- {
- _animation = value;
- }
- }
- }
-
- [UnmanagedFunctionPointer(CallingConvention.StdCall)]
- private delegate void FinishedEventCallbackDelegate(IntPtr Animation);
- private DaliEventHandler<object,FinishedEventArgs> _animationFinishedEventHandler;
- private FinishedEventCallbackDelegate _animationFinishedEventCallbackDelegate;
+ private EventCallbackDelegateType1<IntPtr> _animationFinishedEventCallbackDelegate;
+ private event EventHandler _animationFinishedEventHandler;
/**
* @brief Event for Finished signal which can be used to subscribe/unsubscribe the event handler
- * (in the type of FinishedEventHandler - DaliEventHandler<object,FinishedEventArgs>) provided by the user.
* Finished signal is emitted when an Animation's animations have finished.
*/
- public event DaliEventHandler<object,FinishedEventArgs> Finished
+ public event EventHandler Finished
{
add
{
lock(this)
{
- // Restricted to only one listener
- if (_animationFinishedEventHandler == null)
- {
- _animationFinishedEventHandler += value;
-
- _animationFinishedEventCallbackDelegate = new FinishedEventCallbackDelegate(OnFinished);
- this.FinishedSignal().Connect(_animationFinishedEventCallbackDelegate);
- }
+ _animationFinishedEventHandler += value;
+ _animationFinishedEventCallbackDelegate = OnFinished;
+ this.FinishedSignal().Connect(_animationFinishedEventCallbackDelegate);
}
}
-
remove
{
lock(this)
{
this.FinishedSignal().Disconnect(_animationFinishedEventCallbackDelegate);
}
-
_animationFinishedEventHandler -= value;
}
}
// Callback for Animation FinishedSignal
private void OnFinished(IntPtr data)
{
- FinishedEventArgs e = new FinishedEventArgs();
-
- // Populate all members of "e" (FinishedEventArgs) with real data
- e.Animation = Animation.GetAnimationFromPtr(data);
-
if (_animationFinishedEventHandler != null)
{
//here we send all data to user event handlers
- _animationFinishedEventHandler(this, e);
+ _animationFinishedEventHandler(this, null);
}
}
-
public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
ClassName ret = new ClassName(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
+ private float MilliSecondsToSeconds( int millisec )
+ {
+ return (float)millisec / 1000.0f;
+ }
+
+ private int SecondsToMilliSeconds( float sec )
+ {
+ return (int)( sec * 1000 );
+ }
- public float Duration
+ public int Duration
{
set
{
- SetDuration(value);
+ SetDuration( MilliSecondsToSeconds( value ) );
}
get
{
- float ret = GetDuration();
- return ret;
+ return SecondsToMilliSeconds( GetDuration() );
}
}
{
get
{
- Animation.State ret = GetState();
- return ret;
+ return GetState();
}
}
}
}
- public void AnimateBy<T,U>(Actor target, T propertyIndex, U relativeValue)
+ public bool Looping
{
- dynamic var = (object)(propertyIndex);
- dynamic obj = (object)(relativeValue);
- AnimateBy(new Property(target, var), new Property.Value(obj));
+ set
+ {
+ SetLooping(value);
+ }
+ get
+ {
+ bool ret = IsLooping();
+ return ret;
+ }
}
- public void AnimateBy<T,U>(Actor target, T propertyIndex, U relativeValue, AlphaFunction alpha)
+ public Animation.EndActions EndAction
{
- dynamic var = (object)(propertyIndex);
- dynamic obj = (object)(relativeValue);
- AnimateBy(new Property(target, var), new Property.Value(obj), alpha);
+ set
+ {
+ SetEndAction(value);
+ }
+ get
+ {
+ return GetEndAction();
+ }
}
- public void AnimateBy<T,U>(Actor target, T propertyIndex, U relativeValue, TimePeriod period)
+ public void Stop(Animation.EndActions action)
{
- dynamic var = (object)(propertyIndex);
- dynamic obj = (object)(relativeValue);
- AnimateBy(new Property(target, var), new Property.Value(obj), period);
+ SetEndAction(action);
+ NDalicPINVOKE.Animation_Stop(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- public void AnimateBy<T,U>(Actor target, T propertyIndex, U relativeValue, AlphaFunction alpha, TimePeriod period)
- {
- dynamic var = (object)(propertyIndex);
- dynamic obj = (object)(relativeValue);
- AnimateBy(new Property(target, var), new Property.Value(obj), alpha, period);
- }
+ public int StartTime { set; get; }
+ public int EndTime { set; get; }
+ public string TargetProperty { set; get; }
+ public object Destination { set; get; }
+ public Dali.AlphaFunction AlphaFunction { set; get; }
- public void AnimateTo<T,U>(Actor target, T propertyIndex, U destinationValue)
- {
- dynamic var = (object)(propertyIndex);
- dynamic obj = (object)(destinationValue);
- AnimateTo(new Property(target, var), new Property.Value(obj));
- }
- public void AnimateTo<T,U>(Actor target, T propertyIndex, U destinationValue, AlphaFunction alpha)
+ public void AnimateBy(Actor target)
{
- dynamic var = (object)(propertyIndex);
- dynamic obj = (object)(destinationValue);
- AnimateTo(new Property(target, var), new Property.Value(obj), alpha);
- }
+ string _str1 = TargetProperty.Substring(0, 1);
+ string _str2 = TargetProperty.Substring(1);
+ string _str = _str1.ToLower() + _str2;
- public void AnimateTo<T,U>(Actor target, T propertyIndex, U destinationValue, TimePeriod period)
- {
- dynamic var = (object)(propertyIndex);
- dynamic obj = (object)(destinationValue);
- AnimateTo(new Property(target, var), new Property.Value(obj), period);
- }
+ dynamic obj = (object)Destination;
- public void AnimateTo<T,U>(Actor target, T propertyIndex, U destinationValue, AlphaFunction alpha, TimePeriod period)
- {
- dynamic var = (object)(propertyIndex);
- dynamic obj = (object)(destinationValue);
- AnimateTo(new Property(target, var), new Property.Value(obj), alpha, period);
+ if( this.AlphaFunction != null )
+ {
+ if( this.StartTime == 0 && this.EndTime == 0 )
+ {
+ AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction );
+ }
+ else
+ {
+ Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime - this.StartTime ) );
+ AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time );
+ }
+ }
+ else
+ {
+ if( this.StartTime == 0 && this.EndTime == 0 )
+ {
+ AnimateBy(new Property(target, _str), new Property.Value(obj) );
+ }
+ else
+ {
+ Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime - this.StartTime ) );
+ AnimateBy(new Property(target, _str), new Property.Value(obj), time );
+ }
+ }
}
- public void AnimateBetween<U>(Actor target, U propertyIndex, KeyFrames keyFrames)
+ public void AnimateBy(Actor target, string propertyIndex)
{
- dynamic var = (object)(propertyIndex);
- AnimateBetween(new Property(target, var), keyFrames);
+ string _str1 = propertyIndex.Substring(0, 1);
+ string _str2 = propertyIndex.Substring(1);
+ string _str = _str1.ToLower() + _str2;
+
+ dynamic obj = (object)Destination;
+
+ if( this.AlphaFunction != null )
+ {
+ if( this.StartTime == 0 && this.EndTime == 0 )
+ {
+ AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction );
+ }
+ else
+ {
+ Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime - this.StartTime ) );
+ AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time );
+ }
+ }
+ else
+ {
+ if( this.StartTime == 0 && this.EndTime == 0 )
+ {
+ AnimateBy(new Property(target, _str), new Property.Value(obj) );
+ }
+ else
+ {
+ Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime - this.StartTime ) );
+ AnimateBy(new Property(target, _str), new Property.Value(obj), time );
+ }
+ }
}
- public void AnimateBetween<U>(Actor target, U propertyIndex, KeyFrames keyFrames, Animation.Interpolation interpolation)
+ public void AnimateBy(Actor target, string propertyIndex, object relativeValue)
{
- dynamic var = (object)(propertyIndex);
- AnimateBetween(new Property(target, var), keyFrames, interpolation);
+ string _str1 = propertyIndex.Substring(0, 1);
+ string _str2 = propertyIndex.Substring(1);
+ string _str = _str1.ToLower() + _str2;
+
+ dynamic obj = (object)relativeValue;
+
+ if( this.AlphaFunction != null )
+ {
+ if( this.StartTime == 0 && this.EndTime == 0 )
+ {
+ AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction );
+ }
+ else
+ {
+ Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime - this.StartTime ) );
+ AnimateBy(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time );
+ }
+ }
+ else
+ {
+ if( this.StartTime == 0 && this.EndTime == 0 )
+ {
+ AnimateBy(new Property(target, _str), new Property.Value(obj) );
+ }
+ else
+ {
+ Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime - this.StartTime ) );
+ AnimateBy(new Property(target, _str), new Property.Value(obj), time );
+ }
+ }
}
- public void AnimateBetween<U>(Actor target, U propertyIndex, KeyFrames keyFrames, AlphaFunction alpha)
+ public void AnimateTo(Actor target)
{
- dynamic var = (object)(propertyIndex);
- AnimateBetween(new Property(target, var), keyFrames, alpha);
+ string _str1 = TargetProperty.Substring(0, 1);
+ string _str2 = TargetProperty.Substring(1);
+ string _str = _str1.ToLower() + _str2;
+
+ dynamic obj = (object)Destination;
+
+ if( this.AlphaFunction != null )
+ {
+ if( this.StartTime == 0 && this.EndTime == 0 )
+ {
+ AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction );
+ }
+ else
+ {
+ Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime - this.StartTime ) );
+ AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time );
+ }
+ }
+ else
+ {
+ if( this.StartTime == 0 && this.EndTime == 0 )
+ {
+ AnimateTo(new Property(target, _str), new Property.Value(obj) );
+ }
+ else
+ {
+ Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime - this.StartTime ) );
+ AnimateTo(new Property(target, _str), new Property.Value(obj), time );
+ }
+ }
}
- public void AnimateBetween<U>(Actor target, U propertyIndex, KeyFrames keyFrames, AlphaFunction alpha, Animation.Interpolation interpolation)
+ public void AnimateTo(Actor target, string propertyIndex)
{
- dynamic var = (object)(propertyIndex);
- AnimateBetween(new Property(target, var), keyFrames, alpha, interpolation);
+ string _str1 = propertyIndex.Substring(0, 1);
+ string _str2 = propertyIndex.Substring(1);
+ string _str = _str1.ToLower() + _str2;
+
+ dynamic obj = (object)Destination;
+
+ if( this.AlphaFunction != null )
+ {
+ if( this.StartTime == 0 && this.EndTime == 0 )
+ {
+ AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction );
+ }
+ else
+ {
+ Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime - this.StartTime ) );
+ AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time );
+ }
+ }
+ else
+ {
+ if( this.StartTime == 0 && this.EndTime == 0 )
+ {
+ AnimateTo(new Property(target, _str), new Property.Value(obj) );
+ }
+ else
+ {
+ Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime - this.StartTime ) );
+ AnimateTo(new Property(target, _str), new Property.Value(obj), time );
+ }
+ }
}
- public void AnimateBetween<U>(Actor target, U propertyIndex, KeyFrames keyFrames, TimePeriod period)
+ public void AnimateTo(Actor target, string propertyIndex, object destinationValue)
{
- dynamic var = (object)(propertyIndex);
- AnimateBetween(new Property(target, var), keyFrames, period);
+ string _str1 = propertyIndex.Substring(0, 1);
+ string _str2 = propertyIndex.Substring(1);
+ string _str = _str1.ToLower() + _str2;
+
+ dynamic obj = (object)destinationValue;
+
+ if( this.AlphaFunction != null )
+ {
+ if( this.StartTime == 0 && this.EndTime == 0 )
+ {
+ AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction );
+ }
+ else
+ {
+ Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime - this.StartTime ) );
+ AnimateTo(new Property(target, _str), new Property.Value(obj), this.AlphaFunction, time );
+ }
+ }
+ else
+ {
+ if( this.StartTime == 0 && this.EndTime == 0 )
+ {
+ AnimateTo(new Property(target, _str), new Property.Value(obj) );
+ }
+ else
+ {
+ Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime - this.StartTime ) );
+ AnimateTo(new Property(target, _str), new Property.Value(obj), time );
+ }
+ }
}
- public void AnimateBetween<U>(Actor target, U propertyIndex, KeyFrames keyFrames, TimePeriod period, Animation.Interpolation interpolation)
+ public void AnimateBetween(Actor target, KeyFrames keyFrames)
{
- dynamic var = (object)(propertyIndex);
- AnimateBetween(new Property(target, var), keyFrames, period, interpolation);
+ string _str1 = TargetProperty.Substring(0, 1);
+ string _str2 = TargetProperty.Substring(1);
+ string _str = _str1.ToLower() + _str2;
+
+
+ if( this.AlphaFunction != null )
+ {
+ if( this.StartTime == 0 && this.EndTime == 0 )
+ {
+ AnimateBetween(new Property(target, _str), keyFrames, this.AlphaFunction);
+ }
+ else
+ {
+ Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime - this.StartTime ) );
+ AnimateBetween(new Property(target, _str), keyFrames, this.AlphaFunction, time);
+ }
+ }
+ else
+ {
+ if( this.StartTime == 0 && this.EndTime == 0 )
+ {
+ AnimateBetween(new Property(target, _str), keyFrames);
+ }
+ else
+ {
+ Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime - this.StartTime ) );
+ AnimateBetween(new Property(target, _str), keyFrames, time);
+ }
+ }
}
- public void AnimateBetween<U>(Actor target, U propertyIndex, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period)
+ public void AnimateBetween(Actor target, KeyFrames keyFrames, Animation.Interpolation interpolation)
{
- dynamic var = (object)(propertyIndex);
- AnimateBetween(new Property(target, var), keyFrames, alpha, period);
+ string _str1 = TargetProperty.Substring(0, 1);
+ string _str2 = TargetProperty.Substring(1);
+ string _str = _str1.ToLower() + _str2;
+
+
+ if( this.AlphaFunction != null )
+ {
+ if( this.StartTime == 0 && this.EndTime == 0 )
+ {
+ AnimateBetween(new Property(target, _str), keyFrames, this.AlphaFunction, interpolation);
+ }
+ else
+ {
+ Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime - this.StartTime ) );
+ AnimateBetween(new Property(target, _str), keyFrames, this.AlphaFunction, time, interpolation);
+ }
+ }
+ else
+ {
+ if( this.StartTime == 0 && this.EndTime == 0 )
+ {
+ AnimateBetween(new Property(target, _str), keyFrames, interpolation);
+ }
+ else
+ {
+ Dali.TimePeriod time = new Dali.TimePeriod( MilliSecondsToSeconds( this.StartTime ), MilliSecondsToSeconds( this.EndTime - this.StartTime ) );
+ AnimateBetween(new Property(target, _str), keyFrames, time, interpolation);
+ }
+ }
}
- public void AnimateBetween<U>(Actor target, U propertyIndex, KeyFrames keyFrames, AlphaFunction alpha, TimePeriod period, Animation.Interpolation interpolation)
- {
- dynamic var = (object)(propertyIndex);
- AnimateBetween(new Property(target, var), keyFrames, alpha, period, interpolation);
+
+ /**
+ * @brief Create an initialized Animation.
+ *
+ * The animation will not loop.
+ * The default end action is "Bake".
+ * The default Alpha function is linear.
+ * @since 1.0.0
+ * @param [in] durationmSeconds The duration in milli seconds (int).
+ * @return A handle to a newly allocated Dali resource.
+ * @pre DurationmSeconds must be greater than zero.
+ */
+ public Animation (int durationmSeconds) : this (NDalicPINVOKE.Animation_New((float)durationmSeconds/1000.0f), true) {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+ public Animation () : this (NDalicPINVOKE.Animation_New( 0.0f ), true ) {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
%}
%enddef
namespace Dali
{
DALI_animation_EVENTHANDLER_PARAM( Dali, Animation);
+
+%typemap(cscode) Dali::KeyFrames %{
+
+ public void Add(float progress, object value)
+ {
+ dynamic obj = value;
+ Add(progress, new Property.Value(obj));
+ }
+
+ public void Add(float progress, object value, AlphaFunction alpha)
+ {
+ dynamic obj = value;
+ Add(progress, new Property.Value(obj), alpha);
+ }
+
+%}
+
}