aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_gengrid.c
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
commitb087e80e9b8baf7ed0be887e8a1bd6064e5f134d (patch)
tree9edbf8e8c80ba6956591d3a417e5ac692f91de23 /legacy/elementary/src/bin/test_gengrid.c
parentconfig: always create a themes directory for user. (diff)
downloadefl-b087e80e9b8baf7ed0be887e8a1bd6064e5f134d.tar.gz
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 https://phab.enlightenment.org/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 'legacy/elementary/src/bin/test_gengrid.c')
-rw-r--r--legacy/elementary/src/bin/test_gengrid.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/legacy/elementary/src/bin/test_gengrid.c b/legacy/elementary/src/bin/test_gengrid.c
index e34b42eaf0..847b66d874 100644
--- a/legacy/elementary/src/bin/test_gengrid.c
+++ b/legacy/elementary/src/bin/test_gengrid.c
@@ -160,6 +160,21 @@ _horizontal_grid(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
}
static void
+_item_loop_enable_changed_cb(void *data, Evas_Object *obj,
+ void *event_info EINA_UNUSED)
+{
+ Evas_Object *grid = data;
+ elm_object_scroll_item_loop_enabled_set(grid, elm_check_state_get(obj));
+}
+
+static void
+_focus_highlight_changed_cb(void *data, Evas_Object *obj,
+ void *event_info EINA_UNUSED)
+{
+ elm_win_focus_highlight_enabled_set(data, elm_check_state_get(obj));
+}
+
+static void
grid_drag_up(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
{
printf("Drag up: %p\n", event_info);
@@ -819,6 +834,18 @@ test_gengrid2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
elm_box_pack_end(hbx, ck);
evas_object_show(ck);
+ ck = elm_check_add(win);
+ elm_object_text_set(ck, "Item loop enable");
+ evas_object_smart_callback_add(ck, "changed", _item_loop_enable_changed_cb, grid);
+ elm_box_pack_end(hbx, ck);
+ evas_object_show(ck);
+
+ ck = elm_check_add(win);
+ elm_object_text_set(ck, "Focus Highlight Set");
+ evas_object_smart_callback_add(ck, "changed", _focus_highlight_changed_cb, win);
+ elm_box_pack_end(hbx, ck);
+ evas_object_show(ck);
+
gic = elm_gengrid_item_class_new();
gic->item_style = "default";
gic->func.text_get = grid_text_get;