2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.Runtime.InteropServices;
20 internal static partial class Interop
22 internal static partial class Elementary
24 [DllImport(Libraries.Elementary)]
25 internal static extern void elm_config_scroll_bring_in_scroll_friction_set(double time);
27 [DllImport(Libraries.Elementary)]
28 internal static extern double elm_config_scroll_bring_in_scroll_friction_get();
30 [DllImport(Libraries.Elementary)]
31 internal static extern IntPtr elm_config_accel_preference_set(string preference);
33 [DllImport(Libraries.Elementary)]
34 internal static extern void elm_config_scale_set(double scale);
36 [DllImport(Libraries.Elementary)]
37 internal static extern double elm_config_scale_get();
39 [DllImport(Libraries.Elementary)]
40 internal static extern string elm_config_profile_get();
42 [DllImport(Libraries.Elementary)]
43 internal static extern void elm_object_tree_dump(IntPtr top);
45 [DllImport(Libraries.Elementary)]
46 internal static extern bool elm_object_disabled_get(IntPtr obj);
48 [DllImport(Libraries.Elementary)]
49 internal static extern void elm_object_disabled_set(IntPtr obj, bool disabled);
51 [DllImport(Libraries.Elementary)]
52 internal static extern void elm_init(int argc, string[] argv);
54 [DllImport(Libraries.Elementary)]
55 internal static extern bool ecore_main_loop_glib_integrate();
57 [DllImport(Libraries.Elementary)]
58 internal static extern void elm_run();
60 [DllImport(Libraries.Elementary)]
61 internal static extern void elm_exit();
63 [DllImport(Libraries.Elementary)]
64 internal static extern void elm_shutdown();
66 [DllImport(Libraries.Elementary)]
67 internal static extern void elm_app_base_scale_set(double base_scale);
69 [DllImport(Libraries.Elementary)]
70 internal static extern IntPtr elm_conformant_add(IntPtr obj);
72 [DllImport(Libraries.Elementary, EntryPoint = "elm_object_part_text_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
73 internal static extern IntPtr _elm_object_part_text_get(IntPtr obj, IntPtr part);
75 [DllImport(Libraries.Elementary, EntryPoint = "elm_object_part_text_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
76 internal static extern IntPtr _elm_object_part_text_get(IntPtr obj, string part);
78 [DllImport(Libraries.Elementary)]
79 internal static extern void elm_object_tooltip_text_set(IntPtr obj, string text);
81 [DllImport(Libraries.Elementary)]
82 internal static extern void elm_object_tooltip_unset(IntPtr obj);
84 internal static string elm_object_part_text_get(IntPtr obj, string part)
86 var text = _elm_object_part_text_get(obj, part);
87 return Marshal.PtrToStringAnsi(text);
90 internal static string elm_object_part_text_get(IntPtr obj)
92 var text = _elm_object_part_text_get(obj, IntPtr.Zero);
93 return Marshal.PtrToStringAnsi(text);
96 [DllImport(Libraries.Elementary)]
97 internal static extern void elm_object_item_part_content_set(IntPtr obj, string part, IntPtr content);
99 [DllImport(Libraries.Elementary)]
100 internal static extern IntPtr elm_object_item_part_content_unset(IntPtr obj, string part);
102 [DllImport(Libraries.Elementary)]
103 internal static extern void elm_object_item_part_content_set(IntPtr obj, IntPtr part, IntPtr content);
105 [DllImport(Libraries.Elementary)]
106 internal static extern IntPtr elm_object_part_content_get(IntPtr obj, string part);
108 [DllImport(Libraries.Elementary)]
109 internal static extern void elm_object_part_content_set(IntPtr obj, string part, IntPtr content);
111 [DllImport(Libraries.Elementary)]
112 internal static extern void elm_object_part_content_set(IntPtr obj, IntPtr part, IntPtr content);
114 internal static void elm_object_content_set(IntPtr obj, IntPtr content)
116 elm_object_part_content_set(obj, IntPtr.Zero, content);
119 [DllImport(Libraries.Elementary)]
120 internal static extern void elm_object_part_content_unset(IntPtr obj, string part);
122 internal static void elm_object_content_unset(IntPtr obj)
124 elm_object_part_content_unset(obj, null);
127 [DllImport(Libraries.Elementary)]
128 internal static extern IntPtr elm_layout_add(IntPtr obj);
130 [DllImport(Libraries.Elementary)]
131 internal static extern IntPtr elm_layout_content_get(IntPtr obj, string swallow);
133 [DllImport(Libraries.Elementary)]
134 internal static extern bool elm_layout_content_set(IntPtr obj, string swallow, IntPtr content);
136 [DllImport(Libraries.Elementary)]
137 internal static extern IntPtr elm_layout_content_unset(IntPtr obj, string swallow);
139 [DllImport(Libraries.Elementary)]
140 internal static extern bool elm_layout_text_set(IntPtr obj, string part, string text);
142 [DllImport(Libraries.Elementary, EntryPoint = "elm_layout_text_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
143 internal static extern IntPtr _elm_layout_text_get(IntPtr obj, string part);
145 internal static string elm_layout_text_get(IntPtr obj, string part)
147 var text = _elm_layout_text_get(obj, part);
148 return Marshal.PtrToStringAnsi(text);
151 [DllImport(Libraries.Elementary)]
152 internal static extern bool elm_layout_theme_set(IntPtr obj, string klass, string group, string style);
154 [DllImport(Libraries.Elementary)]
155 internal static extern bool elm_layout_file_set(IntPtr obj, string file, string group);
157 [DllImport(Libraries.Elementary)]
158 internal static extern bool elm_object_style_set(IntPtr obj, string style);
160 [DllImport(Libraries.Elementary, EntryPoint = "elm_object_style_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
161 internal static extern IntPtr _elm_object_style_get(IntPtr obj);
163 internal static string elm_object_style_get(IntPtr obj)
165 var text = _elm_object_style_get(obj);
166 return Marshal.PtrToStringAnsi(text);
169 [DllImport(Libraries.Elementary)]
170 internal static extern void elm_object_color_class_color_get(IntPtr obj, string colorClass, out int r, out int g, out int b, out int a);
172 [DllImport(Libraries.Elementary)]
173 internal static extern void elm_object_color_class_color_set(IntPtr obj, string colorClass, int r, int g, int b, int a);
175 [DllImport(Libraries.Elementary)]
176 internal static extern void elm_object_part_text_set(IntPtr obj, string part, string text);
178 [DllImport(Libraries.Elementary)]
179 internal static extern void elm_object_part_text_set(IntPtr obj, IntPtr part, string text);
181 [DllImport(Libraries.Elementary, EntryPoint = "elm_object_item_part_text_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
182 internal static extern IntPtr _elm_object_item_part_text_get(IntPtr obj, string part);
184 internal static string elm_object_item_part_text_get(IntPtr obj, string part)
186 var text = _elm_object_item_part_text_get(obj, part);
187 return Marshal.PtrToStringAnsi(text);
190 [DllImport(Libraries.Elementary)]
191 internal static extern void elm_object_item_color_class_color_set(IntPtr it, string part, int r, int g, int b, int a);
193 [DllImport(Libraries.Elementary)]
194 internal static extern void elm_object_item_color_class_color_get(IntPtr obj, string part, out int r, out int g, out int b, out int a);
196 [DllImport(Libraries.Elementary)]
197 internal static extern void elm_object_item_color_class_del(IntPtr obj, string part);
199 [DllImport(Libraries.Elementary)]
200 internal static extern void elm_object_item_part_text_set(IntPtr obj, string part, string label);
202 [DllImport(Libraries.Elementary)]
203 internal static extern void elm_object_item_part_text_set(IntPtr obj, IntPtr part, string label);
205 [DllImport(Libraries.Elementary)]
206 internal static extern IntPtr elm_object_item_data_get(IntPtr it);
208 [DllImport(Libraries.Elementary)]
209 internal static extern void elm_object_item_data_set(IntPtr it, IntPtr data);
211 [DllImport(Libraries.Elementary)]
212 internal static extern void elm_object_item_del(IntPtr obj);
214 [DllImport(Libraries.Elementary)]
215 internal static extern void elm_object_item_del_cb_set(IntPtr obj, Interop.Evas.SmartCallback callback);
217 [DllImport(Libraries.Elementary)]
218 internal static extern void elm_object_item_disabled_set(IntPtr obj, bool disable);
220 [DllImport(Libraries.Elementary)]
221 internal static extern bool elm_object_item_disabled_get(IntPtr obj);
223 [DllImport(Libraries.Elementary)]
224 internal static extern bool elm_object_focus_get(IntPtr obj);
226 [DllImport(Libraries.Elementary)]
227 internal static extern void elm_object_focus_set(IntPtr obj, bool focus);
229 [DllImport(Libraries.Elementary)]
230 internal static extern bool elm_object_focus_allow_get(IntPtr obj);
232 [DllImport(Libraries.Elementary)]
233 internal static extern void elm_object_focus_allow_set(IntPtr obj, bool enable);
235 [DllImport(Libraries.Elementary)]
236 internal static extern void elm_object_focus_next(IntPtr obj, int direction);
238 [DllImport(Libraries.Elementary)]
239 internal static extern void elm_object_focus_next_object_set(IntPtr obj, IntPtr next, int direction);
241 [DllImport(Libraries.Elementary)]
242 internal static extern void elm_object_focus_next_item_set(IntPtr obj, IntPtr nextItem, int direction);
244 [DllImport(Libraries.Elementary)]
245 internal static extern void elm_theme_extension_add(IntPtr theme, string path);
247 [DllImport(Libraries.Elementary)]
248 internal static extern void elm_theme_overlay_add(IntPtr theme, string path);
250 [DllImport(Libraries.Elementary)]
251 internal static extern IntPtr elm_theme_new();
253 [DllImport(Libraries.Elementary)]
254 internal static extern void elm_object_theme_set(IntPtr obj, IntPtr theme);
256 [DllImport(Libraries.Elementary)]
257 internal static extern IntPtr elm_layout_edje_get(IntPtr obj);
259 [DllImport(Libraries.Elementary)]
260 internal static extern void edje_object_color_class_del(IntPtr obj, string colorClass);
262 [DllImport(Libraries.Elementary)]
263 internal static extern bool edje_object_part_exists(IntPtr obj, string part);
265 [DllImport(Libraries.Elementary)]
266 internal static extern IntPtr edje_object_part_object_get(IntPtr obj, string part);
268 [DllImport(Libraries.Elementary)]
269 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);
271 [DllImport(Libraries.Elementary)]
272 internal static extern bool edje_object_part_text_set(IntPtr obj, string part, string text);
274 [DllImport(Libraries.Elementary, EntryPoint = "edje_object_part_text_get", CharSet = CharSet.Ansi)]
275 internal static extern IntPtr _edje_object_part_text_get(IntPtr obj, string part);
277 internal static string edje_object_part_text_get(IntPtr obj, string part)
279 var text = _edje_object_part_text_get(obj, part);
280 return Marshal.PtrToStringAnsi(text);
283 [DllImport(Libraries.Elementary, EntryPoint = "edje_object_part_text_style_user_peek", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
284 internal static extern IntPtr _edje_object_part_text_style_user_peek(IntPtr obj, string part);
286 internal static string edje_object_part_text_style_user_peek(IntPtr obj, string part)
288 var text = _edje_object_part_text_style_user_peek(obj, part);
289 return Marshal.PtrToStringAnsi(text);
292 [DllImport(Libraries.Elementary)]
293 internal static extern void edje_object_part_text_style_user_push(IntPtr obj, string part, string style);
295 [DllImport(Libraries.Elementary)]
296 internal static extern void edje_object_part_text_style_user_pop(IntPtr obj, string part);
298 [DllImport(Libraries.Elementary)]
299 internal static extern void edje_object_signal_emit(IntPtr obj, string emission, string source);
301 internal static void SetObjectText(IntPtr obj, string text)
303 elm_object_part_text_set(obj, IntPtr.Zero, text);