summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-06-13 14:59:05 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-06-13 18:05:06 +0900
commitb279387843575881825543bef34f50b36f3ab3f0 (patch)
tree7696478e6f21062dee9d5cf66ba03d23251cbdd2 /src/lib/elementary
parent34b6d6d267d75a73ae0036a40105c792697bf5d1 (diff)
Efl.Ui.Slider: implement Efl.Ui.Progress.progress_min_max
and move elm_slider_min_max_set/get as legacy APIs ref T5361
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/efl_ui_slider.c16
-rw-r--r--src/lib/elementary/efl_ui_slider.eo29
-rw-r--r--src/lib/elementary/elm_slider_legacy.h34
3 files changed, 49 insertions, 30 deletions
diff --git a/src/lib/elementary/efl_ui_slider.c b/src/lib/elementary/efl_ui_slider.c
index 4264a2c..3e4b8d2 100644
--- a/src/lib/elementary/efl_ui_slider.c
+++ b/src/lib/elementary/efl_ui_slider.c
@@ -1473,7 +1473,7 @@ _efl_ui_slider_indicator_format_get(Eo *obj EINA_UNUSED, Efl_Ui_Slider_Data *sd)
1473} 1473}
1474 1474
1475EOLIAN static void 1475EOLIAN static void
1476_efl_ui_slider_min_max_set(Eo *obj, Efl_Ui_Slider_Data *sd, double min, double max) 1476_efl_ui_slider_efl_ui_progress_progress_min_max_set(Eo *obj, Efl_Ui_Slider_Data *sd, double min, double max)
1477{ 1477{
1478 if ((sd->val_min == min) && (sd->val_max == max)) return; 1478 if ((sd->val_min == min) && (sd->val_max == max)) return;
1479 sd->val_min = min; 1479 sd->val_min = min;
@@ -1485,7 +1485,7 @@ _efl_ui_slider_min_max_set(Eo *obj, Efl_Ui_Slider_Data *sd, double min, double m
1485} 1485}
1486 1486
1487EOLIAN static void 1487EOLIAN static void
1488_efl_ui_slider_min_max_get(Eo *obj EINA_UNUSED, Efl_Ui_Slider_Data *sd, double *min, double *max) 1488_efl_ui_slider_efl_ui_progress_progress_min_max_get(Eo *obj EINA_UNUSED, Efl_Ui_Slider_Data *sd, double *min, double *max)
1489{ 1489{
1490 if (min) *min = sd->val_min; 1490 if (min) *min = sd->val_min;
1491 if (max) *max = sd->val_max; 1491 if (max) *max = sd->val_max;
@@ -1688,4 +1688,16 @@ _efl_ui_slider_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UN
1688#define EFL_UI_SLIDER_EXTRA_OPS \ 1688#define EFL_UI_SLIDER_EXTRA_OPS \
1689 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_slider) 1689 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_slider)
1690 1690
1691EAPI void
1692elm_slider_min_max_set(Evas_Object *obj, double min, double max)
1693{
1694 efl_ui_progress_min_max_set(obj, min, max);
1695}
1696
1697EAPI void
1698elm_slider_min_max_get(const Evas_Object *obj, double *min, double *max)
1699{
1700 efl_ui_progress_min_max_get(obj, min, max);
1701}
1702
1691#include "efl_ui_slider.eo.c" 1703#include "efl_ui_slider.eo.c"
diff --git a/src/lib/elementary/efl_ui_slider.eo b/src/lib/elementary/efl_ui_slider.eo
index dbc8da2..31d8c50 100644
--- a/src/lib/elementary/efl_ui_slider.eo
+++ b/src/lib/elementary/efl_ui_slider.eo
@@ -59,34 +59,6 @@ class Efl.Ui.Slider (Elm.Layout, Efl.Ui.Progress,
59 let the knob always at default size.]] 59 let the knob always at default size.]]
60 } 60 }
61 } 61 }
62 @property min_max {
63 set {
64 [[Set the minimum and maximum values for the slider.
65
66 Define the allowed range of values to be selected by the user.
67
68 If actual value is less than $min, it will be updated to $min.
69 If it is bigger then $max, will be updated to $max. Actual value
70 can be get with @Efl.Ui.Progress.progress_value.get
71
72 By default, min is equal to 0.0, and max is equal to 1.0.
73
74 Warning: maximum must be greater than minimum, otherwise behavior
75 is undefined.
76 ]]
77 }
78 get {
79 [[Get the minimum and maximum values of the slider.
80
81 Note: If only one value is needed, the other pointer can be passed
82 as $null.
83 ]]
84 }
85 values {
86 min: double; [[The minimum value.]]
87 max: double; [[The maximum value.]]
88 }
89 }
90 @property indicator_show_on_focus { 62 @property indicator_show_on_focus {
91 set { 63 set {
92 [[Show the indicator of slider on focus.]] 64 [[Show the indicator of slider on focus.]]
@@ -175,6 +147,7 @@ class Efl.Ui.Slider (Elm.Layout, Efl.Ui.Progress,
175 Efl.Ui.Progress.span_size { get; set; } 147 Efl.Ui.Progress.span_size { get; set; }
176 Efl.Ui.Progress.progress_value { get; set; } 148 Efl.Ui.Progress.progress_value { get; set; }
177 Efl.Ui.Progress.unit_format { get; set; } 149 Efl.Ui.Progress.unit_format { get; set; }
150 Efl.Ui.Progress.progress_min_max {get; set; }
178 Efl.Orientation.orientation { get; set; } 151 Efl.Orientation.orientation { get; set; }
179 Elm.Interface.Atspi.Value.value_and_text { get; set; } 152 Elm.Interface.Atspi.Value.value_and_text { get; set; }
180 Elm.Interface.Atspi.Value.range { get; } 153 Elm.Interface.Atspi.Value.range { get; }
diff --git a/src/lib/elementary/elm_slider_legacy.h b/src/lib/elementary/elm_slider_legacy.h
index 9fa4546..fa9c669 100644
--- a/src/lib/elementary/elm_slider_legacy.h
+++ b/src/lib/elementary/elm_slider_legacy.h
@@ -159,4 +159,38 @@ EAPI const char *elm_slider_unit_format_get(const Evas_Object *obj);
159 */ 159 */
160EAPI void elm_slider_units_format_function_set(Evas_Object *obj, slider_func_type func, slider_freefunc_type free_func); 160EAPI void elm_slider_units_format_function_set(Evas_Object *obj, slider_func_type func, slider_freefunc_type free_func);
161 161
162/**
163 * @brief Set the minimum and maximum values for the slider.
164 *
165 * Define the allowed range of values to be selected by the user.
166 *
167 * If actual value is less than @c min, it will be updated to @c min. If it is
168 * bigger then @c max, will be updated to @c max. Actual value can be get with
169 * @ref Efl.Ui.Progress.progress_value.get
170 *
171 * By default, min is equal to 0.0, and max is equal to 1.0.
172 *
173 * @warning maximum must be greater than minimum, otherwise behavior is
174 * undefined.
175 *
176 * @param[in] min The minimum value.
177 * @param[in] max The maximum value.
178 *
179 * @ingroup Efl_Ui_Slider
180 */
181EAPI void elm_slider_min_max_set(Evas_Object *obj, double min, double max);
182
183/**
184 * @brief Get the minimum and maximum values of the slider.
185 *
186 * @note If only one value is needed, the other pointer can be passed as
187 * @c null.
188 *
189 * @param[out] min The minimum value.
190 * @param[out] max The maximum value.
191 *
192 * @ingroup Efl_Ui_Slider
193 */
194EAPI void elm_slider_min_max_get(const Evas_Object *obj, double *min, double *max);
195
162#include "efl_ui_slider.eo.legacy.h" \ No newline at end of file 196#include "efl_ui_slider.eo.legacy.h" \ No newline at end of file