X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fbin%2Ftest_notify.c;h=dcb387adc930b18f7c3ed46468d11085314807db;hb=HEAD;hp=71c1b22488bb9a440a140f267a0653853526de91;hpb=5e055f3da9418c3a3420f6ffd08f20b1b3eb8fe1;p=framework%2Fuifw%2Felementary.git diff --git a/src/bin/test_notify.c b/src/bin/test_notify.c index 71c1b22..dcb387a 100644 --- a/src/bin/test_notify.c +++ b/src/bin/test_notify.c @@ -1,7 +1,7 @@ -#include #ifdef HAVE_CONFIG_H # include "elementary_config.h" #endif +#include #ifndef ELM_LIB_QUICKLAUNCH static void @@ -40,16 +40,10 @@ _notify_block(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in void test_notify(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { - Evas_Object *win, *bg, *bx, *tb, *notify, *bt, *lb; - - win = elm_win_add(NULL, "notify", ELM_WIN_BASIC); - elm_win_title_set(win, "Notify"); - elm_win_autodel_set(win, 1); + Evas_Object *win, *bx, *tb, *notify, *bt, *lb; - bg = elm_bg_add(win); - elm_win_resize_object_add(win, bg); - evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_show(bg); + win = elm_win_util_standard_add("notify", "Notify"); + elm_win_autodel_set(win, EINA_TRUE); tb = elm_table_add(win); elm_win_resize_object_add(win, tb); @@ -60,7 +54,7 @@ test_notify(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); bx = elm_box_add(win); - elm_notify_content_set(notify, bx); + elm_object_content_set(notify, bx); elm_box_horizontal_set(bx, EINA_TRUE); evas_object_show(bx); @@ -82,7 +76,7 @@ test_notify(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info evas_object_show(bt); notify = elm_notify_add(win); - elm_notify_repeat_events_set(notify, EINA_FALSE); + elm_notify_allow_events_set(notify, EINA_FALSE); evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM); elm_notify_timeout_set(notify, 5.0); @@ -90,12 +84,12 @@ test_notify(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info evas_object_smart_callback_add(notify, "block,clicked", _notify_block, NULL); bx = elm_box_add(win); - elm_notify_content_set(notify, bx); + elm_object_content_set(notify, bx); elm_box_horizontal_set(bx, EINA_TRUE); evas_object_show(bx); lb = elm_label_add(win); - elm_object_text_set(lb, "Bottom position. This notify use a timeout of 5 sec.
" + elm_object_text_set(lb, "Bottom position. This notify use a timeout of 5 sec.
" "The events outside the window are blocked."); elm_box_pack_end(bx, lb); evas_object_show(lb); @@ -119,7 +113,7 @@ test_notify(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info evas_object_smart_callback_add(notify, "timeout", _notify_timeout, NULL); bx = elm_box_add(win); - elm_notify_content_set(notify, bx); + elm_object_content_set(notify, bx); elm_box_horizontal_set(bx, EINA_TRUE); evas_object_show(bx); @@ -147,7 +141,7 @@ test_notify(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info evas_object_smart_callback_add(notify, "timeout", _notify_timeout, NULL); bx = elm_box_add(win); - elm_notify_content_set(notify, bx); + elm_object_content_set(notify, bx); elm_box_horizontal_set(bx, EINA_TRUE); evas_object_show(bx); @@ -173,7 +167,7 @@ test_notify(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_RIGHT); bx = elm_box_add(win); - elm_notify_content_set(notify, bx); + elm_object_content_set(notify, bx); elm_box_horizontal_set(bx, EINA_TRUE); evas_object_show(bx); @@ -199,7 +193,7 @@ test_notify(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_TOP_LEFT); bx = elm_box_add(win); - elm_notify_content_set(notify, bx); + elm_object_content_set(notify, bx); elm_box_horizontal_set(bx, EINA_TRUE); evas_object_show(bx); @@ -225,7 +219,7 @@ test_notify(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_TOP_RIGHT); bx = elm_box_add(win); - elm_notify_content_set(notify, bx); + elm_object_content_set(notify, bx); elm_box_horizontal_set(bx, EINA_TRUE); evas_object_show(bx); @@ -251,7 +245,7 @@ test_notify(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM_LEFT); bx = elm_box_add(win); - elm_notify_content_set(notify, bx); + elm_object_content_set(notify, bx); elm_box_horizontal_set(bx, EINA_TRUE); evas_object_show(bx); @@ -277,7 +271,7 @@ test_notify(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM_RIGHT); bx = elm_box_add(win); - elm_notify_content_set(notify, bx); + elm_object_content_set(notify, bx); elm_box_horizontal_set(bx, EINA_TRUE); evas_object_show(bx);