[ElmSharp] modified eo api name according to efl 1.2.0 api name (#204)
authorarosis78 <35049857+arosis78@users.noreply.github.com>
Tue, 3 Apr 2018 01:30:08 +0000 (10:30 +0900)
committerGitHub <noreply@github.com>
Tue, 3 Apr 2018 01:30:08 +0000 (10:30 +0900)
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

src/ElmSharp/ElmSharp/EvasObject.cs [changed mode: 0644->0755]
src/ElmSharp/ElmSharp/Layout.cs [changed mode: 0644->0755]
src/ElmSharp/Interop/Interop.Elementary.cs
src/ElmSharp/Interop/Interop.Eo.cs [changed mode: 0644->0755]
test/ElmSharp.Test/TC/Wearable/ButtonTest1.cs [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 5d84180..3dce358
@@ -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));
             }
         }
 
old mode 100644 (file)
new mode 100755 (executable)
index b2c6f8e..bc8d6b7
@@ -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
                 {
index ceef160..5e7acc4 100755 (executable)
@@ -375,6 +375,9 @@ internal static partial class Interop
         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);
 
         [DllImport(Libraries.Elementary)]
old mode 100644 (file)
new mode 100755 (executable)
index 9ff0936..b42a9cb
@@ -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);
         }
 
old mode 100644 (file)
new mode 100755 (executable)
index d1addb8..f02b0e3
@@ -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) =>