diff options
Diffstat (limited to 'src/lib/elementary/elm_slideshow_eo.c')
-rw-r--r-- | src/lib/elementary/elm_slideshow_eo.c | 321 |
1 files changed, 321 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_slideshow_eo.c b/src/lib/elementary/elm_slideshow_eo.c new file mode 100644 index 0000000..145b94b --- /dev/null +++ b/src/lib/elementary/elm_slideshow_eo.c | |||
@@ -0,0 +1,321 @@ | |||
1 | EWAPI const Efl_Event_Description _ELM_SLIDESHOW_EVENT_CHANGED = | ||
2 | EFL_EVENT_DESCRIPTION("changed"); | ||
3 | EWAPI const Efl_Event_Description _ELM_SLIDESHOW_EVENT_TRANSITION_END = | ||
4 | EFL_EVENT_DESCRIPTION("transition,end"); | ||
5 | |||
6 | void _elm_slideshow_cache_after_set(Eo *obj, Elm_Slideshow_Data *pd, int count); | ||
7 | |||
8 | |||
9 | static Eina_Error | ||
10 | __eolian_elm_slideshow_cache_after_set_reflect(Eo *obj, Eina_Value val) | ||
11 | { | ||
12 | Eina_Error r = 0; int cval; | ||
13 | if (!eina_value_int_convert(&val, &cval)) | ||
14 | { | ||
15 | r = EINA_ERROR_VALUE_FAILED; | ||
16 | goto end; | ||
17 | } | ||
18 | elm_obj_slideshow_cache_after_set(obj, cval); | ||
19 | end: | ||
20 | eina_value_flush(&val); | ||
21 | return r; | ||
22 | } | ||
23 | |||
24 | EOAPI EFL_VOID_FUNC_BODYV(elm_obj_slideshow_cache_after_set, EFL_FUNC_CALL(count), int count); | ||
25 | |||
26 | int _elm_slideshow_cache_after_get(const Eo *obj, Elm_Slideshow_Data *pd); | ||
27 | |||
28 | |||
29 | static Eina_Value | ||
30 | __eolian_elm_slideshow_cache_after_get_reflect(Eo *obj) | ||
31 | { | ||
32 | int val = elm_obj_slideshow_cache_after_get(obj); | ||
33 | return eina_value_int_init(val); | ||
34 | } | ||
35 | |||
36 | EOAPI EFL_FUNC_BODY_CONST(elm_obj_slideshow_cache_after_get, int, 0); | ||
37 | |||
38 | void _elm_slideshow_cache_before_set(Eo *obj, Elm_Slideshow_Data *pd, int count); | ||
39 | |||
40 | |||
41 | static Eina_Error | ||
42 | __eolian_elm_slideshow_cache_before_set_reflect(Eo *obj, Eina_Value val) | ||
43 | { | ||
44 | Eina_Error r = 0; int cval; | ||
45 | if (!eina_value_int_convert(&val, &cval)) | ||
46 | { | ||
47 | r = EINA_ERROR_VALUE_FAILED; | ||
48 | goto end; | ||
49 | } | ||
50 | elm_obj_slideshow_cache_before_set(obj, cval); | ||
51 | end: | ||
52 | eina_value_flush(&val); | ||
53 | return r; | ||
54 | } | ||
55 | |||
56 | EOAPI EFL_VOID_FUNC_BODYV(elm_obj_slideshow_cache_before_set, EFL_FUNC_CALL(count), int count); | ||
57 | |||
58 | int _elm_slideshow_cache_before_get(const Eo *obj, Elm_Slideshow_Data *pd); | ||
59 | |||
60 | |||
61 | static Eina_Value | ||
62 | __eolian_elm_slideshow_cache_before_get_reflect(Eo *obj) | ||
63 | { | ||
64 | int val = elm_obj_slideshow_cache_before_get(obj); | ||
65 | return eina_value_int_init(val); | ||
66 | } | ||
67 | |||
68 | EOAPI EFL_FUNC_BODY_CONST(elm_obj_slideshow_cache_before_get, int, 0); | ||
69 | |||
70 | void _elm_slideshow_layout_set(Eo *obj, Elm_Slideshow_Data *pd, const char *layout); | ||
71 | |||
72 | |||
73 | static Eina_Error | ||
74 | __eolian_elm_slideshow_layout_set_reflect(Eo *obj, Eina_Value val) | ||
75 | { | ||
76 | Eina_Error r = 0; const char *cval; | ||
77 | if (!eina_value_string_convert(&val, &cval)) | ||
78 | { | ||
79 | r = EINA_ERROR_VALUE_FAILED; | ||
80 | goto end; | ||
81 | } | ||
82 | elm_obj_slideshow_layout_set(obj, cval); | ||
83 | end: | ||
84 | eina_value_flush(&val); | ||
85 | return r; | ||
86 | } | ||
87 | |||
88 | EOAPI EFL_VOID_FUNC_BODYV(elm_obj_slideshow_layout_set, EFL_FUNC_CALL(layout), const char *layout); | ||
89 | |||
90 | const char *_elm_slideshow_layout_get(const Eo *obj, Elm_Slideshow_Data *pd); | ||
91 | |||
92 | |||
93 | static Eina_Value | ||
94 | __eolian_elm_slideshow_layout_get_reflect(Eo *obj) | ||
95 | { | ||
96 | const char *val = elm_obj_slideshow_layout_get(obj); | ||
97 | return eina_value_string_init(val); | ||
98 | } | ||
99 | |||
100 | EOAPI EFL_FUNC_BODY_CONST(elm_obj_slideshow_layout_get, const char *, NULL); | ||
101 | |||
102 | void _elm_slideshow_transition_set(Eo *obj, Elm_Slideshow_Data *pd, const char *transition); | ||
103 | |||
104 | |||
105 | static Eina_Error | ||
106 | __eolian_elm_slideshow_transition_set_reflect(Eo *obj, Eina_Value val) | ||
107 | { | ||
108 | Eina_Error r = 0; const char *cval; | ||
109 | if (!eina_value_string_convert(&val, &cval)) | ||
110 | { | ||
111 | r = EINA_ERROR_VALUE_FAILED; | ||
112 | goto end; | ||
113 | } | ||
114 | elm_obj_slideshow_transition_set(obj, cval); | ||
115 | end: | ||
116 | eina_value_flush(&val); | ||
117 | return r; | ||
118 | } | ||
119 | |||
120 | EOAPI EFL_VOID_FUNC_BODYV(elm_obj_slideshow_transition_set, EFL_FUNC_CALL(transition), const char *transition); | ||
121 | |||
122 | const char *_elm_slideshow_transition_get(const Eo *obj, Elm_Slideshow_Data *pd); | ||
123 | |||
124 | |||
125 | static Eina_Value | ||
126 | __eolian_elm_slideshow_transition_get_reflect(Eo *obj) | ||
127 | { | ||
128 | const char *val = elm_obj_slideshow_transition_get(obj); | ||
129 | return eina_value_string_init(val); | ||
130 | } | ||
131 | |||
132 | EOAPI EFL_FUNC_BODY_CONST(elm_obj_slideshow_transition_get, const char *, NULL); | ||
133 | |||
134 | void _elm_slideshow_items_loop_set(Eo *obj, Elm_Slideshow_Data *pd, Eina_Bool loop); | ||
135 | |||
136 | |||
137 | static Eina_Error | ||
138 | __eolian_elm_slideshow_items_loop_set_reflect(Eo *obj, Eina_Value val) | ||
139 | { | ||
140 | Eina_Error r = 0; Eina_Bool cval; | ||
141 | if (!eina_value_bool_convert(&val, &cval)) | ||
142 | { | ||
143 | r = EINA_ERROR_VALUE_FAILED; | ||
144 | goto end; | ||
145 | } | ||
146 | elm_obj_slideshow_items_loop_set(obj, cval); | ||
147 | end: | ||
148 | eina_value_flush(&val); | ||
149 | return r; | ||
150 | } | ||
151 | |||
152 | EOAPI EFL_VOID_FUNC_BODYV(elm_obj_slideshow_items_loop_set, EFL_FUNC_CALL(loop), Eina_Bool loop); | ||
153 | |||
154 | Eina_Bool _elm_slideshow_items_loop_get(const Eo *obj, Elm_Slideshow_Data *pd); | ||
155 | |||
156 | |||
157 | static Eina_Value | ||
158 | __eolian_elm_slideshow_items_loop_get_reflect(Eo *obj) | ||
159 | { | ||
160 | Eina_Bool val = elm_obj_slideshow_items_loop_get(obj); | ||
161 | return eina_value_bool_init(val); | ||
162 | } | ||
163 | |||
164 | EOAPI EFL_FUNC_BODY_CONST(elm_obj_slideshow_items_loop_get, Eina_Bool, 0); | ||
165 | |||
166 | void _elm_slideshow_timeout_set(Eo *obj, Elm_Slideshow_Data *pd, double timeout); | ||
167 | |||
168 | |||
169 | static Eina_Error | ||
170 | __eolian_elm_slideshow_timeout_set_reflect(Eo *obj, Eina_Value val) | ||
171 | { | ||
172 | Eina_Error r = 0; double cval; | ||
173 | if (!eina_value_double_convert(&val, &cval)) | ||
174 | { | ||
175 | r = EINA_ERROR_VALUE_FAILED; | ||
176 | goto end; | ||
177 | } | ||
178 | elm_obj_slideshow_timeout_set(obj, cval); | ||
179 | end: | ||
180 | eina_value_flush(&val); | ||
181 | return r; | ||
182 | } | ||
183 | |||
184 | EOAPI EFL_VOID_FUNC_BODYV(elm_obj_slideshow_timeout_set, EFL_FUNC_CALL(timeout), double timeout); | ||
185 | |||
186 | double _elm_slideshow_timeout_get(const Eo *obj, Elm_Slideshow_Data *pd); | ||
187 | |||
188 | |||
189 | static Eina_Value | ||
190 | __eolian_elm_slideshow_timeout_get_reflect(Eo *obj) | ||
191 | { | ||
192 | double val = elm_obj_slideshow_timeout_get(obj); | ||
193 | return eina_value_double_init(val); | ||
194 | } | ||
195 | |||
196 | EOAPI EFL_FUNC_BODY_CONST(elm_obj_slideshow_timeout_get, double, 0); | ||
197 | |||
198 | const Eina_List *_elm_slideshow_items_get(const Eo *obj, Elm_Slideshow_Data *pd); | ||
199 | |||
200 | EOAPI EFL_FUNC_BODY_CONST(elm_obj_slideshow_items_get, const Eina_List *, NULL); | ||
201 | |||
202 | const Eina_List *_elm_slideshow_transitions_get(const Eo *obj, Elm_Slideshow_Data *pd); | ||
203 | |||
204 | EOAPI EFL_FUNC_BODY_CONST(elm_obj_slideshow_transitions_get, const Eina_List *, NULL); | ||
205 | |||
206 | unsigned int _elm_slideshow_count_get(const Eo *obj, Elm_Slideshow_Data *pd); | ||
207 | |||
208 | EOAPI EFL_FUNC_BODY_CONST(elm_obj_slideshow_count_get, unsigned int, 0); | ||
209 | |||
210 | Elm_Widget_Item *_elm_slideshow_item_current_get(const Eo *obj, Elm_Slideshow_Data *pd); | ||
211 | |||
212 | EOAPI EFL_FUNC_BODY_CONST(elm_obj_slideshow_item_current_get, Elm_Widget_Item *, NULL); | ||
213 | |||
214 | const Eina_List *_elm_slideshow_layouts_get(const Eo *obj, Elm_Slideshow_Data *pd); | ||
215 | |||
216 | EOAPI EFL_FUNC_BODY_CONST(elm_obj_slideshow_layouts_get, const Eina_List *, NULL); | ||
217 | |||
218 | void _elm_slideshow_previous(Eo *obj, Elm_Slideshow_Data *pd); | ||
219 | |||
220 | EOAPI EFL_VOID_FUNC_BODY(elm_obj_slideshow_previous); | ||
221 | |||
222 | Elm_Widget_Item *_elm_slideshow_item_nth_get(const Eo *obj, Elm_Slideshow_Data *pd, unsigned int nth); | ||
223 | |||
224 | EOAPI EFL_FUNC_BODYV_CONST(elm_obj_slideshow_item_nth_get, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(nth), unsigned int nth); | ||
225 | |||
226 | void _elm_slideshow_next(Eo *obj, Elm_Slideshow_Data *pd); | ||
227 | |||
228 | EOAPI EFL_VOID_FUNC_BODY(elm_obj_slideshow_next); | ||
229 | |||
230 | void _elm_slideshow_clear(Eo *obj, Elm_Slideshow_Data *pd); | ||
231 | |||
232 | EOAPI EFL_VOID_FUNC_BODY(elm_obj_slideshow_clear); | ||
233 | |||
234 | Elm_Widget_Item *_elm_slideshow_item_add(Eo *obj, Elm_Slideshow_Data *pd, const Elm_Slideshow_Item_Class *itc, const void *data); | ||
235 | |||
236 | EOAPI EFL_FUNC_BODYV(elm_obj_slideshow_item_add, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(itc, data), const Elm_Slideshow_Item_Class *itc, const void *data); | ||
237 | |||
238 | Elm_Widget_Item *_elm_slideshow_item_sorted_insert(Eo *obj, Elm_Slideshow_Data *pd, const Elm_Slideshow_Item_Class *itc, const void *data, Eina_Compare_Cb func); | ||
239 | |||
240 | EOAPI EFL_FUNC_BODYV(elm_obj_slideshow_item_sorted_insert, Elm_Widget_Item *, NULL, EFL_FUNC_CALL(itc, data, func), const Elm_Slideshow_Item_Class *itc, const void *data, Eina_Compare_Cb func); | ||
241 | |||
242 | Efl_Object *_elm_slideshow_efl_object_constructor(Eo *obj, Elm_Slideshow_Data *pd); | ||
243 | |||
244 | |||
245 | Eina_Bool _elm_slideshow_efl_ui_widget_widget_input_event_handler(Eo *obj, Elm_Slideshow_Data *pd, const Efl_Event *eo_event, Efl_Canvas_Object *source); | ||
246 | |||
247 | |||
248 | const Efl_Access_Action_Data *_elm_slideshow_efl_access_widget_action_elm_actions_get(const Eo *obj, Elm_Slideshow_Data *pd); | ||
249 | |||
250 | |||
251 | static Eina_Bool | ||
252 | _elm_slideshow_class_initializer(Efl_Class *klass) | ||
253 | { | ||
254 | const Efl_Object_Ops *opsp = NULL; | ||
255 | |||
256 | const Efl_Object_Property_Reflection_Ops *ropsp = NULL; | ||
257 | |||
258 | #ifndef ELM_SLIDESHOW_EXTRA_OPS | ||
259 | #define ELM_SLIDESHOW_EXTRA_OPS | ||
260 | #endif | ||
261 | |||
262 | EFL_OPS_DEFINE(ops, | ||
263 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_cache_after_set, _elm_slideshow_cache_after_set), | ||
264 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_cache_after_get, _elm_slideshow_cache_after_get), | ||
265 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_cache_before_set, _elm_slideshow_cache_before_set), | ||
266 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_cache_before_get, _elm_slideshow_cache_before_get), | ||
267 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_layout_set, _elm_slideshow_layout_set), | ||
268 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_layout_get, _elm_slideshow_layout_get), | ||
269 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_transition_set, _elm_slideshow_transition_set), | ||
270 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_transition_get, _elm_slideshow_transition_get), | ||
271 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_items_loop_set, _elm_slideshow_items_loop_set), | ||
272 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_items_loop_get, _elm_slideshow_items_loop_get), | ||
273 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_timeout_set, _elm_slideshow_timeout_set), | ||
274 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_timeout_get, _elm_slideshow_timeout_get), | ||
275 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_items_get, _elm_slideshow_items_get), | ||
276 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_transitions_get, _elm_slideshow_transitions_get), | ||
277 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_count_get, _elm_slideshow_count_get), | ||
278 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_item_current_get, _elm_slideshow_item_current_get), | ||
279 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_layouts_get, _elm_slideshow_layouts_get), | ||
280 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_previous, _elm_slideshow_previous), | ||
281 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_item_nth_get, _elm_slideshow_item_nth_get), | ||
282 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_next, _elm_slideshow_next), | ||
283 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_clear, _elm_slideshow_clear), | ||
284 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_item_add, _elm_slideshow_item_add), | ||
285 | EFL_OBJECT_OP_FUNC(elm_obj_slideshow_item_sorted_insert, _elm_slideshow_item_sorted_insert), | ||
286 | EFL_OBJECT_OP_FUNC(efl_constructor, _elm_slideshow_efl_object_constructor), | ||
287 | EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_slideshow_efl_ui_widget_widget_input_event_handler), | ||
288 | EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_slideshow_efl_access_widget_action_elm_actions_get), | ||
289 | ELM_SLIDESHOW_EXTRA_OPS | ||
290 | ); | ||
291 | opsp = &ops; | ||
292 | |||
293 | static const Efl_Object_Property_Reflection refl_table[] = { | ||
294 | {"cache_after", __eolian_elm_slideshow_cache_after_set_reflect, __eolian_elm_slideshow_cache_after_get_reflect}, | ||
295 | {"cache_before", __eolian_elm_slideshow_cache_before_set_reflect, __eolian_elm_slideshow_cache_before_get_reflect}, | ||
296 | {"layout", __eolian_elm_slideshow_layout_set_reflect, __eolian_elm_slideshow_layout_get_reflect}, | ||
297 | {"transition", __eolian_elm_slideshow_transition_set_reflect, __eolian_elm_slideshow_transition_get_reflect}, | ||
298 | {"items_loop", __eolian_elm_slideshow_items_loop_set_reflect, __eolian_elm_slideshow_items_loop_get_reflect}, | ||
299 | {"timeout", __eolian_elm_slideshow_timeout_set_reflect, __eolian_elm_slideshow_timeout_get_reflect}, | ||
300 | }; | ||
301 | static const Efl_Object_Property_Reflection_Ops rops = { | ||
302 | refl_table, EINA_C_ARRAY_LENGTH(refl_table) | ||
303 | }; | ||
304 | ropsp = &rops; | ||
305 | |||
306 | return efl_class_functions_set(klass, opsp, ropsp); | ||
307 | } | ||
308 | |||
309 | static const Efl_Class_Description _elm_slideshow_class_desc = { | ||
310 | EO_VERSION, | ||
311 | "Elm.Slideshow", | ||
312 | EFL_CLASS_TYPE_REGULAR, | ||
313 | sizeof(Elm_Slideshow_Data), | ||
314 | _elm_slideshow_class_initializer, | ||
315 | _elm_slideshow_class_constructor, | ||
316 | NULL | ||
317 | }; | ||
318 | |||
319 | EFL_DEFINE_CLASS(elm_slideshow_class_get, &_elm_slideshow_class_desc, EFL_UI_LAYOUT_BASE_CLASS, EFL_ACCESS_WIDGET_ACTION_MIXIN, EFL_UI_LEGACY_INTERFACE, NULL); | ||
320 | |||
321 | #include "elm_slideshow_eo.legacy.c" | ||