summaryrefslogtreecommitdiff
path: root/src/bin/elementary
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
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 'src/bin/elementary')
-rw-r--r--src/bin/elementary/test.c2
-rw-r--r--src/bin/elementary/test_popup.c28
2 files changed, 30 insertions, 0 deletions
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index c643b8a4e1..63e902e902 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -274,6 +274,7 @@ void test_naviframe_complex(void *data, Evas_Object *obj, void *event_info);
274void test_datetime(void *data, Evas_Object *obj, void *event_info); 274void test_datetime(void *data, Evas_Object *obj, void *event_info);
275void test_ui_clock(void *data, Evas_Object *obj, void *event_info); 275void test_ui_clock(void *data, Evas_Object *obj, void *event_info);
276void test_popup(void *data, Evas_Object *obj, void *event_info); 276void test_popup(void *data, Evas_Object *obj, void *event_info);
277void test_efl_ui_popup(void *data, Evas_Object *obj, void *event_info);
277void test_dayselector(void *data, Evas_Object *obj, void *event_info); 278void test_dayselector(void *data, Evas_Object *obj, void *event_info);
278void test_image(void *data, Evas_Object *obj, void *event_info); 279void test_image(void *data, Evas_Object *obj, void *event_info);
279void test_image_scale_type(void *data, Evas_Object *obj, void *event_info); 280void test_image_scale_type(void *data, Evas_Object *obj, void *event_info);
@@ -1042,6 +1043,7 @@ add_tests:
1042 ADD_TEST(NULL, "Popups", "Tooltip 3", test_tooltip3); 1043 ADD_TEST(NULL, "Popups", "Tooltip 3", test_tooltip3);
1043 ADD_TEST(NULL, "Popups", "Tooltip 4", test_tooltip4); 1044 ADD_TEST(NULL, "Popups", "Tooltip 4", test_tooltip4);
1044 ADD_TEST(NULL, "Popups", "Popup", test_popup); 1045 ADD_TEST(NULL, "Popups", "Popup", test_popup);
1046 ADD_TEST(NULL, "Popups", "Efl UI Popup", test_efl_ui_popup);
1045 1047
1046 //------------------------------// 1048 //------------------------------//
1047 ADD_TEST(NULL, "Times & Dates", "Calendar", test_calendar); 1049 ADD_TEST(NULL, "Times & Dates", "Calendar", test_calendar);
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}