1 // Copyright 2016 by Samsung Electronics, Inc.,
3 // This software is the confidential and proprietary information
4 // of Samsung Electronics, Inc. ("Confidential Information"). You
5 // shall not disclose such Confidential Information and shall use
6 // it only in accordance with the terms of the license agreement
7 // you entered into with Samsung.
10 using System.Runtime.InteropServices;
12 internal static partial class Interop
14 internal static partial class Elementary
16 [DllImport(Libraries.Elementary)]
17 internal static extern double elm_config_scroll_bring_in_scroll_friction_set(double time);
19 [DllImport(Libraries.Elementary)]
20 internal static extern double elm_config_scroll_bring_in_scroll_friction_get();
22 [DllImport(Libraries.Elementary)]
23 internal static extern IntPtr elm_config_accel_preference_set(string preference);
25 [DllImport(Libraries.Elementary)]
26 internal static extern void elm_object_tree_dump(IntPtr top);
28 [DllImport(Libraries.Elementary)]
29 internal static extern bool elm_object_disabled_get(IntPtr obj);
31 [DllImport(Libraries.Elementary)]
32 internal static extern void elm_object_disabled_set(IntPtr obj, bool disabled);
34 [DllImport(Libraries.Elementary)]
35 internal static extern void elm_init(int argc, string[] argv);
37 [DllImport(Libraries.Elementary)]
38 internal static extern bool ecore_main_loop_glib_integrate();
40 [DllImport(Libraries.Elementary)]
41 internal static extern void elm_run();
43 [DllImport(Libraries.Elementary)]
44 internal static extern void elm_exit();
46 [DllImport(Libraries.Elementary)]
47 internal static extern void elm_shutdown();
49 [DllImport(Libraries.Elementary)]
50 internal static extern void elm_app_base_scale_set(double base_scale);
52 [DllImport(Libraries.Elementary)]
53 internal static extern IntPtr elm_conformant_add(IntPtr obj);
55 [DllImport(Libraries.Elementary, EntryPoint = "elm_object_part_text_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
56 internal static extern IntPtr _elm_object_part_text_get(IntPtr obj, IntPtr part);
58 [DllImport(Libraries.Elementary, EntryPoint = "elm_object_part_text_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
59 internal static extern IntPtr _elm_object_part_text_get(IntPtr obj, string part);
61 internal static string elm_object_part_text_get(IntPtr obj, string part)
63 var text = _elm_object_part_text_get(obj, part);
64 return Marshal.PtrToStringAnsi(text);
67 internal static string elm_object_part_text_get(IntPtr obj)
69 var text = _elm_object_part_text_get(obj, IntPtr.Zero);
70 return Marshal.PtrToStringAnsi(text);
73 [DllImport(Libraries.Elementary)]
74 internal static extern void elm_object_item_part_content_set(IntPtr obj, string part, IntPtr content);
76 [DllImport(Libraries.Elementary)]
77 internal static extern IntPtr elm_object_item_part_content_unset(IntPtr obj, string part);
79 [DllImport(Libraries.Elementary)]
80 internal static extern void elm_object_item_part_content_set(IntPtr obj, IntPtr part, IntPtr content);
82 [DllImport(Libraries.Elementary)]
83 internal static extern IntPtr elm_object_part_content_get(IntPtr obj, string part);
85 [DllImport(Libraries.Elementary)]
86 internal static extern void elm_object_part_content_set(IntPtr obj, string part, IntPtr content);
88 [DllImport(Libraries.Elementary)]
89 internal static extern void elm_object_part_content_set(IntPtr obj, IntPtr part, IntPtr content);
91 internal static void elm_object_content_set(IntPtr obj, IntPtr content)
93 elm_object_part_content_set(obj, IntPtr.Zero, content);
96 [DllImport(Libraries.Elementary)]
97 internal static extern void elm_object_part_content_unset(IntPtr obj, string part);
99 internal static void elm_object_content_unset(IntPtr obj)
101 elm_object_part_content_unset(obj, null);
104 [DllImport(Libraries.Elementary)]
105 internal static extern IntPtr elm_layout_add(IntPtr obj);
107 [DllImport(Libraries.Elementary)]
108 internal static extern IntPtr elm_layout_content_get(IntPtr obj, string swallow);
110 [DllImport(Libraries.Elementary)]
111 internal static extern bool elm_layout_content_set(IntPtr obj, string swallow, IntPtr content);
113 [DllImport(Libraries.Elementary)]
114 internal static extern IntPtr elm_layout_content_unset(IntPtr obj, string swallow);
116 [DllImport(Libraries.Elementary)]
117 internal static extern bool elm_layout_text_set(IntPtr obj, string part, string text);
119 [DllImport(Libraries.Elementary, EntryPoint = "elm_layout_text_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
120 internal static extern IntPtr _elm_layout_text_get(IntPtr obj, string part);
122 internal static string elm_layout_text_get(IntPtr obj, string part)
124 var text = _elm_layout_text_get(obj, part);
125 return Marshal.PtrToStringAnsi(text);
128 [DllImport(Libraries.Elementary)]
129 internal static extern bool elm_layout_theme_set(IntPtr obj, string klass, string group, string style);
131 [DllImport(Libraries.Elementary)]
132 internal static extern bool elm_layout_file_set(IntPtr obj, string file, string group);
134 [DllImport(Libraries.Elementary)]
135 internal static extern bool elm_object_style_set(IntPtr obj, string style);
137 [DllImport(Libraries.Elementary, EntryPoint = "elm_object_style_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
138 internal static extern IntPtr _elm_object_style_get(IntPtr obj);
140 internal static string elm_object_style_get(IntPtr obj)
142 var text = _elm_object_style_get(obj);
143 return Marshal.PtrToStringAnsi(text);
146 [DllImport(Libraries.Elementary)]
147 internal static extern void elm_object_part_color_set(IntPtr obj, string part, int r, int g, int b, int a);
149 [DllImport(Libraries.Elementary)]
150 internal static extern void elm_object_part_text_set(IntPtr obj, string part, string text);
152 [DllImport(Libraries.Elementary)]
153 internal static extern void elm_object_part_text_set(IntPtr obj, IntPtr part, string text);
155 [DllImport(Libraries.Elementary, EntryPoint = "elm_object_item_part_text_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
156 internal static extern IntPtr _elm_object_item_part_text_get(IntPtr obj, string part);
158 internal static string elm_object_item_part_text_get(IntPtr obj, string part)
160 var text = _elm_object_item_part_text_get(obj, part);
161 return Marshal.PtrToStringAnsi(text);
164 [DllImport(Libraries.Elementary)]
165 internal static extern void elm_object_item_part_text_set(IntPtr obj, string part, string label);
167 [DllImport(Libraries.Elementary)]
168 internal static extern void elm_object_item_part_text_set(IntPtr obj, IntPtr part, string label);
170 [DllImport(Libraries.Elementary)]
171 internal static extern IntPtr elm_object_item_data_get(IntPtr it);
173 [DllImport(Libraries.Elementary)]
174 internal static extern void elm_object_item_data_set(IntPtr it, IntPtr data);
176 [DllImport(Libraries.Elementary)]
177 internal static extern void elm_object_item_del(IntPtr obj);
179 [DllImport(Libraries.Elementary)]
180 internal static extern void elm_object_item_del_cb_set(IntPtr obj, Interop.Evas.SmartCallback callback);
182 [DllImport(Libraries.Elementary)]
183 internal static extern void elm_object_item_disabled_set(IntPtr obj, bool disable);
185 [DllImport(Libraries.Elementary)]
186 internal static extern bool elm_object_item_disabled_get(IntPtr obj);
188 [DllImport(Libraries.Elementary)]
189 internal static extern bool elm_object_focus_get(IntPtr obj);
191 [DllImport(Libraries.Elementary)]
192 internal static extern void elm_object_focus_set(IntPtr obj, bool focus);
194 [DllImport(Libraries.Elementary)]
195 internal static extern void elm_theme_extension_add(IntPtr theme, string path);
197 [DllImport(Libraries.Elementary)]
198 internal static extern void elm_theme_overlay_add(IntPtr theme, string path);
200 [DllImport(Libraries.Elementary)]
201 internal static extern IntPtr elm_theme_new();
203 [DllImport(Libraries.Elementary)]
204 internal static extern void elm_object_theme_set(IntPtr obj, IntPtr theme);
206 [DllImport(Libraries.Elementary)]
207 internal static extern IntPtr elm_layout_edje_get(IntPtr obj);
209 [DllImport(Libraries.Elementary)]
210 internal static extern void edje_object_color_class_del(IntPtr obj, string colorClass);
212 [DllImport(Libraries.Elementary)]
213 internal static extern bool edje_object_part_exists(IntPtr obj, string part);
215 [DllImport(Libraries.Elementary)]
216 internal static extern IntPtr edje_object_part_object_get(IntPtr obj, string part);
218 [DllImport(Libraries.Elementary)]
219 internal static extern bool edje_object_part_geometry_get(IntPtr obj, string part, out int x, out int y, out int w, out int h);
221 [DllImport(Libraries.Elementary)]
222 internal static extern bool edje_object_part_text_set(IntPtr obj, string part, string text);
224 [DllImport(Libraries.Elementary, EntryPoint = "edje_object_part_text_get", CharSet = CharSet.Ansi)]
225 internal static extern IntPtr _edje_object_part_text_get(IntPtr obj, string part);
227 internal static string edje_object_part_text_get(IntPtr obj, string part)
229 var text = _edje_object_part_text_get(obj, part);
230 return Marshal.PtrToStringAnsi(text);
233 [DllImport(Libraries.Elementary, EntryPoint = "edje_object_part_text_style_user_peek", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
234 internal static extern IntPtr _edje_object_part_text_style_user_peek(IntPtr obj, string part);
236 internal static string edje_object_part_text_style_user_peek(IntPtr obj, string part)
238 var text = _edje_object_part_text_style_user_peek(obj, part);
239 return Marshal.PtrToStringAnsi(text);
242 [DllImport(Libraries.Elementary)]
243 internal static extern void edje_object_part_text_style_user_push(IntPtr obj, string part, string style);
245 [DllImport(Libraries.Elementary)]
246 internal static extern void edje_object_part_text_style_user_pop(IntPtr obj, string part);
248 [DllImport(Libraries.Elementary)]
249 internal static extern void edje_object_signal_emit(IntPtr obj, string emission, string source);
251 internal static void SetObjectText(IntPtr obj, string text)
253 elm_object_part_text_set(obj, IntPtr.Zero, text);