aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_gengrid.c
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2014-04-23 21:13:57 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-04-23 21:13:57 +0900
commitf3ad4cd3c4260c16d419951ab38b0b8494c8bbda (patch)
tree6437a200b7a2713606466c8c1c8d922907e9fbbd /legacy/elementary/src/bin/test_gengrid.c
parentatspi: remove unused variable assignment (diff)
downloadefl-f3ad4cd3c4260c16d419951ab38b0b8494c8bbda.tar.gz
gengrid: item moving feature with keys.
Summary: - Added two APIs elm_gengrid_reorder_mode_start/stop - Add two smart callbacks - "item,reorder,anim,start" - This is called when a gengrid item movement has just started by keys in reorder mode. - "item,reorder,anim,stop" - This is called when a gengrid item movement just stopped in reorder mode. @feature Test Plan: elementary_test->Gengrid Focus Reviewers: raster, seoz, SanghyeonLee CC: seoz Differential Revision: https://phab.enlightenment.org/D723
Diffstat (limited to 'legacy/elementary/src/bin/test_gengrid.c')
-rw-r--r--legacy/elementary/src/bin/test_gengrid.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/legacy/elementary/src/bin/test_gengrid.c b/legacy/elementary/src/bin/test_gengrid.c
index ca9846bd72..cac0973b5f 100644
--- a/legacy/elementary/src/bin/test_gengrid.c
+++ b/legacy/elementary/src/bin/test_gengrid.c
@@ -1362,6 +1362,17 @@ _test_gengrid_focus_focus_animate_check_changed(void *data,
elm_check_state_get(obj));
}
+static void
+_grid_reorder_mode(void *data, Evas_Object *obj,
+ void *event_info EINA_UNUSED)
+{
+ if (elm_check_state_get(obj))
+ elm_gengrid_reorder_mode_start((Evas_Object *)data,
+ ECORE_POS_MAP_LINEAR);
+ else
+ elm_gengrid_reorder_mode_stop((Evas_Object *)data);
+}
+
void
test_gengrid_focus(void *data EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
@@ -1468,6 +1479,13 @@ test_gengrid_focus(void *data EINA_UNUSED,
elm_box_pack_end(bx_opt, ck);
evas_object_show(ck);
+ ck = elm_check_add(bx_opt);
+ elm_object_text_set(ck, "Rorder mode enable");
+ evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
+ evas_object_smart_callback_add(ck, "changed", _grid_reorder_mode, gengrid);
+ elm_box_pack_end(bx_opt, ck);
+ evas_object_show(ck);
+
//Focus movement policy
fr = elm_frame_add(bx);
elm_object_text_set(fr, "Focus Movement Policy");