From: Seungkeun Lee Date: Thu, 8 Sep 2016 07:24:59 +0000 (+0900) Subject: Add IsEnabled property in ItemObject X-Git-Tag: submit/trunk/20170823.075128~110^2~284 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1319d18e53a47956227a63773d3079f18ea73f06;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Add IsEnabled property in ItemObject - To support ListView item disabling Change-Id: I7ada52e8a1a2f536a55fbc9a60e73d6d25986f5b --- diff --git a/src/ElmSharp/ElmSharp/ItemObject.cs b/src/ElmSharp/ElmSharp/ItemObject.cs index 77ca614..594681f 100644 --- a/src/ElmSharp/ElmSharp/ItemObject.cs +++ b/src/ElmSharp/ElmSharp/ItemObject.cs @@ -31,6 +31,12 @@ namespace ElmSharp public int Id { get; private set; } + public bool IsEnabled + { + get { return !Interop.Elementary.elm_object_item_disabled_get(Handle); } + set { Interop.Elementary.elm_object_item_disabled_set(Handle, !value); } + } + internal IntPtr Handle { get diff --git a/src/ElmSharp/Interop/Interop.Elementary.cs b/src/ElmSharp/Interop/Interop.Elementary.cs index c8fe751..33d3226 100644 --- a/src/ElmSharp/Interop/Interop.Elementary.cs +++ b/src/ElmSharp/Interop/Interop.Elementary.cs @@ -174,6 +174,12 @@ internal static partial class Interop internal static extern void elm_object_item_del_cb_set(IntPtr obj, Interop.Evas.SmartCallback callback); [DllImport(Libraries.Elementary)] + internal static extern void elm_object_item_disabled_set(IntPtr obj, bool disable); + + [DllImport(Libraries.Elementary)] + internal static extern bool elm_object_item_disabled_get(IntPtr obj); + + [DllImport(Libraries.Elementary)] internal static extern bool elm_object_focus_get(IntPtr obj); [DllImport(Libraries.Elementary)]