From 0f16a66e399ab9c52f25fe8debcc6e3f12ecc12a Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Fri, 19 May 2017 17:07:17 +0900 Subject: [PATCH] temporary fix for TCT failure of XU3 Milestone1 release - merge from tizen branch Conflicts: Tizen.NUI/Properties/AssemblyInfo.cs Change-Id: I318ac5f298d3eb3509f7b3276c731bf0017f5821 Signed-off-by: dongsug.song --- src/Tizen.NUI/Properties/AssemblyInfo.cs | 36 ++++ src/Tizen.NUI/Tizen.NUI.csproj | 1 + src/Tizen.NUI/Tizen.NUI.sln | 22 +++ src/Tizen.NUI/src/public/BaseComponents/View.cs | 6 +- .../src/public/BaseComponents/VisualView.cs | 18 ++ src/Tizen.NUI/src/public/VisualMaps.cs | 218 +++++++++++++++++++++ 6 files changed, 298 insertions(+), 3 deletions(-) create mode 100755 src/Tizen.NUI/Properties/AssemblyInfo.cs create mode 100755 src/Tizen.NUI/Tizen.NUI.sln diff --git a/src/Tizen.NUI/Properties/AssemblyInfo.cs b/src/Tizen.NUI/Properties/AssemblyInfo.cs new file mode 100755 index 0000000..e55d1f6 --- /dev/null +++ b/src/Tizen.NUI/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Tizen.NUI")] +[assembly: AssemblyDescription("nui dll")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("sec")] +[assembly: AssemblyProduct("DALi/NUI")] +[assembly: AssemblyCopyright("sec")] +[assembly: AssemblyTrademark("sec")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f03a3b48-9d9b-4bf3-92ce-bd63cadc3cd3")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("0.2.39.0519")] +[assembly: AssemblyFileVersion("0.2.39.0519")] diff --git a/src/Tizen.NUI/Tizen.NUI.csproj b/src/Tizen.NUI/Tizen.NUI.csproj index 7f90f6a..55f6438 100755 --- a/src/Tizen.NUI/Tizen.NUI.csproj +++ b/src/Tizen.NUI/Tizen.NUI.csproj @@ -45,6 +45,7 @@ + diff --git a/src/Tizen.NUI/Tizen.NUI.sln b/src/Tizen.NUI/Tizen.NUI.sln new file mode 100755 index 0000000..5d64075 --- /dev/null +++ b/src/Tizen.NUI/Tizen.NUI.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tizen.NUI", "Tizen.NUI.csproj", "{F03A3B48-9D9B-4BF3-92CE-BD63CADC3CD3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F03A3B48-9D9B-4BF3-92CE-BD63CADC3CD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F03A3B48-9D9B-4BF3-92CE-BD63CADC3CD3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F03A3B48-9D9B-4BF3-92CE-BD63CADC3CD3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F03A3B48-9D9B-4BF3-92CE-BD63CADC3CD3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index 63fcb44..2441ef9 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -1909,14 +1909,14 @@ namespace Tizen.NUI.BaseComponents SetVisible(false); } - internal void Raise() + public void Raise() { NDalicPINVOKE.Raise(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - internal void Lower() + public void Lower() { NDalicPINVOKE.Lower(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) @@ -2200,7 +2200,7 @@ namespace Tizen.NUI.BaseComponents return ret; } - internal Vector3 GetNaturalSize() + public Vector3 GetNaturalSize() { Vector3 ret = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true); if (NDalicPINVOKE.SWIGPendingException.Pending) diff --git a/src/Tizen.NUI/src/public/BaseComponents/VisualView.cs b/src/Tizen.NUI/src/public/BaseComponents/VisualView.cs index 7cb39cd..60fcc01 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/VisualView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/VisualView.cs @@ -321,5 +321,23 @@ namespace Tizen.NUI.BaseComponents return null; } + + //temporary fix to pass TCT + public Animation VisualAnimate(VisualAnimator visualMap) + { + foreach (var item in _visualDictionary.ToList()) + { + if (item.Value.Name == visualMap.Target) + { + TransitionData _transitionData = new TransitionData(visualMap.OutputVisualMap); + return this.CreateTransition(_transitionData); + } + } + return null; + } + //temporary fix to pass TCT + + + } } diff --git a/src/Tizen.NUI/src/public/VisualMaps.cs b/src/Tizen.NUI/src/public/VisualMaps.cs index c417461..dee7c61 100755 --- a/src/Tizen.NUI/src/public/VisualMaps.cs +++ b/src/Tizen.NUI/src/public/VisualMaps.cs @@ -1976,4 +1976,222 @@ namespace Tizen.NUI } + + //temporary fix for TCT + public class VisualAnimator : VisualMap + { + public VisualAnimator() : base() + { + } + + private string _alphaFunction = null; + private int _startTime = 0; + private int _endTime = 0; + private string _target = null; + private string _propertyIndex = null; + private object _destinationValue = null; + + public AlphaFunction.BuiltinFunctions AlphaFunction + { + get + { + switch (_alphaFunction) + { + case "LINEAR": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear; + case "REVERSE": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse; + case "EASE_IN_SQUARE": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare; + case "EASE_OUT_SQUARE": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare; + case "EASE_IN": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn; + case "EASE_OUT": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut; + case "EASE_IN_OUT": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut; + case "EASE_IN_SINE": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine; + case "EASE_OUT_SINE": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine; + case "EASE_IN_OUT_SINE": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine; + case "BOUNCE": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce; + case "SIN": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin; + case "EASE_OUT_BACK": + return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack; + default: + return Tizen.NUI.AlphaFunction.BuiltinFunctions.Default; + } + } + set + { + switch (value) + { + case Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear: + { + _alphaFunction = "LINEAR"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse: + { + _alphaFunction = "REVERSE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare: + { + _alphaFunction = "EASE_IN_SQUARE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare: + { + _alphaFunction = "EASE_OUT_SQUARE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn: + { + _alphaFunction = "EASE_IN"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut: + { + _alphaFunction = "EASE_OUT"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut: + { + _alphaFunction = "EASE_IN_OUT"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine: + { + _alphaFunction = "EASE_IN_SINE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine: + { + _alphaFunction = "EASE_OUT_SINE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine: + { + _alphaFunction = "EASE_IN_OUT_SINE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce: + { + _alphaFunction = "BOUNCE"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin: + { + _alphaFunction = "SIN"; + break; + } + case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack: + { + _alphaFunction = "EASE_OUT_BACK"; + break; + } + default: + { + _alphaFunction = "DEFAULT"; + break; + } + } + } + } + + public int StartTime + { + get + { + return _startTime; + } + set + { + _startTime = value; + } + } + + public int EndTime + { + get + { + return _endTime; + } + set + { + _endTime = value; + } + } + + public string Target + { + get + { + return _target; + } + set + { + _target = value; + } + } + + public string PropertyIndex + { + get + { + return _propertyIndex; + } + set + { + _propertyIndex = value; + } + } + + public object DestinationValue + { + get + { + return _destinationValue; + } + set + { + _destinationValue = value; + } + } + + protected override void ComposingPropertyMap() + { + PropertyMap _animator = new PropertyMap(); + _animator.Add("alphaFunction", new PropertyValue(_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)); + + string _str1 = _propertyIndex.Substring(0, 1); + string _str2 = _propertyIndex.Substring(1); + string _str = _str1.ToLower() + _str2; + + PropertyValue val = PropertyValue.CreateFromObject(_destinationValue); + + PropertyMap _transition = new PropertyMap(); + _transition.Add("target", new PropertyValue(_target)); + _transition.Add("property", new PropertyValue(_str)); + _transition.Add("targetValue", val); + _transition.Add("animator", new PropertyValue(_animator)); + + _outputVisualMap = _transition; + } + } + //temporary fix for TCT + + + } -- 2.7.4