Add FocusOnSelection property to GenList 43/156643/2
authordarkleem <cdark.lim@samsung.com>
Thu, 19 Oct 2017 08:24:28 +0000 (17:24 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Mon, 23 Oct 2017 05:52:04 +0000 (05:52 +0000)
  - include elm_genlist_focus_on_selection function
  - ElmSharp.Test migration

Change-Id: Iccbf12925750f6752727715ed62b3817abfc2aba

src/ElmSharp/ElmSharp.sln
src/ElmSharp/ElmSharp/GenList.cs
src/ElmSharp/Interop/Interop.Elementary.GenListView.cs
test/ElmSharp.Test/ElmSharp.Test.csproj

index a762491..4f8c3ce 100755 (executable)
@@ -1,10 +1,20 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 15
-VisualStudioVersion = 15.0.26430.12
+VisualStudioVersion = 15.0.27004.2002
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElmSharp", "ElmSharp.csproj", "{14E1F109-06BC-4BB7-9146-704A71EC2522}"
 EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElmSharp.Test", "..\..\test\ElmSharp.Test\ElmSharp.Test.csproj", "{5B98F018-2F17-4F70-BDC3-C539B134E2AE}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen", "..\Tizen\Tizen.csproj", "{225F3CC2-ACCD-40DF-A06E-8D6B763AFD5C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Log", "..\Tizen.Log\Tizen.Log.csproj", "{336DF7DE-FF3F-479A-827B-C602CCBDEC5F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Applications.UI", "..\Tizen.Applications.UI\Tizen.Applications.UI.csproj", "{D0710FFD-F89F-4B11-BD25-D7484713AC64}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Applications.Common", "..\Tizen.Applications.Common\Tizen.Applications.Common.csproj", "{526D21B7-D8BD-47F5-9A87-1E8E15A0D5AE}"
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Any CPU = Debug|Any CPU
@@ -15,8 +25,31 @@ Global
                {14E1F109-06BC-4BB7-9146-704A71EC2522}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {14E1F109-06BC-4BB7-9146-704A71EC2522}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {14E1F109-06BC-4BB7-9146-704A71EC2522}.Release|Any CPU.Build.0 = Release|Any CPU
+               {5B98F018-2F17-4F70-BDC3-C539B134E2AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {5B98F018-2F17-4F70-BDC3-C539B134E2AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {5B98F018-2F17-4F70-BDC3-C539B134E2AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {5B98F018-2F17-4F70-BDC3-C539B134E2AE}.Release|Any CPU.Build.0 = Release|Any CPU
+               {225F3CC2-ACCD-40DF-A06E-8D6B763AFD5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {225F3CC2-ACCD-40DF-A06E-8D6B763AFD5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {225F3CC2-ACCD-40DF-A06E-8D6B763AFD5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {225F3CC2-ACCD-40DF-A06E-8D6B763AFD5C}.Release|Any CPU.Build.0 = Release|Any CPU
+               {336DF7DE-FF3F-479A-827B-C602CCBDEC5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {336DF7DE-FF3F-479A-827B-C602CCBDEC5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {336DF7DE-FF3F-479A-827B-C602CCBDEC5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {336DF7DE-FF3F-479A-827B-C602CCBDEC5F}.Release|Any CPU.Build.0 = Release|Any CPU
+               {D0710FFD-F89F-4B11-BD25-D7484713AC64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {D0710FFD-F89F-4B11-BD25-D7484713AC64}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {D0710FFD-F89F-4B11-BD25-D7484713AC64}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {D0710FFD-F89F-4B11-BD25-D7484713AC64}.Release|Any CPU.Build.0 = Release|Any CPU
+               {526D21B7-D8BD-47F5-9A87-1E8E15A0D5AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {526D21B7-D8BD-47F5-9A87-1E8E15A0D5AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {526D21B7-D8BD-47F5-9A87-1E8E15A0D5AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {526D21B7-D8BD-47F5-9A87-1E8E15A0D5AE}.Release|Any CPU.Build.0 = Release|Any CPU
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
        EndGlobalSection
+       GlobalSection(ExtensibilityGlobals) = postSolution
+               SolutionGuid = {7374A40E-8414-4249-925C-0DF5F19C773F}
+       EndGlobalSection
 EndGlobal
index 220290d..7afb41c 100755 (executable)
@@ -289,6 +289,26 @@ namespace ElmSharp
         }
 
         /// <summary>
+        /// Gets or Sets focus upon items selection mode.
+        /// </summary>
+        /// <remarks>
+        /// When enabled, every selection of an item inside the <see cref="GenList"/> will automatically set focus to its first focusable widget from the left.
+        /// This is true of course if the selection was made by clicking an unfocusable area in an item or selecting it with a key movement.
+        /// Clicking on a focusable widget inside an item will couse this particular item to get focus as usual.
+        /// </remarks>
+        public bool FocusOnSelection
+        {
+            get
+            {
+                return Interop.Elementary.elm_genlist_focus_on_selection_get(RealHandle);
+            }
+            set
+            {
+                Interop.Elementary.elm_genlist_focus_on_selection_set(RealHandle, value);
+            }
+        }
+
+        /// <summary>
         /// Gets or sets whether enable multi-selection in the genlist.
         /// </summary>
         public bool IsMultiSelection
index bfb326f..f2ef63f 100644 (file)
@@ -179,6 +179,12 @@ internal static partial class Interop
         internal static extern void elm_genlist_longpress_timeout_set(IntPtr obj, double timeout);
 
         [DllImport(Libraries.Elementary)]
+        internal static extern void elm_genlist_focus_on_selection_set(IntPtr obj, bool enabled);
+
+        [DllImport(Libraries.Elementary)]
+        internal static extern bool elm_genlist_focus_on_selection_get(IntPtr obj);
+
+        [DllImport(Libraries.Elementary)]
         internal static extern bool elm_genlist_multi_select_get(IntPtr obj);
 
         [DllImport(Libraries.Elementary)]
index 5842abe..6880f41 100755 (executable)
@@ -1,26 +1,10 @@
-<Project>
-  <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
+<Project Sdk="Microsoft.NET.Sdk">
 
-  <!-- Setting Tizen Extension Path -->
-  <PropertyGroup Label="Globals">
-    <TizenProjectExtensionsPath>$(MSBuildExtensionsPath)\Tizen\VisualStudio\</TizenProjectExtensionsPath>
-  </PropertyGroup>
-
-  <!-- Import Tizen property in Tizen.NET SDK -->
-  <Import Project="$(TizenProjectExtensionsPath)Tizen.NET.ProjectType.props" Condition="Exists('$(TizenProjectExtensionsPath)Tizen.NET.ProjectType.props')" />
-
-  <!-- Property Group for .NET Core Project -->
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.0</TargetFramework>
   </PropertyGroup>
 
-  <!-- Property Group for Tizen Project -->
-  <PropertyGroup>
-    <TizenCreateTpkOnBuild>true</TizenCreateTpkOnBuild>
-    <PackageTargetFallback>$(PackageTargetFallback);portable-net45+wp80+win81+wpa81</PackageTargetFallback>
-  </PropertyGroup>
-
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
   <!-- Include Nuget Package for Tizen Project building -->
   <ItemGroup>
-    <PackageReference Include="Tizen.NET" Version="3.0.0" />
-    <PackageReference Include="Tizen.NET.Sdk" Version="0.9.16-pre1" />
+    <PackageReference Include="Tizen.NET.Sdk" Version="1.0.0-pre4" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\src\ElmSharp\ElmSharp.csproj" />
+    <ProjectReference Include="..\..\src\Tizen.Applications.Common\Tizen.Applications.Common.csproj" />
+    <ProjectReference Include="..\..\src\Tizen.Applications.UI\Tizen.Applications.UI.csproj" />
+    <ProjectReference Include="..\..\src\Tizen.Log\Tizen.Log.csproj" />
+    <ProjectReference Include="..\..\src\Tizen\Tizen.csproj" />
   </ItemGroup>
 
-  <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
-  <Import Project="$(TizenProjectExtensionsPath)Tizen.NET.ProjectType.targets" Condition="Exists('$(TizenProjectExtensionsPath)Tizen.NET.ProjectType.targets')" />
-
-  <!-- Install Check 'Visual Studio for Tizen' for developing on Visual Studio -->
-  <Target Name="TizenVsixInstallCheck" BeforeTargets="CompileDesignTime">
-    <Warning Condition="!Exists('$(TizenProjectExtensionsPath)Tizen.NET.ProjectType.props')" Text="$(TizenProjectExtensionsPath)Tizen.NET.ProjectType.props is not exist.&#xA; you need to check if 'Visual Studio for Tizen' is installed" />
-    <Warning Condition="!Exists('$(TizenProjectExtensionsPath)Tizen.NET.ProjectType.targets')" Text="$(TizenProjectExtensionsPath)Tizen.NET.ProjectType.targets is not exist.\&#xA; you need to check if 'Visual Studio for Tizen' is installed" />
-  </Target>
 </Project>
\ No newline at end of file