From: arosis78 <35049857+arosis78@users.noreply.github.com> Date: Tue, 3 Apr 2018 01:30:08 +0000 (+0900) Subject: [ElmSharp] modified eo api name according to efl 1.2.0 api name (#204) X-Git-Tag: submit/tizen/20180404.151054~1^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e239a3c40953359b108d2bf50f93315f673f18b7;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [ElmSharp] modified eo api name according to efl 1.2.0 api name (#204) eo_class_get and eo_class_name_get are modified to efl_class_get and efl_class_name_get in efl 1.2.0 Additionally, added elm_object_color_class_del and used this api instead of edje_object_color_class_del in Layout --- diff --git a/src/ElmSharp/ElmSharp/EvasObject.cs b/src/ElmSharp/ElmSharp/EvasObject.cs old mode 100644 new mode 100755 index 5d841805d..3dce35823 --- a/src/ElmSharp/ElmSharp/EvasObject.cs +++ b/src/ElmSharp/ElmSharp/EvasObject.cs @@ -360,7 +360,7 @@ namespace ElmSharp { get { - return Interop.Eo.eo_class_name_get(Interop.Eo.eo_class_get(RealHandle)); + return Interop.Eo.efl_class_name_get(Interop.Eo.efl_class_get(RealHandle)); } } diff --git a/src/ElmSharp/ElmSharp/Layout.cs b/src/ElmSharp/ElmSharp/Layout.cs old mode 100644 new mode 100755 index b2c6f8e7b..bc8d6b7d3 --- a/src/ElmSharp/ElmSharp/Layout.cs +++ b/src/ElmSharp/ElmSharp/Layout.cs @@ -325,10 +325,9 @@ namespace ElmSharp { set { - if (value.IsDefault && ClassName != null) + if (value.IsDefault) { - string part = ClassName.ToLower().Replace("elm_", "") + "/" + "bg"; - EdjeObject.DeleteColorClass(part); + Interop.Elementary.elm_object_color_class_del(RealHandle, "bg"); } else { diff --git a/src/ElmSharp/Interop/Interop.Elementary.cs b/src/ElmSharp/Interop/Interop.Elementary.cs index ceef160d5..5e7acc4b0 100755 --- a/src/ElmSharp/Interop/Interop.Elementary.cs +++ b/src/ElmSharp/Interop/Interop.Elementary.cs @@ -374,6 +374,9 @@ internal static partial class Interop [DllImport(Libraries.Elementary)] internal static extern void elm_object_color_class_color_set(IntPtr obj, string colorClass, int r, int g, int b, int a); + [DllImport(Libraries.Elementary)] + internal static extern void elm_object_color_class_del(IntPtr obj, string colorClass); + [DllImport(Libraries.Elementary)] internal static extern void elm_object_part_text_set(IntPtr obj, string part, string text); diff --git a/src/ElmSharp/Interop/Interop.Eo.cs b/src/ElmSharp/Interop/Interop.Eo.cs old mode 100644 new mode 100755 index 9ff0936cc..b42a9cb4a --- a/src/ElmSharp/Interop/Interop.Eo.cs +++ b/src/ElmSharp/Interop/Interop.Eo.cs @@ -22,14 +22,14 @@ internal static partial class Interop internal static partial class Eo { [DllImport(Libraries.Eo)] - internal static extern IntPtr eo_class_get(IntPtr obj); + internal static extern IntPtr efl_class_get(IntPtr obj); - [DllImport(Libraries.Eo, EntryPoint = "eo_class_name_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)] - internal static extern IntPtr _eo_class_name_get(IntPtr klass); + [DllImport(Libraries.Eo, EntryPoint = "efl_class_name_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)] + internal static extern IntPtr _efl_class_name_get(IntPtr klass); - internal static string eo_class_name_get(IntPtr obj) + internal static string efl_class_name_get(IntPtr obj) { - var name = _eo_class_name_get(obj); + var name = _efl_class_name_get(obj); return Marshal.PtrToStringAnsi(name); } diff --git a/test/ElmSharp.Test/TC/Wearable/ButtonTest1.cs b/test/ElmSharp.Test/TC/Wearable/ButtonTest1.cs old mode 100644 new mode 100755 index d1addb8d6..f02b0e361 --- a/test/ElmSharp.Test/TC/Wearable/ButtonTest1.cs +++ b/test/ElmSharp.Test/TC/Wearable/ButtonTest1.cs @@ -30,10 +30,6 @@ namespace ElmSharp.Test.Wearable button.Clicked += (s, e) => { Log.Debug($"{button.Text} Clicked! : {button.BackgroundColor}"); - Log.Debug($"{button.Text} Clicked! : {button.ClassName}"); - Log.Debug($"{button.Text} Clicked! : {button.ClassName.ToLower()}"); - Log.Debug($"{button.Text} Clicked! : {button.ClassName.ToLower().Replace("elm_", "")}"); - Log.Debug($"{button.Text} Clicked! : {button.ClassName.ToLower().Replace("elm_", "") + "/" + "bg"}"); }; button.Pressed += (s, e) =>