summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorefl <efl@efl.(none)>2014-06-10 14:55:56 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-06-10 15:00:09 +0900
commit7aaa5c8d0a4a5714b4f1bf79e5f15c255df1996c (patch)
treedac2edc6b68c0a9512da839cd4b89df25028e85f /src/bin
parentb39ad2757829d0198f9f19fe07c626f4a96068d8 (diff)
Gengrid: Added horizontal item loop feature.
Summary: If item loop is enabled, the item moves infinitely in horizontal manner (from right to left and from left to right). Need to implement: -for reorder mode and horizontal mode. @feature DEPENDs On D841 Test Plan: elementary_test -to gengrid2 Reviewers: seoz, eagleeye, SanghyeonLee, raster CC: seoz, raster Differential Revision: https://phab.enlightenment.org/D842 Conflicts: src/lib/elm_gengrid.c
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/test_gengrid.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/bin/test_gengrid.c b/src/bin/test_gengrid.c
index e34b42eaf..847b66d87 100644
--- a/src/bin/test_gengrid.c
+++ b/src/bin/test_gengrid.c
@@ -160,6 +160,21 @@ _horizontal_grid(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
160} 160}
161 161
162static void 162static void
163_item_loop_enable_changed_cb(void *data, Evas_Object *obj,
164 void *event_info EINA_UNUSED)
165{
166 Evas_Object *grid = data;
167 elm_object_scroll_item_loop_enabled_set(grid, elm_check_state_get(obj));
168}
169
170static void
171_focus_highlight_changed_cb(void *data, Evas_Object *obj,
172 void *event_info EINA_UNUSED)
173{
174 elm_win_focus_highlight_enabled_set(data, elm_check_state_get(obj));
175}
176
177static void
163grid_drag_up(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 178grid_drag_up(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
164{ 179{
165 printf("Drag up: %p\n", event_info); 180 printf("Drag up: %p\n", event_info);
@@ -819,6 +834,18 @@ test_gengrid2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
819 elm_box_pack_end(hbx, ck); 834 elm_box_pack_end(hbx, ck);
820 evas_object_show(ck); 835 evas_object_show(ck);
821 836
837 ck = elm_check_add(win);
838 elm_object_text_set(ck, "Item loop enable");
839 evas_object_smart_callback_add(ck, "changed", _item_loop_enable_changed_cb, grid);
840 elm_box_pack_end(hbx, ck);
841 evas_object_show(ck);
842
843 ck = elm_check_add(win);
844 elm_object_text_set(ck, "Focus Highlight Set");
845 evas_object_smart_callback_add(ck, "changed", _focus_highlight_changed_cb, win);
846 elm_box_pack_end(hbx, ck);
847 evas_object_show(ck);
848
822 gic = elm_gengrid_item_class_new(); 849 gic = elm_gengrid_item_class_new();
823 gic->item_style = "default"; 850 gic->item_style = "default";
824 gic->func.text_get = grid_text_get; 851 gic->func.text_get = grid_text_get;