From b16db66de94049948cac5f07f561b78889bc8244 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Sun, 11 Aug 2013 18:22:34 +0900 Subject: [PATCH] test_focus3.c: added window focus highlight enabled set test check. --- legacy/elementary/src/bin/test_focus3.c | 32 ++++++++++++++++++------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/legacy/elementary/src/bin/test_focus3.c b/legacy/elementary/src/bin/test_focus3.c index 71a5a8a11b..b5355ff078 100644 --- a/legacy/elementary/src/bin/test_focus3.c +++ b/legacy/elementary/src/bin/test_focus3.c @@ -118,6 +118,13 @@ highlight_animate_cb(void *data __UNUSED__, Evas_Object *obj, void *event_info _ elm_config_focus_highlight_animate_set(elm_check_state_get(obj)); } +static void +win_highlight_enabled_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) +{ + elm_win_focus_highlight_enabled_set((Evas_Object *)data, + elm_check_state_get(obj)); +} + static void custom_chain_unset_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) { @@ -215,24 +222,33 @@ test_focus4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info tg = elm_check_add(win); evas_object_size_hint_weight_set(tg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(tg, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_text_set(tg, "Focus Highlight Enabled"); + elm_object_text_set(tg, "Focus Highlight Enabled (Config)"); elm_check_state_set(tg, EINA_TRUE); evas_object_smart_callback_add(tg, "changed", highlight_enabled_cb, NULL); - elm_grid_pack(gd, tg, 10, 10, 50, 10); + elm_grid_pack(gd, tg, 10, 5, 60, 10); evas_object_show(tg); tg = elm_check_add(win); evas_object_size_hint_weight_set(tg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(tg, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_text_set(tg, "Focus Highlight Animate"); + elm_object_text_set(tg, "Focus Highlight Animate (Config)"); elm_check_state_set(tg, EINA_TRUE); evas_object_smart_callback_add(tg, "changed", highlight_animate_cb, NULL); - elm_grid_pack(gd, tg, 10, 20, 50, 10); + elm_grid_pack(gd, tg, 10, 15, 60, 10); + evas_object_show(tg); + + tg = elm_check_add(win); + evas_object_size_hint_weight_set(tg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(tg, EVAS_HINT_FILL, EVAS_HINT_FILL); + elm_object_text_set(tg, "Focus Highlight Enabled (Win)"); + elm_check_state_set(tg, EINA_TRUE); + evas_object_smart_callback_add(tg, "changed", win_highlight_enabled_cb, win); + elm_grid_pack(gd, tg, 10, 25, 60, 10); evas_object_show(tg); bt = elm_button_add(win); elm_object_text_set(bt, "Create Window"); - elm_grid_pack(gd, bt, 10, 30, 80, 10); + elm_grid_pack(gd, bt, 10, 35, 80, 10); evas_object_smart_callback_add(bt, "clicked", create_win_bt_clicked, NULL); evas_object_show(bt); @@ -241,7 +257,7 @@ test_focus4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info elm_object_text_set(lb, "Custom Chain: Please use tab key to check"); evas_object_size_hint_weight_set(lb, 0.0, 0.0); evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_grid_pack(gd, lb, 10, 45, 80, 5); + elm_grid_pack(gd, lb, 10, 50, 80, 5); evas_object_show(lb); bx = elm_box_add(win); @@ -283,14 +299,14 @@ test_focus4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info custom_chain = eina_list_append(custom_chain, bt3); elm_object_focus_custom_chain_set(bx, custom_chain); - elm_grid_pack(gd, bx, 10, 50, 80, 30); + elm_grid_pack(gd, bx, 10, 55, 80, 30); evas_object_show(bx); tg = elm_check_add(win); elm_object_text_set(tg, "Custom Chain"); elm_check_state_set(tg, EINA_TRUE); evas_object_smart_callback_add(tg, "changed", custom_chain_unset_cb, bx); - elm_grid_pack(gd, tg, 10, 80, 40, 10); + elm_grid_pack(gd, tg, 10, 85, 40, 10); evas_object_show(tg); evas_object_resize(win, 320, 320);