aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/elementary/test_popup.c
diff options
context:
space:
mode:
authorTaehyub Kim <taehyub.kim@samsung.com>2017-09-21 17:21:18 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2017-11-28 17:15:42 +0900
commit8d315ce7aad54c16ad0d7dd0b675846618209028 (patch)
tree1d50b944cc912e3eea4164dc88f59adec723a45d /src/bin/elementary/test_popup.c
parentefl_ui_popup_anchor: add Efl.Ui.Popup.Anchor class (diff)
downloadefl-8d315ce7aad54c16ad0d7dd0b675846618209028.tar.gz
efl_ui_popup: add timeout property
Summary: add timeout property Test Plan: 1. run elementary_test -to efluipopup 2. after 3 seconds, popup will be delete Reviewers: Jaehyun_Cho, jpeg, woohyun, thiepha, Blackmole, cedric Reviewed By: Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D5205
Diffstat (limited to 'src/bin/elementary/test_popup.c')
-rw-r--r--src/bin/elementary/test_popup.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/bin/elementary/test_popup.c b/src/bin/elementary/test_popup.c
index 701cd178b5..960cbab8a8 100644
--- a/src/bin/elementary/test_popup.c
+++ b/src/bin/elementary/test_popup.c
@@ -1011,6 +1011,14 @@ _position_set_cb(void *data, Evas_Object *obj EINA_UNUSED,
evas_object_move(data, 0, 0);
}
+static void
+_timeout_set_cb(void *data, Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
+{
+ efl_ui_popup_timeout_set(data, 3);
+ printf("timemout is set to 3 seconds\n");
+}
+
void
test_efl_ui_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
@@ -1031,7 +1039,6 @@ test_efl_ui_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev
Evas_Object *efl_ui_popup= efl_add(EFL_UI_POPUP_CLASS, win);
evas_object_smart_callback_add(efl_ui_popup, "bg,clicked", _bg_clicked, NULL);
-
evas_object_resize(efl_ui_popup, 160, 160);
evas_object_show(efl_ui_popup);
@@ -1092,6 +1099,14 @@ test_efl_ui_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev
evas_object_show(position_btn);
evas_object_smart_callback_add(position_btn, "clicked", _position_set_cb, efl_ui_popup);
+ Evas_Object *timeout_btn;
+ timeout_btn = elm_button_add(win);
+ elm_object_text_set(timeout_btn, "Timeout Set");
+ evas_object_move(timeout_btn, 0, 400);
+ evas_object_resize(timeout_btn, 100, 50);
+ evas_object_show(timeout_btn);
+ evas_object_smart_callback_add(timeout_btn, "clicked", _timeout_set_cb, efl_ui_popup);
+
efl_content_set(efl_ui_popup, btn);
}