forked from enlightenment/efl
Efl.Ui.Slider: implement Efl.Ui.Progress.progress_min_max
and move elm_slider_min_max_set/get as legacy APIs ref T5361
This commit is contained in:
parent
34b6d6d267
commit
b279387843
|
@ -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"
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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"
|
Loading…
Reference in New Issue