summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeunghyun Choi <sh4682.choi@samsung.com>2017-04-25 19:30:29 +0900
committerSeungkeun Lee <sngn.lee@samsung.com>2017-04-26 01:02:47 +0000
commit59ea4786ba1d55db51c52940fcf191526b74efa9 (patch)
treeb1cf2f98dd78d7946e0c007db8567b2308b23d2d
parente8046eaa049905d962a83a65c43b076be4e90853 (diff)
downloadelm-sharp-59ea4786ba1d55db51c52940fcf191526b74efa9.tar.gz
elm-sharp-59ea4786ba1d55db51c52940fcf191526b74efa9.tar.bz2
elm-sharp-59ea4786ba1d55db51c52940fcf191526b74efa9.zip
Add IsIndicatorFocusable property in Slider
- need to TV UIComponents Change-Id: Id2a84bb4185f5473935abe4bb23f00f4a4577303 Signed-off-by: Seunghyun Choi <sh4682.choi@samsung.com>
-rw-r--r--ElmSharp.Test/TC/SliderTest1.cs29
-rw-r--r--[-rwxr-xr-x]ElmSharp/ElmSharp/Slider.cs19
-rw-r--r--ElmSharp/Interop/Interop.Elementary.Slider.cs12
3 files changed, 53 insertions, 7 deletions
diff --git a/ElmSharp.Test/TC/SliderTest1.cs b/ElmSharp.Test/TC/SliderTest1.cs
index 200d770..9113836 100644
--- a/ElmSharp.Test/TC/SliderTest1.cs
+++ b/ElmSharp.Test/TC/SliderTest1.cs
@@ -46,7 +46,28 @@ namespace ElmSharp.Test
AlignmentX = -1,
AlignmentY = 0.5,
WeightX = 1,
- WeightY = 1
+ WeightY = 1,
+ IsIndicatorFocusable = true
+ };
+
+ Button btn = new Button(window)
+ {
+ AlignmentX = -1,
+ AlignmentY = 0,
+ WeightX = 1,
+ WeightY = 1,
+ Text = "Set IsIndicatorFocusable"
+ };
+ btn.Clicked += (s, e) =>
+ {
+ if (sld1.IsIndicatorFocusable)
+ {
+ sld1.IsIndicatorFocusable = false;
+ }
+ else
+ {
+ sld1.IsIndicatorFocusable = true;
+ }
};
Label lb1 = new Label(window)
@@ -58,9 +79,11 @@ namespace ElmSharp.Test
};
table.Pack(sld1, 1, 1, 2, 1);
- table.Pack(lb1, 1, 2, 2, 1);
+ table.Pack(btn, 1, 2, 2, 1);
+ table.Pack(lb1, 1, 3, 2, 1);
sld1.Show();
+ btn.Show();
lb1.Show();
sld1.ValueChanged += (s, e) =>
@@ -70,4 +93,4 @@ namespace ElmSharp.Test
};
}
}
-}
+} \ No newline at end of file
diff --git a/ElmSharp/ElmSharp/Slider.cs b/ElmSharp/ElmSharp/Slider.cs
index 3db4388..7bad50e 100755..100644
--- a/ElmSharp/ElmSharp/Slider.cs
+++ b/ElmSharp/ElmSharp/Slider.cs
@@ -19,7 +19,7 @@ using System;
namespace ElmSharp
{
/// <summary>
- /// The Slider is a widget that adds a draggable “slider” widget for selecting the value of something within a range.
+ /// The Slider is a widget that adds a draggable slider widget for selecting the value of something within a range.
/// </summary>
public class Slider : Layout
{
@@ -282,6 +282,21 @@ namespace ElmSharp
}
}
+ /// <summary>
+ /// Sets or gets whether to Show the indicator of slider on focus.
+ /// </summary>
+ public bool IsIndicatorFocusable
+ {
+ get
+ {
+ return Interop.Elementary.elm_slider_indicator_show_on_focus_get(RealHandle);
+ }
+ set
+ {
+ Interop.Elementary.elm_slider_indicator_show_on_focus_set(RealHandle, value);
+ }
+ }
+
protected override IntPtr CreateHandle(EvasObject parent)
{
IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
@@ -293,4 +308,4 @@ namespace ElmSharp
return handle;
}
}
-}
+} \ No newline at end of file
diff --git a/ElmSharp/Interop/Interop.Elementary.Slider.cs b/ElmSharp/Interop/Interop.Elementary.Slider.cs
index 5dc88f4..074311c 100644
--- a/ElmSharp/Interop/Interop.Elementary.Slider.cs
+++ b/ElmSharp/Interop/Interop.Elementary.Slider.cs
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the License);
@@ -31,10 +31,17 @@ internal static partial class Interop
internal static extern bool elm_slider_indicator_show_get(IntPtr obj);
[DllImport(Libraries.Elementary)]
+ internal static extern void elm_slider_indicator_show_on_focus_set(IntPtr obj, bool focus);
+
+ [DllImport(Libraries.Elementary)]
+ internal static extern bool elm_slider_indicator_show_on_focus_get(IntPtr obj);
+
+ [DllImport(Libraries.Elementary)]
internal static extern void elm_slider_indicator_format_set(IntPtr obj, string indicator);
[DllImport(Libraries.Elementary, EntryPoint = "elm_slider_indicator_format_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
internal static extern IntPtr _elm_slider_indicator_format_get(IntPtr obj);
+
internal static string elm_slider_indicator_format_get(IntPtr obj)
{
var text = _elm_slider_indicator_format_get(obj);
@@ -46,6 +53,7 @@ internal static partial class Interop
[DllImport(Libraries.Elementary, EntryPoint = "elm_slider_unit_format_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
internal static extern IntPtr _elm_slider_unit_format_get(IntPtr obj);
+
internal static string elm_slider_unit_format_get(IntPtr obj)
{
var text = _elm_slider_unit_format_get(obj);
@@ -94,4 +102,4 @@ internal static partial class Interop
[DllImport(Libraries.Elementary)]
internal static extern double elm_slider_step_get(IntPtr obj);
}
-}
+} \ No newline at end of file