* Provide ClassName property on EvasObject by using eo_class_get(), eo_class_name_get()
* edje_object_color_class_del(IntPtr obj, string colorClass) has been added to prepare support to reset object color.
Change-Id: Icd2249aad30e81ec142bdaca091796e3e00eaeda
<Compile Include="ElmSharp\Widget.cs" />\r
<Compile Include="ElmSharp\Window.cs" />\r
<Compile Include="ElmSharp\WrapType.cs" />\r
+ <Compile Include="Interop\Interop.Eo.cs" />\r
<Compile Include="Interop\Interop.Ecore.cs" />\r
<Compile Include="Interop\Interop.Elementary.Bg.cs" />\r
<Compile Include="Interop\Interop.Elementary.Box.cs" />\r
public bool IsRealized { get { return Handle != IntPtr.Zero; } }
+ public string ClassName
+ {
+ get
+ {
+ return Interop.Eo.eo_class_name_get(Interop.Eo.eo_class_get(Handle));
+ }
+ }
+
public double WeightX
{
get
internal static extern IntPtr elm_layout_edje_get(IntPtr obj);
[DllImport(Libraries.Elementary)]
+ internal static extern void edje_object_color_class_del(IntPtr obj, string colorClass);
+
+ [DllImport(Libraries.Elementary)]
internal static extern bool edje_object_part_exists(IntPtr obj, string part);
[DllImport(Libraries.Elementary)]
return Marshal.PtrToStringAnsi(text);
}
-
[DllImport(Libraries.Elementary, EntryPoint = "edje_object_part_text_style_user_peek", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
internal static extern IntPtr _edje_object_part_text_style_user_peek(IntPtr obj, string part);
--- /dev/null
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+using System.Runtime.InteropServices;
+
+internal static partial class Interop
+{
+ internal static partial class Eo
+ {
+ [DllImport(Libraries.Eo)]
+ internal static extern IntPtr eo_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);
+
+ internal static string eo_class_name_get(IntPtr obj)
+ {
+ var name = _eo_class_name_get(obj);
+ return Marshal.PtrToStringAnsi(name);
+ }
+
+ }
+
+}
\ No newline at end of file
internal const string Elementary = "libelementary.so.1";
internal const string Eina = "libeina.so.1";
internal const string Ecore = "libecore.so.1";
+ internal const string Eo = "libeo.so.1";
}
}
{
Button button1 = new Button(window) {
Text = "Button 1",
-
};
+ button1.SetPartColor("bg-default", Color.Red);
+
button1.Clicked += (s, e) =>
{
- Console.WriteLine("Button1 Clicked!");
+ Console.WriteLine("Button1 Clicked! : {0}", button1.ClassName);
+ Console.WriteLine("Button1 Clicked! : {0}", button1.ClassName.ToLower());
+ Console.WriteLine("Button1 Clicked! : {0}", button1.ClassName.ToLower().Replace("_","/widget/"));
+ Console.WriteLine("Button1 Clicked! : {0}", button1.ClassName.ToLower().Replace("_", "/widget/")+ "/" + "bg-default");
};
button1.Pressed += (s, e) =>
}
}
-}
\ No newline at end of file
+}