summaryrefslogtreecommitdiff
path: root/src/bin/elementary/test_ui_spotlight.c
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2019-07-30 07:05:02 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-07-31 08:42:08 +0200
commit959c68ca2e607c19c2b3e9c43decf8db0a41f4fb (patch)
tree026725d49af9cd83b3ace53d8c712b6a2bb6d019 /src/bin/elementary/test_ui_spotlight.c
parente092878d11ab7cfca104cf64b900c6af26e3a576 (diff)
efl_ui_spotlight: add scroll_block to Manager_Scroll
To support blocking of scrolling movement, @property scroll_block has been added to Manager_Scroll. If scroll_block is set to be true, then scrolling movement by mouse input is blocked. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9444
Diffstat (limited to '')
-rw-r--r--src/bin/elementary/test_ui_spotlight.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/bin/elementary/test_ui_spotlight.c b/src/bin/elementary/test_ui_spotlight.c
index 428ea52..9f1f9a2 100644
--- a/src/bin/elementary/test_ui_spotlight.c
+++ b/src/bin/elementary/test_ui_spotlight.c
@@ -495,6 +495,40 @@ view_animation_cb(void *data,
495} 495}
496 496
497static void 497static void
498_scroll_block_check_cb(void *data, const Efl_Event *ev)
499{
500 Params *params = data;
501
502 efl_ui_spotlight_manager_scroll_block_set(efl_ui_spotlight_manager_get(params->spotlight), efl_ui_check_selected_get(ev->object));
503}
504
505static void
506scroll_block_cb(void *data,
507 Evas_Object *obj EINA_UNUSED,
508 void *event_info EINA_UNUSED)
509{
510 Params *params = data;
511 Evas_Object *navi = params->navi;
512 Eo *btn, *box, *ck;
513
514 btn = efl_add(EFL_UI_BUTTON_CLASS, navi,
515 efl_text_set(efl_added, "Back"),
516 efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED,
517 back_btn_cb, navi));
518
519 box = efl_add(EFL_UI_BOX_CLASS, navi,
520 elm_naviframe_item_push(navi, "Scroll Block", btn, NULL,
521 efl_added, NULL));
522
523 ck = efl_add(EFL_UI_CHECK_CLASS, box);
524 efl_event_callback_add(ck, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, _scroll_block_check_cb, params);
525 efl_ui_check_selected_set(ck, efl_ui_spotlight_manager_scroll_block_get(efl_ui_spotlight_manager_get(params->spotlight)));
526 efl_text_set(ck, "Scroll Block");
527 efl_pack_end(box, ck);
528 efl_gfx_entity_visible_set(ck, 1);
529}
530
531static void
498pack_cb(void *data, 532pack_cb(void *data,
499 Evas_Object *obj EINA_UNUSED, 533 Evas_Object *obj EINA_UNUSED,
500 void *event_info EINA_UNUSED) 534 void *event_info EINA_UNUSED)
@@ -835,6 +869,7 @@ test_ui_spotlight_stack(void *data EINA_UNUSED,
835 elm_list_item_append(list, "Active Index", NULL, NULL, active_index_cb, params); 869 elm_list_item_append(list, "Active Index", NULL, NULL, active_index_cb, params);
836 elm_list_item_append(list, "Indicator", NULL, NULL, indicator_cb, params); 870 elm_list_item_append(list, "Indicator", NULL, NULL, indicator_cb, params);
837 elm_list_item_append(list, "Animation", NULL, NULL, view_animation_cb, params); 871 elm_list_item_append(list, "Animation", NULL, NULL, view_animation_cb, params);
872 elm_list_item_append(list, "Scroll Block", NULL, NULL, scroll_block_cb, params);
838 elm_list_go(list); 873 elm_list_go(list);
839 874
840 efl_event_callback_add(list, EFL_EVENT_DEL, list_del_cb, params); 875 efl_event_callback_add(list, EFL_EVENT_DEL, list_del_cb, params);
@@ -1036,6 +1071,7 @@ test_ui_spotlight_scroll(void *data EINA_UNUSED,
1036 elm_list_item_append(list, "Active Index", NULL, NULL, active_index_cb, params); 1071 elm_list_item_append(list, "Active Index", NULL, NULL, active_index_cb, params);
1037 elm_list_item_append(list, "Indicator", NULL, NULL, indicator_cb, params); 1072 elm_list_item_append(list, "Indicator", NULL, NULL, indicator_cb, params);
1038 elm_list_item_append(list, "Animation", NULL, NULL, view_animation_cb, params); 1073 elm_list_item_append(list, "Animation", NULL, NULL, view_animation_cb, params);
1074 elm_list_item_append(list, "Scroll Block", NULL, NULL, scroll_block_cb, params);
1039 elm_list_go(list); 1075 elm_list_go(list);
1040 1076
1041 efl_event_callback_add(list, EFL_EVENT_DEL, list_del_cb, params); 1077 efl_event_callback_add(list, EFL_EVENT_DEL, list_del_cb, params);