Merge "[Tizen.Context] Added since_tizen tag" preview1-00250
authorSomin Kim <somin926.kim@samsung.com>
Mon, 25 Sep 2017 22:41:28 +0000 (22:41 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Mon, 25 Sep 2017 22:41:28 +0000 (22:41 +0000)
packaging/csapi-tizenfx.spec
src/Tizen.Applications.WatchApplication/Interop/Interop.Watch.cs
src/Tizen.Applications.WatchApplication/Tizen.Applications.WatchApplication.csproj [changed mode: 0644->0755]
src/Tizen.Applications.WatchApplication/Tizen.Applications.WatchApplication.sln
src/Tizen.Applications.WatchApplication/Tizen.Applications/WatchApplication.cs
src/Tizen.Applications.WatchApplication/Tizen.Applications/WatchTime.cs
test/ElmSharp.Test/TC/ScrollerTest5.cs [new file with mode: 0644]
test/ElmSharp.Test/TC/ScrollerTest6.cs [new file with mode: 0644]

index 4dd0ae4..66b01cc 100644 (file)
@@ -7,6 +7,8 @@
 %define DOTNET_ASSEMBLY_RES_PATH %{DOTNET_ASSEMBLY_PATH}/res
 %define DOTNET_NUGET_SOURCE /nuget
 
+%define DOTNET_TIZEN_API_VERSION 4
+
 %define _tizenfx_bin_path Artifacts
 
 Name:       csapi-tizenfx
@@ -22,8 +24,12 @@ Source1:    %{name}.manifest
 BuildRequires: dotnet-build-tools
 
 BuildArch: noarch
+ExcludeArch: aarch64
 AutoReqProv: no
 
+Requires(post): vconf
+
+
 %description
 %{summary}
 
@@ -46,6 +52,7 @@ Dummy assemblies of Tizen .NET
 %package full
 Summary:   All Tizen .NET assemblies
 Group:     Development/Libraries
+Requires:  %{name} = %{version}-%{release}
 AutoReqProv: no
 
 %description full
@@ -62,7 +69,8 @@ All .pdb files of Tizen .NET
 %package common
 Summary:   Tizen .NET assemblies for Common profile
 Group:     Development/Libraries
-Requires:  csapi-tizenfx-dummy
+Requires:  %{name} = %{version}-%{release}
+Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description common
@@ -71,7 +79,8 @@ Tizen .NET assemblies for Common profile
 %package mobile
 Summary:   Tizen .NET assemblies for Mobile profile
 Group:     Development/Libraries
-Requires:  csapi-tizenfx-dummy
+Requires:  %{name} = %{version}-%{release}
+Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description mobile
@@ -80,7 +89,8 @@ Tizen .NET assemblies for Mobile profile
 %package mobile-emul
 Summary:   Tizen .NET assemblies for Emulator of Mobile profile
 Group:     Development/Libraries
-Requires:  csapi-tizenfx-dummy
+Requires:  %{name} = %{version}-%{release}
+Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description mobile-emul
@@ -89,7 +99,8 @@ Tizen .NET assemblies for Emulator of Mobile profile
 %package tv
 Summary:   Tizen .NET assemblies for TV profile
 Group:     Development/Libraries
-Requires:  csapi-tizenfx-dummy
+Requires:  %{name} = %{version}-%{release}
+Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description tv
@@ -98,7 +109,8 @@ Tizen .NET assemblies for TV profile
 %package ivi
 Summary:   Tizen .NET assemblies for IVI profile
 Group:     Development/Libraries
-Requires:  csapi-tizenfx-dummy
+Requires:  %{name} = %{version}-%{release}
+Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description ivi
@@ -107,7 +119,8 @@ Tizen .NET assemblies for IVI profile
 %package wearable
 Summary:   Tizen .NET assemblies for Wearable profile
 Group:     Development/Libraries
-Requires:  csapi-tizenfx-dummy
+Requires:  %{name} = %{version}-%{release}
+Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description wearable
@@ -151,6 +164,13 @@ install -p -m 644 %{_tizenfx_bin_path}/bin/platform/res/* %{buildroot}%{DOTNET_A
 install -p -m 644 %{_tizenfx_bin_path}/bin/dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
 install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
 
+%post
+vconftool set -t int "db/dotnet/tizen_api_version" %{DOTNET_TIZEN_API_VERSION} -f
+
+
+%files
+%license LICENSE
+
 %files nuget
 %{DOTNET_NUGET_SOURCE}/*.nupkg
 
@@ -159,7 +179,6 @@ install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE
 
 %files full
 %manifest %{name}.manifest
-%license LICENSE
 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.dll
 %attr(644,root,root) %{DOTNET_ASSEMBLY_RES_PATH}/*
 
@@ -168,24 +187,18 @@ install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE
 
 %files common -f common.filelist
 %manifest %{name}.manifest
-%license LICENSE
 
 %files mobile -f mobile.filelist
 %manifest %{name}.manifest
-%license LICENSE
 
 %files mobile-emul -f mobile-emul.filelist
 %manifest %{name}.manifest
-%license LICENSE
 
 %files tv -f tv.filelist
 %manifest %{name}.manifest
-%license LICENSE
 
 %files ivi -f ivi.filelist
 %manifest %{name}.manifest
-%license LICENSE
 
 %files wearable -f wearable.filelist
 %manifest %{name}.manifest
-%license LICENSE
index b4ffa33..2177e6e 100755 (executable)
@@ -39,6 +39,7 @@ internal static partial class Interop
             OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory,
             InvalidContext = -0x01100000 | 0x01,
             NoSuchFile = Tizen.Internals.Errors.ErrorCode.NoSuchFile,
+            NotSupported = Tizen.Internals.Errors.ErrorCode.NotSupported,
             AlreadyRunning = Tizen.Internals.Errors.ErrorCode.AlreadyInProgress
         }
 
@@ -153,6 +154,5 @@ internal static partial class Interop
 
         [DllImport(Libraries.AppCommon, EntryPoint = "app_event_get_region_format")]
         internal static extern Tizen.Internals.Errors.ErrorCode AppEventGetRegionFormat(IntPtr handle, out string region);
-
     }
-}
+}
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index e56b74e..d0d923b
@@ -7,6 +7,7 @@
   <ItemGroup>
     <ProjectReference Include="..\Tizen.Applications.Common\Tizen.Applications.Common.csproj" />
     <ProjectReference Include="..\ElmSharp\ElmSharp.csproj" />
+    <ProjectReference Include="..\Tizen.System.Information\Tizen.System.Information.csproj" />
   </ItemGroup>
 
 </Project>
index 63347eb..9ede788 100755 (executable)
@@ -1,7 +1,7 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 15
-VisualStudioVersion = 15.0.26430.12
+VisualStudioVersion = 15.0.26730.10
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Applications.WatchApplication", "Tizen.Applications.WatchApplication.csproj", "{8BF860DC-DCBC-4889-938F-7515C5282D95}"
 EndProject
@@ -13,6 +13,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Applications.Common",
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElmSharp", "..\ElmSharp\ElmSharp.csproj", "{66EC3D92-AD41-4906-A1A9-3C414B2107F5}"
 EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.System.Information", "..\Tizen.System.Information\Tizen.System.Information.csproj", "{F3138394-755D-4055-9561-999823C76BD2}"
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Any CPU = Debug|Any CPU
@@ -39,8 +41,15 @@ Global
                {66EC3D92-AD41-4906-A1A9-3C414B2107F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {66EC3D92-AD41-4906-A1A9-3C414B2107F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {66EC3D92-AD41-4906-A1A9-3C414B2107F5}.Release|Any CPU.Build.0 = Release|Any CPU
+               {F3138394-755D-4055-9561-999823C76BD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {F3138394-755D-4055-9561-999823C76BD2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {F3138394-755D-4055-9561-999823C76BD2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {F3138394-755D-4055-9561-999823C76BD2}.Release|Any CPU.Build.0 = Release|Any CPU
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
        EndGlobalSection
+       GlobalSection(ExtensibilityGlobals) = postSolution
+               SolutionGuid = {C24ED662-71DD-4A20-8F6E-C0A16FC8DE1C}
+       EndGlobalSection
 EndGlobal
index 43cdbca..b02f1a4 100755 (executable)
@@ -159,8 +159,10 @@ namespace Tizen.Applications
         /// Gets the current time
         /// </summary>
         /// <returns>WatchTime</returns>
+        /// <feature>http://tizen.org/feature/watch_app</feature>
         /// <exception cref="InvalidOperationException">Thrown when failed to get current time because of invalid parameter.</exception>
         /// <exception cref="OutOfMemoryException">Thrown when failed to get current time because memory is not enough.</exception>
+        /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
         /// <example>
         /// <code>
         /// class MyApp : WatchApplication
@@ -191,6 +193,8 @@ namespace Tizen.Applications
                     throw new InvalidOperationException("Failed to get current time. err : " + err);
                 else if (err == Interop.Watch.ErrorCode.OutOfMemory)
                     throw new OutOfMemoryException("Failed to get current time. err : " + err);
+                else if (err == Interop.Watch.ErrorCode.NotSupported)
+                    throw new NotSupportedException("Failed to get current time. err : " + err);
             }
             return new WatchTime(handle);
         }
@@ -199,7 +203,9 @@ namespace Tizen.Applications
         /// Gets the type of periodic ambient tick.
         /// </summary>
         /// <returns>AmbientTickType</returns>
+        /// <feature>http://tizen.org/feature/watch_app</feature>
         /// <exception cref="InvalidOperationException">Thrown when failed to get ambient tick type.</exception>
+        /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
         /// <example>
         /// <code>
         /// class MyApp : WatchApplication
@@ -227,7 +233,10 @@ namespace Tizen.Applications
 
             if(err != Interop.Watch.ErrorCode.None)
             {
-                throw new InvalidOperationException("Failed to get ambient tick type. err : " + err);
+                if (err == Interop.Watch.ErrorCode.NotSupported)
+                    throw new NotSupportedException("Failed to get ambient tick type. err : " + err);
+                else
+                    throw new InvalidOperationException("Failed to get ambient tick type. err : " + err);
             }
 
             return ambientTickType;
@@ -239,7 +248,9 @@ namespace Tizen.Applications
         /// If SetAmbientTickType is not called, OnAmbientTick will be called every minute.
         /// </summary>
         /// <param name="ambientTickType">the type of ambient tick</param>
+        /// <feature>http://tizen.org/feature/watch_app</feature>
         /// <exception cref="InvalidOperationException">Thrown when failed to set ambient tick type.</exception>
+        /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
         /// <example>
         /// <code>
         /// class MyApp : WatchApplication
@@ -264,7 +275,10 @@ namespace Tizen.Applications
 
             if(err != Interop.Watch.ErrorCode.None)
             {
-                throw new InvalidOperationException("Failed to set ambient tick type. err : " + err);
+                if (err == Interop.Watch.ErrorCode.NotSupported)
+                    throw new NotSupportedException("Failed to set ambient tick type. err : " + err);
+                else
+                    throw new InvalidOperationException("Failed to set ambient tick type. err : " + err);
             }
         }
 
@@ -275,7 +289,9 @@ namespace Tizen.Applications
         /// </summary>
         /// <param name="ticks">Ticks the number of ticks per given resolution type</param>
         /// <param name="type">Type of the resolution type</param>
+        /// <feature>http://tizen.org/feature/watch_app</feature>
         /// <exception cref="InvalidOperationException">Thrown when failed to set time tick frequency.</exception>
+        /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
         /// <example>
         /// <code>
         /// class MyApp : WatchApplication
@@ -300,7 +316,10 @@ namespace Tizen.Applications
 
             if (err != Interop.Watch.ErrorCode.None)
             {
-                throw new InvalidOperationException("Failed to set time tick frequency. err : " + err);
+                if (err == Interop.Watch.ErrorCode.NotSupported)
+                    throw new NotSupportedException("Failed to set time tick frequency. err : " + err);
+                else
+                    throw new InvalidOperationException("Failed to set time tick frequency. err : " + err);
             }
         }
 
@@ -309,7 +328,9 @@ namespace Tizen.Applications
         /// </summary>
         /// <param name="ticks">Ticks the number of ticks per given resolution type</param>
         /// <param name="type">Type of the resolution type</param>
+        /// <feature>http://tizen.org/feature/watch_app</feature>
         /// <exception cref="InvalidOperationException">Thrown when failed to get time tick frequency.</exception>
+        /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
         /// <example>
         /// <code>
         /// class MyApp : WatchApplication
@@ -336,7 +357,10 @@ namespace Tizen.Applications
 
             if (err != Interop.Watch.ErrorCode.None)
             {
-                throw new InvalidOperationException("Failed to get time tick frequency. err : " + err);
+                if (err == Interop.Watch.ErrorCode.NotSupported)
+                    throw new NotSupportedException("Failed to get time tick frequency. err : " + err);
+                else
+                    throw new InvalidOperationException("Failed to get time tick frequency. err : " + err);
             }
         }
     }
index 94ce435..e39434c 100755 (executable)
@@ -34,6 +34,8 @@ namespace Tizen.Applications
         /// <summary>
         /// The information of year
         /// </summary>
+        /// <feature>http://tizen.org/feature/watch_app</feature>
+        /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
         public int Year
         {
             get
@@ -43,7 +45,10 @@ namespace Tizen.Applications
 
                 if (err != Interop.Watch.ErrorCode.None)
                 {
-                    Log.Error(LOGTAG, "Failed to get Year err : " + err);
+                    if (err == Interop.Watch.ErrorCode.NotSupported)
+                        throw new NotSupportedException("Failed to get Year. err : " + err);
+                    else
+                        Log.Error(LOGTAG, "Failed to get Year err : " + err);
                 }
                 return year;
             }
@@ -52,6 +57,8 @@ namespace Tizen.Applications
         /// <summary>
         /// The information fo month
         /// </summary>
+        /// <feature>http://tizen.org/feature/watch_app</feature>
+        /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
         public int Month
         {
             get
@@ -61,7 +68,10 @@ namespace Tizen.Applications
 
                 if (err != Interop.Watch.ErrorCode.None)
                 {
-                    Log.Error(LOGTAG, "Failed to get Month err : " + err);
+                    if (err == Interop.Watch.ErrorCode.NotSupported)
+                        throw new NotSupportedException("Failed to get Month. err : " + err);
+                    else
+                        Log.Error(LOGTAG, "Failed to get Month err : " + err);
                 }
                 return month;
             }
@@ -70,6 +80,8 @@ namespace Tizen.Applications
         /// <summary>
         /// The information of day
         /// </summary>
+        /// <feature>http://tizen.org/feature/watch_app</feature>
+        /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
         public int Day
         {
             get
@@ -79,7 +91,10 @@ namespace Tizen.Applications
 
                 if (err != Interop.Watch.ErrorCode.None)
                 {
-                    Log.Error(LOGTAG, "Failed to get Day err : " + err);
+                    if (err == Interop.Watch.ErrorCode.NotSupported)
+                        throw new NotSupportedException("Failed to get Day. err : " + err);
+                    else
+                        Log.Error(LOGTAG, "Failed to get Day err : " + err);
                 }
                 return day;
             }
@@ -88,6 +103,8 @@ namespace Tizen.Applications
         /// <summary>
         /// The information of day of week
         /// </summary>
+        /// <feature>http://tizen.org/feature/watch_app</feature>
+        /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
         public int DayOfWeek
         {
             get
@@ -97,7 +114,10 @@ namespace Tizen.Applications
 
                 if (err != Interop.Watch.ErrorCode.None)
                 {
-                    Log.Error(LOGTAG, "Failed to get Second err : " + err);
+                    if (err == Interop.Watch.ErrorCode.NotSupported)
+                        throw new NotSupportedException("Failed to get DayOfWeek. err : " + err);
+                    else
+                        Log.Error(LOGTAG, "Failed to get DayOfWeek err : " + err);
                 }
                 return dayOfWeek;
             }
@@ -106,6 +126,8 @@ namespace Tizen.Applications
         /// <summary>
         /// The information of hour
         /// </summary>
+        /// <feature>http://tizen.org/feature/watch_app</feature>
+        /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
         public int Hour
         {
             get
@@ -115,7 +137,10 @@ namespace Tizen.Applications
 
                 if (err != Interop.Watch.ErrorCode.None)
                 {
-                    Log.Error(LOGTAG, "Failed to get Hour err : " + err);
+                    if (err == Interop.Watch.ErrorCode.NotSupported)
+                        throw new NotSupportedException("Failed to get Hour. err : " + err);
+                    else
+                        Log.Error(LOGTAG, "Failed to get Hour err : " + err);
                 }
                 return hour;
             }
@@ -124,6 +149,8 @@ namespace Tizen.Applications
         /// <summary>
         /// The information of hour for 24 hour form
         /// </summary>
+        /// <feature>http://tizen.org/feature/watch_app</feature>
+        /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
         public int Hour24
         {
             get
@@ -133,7 +160,10 @@ namespace Tizen.Applications
 
                 if (err != Interop.Watch.ErrorCode.None)
                 {
-                    Log.Error(LOGTAG, "Failed to get Hour24 err : " + err);
+                    if (err == Interop.Watch.ErrorCode.NotSupported)
+                        throw new NotSupportedException("Failed to get Hour24. err : " + err);
+                    else
+                        Log.Error(LOGTAG, "Failed to get Hour24 err : " + err);
                 }
                 return hour24;
             }
@@ -142,6 +172,8 @@ namespace Tizen.Applications
         /// <summary>
         /// The information of Minute
         /// </summary>
+        /// <feature>http://tizen.org/feature/watch_app</feature>
+        /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
         public int Minute
         {
             get
@@ -151,7 +183,10 @@ namespace Tizen.Applications
 
                 if (err != Interop.Watch.ErrorCode.None)
                 {
-                    Log.Error(LOGTAG, "Failed to get Minute err : " + err);
+                    if (err == Interop.Watch.ErrorCode.NotSupported)
+                        throw new NotSupportedException("Failed to get Minute. err : " + err);
+                    else
+                        Log.Error(LOGTAG, "Failed to get Minute err : " + err);
                 }
                 return minute;
             }
@@ -160,6 +195,8 @@ namespace Tizen.Applications
         /// <summary>
         /// The information of second
         /// </summary>
+        /// <feature>http://tizen.org/feature/watch_app</feature>
+        /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
         public int Second
         {
             get
@@ -169,7 +206,10 @@ namespace Tizen.Applications
 
                 if (err != Interop.Watch.ErrorCode.None)
                 {
-                    Log.Error(LOGTAG, "Failed to get Second err : " + err);
+                    if (err == Interop.Watch.ErrorCode.NotSupported)
+                        throw new NotSupportedException("Failed to get Second. err : " + err);
+                    else
+                        Log.Error(LOGTAG, "Failed to get Second err : " + err);
                 }
                 return second;
             }
@@ -178,6 +218,8 @@ namespace Tizen.Applications
         /// <summary>
         /// The information of millisecond
         /// </summary>
+        /// <feature>http://tizen.org/feature/watch_app</feature>
+        /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
         public int Millisecond
         {
             get
@@ -187,7 +229,10 @@ namespace Tizen.Applications
 
                 if (err != Interop.Watch.ErrorCode.None)
                 {
-                    Log.Error(LOGTAG, "Failed to get Second err : " + err);
+                    if (err == Interop.Watch.ErrorCode.NotSupported)
+                        throw new NotSupportedException("Failed to get Millisecond. err : " + err);
+                    else
+                        Log.Error(LOGTAG, "Failed to get Millisecond err : " + err);
                 }
                 return ms;
             }
@@ -196,6 +241,8 @@ namespace Tizen.Applications
         /// <summary>
         /// The information of timezone
         /// </summary>
+        /// <feature>http://tizen.org/feature/watch_app</feature>
+        /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
         public string TimeZone
         {
             get
@@ -205,7 +252,10 @@ namespace Tizen.Applications
 
                 if (err != Interop.Watch.ErrorCode.None)
                 {
-                    Log.Error(LOGTAG, "Failed to get Second err : " + err);
+                    if (err == Interop.Watch.ErrorCode.NotSupported)
+                        throw new NotSupportedException("Failed to get TimeZone. err : " + err);
+                    else
+                        Log.Error(LOGTAG, "Failed to get TimeZone err : " + err);
                 }
                 return zone;
             }
@@ -214,19 +264,22 @@ namespace Tizen.Applications
         /// <summary>
         /// The information of UTC time stamp
         /// </summary>
+        /// <feature>http://tizen.org/feature/watch_app</feature>
+        /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
         public DateTime UtcTimestamp
         {
             get
             {
                 long ts = 0;
-
                 Interop.Watch.ErrorCode err = Interop.Watch.WatchTimeGetUtcTimestamp(_handle, out ts);
 
                 if (err != Interop.Watch.ErrorCode.None)
                 {
-                    Log.Error(LOGTAG, "Failed to get UtcTimestamp err : " + err);
+                    if (err == Interop.Watch.ErrorCode.NotSupported)
+                        throw new NotSupportedException("Failed to get UtcTimestamp. err : " + err);
+                    else
+                        Log.Error(LOGTAG, "Failed to get UtcTimestamp err : " + err);
                 }
-
                 return (new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).AddSeconds(ts).ToLocalTime();
             }
         }
diff --git a/test/ElmSharp.Test/TC/ScrollerTest5.cs b/test/ElmSharp.Test/TC/ScrollerTest5.cs
new file mode 100644 (file)
index 0000000..247e5de
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using ElmSharp;
+
+namespace ElmSharp.Test
+{
+    public class ScrollerTest5 : TestCaseBase
+    {
+        public override string TestName => "ScrollerTest5";
+        public override string TestDescription => "To test basic operation of Scroller";
+
+        int _currentIndex = 0;
+
+        public override void Run(Window window)
+        {
+            Conformant conformant = new Conformant(window);
+            conformant.Show();
+            Box outterBox = new Box(window)
+            {
+                AlignmentX = -1,
+                AlignmentY = -1,
+                WeightX = 1,
+                WeightY = 1,
+                IsHorizontal = false,
+            };
+            outterBox.Show();
+            conformant.SetContent(outterBox);
+
+            Scroller scroller = new Scroller(window)
+            {
+                AlignmentX = -1,
+                AlignmentY = -1,
+                WeightX = 1,
+                WeightY = 1,
+                ScrollBlock = ScrollBlock.Vertical
+            };
+            scroller.Show();
+
+
+            Box innerBox = new Box(window)
+            {
+                AlignmentX = -1,
+                AlignmentY = -1,
+                WeightX = 1,
+                WeightY = 1,
+                IsHorizontal = true,
+            };
+            innerBox.Show();
+            scroller.SetContent(innerBox);
+
+            Rectangle[] rects = new Rectangle[5];
+            Random rnd = new Random();
+            for(int i = 0; i < 5; i++)
+            {
+                rects[i] = new Rectangle(window)
+                {
+                    AlignmentX = -1,
+                    AlignmentY = -1,
+                    WeightX = 1,
+                    WeightY = 1,
+                    Color = Color.FromRgb(rnd.Next(0, 255), rnd.Next(0, 255), rnd.Next(0, 255)),
+                };
+                rects[i].Show();
+                rects[i].MinimumWidth = 300;
+                innerBox.PackEnd(rects[i]);
+            }
+            innerBox.MinimumWidth = 300 * 5;
+            _currentIndex = 4;
+
+
+            Button btn = new Button(window)
+            {
+                AlignmentX = -1,
+                WeightX = 1,
+                Text = "Remove"
+            };
+            btn.Clicked += (s, e) =>
+            {
+                System.Console.WriteLine("current index {0}", _currentIndex);
+                System.Console.WriteLine("Before Current Region : {0}", scroller.CurrentRegion);
+                innerBox.UnPack(rects[_currentIndex]);
+                innerBox.MinimumWidth = 300 * _currentIndex;
+                rects[_currentIndex].Hide();
+                _currentIndex--;
+                System.Console.WriteLine("After Current Region : {0}", scroller.CurrentRegion);
+
+                EcoreMainloop.Post(() =>
+                {
+                    System.Console.WriteLine("On idler Current Region : {0}", scroller.CurrentRegion);
+                });
+
+                EcoreMainloop.AddTimer(0, () =>
+                {
+                    System.Console.WriteLine("After 0 sec Current Region : {0}", scroller.CurrentRegion);
+                    return false;
+                });
+            };
+            scroller.Scrolled += (s, e) =>
+            {
+                System.Console.WriteLine("Scrolled to {0}", scroller.CurrentRegion);
+            };
+
+            btn.Show();
+
+            outterBox.PackEnd(btn);
+            outterBox.PackEnd(scroller);
+            
+            
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/ElmSharp.Test/TC/ScrollerTest6.cs b/test/ElmSharp.Test/TC/ScrollerTest6.cs
new file mode 100644 (file)
index 0000000..7c5d8e3
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using ElmSharp;
+using System.Collections.Generic;
+
+namespace ElmSharp.Test
+{
+    public class ScrollerTest6 : TestCaseBase
+    {
+        public override string TestName => "ScrollerTest6";
+        public override string TestDescription => "To test basic operation of Scroller";
+
+        int _currentIndex = 0;
+
+        public override void Run(Window window)
+        {
+            Conformant conformant = new Conformant(window);
+            conformant.Show();
+            Box outterBox = new Box(window)
+            {
+                AlignmentX = -1,
+                AlignmentY = -1,
+                WeightX = 1,
+                WeightY = 1,
+                IsHorizontal = false,
+            };
+            outterBox.Show();
+            conformant.SetContent(outterBox);
+
+            Scroller scroller = new Scroller(window)
+            {
+                AlignmentX = -1,
+                AlignmentY = -1,
+                WeightX = 1,
+                WeightY = 1,
+                ScrollBlock = ScrollBlock.Vertical
+            };
+            scroller.Show();
+
+
+            Box innerBox = new Box(window)
+            {
+                AlignmentX = -1,
+                AlignmentY = -1,
+                WeightX = 1,
+                WeightY = 1,
+                IsHorizontal = true,
+            };
+            innerBox.Show();
+            scroller.SetContent(innerBox);
+
+            var rects = new List<Rectangle>();
+            Random rnd = new Random();
+            for(int i = 0; i < 30; i++)
+            {
+                var rect = new Rectangle(window)
+                {
+                    AlignmentX = -1,
+                    AlignmentY = -1,
+                    WeightX = 1,
+                    WeightY = 1,
+                    Color = Color.FromRgb(rnd.Next(0, 255), rnd.Next(0, 255), rnd.Next(0, 255)),
+                };
+                rect.Show();
+                innerBox.PackEnd(rect);
+                rects.Add(rect);
+            };
+
+            innerBox.SetLayoutCallback(() =>
+            {
+                System.Console.WriteLine("!!!! update layout");
+                System.Console.WriteLine("MinimumWith = {0}", innerBox.MinimumWidth);
+
+            });
+            for (int i = 0; i < rects.Count; i++)
+            {
+                rects[i].Geometry = new Rect(i / 3 * 400 + innerBox.Geometry.X, i % 3 * 400 + innerBox.Geometry.Y, 400, 400);
+            }
+            innerBox.MinimumWidth = (int)Math.Ceiling(rects.Count / 3.0) * 400;
+
+            Button btn = new Button(window)
+            {
+                AlignmentX = -1,
+                WeightX = 1,
+                Text = "Remove"
+            };
+            btn.Clicked += (s, e) =>
+            {
+                System.Console.WriteLine("current index {0}", _currentIndex);
+                System.Console.WriteLine("Before Current Region : {0}", scroller.CurrentRegion);
+                int last = rects.Count - 1;
+                innerBox.UnPack(rects[last]);
+                rects[last].Hide();
+                rects.RemoveAt(last);
+
+                System.Console.WriteLine(" innerBox MinimumWith = {0}", innerBox.MinimumWidth);
+                System.Console.WriteLine("After Current Region : {0}", scroller.CurrentRegion);
+
+                EcoreMainloop.Post(() =>
+                {
+                    System.Console.WriteLine("On idler Current Region : {0}", scroller.CurrentRegion);
+                });
+
+                EcoreMainloop.AddTimer(0, () =>
+                {
+                    System.Console.WriteLine("After 0 sec Current Region : {0}", scroller.CurrentRegion);
+                    return false;
+                });
+            };
+            scroller.Scrolled += (s, e) =>
+            {
+                System.Console.WriteLine("Scrolled to {0}", scroller.CurrentRegion);
+                System.Console.WriteLine("in scrolling MinimumWith = {0}", innerBox.MinimumWidth);
+            };
+
+            btn.Show();
+
+            outterBox.PackEnd(btn);
+            outterBox.PackEnd(scroller);
+            
+            
+        }
+    }
+}
\ No newline at end of file