From: Carsten Haitzler Date: Thu, 10 Jan 2013 11:24:04 +0000 (+0000) Subject: a quick test involving more win state stuff - add test cases for X-Git-Tag: upstream/1.20.0~7116^2~14^2~5303 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7a5cb57def3123d9d8f3de47c67bcf00fd469166;p=platform%2Fupstream%2Fefl.git a quick test involving more win state stuff - add test cases for iconify & withdraw SVN revision: 82550 --- diff --git a/legacy/elementary/src/bin/test_win_state.c b/legacy/elementary/src/bin/test_win_state.c index a54726c..1a3f699 100644 --- a/legacy/elementary/src/bin/test_win_state.c +++ b/legacy/elementary/src/bin/test_win_state.c @@ -29,6 +29,41 @@ my_bt_38_alpha_off(void *data, Evas_Object *obj __UNUSED__, void *event_info __U elm_win_alpha_set(win, EINA_FALSE); } +static Eina_Bool +_unic(void *data) +{ + printf("activate\n"); + elm_win_activate(data); + return EINA_FALSE; +} + +static Eina_Bool +_unwith(void *data) +{ + printf("show\n"); + evas_object_show(data); + elm_win_activate(data); + return EINA_FALSE; +} + +static void +my_bt_38_iconify(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +{ + Evas_Object *win = data; + printf("iconify, current %i\n", elm_win_iconified_get(win)); + elm_win_iconified_set(win, EINA_TRUE); + ecore_timer_add(10.0, _unic, win); +} + +static void +my_bt_38_withdraw(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) +{ + Evas_Object *win = data; + printf("withdraw, current %i\n", elm_win_withdrawn_get(win)); + elm_win_withdrawn_set(win, EINA_TRUE); + ecore_timer_add(10.0, _unwith, win); +} + static void my_ck_38_resize(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) { @@ -156,6 +191,22 @@ test_win_state(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i elm_box_pack_end(bx2, bt); evas_object_show(bt); + bt = elm_button_add(win); + elm_object_text_set(bt, "Iconify"); + evas_object_smart_callback_add(bt, "clicked", my_bt_38_iconify, win); + evas_object_size_hint_fill_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0); + elm_box_pack_end(bx2, bt); + evas_object_show(bt); + + bt = elm_button_add(win); + elm_object_text_set(bt, "Withdraw"); + evas_object_smart_callback_add(bt, "clicked", my_bt_38_withdraw, win); + evas_object_size_hint_fill_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0); + elm_box_pack_end(bx2, bt); + evas_object_show(bt); + elm_box_pack_end(bx, bx2); evas_object_show(bx2);