}
static void
+_step_value_update(Evas_Object *obj, double step)
+{
+ double value;
+
+ EFL_UI_SLIDER_DATA_GET(obj, sd);
+
+ if (efl_ui_mirrored_get(obj) ^ efl_ui_layout_orientation_is_inverted(sd->dir))
+ step *= -1.0;
+
+ value = CLAMP(sd->val + step, sd->val_min, sd->val_max);
+ _user_value_update(obj, value);
+
+}
+
+static void
_drag_value_fetch(Evas_Object *obj)
{
EFL_UI_SLIDER_DATA_GET(obj, sd);
efl_ui_drag_step_move(efl_part(wd->resize_obj, "efl.draggable.slider"),
relative_step, relative_step);
- _drag_value_fetch(obj);
+
+ _step_value_update(obj, step);
}
static void
efl_ui_drag_step_move(efl_part(wd->resize_obj, "efl.draggable.slider"),
relative_step, relative_step);
- _drag_value_fetch(obj);
+
+ _step_value_update(obj, step);
}
static Eina_Bool
}
static void
+_user_value_update(Evas_Object *obj, double value)
+{
+ double val = value;
+
+ ELM_SLIDER_DATA_GET_OR_RETURN(obj, sd);
+
+ if (fabs(val - sd->val) > DBL_EPSILON)
+ {
+ sd->val = val;
+ sd->intvl_from = val;
+ _val_set(obj);
+
+ evas_object_smart_callback_call(obj, SIG_CHANGED, NULL);
+ ecore_timer_del(sd->delay);
+ sd->delay = ecore_timer_add(SLIDER_DELAY_CHANGED_INTERVAL, _delay_change, obj);
+ }
+}
+
+static void
+_step_value_update(Evas_Object *obj, double step)
+{
+ double value, absolute_step;
+
+ ELM_SLIDER_DATA_GET(obj, sd);
+
+ if (efl_ui_mirrored_get(obj) ^ efl_ui_layout_orientation_is_inverted(sd->dir))
+ step *= -1.0;
+
+ absolute_step = step * (sd->val_max - sd->val_min);
+ value = CLAMP(sd->val + absolute_step, sd->val_min, sd->val_max);
+ _user_value_update(obj, value);
+}
+
+static void
_val_fetch(Evas_Object *obj, Eina_Bool user_event)
{
double posx = 0.0, posy = 0.0, pos = 0.0, val;
ELM_WIDGET_DATA_GET_OR_RETURN(data, wd);
efl_ui_drag_step_move(efl_part(wd->resize_obj, "elm.dragable.slider"),
step, step);
+
+ _step_value_update(data, step);
}
static void
ELM_WIDGET_DATA_GET_OR_RETURN(data, wd);
efl_ui_drag_step_move(efl_part(wd->resize_obj, "elm.dragable.slider"),
step, step);
+
+ _step_value_update(data, step);
}
static Eina_Bool