summaryrefslogtreecommitdiff
path: root/src/bin/elementary/test_popup.c
diff options
context:
space:
mode:
authorTaehyub Kim <taehyub.kim@samsung.com>2017-07-28 14:48:48 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2017-11-28 17:15:42 +0900
commit996a975506edbbc695ecf6ec5e6c4c58a1ac1a50 (patch)
tree1cbcbfb46edfe385bacc723559a185d225b7caeb /src/bin/elementary/test_popup.c
parente8ae4178d846136e9993828c3523002c24cdf015 (diff)
efl_ui_popup: add Efl.Ui.Popup class
Summary: add initial code for Efl.Ui.Popup class Test Plan: 1. run elementary_test -to efluipopup Reviewers: Jaehyun_Cho, Blackmole, thiepha, woohyun, cedric Reviewed By: Jaehyun_Cho Subscribers: bu5hm4n, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5037
Diffstat (limited to '')
-rw-r--r--src/bin/elementary/test_popup.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/bin/elementary/test_popup.c b/src/bin/elementary/test_popup.c
index 173b1bf555..dbbb1a8891 100644
--- a/src/bin/elementary/test_popup.c
+++ b/src/bin/elementary/test_popup.c
@@ -938,3 +938,31 @@ test_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
938 evas_object_resize(win, 480, 400); 938 evas_object_resize(win, 480, 400);
939 evas_object_show(win); 939 evas_object_show(win);
940} 940}
941
942void
943test_efl_ui_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
944{
945 Evas_Object *win;
946
947 win = elm_win_util_standard_add("Efl UI Popup", "Efl UI Popup");
948 elm_win_autodel_set(win, EINA_TRUE);
949
950 evas_object_resize(win, 320, 320);
951 evas_object_show(win);
952
953 Evas_Object *efl_ui_popup= efl_add(EFL_UI_POPUP_CLASS, win);
954
955 evas_object_move(efl_ui_popup, 80, 80);
956 evas_object_resize(efl_ui_popup, 160, 160);
957 evas_object_show(efl_ui_popup);
958
959 int x, y, w, h;
960 evas_object_geometry_get(efl_ui_popup, &x, &y, &w, &h);
961 printf("efl_ui_popup: %d %d %d %d\n", x, y, w, h);
962
963 Evas_Object *btn = elm_button_add(efl_ui_popup);
964 elm_object_text_set(btn, "Efl.Ui.Popup content");
965 evas_object_show(btn);
966
967 efl_content_set(efl_ui_popup, btn);
968}