X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.NUI%2Fsrc%2Fpublic%2FBaseComponents%2FView.cs;h=6de4705d3bb8f24aebc97cfcef607d67bd72bfeb;hb=9f6f9d9e96b1630052b3d7442c58e3180385bf37;hp=7fac589503bad7d57782aa4415e286112c34708b;hpb=3878fadb39b8a91aceb455d685982e539e828b63;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git
diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs
index 7fac589..6de4705 100755
--- a/src/Tizen.NUI/src/public/BaseComponents/View.cs
+++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs
@@ -40,7 +40,7 @@ namespace Tizen.NUI.BaseComponents
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
- //you can override it to clean-up your own resources.
+ // you can override it to clean-up your own resources.
protected override void Dispose(DisposeTypes type)
{
if(disposed)
@@ -797,7 +797,6 @@ namespace Tizen.NUI.BaseComponents
internal static readonly int CLIPPING_MODE = NDalicPINVOKE.Actor_Property_CLIPPING_MODE_get();
}
-
///
/// Describes the direction to move the focus towards.
///
@@ -1048,6 +1047,68 @@ namespace Tizen.NUI.BaseComponents
}
///
+ /// Create an Animation to animate the background color visual. If there is no
+ /// background visual, creates one with transparent black as it's mixColor.
+ ///
+ public Animation AnimateBackgroundColor( object destinationValue,
+ int startTime,
+ int endTime,
+ AlphaFunction.BuiltinFunctions? alphaFunction = null,
+ object initialValue = null)
+ {
+ Tizen.NUI.PropertyMap background = Background;
+
+ if( background.Empty() )
+ {
+ // If there is no background yet, ensure there is a transparent
+ // color visual
+ BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
+ background = Background;
+ }
+ return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
+ }
+
+ ///
+ /// Create an Animation to animate the mixColor of the named visual.
+ ///
+ public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
+ {
+ Animation animation = null;
+ {
+ PropertyMap _animator = new PropertyMap();
+ if( alphaFunction != null )
+ {
+ _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
+ }
+
+ PropertyMap _timePeriod = new PropertyMap();
+ _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
+ _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
+ _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
+
+ PropertyMap _transition = new PropertyMap();
+ _transition.Add( "animator", new PropertyValue( _animator ) );
+ _transition.Add( "target", new PropertyValue( targetVisual ) );
+ _transition.Add( "property", new PropertyValue( "mixColor" ) );
+
+ if( initialColor != null )
+ {
+ PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
+ _transition.Add( "initialValue", initValue );
+ }
+
+ PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
+ _transition.Add( "targetValue", destValue );
+ TransitionData _transitionData = new TransitionData( _transition );
+
+ animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ return animation;
+ }
+
+ ///
/// mutually exclusive with BACKGROUND_COLOR & BACKGROUND, type Map.
///
public string BackgroundImage
@@ -1072,15 +1133,12 @@ namespace Tizen.NUI.BaseComponents
}
}
- ///
- /// mutually exclusive with BACKGROUND_COLOR & BACKGROUND_IMAGE, type Map or string for URL.
- ///
public Tizen.NUI.PropertyMap Background
{
get
{
Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
- GetProperty(View.Property.BACKGROUND).Get(temp);
+ GetProperty( View.Property.BACKGROUND ).Get(temp);
return temp;
}
set
@@ -1089,6 +1147,7 @@ namespace Tizen.NUI.BaseComponents
}
}
+
///
/// The current state of the view.
///