summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-05 17:00:37 -0500
committerCedric BAIL <cedric.bail@free.fr>2019-03-07 14:16:24 -0800
commit49044cc3ade681f15fc33ceaee86648124933fd0 (patch)
treebce44d2685311addf27c21545f1a675bb1830aa6
parentf4192aef96b9cda81601f8991712abc1a80959b7 (diff)
elm_spinner: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in efl and adds it to the tree, then removes legacy references from the corresponding eo files. in the case where the entire eo file was for a legacy object, that eo file has been removed from the tree ref T7724 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8201
-rw-r--r--src/Makefile_Elementary.am5
-rw-r--r--src/lib/elementary/Elementary.h2
-rw-r--r--src/lib/elementary/elm_spinner.c2
-rw-r--r--src/lib/elementary/elm_spinner.eo195
-rw-r--r--src/lib/elementary/elm_spinner.h2
-rw-r--r--src/lib/elementary/elm_spinner_eo.c335
-rw-r--r--src/lib/elementary/elm_spinner_eo.h350
-rw-r--r--src/lib/elementary/elm_spinner_eo.legacy.c78
-rw-r--r--src/lib/elementary/elm_spinner_eo.legacy.h295
-rw-r--r--src/lib/elementary/elm_spinner_legacy.h2
-rw-r--r--src/lib/elementary/meson.build3
-rw-r--r--src/modules/elementary/prefs/elm_spinner.c2
12 files changed, 1069 insertions, 202 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 484a6ef..6e9470f 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -141,7 +141,6 @@ elm_public_eolian_files += \
141 lib/elementary/efl_ui_radio_legacy_part.eo \ 141 lib/elementary/efl_ui_radio_legacy_part.eo \
142 lib/elementary/efl_ui_check_legacy_part.eo \ 142 lib/elementary/efl_ui_check_legacy_part.eo \
143 lib/elementary/efl_ui_progressbar_legacy_part.eo \ 143 lib/elementary/efl_ui_progressbar_legacy_part.eo \
144 lib/elementary/elm_spinner.eo \
145 lib/elementary/elm_multibuttonentry_part.eo \ 144 lib/elementary/elm_multibuttonentry_part.eo \
146 lib/elementary/elm_interface_scrollable.eo \ 145 lib/elementary/elm_interface_scrollable.eo \
147 lib/elementary/elm_atspi_bridge.eo \ 146 lib/elementary/elm_atspi_bridge.eo \
@@ -387,6 +386,8 @@ lib/elementary/elm_slideshow_eo.c \
387lib/elementary/elm_slideshow_eo.legacy.c \ 386lib/elementary/elm_slideshow_eo.legacy.c \
388lib/elementary/elm_slideshow_item_eo.c \ 387lib/elementary/elm_slideshow_item_eo.c \
389lib/elementary/elm_slideshow_item_eo.legacy.c \ 388lib/elementary/elm_slideshow_item_eo.legacy.c \
389lib/elementary/elm_spinner_eo.c \
390lib/elementary/elm_spinner_eo.legacy.c \
390$(NULL) 391$(NULL)
391 392
392elm_legacy_eo_headers = \ 393elm_legacy_eo_headers = \
@@ -576,6 +577,8 @@ lib/elementary/elm_slideshow_eo.h \
576lib/elementary/elm_slideshow_eo.legacy.h \ 577lib/elementary/elm_slideshow_eo.legacy.h \
577lib/elementary/elm_slideshow_item_eo.h \ 578lib/elementary/elm_slideshow_item_eo.h \
578lib/elementary/elm_slideshow_item_eo.legacy.h \ 579lib/elementary/elm_slideshow_item_eo.legacy.h \
580lib/elementary/elm_spinner_eo.h \
581lib/elementary/elm_spinner_eo.legacy.h \
579$(NULL) 582$(NULL)
580 583
581 584
diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h
index 8e54b4a..c37c41d 100644
--- a/src/lib/elementary/Elementary.h
+++ b/src/lib/elementary/Elementary.h
@@ -167,7 +167,7 @@ EAPI void efl_ui_focus_relation_free(Efl_Ui_Focus_Relations *rel);
167# include <efl_ui_focus_layer.eo.h> 167# include <efl_ui_focus_layer.eo.h>
168# include <elm_interface_scrollable.h> 168# include <elm_interface_scrollable.h>
169# include <elm_interface_scrollable.eo.h> 169# include <elm_interface_scrollable.eo.h>
170# include <elm_spinner.eo.h> 170# include <elm_spinner_eo.h>
171#endif 171#endif
172 172
173#include <elm_tooltip.h> 173#include <elm_tooltip.h>
diff --git a/src/lib/elementary/elm_spinner.c b/src/lib/elementary/elm_spinner.c
index e00f0d3..001dd3b 100644
--- a/src/lib/elementary/elm_spinner.c
+++ b/src/lib/elementary/elm_spinner.c
@@ -1722,4 +1722,4 @@ _elm_spinner_efl_access_object_i18n_name_get(const Eo *obj, Elm_Spinner_Data *sd
1722 ELM_LAYOUT_SIZING_EVAL_OPS(elm_spinner), \ 1722 ELM_LAYOUT_SIZING_EVAL_OPS(elm_spinner), \
1723 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_spinner) 1723 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_spinner)
1724 1724
1725#include "elm_spinner.eo.c" 1725#include "elm_spinner_eo.c"
diff --git a/src/lib/elementary/elm_spinner.eo b/src/lib/elementary/elm_spinner.eo
deleted file mode 100644
index 9c9819f..0000000
--- a/src/lib/elementary/elm_spinner.eo
+++ /dev/null
@@ -1,195 +0,0 @@
1class Elm.Spinner extends Efl.Ui.Layout_Base implements Efl.Ui.Range_Interactive, Efl.Ui.Focus.Composition,
2 Efl.Access.Value, Efl.Access.Widget.Action, Efl.Ui.Legacy
3{
4 [[Elementary spinner class]]
5 legacy_prefix: elm_spinner;
6 eo_prefix: elm_obj_spinner;
7 event_prefix: elm_spinner;
8 methods {
9 @property wrap {
10 [[Control whether the spinner should wrap when it reaches its minimum or maximum value.
11
12 Disabled by default. If disabled, when the user tries to increment the
13 value,
14 but displayed value plus step value is bigger than maximum value,
15 the new value will be the maximum value.
16 The same happens when the user tries to decrement it,
17 but the value less step is less than minimum value. In this case,
18 the new displayed value will be the minimum value.
19
20 When wrap is enabled, when the user tries to increment the value,
21 but displayed value plus step value is bigger than maximum value,
22 the new value will be the minimum value. When the the user tries to
23 decrement it, but the value less step is less than minimum value,
24 the new displayed value will be the maximum value.
25
26 E.g.:
27 $min = 10
28 $max = 50
29 $step = 20
30 $displayed = 20
31
32 When the user decrement value (using left or bottom arrow), it will
33 displays $50.]]
34 set {
35 }
36 get {
37 }
38 values {
39 wrap: bool; [[$true to enable wrap or $false to disable it.]]
40 }
41 }
42 @property interval {
43 [[Control the interval on time updates for an user mouse button hold on spinner widgets' arrows.
44
45 This interval value is decreased while the user holds the
46 mouse pointer either incrementing or decrementing spinner's value.
47
48 This helps the user to get to a given value distant from the
49 current one easier/faster, as it will start to change quicker and
50 quicker on mouse button holds.
51
52 The calculation for the next change interval value, starting from
53 the one set with this call, is the previous interval divided by
54 $1.05, so it decreases a little bit.
55
56 The default starting interval value for automatic changes is
57 $0.85 seconds.]]
58 set {
59 }
60 get {
61 }
62 values {
63 interval: double; [[The (first) interval value in seconds.]]
64 }
65 }
66 @property round {
67 [[Control the round value for rounding
68
69 Sets the rounding value used for value rounding in the spinner.]]
70 set {
71 }
72 get {
73 }
74 values {
75 rnd: int; [[The rounding value]]
76 }
77 }
78 @property editable {
79 [[Control whether the spinner can be directly edited by the user or not.
80
81 Spinner objects can have edition disabled, in which state they will
82 be changed only by arrows.
83 Useful for contexts
84 where you don't want your users to interact with it writing the value.
85 Specially
86 when using special values, the user can see real value instead
87 of special label on edition.
88
89 It's enabled by default.]]
90 set {
91 }
92 get {
93 }
94 values {
95 editable: bool; [[$true to allow users to edit it or $false to don't allow users to edit it directly.]]
96 }
97 }
98 @property base {
99 [[Control the base for rounding
100
101 Rounding works as follows:
102
103 rounded_val = base + (double)(((value - base) / round) * round)
104
105 Where rounded_val, value and base are doubles, and round is an integer.
106
107 This means that things will be rounded to increments (or decrements) of
108 "round" starting from value $base. The default base for rounding is 0.
109
110 Example: round = 3, base = 2
111 Values: ..., -2, 0, 2, 5, 8, 11, 14, ...
112
113 Example: round = 2, base = 5.5
114 Values: ..., -0.5, 1.5, 3.5, 5.5, 7.5, 9.5, 11.5, ...]]
115 set {
116 }
117 get {
118 }
119 values {
120 base: double; [[The base value]]
121 }
122 }
123 @property label_format {
124 [[Control the format string of the displayed label.
125
126 If $NULL, this sets the format to "%.0f". If not it sets the format
127 string for the label text. The label text is provided a floating point
128 value, so the label text can display up to 1 floating point value.
129 Note that this is optional.
130
131 Use a format string such as "%1.2f meters" for example, and it will
132 display values like: "3.14 meters" for a value equal to 3.14159.
133
134 Default is "%0.f".]]
135 set {
136 }
137 get {
138 }
139 values {
140 fmt: string @nullable; [[The format string for the label display.]]
141 }
142 }
143 special_value_add {
144 [[Control special string to display in the place of the numerical value.
145
146 It's useful for cases when a user should select an item that is
147 better indicated by a label than a value. For example, weekdays or months.
148
149 Note: If another label was previously set to $value, it will be replaced
150 by the new label.]]
151
152 /* FIXME-doc
153 E.g.:
154 @code
155 sp = elm_spinner_add(win);
156 elm_spinner_min_max_set(sp, 1, 3);
157 elm_spinner_special_value_add(sp, 1, "January");
158 elm_spinner_special_value_add(sp, 2, "February");
159 elm_spinner_special_value_add(sp, 3, "March");
160 evas_object_show(sp);
161 @endcode
162 */
163 params {
164 @in value: double; [[The value to be replaced.]]
165 @in label: string; [[The label to be used.]]
166
167 }
168 }
169 }
170 implements {
171 class.constructor;
172 Efl.Object.constructor;
173 Efl.Ui.Widget.theme_apply;
174 Efl.Ui.Widget.on_access_update;
175 Efl.Ui.Focus.Object.on_focus_update;
176 Efl.Ui.Widget.widget_input_event_handler;
177 Efl.Ui.Range_Display.range_min_max { get; set; }
178 Efl.Ui.Range_Interactive.range_step { get; set; }
179 Efl.Ui.Range_Display.range_value { get; set; }
180 Efl.Access.Object.i18n_name { get; }
181 Efl.Access.Value.value_and_text { get; set; }
182 Efl.Access.Value.range { get; }
183 Efl.Access.Value.increment { get; }
184 Efl.Access.Widget.Action.elm_actions { get; }
185 }
186 events {
187 /* FIXME: Colorselector puts Colorselector_Data here! */
188 changed: void; [[Called when spinner changed]]
189 delay,changed: void; [[Called when spinner delay changed]]
190 spinner,drag,start: void; [[Called when spinner drag started]]
191 spinner,drag,stop: void; [[Called when spinner drag stopped]]
192 min,reached: void; [[Called when spinner value reached min]]
193 max,reached: void; [[Called when spinner value reached max]]
194 }
195}
diff --git a/src/lib/elementary/elm_spinner.h b/src/lib/elementary/elm_spinner.h
index 16c040a..6da9976 100644
--- a/src/lib/elementary/elm_spinner.h
+++ b/src/lib/elementary/elm_spinner.h
@@ -58,7 +58,7 @@
58 */ 58 */
59 59
60#ifdef EFL_EO_API_SUPPORT 60#ifdef EFL_EO_API_SUPPORT
61#include "elm_spinner.eo.h" 61#include "elm_spinner_eo.h"
62#endif 62#endif
63#ifndef EFL_NOLEGACY_API_SUPPORT 63#ifndef EFL_NOLEGACY_API_SUPPORT
64#include "elm_spinner_legacy.h" 64#include "elm_spinner_legacy.h"
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"
diff --git a/src/lib/elementary/elm_spinner_eo.h b/src/lib/elementary/elm_spinner_eo.h
new file mode 100644
index 0000000..ff9205c
--- /dev/null
+++ b/src/lib/elementary/elm_spinner_eo.h
@@ -0,0 +1,350 @@
1#ifndef _ELM_SPINNER_EO_H_
2#define _ELM_SPINNER_EO_H_
3
4#ifndef _ELM_SPINNER_EO_CLASS_TYPE
5#define _ELM_SPINNER_EO_CLASS_TYPE
6
7typedef Eo Elm_Spinner;
8
9#endif
10
11#ifndef _ELM_SPINNER_EO_TYPES
12#define _ELM_SPINNER_EO_TYPES
13
14
15#endif
16/** Elementary spinner class
17 *
18 * @ingroup Elm_Spinner
19 */
20#define ELM_SPINNER_CLASS elm_spinner_class_get()
21
22EWAPI const Efl_Class *elm_spinner_class_get(void);
23
24/**
25 * @brief Control whether the spinner should wrap when it reaches its minimum
26 * or maximum value.
27 *
28 * Disabled by default. If disabled, when the user tries to increment the
29 * value, but displayed value plus step value is bigger than maximum value, the
30 * new value will be the maximum value. The same happens when the user tries to
31 * decrement it, but the value less step is less than minimum value. In this
32 * case, the new displayed value will be the minimum value.
33 *
34 * When wrap is enabled, when the user tries to increment the value, but
35 * displayed value plus step value is bigger than maximum value, the new value
36 * will be the minimum value. When the the user tries to decrement it, but the
37 * value less step is less than minimum value, the new displayed value will be
38 * the maximum value.
39 *
40 * E.g.: @c min = 10 @c max = 50 @c step = 20 @c displayed = 20
41 *
42 * When the user decrement value (using left or bottom arrow), it will displays
43 * $50.
44 *
45 * @param[in] obj The object.
46 * @param[in] wrap @c true to enable wrap or @c false to disable it.
47 *
48 * @ingroup Elm_Spinner
49 */
50EOAPI void elm_obj_spinner_wrap_set(Eo *obj, Eina_Bool wrap);
51
52/**
53 * @brief Control whether the spinner should wrap when it reaches its minimum
54 * or maximum value.
55 *
56 * Disabled by default. If disabled, when the user tries to increment the
57 * value, but displayed value plus step value is bigger than maximum value, the
58 * new value will be the maximum value. The same happens when the user tries to
59 * decrement it, but the value less step is less than minimum value. In this
60 * case, the new displayed value will be the minimum value.
61 *
62 * When wrap is enabled, when the user tries to increment the value, but
63 * displayed value plus step value is bigger than maximum value, the new value
64 * will be the minimum value. When the the user tries to decrement it, but the
65 * value less step is less than minimum value, the new displayed value will be
66 * the maximum value.
67 *
68 * E.g.: @c min = 10 @c max = 50 @c step = 20 @c displayed = 20
69 *
70 * When the user decrement value (using left or bottom arrow), it will displays
71 * $50.
72 *
73 * @param[in] obj The object.
74 *
75 * @return @c true to enable wrap or @c false to disable it.
76 *
77 * @ingroup Elm_Spinner
78 */
79EOAPI Eina_Bool elm_obj_spinner_wrap_get(const Eo *obj);
80
81/**
82 * @brief Control the interval on time updates for an user mouse button hold on
83 * spinner widgets' arrows.
84 *
85 * This interval value is decreased while the user holds the mouse pointer
86 * either incrementing or decrementing spinner's value.
87 *
88 * This helps the user to get to a given value distant from the current one
89 * easier/faster, as it will start to change quicker and quicker on mouse
90 * button holds.
91 *
92 * The calculation for the next change interval value, starting from the one
93 * set with this call, is the previous interval divided by $1.05, so it
94 * decreases a little bit.
95 *
96 * The default starting interval value for automatic changes is $0.85 seconds.
97 *
98 * @param[in] obj The object.
99 * @param[in] interval The (first) interval value in seconds.
100 *
101 * @ingroup Elm_Spinner
102 */
103EOAPI void elm_obj_spinner_interval_set(Eo *obj, double interval);
104
105/**
106 * @brief Control the interval on time updates for an user mouse button hold on
107 * spinner widgets' arrows.
108 *
109 * This interval value is decreased while the user holds the mouse pointer
110 * either incrementing or decrementing spinner's value.
111 *
112 * This helps the user to get to a given value distant from the current one
113 * easier/faster, as it will start to change quicker and quicker on mouse
114 * button holds.
115 *
116 * The calculation for the next change interval value, starting from the one
117 * set with this call, is the previous interval divided by $1.05, so it
118 * decreases a little bit.
119 *
120 * The default starting interval value for automatic changes is $0.85 seconds.
121 *
122 * @param[in] obj The object.
123 *
124 * @return The (first) interval value in seconds.
125 *
126 * @ingroup Elm_Spinner
127 */
128EOAPI double elm_obj_spinner_interval_get(const Eo *obj);
129
130/**
131 * @brief Control the round value for rounding
132 *
133 * Sets the rounding value used for value rounding in the spinner.
134 *
135 * @param[in] obj The object.
136 * @param[in] rnd The rounding value
137 *
138 * @ingroup Elm_Spinner
139 */
140EOAPI void elm_obj_spinner_round_set(Eo *obj, int rnd);
141
142/**
143 * @brief Control the round value for rounding
144 *
145 * Sets the rounding value used for value rounding in the spinner.
146 *
147 * @param[in] obj The object.
148 *
149 * @return The rounding value
150 *
151 * @ingroup Elm_Spinner
152 */
153EOAPI int elm_obj_spinner_round_get(const Eo *obj);
154
155/**
156 * @brief Control whether the spinner can be directly edited by the user or
157 * not.
158 *
159 * Spinner objects can have edition disabled, in which state they will be
160 * changed only by arrows. Useful for contexts where you don't want your users
161 * to interact with it writing the value. Specially when using special values,
162 * the user can see real value instead of special label on edition.
163 *
164 * It's enabled by default.
165 *
166 * @param[in] obj The object.
167 * @param[in] editable @c true to allow users to edit it or @c false to don't
168 * allow users to edit it directly.
169 *
170 * @ingroup Elm_Spinner
171 */
172EOAPI void elm_obj_spinner_editable_set(Eo *obj, Eina_Bool editable);
173
174/**
175 * @brief Control whether the spinner can be directly edited by the user or
176 * not.
177 *
178 * Spinner objects can have edition disabled, in which state they will be
179 * changed only by arrows. Useful for contexts where you don't want your users
180 * to interact with it writing the value. Specially when using special values,
181 * the user can see real value instead of special label on edition.
182 *
183 * It's enabled by default.
184 *
185 * @param[in] obj The object.
186 *
187 * @return @c true to allow users to edit it or @c false to don't allow users
188 * to edit it directly.
189 *
190 * @ingroup Elm_Spinner
191 */
192EOAPI Eina_Bool elm_obj_spinner_editable_get(const Eo *obj);
193
194/**
195 * @brief Control the base for rounding
196 *
197 * Rounding works as follows:
198 *
199 * rounded_val = base + (double)(((value - base) / round) * round)
200 *
201 * Where rounded_val, value and base are doubles, and round is an integer.
202 *
203 * This means that things will be rounded to increments (or decrements) of
204 * "round" starting from value @c base. The default base for rounding is 0.
205 *
206 * Example: round = 3, base = 2 Values: ..., -2, 0, 2, 5, 8, 11, 14, ...
207 *
208 * Example: round = 2, base = 5.5 Values: ..., -0.5, 1.5, 3.5, 5.5, 7.5, 9.5,
209 * 11.5, ...
210 *
211 * @param[in] obj The object.
212 * @param[in] base The base value
213 *
214 * @ingroup Elm_Spinner
215 */
216EOAPI void elm_obj_spinner_base_set(Eo *obj, double base);
217
218/**
219 * @brief Control the base for rounding
220 *
221 * Rounding works as follows:
222 *
223 * rounded_val = base + (double)(((value - base) / round) * round)
224 *
225 * Where rounded_val, value and base are doubles, and round is an integer.
226 *
227 * This means that things will be rounded to increments (or decrements) of
228 * "round" starting from value @c base. The default base for rounding is 0.
229 *
230 * Example: round = 3, base = 2 Values: ..., -2, 0, 2, 5, 8, 11, 14, ...
231 *
232 * Example: round = 2, base = 5.5 Values: ..., -0.5, 1.5, 3.5, 5.5, 7.5, 9.5,
233 * 11.5, ...
234 *
235 * @param[in] obj The object.
236 *
237 * @return The base value
238 *
239 * @ingroup Elm_Spinner
240 */
241EOAPI double elm_obj_spinner_base_get(const Eo *obj);
242
243/**
244 * @brief Control the format string of the displayed label.
245 *
246 * If @c NULL, this sets the format to "%.0f". If not it sets the format string
247 * for the label text. The label text is provided a floating point value, so
248 * the label text can display up to 1 floating point value. Note that this is
249 * optional.
250 *
251 * Use a format string such as "%1.2f meters" for example, and it will display
252 * values like: "3.14 meters" for a value equal to 3.14159.
253 *
254 * Default is "%0.f".
255 *
256 * @param[in] obj The object.
257 * @param[in] fmt The format string for the label display.
258 *
259 * @ingroup Elm_Spinner
260 */
261EOAPI void elm_obj_spinner_label_format_set(Eo *obj, const char *fmt);
262
263/**
264 * @brief Control the format string of the displayed label.
265 *
266 * If @c NULL, this sets the format to "%.0f". If not it sets the format string
267 * for the label text. The label text is provided a floating point value, so
268 * the label text can display up to 1 floating point value. Note that this is
269 * optional.
270 *
271 * Use a format string such as "%1.2f meters" for example, and it will display
272 * values like: "3.14 meters" for a value equal to 3.14159.
273 *
274 * Default is "%0.f".
275 *
276 * @param[in] obj The object.
277 *
278 * @return The format string for the label display.
279 *
280 * @ingroup Elm_Spinner
281 */
282EOAPI const char *elm_obj_spinner_label_format_get(const Eo *obj);
283
284/**
285 * @brief Control special string to display in the place of the numerical
286 * value.
287 *
288 * It's useful for cases when a user should select an item that is better
289 * indicated by a label than a value. For example, weekdays or months.
290 *
291 * @note If another label was previously set to @c value, it will be replaced
292 * by the new label.
293 *
294 * @param[in] obj The object.
295 * @param[in] value The value to be replaced.
296 * @param[in] label The label to be used.
297 *
298 * @ingroup Elm_Spinner
299 */
300EOAPI void elm_obj_spinner_special_value_add(Eo *obj, double value, const char *label);
301
302EWAPI extern const Efl_Event_Description _ELM_SPINNER_EVENT_CHANGED;
303
304/** Called when spinner changed
305 *
306 * @ingroup Elm_Spinner
307 */
308#define ELM_SPINNER_EVENT_CHANGED (&(_ELM_SPINNER_EVENT_CHANGED))
309
310EWAPI extern const Efl_Event_Description _ELM_SPINNER_EVENT_DELAY_CHANGED;
311
312/** Called when spinner delay changed
313 *
314 * @ingroup Elm_Spinner
315 */
316#define ELM_SPINNER_EVENT_DELAY_CHANGED (&(_ELM_SPINNER_EVENT_DELAY_CHANGED))
317
318EWAPI extern const Efl_Event_Description _ELM_SPINNER_EVENT_SPINNER_DRAG_START;
319
320/** Called when spinner drag started
321 *
322 * @ingroup Elm_Spinner
323 */
324#define ELM_SPINNER_EVENT_SPINNER_DRAG_START (&(_ELM_SPINNER_EVENT_SPINNER_DRAG_START))
325
326EWAPI extern const Efl_Event_Description _ELM_SPINNER_EVENT_SPINNER_DRAG_STOP;
327
328/** Called when spinner drag stopped
329 *
330 * @ingroup Elm_Spinner
331 */
332#define ELM_SPINNER_EVENT_SPINNER_DRAG_STOP (&(_ELM_SPINNER_EVENT_SPINNER_DRAG_STOP))
333
334EWAPI extern const Efl_Event_Description _ELM_SPINNER_EVENT_MIN_REACHED;
335
336/** Called when spinner value reached min
337 *
338 * @ingroup Elm_Spinner
339 */
340#define ELM_SPINNER_EVENT_MIN_REACHED (&(_ELM_SPINNER_EVENT_MIN_REACHED))
341
342EWAPI extern const Efl_Event_Description _ELM_SPINNER_EVENT_MAX_REACHED;
343
344/** Called when spinner value reached max
345 *
346 * @ingroup Elm_Spinner
347 */
348#define ELM_SPINNER_EVENT_MAX_REACHED (&(_ELM_SPINNER_EVENT_MAX_REACHED))
349
350#endif
diff --git a/src/lib/elementary/elm_spinner_eo.legacy.c b/src/lib/elementary/elm_spinner_eo.legacy.c
new file mode 100644
index 0000000..ed35ba1
--- /dev/null
+++ b/src/lib/elementary/elm_spinner_eo.legacy.c
@@ -0,0 +1,78 @@
1
2EAPI void
3elm_spinner_wrap_set(Elm_Spinner *obj, Eina_Bool wrap)
4{
5 elm_obj_spinner_wrap_set(obj, wrap);
6}
7
8EAPI Eina_Bool
9elm_spinner_wrap_get(const Elm_Spinner *obj)
10{
11 return elm_obj_spinner_wrap_get(obj);
12}
13
14EAPI void
15elm_spinner_interval_set(Elm_Spinner *obj, double interval)
16{
17 elm_obj_spinner_interval_set(obj, interval);
18}
19
20EAPI double
21elm_spinner_interval_get(const Elm_Spinner *obj)
22{
23 return elm_obj_spinner_interval_get(obj);
24}
25
26EAPI void
27elm_spinner_round_set(Elm_Spinner *obj, int rnd)
28{
29 elm_obj_spinner_round_set(obj, rnd);
30}
31
32EAPI int
33elm_spinner_round_get(const Elm_Spinner *obj)
34{
35 return elm_obj_spinner_round_get(obj);
36}
37
38EAPI void
39elm_spinner_editable_set(Elm_Spinner *obj, Eina_Bool editable)
40{
41 elm_obj_spinner_editable_set(obj, editable);
42}
43
44EAPI Eina_Bool
45elm_spinner_editable_get(const Elm_Spinner *obj)
46{
47 return elm_obj_spinner_editable_get(obj);
48}
49
50EAPI void
51elm_spinner_base_set(Elm_Spinner *obj, double base)
52{
53 elm_obj_spinner_base_set(obj, base);
54}
55
56EAPI double
57elm_spinner_base_get(const Elm_Spinner *obj)
58{
59 return elm_obj_spinner_base_get(obj);
60}
61
62EAPI void
63elm_spinner_label_format_set(Elm_Spinner *obj, const char *fmt)
64{
65 elm_obj_spinner_label_format_set(obj, fmt);
66}
67
68EAPI const char *
69elm_spinner_label_format_get(const Elm_Spinner *obj)
70{
71 return elm_obj_spinner_label_format_get(obj);
72}
73
74EAPI void
75elm_spinner_special_value_add(Elm_Spinner *obj, double value, const char *label)
76{
77 elm_obj_spinner_special_value_add(obj, value, label);
78}
diff --git a/src/lib/elementary/elm_spinner_eo.legacy.h b/src/lib/elementary/elm_spinner_eo.legacy.h
new file mode 100644
index 0000000..798ec39
--- /dev/null
+++ b/src/lib/elementary/elm_spinner_eo.legacy.h
@@ -0,0 +1,295 @@
1#ifndef _ELM_SPINNER_EO_LEGACY_H_
2#define _ELM_SPINNER_EO_LEGACY_H_
3
4#ifndef _ELM_SPINNER_EO_CLASS_TYPE
5#define _ELM_SPINNER_EO_CLASS_TYPE
6
7typedef Eo Elm_Spinner;
8
9#endif
10
11#ifndef _ELM_SPINNER_EO_TYPES
12#define _ELM_SPINNER_EO_TYPES
13
14
15#endif
16
17/**
18 * @brief Control whether the spinner should wrap when it reaches its minimum
19 * or maximum value.
20 *
21 * Disabled by default. If disabled, when the user tries to increment the
22 * value, but displayed value plus step value is bigger than maximum value, the
23 * new value will be the maximum value. The same happens when the user tries to
24 * decrement it, but the value less step is less than minimum value. In this
25 * case, the new displayed value will be the minimum value.
26 *
27 * When wrap is enabled, when the user tries to increment the value, but
28 * displayed value plus step value is bigger than maximum value, the new value
29 * will be the minimum value. When the the user tries to decrement it, but the
30 * value less step is less than minimum value, the new displayed value will be
31 * the maximum value.
32 *
33 * E.g.: @c min = 10 @c max = 50 @c step = 20 @c displayed = 20
34 *
35 * When the user decrement value (using left or bottom arrow), it will displays
36 * $50.
37 *
38 * @param[in] obj The object.
39 * @param[in] wrap @c true to enable wrap or @c false to disable it.
40 *
41 * @ingroup Elm_Spinner_Group
42 */
43EAPI void elm_spinner_wrap_set(Elm_Spinner *obj, Eina_Bool wrap);
44
45/**
46 * @brief Control whether the spinner should wrap when it reaches its minimum
47 * or maximum value.
48 *
49 * Disabled by default. If disabled, when the user tries to increment the
50 * value, but displayed value plus step value is bigger than maximum value, the
51 * new value will be the maximum value. The same happens when the user tries to
52 * decrement it, but the value less step is less than minimum value. In this
53 * case, the new displayed value will be the minimum value.
54 *
55 * When wrap is enabled, when the user tries to increment the value, but
56 * displayed value plus step value is bigger than maximum value, the new value
57 * will be the minimum value. When the the user tries to decrement it, but the
58 * value less step is less than minimum value, the new displayed value will be
59 * the maximum value.
60 *
61 * E.g.: @c min = 10 @c max = 50 @c step = 20 @c displayed = 20
62 *
63 * When the user decrement value (using left or bottom arrow), it will displays
64 * $50.
65 *
66 * @param[in] obj The object.
67 *
68 * @return @c true to enable wrap or @c false to disable it.
69 *
70 * @ingroup Elm_Spinner_Group
71 */
72EAPI Eina_Bool elm_spinner_wrap_get(const Elm_Spinner *obj);
73
74/**
75 * @brief Control the interval on time updates for an user mouse button hold on
76 * spinner widgets' arrows.
77 *
78 * This interval value is decreased while the user holds the mouse pointer
79 * either incrementing or decrementing spinner's value.
80 *
81 * This helps the user to get to a given value distant from the current one
82 * easier/faster, as it will start to change quicker and quicker on mouse
83 * button holds.
84 *
85 * The calculation for the next change interval value, starting from the one
86 * set with this call, is the previous interval divided by $1.05, so it
87 * decreases a little bit.
88 *
89 * The default starting interval value for automatic changes is $0.85 seconds.
90 *
91 * @param[in] obj The object.
92 * @param[in] interval The (first) interval value in seconds.
93 *
94 * @ingroup Elm_Spinner_Group
95 */
96EAPI void elm_spinner_interval_set(Elm_Spinner *obj, double interval);
97
98/**
99 * @brief Control the interval on time updates for an user mouse button hold on
100 * spinner widgets' arrows.
101 *
102 * This interval value is decreased while the user holds the mouse pointer
103 * either incrementing or decrementing spinner's value.
104 *
105 * This helps the user to get to a given value distant from the current one
106 * easier/faster, as it will start to change quicker and quicker on mouse
107 * button holds.
108 *
109 * The calculation for the next change interval value, starting from the one
110 * set with this call, is the previous interval divided by $1.05, so it
111 * decreases a little bit.
112 *
113 * The default starting interval value for automatic changes is $0.85 seconds.
114 *
115 * @param[in] obj The object.
116 *
117 * @return The (first) interval value in seconds.
118 *
119 * @ingroup Elm_Spinner_Group
120 */
121EAPI double elm_spinner_interval_get(const Elm_Spinner *obj);
122
123/**
124 * @brief Control the round value for rounding
125 *
126 * Sets the rounding value used for value rounding in the spinner.
127 *
128 * @param[in] obj The object.
129 * @param[in] rnd The rounding value
130 *
131 * @ingroup Elm_Spinner_Group
132 */
133EAPI void elm_spinner_round_set(Elm_Spinner *obj, int rnd);
134
135/**
136 * @brief Control the round value for rounding
137 *
138 * Sets the rounding value used for value rounding in the spinner.
139 *
140 * @param[in] obj The object.
141 *
142 * @return The rounding value
143 *
144 * @ingroup Elm_Spinner_Group
145 */
146EAPI int elm_spinner_round_get(const Elm_Spinner *obj);
147
148/**
149 * @brief Control whether the spinner can be directly edited by the user or
150 * not.
151 *
152 * Spinner objects can have edition disabled, in which state they will be
153 * changed only by arrows. Useful for contexts where you don't want your users
154 * to interact with it writing the value. Specially when using special values,
155 * the user can see real value instead of special label on edition.
156 *
157 * It's enabled by default.
158 *
159 * @param[in] obj The object.
160 * @param[in] editable @c true to allow users to edit it or @c false to don't
161 * allow users to edit it directly.
162 *
163 * @ingroup Elm_Spinner_Group
164 */
165EAPI void elm_spinner_editable_set(Elm_Spinner *obj, Eina_Bool editable);
166
167/**
168 * @brief Control whether the spinner can be directly edited by the user or
169 * not.
170 *
171 * Spinner objects can have edition disabled, in which state they will be
172 * changed only by arrows. Useful for contexts where you don't want your users
173 * to interact with it writing the value. Specially when using special values,
174 * the user can see real value instead of special label on edition.
175 *
176 * It's enabled by default.
177 *
178 * @param[in] obj The object.
179 *
180 * @return @c true to allow users to edit it or @c false to don't allow users
181 * to edit it directly.
182 *
183 * @ingroup Elm_Spinner_Group
184 */
185EAPI Eina_Bool elm_spinner_editable_get(const Elm_Spinner *obj);
186
187/**
188 * @brief Control the base for rounding
189 *
190 * Rounding works as follows:
191 *
192 * rounded_val = base + (double)(((value - base) / round) * round)
193 *
194 * Where rounded_val, value and base are doubles, and round is an integer.
195 *
196 * This means that things will be rounded to increments (or decrements) of
197 * "round" starting from value @c base. The default base for rounding is 0.
198 *
199 * Example: round = 3, base = 2 Values: ..., -2, 0, 2, 5, 8, 11, 14, ...
200 *
201 * Example: round = 2, base = 5.5 Values: ..., -0.5, 1.5, 3.5, 5.5, 7.5, 9.5,
202 * 11.5, ...
203 *
204 * @param[in] obj The object.
205 * @param[in] base The base value
206 *
207 * @ingroup Elm_Spinner_Group
208 */
209EAPI void elm_spinner_base_set(Elm_Spinner *obj, double base);
210
211/**
212 * @brief Control the base for rounding
213 *
214 * Rounding works as follows:
215 *
216 * rounded_val = base + (double)(((value - base) / round) * round)
217 *
218 * Where rounded_val, value and base are doubles, and round is an integer.
219 *
220 * This means that things will be rounded to increments (or decrements) of
221 * "round" starting from value @c base. The default base for rounding is 0.
222 *
223 * Example: round = 3, base = 2 Values: ..., -2, 0, 2, 5, 8, 11, 14, ...
224 *
225 * Example: round = 2, base = 5.5 Values: ..., -0.5, 1.5, 3.5, 5.5, 7.5, 9.5,
226 * 11.5, ...
227 *
228 * @param[in] obj The object.
229 *
230 * @return The base value
231 *
232 * @ingroup Elm_Spinner_Group
233 */
234EAPI double elm_spinner_base_get(const Elm_Spinner *obj);
235
236/**
237 * @brief Control the format string of the displayed label.
238 *
239 * If @c NULL, this sets the format to "%.0f". If not it sets the format string
240 * for the label text. The label text is provided a floating point value, so
241 * the label text can display up to 1 floating point value. Note that this is
242 * optional.
243 *
244 * Use a format string such as "%1.2f meters" for example, and it will display
245 * values like: "3.14 meters" for a value equal to 3.14159.
246 *
247 * Default is "%0.f".
248 *
249 * @param[in] obj The object.
250 * @param[in] fmt The format string for the label display.
251 *
252 * @ingroup Elm_Spinner_Group
253 */
254EAPI void elm_spinner_label_format_set(Elm_Spinner *obj, const char *fmt);
255
256/**
257 * @brief Control the format string of the displayed label.
258 *
259 * If @c NULL, this sets the format to "%.0f". If not it sets the format string
260 * for the label text. The label text is provided a floating point value, so
261 * the label text can display up to 1 floating point value. Note that this is
262 * optional.
263 *
264 * Use a format string such as "%1.2f meters" for example, and it will display
265 * values like: "3.14 meters" for a value equal to 3.14159.
266 *
267 * Default is "%0.f".
268 *
269 * @param[in] obj The object.
270 *
271 * @return The format string for the label display.
272 *
273 * @ingroup Elm_Spinner_Group
274 */
275EAPI const char *elm_spinner_label_format_get(const Elm_Spinner *obj);
276
277/**
278 * @brief Control special string to display in the place of the numerical
279 * value.
280 *
281 * It's useful for cases when a user should select an item that is better
282 * indicated by a label than a value. For example, weekdays or months.
283 *
284 * @note If another label was previously set to @c value, it will be replaced
285 * by the new label.
286 *
287 * @param[in] obj The object.
288 * @param[in] value The value to be replaced.
289 * @param[in] label The label to be used.
290 *
291 * @ingroup Elm_Spinner_Group
292 */
293EAPI void elm_spinner_special_value_add(Elm_Spinner *obj, double value, const char *label);
294
295#endif
diff --git a/src/lib/elementary/elm_spinner_legacy.h b/src/lib/elementary/elm_spinner_legacy.h
index 8c4812b..1b4e241 100644
--- a/src/lib/elementary/elm_spinner_legacy.h
+++ b/src/lib/elementary/elm_spinner_legacy.h
@@ -148,4 +148,4 @@ EAPI void elm_spinner_value_set(Evas_Object *obj, double val);
148 */ 148 */
149EAPI double elm_spinner_value_get(const Evas_Object *obj); 149EAPI double elm_spinner_value_get(const Evas_Object *obj);
150 150
151#include "elm_spinner.eo.legacy.h" 151#include "elm_spinner_eo.legacy.h"
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index d24f65e..27b4b23 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -177,7 +177,6 @@ pub_eo_files = [
177 'efl_ui_check_legacy_part.eo', 177 'efl_ui_check_legacy_part.eo',
178 'efl_ui_progressbar_legacy_part.eo', 178 'efl_ui_progressbar_legacy_part.eo',
179 'elm_widget_item_container.eo', 179 'elm_widget_item_container.eo',
180 'elm_spinner.eo',
181 'elm_multibuttonentry_part.eo', 180 'elm_multibuttonentry_part.eo',
182 'elm_interface_scrollable.eo', 181 'elm_interface_scrollable.eo',
183 'elm_atspi_bridge.eo', 182 'elm_atspi_bridge.eo',
@@ -795,6 +794,8 @@ elementary_pub_headers = [
795 'elm_slideshow_eo.legacy.h', 794 'elm_slideshow_eo.legacy.h',
796 'elm_slideshow_item_eo.h', 795 'elm_slideshow_item_eo.h',
797 'elm_slideshow_item_eo.legacy.h', 796 'elm_slideshow_item_eo.legacy.h',
797 'elm_spinner_eo.h',
798 'elm_spinner_eo.legacy.h',
798] 799]
799 800
800elementary_header_src = [ 801elementary_header_src = [
diff --git a/src/modules/elementary/prefs/elm_spinner.c b/src/modules/elementary/prefs/elm_spinner.c
index 6b169fc..2463628 100644
--- a/src/modules/elementary/prefs/elm_spinner.c
+++ b/src/modules/elementary/prefs/elm_spinner.c
@@ -1,5 +1,5 @@
1#include "private.h" 1#include "private.h"
2#include "elm_spinner.eo.h" 2#include "elm_spinner_eo.h"
3 3
4static Elm_Prefs_Item_Type supported_types[] = 4static Elm_Prefs_Item_Type supported_types[] =
5{ 5{