3 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
7 #include <Elementary.h>
11 * @defgroup Imageslider Imageslider
14 * By flicking images on the screen,
15 * you can see the images in specific path.
18 typedef struct _Widget_Data Widget_Data;
20 #define ANI_STEP (14 * elm_scale_get())
21 #define ANI_TIME (0.005)
22 #define ANI_TIME_MSEC (12)
23 #define CLICK_TIME_MAX (180)
24 #define CLICK_WIDTH_MIN (elm_finger_size_get() >> 1)
25 #define FLICK_TIME_MAX (200)
26 #define FLICK_WIDTH_MIN (elm_finger_size_get() >> 2)
28 #define STEP_WEIGHT_DEF (1)
29 #define STEP_WEIGHT_MAX (2)
30 #define STEP_WEIGHT_MIN (0)
31 #define MOVING_IMAGE_SIZE (128)
32 #define MAX_ZOOM_SIZE (6)
33 #define INTERVAL_WIDTH (15)
34 #define MULTITOUCHDEVICE (11)
36 // Enumeration for layout.
46 struct _Imageslider_Item
49 const char *photo_file;
50 void (*func) (void *data, Evas_Object *obj, void *event_info);
54 // Image Slider Widget Data.
57 Evas_Object *ly[BLOCK_MAX];
61 Evas_Coord x, y, w, h;
63 Ecore_Idler *queue_idler;
64 Ecore_Timer *anim_timer;
66 Evas_Coord_Point down_pos;
71 unsigned int timestamp;
78 // Global value declaration.
79 static const char *widtype = NULL;
81 static const char SIG_CLICKED[] = "clicked";
83 // Internal function declaration.
84 static void _del_hook(Evas_Object *obj);
86 static void _theme_hook(Evas_Object *obj);
88 static void _sizing_eval(Evas_Object *obj);
90 static void _imageslider_move(void *data, Evas * e, Evas_Object *obj, void *event_info);
91 static void _imageslider_resize(void *data, Evas * e, Evas_Object *obj, void *event_info);
92 static void _imageslider_show(void *data, Evas * e, Evas_Object *obj, void *event_info);
93 static void _imageslider_hide(void *data, Evas * e, Evas_Object *obj, void *event_info);
94 static void _imageslider_update(Widget_Data * wd);
96 static void _imageslider_update_pos(Widget_Data * wd, Evas_Coord x, Evas_Coord y, Evas_Coord w);
98 static void _imageslider_obj_shift(Widget_Data * wd, Eina_Bool left);
100 static void _imageslider_obj_move(Widget_Data * wd, Evas_Coord step);
102 static Eina_Bool _icon_to_image(void *data);
104 static int _check_drag(int state, void *data);
106 static void _anim(Widget_Data * wd);
108 static Eina_Bool _timer_cb(void *data);
110 static void _ev_imageslider_down_cb(void *data, Evas * e, Evas_Object *obj, void *event_info);
111 static void _ev_imageslider_up_cb(void *data, Evas * e, Evas_Object *obj, void *event_info);
112 static void _ev_imageslider_move_cb(void *data, Evas * e, Evas_Object *obj, void *event_info);
114 // Whenever the Image Slider item is deleted, Call this funtion.
116 _del_hook(Evas_Object *obj)
120 wd = elm_widget_data_get(obj);
126 eina_list_free(wd->its);
132 ecore_idler_del(wd->queue_idler);
133 wd->queue_idler = NULL;
138 ecore_timer_del(wd->anim_timer);
139 wd->anim_timer = NULL;
146 // Whenever require processing theme, Call this function
148 _theme_hook(Evas_Object *obj)
151 Widget_Data *wd = elm_widget_data_get(obj);
155 for (i = 0; i < BLOCK_MAX; i++)
158 elm_layout_theme_set(wd->ly[i], "imageslider", "base",
159 elm_object_style_get(obj));
160 evas_object_show(wd->ly[i]);
162 _imageslider_update(wd);
166 // Resize Image Slider item.
168 _sizing_eval(Evas_Object *obj)
172 Widget_Data *wd = elm_widget_data_get(obj);
177 e = evas_object_evas_get(wd->obj);
179 _imageslider_move(obj, e, obj, NULL);
180 _imageslider_resize(obj, e, obj, NULL);
184 // Whenever MOVE event occurs, Call this function.
186 _imageslider_move(void *data, Evas * e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
195 wd = elm_widget_data_get((Evas_Object *) data);
199 evas_object_geometry_get(obj, &x, &y, NULL, NULL);
203 _imageslider_update_pos(wd, wd->x, wd->y, wd->w);
207 // Whenever RESIZE event occurs, Call this fucntion.
209 _imageslider_resize(void *data, Evas * e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
220 wd = elm_widget_data_get((Evas_Object *) data);
224 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
225 DBG("%d %d -resize\n", w, h);
229 for (i = 0; i < BLOCK_MAX; i++)
231 evas_object_resize(wd->ly[i], w, h);
234 _imageslider_update_pos(wd, wd->x, wd->y, wd->w);
238 // Whenever SHOW event occurs, Call this function.
240 _imageslider_show(void *data, Evas * e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
249 wd = elm_widget_data_get((Evas_Object *) data);
252 evas_object_show(wd->clip);
255 // Whenever HIDE event occurs, Call this function.
257 _imageslider_hide(void *data, Evas * e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
263 wd = elm_widget_data_get((Evas_Object *) data);
265 evas_object_hide(wd->clip);
268 // Update Image Slider item position.
270 _imageslider_update_pos(Widget_Data * wd, Evas_Coord x, Evas_Coord y, Evas_Coord w)
272 evas_object_move(wd->ly[BLOCK_LEFT], x - (w + INTERVAL_WIDTH), y);
273 evas_object_move(wd->ly[BLOCK_CENTER], x, y);
274 evas_object_move(wd->ly[BLOCK_RIGHT], x + (w + INTERVAL_WIDTH), y);
277 // Shift next/previous Image Slider item in layouts.
279 _imageslider_obj_shift(Widget_Data * wd, Eina_Bool left)
283 Evas_Object *ly_temp;
284 ly_temp = wd->ly[BLOCK_LEFT];
285 wd->ly[BLOCK_LEFT] = wd->ly[BLOCK_CENTER];
286 wd->ly[BLOCK_CENTER] = wd->ly[BLOCK_RIGHT];
287 wd->ly[BLOCK_RIGHT] = ly_temp;
288 elm_layout_content_set(wd->ly[BLOCK_RIGHT], "swl.photo", NULL);
292 Evas_Object *ly_temp;
293 ly_temp = wd->ly[BLOCK_RIGHT];
294 wd->ly[BLOCK_RIGHT] = wd->ly[BLOCK_CENTER];
295 wd->ly[BLOCK_CENTER] = wd->ly[BLOCK_LEFT];
296 wd->ly[BLOCK_LEFT] = ly_temp;
297 elm_layout_content_set(wd->ly[BLOCK_LEFT], "swl.photo", NULL);
301 // Move the current Image Slider item and update.
303 _imageslider_obj_move(Widget_Data * wd, Evas_Coord step)
307 wd->cur = eina_list_next(wd->cur);
310 wd->cur = eina_list_last(wd->its);
315 wd->step = -ANI_STEP;
317 _imageslider_obj_shift(wd, EINA_FALSE);
319 wd->moving = EINA_TRUE;
323 wd->cur = eina_list_prev(wd->cur);
327 wd->step = -ANI_STEP;
333 _imageslider_obj_shift(wd, EINA_TRUE);
335 wd->moving = EINA_TRUE;
342 wd->step = -ANI_STEP;
343 wd->moving = EINA_FALSE;
346 _imageslider_update(wd);
349 // Whenever MOUSE DOWN event occurs, Call this function.
351 _ev_imageslider_down_cb(void *data, Evas * e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
353 Widget_Data *wd = data;
354 Evas_Event_Mouse_Down *ev = event_info;
359 wd->down_pos = ev->canvas;
360 wd->timestamp = ev->timestamp;
361 wd->move_cnt = MOVE_STEP;
364 // Whenever MOUSE UP event occurs, Call this function.
365 // And make Click Event also.
367 _ev_imageslider_up_cb(void *data, Evas * e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
369 Widget_Data *wd = data;
371 Evas_Event_Mouse_Up *ev = event_info;
377 if (wd->ani_lock) return;
379 step = wd->down_pos.x - ev->canvas.x;
380 interval = ev->timestamp - wd->timestamp;
381 if (step == 0 || interval == 0)
383 DBG("case1: emit CLICK event\n");
384 evas_object_smart_callback_call(wd->obj, SIG_CLICKED, NULL);
387 if (interval < CLICK_TIME_MAX)
389 if (step < CLICK_WIDTH_MIN && step > CLICK_WIDTH_MIN)
391 DBG("case2: emit CLICK event\n");
392 evas_object_smart_callback_call(wd->obj, SIG_CLICKED, NULL);
397 if (interval < FLICK_TIME_MAX)
399 if (step < FLICK_WIDTH_MIN && step > FLICK_WIDTH_MIN)
401 DBG("ev_imageslider_up_cb-black zone (1)\n");
403 _imageslider_obj_move(wd, 0);
407 DBG("ev_imageslider_up_cb-black zone (2)\n");
409 _imageslider_obj_move(wd, step);
415 step = (wd->x - wd->move_x) << 1;
416 if (step <= wd->w && step >= -(wd->w))
418 DBG("ev_imageslider_up_cb-white zone (1)\n");
420 _imageslider_obj_move(wd, 0);
424 DBG("ev_imageslider_up_cb-white zone (2)\n");
426 _imageslider_obj_move(wd, step);
431 // Whenever MOUSE MOVE event occurs, Call this
433 _ev_imageslider_move_cb(void *data, Evas * e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
437 Widget_Data *wd = data;
438 Evas_Event_Mouse_Move *ev = event_info;
440 if (wd->ani_lock) return;
441 if (wd->move_cnt == MOVE_STEP)
447 step = ev->cur.canvas.x - wd->down_pos.x;
452 wd->move_x = wd->x + ((ev->cur.canvas.x - wd->down_pos.x));
453 wd->move_y = wd->y + ((ev->cur.canvas.y - wd->down_pos.y));
454 _imageslider_update_pos(wd, wd->move_x, wd->y, wd->w);
461 time_get(Evas_Coord x, Evas_Coord w)
465 time = (-sin(x / w) + 1) / 500;
474 _icon_to_image(void *data)
476 Widget_Data *wd = data;
479 _imageslider_update(wd);
482 wd->queue_idler = NULL;
483 return ECORE_CALLBACK_CANCEL;
487 _check_drag(int state, void *data)
489 Widget_Data *wd = data;
491 Elm_Imageslider_Item *it;
493 Evas_Coord ix = 0, iy = 0, iw = 0, ih = 0;
495 double dx = 0, dy = 0;
497 Eina_List *l[BLOCK_MAX];
499 Evas_Object *eo = NULL;
501 l[BLOCK_LEFT] = eina_list_prev(wd->cur);
502 l[BLOCK_CENTER] = wd->cur;
503 l[BLOCK_RIGHT] = eina_list_next(wd->cur);
505 it = eina_list_data_get(l[state]);
507 eo = (Evas_Object*)elm_layout_content_get(wd->ly[state], "swl.photo");
509 evas_object_geometry_get(eo, &ix, &iy, &iw, &ih);
510 edje_object_part_drag_value_get(elm_layout_edje_get(wd->ly[state]), "swl.photo", &dx, &dy);
512 if ((iw != wd->w) || ((dx != 0) || (dy != 0)))
514 elm_layout_content_set(wd->ly[state], "swl.photo", NULL);
523 _timer_cb(void *data)
527 Elm_Imageslider_Item *it;
538 wd->anim_timer = NULL;
539 return ECORE_CALLBACK_CANCEL;
541 gettimeofday(&tv, NULL);
543 t = (tv.tv_sec - wd->tv.tv_sec) * 1000 + (tv.tv_usec - wd->tv.tv_usec) / 1000;
544 gettimeofday(&wd->tv, NULL);
546 t = t / ANI_TIME_MSEC;
547 if (t <= STEP_WEIGHT_MIN)
549 else if (t > STEP_WEIGHT_MAX)
552 wd->move_x += (wd->step) * t;
554 if (wd->step < 0 && wd->move_x < wd->x)
556 else if (wd->step > 0 && wd->move_x > wd->x)
559 _imageslider_update_pos(wd, wd->move_x, wd->y, wd->w);
561 if (wd->move_x == wd->x)
563 wd->ani_lock = EINA_FALSE;
566 it = eina_list_data_get(wd->cur);
568 it->func(it->data, wd->obj, it);
572 it = eina_list_data_get(wd->cur);
573 evas_object_smart_callback_call(wd->obj, "changed", it);
576 ret = _check_drag(BLOCK_LEFT, wd);
577 ret = _check_drag(BLOCK_RIGHT, wd);
579 if (!wd->queue_idler)
580 wd->queue_idler = ecore_idler_add(_icon_to_image, wd);
583 wd->anim_timer = NULL;
585 return ECORE_CALLBACK_CANCEL;
588 return ECORE_CALLBACK_RENEW;
592 _anim(Widget_Data * wd)
596 if (wd->x == wd->move_x)
598 _imageslider_update_pos(wd, wd->move_x, wd->y, wd->w);
602 wd->ani_lock = EINA_TRUE;
605 gettimeofday(&wd->tv, NULL);
608 wd->anim_timer = ecore_timer_add(ANI_TIME, _timer_cb, wd);
611 // Update Image Slider Items.
613 _imageslider_update(Widget_Data * wd)
617 Eina_List *l[BLOCK_MAX];
619 Elm_Imageslider_Item *it;
625 if (!wd->cur) return;
627 l[BLOCK_LEFT] = eina_list_prev(wd->cur);
628 l[BLOCK_CENTER] = wd->cur;
629 l[BLOCK_RIGHT] = eina_list_next(wd->cur);
631 for (i = 0; i < BLOCK_MAX; i++)
633 eo = (Evas_Object*)elm_layout_content_get((const Evas_Object*)wd->ly[i], "swl.photo");
636 elm_layout_content_set(wd->ly[i], "swl.photo", NULL);
640 it = eina_list_data_get(l[i]);
646 eo = elm_image_add(wd->obj);
647 //elm_image_prescale_set(eo, wd->w);
648 elm_image_file_set(eo, it->photo_file, NULL);
649 elm_layout_content_set(wd->ly[i], "swl.photo", eo);
657 * Add an Image Slider widget
659 * @param parent The parent object
660 * @return The new Image slider object or NULL if it cannot be created
662 * @ingroup Imageslider
665 elm_imageslider_add(Evas_Object *parent)
673 ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
675 ELM_SET_WIDTYPE(widtype, "imageslider");
676 elm_widget_type_set(obj, "imageslider");
677 elm_widget_sub_object_add(parent, obj);
678 elm_widget_data_set(obj, wd);
679 elm_widget_del_hook_set(obj, _del_hook);
680 elm_widget_theme_hook_set(obj, _theme_hook);
682 wd->clip = evas_object_rectangle_add(e);
683 elm_widget_sub_object_add(obj, wd->clip);
684 elm_widget_resize_object_set(obj, wd->clip);
686 for (i = 0; i < BLOCK_MAX; i++)
688 wd->ly[i] = elm_layout_add(obj);
689 elm_layout_theme_set(wd->ly[i], "imageslider", "base", "default");
690 elm_widget_sub_object_add(obj, wd->ly[i]);
691 evas_object_smart_member_add(wd->ly[i], obj);
693 evas_object_event_callback_add(wd->ly[i], EVAS_CALLBACK_MOUSE_DOWN, _ev_imageslider_down_cb, wd);
694 evas_object_event_callback_add(wd->ly[i], EVAS_CALLBACK_MOUSE_UP, _ev_imageslider_up_cb, wd);
695 evas_object_event_callback_add(wd->ly[i], EVAS_CALLBACK_MOUSE_MOVE, _ev_imageslider_move_cb, wd);
696 evas_object_clip_set(wd->ly[i], wd->clip);
697 evas_object_show(wd->ly[i]);
701 evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _imageslider_resize, obj);
702 evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE, _imageslider_move, obj);
703 evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _imageslider_show, obj);
704 evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _imageslider_hide, obj);
711 * Append an Image Slider item
713 * @param obj The Image Slider object
714 * @param photo_file photo file path
715 * @param func callback function
716 * @param data callback data
717 * @return The Image Slider item handle or NULL
719 * @ingroup Imageslider
721 EAPI Elm_Imageslider_Item *
722 elm_imageslider_item_append(Evas_Object *obj, const char *photo_file, Elm_Imageslider_Cb func, void *data)
724 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
727 Elm_Imageslider_Item *it;
729 if (!obj || !(wd = elm_widget_data_get(obj)))
732 it = (Elm_Imageslider_Item *) calloc(1, sizeof(Elm_Imageslider_Item));
735 it->photo_file = eina_stringshare_add(photo_file);
739 wd->its = eina_list_append(wd->its, it);
743 _imageslider_update(wd);
748 * Insert an Image Slider item into the Image Slider Widget by using the given index.
750 * @param obj The Image Slider object
751 * @param photo_file photo file path
752 * @param func callback function
753 * @param index required position
754 * @param data callback data
755 * @return The Image Slider item handle or NULL
757 * @ingroup Imageslider
759 EAPI Elm_Imageslider_Item *
760 elm_imageslider_item_append_relative(Evas_Object *obj, const char *photo_file, Elm_Imageslider_Cb func, unsigned int index, void *data)
762 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
765 Elm_Imageslider_Item *it;
767 DBG("New elm_imageslider_item_append_relative()\n");
769 if (!obj || !(wd = elm_widget_data_get(obj)))
772 it = (Elm_Imageslider_Item *) calloc(1, sizeof(Elm_Imageslider_Item));
777 it->photo_file = eina_stringshare_add(photo_file);
781 wd->its = eina_list_append_relative(wd->its, it, eina_list_nth(wd->its,
786 _imageslider_update(wd);
791 * Prepend Image Slider item
793 * @param obj The Image Slider object
794 * @param photo_file photo file path
795 * @param func callback function
796 * @param data callback data
797 * @return The imageslider item handle or NULL
799 * @ingroup Imageslider
801 EAPI Elm_Imageslider_Item *
802 elm_imageslider_item_prepend(Evas_Object *obj, const char *photo_file, Elm_Imageslider_Cb func, void *data)
804 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
807 Elm_Imageslider_Item *it;
809 if (!obj || !(wd = elm_widget_data_get(obj)))
812 it = (Elm_Imageslider_Item *) calloc(1, sizeof(Elm_Imageslider_Item));
813 it->photo_file = eina_stringshare_add(photo_file);
817 wd->its = eina_list_prepend(wd->its, it);
820 _imageslider_update(wd);
825 * Delete the selected Image Slider item
827 * @param it The selected Image Slider item handle
829 * @ingroup Imageslider
832 elm_imageslider_item_del(Elm_Imageslider_Item * it)
836 Elm_Imageslider_Item *_it;
840 if (!it || !(wd = elm_widget_data_get(it->obj)))
843 EINA_LIST_FOREACH(wd->its, l, _it)
848 wd->cur = eina_list_prev(wd->cur);
849 wd->its = eina_list_remove(wd->its, it);
855 _imageslider_update(wd);
859 * Get the selected Image Slider item
861 * @param obj The Image Slider object
862 * @return The selected Image Slider item or NULL
864 * @ingroup Imageslider
866 EAPI Elm_Imageslider_Item *
867 elm_imageslider_selected_item_get(Evas_Object *obj)
869 ELM_CHECK_WIDTYPE(obj, widtype) NULL;
872 if (!obj || (!(wd = elm_widget_data_get(obj))))
878 return eina_list_data_get(wd->cur);
882 * Get whether an Image Slider item is selected or not
884 * @param it the selected Image Slider item
885 * @return EINA_TRUE or EINA_FALSE
887 * @ingroup Imageslider
890 elm_imageslider_item_selected_get(Elm_Imageslider_Item * it)
894 if (!it || !it->obj || (!(wd = elm_widget_data_get(it->obj))))
900 if (eina_list_data_get(wd->cur) == it)
907 * Set the selected Image Slider item
909 * @param it The Imaga Slider item
911 * @ingroup Imageslider
914 elm_imageslider_item_selected_set(Elm_Imageslider_Item * it)
920 Elm_Imageslider_Item *_it;
926 if (!it || !it->obj || (!(wd = elm_widget_data_get(it->obj))))
929 EINA_LIST_FOREACH(wd->its, l, _it)
935 for (i = 0; i < BLOCK_MAX; i++)
937 eo = (Evas_Object*)elm_layout_content_get(wd->ly[i], "swl.photo");
939 elm_layout_content_set(wd->ly[i], "swl.photo", NULL);
941 _imageslider_update(wd);
945 * Get the photo file path of given Image Slider item
947 * @param it The Image Slider item
948 * @return The photo file path or NULL;
950 * @ingroup Imageslider
953 elm_imageslider_item_photo_file_get(Elm_Imageslider_Item * it)
955 if (!it) return NULL;
957 return it->photo_file;
961 * Sets the photo file path of given Image Slider item
963 * @param it The Image Slider item
964 * @param photo_file The photo file path or NULL;
966 * @ingroup Imageslider
969 elm_imageslider_item_photo_file_set(Elm_Imageslider_Item *it, const char *photo_file)
972 ELM_CHECK_WIDTYPE(it->obj, widtype);
976 eina_stringshare_replace(&(it->photo_file), photo_file);
977 elm_imageslider_item_update(it);
982 * Get the previous Image Slider item
984 * @param it The Image Slider item
985 * @return The previous Image Slider item or NULL
987 * @ingroup Imageslider
989 EAPI Elm_Imageslider_Item *
990 elm_imageslider_item_prev(Elm_Imageslider_Item * it)
994 Elm_Imageslider_Item *_it;
998 if (!it || (!(wd = elm_widget_data_get(it->obj))))
1001 EINA_LIST_FOREACH(wd->its, l, _it)
1005 l = eina_list_prev(l);
1008 return eina_list_data_get(l);
1015 * Get the next Image Slider item
1017 * @param it The Image Slider item
1018 * @return The next Image Slider item or NULL
1020 * @ingroup Imageslider
1022 EAPI Elm_Imageslider_Item *
1023 elm_imageslider_item_next(Elm_Imageslider_Item * it)
1027 Elm_Imageslider_Item *_it;
1031 if (!it || (!(wd = elm_widget_data_get(it->obj))))
1034 EINA_LIST_FOREACH(wd->its, l, _it)
1038 l = eina_list_next(l);
1041 return eina_list_data_get(l);
1048 * Move to the previous Image Slider item
1050 * @param obj The Image Slider object
1052 * @ingroup Imageslider
1055 elm_imageslider_prev(Evas_Object *obj)
1057 ELM_CHECK_WIDTYPE(obj, widtype);
1060 if (!obj || (!(wd = elm_widget_data_get(obj))))
1064 _imageslider_obj_move(wd, -1);
1068 * Move to the next Image Slider item
1070 * @param obj The Image Slider object
1072 * @ingroup Imageslider
1075 elm_imageslider_next(Evas_Object * obj)
1077 ELM_CHECK_WIDTYPE(obj, widtype);
1080 if (!obj || (!(wd = elm_widget_data_get(obj))))
1084 _imageslider_obj_move(wd, 1);
1088 * Updates an Image Slider item
1090 * @param it The Image Slider item
1092 * @ingroup Imageslider
1095 elm_imageslider_item_update(Elm_Imageslider_Item *it)
1099 if (!it || (!(wd = elm_widget_data_get(it->obj)))) return;
1100 ELM_CHECK_WIDTYPE(it->obj, widtype);
1102 if (wd->ani_lock) return;
1103 if (it == eina_list_data_get(eina_list_prev(wd->cur)))
1104 elm_layout_content_set(wd->ly[BLOCK_LEFT], "swl.photo", NULL);
1105 else if (it == eina_list_data_get(wd->cur))
1106 elm_layout_content_set(wd->ly[BLOCK_CENTER], "swl.photo", NULL);
1107 else if (it == eina_list_data_get(eina_list_next(wd->cur)))
1108 elm_layout_content_set(wd->ly[BLOCK_RIGHT], "swl.photo", NULL);
1109 _imageslider_update(wd);