Add PerformanceTest
[platform/core/csapi/tizenfx.git] / src / ElmSharp / Interop / Interop.Elementary.cs
1 // Copyright 2016 by Samsung Electronics, Inc.,
2 //
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.
8
9 using System;
10 using System.Runtime.InteropServices;
11
12 internal static partial class Interop
13 {
14     internal static partial class Elementary
15     {
16         [DllImport(Libraries.Elementary)]
17         internal static extern double elm_config_scroll_bring_in_scroll_friction_set(double time);
18
19         [DllImport(Libraries.Elementary)]
20         internal static extern double elm_config_scroll_bring_in_scroll_friction_get();
21
22         [DllImport(Libraries.Elementary)]
23         internal static extern IntPtr elm_config_accel_preference_set(string preference);
24
25         [DllImport(Libraries.Elementary)]
26         internal static extern void elm_object_tree_dump(IntPtr top);
27
28         [DllImport(Libraries.Elementary)]
29         internal static extern bool elm_object_disabled_get(IntPtr obj);
30
31         [DllImport(Libraries.Elementary)]
32         internal static extern void elm_object_disabled_set(IntPtr obj, bool disabled);
33
34         [DllImport(Libraries.Elementary)]
35         internal static extern void elm_init(int argc, string[] argv);
36
37         [DllImport(Libraries.Elementary)]
38         internal static extern bool ecore_main_loop_glib_integrate();
39
40         [DllImport(Libraries.Elementary)]
41         internal static extern void elm_run();
42
43         [DllImport(Libraries.Elementary)]
44         internal static extern void elm_exit();
45
46         [DllImport(Libraries.Elementary)]
47         internal static extern void elm_shutdown();
48
49         [DllImport(Libraries.Elementary)]
50         internal static extern void elm_app_base_scale_set(double base_scale);
51
52         [DllImport(Libraries.Elementary)]
53         internal static extern IntPtr elm_conformant_add(IntPtr obj);
54
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);
57
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);
60
61         internal static string elm_object_part_text_get(IntPtr obj, string part)
62         {
63             var text = _elm_object_part_text_get(obj, part);
64             return Marshal.PtrToStringAnsi(text);
65         }
66
67         internal static string elm_object_part_text_get(IntPtr obj)
68         {
69             var text = _elm_object_part_text_get(obj, IntPtr.Zero);
70             return Marshal.PtrToStringAnsi(text);
71         }
72
73         [DllImport(Libraries.Elementary)]
74         internal static extern void elm_object_item_part_content_set(IntPtr obj, string part, IntPtr content);
75
76         [DllImport(Libraries.Elementary)]
77         internal static extern IntPtr elm_object_item_part_content_unset(IntPtr obj, string part);
78
79         [DllImport(Libraries.Elementary)]
80         internal static extern void elm_object_item_part_content_set(IntPtr obj, IntPtr part, IntPtr content);
81
82         [DllImport(Libraries.Elementary)]
83         internal static extern IntPtr elm_object_part_content_get(IntPtr obj, string part);
84
85         [DllImport(Libraries.Elementary)]
86         internal static extern void elm_object_part_content_set(IntPtr obj, string part, IntPtr content);
87
88         [DllImport(Libraries.Elementary)]
89         internal static extern void elm_object_part_content_set(IntPtr obj, IntPtr part, IntPtr content);
90
91         internal static void elm_object_content_set(IntPtr obj, IntPtr content)
92         {
93             elm_object_part_content_set(obj, IntPtr.Zero, content);
94         }
95
96         [DllImport(Libraries.Elementary)]
97         internal static extern void elm_object_part_content_unset(IntPtr obj, string part);
98
99         internal static void elm_object_content_unset(IntPtr obj)
100         {
101             elm_object_part_content_unset(obj, null);
102         }
103
104         [DllImport(Libraries.Elementary)]
105         internal static extern IntPtr elm_layout_add(IntPtr obj);
106
107         [DllImport(Libraries.Elementary)]
108         internal static extern IntPtr elm_layout_content_get(IntPtr obj, string swallow);
109
110         [DllImport(Libraries.Elementary)]
111         internal static extern bool elm_layout_content_set(IntPtr obj, string swallow, IntPtr content);
112
113         [DllImport(Libraries.Elementary)]
114         internal static extern IntPtr elm_layout_content_unset(IntPtr obj, string swallow);
115
116         [DllImport(Libraries.Elementary)]
117         internal static extern bool elm_layout_text_set(IntPtr obj, string part, string text);
118
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);
121
122         internal static string elm_layout_text_get(IntPtr obj, string part)
123         {
124             var text = _elm_layout_text_get(obj, part);
125             return Marshal.PtrToStringAnsi(text);
126         }
127
128         [DllImport(Libraries.Elementary)]
129         internal static extern bool elm_layout_theme_set(IntPtr obj, string klass, string group, string style);
130
131         [DllImport(Libraries.Elementary)]
132         internal static extern bool elm_layout_file_set(IntPtr obj, string file, string group);
133
134         [DllImport(Libraries.Elementary)]
135         internal static extern bool elm_object_style_set(IntPtr obj, string style);
136
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);
139
140         internal static string elm_object_style_get(IntPtr obj)
141         {
142             var text = _elm_object_style_get(obj);
143             return Marshal.PtrToStringAnsi(text);
144         }
145
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);
148
149         [DllImport(Libraries.Elementary)]
150         internal static extern void elm_object_part_text_set(IntPtr obj, string part, string text);
151
152         [DllImport(Libraries.Elementary)]
153         internal static extern void elm_object_part_text_set(IntPtr obj, IntPtr part, string text);
154
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);
157
158         internal static string elm_object_item_part_text_get(IntPtr obj, string part)
159         {
160             var text = _elm_object_item_part_text_get(obj, part);
161             return Marshal.PtrToStringAnsi(text);
162         }
163
164         [DllImport(Libraries.Elementary)]
165         internal static extern void elm_object_item_part_text_set(IntPtr obj, string part, string label);
166
167         [DllImport(Libraries.Elementary)]
168         internal static extern void elm_object_item_part_text_set(IntPtr obj, IntPtr part, string label);
169
170         [DllImport(Libraries.Elementary)]
171         internal static extern IntPtr elm_object_item_data_get(IntPtr it);
172
173         [DllImport(Libraries.Elementary)]
174         internal static extern void elm_object_item_data_set(IntPtr it, IntPtr data);
175
176         [DllImport(Libraries.Elementary)]
177         internal static extern void elm_object_item_del(IntPtr obj);
178
179         [DllImport(Libraries.Elementary)]
180         internal static extern void elm_object_item_del_cb_set(IntPtr obj, Interop.Evas.SmartCallback callback);
181
182         [DllImport(Libraries.Elementary)]
183         internal static extern void elm_object_item_disabled_set(IntPtr obj, bool disable);
184
185         [DllImport(Libraries.Elementary)]
186         internal static extern bool elm_object_item_disabled_get(IntPtr obj);
187
188         [DllImport(Libraries.Elementary)]
189         internal static extern bool elm_object_focus_get(IntPtr obj);
190
191         [DllImport(Libraries.Elementary)]
192         internal static extern void elm_object_focus_set(IntPtr obj, bool focus);
193
194         [DllImport(Libraries.Elementary)]
195         internal static extern void elm_theme_extension_add(IntPtr obj, string path);
196
197         [DllImport(Libraries.Elementary)]
198         internal static extern IntPtr elm_theme_new();
199
200         [DllImport(Libraries.Elementary)]
201         internal static extern void elm_object_theme_set(IntPtr obj, IntPtr theme);
202
203         [DllImport(Libraries.Elementary)]
204         internal static extern IntPtr elm_layout_edje_get(IntPtr obj);
205
206         [DllImport(Libraries.Elementary)]
207         internal static extern void edje_object_color_class_del(IntPtr obj, string colorClass);
208
209         [DllImport(Libraries.Elementary)]
210         internal static extern bool edje_object_part_exists(IntPtr obj, string part);
211
212         [DllImport(Libraries.Elementary)]
213         internal static extern IntPtr edje_object_part_object_get(IntPtr obj, string part);
214
215         [DllImport(Libraries.Elementary)]
216         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);
217
218         [DllImport(Libraries.Elementary)]
219         internal static extern bool edje_object_part_text_set(IntPtr obj, string part, string text);
220
221         [DllImport(Libraries.Elementary, EntryPoint = "edje_object_part_text_get", CharSet = CharSet.Ansi)]
222         internal static extern IntPtr _edje_object_part_text_get(IntPtr obj, string part);
223
224         internal static string edje_object_part_text_get(IntPtr obj, string part)
225         {
226             var text = _edje_object_part_text_get(obj, part);
227             return Marshal.PtrToStringAnsi(text);
228         }
229
230         [DllImport(Libraries.Elementary, EntryPoint = "edje_object_part_text_style_user_peek", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
231         internal static extern IntPtr _edje_object_part_text_style_user_peek(IntPtr obj, string part);
232
233         internal static string edje_object_part_text_style_user_peek(IntPtr obj, string part)
234         {
235             var text = _edje_object_part_text_style_user_peek(obj, part);
236             return Marshal.PtrToStringAnsi(text);
237         }
238
239         [DllImport(Libraries.Elementary)]
240         internal static extern void edje_object_part_text_style_user_push(IntPtr obj, string part, string style);
241
242         [DllImport(Libraries.Elementary)]
243         internal static extern void edje_object_part_text_style_user_pop(IntPtr obj, string part);
244
245         [DllImport(Libraries.Elementary)]
246         internal static extern void edje_object_signal_emit(IntPtr obj, string emission, string source);
247
248         internal static void SetObjectText(IntPtr obj, string text)
249         {
250             elm_object_part_text_set(obj, IntPtr.Zero, text);
251         }
252     }
253 }