static int slider_level2 = 2;
static int slider_level_rest = 3;
static int slider_center = 4;
-static int slider_handle = 5;
-static int slider_handle_pressed = 6;
static void
slider_del_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj,
}
static void
-slider_vg_handle_normal_resize_cb(void *data , Evas *e EINA_UNUSED,
- Evas_Object *obj EINA_UNUSED,
- void *event_info EINA_UNUSED)
-{
- Evas_Coord w, h;
- vg_slider *vd = data;
- evas_object_geometry_get(vd->vg[slider_handle], NULL, NULL, &w, &h);
- _append_circle(vd->shape[slider_handle], w/2, h/2, w/2);
-}
-
-static void
-slider_vg_handle_pressed_resize_cb(void *data , Evas *e EINA_UNUSED,
- Evas_Object *obj EINA_UNUSED,
- void *event_info EINA_UNUSED)
-{
- Evas_Coord w, h;
- vg_slider *vd = data;
- evas_object_geometry_get(vd->vg[slider_handle_pressed], NULL, NULL, &w, &h);
- if (w == h)
- _append_circle(vd->shape[slider_handle_pressed], w/2, h/2, w/2);
- else
- {
- if (elm_slider_indicator_show_get(vd->obj) &&
- elm_slider_indicator_format_get(vd->obj))
- _append_round_rect(vd->shape[slider_handle_pressed], w, h);
- else
- _append_circle(vd->shape[slider_handle_pressed], w/2, h - w/2, w/2);
- }
-}
-
-static void
slider_base_resize_cb(void *data , Evas *e EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
Efl_VG *root;
int i;
Evas *e = evas_object_evas_get(vd->obj);
- for(i=0; i < 7; i++)
+ for(i=0; i < 5; i++)
{
vd->vg[i] = evas_object_vg_add(e);
root = evas_object_vg_root_node_get(vd->vg[i]);
evas_object_event_callback_add(vd->vg[slider_center], EVAS_CALLBACK_RESIZE,
slider_center_resize_cb, vd);
elm_object_part_content_set(vd->obj, "elm.swallow.tizen_vg_shape5", vd->vg[slider_center]);
-
- // slider handle
- evas_object_event_callback_add(vd->vg[slider_handle], EVAS_CALLBACK_RESIZE,
- slider_vg_handle_normal_resize_cb, vd);
- evas_object_event_callback_add(vd->vg[slider_handle_pressed], EVAS_CALLBACK_RESIZE,
- slider_vg_handle_pressed_resize_cb, vd);
- elm_object_part_content_set(vd->obj, "elm.dragable.slider:elm.swallow.tizen_vg_shape1", vd->vg[slider_handle]);
- if (vd->popup)
- {
- edje_object_part_swallow(vd->popup, "elm.swallow.tizen_vg_shape2", vd->vg[slider_handle_pressed]);
- elm_widget_sub_object_add(vd->obj, vd->vg[slider_handle_pressed]);
- }
}
void