summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHosang Kim <hosang12.kim@samsung.com>2014-03-24 17:35:07 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-03-24 17:35:07 +0900
commitdb00f2e93c12deb56f813087deadc14e1c89147a (patch)
tree990f2590bbbaedcf771dbd5b632544752b8d012f
parentadcc0256c2b79a061a697e5e7c1b8fedd5082b10 (diff)
list: Add item loop feature
Summary: If item loop feature is enabled, item is moved infinitely. 1. add new widget api - item_loop_enabled 2. add smart event using new config - elm_list.c 3. add demo - test_list.c/list_focus Reviewers: seoz, woohyun, raster, jaehwan, Hermet CC: singh.amitesh, c Differential Revision: https://phab.enlightenment.org/D619
-rw-r--r--data/themes/edc/elm/scroller.edc72
-rw-r--r--src/bin/test_list.c23
-rw-r--r--src/lib/elm_list.c155
-rw-r--r--src/lib/elm_main.c15
-rw-r--r--src/lib/elm_scroll.h29
-rw-r--r--src/lib/elm_widget.c12
-rw-r--r--src/lib/elm_widget.eo11
-rw-r--r--src/lib/elm_widget.h23
-rw-r--r--src/lib/elm_widget_list.h1
9 files changed, 338 insertions, 3 deletions
diff --git a/data/themes/edc/elm/scroller.edc b/data/themes/edc/elm/scroller.edc
index 9898161b2..0c72146e8 100644
--- a/data/themes/edc/elm/scroller.edc
+++ b/data/themes/edc/elm/scroller.edc
@@ -769,6 +769,14 @@ group { name: "elm/scroller/base/default";
769 visible: 1; 769 visible: 1;
770 } 770 }
771 } 771 }
772 part { name: "dim_effect"; type: RECT; mouse_events: 0;
773 description { state: "default" 0.0;
774 color: 0 0 0 0;
775 }
776 description { state: "effect" 0.0;
777 color: 50 50 50 255;
778 }
779 }
772 } 780 }
773 programs { 781 programs {
774 program { 782 program {
@@ -803,6 +811,70 @@ group { name: "elm/scroller/base/default";
803 target: "glow_hbar"; 811 target: "glow_hbar";
804 target: "center_glow_hbar"; 812 target: "center_glow_hbar";
805 } 813 }
814 program {
815 signal: "elm,action,looping,left"; source: "elm";
816 action: STATE_SET "effect" 0.0;
817 transition: LINEAR 0.3;
818 target: "dim_effect";
819 after: "looping,left,done";
820 }
821 program { name: "looping,left,done";
822 action: SIGNAL_EMIT "elm,looping,left,done" "elm";
823 }
824 program {
825 signal: "elm,action,looping,left,end"; source: "elm";
826 action: STATE_SET "default" 0.0;
827 transition: LINEAR 0.3;
828 target: "dim_effect";
829 }
830 program {
831 signal: "elm,action,looping,right"; source: "elm";
832 action: STATE_SET "effect" 0.0;
833 transition: LINEAR 0.3;
834 target: "dim_effect";
835 after: "looping,right,done";
836 }
837 program { name: "looping,right,done";
838 action: SIGNAL_EMIT "elm,looping,right,done" "elm";
839 }
840 program {
841 signal: "elm,action,looping,right,end"; source: "elm";
842 action: STATE_SET "default" 0.0;
843 transition: LINEAR 0.3;
844 target: "dim_effect";
845 }
846 program {
847 signal: "elm,action,looping,up"; source: "elm";
848 action: STATE_SET "effect" 0.0;
849 transition: LINEAR 0.3;
850 target: "dim_effect";
851 after: "looping,up,done";
852 }
853 program { name: "looping,up,done";
854 action: SIGNAL_EMIT "elm,looping,up,done" "elm";
855 }
856 program {
857 signal: "elm,action,looping,up,end"; source: "elm";
858 action: STATE_SET "default" 0.0;
859 transition: LINEAR 0.3;
860 target: "dim_effect";
861 }
862 program {
863 signal: "elm,action,looping,down"; source: "elm";
864 action: STATE_SET "effect" 0.0;
865 transition: LINEAR 0.3;
866 target: "dim_effect";
867 after: "looping,down,done";
868 }
869 program { name: "looping,down,done";
870 action: SIGNAL_EMIT "elm,looping,down,done" "elm";
871 }
872 program {
873 signal: "elm,action,looping,down,end"; source: "elm";
874 action: STATE_SET "default" 0.0;
875 transition: LINEAR 0.3;
876 target: "dim_effect";
877 }
806 } 878 }
807} 879}
808 880
diff --git a/src/bin/test_list.c b/src/bin/test_list.c
index d86486013..faa7a05d6 100644
--- a/src/bin/test_list.c
+++ b/src/bin/test_list.c
@@ -1310,6 +1310,14 @@ test_list_focus_focus_move_policy_changed(void *data EINA_UNUSED,
1310} 1310}
1311 1311
1312static void 1312static void
1313test_list_focus_item_loop_enable_check_changed(void *data, Evas_Object *obj,
1314 void *event_info EINA_UNUSED)
1315{
1316 Evas_Object *li = data;
1317 elm_object_scroll_item_loop_enabled_set(li, elm_check_state_get(obj));
1318}
1319
1320static void
1313_item_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info) 1321_item_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
1314{ 1322{
1315 printf("%s: %p\n", (char *)data, event_info); 1323 printf("%s: %p\n", (char *)data, event_info);
@@ -1497,6 +1505,17 @@ _test_list_focus(const char *name, const char *title, Eina_Bool horiz)
1497 1505
1498 test_list_focus_focus_on_selection_set(li, chk, EINA_FALSE); 1506 test_list_focus_focus_on_selection_set(li, chk, EINA_FALSE);
1499 1507
1508 chk = elm_check_add(bx_opt);
1509 elm_object_text_set(chk, "Item Looping Enable");
1510 elm_check_state_set(chk, elm_object_scroll_item_loop_enabled_get(li));
1511 evas_object_size_hint_weight_set(chk, EVAS_HINT_EXPAND, 0.0);
1512 evas_object_smart_callback_add(chk, "changed",
1513 test_list_focus_item_loop_enable_check_changed,
1514 li);
1515 elm_box_pack_end(bx_opt, chk);
1516 evas_object_show(chk);
1517
1518 elm_box_pack_end(bx, bx_opt);
1500 // Focus Movement Policy 1519 // Focus Movement Policy
1501 fr = elm_frame_add(bx); 1520 fr = elm_frame_add(bx);
1502 elm_object_text_set(fr, "Focus Movement Policy"); 1521 elm_object_text_set(fr, "Focus Movement Policy");
@@ -1572,8 +1591,8 @@ _test_list_focus(const char *name, const char *title, Eina_Bool horiz)
1572 if (lhand > 4) lhand = 4; 1591 if (lhand > 4) lhand = 4;
1573 if (rhand > 4) rhand = 4; 1592 if (rhand > 4) rhand = 4;
1574 snprintf(buf, sizeof(buf), " %s / %s ", 1593 snprintf(buf, sizeof(buf), " %s / %s ",
1575 _list_focus_names[lhand], 1594 _list_focus_names[lhand],
1576 _list_focus_names[rhand]); 1595 _list_focus_names[rhand]);
1577 1596
1578 it = elm_list_item_append(li, buf, 1597 it = elm_list_item_append(li, buf,
1579 test_list_focus_content_get(li, lhand, horiz), 1598 test_list_focus_content_get(li, lhand, horiz),
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index aa0367ab0..9ae2effad 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -334,6 +334,8 @@ _elm_list_smart_event(Eo *obj, void *_pd, va_list *list)
334 Evas_Coord step_y = 0; 334 Evas_Coord step_y = 0;
335 Evas_Coord page_x = 0; 335 Evas_Coord page_x = 0;
336 Evas_Coord page_y = 0; 336 Evas_Coord page_y = 0;
337 Evas_Coord minw = 0;
338 Evas_Coord minh = 0;
337 Elm_List_Item *it = NULL; 339 Elm_List_Item *it = NULL;
338 Eina_Bool sel_ret = EINA_FALSE; 340 Eina_Bool sel_ret = EINA_FALSE;
339 341
@@ -346,7 +348,8 @@ _elm_list_smart_event(Eo *obj, void *_pd, va_list *list)
346 elm_interface_scrollable_content_pos_get(&x, &y), 348 elm_interface_scrollable_content_pos_get(&x, &y),
347 elm_interface_scrollable_step_size_get(&step_x, &step_y), 349 elm_interface_scrollable_step_size_get(&step_x, &step_y),
348 elm_interface_scrollable_page_size_get(&page_x, &page_y), 350 elm_interface_scrollable_page_size_get(&page_x, &page_y),
349 elm_interface_scrollable_content_viewport_size_get(&v_w, &v_h)); 351 elm_interface_scrollable_content_viewport_size_get(&v_w, &v_h),
352 elm_interface_scrollable_content_size_get(&minw, &minh));
350 353
351 /* TODO: fix logic for horizontal mode */ 354 /* TODO: fix logic for horizontal mode */
352 if ((!strcmp(ev->key, "Left")) || 355 if ((!strcmp(ev->key, "Left")) ||
@@ -369,6 +372,24 @@ _elm_list_smart_event(Eo *obj, void *_pd, va_list *list)
369 if (ret) *ret = EINA_TRUE; 372 if (ret) *ret = EINA_TRUE;
370 return; 373 return;
371 } 374 }
375 else
376 {
377 if (sd->item_loop_enable)
378 {
379 if (minw > v_w)
380 {
381 elm_layout_signal_emit(obj, "elm,action,looping,left", "elm");
382 }
383 else
384 {
385 it = (Elm_List_Item *)elm_list_last_item_get(obj);
386 elm_list_item_selected_set((Elm_Object_Item *)it, EINA_TRUE);
387 }
388 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
389 if (ret) *ret = EINA_TRUE;
390 return;
391 }
392 }
372 } 393 }
373 if (ret) *ret = EINA_FALSE; 394 if (ret) *ret = EINA_FALSE;
374 return; 395 return;
@@ -393,6 +414,24 @@ _elm_list_smart_event(Eo *obj, void *_pd, va_list *list)
393 if (ret) *ret = EINA_TRUE; 414 if (ret) *ret = EINA_TRUE;
394 return; 415 return;
395 } 416 }
417 else
418 {
419 if (sd->item_loop_enable)
420 {
421 if (minw > v_w)
422 {
423 elm_layout_signal_emit(obj, "elm,action,looping,right", "elm");
424 }
425 else
426 {
427 it = (Elm_List_Item *)elm_list_first_item_get(obj);
428 elm_list_item_selected_set((Elm_Object_Item *)it, EINA_TRUE);
429 }
430 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
431 if (ret) *ret = EINA_TRUE;
432 return;
433 }
434 }
396 } 435 }
397 if (ret) *ret = EINA_FALSE; 436 if (ret) *ret = EINA_FALSE;
398 return; 437 return;
@@ -417,6 +456,24 @@ _elm_list_smart_event(Eo *obj, void *_pd, va_list *list)
417 if (ret) *ret = EINA_TRUE; 456 if (ret) *ret = EINA_TRUE;
418 return; 457 return;
419 } 458 }
459 else
460 {
461 if (sd->item_loop_enable)
462 {
463 if (minh > v_h)
464 {
465 elm_layout_signal_emit(obj, "elm,action,looping,up", "elm");
466 }
467 else
468 {
469 it = (Elm_List_Item *)elm_list_last_item_get(obj);
470 elm_list_item_selected_set((Elm_Object_Item *)it, EINA_TRUE);
471 }
472 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
473 if (ret) *ret = EINA_TRUE;
474 return;
475 }
476 }
420 } 477 }
421 if (ret) *ret = EINA_FALSE; 478 if (ret) *ret = EINA_FALSE;
422 return; 479 return;
@@ -441,6 +498,24 @@ _elm_list_smart_event(Eo *obj, void *_pd, va_list *list)
441 if (ret) *ret = EINA_TRUE; 498 if (ret) *ret = EINA_TRUE;
442 return; 499 return;
443 } 500 }
501 else
502 {
503 if (sd->item_loop_enable)
504 {
505 if (minh > v_h)
506 {
507 elm_layout_signal_emit(obj, "elm,action,looping,down", "elm");
508 }
509 else
510 {
511 it = (Elm_List_Item *)elm_list_first_item_get(obj);
512 elm_list_item_selected_set((Elm_Object_Item *)it, EINA_TRUE);
513 }
514 ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
515 if (ret) *ret = EINA_TRUE;
516 return;
517 }
518 }
444 } 519 }
445 if (ret) *ret = EINA_FALSE; 520 if (ret) *ret = EINA_FALSE;
446 return; 521 return;
@@ -1622,6 +1697,58 @@ _mouse_up_cb(void *data,
1622} 1697}
1623 1698
1624static void 1699static void
1700_elm_list_looping_left_cb(void *data,
1701 Evas_Object *obj EINA_UNUSED,
1702 const char *emission EINA_UNUSED,
1703 const char *source EINA_UNUSED)
1704{
1705 Evas_Object *list = data;
1706 Elm_List_Item *it = (Elm_List_Item *)elm_list_last_item_get(list);
1707 elm_list_item_selected_set((Elm_Object_Item *)it, EINA_TRUE);
1708 elm_object_item_focus_set((Elm_Object_Item *)it, EINA_TRUE);
1709 elm_layout_signal_emit(list, "elm,action,looping,left,end", "elm");
1710}
1711
1712static void
1713_elm_list_looping_right_cb(void *data,
1714 Evas_Object *obj EINA_UNUSED,
1715 const char *emission EINA_UNUSED,
1716 const char *source EINA_UNUSED)
1717{
1718 Evas_Object *list = data;
1719 Elm_List_Item *it = (Elm_List_Item *)elm_list_first_item_get(list);
1720 elm_list_item_selected_set((Elm_Object_Item *)it, EINA_TRUE);
1721 elm_object_item_focus_set((Elm_Object_Item *)it, EINA_TRUE);
1722 elm_layout_signal_emit(list, "elm,action,looping,right,end", "elm");
1723}
1724
1725static void
1726_elm_list_looping_up_cb(void *data,
1727 Evas_Object *obj EINA_UNUSED,
1728 const char *emission EINA_UNUSED,
1729 const char *source EINA_UNUSED)
1730{
1731 Evas_Object *list = data;
1732 Elm_List_Item *it = (Elm_List_Item *)elm_list_last_item_get(list);
1733 elm_list_item_selected_set((Elm_Object_Item *)it, EINA_TRUE);
1734 elm_object_item_focus_set((Elm_Object_Item *)it, EINA_TRUE);
1735 elm_layout_signal_emit(list, "elm,action,looping,up,end", "elm");
1736}
1737
1738static void
1739_elm_list_looping_down_cb(void *data,
1740 Evas_Object *obj EINA_UNUSED,
1741 const char *emission EINA_UNUSED,
1742 const char *source EINA_UNUSED)
1743{
1744 Evas_Object *list = data;
1745 Elm_List_Item *it = (Elm_List_Item *)elm_list_first_item_get(list);
1746 elm_list_item_selected_set((Elm_Object_Item *)it, EINA_TRUE);
1747 elm_object_item_focus_set((Elm_Object_Item *)it, EINA_TRUE);
1748 elm_layout_signal_emit(list, "elm,action,looping,down,end", "elm");
1749}
1750
1751static void
1625_item_disable_hook(Elm_Object_Item *it) 1752_item_disable_hook(Elm_Object_Item *it)
1626{ 1753{
1627 Elm_List_Item *item = (Elm_List_Item *)it; 1754 Elm_List_Item *item = (Elm_List_Item *)it;
@@ -2133,6 +2260,11 @@ _elm_list_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
2133 evas_object_event_callback_add 2260 evas_object_event_callback_add
2134 (priv->box, EVAS_CALLBACK_CHANGED_SIZE_HINTS, 2261 (priv->box, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
2135 _size_hints_changed_cb, obj); 2262 _size_hints_changed_cb, obj);
2263
2264 edje_object_signal_callback_add(wd->resize_obj, "elm,looping,left,done", "elm", _elm_list_looping_left_cb, obj);
2265 edje_object_signal_callback_add(wd->resize_obj, "elm,looping,right,done", "elm", _elm_list_looping_right_cb, obj);
2266 edje_object_signal_callback_add(wd->resize_obj, "elm,looping,up,done", "elm", _elm_list_looping_up_cb, obj);
2267 edje_object_signal_callback_add(wd->resize_obj, "elm,looping,down,done", "elm", _elm_list_looping_down_cb, obj);
2136} 2268}
2137 2269
2138static void 2270static void
@@ -3177,6 +3309,25 @@ _elm_list_focused_item_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3177} 3309}
3178 3310
3179static void 3311static void
3312_elm_list_item_loop_enabled_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3313{
3314 Eina_Bool enable = va_arg(*list, int);
3315 Elm_List_Smart_Data *sd = _pd;
3316
3317 if (sd->item_loop_enable == enable) return;
3318 sd->item_loop_enable = !!enable;
3319}
3320
3321static void
3322_elm_list_item_loop_enabled_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
3323{
3324 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
3325 Elm_List_Smart_Data *sd = _pd;
3326
3327 if (ret) *ret = sd->item_loop_enable;
3328}
3329
3330static void
3180_class_constructor(Eo_Class *klass) 3331_class_constructor(Eo_Class *klass)
3181{ 3332{
3182 const Eo_Op_Func_Description func_desc[] = { 3333 const Eo_Op_Func_Description func_desc[] = {
@@ -3200,6 +3351,8 @@ _class_constructor(Eo_Class *klass)
3200 EO_OP_FUNC(ELM_OBJ_WIDGET_ID(ELM_OBJ_WIDGET_SUB_ID_ACCESS), _elm_list_smart_access), 3351 EO_OP_FUNC(ELM_OBJ_WIDGET_ID(ELM_OBJ_WIDGET_SUB_ID_ACCESS), _elm_list_smart_access),
3201 EO_OP_FUNC(ELM_OBJ_WIDGET_ID(ELM_OBJ_WIDGET_SUB_ID_FOCUS_HIGHLIGHT_GEOMETRY_GET), _elm_list_focus_highlight_geometry_get), 3352 EO_OP_FUNC(ELM_OBJ_WIDGET_ID(ELM_OBJ_WIDGET_SUB_ID_FOCUS_HIGHLIGHT_GEOMETRY_GET), _elm_list_focus_highlight_geometry_get),
3202 EO_OP_FUNC(ELM_OBJ_WIDGET_ID(ELM_OBJ_WIDGET_SUB_ID_FOCUSED_ITEM_GET), _elm_list_focused_item_get), 3353 EO_OP_FUNC(ELM_OBJ_WIDGET_ID(ELM_OBJ_WIDGET_SUB_ID_FOCUSED_ITEM_GET), _elm_list_focused_item_get),
3354 EO_OP_FUNC(ELM_OBJ_WIDGET_ID(ELM_OBJ_WIDGET_SUB_ID_ITEM_LOOP_ENABLED_SET), _elm_list_item_loop_enabled_set),
3355 EO_OP_FUNC(ELM_OBJ_WIDGET_ID(ELM_OBJ_WIDGET_SUB_ID_ITEM_LOOP_ENABLED_GET), _elm_list_item_loop_enabled_get),
3203 3356
3204 EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL), _elm_list_smart_sizing_eval), 3357 EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL), _elm_list_smart_sizing_eval),
3205 3358
diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c
index 4268811cc..aacc4f482 100644
--- a/src/lib/elm_main.c
+++ b/src/lib/elm_main.c
@@ -1530,6 +1530,21 @@ elm_object_scroll_lock_y_get(const Evas_Object *obj)
1530 return elm_widget_drag_lock_y_get(obj); 1530 return elm_widget_drag_lock_y_get(obj);
1531} 1531}
1532 1532
1533EAPI void
1534elm_object_scroll_item_loop_enabled_set(Evas_Object *obj,
1535 Eina_Bool enable)
1536{
1537 EINA_SAFETY_ON_NULL_RETURN(obj);
1538 elm_widget_item_loop_enabled_set(obj, enable);
1539}
1540
1541EAPI Eina_Bool
1542elm_object_scroll_item_loop_enabled_get(const Evas_Object *obj)
1543{
1544 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
1545 return elm_widget_item_loop_enabled_get(obj);
1546}
1547
1533EAPI Eina_Bool 1548EAPI Eina_Bool
1534elm_object_widget_check(const Evas_Object *obj) 1549elm_object_widget_check(const Evas_Object *obj)
1535{ 1550{
diff --git a/src/lib/elm_scroll.h b/src/lib/elm_scroll.h
index 3d5546b4f..feb541c27 100644
--- a/src/lib/elm_scroll.h
+++ b/src/lib/elm_scroll.h
@@ -134,5 +134,34 @@ EAPI Eina_Bool elm_object_scroll_lock_x_get(const Evas_Object *obj);
134EAPI Eina_Bool elm_object_scroll_lock_y_get(const Evas_Object *obj); 134EAPI Eina_Bool elm_object_scroll_lock_y_get(const Evas_Object *obj);
135 135
136/** 136/**
137 * Enable item loop feature of the given widget
138 *
139 * If @p enable is @c EINA_TRUE, item selection/focus will loop internally.
140 * This means if arrow keys are pressed at end of scroller's item,
141 * screen is moved to opposite side.
142 *
143 * @param obj The object
144 * @param enable item loop feature (@c EINA_TRUE == enable, @c EINA_FALSE == disable)
145 *
146 * @see elm_object_scroll_item_loop_enabled_get()
147 * @since 1.10
148 * @ingroup Scrollitem
149 */
150EAPI void elm_object_scroll_item_loop_enabled_set(Evas_Object *obj, Eina_Bool enable);
151
152/**
153 * Get the item loop enable status of the given widget
154 *
155 * This gets the item loop enabled status.
156 *
157 * @param obj The object
158 *
159 * @see elm_objecdt_scroll_item_enabled_set()
160 * @since 1.10
161 * @ingroup Scrollitem
162 */
163EAPI Eina_Bool elm_object_scroll_item_loop_enabled_get(const Evas_Object *obj);
164
165/**
137 * @} 166 * @}
138 */ 167 */
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index 4249d7528..2ad01bd93 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -3406,6 +3406,18 @@ _elm_widget_drag_child_locked_y_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *
3406 return sd->child_drag_y_locked; 3406 return sd->child_drag_y_locked;
3407} 3407}
3408 3408
3409EOLIAN static void
3410_elm_widget_item_loop_enabled_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd EINA_UNUSED, Eina_Bool enable EINA_UNUSED)
3411{
3412 return;
3413}
3414
3415EOLIAN static Eina_Bool
3416_elm_widget_item_loop_enabled_get(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd EINA_UNUSED)
3417{
3418 return EINA_FALSE;
3419}
3420
3409EOLIAN static Eina_Bool 3421EOLIAN static Eina_Bool
3410_elm_widget_theme_object_set(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *edj, const char *wname, const char *welement, const char *wstyle) 3422_elm_widget_theme_object_set(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Object *edj, const char *wname, const char *welement, const char *wstyle)
3411{ 3423{
diff --git a/src/lib/elm_widget.eo b/src/lib/elm_widget.eo
index 0a770fecb..8bc142144 100644
--- a/src/lib/elm_widget.eo
+++ b/src/lib/elm_widget.eo
@@ -317,6 +317,17 @@ abstract Elm_Widget (Evas_Smart)
317 return int; 317 return int;
318 } 318 }
319 } 319 }
320 item_loop_enabled {
321 set {
322 /*@ Set enable or disable item loop feature. */
323 }
324 get {
325 /*@ Get the value whether item loop feature is enabled or not. */
326 }
327 values {
328 Eina_Bool enable;
329 }
330 }
320 child_can_focus { 331 child_can_focus {
321 get { 332 get {
322 /*@ No description supplied by the EAPI. */ 333 /*@ No description supplied by the EAPI. */
diff --git a/src/lib/elm_widget.h b/src/lib/elm_widget.h
index 9706cfdaf..da8c4324f 100644
--- a/src/lib/elm_widget.h
+++ b/src/lib/elm_widget.h
@@ -727,6 +727,8 @@ EAPI Eina_Bool elm_widget_drag_lock_x_get(const Evas_Object *obj);
727EAPI Eina_Bool elm_widget_drag_lock_y_get(const Evas_Object *obj); 727EAPI Eina_Bool elm_widget_drag_lock_y_get(const Evas_Object *obj);
728EAPI int elm_widget_drag_child_locked_x_get(const Evas_Object *obj); 728EAPI int elm_widget_drag_child_locked_x_get(const Evas_Object *obj);
729EAPI int elm_widget_drag_child_locked_y_get(const Evas_Object *obj); 729EAPI int elm_widget_drag_child_locked_y_get(const Evas_Object *obj);
730EAPI void elm_widget_item_loop_enabled_set(Evas_Object *obj, Eina_Bool enable);
731EAPI Eina_Bool elm_widget_item_loop_enabled_get(const Evas_Object *obj);
730EAPI Eina_Bool elm_widget_theme_object_set(Evas_Object *obj, Evas_Object *edj, const char *wname, const char *welement, const char *wstyle); 732EAPI Eina_Bool elm_widget_theme_object_set(Evas_Object *obj, Evas_Object *edj, const char *wname, const char *welement, const char *wstyle);
731EAPI Eina_Bool elm_widget_type_check(const Evas_Object *obj, const char *type, const char *func); 733EAPI Eina_Bool elm_widget_type_check(const Evas_Object *obj, const char *type, const char *func);
732EAPI Evas_Object *elm_widget_name_find(const Evas_Object *obj, const char *name, int recurse); 734EAPI Evas_Object *elm_widget_name_find(const Evas_Object *obj, const char *name, int recurse);
@@ -1281,6 +1283,8 @@ enum
1281 ELM_WIDGET_SUB_ID_DRAG_LOCK_Y_GET, 1283 ELM_WIDGET_SUB_ID_DRAG_LOCK_Y_GET,
1282 ELM_WIDGET_SUB_ID_DRAG_CHILD_LOCKED_X_GET, 1284 ELM_WIDGET_SUB_ID_DRAG_CHILD_LOCKED_X_GET,
1283 ELM_WIDGET_SUB_ID_DRAG_CHILD_LOCKED_Y_GET, 1285 ELM_WIDGET_SUB_ID_DRAG_CHILD_LOCKED_Y_GET,
1286 ELM_WIDGET_SUB_ID_ITEM_LOOP_ENABLED_SET,
1287 ELM_WIDGET_SUB_ID_ITEM_LOOP_ENABLED_GET,
1284 1288
1285 ELM_WIDGET_SUB_ID_EVENT_CALLBACK_ADD, 1289 ELM_WIDGET_SUB_ID_EVENT_CALLBACK_ADD,
1286 ELM_WIDGET_SUB_ID_EVENT_CALLBACK_DEL, 1290 ELM_WIDGET_SUB_ID_EVENT_CALLBACK_DEL,
@@ -2257,6 +2261,25 @@ enum
2257 */ 2261 */
2258#define elm_wdg_drag_child_locked_y_get(ret) ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_DRAG_CHILD_LOCKED_Y_GET), EO_TYPECHECK(int *, ret) 2262#define elm_wdg_drag_child_locked_y_get(ret) ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_DRAG_CHILD_LOCKED_Y_GET), EO_TYPECHECK(int *, ret)
2259 2263
2264/**
2265 * @def elm_wdg_item_loop_enabled_set
2266 * @since 1.10
2267 *
2268 * Set enable or disable item loop feature.
2269 *
2270 * @param[in] enable
2271 */
2272#define elm_wdg_item_loop_enabled_set(enable) ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ITEM_LOOP_ENABLED_SET), EO_TYPECHECK(Eina_Bool, enable)
2273
2274/**
2275 * @def elm_wdg_item_loop_enabled_get
2276 * @since 1.10
2277 *
2278 * Get the value whether item loop feature is enabled or not.
2279 *
2280 * @param[out] ret
2281 */
2282#define elm_wdg_item_loop_enabled_get(ret) ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_ITEM_LOOP_ENABLED_GET), EO_TYPECHECK(Eina_Bool *, ret)
2260 2283
2261/** 2284/**
2262 * @def elm_wdg_event_callback_add 2285 * @def elm_wdg_event_callback_add
diff --git a/src/lib/elm_widget_list.h b/src/lib/elm_widget_list.h
index b6dfb9ed5..ddb0f426f 100644
--- a/src/lib/elm_widget_list.h
+++ b/src/lib/elm_widget_list.h
@@ -54,6 +54,7 @@ struct _Elm_List_Smart_Data
54 Eina_Bool swipe : 1; 54 Eina_Bool swipe : 1;
55 Eina_Bool delete_me : 1; 55 Eina_Bool delete_me : 1;
56 Eina_Bool mouse_down : 1; /**< a flag that mouse is down on the list at the moment. this flag is set to true on mouse and reset to false on mouse up */ 56 Eina_Bool mouse_down : 1; /**< a flag that mouse is down on the list at the moment. this flag is set to true on mouse and reset to false on mouse up */
57 Eina_Bool item_loop_enable : 1; /**< value whether item loop feature is enabled or not. */
57}; 58};
58 59
59typedef struct _Elm_List_Item Elm_List_Item; 60typedef struct _Elm_List_Item Elm_List_Item;