Efl.Ui.Slider: implement Efl.Ui.Progress.progress_min_max
authorAmitesh Singh <amitesh.sh@samsung.com>
Tue, 13 Jun 2017 05:59:05 +0000 (14:59 +0900)
committerAmitesh Singh <amitesh.sh@samsung.com>
Tue, 13 Jun 2017 09:05:06 +0000 (18:05 +0900)
and move elm_slider_min_max_set/get as legacy APIs

ref T5361

src/lib/elementary/efl_ui_slider.c
src/lib/elementary/efl_ui_slider.eo
src/lib/elementary/elm_slider_legacy.h

index 4264a2c..3e4b8d2 100644 (file)
@@ -1473,7 +1473,7 @@ _efl_ui_slider_indicator_format_get(Eo *obj EINA_UNUSED, Efl_Ui_Slider_Data *sd)
 }
 
 EOLIAN static void
-_efl_ui_slider_min_max_set(Eo *obj, Efl_Ui_Slider_Data *sd, double min, double max)
+_efl_ui_slider_efl_ui_progress_progress_min_max_set(Eo *obj, Efl_Ui_Slider_Data *sd, double min, double max)
 {
    if ((sd->val_min == min) && (sd->val_max == max)) return;
    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
 }
 
 EOLIAN static void
-_efl_ui_slider_min_max_get(Eo *obj EINA_UNUSED, Efl_Ui_Slider_Data *sd, double *min, double *max)
+_efl_ui_slider_efl_ui_progress_progress_min_max_get(Eo *obj EINA_UNUSED, Efl_Ui_Slider_Data *sd, double *min, double *max)
 {
    if (min) *min = sd->val_min;
    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
 #define EFL_UI_SLIDER_EXTRA_OPS \
    EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_slider)
 
+EAPI void
+elm_slider_min_max_set(Evas_Object *obj, double min, double max)
+{
+   efl_ui_progress_min_max_set(obj, min, max);
+}
+
+EAPI void
+elm_slider_min_max_get(const Evas_Object *obj, double *min, double *max)
+{
+   efl_ui_progress_min_max_get(obj, min, max);
+}
+
 #include "efl_ui_slider.eo.c"
index dbc8da2..31d8c50 100644 (file)
@@ -59,34 +59,6 @@ class Efl.Ui.Slider (Elm.Layout, Efl.Ui.Progress,
                           let the knob always at default size.]]
          }
       }
-      @property min_max {
-         set {
-            [[Set the minimum and maximum values for the slider.
-
-              Define the allowed range of values to be selected by the user.
-
-              If actual value is less than $min, it will be updated to $min.
-              If it is bigger then $max, will be updated to $max. Actual value
-              can be get with @Efl.Ui.Progress.progress_value.get
-
-              By default, min is equal to 0.0, and max is equal to 1.0.
-
-              Warning: maximum must be greater than minimum, otherwise behavior
-              is undefined.
-            ]]
-         }
-         get {
-            [[Get the minimum and maximum values of the slider.
-
-              Note: If only one value is needed, the other pointer can be passed
-              as $null.
-            ]]
-         }
-         values {
-            min: double; [[The minimum value.]]
-            max: double; [[The maximum value.]]
-         }
-      }
       @property indicator_show_on_focus {
          set {
             [[Show the indicator of slider on focus.]]
@@ -175,6 +147,7 @@ class Efl.Ui.Slider (Elm.Layout, Efl.Ui.Progress,
       Efl.Ui.Progress.span_size { get; set; }
       Efl.Ui.Progress.progress_value { get; set; }
       Efl.Ui.Progress.unit_format { get; set; }
+      Efl.Ui.Progress.progress_min_max {get; set; }
       Efl.Orientation.orientation { get; set; }
       Elm.Interface.Atspi.Value.value_and_text { get; set; }
       Elm.Interface.Atspi.Value.range { get; }
index 9fa4546..fa9c669 100644 (file)
@@ -159,4 +159,38 @@ EAPI const char *elm_slider_unit_format_get(const Evas_Object *obj);
  */
 EAPI void elm_slider_units_format_function_set(Evas_Object *obj, slider_func_type func, slider_freefunc_type free_func);
 
+/**
+ * @brief Set the minimum and maximum values for the slider.
+ *
+ * Define the allowed range of values to be selected by the user.
+ *
+ * If actual value is less than @c min, it will be updated to @c min. If it is
+ * bigger then @c max, will be updated to @c max. Actual value can be get with
+ * @ref Efl.Ui.Progress.progress_value.get
+ *
+ * By default, min is equal to 0.0, and max is equal to 1.0.
+ *
+ * @warning maximum must be greater than minimum, otherwise behavior is
+ * undefined.
+ *
+ * @param[in] min The minimum value.
+ * @param[in] max The maximum value.
+ *
+ * @ingroup Efl_Ui_Slider
+ */
+EAPI void elm_slider_min_max_set(Evas_Object *obj, double min, double max);
+
+/**
+ * @brief Get the minimum and maximum values of the slider.
+ *
+ * @note If only one value is needed, the other pointer can be passed as
+ * @c null.
+ *
+ * @param[out] min The minimum value.
+ * @param[out] max The maximum value.
+ *
+ * @ingroup Efl_Ui_Slider
+ */
+EAPI void elm_slider_min_max_get(const Evas_Object *obj, double *min, double *max);
+
 #include "efl_ui_slider.eo.legacy.h"
\ No newline at end of file