summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_spinner_eo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_spinner_eo.c')
-rw-r--r--src/lib/elementary/elm_spinner_eo.c335
1 files changed, 335 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_spinner_eo.c b/src/lib/elementary/elm_spinner_eo.c
new file mode 100644
index 0000000..3a616dc
--- /dev/null
+++ b/src/lib/elementary/elm_spinner_eo.c
@@ -0,0 +1,335 @@
1EWAPI const Efl_Event_Description _ELM_SPINNER_EVENT_CHANGED =
2 EFL_EVENT_DESCRIPTION("changed");
3EWAPI const Efl_Event_Description _ELM_SPINNER_EVENT_DELAY_CHANGED =
4 EFL_EVENT_DESCRIPTION("delay,changed");
5EWAPI const Efl_Event_Description _ELM_SPINNER_EVENT_SPINNER_DRAG_START =
6 EFL_EVENT_DESCRIPTION("spinner,drag,start");
7EWAPI const Efl_Event_Description _ELM_SPINNER_EVENT_SPINNER_DRAG_STOP =
8 EFL_EVENT_DESCRIPTION("spinner,drag,stop");
9EWAPI const Efl_Event_Description _ELM_SPINNER_EVENT_MIN_REACHED =
10 EFL_EVENT_DESCRIPTION("min,reached");
11EWAPI const Efl_Event_Description _ELM_SPINNER_EVENT_MAX_REACHED =
12 EFL_EVENT_DESCRIPTION("max,reached");
13
14void _elm_spinner_wrap_set(Eo *obj, Elm_Spinner_Data *pd, Eina_Bool wrap);
15
16
17static Eina_Error
18__eolian_elm_spinner_wrap_set_reflect(Eo *obj, Eina_Value val)
19{
20 Eina_Error r = 0; Eina_Bool cval;
21 if (!eina_value_bool_convert(&val, &cval))
22 {
23 r = EINA_ERROR_VALUE_FAILED;
24 goto end;
25 }
26 elm_obj_spinner_wrap_set(obj, cval);
27 end:
28 eina_value_flush(&val);
29 return r;
30}
31
32EOAPI EFL_VOID_FUNC_BODYV(elm_obj_spinner_wrap_set, EFL_FUNC_CALL(wrap), Eina_Bool wrap);
33
34Eina_Bool _elm_spinner_wrap_get(const Eo *obj, Elm_Spinner_Data *pd);
35
36
37static Eina_Value
38__eolian_elm_spinner_wrap_get_reflect(Eo *obj)
39{
40 Eina_Bool val = elm_obj_spinner_wrap_get(obj);
41 return eina_value_bool_init(val);
42}
43
44EOAPI EFL_FUNC_BODY_CONST(elm_obj_spinner_wrap_get, Eina_Bool, 0);
45
46void _elm_spinner_interval_set(Eo *obj, Elm_Spinner_Data *pd, double interval);
47
48
49static Eina_Error
50__eolian_elm_spinner_interval_set_reflect(Eo *obj, Eina_Value val)
51{
52 Eina_Error r = 0; double cval;
53 if (!eina_value_double_convert(&val, &cval))
54 {
55 r = EINA_ERROR_VALUE_FAILED;
56 goto end;
57 }
58 elm_obj_spinner_interval_set(obj, cval);
59 end:
60 eina_value_flush(&val);
61 return r;
62}
63
64EOAPI EFL_VOID_FUNC_BODYV(elm_obj_spinner_interval_set, EFL_FUNC_CALL(interval), double interval);
65
66double _elm_spinner_interval_get(const Eo *obj, Elm_Spinner_Data *pd);
67
68
69static Eina_Value
70__eolian_elm_spinner_interval_get_reflect(Eo *obj)
71{
72 double val = elm_obj_spinner_interval_get(obj);
73 return eina_value_double_init(val);
74}
75
76EOAPI EFL_FUNC_BODY_CONST(elm_obj_spinner_interval_get, double, 0);
77
78void _elm_spinner_round_set(Eo *obj, Elm_Spinner_Data *pd, int rnd);
79
80
81static Eina_Error
82__eolian_elm_spinner_round_set_reflect(Eo *obj, Eina_Value val)
83{
84 Eina_Error r = 0; int cval;
85 if (!eina_value_int_convert(&val, &cval))
86 {
87 r = EINA_ERROR_VALUE_FAILED;
88 goto end;
89 }
90 elm_obj_spinner_round_set(obj, cval);
91 end:
92 eina_value_flush(&val);
93 return r;
94}
95
96EOAPI EFL_VOID_FUNC_BODYV(elm_obj_spinner_round_set, EFL_FUNC_CALL(rnd), int rnd);
97
98int _elm_spinner_round_get(const Eo *obj, Elm_Spinner_Data *pd);
99
100
101static Eina_Value
102__eolian_elm_spinner_round_get_reflect(Eo *obj)
103{
104 int val = elm_obj_spinner_round_get(obj);
105 return eina_value_int_init(val);
106}
107
108EOAPI EFL_FUNC_BODY_CONST(elm_obj_spinner_round_get, int, 0);
109
110void _elm_spinner_editable_set(Eo *obj, Elm_Spinner_Data *pd, Eina_Bool editable);
111
112
113static Eina_Error
114__eolian_elm_spinner_editable_set_reflect(Eo *obj, Eina_Value val)
115{
116 Eina_Error r = 0; Eina_Bool cval;
117 if (!eina_value_bool_convert(&val, &cval))
118 {
119 r = EINA_ERROR_VALUE_FAILED;
120 goto end;
121 }
122 elm_obj_spinner_editable_set(obj, cval);
123 end:
124 eina_value_flush(&val);
125 return r;
126}
127
128EOAPI EFL_VOID_FUNC_BODYV(elm_obj_spinner_editable_set, EFL_FUNC_CALL(editable), Eina_Bool editable);
129
130Eina_Bool _elm_spinner_editable_get(const Eo *obj, Elm_Spinner_Data *pd);
131
132
133static Eina_Value
134__eolian_elm_spinner_editable_get_reflect(Eo *obj)
135{
136 Eina_Bool val = elm_obj_spinner_editable_get(obj);
137 return eina_value_bool_init(val);
138}
139
140EOAPI EFL_FUNC_BODY_CONST(elm_obj_spinner_editable_get, Eina_Bool, 0);
141
142void _elm_spinner_base_set(Eo *obj, Elm_Spinner_Data *pd, double base);
143
144
145static Eina_Error
146__eolian_elm_spinner_base_set_reflect(Eo *obj, Eina_Value val)
147{
148 Eina_Error r = 0; double cval;
149 if (!eina_value_double_convert(&val, &cval))
150 {
151 r = EINA_ERROR_VALUE_FAILED;
152 goto end;
153 }
154 elm_obj_spinner_base_set(obj, cval);
155 end:
156 eina_value_flush(&val);
157 return r;
158}
159
160EOAPI EFL_VOID_FUNC_BODYV(elm_obj_spinner_base_set, EFL_FUNC_CALL(base), double base);
161
162double _elm_spinner_base_get(const Eo *obj, Elm_Spinner_Data *pd);
163
164
165static Eina_Value
166__eolian_elm_spinner_base_get_reflect(Eo *obj)
167{
168 double val = elm_obj_spinner_base_get(obj);
169 return eina_value_double_init(val);
170}
171
172EOAPI EFL_FUNC_BODY_CONST(elm_obj_spinner_base_get, double, 0);
173
174void _elm_spinner_label_format_set(Eo *obj, Elm_Spinner_Data *pd, const char *fmt);
175
176
177static Eina_Error
178__eolian_elm_spinner_label_format_set_reflect(Eo *obj, Eina_Value val)
179{
180 Eina_Error r = 0; const char *cval;
181 if (!eina_value_string_convert(&val, &cval))
182 {
183 r = EINA_ERROR_VALUE_FAILED;
184 goto end;
185 }
186 elm_obj_spinner_label_format_set(obj, cval);
187 end:
188 eina_value_flush(&val);
189 return r;
190}
191
192EOAPI EFL_VOID_FUNC_BODYV(elm_obj_spinner_label_format_set, EFL_FUNC_CALL(fmt), const char *fmt);
193
194const char *_elm_spinner_label_format_get(const Eo *obj, Elm_Spinner_Data *pd);
195
196
197static Eina_Value
198__eolian_elm_spinner_label_format_get_reflect(Eo *obj)
199{
200 const char *val = elm_obj_spinner_label_format_get(obj);
201 return eina_value_string_init(val);
202}
203
204EOAPI EFL_FUNC_BODY_CONST(elm_obj_spinner_label_format_get, const char *, NULL);
205
206void _elm_spinner_special_value_add(Eo *obj, Elm_Spinner_Data *pd, double value, const char *label);
207
208EOAPI EFL_VOID_FUNC_BODYV(elm_obj_spinner_special_value_add, EFL_FUNC_CALL(value, label), double value, const char *label);
209
210Efl_Object *_elm_spinner_efl_object_constructor(Eo *obj, Elm_Spinner_Data *pd);
211
212
213Eina_Error _elm_spinner_efl_ui_widget_theme_apply(Eo *obj, Elm_Spinner_Data *pd);
214
215
216void _elm_spinner_efl_ui_widget_on_access_update(Eo *obj, Elm_Spinner_Data *pd, Eina_Bool enable);
217
218
219Eina_Bool _elm_spinner_efl_ui_focus_object_on_focus_update(Eo *obj, Elm_Spinner_Data *pd);
220
221
222Eina_Bool _elm_spinner_efl_ui_widget_widget_input_event_handler(Eo *obj, Elm_Spinner_Data *pd, const Efl_Event *eo_event, Efl_Canvas_Object *source);
223
224
225void _elm_spinner_efl_ui_range_display_range_min_max_set(Eo *obj, Elm_Spinner_Data *pd, double min, double max);
226
227
228void _elm_spinner_efl_ui_range_display_range_min_max_get(const Eo *obj, Elm_Spinner_Data *pd, double *min, double *max);
229
230
231void _elm_spinner_efl_ui_range_interactive_range_step_set(Eo *obj, Elm_Spinner_Data *pd, double step);
232
233
234double _elm_spinner_efl_ui_range_interactive_range_step_get(const Eo *obj, Elm_Spinner_Data *pd);
235
236
237void _elm_spinner_efl_ui_range_display_range_value_set(Eo *obj, Elm_Spinner_Data *pd, double val);
238
239
240double _elm_spinner_efl_ui_range_display_range_value_get(const Eo *obj, Elm_Spinner_Data *pd);
241
242
243const char *_elm_spinner_efl_access_object_i18n_name_get(const Eo *obj, Elm_Spinner_Data *pd);
244
245
246Eina_Bool _elm_spinner_efl_access_value_value_and_text_set(Eo *obj, Elm_Spinner_Data *pd, double value, const char *text);
247
248
249void _elm_spinner_efl_access_value_value_and_text_get(const Eo *obj, Elm_Spinner_Data *pd, double *value, const char **text);
250
251
252void _elm_spinner_efl_access_value_range_get(const Eo *obj, Elm_Spinner_Data *pd, double *lower_limit, double *upper_limit, const char **description);
253
254
255double _elm_spinner_efl_access_value_increment_get(const Eo *obj, Elm_Spinner_Data *pd);
256
257
258const Efl_Access_Action_Data *_elm_spinner_efl_access_widget_action_elm_actions_get(const Eo *obj, Elm_Spinner_Data *pd);
259
260
261static Eina_Bool
262_elm_spinner_class_initializer(Efl_Class *klass)
263{
264 const Efl_Object_Ops *opsp = NULL;
265
266 const Efl_Object_Property_Reflection_Ops *ropsp = NULL;
267
268#ifndef ELM_SPINNER_EXTRA_OPS
269#define ELM_SPINNER_EXTRA_OPS
270#endif
271
272 EFL_OPS_DEFINE(ops,
273 EFL_OBJECT_OP_FUNC(elm_obj_spinner_wrap_set, _elm_spinner_wrap_set),
274 EFL_OBJECT_OP_FUNC(elm_obj_spinner_wrap_get, _elm_spinner_wrap_get),
275 EFL_OBJECT_OP_FUNC(elm_obj_spinner_interval_set, _elm_spinner_interval_set),
276 EFL_OBJECT_OP_FUNC(elm_obj_spinner_interval_get, _elm_spinner_interval_get),
277 EFL_OBJECT_OP_FUNC(elm_obj_spinner_round_set, _elm_spinner_round_set),
278 EFL_OBJECT_OP_FUNC(elm_obj_spinner_round_get, _elm_spinner_round_get),
279 EFL_OBJECT_OP_FUNC(elm_obj_spinner_editable_set, _elm_spinner_editable_set),
280 EFL_OBJECT_OP_FUNC(elm_obj_spinner_editable_get, _elm_spinner_editable_get),
281 EFL_OBJECT_OP_FUNC(elm_obj_spinner_base_set, _elm_spinner_base_set),
282 EFL_OBJECT_OP_FUNC(elm_obj_spinner_base_get, _elm_spinner_base_get),
283 EFL_OBJECT_OP_FUNC(elm_obj_spinner_label_format_set, _elm_spinner_label_format_set),
284 EFL_OBJECT_OP_FUNC(elm_obj_spinner_label_format_get, _elm_spinner_label_format_get),
285 EFL_OBJECT_OP_FUNC(elm_obj_spinner_special_value_add, _elm_spinner_special_value_add),
286 EFL_OBJECT_OP_FUNC(efl_constructor, _elm_spinner_efl_object_constructor),
287 EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_spinner_efl_ui_widget_theme_apply),
288 EFL_OBJECT_OP_FUNC(efl_ui_widget_on_access_update, _elm_spinner_efl_ui_widget_on_access_update),
289 EFL_OBJECT_OP_FUNC(efl_ui_focus_object_on_focus_update, _elm_spinner_efl_ui_focus_object_on_focus_update),
290 EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_spinner_efl_ui_widget_widget_input_event_handler),
291 EFL_OBJECT_OP_FUNC(efl_ui_range_min_max_set, _elm_spinner_efl_ui_range_display_range_min_max_set),
292 EFL_OBJECT_OP_FUNC(efl_ui_range_min_max_get, _elm_spinner_efl_ui_range_display_range_min_max_get),
293 EFL_OBJECT_OP_FUNC(efl_ui_range_step_set, _elm_spinner_efl_ui_range_interactive_range_step_set),
294 EFL_OBJECT_OP_FUNC(efl_ui_range_step_get, _elm_spinner_efl_ui_range_interactive_range_step_get),
295 EFL_OBJECT_OP_FUNC(efl_ui_range_value_set, _elm_spinner_efl_ui_range_display_range_value_set),
296 EFL_OBJECT_OP_FUNC(efl_ui_range_value_get, _elm_spinner_efl_ui_range_display_range_value_get),
297 EFL_OBJECT_OP_FUNC(efl_access_object_i18n_name_get, _elm_spinner_efl_access_object_i18n_name_get),
298 EFL_OBJECT_OP_FUNC(efl_access_value_and_text_set, _elm_spinner_efl_access_value_value_and_text_set),
299 EFL_OBJECT_OP_FUNC(efl_access_value_and_text_get, _elm_spinner_efl_access_value_value_and_text_get),
300 EFL_OBJECT_OP_FUNC(efl_access_value_range_get, _elm_spinner_efl_access_value_range_get),
301 EFL_OBJECT_OP_FUNC(efl_access_value_increment_get, _elm_spinner_efl_access_value_increment_get),
302 EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_spinner_efl_access_widget_action_elm_actions_get),
303 ELM_SPINNER_EXTRA_OPS
304 );
305 opsp = &ops;
306
307 static const Efl_Object_Property_Reflection refl_table[] = {
308 {"wrap", __eolian_elm_spinner_wrap_set_reflect, __eolian_elm_spinner_wrap_get_reflect},
309 {"interval", __eolian_elm_spinner_interval_set_reflect, __eolian_elm_spinner_interval_get_reflect},
310 {"round", __eolian_elm_spinner_round_set_reflect, __eolian_elm_spinner_round_get_reflect},
311 {"editable", __eolian_elm_spinner_editable_set_reflect, __eolian_elm_spinner_editable_get_reflect},
312 {"base", __eolian_elm_spinner_base_set_reflect, __eolian_elm_spinner_base_get_reflect},
313 {"label_format", __eolian_elm_spinner_label_format_set_reflect, __eolian_elm_spinner_label_format_get_reflect},
314 };
315 static const Efl_Object_Property_Reflection_Ops rops = {
316 refl_table, EINA_C_ARRAY_LENGTH(refl_table)
317 };
318 ropsp = &rops;
319
320 return efl_class_functions_set(klass, opsp, ropsp);
321}
322
323static const Efl_Class_Description _elm_spinner_class_desc = {
324 EO_VERSION,
325 "Elm.Spinner",
326 EFL_CLASS_TYPE_REGULAR,
327 sizeof(Elm_Spinner_Data),
328 _elm_spinner_class_initializer,
329 _elm_spinner_class_constructor,
330 NULL
331};
332
333EFL_DEFINE_CLASS(elm_spinner_class_get, &_elm_spinner_class_desc, EFL_UI_LAYOUT_BASE_CLASS, EFL_UI_RANGE_INTERACTIVE_INTERFACE, EFL_UI_FOCUS_COMPOSITION_MIXIN, EFL_ACCESS_VALUE_INTERFACE, EFL_ACCESS_WIDGET_ACTION_MIXIN, EFL_UI_LEGACY_INTERFACE, NULL);
334
335#include "elm_spinner_eo.legacy.c"