Genlist: Test case added in Genlist Focus example.
authorUmesh Tanwar <umesh.tanwar@samsung.com>
Thu, 25 Jun 2015 04:24:21 +0000 (13:24 +0900)
committerChunEon Park <hermet@hermet.pe.kr>
Thu, 25 Jun 2015 04:24:21 +0000 (13:24 +0900)
Summary:
Added test case to enable/disable mouse wheel. Mouse Wheel is
used to scroll the genlist up/down.

Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com>
Test Plan: elementary_test -> Genlist Focus -> Wheel Disabled

Reviewers: raster, Hermet, cedric

Subscribers: sachin.dev, singh.amitesh, SanghyeonLee, eagleeye

Differential Revision: https://phab.enlightenment.org/D2757

src/bin/test_genlist.c

index 770905b..e519681 100644 (file)
@@ -4273,6 +4273,13 @@ _gl_first_item_focus_on_first_focus_in_cb(void *data EINA_UNUSED, Evas_Object *o
 {
    elm_config_first_item_focus_on_first_focusin_set(elm_check_state_get(obj));
 }
+
+static void
+_gl_wheel_disabled_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
+{
+   elm_scroller_wheel_disabled_set(data, elm_check_state_get(obj));
+}
+
 static Eina_Bool
 _focus_timer_cb(void *data)
 {
@@ -4493,6 +4500,14 @@ _test_genlist_focus_option_panel_create(Evas_Object *win, Evas_Object *bx,
    elm_box_pack_end(bx_opt, chk);
    evas_object_show(chk);
 
+   chk = elm_check_add(bx_opt);
+   elm_object_text_set(chk, "Wheel Disabled");
+   elm_check_state_set(chk, elm_scroller_wheel_disabled_get(gl));
+   evas_object_size_hint_weight_set(chk, EVAS_HINT_EXPAND, 0.0);
+   evas_object_smart_callback_add(chk, "changed", _gl_wheel_disabled_cb, gl);
+   elm_box_pack_end(bx_opt, chk);
+   evas_object_show(chk);
+
    // Focus Autoscroll Mode
    fr = _focus_autoscroll_mode_frame_create(bx);
    elm_box_pack_end(bx, fr);