summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_web_eo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_web_eo.c')
-rw-r--r--src/lib/elementary/elm_web_eo.c293
1 files changed, 293 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_web_eo.c b/src/lib/elementary/elm_web_eo.c
new file mode 100644
index 0000000..20d25ee
--- /dev/null
+++ b/src/lib/elementary/elm_web_eo.c
@@ -0,0 +1,293 @@
1
2static Eina_Error
3__eolian_elm_web_text_matches_highlight_set_reflect(Eo *obj, Eina_Value val)
4{
5 Eina_Error r = 0; Eina_Bool cval;
6 if (!eina_value_bool_convert(&val, &cval))
7 {
8 r = EINA_ERROR_VALUE_FAILED;
9 goto end;
10 }
11 elm_obj_web_text_matches_highlight_set(obj, cval);
12 end:
13 eina_value_flush(&val);
14 return r;
15}
16
17EOAPI EFL_FUNC_BODYV(elm_obj_web_text_matches_highlight_set, Eina_Bool, 0, EFL_FUNC_CALL(highlight), Eina_Bool highlight);
18
19static Eina_Value
20__eolian_elm_web_text_matches_highlight_get_reflect(Eo *obj)
21{
22 Eina_Bool val = elm_obj_web_text_matches_highlight_get(obj);
23 return eina_value_bool_init(val);
24}
25
26EOAPI EFL_FUNC_BODY_CONST(elm_obj_web_text_matches_highlight_get, Eina_Bool, 0);
27
28static Eina_Error
29__eolian_elm_web_useragent_set_reflect(Eo *obj, Eina_Value val)
30{
31 Eina_Error r = 0; const char *cval;
32 if (!eina_value_string_convert(&val, &cval))
33 {
34 r = EINA_ERROR_VALUE_FAILED;
35 goto end;
36 }
37 elm_obj_web_useragent_set(obj, cval);
38 end:
39 eina_value_flush(&val);
40 return r;
41}
42
43EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_useragent_set, EFL_FUNC_CALL(user_agent), const char *user_agent);
44
45static Eina_Value
46__eolian_elm_web_useragent_get_reflect(Eo *obj)
47{
48 const char *val = elm_obj_web_useragent_get(obj);
49 return eina_value_string_init(val);
50}
51
52EOAPI EFL_FUNC_BODY_CONST(elm_obj_web_useragent_get, const char *, NULL);
53
54static Eina_Error
55__eolian_elm_web_url_set_reflect(Eo *obj, Eina_Value val)
56{
57 Eina_Error r = 0; const char *cval;
58 if (!eina_value_string_convert(&val, &cval))
59 {
60 r = EINA_ERROR_VALUE_FAILED;
61 goto end;
62 }
63 elm_obj_web_url_set(obj, cval);
64 end:
65 eina_value_flush(&val);
66 return r;
67}
68
69EOAPI EFL_FUNC_BODYV(elm_obj_web_url_set, Eina_Bool, 0, EFL_FUNC_CALL(url), const char *url);
70
71static Eina_Value
72__eolian_elm_web_url_get_reflect(Eo *obj)
73{
74 const char *val = elm_obj_web_url_get(obj);
75 return eina_value_string_init(val);
76}
77
78EOAPI EFL_FUNC_BODY_CONST(elm_obj_web_url_get, const char *, NULL);
79EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_bg_color_set, EFL_FUNC_CALL(r, g, b, a), int r, int g, int b, int a);
80EOAPI EFL_VOID_FUNC_BODYV_CONST(elm_obj_web_bg_color_get, EFL_FUNC_CALL(r, g, b, a), int *r, int *g, int *b, int *a);
81
82static Eina_Error
83__eolian_elm_web_inwin_mode_set_reflect(Eo *obj, Eina_Value val)
84{
85 Eina_Error r = 0; Eina_Bool cval;
86 if (!eina_value_bool_convert(&val, &cval))
87 {
88 r = EINA_ERROR_VALUE_FAILED;
89 goto end;
90 }
91 elm_obj_web_inwin_mode_set(obj, cval);
92 end:
93 eina_value_flush(&val);
94 return r;
95}
96
97EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_inwin_mode_set, EFL_FUNC_CALL(value), Eina_Bool value);
98
99static Eina_Value
100__eolian_elm_web_inwin_mode_get_reflect(Eo *obj)
101{
102 Eina_Bool val = elm_obj_web_inwin_mode_get(obj);
103 return eina_value_bool_init(val);
104}
105
106EOAPI EFL_FUNC_BODY_CONST(elm_obj_web_inwin_mode_get, Eina_Bool, 0);
107
108static Eina_Error
109__eolian_elm_web_tab_propagate_set_reflect(Eo *obj, Eina_Value val)
110{
111 Eina_Error r = 0; Eina_Bool cval;
112 if (!eina_value_bool_convert(&val, &cval))
113 {
114 r = EINA_ERROR_VALUE_FAILED;
115 goto end;
116 }
117 elm_obj_web_tab_propagate_set(obj, cval);
118 end:
119 eina_value_flush(&val);
120 return r;
121}
122
123EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_tab_propagate_set, EFL_FUNC_CALL(propagate), Eina_Bool propagate);
124
125static Eina_Value
126__eolian_elm_web_tab_propagate_get_reflect(Eo *obj)
127{
128 Eina_Bool val = elm_obj_web_tab_propagate_get(obj);
129 return eina_value_bool_init(val);
130}
131
132EOAPI EFL_FUNC_BODY_CONST(elm_obj_web_tab_propagate_get, Eina_Bool, 0);
133
134static Eina_Error
135__eolian_elm_web_history_enabled_set_reflect(Eo *obj, Eina_Value val)
136{
137 Eina_Error r = 0; Eina_Bool cval;
138 if (!eina_value_bool_convert(&val, &cval))
139 {
140 r = EINA_ERROR_VALUE_FAILED;
141 goto end;
142 }
143 elm_obj_web_history_enabled_set(obj, cval);
144 end:
145 eina_value_flush(&val);
146 return r;
147}
148
149EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_history_enabled_set, EFL_FUNC_CALL(enable), Eina_Bool enable);
150
151static Eina_Value
152__eolian_elm_web_history_enabled_get_reflect(Eo *obj)
153{
154 Eina_Bool val = elm_obj_web_history_enabled_get(obj);
155 return eina_value_bool_init(val);
156}
157
158EOAPI EFL_FUNC_BODY_CONST(elm_obj_web_history_enabled_get, Eina_Bool, 0);
159EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_console_message_hook_set, EFL_FUNC_CALL(func, data), Elm_Web_Console_Message func, void *data);
160EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_window_create_hook_set, EFL_FUNC_CALL(func, data), Elm_Web_Window_Open func, void *data);
161EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_dialog_file_selector_hook_set, EFL_FUNC_CALL(func, data), Elm_Web_Dialog_File_Selector func, void *data);
162EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_dialog_confirm_hook_set, EFL_FUNC_CALL(func, data), Elm_Web_Dialog_Confirm func, void *data);
163
164static Eina_Error
165__eolian_elm_web_popup_selected_set_reflect(Eo *obj, Eina_Value val)
166{
167 Eina_Error r = 0; int cval;
168 if (!eina_value_int_convert(&val, &cval))
169 {
170 r = EINA_ERROR_VALUE_FAILED;
171 goto end;
172 }
173 elm_obj_web_popup_selected_set(obj, cval);
174 end:
175 eina_value_flush(&val);
176 return r;
177}
178
179EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_popup_selected_set, EFL_FUNC_CALL(idx), int idx);
180EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_dialog_prompt_hook_set, EFL_FUNC_CALL(func, data), Elm_Web_Dialog_Prompt func, void *data);
181EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_dialog_alert_hook_set, EFL_FUNC_CALL(func, data), Elm_Web_Dialog_Alert func, void *data);
182EOAPI EFL_FUNC_BODY_CONST(elm_obj_web_forward_possible_get, Eina_Bool, 0);
183EOAPI EFL_FUNC_BODY_CONST(elm_obj_web_webkit_view_get, Efl_Canvas_Object *, NULL);
184EOAPI EFL_FUNC_BODY_CONST(elm_obj_web_back_possible_get, Eina_Bool, 0);
185EOAPI EFL_FUNC_BODY_CONST(elm_obj_web_load_progress_get, double, 0);
186EOAPI EFL_FUNC_BODY_CONST(elm_obj_web_selection_get, char *, NULL);
187EOAPI EFL_FUNC_BODY_CONST(elm_obj_web_title_get, Eina_Stringshare *, NULL);
188EOAPI EFL_FUNC_BODYV(elm_obj_web_navigate, Eina_Bool, 0, EFL_FUNC_CALL(steps), int steps);
189EOAPI EFL_FUNC_BODY(elm_obj_web_back, Eina_Bool, 0);
190EOAPI EFL_FUNC_BODYV(elm_obj_web_html_string_load, Eina_Bool, 0, EFL_FUNC_CALL(html, base_url, unreachable_url), const char *html, const char *base_url, const char *unreachable_url);
191EOAPI EFL_FUNC_BODYV_CONST(elm_obj_web_text_search, Eina_Bool, 0, EFL_FUNC_CALL(string, case_sensitive, forward, wrap), const char *string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap);
192EOAPI EFL_FUNC_BODY(elm_obj_web_popup_destroy, Eina_Bool, 0);
193EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_region_show, EFL_FUNC_CALL(x, y, w, h), int x, int y, int w, int h);
194EOAPI EFL_FUNC_BODY(elm_obj_web_forward, Eina_Bool, 0);
195EOAPI EFL_FUNC_BODYV(elm_obj_web_text_matches_mark, unsigned int, 0, EFL_FUNC_CALL(string, case_sensitive, highlight, limit), const char *string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit);
196EOAPI EFL_VOID_FUNC_BODYV(elm_obj_web_region_bring_in, EFL_FUNC_CALL(x, y, w, h), int x, int y, int w, int h);
197EOAPI EFL_FUNC_BODY(elm_obj_web_stop, Eina_Bool, 0);
198EOAPI EFL_FUNC_BODYV(elm_obj_web_navigate_possible_get, Eina_Bool, 0, EFL_FUNC_CALL(steps), int steps);
199EOAPI EFL_FUNC_BODY(elm_obj_web_reload_full, Eina_Bool, 0);
200EOAPI EFL_FUNC_BODY(elm_obj_web_text_matches_unmark_all, Eina_Bool, 0);
201EOAPI EFL_FUNC_BODY(elm_obj_web_reload, Eina_Bool, 0);
202
203Efl_Object *_elm_web_efl_object_constructor(Eo *obj, Elm_Web_Data *pd);
204
205
206static Eina_Bool
207_elm_web_class_initializer(Efl_Class *klass)
208{
209 const Efl_Object_Ops *opsp = NULL;
210
211 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
212
213#ifndef ELM_WEB_EXTRA_OPS
214#define ELM_WEB_EXTRA_OPS
215#endif
216
217 EFL_OPS_DEFINE(ops,
218 EFL_OBJECT_OP_FUNC(elm_obj_web_text_matches_highlight_set, NULL),
219 EFL_OBJECT_OP_FUNC(elm_obj_web_text_matches_highlight_get, NULL),
220 EFL_OBJECT_OP_FUNC(elm_obj_web_useragent_set, NULL),
221 EFL_OBJECT_OP_FUNC(elm_obj_web_useragent_get, NULL),
222 EFL_OBJECT_OP_FUNC(elm_obj_web_url_set, NULL),
223 EFL_OBJECT_OP_FUNC(elm_obj_web_url_get, NULL),
224 EFL_OBJECT_OP_FUNC(elm_obj_web_bg_color_set, NULL),
225 EFL_OBJECT_OP_FUNC(elm_obj_web_bg_color_get, NULL),
226 EFL_OBJECT_OP_FUNC(elm_obj_web_inwin_mode_set, NULL),
227 EFL_OBJECT_OP_FUNC(elm_obj_web_inwin_mode_get, NULL),
228 EFL_OBJECT_OP_FUNC(elm_obj_web_tab_propagate_set, NULL),
229 EFL_OBJECT_OP_FUNC(elm_obj_web_tab_propagate_get, NULL),
230 EFL_OBJECT_OP_FUNC(elm_obj_web_history_enabled_set, NULL),
231 EFL_OBJECT_OP_FUNC(elm_obj_web_history_enabled_get, NULL),
232 EFL_OBJECT_OP_FUNC(elm_obj_web_console_message_hook_set, NULL),
233 EFL_OBJECT_OP_FUNC(elm_obj_web_window_create_hook_set, NULL),
234 EFL_OBJECT_OP_FUNC(elm_obj_web_dialog_file_selector_hook_set, NULL),
235 EFL_OBJECT_OP_FUNC(elm_obj_web_dialog_confirm_hook_set, NULL),
236 EFL_OBJECT_OP_FUNC(elm_obj_web_popup_selected_set, NULL),
237 EFL_OBJECT_OP_FUNC(elm_obj_web_dialog_prompt_hook_set, NULL),
238 EFL_OBJECT_OP_FUNC(elm_obj_web_dialog_alert_hook_set, NULL),
239 EFL_OBJECT_OP_FUNC(elm_obj_web_forward_possible_get, NULL),
240 EFL_OBJECT_OP_FUNC(elm_obj_web_webkit_view_get, NULL),
241 EFL_OBJECT_OP_FUNC(elm_obj_web_back_possible_get, NULL),
242 EFL_OBJECT_OP_FUNC(elm_obj_web_load_progress_get, NULL),
243 EFL_OBJECT_OP_FUNC(elm_obj_web_selection_get, NULL),
244 EFL_OBJECT_OP_FUNC(elm_obj_web_title_get, NULL),
245 EFL_OBJECT_OP_FUNC(elm_obj_web_navigate, NULL),
246 EFL_OBJECT_OP_FUNC(elm_obj_web_back, NULL),
247 EFL_OBJECT_OP_FUNC(elm_obj_web_html_string_load, NULL),
248 EFL_OBJECT_OP_FUNC(elm_obj_web_text_search, NULL),
249 EFL_OBJECT_OP_FUNC(elm_obj_web_popup_destroy, NULL),
250 EFL_OBJECT_OP_FUNC(elm_obj_web_region_show, NULL),
251 EFL_OBJECT_OP_FUNC(elm_obj_web_forward, NULL),
252 EFL_OBJECT_OP_FUNC(elm_obj_web_text_matches_mark, NULL),
253 EFL_OBJECT_OP_FUNC(elm_obj_web_region_bring_in, NULL),
254 EFL_OBJECT_OP_FUNC(elm_obj_web_stop, NULL),
255 EFL_OBJECT_OP_FUNC(elm_obj_web_navigate_possible_get, NULL),
256 EFL_OBJECT_OP_FUNC(elm_obj_web_reload_full, NULL),
257 EFL_OBJECT_OP_FUNC(elm_obj_web_text_matches_unmark_all, NULL),
258 EFL_OBJECT_OP_FUNC(elm_obj_web_reload, NULL),
259 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_web_efl_object_constructor),
260 ELM_WEB_EXTRA_OPS
261 );
262 opsp = &ops;
263
264 static const Efl_Object_Property_Reflection refl_table[] = {
265 {"text_matches_highlight", __eolian_elm_web_text_matches_highlight_set_reflect, __eolian_elm_web_text_matches_highlight_get_reflect},
266 {"useragent", __eolian_elm_web_useragent_set_reflect, __eolian_elm_web_useragent_get_reflect},
267 {"url", __eolian_elm_web_url_set_reflect, __eolian_elm_web_url_get_reflect},
268 {"inwin_mode", __eolian_elm_web_inwin_mode_set_reflect, __eolian_elm_web_inwin_mode_get_reflect},
269 {"tab_propagate", __eolian_elm_web_tab_propagate_set_reflect, __eolian_elm_web_tab_propagate_get_reflect},
270 {"history_enabled", __eolian_elm_web_history_enabled_set_reflect, __eolian_elm_web_history_enabled_get_reflect},
271 {"popup_selected", __eolian_elm_web_popup_selected_set_reflect, NULL},
272 };
273 static const Efl_Object_Property_Reflection_Ops rops = {
274 refl_table, EINA_C_ARRAY_LENGTH(refl_table)
275 };
276 ropsp = &rops;
277
278 return efl_class_functions_set(klass, opsp, ropsp);
279}
280
281static const Efl_Class_Description _elm_web_class_desc = {
282 EO_VERSION,
283 "Elm.Web",
284 EFL_CLASS_TYPE_REGULAR_NO_INSTANT,
285 sizeof(Elm_Web_Data),
286 _elm_web_class_initializer,
287 _elm_web_class_constructor,
288 NULL
289};
290
291EFL_DEFINE_CLASS(elm_web_class_get, &_elm_web_class_desc, EFL_UI_WIDGET_CLASS, EFL_UI_LEGACY_INTERFACE, EFL_UI_ZOOM_INTERFACE, NULL);
292
293#include "elm_web_eo.legacy.c"