summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile_Efl.am1
-rw-r--r--src/bin/elementary/test_flipselector.c9
-rw-r--r--src/lib/efl/Efl.h1
-rw-r--r--src/lib/efl/Makefile.am1
-rw-r--r--src/lib/efl/interfaces/efl_interfaces_main.c1
-rw-r--r--src/lib/efl/interfaces/efl_ui_spin.eo84
-rw-r--r--src/lib/elementary/elm_flipselector.c103
-rw-r--r--src/lib/elementary/elm_flipselector.eo41
-rw-r--r--src/lib/elementary/elm_flipselector_legacy.h37
-rw-r--r--src/lib/elementary/elm_spinner.c64
-rw-r--r--src/lib/elementary/elm_spinner.eo86
-rw-r--r--src/lib/elementary/elm_spinner_legacy.h154
-rw-r--r--src/lib/elementary/elm_widget_flipselector.h2
13 files changed, 458 insertions, 126 deletions
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index 3faf4501f2..480ecfa6b7 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -35,6 +35,7 @@ efl_eolian_files = \
35 lib/efl/interfaces/efl_vpath_file.eo \ 35 lib/efl/interfaces/efl_vpath_file.eo \
36 lib/efl/interfaces/efl_vpath_core.eo \ 36 lib/efl/interfaces/efl_vpath_core.eo \
37 lib/efl/interfaces/efl_vpath_file_core.eo \ 37 lib/efl/interfaces/efl_vpath_file_core.eo \
38 lib/efl/interfaces/efl_ui_spin.eo \
38 lib/efl/interfaces/efl_ui_progress.eo \ 39 lib/efl/interfaces/efl_ui_progress.eo \
39 $(efl_eolian_legacy_files) \ 40 $(efl_eolian_legacy_files) \
40 $(NULL) 41 $(NULL)
diff --git a/src/bin/elementary/test_flipselector.c b/src/bin/elementary/test_flipselector.c
index 62a67cff09..b9cd93657b 100644
--- a/src/bin/elementary/test_flipselector.c
+++ b/src/bin/elementary/test_flipselector.c
@@ -184,5 +184,14 @@ test_flipselector(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev
184 elm_box_pack_end(bx, bt); 184 elm_box_pack_end(bx, bt);
185 evas_object_show(bt); 185 evas_object_show(bt);
186 186
187 fpd = elm_flipselector_add(bx);
188 evas_object_size_hint_weight_set(fpd, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
189 efl_ui_spin_step_set(fpd, 1.5);
190 efl_ui_spin_min_max_set(fpd, 2.3, 10.1);
191 efl_ui_spin_value_set(fpd, 5.3);
192 printf("Current value is %f\n", efl_ui_spin_value_get(fpd));
193 elm_box_pack_end(bx, fpd);
194 evas_object_show(fpd);
195
187 evas_object_show(win); 196 evas_object_show(win);
188} 197}
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index ce4399f000..074d0359d3 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -76,6 +76,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
76#include "interfaces/efl_text_properties.eo.h" 76#include "interfaces/efl_text_properties.eo.h"
77#include "interfaces/efl_orientation.eo.h" 77#include "interfaces/efl_orientation.eo.h"
78#include "interfaces/efl_flipable.eo.h" 78#include "interfaces/efl_flipable.eo.h"
79#include "interfaces/efl_ui_spin.eo.h"
79#include "interfaces/efl_ui_progress.eo.h" 80#include "interfaces/efl_ui_progress.eo.h"
80 81
81#define EFL_ORIENT_0 EFL_ORIENT_UP 82#define EFL_ORIENT_0 EFL_ORIENT_UP
diff --git a/src/lib/efl/Makefile.am b/src/lib/efl/Makefile.am
index 760e868e51..673b789fcb 100644
--- a/src/lib/efl/Makefile.am
+++ b/src/lib/efl/Makefile.am
@@ -34,6 +34,7 @@ interfaces/efl_vpath_manager.eo \
34interfaces/efl_vpath_file.eo \ 34interfaces/efl_vpath_file.eo \
35interfaces/efl_vpath_core.eo \ 35interfaces/efl_vpath_core.eo \
36interfaces/efl_vpath_file_core.eo \ 36interfaces/efl_vpath_file_core.eo \
37interfaces/efl_ui_spin.eo \
37interfaces/efl_ui_progress.eo \ 38interfaces/efl_ui_progress.eo \
38$(efl_eolian_legacy_files) \ 39$(efl_eolian_legacy_files) \
39$(NULL) 40$(NULL)
diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c
index 116c2d3a9c..dbdb4fb2fe 100644
--- a/src/lib/efl/interfaces/efl_interfaces_main.c
+++ b/src/lib/efl/interfaces/efl_interfaces_main.c
@@ -43,6 +43,7 @@ EAPI const Eo_Event_Description _EFL_GFX_PATH_CHANGED =
43#include "interfaces/efl_animator.eo.c" 43#include "interfaces/efl_animator.eo.c"
44#include "interfaces/efl_orientation.eo.c" 44#include "interfaces/efl_orientation.eo.c"
45#include "interfaces/efl_flipable.eo.c" 45#include "interfaces/efl_flipable.eo.c"
46#include "interfaces/efl_ui_spin.eo.c"
46#include "interfaces/efl_ui_progress.eo.c" 47#include "interfaces/efl_ui_progress.eo.c"
47 48
48EAPI void 49EAPI void
diff --git a/src/lib/efl/interfaces/efl_ui_spin.eo b/src/lib/efl/interfaces/efl_ui_spin.eo
new file mode 100644
index 0000000000..20ac64b30f
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_ui_spin.eo
@@ -0,0 +1,84 @@
1interface Efl.Ui.Spin()
2{
3 legacy_prefix: null;
4 methods {
5 @property min_max {
6 [[Control the minimum and maximum values for the spinner.
7
8 Define the allowed range of values to be selected by the user.
9
10 If actual value is less than $min, it will be updated to $min. If it
11 is bigger then $max, will be updated to $max.
12
13 By default, min is equal to 0, and max is equal to 100.
14
15 Warning: Maximum must be greater than minimum.]]
16 set {
17 }
18 get {
19 }
20 values {
21 min: double; [[The minimum value.]]
22 max: double; [[The maximum value.]]
23 }
24 }
25 @property step {
26 [[Control the step used to increment or decrement the spinner value.
27
28 This value will be incremented or decremented to the displayed value.
29 It will be incremented while the user keep right or top arrow pressed,
30 and will be decremented while the user keep left or bottom arrow pressed.
31
32 The interval to increment / decrement can be set with @.interval.set.
33
34 By default step value is equal to 1.]]
35 set {
36 }
37 get {
38 }
39 values {
40 step: double; [[The step value.]]
41 }
42 }
43 @property value {
44 [[Control the value the spinner displays.
45
46 Value will be presented on the label following format specified with
47 elm_spinner_format_set().
48
49 Warning The value must to be between min and max values. This values
50 are set by elm_spinner_min_max_set().]]
51 set {
52 }
53 get {
54 }
55 values {
56 val: double; [[The value to be displayed.]]
57 }
58 }
59 @property interval {
60 [[Control the interval on time updates for an user mouse button hold on spinner widgets' arrows.
61
62 This interval value is decreased while the user holds the
63 mouse pointer either incrementing or decrementing spinner's value.
64
65 This helps the user to get to a given value distant from the
66 current one easier/faster, as it will start to change quicker and
67 quicker on mouse button holds.
68
69 The calculation for the next change interval value, starting from
70 the one set with this call, is the previous interval divided by
71 $1.05, so it decreases a little bit.
72
73 The default starting interval value for automatic changes is
74 $0.85 seconds.]]
75 set {
76 }
77 get {
78 }
79 values {
80 interval: double; [[The (first) interval value in seconds.]]
81 }
82 }
83 }
84}
diff --git a/src/lib/elementary/elm_flipselector.c b/src/lib/elementary/elm_flipselector.c
index 2e789e7bac..569f4f9459 100644
--- a/src/lib/elementary/elm_flipselector.c
+++ b/src/lib/elementary/elm_flipselector.c
@@ -423,6 +423,92 @@ _key_action_flip(Evas_Object *obj, const char *params)
423 return EINA_TRUE; 423 return EINA_TRUE;
424} 424}
425 425
426static void
427_clear_items(Evas_Object *obj)
428{
429 ELM_FLIPSELECTOR_DATA_GET(obj, sd);
430 sd->current = NULL;
431 while(sd->items)
432 elm_object_item_del(DATA_GET(sd->items));
433}
434
435static void
436_items_add(Evas_Object *obj)
437{
438 double d;
439 char buf[16];
440
441 ELM_FLIPSELECTOR_DATA_GET(obj, sd);
442 _clear_items(obj);
443 for (d = sd->val_min; d < sd->val_max; d = d + sd->step)
444 {
445 snprintf(buf, sizeof(buf), "%.2f", d);
446 elm_flipselector_item_append(obj, buf, NULL, NULL);
447 }
448 snprintf(buf, sizeof(buf), "%.2f", sd->val_max);
449 elm_flipselector_item_append(obj, buf, NULL, NULL);
450}
451
452EOLIAN static void
453_elm_flipselector_efl_ui_spin_min_max_set(Eo *obj, Elm_Flipselector_Data *sd, double min, double max)
454{
455 if (min > max) return;
456 if ((sd->val_min == min) && (sd->val_max == max)) return;
457
458 sd->val_min = min;
459 sd->val_max = max;
460
461 _items_add(obj);
462}
463
464EOLIAN static void
465_elm_flipselector_efl_ui_spin_min_max_get(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd, double *min, double *max)
466{
467 if (min) *min = sd->val_min;
468 if (max) *max = sd->val_max;
469}
470
471EOLIAN static void
472_elm_flipselector_efl_ui_spin_step_set(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd, double step)
473{
474 if (sd->step == step) return;
475
476 sd->step = step;
477 _items_add(obj);
478}
479
480EOLIAN static double
481_elm_flipselector_efl_ui_spin_step_get(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd)
482{
483 return sd->step;
484}
485
486EOLIAN static double
487_elm_flipselector_efl_ui_spin_value_get(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd)
488{
489 if (sd->val_min == 0 && sd->val_max == 0)
490 {
491 WRN("This API can be used only if you set min and max and flipselector values are numericals");
492 return 0;
493 }
494 ELM_FLIPSELECTOR_ITEM_DATA_GET(sd->current->data, item);
495 return atof(item->label);
496}
497
498EOLIAN static void
499_elm_flipselector_efl_ui_spin_value_set(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd, double val)
500{
501 Eina_List *l;
502 Elm_Object_Item *it;
503
504 EINA_LIST_FOREACH(sd->items, l, it)
505 {
506 if (atof(elm_object_item_text_get(it)) >= val)
507 break;
508 }
509 elm_flipselector_item_selected_set(it, EINA_TRUE);
510}
511
426EOLIAN static Eina_Bool 512EOLIAN static Eina_Bool
427_elm_flipselector_elm_widget_event(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info) 513_elm_flipselector_elm_widget_event(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd EINA_UNUSED, Evas_Object *src, Evas_Callback_Type type, void *event_info)
428{ 514{
@@ -537,6 +623,7 @@ _elm_flipselector_evas_object_smart_add(Eo *obj, Elm_Flipselector_Data *priv)
537 (obj, "elm,action,down,stop", "*", _signal_val_change_stop, obj); 623 (obj, "elm,action,down,stop", "*", _signal_val_change_stop, obj);
538 624
539 priv->first_interval = FLIP_FIRST_INTERVAL; 625 priv->first_interval = FLIP_FIRST_INTERVAL;
626 priv->step = 1.0;
540 627
541 elm_widget_can_focus_set(obj, EINA_TRUE); 628 elm_widget_can_focus_set(obj, EINA_TRUE);
542 629
@@ -566,6 +653,18 @@ elm_flipselector_add(Evas_Object *parent)
566 return obj; 653 return obj;
567} 654}
568 655
656EAPI void
657elm_flipselector_first_interval_set(Evas_Object *obj, double interval)
658{
659 efl_ui_spin_interval_set(obj, interval);
660}
661
662EAPI double
663elm_flipselector_first_interval_get(const Evas_Object *obj)
664{
665 return efl_ui_spin_interval_get(obj);
666}
667
569EOLIAN static Eo * 668EOLIAN static Eo *
570_elm_flipselector_eo_base_constructor(Eo *obj, Elm_Flipselector_Data *sd) 669_elm_flipselector_eo_base_constructor(Eo *obj, Elm_Flipselector_Data *sd)
571{ 670{
@@ -767,13 +866,13 @@ _elm_flipselector_item_next_get(const Eo *eo_item,
767} 866}
768 867
769EOLIAN static void 868EOLIAN static void
770_elm_flipselector_first_interval_set(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd, double interval) 869_elm_flipselector_efl_ui_spin_interval_set(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd, double interval)
771{ 870{
772 sd->first_interval = interval; 871 sd->first_interval = interval;
773} 872}
774 873
775EOLIAN static double 874EOLIAN static double
776_elm_flipselector_first_interval_get(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd) 875_elm_flipselector_efl_ui_spin_interval_get(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd)
777{ 876{
778 return sd->first_interval; 877 return sd->first_interval;
779} 878}
diff --git a/src/lib/elementary/elm_flipselector.eo b/src/lib/elementary/elm_flipselector.eo
index ee059a2e7c..d20924fac8 100644
--- a/src/lib/elementary/elm_flipselector.eo
+++ b/src/lib/elementary/elm_flipselector.eo
@@ -1,42 +1,9 @@
1class Elm.Flipselector (Elm.Layout, Elm.Interface_Atspi_Widget_Action, 1class Elm.Flipselector (Elm.Layout, Efl.Ui.Spin,
2 Elm.Interface_Atspi_Widget_Action,
2 Evas.Selectable_Interface) 3 Evas.Selectable_Interface)
3{ 4{
4 eo_prefix: elm_obj_flipselector; 5 eo_prefix: elm_obj_flipselector;
5 methods { 6 methods {
6 @property first_interval {
7 set {
8 [[Set the interval on time updates for a user mouse button hold
9 on a flip selector widget.
10
11 This interval value is decreased while the user holds the
12 mouse pointer either flipping up or flipping down a given flip
13 selector.
14
15 This helps the user to get to a given item distant from the
16 current one easier/faster, as it will start to flip quicker and
17 quicker on mouse button holds.
18
19 The calculation for the next flip interval value, starting from
20 the one set with this call, is the previous interval divided by
21 1.05, so it decreases a little bit.
22
23 The default starting interval value for automatic flips is
24 0.85 seconds.
25
26 See also @.first_interval.get.
27 ]]
28 }
29 get {
30 [[Get the interval on time updates for an user mouse button hold
31 on a flip selector widget.
32
33 See also @.first_interval.set for more details.
34 ]]
35 }
36 values {
37 interval: double; [[The (first) interval value in seconds.]]
38 }
39 }
40 @property items { 7 @property items {
41 get { 8 get {
42 [[Get the internal list of items in a given flip selector widget. 9 [[Get the internal list of items in a given flip selector widget.
@@ -164,6 +131,10 @@ class Elm.Flipselector (Elm.Layout, Elm.Interface_Atspi_Widget_Action,
164 Elm.Widget.focus_direction_manager_is; 131 Elm.Widget.focus_direction_manager_is;
165 Elm.Widget.event; 132 Elm.Widget.event;
166 Elm.Layout.sizing_eval; 133 Elm.Layout.sizing_eval;
134 Efl.Ui.Spin.min_max;
135 Efl.Ui.Spin.step;
136 Efl.Ui.Spin.value;
137 Efl.Ui.Spin.interval;
167 Elm.Interface_Atspi_Widget_Action.elm_actions.get; 138 Elm.Interface_Atspi_Widget_Action.elm_actions.get;
168 } 139 }
169 events { 140 events {
diff --git a/src/lib/elementary/elm_flipselector_legacy.h b/src/lib/elementary/elm_flipselector_legacy.h
index a2fbd58ae0..f928d35a8d 100644
--- a/src/lib/elementary/elm_flipselector_legacy.h
+++ b/src/lib/elementary/elm_flipselector_legacy.h
@@ -11,5 +11,42 @@
11 */ 11 */
12EAPI Evas_Object *elm_flipselector_add(Evas_Object *parent); 12EAPI Evas_Object *elm_flipselector_add(Evas_Object *parent);
13 13
14/**
15 * @brief Set the interval on time updates for a user mouse button hold on a
16 * flip selector widget.
17 *
18 * This interval value is decreased while the user holds the mouse pointer
19 * either flipping up or flipping down a given flip selector.
20 *
21 * This helps the user to get to a given item distant from the current one
22 * easier/faster, as it will start to flip quicker and quicker on mouse button
23 * holds.
24 *
25 * The calculation for the next flip interval value, starting from the one set
26 * with this call, is the previous interval divided by 1.05, so it decreases a
27 * little bit.
28 *
29 * The default starting interval value for automatic flips is 0.85 seconds.
30 *
31 * See also @ref elm_obj_flipselector_first_interval_get.
32 *
33 * @param[in] interval The (first) interval value in seconds.
34 *
35 * @ingroup Elm_Flipselector
36 */
37EAPI void elm_flipselector_first_interval_set(Evas_Object *obj, double interval);
38
39/**
40 * @brief Get the interval on time updates for an user mouse button hold on a
41 * flip selector widget.
42 *
43 * See also @ref elm_obj_flipselector_first_interval_set for more details.
44 *
45 * @return The (first) interval value in seconds.
46 *
47 * @ingroup Elm_Flipselector
48 */
49EAPI double elm_flipselector_first_interval_get(const Evas_Object *obj);
50
14#include "elm_flipselector_item.eo.legacy.h" 51#include "elm_flipselector_item.eo.legacy.h"
15#include "elm_flipselector.eo.legacy.h" 52#include "elm_flipselector.eo.legacy.h"
diff --git a/src/lib/elementary/elm_spinner.c b/src/lib/elementary/elm_spinner.c
index c6bd8de1d2..bf44223a8e 100644
--- a/src/lib/elementary/elm_spinner.c
+++ b/src/lib/elementary/elm_spinner.c
@@ -1411,6 +1411,54 @@ elm_spinner_add(Evas_Object *parent)
1411 return obj; 1411 return obj;
1412} 1412}
1413 1413
1414EAPI void
1415elm_spinner_min_max_set(Evas_Object *obj, double min, double max)
1416{
1417 efl_ui_spin_min_max_set(obj, min, max);
1418}
1419
1420EAPI void
1421elm_spinner_min_max_get(const Evas_Object *obj, double *min, double *max)
1422{
1423 efl_ui_spin_min_max_get(obj, min, max);
1424}
1425
1426EAPI void
1427elm_spinner_step_set(Evas_Object *obj, double step)
1428{
1429 efl_ui_spin_step_set(obj, step);
1430}
1431
1432EAPI double
1433elm_spinner_step_get(const Evas_Object *obj)
1434{
1435 return efl_ui_spin_step_get(obj);
1436}
1437
1438EAPI void
1439elm_spinner_interval_set(Evas_Object *obj, double interval)
1440{
1441 efl_ui_spin_interval_set(obj, interval);
1442}
1443
1444EAPI double
1445elm_spinner_interval_get(const Evas_Object *obj)
1446{
1447 return efl_ui_spin_interval_get(obj);
1448}
1449
1450EAPI void
1451elm_spinner_value_set(Evas_Object *obj, double val)
1452{
1453 efl_ui_spin_value_set(obj, val);
1454}
1455
1456EAPI double
1457elm_spinner_value_get(const Evas_Object *obj)
1458{
1459 return efl_ui_spin_value_get(obj);
1460}
1461
1414EOLIAN static Eo * 1462EOLIAN static Eo *
1415_elm_spinner_eo_base_constructor(Eo *obj, Elm_Spinner_Data *_pd EINA_UNUSED) 1463_elm_spinner_eo_base_constructor(Eo *obj, Elm_Spinner_Data *_pd EINA_UNUSED)
1416{ 1464{
@@ -1454,7 +1502,7 @@ _elm_spinner_label_format_get(Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd)
1454} 1502}
1455 1503
1456EOLIAN static void 1504EOLIAN static void
1457_elm_spinner_min_max_set(Eo *obj, Elm_Spinner_Data *sd, double min, double max) 1505_elm_spinner_efl_ui_spin_min_max_set(Eo *obj, Elm_Spinner_Data *sd, double min, double max)
1458{ 1506{
1459 if ((sd->val_min == min) && (sd->val_max == max)) return; 1507 if ((sd->val_min == min) && (sd->val_max == max)) return;
1460 1508
@@ -1469,26 +1517,26 @@ _elm_spinner_min_max_set(Eo *obj, Elm_Spinner_Data *sd, double min, double max)
1469} 1517}
1470 1518
1471EOLIAN static void 1519EOLIAN static void
1472_elm_spinner_min_max_get(Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd, double *min, double *max) 1520_elm_spinner_efl_ui_spin_min_max_get(Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd, double *min, double *max)
1473{ 1521{
1474 if (min) *min = sd->val_min; 1522 if (min) *min = sd->val_min;
1475 if (max) *max = sd->val_max; 1523 if (max) *max = sd->val_max;
1476} 1524}
1477 1525
1478EOLIAN static void 1526EOLIAN static void
1479_elm_spinner_step_set(Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd, double step) 1527_elm_spinner_efl_ui_spin_step_set(Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd, double step)
1480{ 1528{
1481 sd->step = step; 1529 sd->step = step;
1482} 1530}
1483 1531
1484EOLIAN static double 1532EOLIAN static double
1485_elm_spinner_step_get(Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd) 1533_elm_spinner_efl_ui_spin_step_get(Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd)
1486{ 1534{
1487 return sd->step; 1535 return sd->step;
1488} 1536}
1489 1537
1490EOLIAN static void 1538EOLIAN static void
1491_elm_spinner_value_set(Eo *obj, Elm_Spinner_Data *sd, double val) 1539_elm_spinner_efl_ui_spin_value_set(Eo *obj, Elm_Spinner_Data *sd, double val)
1492{ 1540{
1493 if (sd->val == val) return; 1541 if (sd->val == val) return;
1494 1542
@@ -1511,7 +1559,7 @@ _elm_spinner_value_set(Eo *obj, Elm_Spinner_Data *sd, double val)
1511} 1559}
1512 1560
1513EOLIAN static double 1561EOLIAN static double
1514_elm_spinner_value_get(Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd) 1562_elm_spinner_efl_ui_spin_value_get(Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd)
1515{ 1563{
1516 return sd->val; 1564 return sd->val;
1517} 1565}
@@ -1608,13 +1656,13 @@ _elm_spinner_editable_get(Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd)
1608} 1656}
1609 1657
1610EOLIAN static void 1658EOLIAN static void
1611_elm_spinner_interval_set(Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd, double interval) 1659_elm_spinner_efl_ui_spin_interval_set(Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd, double interval)
1612{ 1660{
1613 sd->first_interval = interval; 1661 sd->first_interval = interval;
1614} 1662}
1615 1663
1616EOLIAN static double 1664EOLIAN static double
1617_elm_spinner_interval_get(Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd) 1665_elm_spinner_efl_ui_spin_interval_get(Eo *obj EINA_UNUSED, Elm_Spinner_Data *sd)
1618{ 1666{
1619 return sd->first_interval; 1667 return sd->first_interval;
1620} 1668}
diff --git a/src/lib/elementary/elm_spinner.eo b/src/lib/elementary/elm_spinner.eo
index ae39f55813..14907acfe3 100644
--- a/src/lib/elementary/elm_spinner.eo
+++ b/src/lib/elementary/elm_spinner.eo
@@ -1,46 +1,8 @@
1class Elm.Spinner (Elm.Layout, Elm.Interface_Atspi_Value, Elm.Interface_Atspi_Widget_Action) 1class Elm.Spinner (Elm.Layout, Efl.Ui.Spin,
2 Elm.Interface_Atspi_Value, Elm.Interface_Atspi_Widget_Action)
2{ 3{
3 eo_prefix: elm_obj_spinner; 4 eo_prefix: elm_obj_spinner;
4 methods { 5 methods {
5 @property min_max {
6 [[Control the minimum and maximum values for the spinner.
7
8 Define the allowed range of values to be selected by the user.
9
10 If actual value is less than $min, it will be updated to $min. If it
11 is bigger then $max, will be updated to $max. Actual value can be
12 get with @.value.get.
13
14 By default, min is equal to 0, and max is equal to 100.
15
16 Warning: Maximum must be greater than minimum.]]
17 set {
18 }
19 get {
20 }
21 values {
22 min: double; [[The minimum value.]]
23 max: double; [[The maximum value.]]
24 }
25 }
26 @property step {
27 [[Control the step used to increment or decrement the spinner value.
28
29 This value will be incremented or decremented to the displayed value.
30 It will be incremented while the user keep right or top arrow pressed,
31 and will be decremented while the user keep left or bottom arrow pressed.
32
33 The interval to increment / decrement can be set with @.interval.set.
34
35 By default step value is equal to 1.]]
36 set {
37 }
38 get {
39 }
40 values {
41 step: double; [[The step value.]]
42 }
43 }
44 @property wrap { 6 @property wrap {
45 [[Control whether the spinner should wrap when it reaches its minimum or maximum value. 7 [[Control whether the spinner should wrap when it reaches its minimum or maximum value.
46 8
@@ -74,30 +36,6 @@ class Elm.Spinner (Elm.Layout, Elm.Interface_Atspi_Value, Elm.Interface_Atspi_Wi
74 wrap: bool; [[$true to enable wrap or $false to disable it.]] 36 wrap: bool; [[$true to enable wrap or $false to disable it.]]
75 } 37 }
76 } 38 }
77 @property interval {
78 [[Control the interval on time updates for an user mouse button hold on spinner widgets' arrows.
79
80 This interval value is decreased while the user holds the
81 mouse pointer either incrementing or decrementing spinner's value.
82
83 This helps the user to get to a given value distant from the
84 current one easier/faster, as it will start to change quicker and
85 quicker on mouse button holds.
86
87 The calculation for the next change interval value, starting from
88 the one set with this call, is the previous interval divided by
89 $1.05, so it decreases a little bit.
90
91 The default starting interval value for automatic changes is
92 $0.85 seconds.]]
93 set {
94 }
95 get {
96 }
97 values {
98 interval: double; [[The (first) interval value in seconds.]]
99 }
100 }
101 @property round { 39 @property round {
102 [[Control the round value for rounding 40 [[Control the round value for rounding
103 41
@@ -155,22 +93,6 @@ class Elm.Spinner (Elm.Layout, Elm.Interface_Atspi_Value, Elm.Interface_Atspi_Wi
155 base: double; [[The base value]] 93 base: double; [[The base value]]
156 } 94 }
157 } 95 }
158 @property value {
159 [[Control the value the spinner displays.
160
161 Value will be presented on the label following format specified with
162 elm_spinner_format_set().
163
164 Warning The value must to be between min and max values. This values
165 are set by elm_spinner_min_max_set().]]
166 set {
167 }
168 get {
169 }
170 values {
171 val: double; [[The value to be displayed.]]
172 }
173 }
174 @property label_format { 96 @property label_format {
175 [[Control the format string of the displayed label. 97 [[Control the format string of the displayed label.
176 98
@@ -232,6 +154,10 @@ class Elm.Spinner (Elm.Layout, Elm.Interface_Atspi_Value, Elm.Interface_Atspi_Wi
232 Elm.Widget.on_focus; 154 Elm.Widget.on_focus;
233 Elm.Widget.event; 155 Elm.Widget.event;
234 Elm.Layout.sizing_eval; 156 Elm.Layout.sizing_eval;
157 Efl.Ui.Spin.min_max;
158 Efl.Ui.Spin.step;
159 Efl.Ui.Spin.value;
160 Efl.Ui.Spin.interval;
235 Elm.Interface_Atspi_Accessible.name.get; 161 Elm.Interface_Atspi_Accessible.name.get;
236 Elm.Interface_Atspi_Value.value_and_text.get; 162 Elm.Interface_Atspi_Value.value_and_text.get;
237 Elm.Interface_Atspi_Value.value_and_text.set; 163 Elm.Interface_Atspi_Value.value_and_text.set;
diff --git a/src/lib/elementary/elm_spinner_legacy.h b/src/lib/elementary/elm_spinner_legacy.h
index 1317e9a286..a09c19d14a 100644
--- a/src/lib/elementary/elm_spinner_legacy.h
+++ b/src/lib/elementary/elm_spinner_legacy.h
@@ -42,4 +42,156 @@ EAPI void elm_spinner_special_value_del(Evas_Object *obj, double value);
42 */ 42 */
43EAPI const char *elm_spinner_special_value_get(Evas_Object *obj, double value); 43EAPI const char *elm_spinner_special_value_get(Evas_Object *obj, double value);
44 44
45#include "elm_spinner.eo.legacy.h" \ No newline at end of file 45/**
46 * @brief Control the minimum and maximum values for the spinner.
47 *
48 * Define the allowed range of values to be selected by the user.
49 *
50 * If actual value is less than @c min, it will be updated to @c min. If it is
51 * bigger then @c max, will be updated to @c max. Actual value can be get with
52 * @ref elm_obj_spinner_value_get.
53 *
54 * By default, min is equal to 0, and max is equal to 100.
55 *
56 * @warning Maximum must be greater than minimum.
57 *
58 * @param[in] min The minimum value.
59 * @param[in] max The maximum value.
60 *
61 * @ingroup Elm_Spinner
62 */
63EAPI void elm_spinner_min_max_set(Evas_Object *obj, double min, double max);
64
65/**
66 * @brief Control the minimum and maximum values for the spinner.
67 *
68 * Define the allowed range of values to be selected by the user.
69 *
70 * If actual value is less than @c min, it will be updated to @c min. If it is
71 * bigger then @c max, will be updated to @c max. Actual value can be get with
72 * @ref elm_obj_spinner_value_get.
73 *
74 * By default, min is equal to 0, and max is equal to 100.
75 *
76 * @warning Maximum must be greater than minimum.
77 *
78 * @param[out] min The minimum value.
79 * @param[out] max The maximum value.
80 *
81 * @ingroup Elm_Spinner
82 */
83EAPI void elm_spinner_min_max_get(const Evas_Object *obj, double *min, double *max);
84
85/**
86 * @brief Control the step used to increment or decrement the spinner value.
87 *
88 * This value will be incremented or decremented to the displayed value. It
89 * will be incremented while the user keep right or top arrow pressed, and will
90 * be decremented while the user keep left or bottom arrow pressed.
91 *
92 * The interval to increment / decrement can be set with
93 * @ref elm_obj_spinner_interval_set.
94 *
95 * By default step value is equal to 1.
96 *
97 * @param[in] step The step value.
98 *
99 * @ingroup Elm_Spinner
100 */
101EAPI void elm_spinner_step_set(Evas_Object *obj, double step);
102
103/**
104 * @brief Control the step used to increment or decrement the spinner value.
105 *
106 * This value will be incremented or decremented to the displayed value. It
107 * will be incremented while the user keep right or top arrow pressed, and will
108 * be decremented while the user keep left or bottom arrow pressed.
109 *
110 * The interval to increment / decrement can be set with
111 * @ref elm_obj_spinner_interval_set.
112 *
113 * By default step value is equal to 1.
114 *
115 * @return The step value.
116 *
117 * @ingroup Elm_Spinner
118 */
119EAPI double elm_spinner_step_get(const Evas_Object *obj);
120
121/**
122 * @brief Control the interval on time updates for an user mouse button hold on
123 * spinner widgets' arrows.
124 *
125 * This interval value is decreased while the user holds the mouse pointer
126 * either incrementing or decrementing spinner's value.
127 *
128 * This helps the user to get to a given value distant from the current one
129 * easier/faster, as it will start to change quicker and quicker on mouse
130 * button holds.
131 *
132 * The calculation for the next change interval value, starting from the one
133 * set with this call, is the previous interval divided by $1.05, so it
134 * decreases a little bit.
135 *
136 * The default starting interval value for automatic changes is $0.85 seconds.
137 *
138 * @param[in] interval The (first) interval value in seconds.
139 *
140 * @ingroup Elm_Spinner
141 */
142EAPI void elm_spinner_interval_set(Evas_Object *obj, double interval);
143
144/**
145 * @brief Control the interval on time updates for an user mouse button hold on
146 * spinner widgets' arrows.
147 *
148 * This interval value is decreased while the user holds the mouse pointer
149 * either incrementing or decrementing spinner's value.
150 *
151 * This helps the user to get to a given value distant from the current one
152 * easier/faster, as it will start to change quicker and quicker on mouse
153 * button holds.
154 *
155 * The calculation for the next change interval value, starting from the one
156 * set with this call, is the previous interval divided by $1.05, so it
157 * decreases a little bit.
158 *
159 * The default starting interval value for automatic changes is $0.85 seconds.
160 *
161 * @return The (first) interval value in seconds.
162 *
163 * @ingroup Elm_Spinner
164 */
165EAPI double elm_spinner_interval_get(const Evas_Object *obj);
166
167/**
168 * @brief Control the value the spinner displays.
169 *
170 * Value will be presented on the label following format specified with
171 * elm_spinner_format_set().
172 *
173 * Warning The value must to be between min and max values. This values are set
174 * by elm_spinner_min_max_set().
175 *
176 * @param[in] val The value to be displayed.
177 *
178 * @ingroup Elm_Spinner
179 */
180EAPI void elm_spinner_value_set(Evas_Object *obj, double val);
181
182/**
183 * @brief Control the value the spinner displays.
184 *
185 * Value will be presented on the label following format specified with
186 * elm_spinner_format_set().
187 *
188 * Warning The value must to be between min and max values. This values are set
189 * by elm_spinner_min_max_set().
190 *
191 * @return The value to be displayed.
192 *
193 * @ingroup Elm_Spinner
194 */
195EAPI double elm_spinner_value_get(const Evas_Object *obj);
196
197#include "elm_spinner.eo.legacy.h"
diff --git a/src/lib/elementary/elm_widget_flipselector.h b/src/lib/elementary/elm_widget_flipselector.h
index d5ef440fda..1b8b865cff 100644
--- a/src/lib/elementary/elm_widget_flipselector.h
+++ b/src/lib/elementary/elm_widget_flipselector.h
@@ -35,6 +35,8 @@ struct _Elm_Flipselector_Data
35 35
36 unsigned int max_len; 36 unsigned int max_len;
37 double interval, first_interval; 37 double interval, first_interval;
38 double val_min, val_max;
39 double step; /**< step for the value change. 1 by default. */
38 40
39 int walking; 41 int walking;
40 Eina_Bool evaluating : 1; 42 Eina_Bool evaluating : 1;