summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinYong Park <j4939.park@samsung.com>2017-09-06 11:09:08 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2017-11-28 17:15:42 +0900
commit2e9042fae130ce9e6f7706b72c3d217cd506733a (patch)
treec501c18cb193d31d72966209a51d340ee1625746
parent0365bf1e139f704be2fef79506cd4c732a31b12a (diff)
efl_ui_popup: remove efl_ui_popup_position_set
Summary: Remove efl_ui_popup_position_set. Its functionality is replaced with efl_gfx_position_set. Test Plan: 1. elementary_test -to efluipopup Reviewers: Jaehyun_Cho, herb, thiepha, woohyun, jpeg, cedric Reviewed By: Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D5129
-rw-r--r--src/bin/elementary/test_popup.c2
-rw-r--r--src/lib/elementary/efl_ui_popup.c18
-rw-r--r--src/lib/elementary/efl_ui_popup.eo9
3 files changed, 7 insertions, 22 deletions
diff --git a/src/bin/elementary/test_popup.c b/src/bin/elementary/test_popup.c
index afc29a5..2bb6ede 100644
--- a/src/bin/elementary/test_popup.c
+++ b/src/bin/elementary/test_popup.c
@@ -1006,7 +1006,7 @@ static void
1006_position_set_cb(void *data, Evas_Object *obj EINA_UNUSED, 1006_position_set_cb(void *data, Evas_Object *obj EINA_UNUSED,
1007 void *event_info EINA_UNUSED) 1007 void *event_info EINA_UNUSED)
1008{ 1008{
1009 efl_ui_popup_position_set(data, 0, 0); 1009 evas_object_move(data, 0, 0);
1010} 1010}
1011 1011
1012void 1012void
diff --git a/src/lib/elementary/efl_ui_popup.c b/src/lib/elementary/efl_ui_popup.c
index a81ff67..5db1415 100644
--- a/src/lib/elementary/efl_ui_popup.c
+++ b/src/lib/elementary/efl_ui_popup.c
@@ -26,6 +26,7 @@ _bg_clicked_cb(void *data,
26EOLIAN static void 26EOLIAN static void
27_efl_ui_popup_efl_gfx_position_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, Eina_Position2D pos) 27_efl_ui_popup_efl_gfx_position_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, Eina_Position2D pos)
28{ 28{
29 pd->align = EFL_UI_POPUP_ALIGN_NONE;
29 efl_gfx_position_set(efl_super(obj, MY_CLASS), pos); 30 efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
30} 31}
31 32
@@ -52,19 +53,19 @@ _calc_align(Evas_Object *obj)
52 switch (align) 53 switch (align)
53 { 54 {
54 case EFL_UI_POPUP_ALIGN_CENTER: 55 case EFL_UI_POPUP_ALIGN_CENTER:
55 evas_object_move(obj, x + ((w - pw ) / 2), y + ((h - ph) / 2)); 56 efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw ) / 2), y + ((h - ph) / 2)));
56 break; 57 break;
57 case EFL_UI_POPUP_ALIGN_LEFT: 58 case EFL_UI_POPUP_ALIGN_LEFT:
58 evas_object_move(obj, x, y + ((h - ph) / 2)); 59 efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x, y + ((h - ph) / 2)));
59 break; 60 break;
60 case EFL_UI_POPUP_ALIGN_RIGHT: 61 case EFL_UI_POPUP_ALIGN_RIGHT:
61 evas_object_move(obj, x + (w - pw), ((h - ph) / 2)); 62 efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + (w - pw), ((h - ph) / 2)));
62 break; 63 break;
63 case EFL_UI_POPUP_ALIGN_TOP: 64 case EFL_UI_POPUP_ALIGN_TOP:
64 evas_object_move(obj, x + ((w - pw) / 2), y); 65 efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw) / 2), y));
65 break; 66 break;
66 case EFL_UI_POPUP_ALIGN_BOTTOM: 67 case EFL_UI_POPUP_ALIGN_BOTTOM:
67 evas_object_move(obj, x + ((w - pw) / 2), y + (h - ph)); 68 efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw) / 2), y + (h - ph)));
68 break; 69 break;
69 default: 70 default:
70 break; 71 break;
@@ -120,13 +121,6 @@ _efl_ui_popup_parent_window_get(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd)
120 return pd->win_parent; 121 return pd->win_parent;
121} 122}
122 123
123EOLIAN void
124_efl_ui_popup_position_set(Eo *obj, Efl_Ui_Popup_Data *pd, int x, int y)
125{
126 evas_object_move(obj, x, y);
127 pd->align = EFL_UI_POPUP_ALIGN_NONE;
128}
129
130EOLIAN static void 124EOLIAN static void
131_efl_ui_popup_align_set(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd, Efl_Ui_Popup_Align type) 125_efl_ui_popup_align_set(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd, Efl_Ui_Popup_Align type)
132{ 126{
diff --git a/src/lib/elementary/efl_ui_popup.eo b/src/lib/elementary/efl_ui_popup.eo
index 14a30ca..a1a1664 100644
--- a/src/lib/elementary/efl_ui_popup.eo
+++ b/src/lib/elementary/efl_ui_popup.eo
@@ -39,15 +39,6 @@ class Efl.Ui.Popup(Efl.Ui.Layout)
39 repeat: bool; [[If $true, events are passed to lower objects.]] 39 repeat: bool; [[If $true, events are passed to lower objects.]]
40 } 40 }
41 } 41 }
42 @property position {
43 set {
44 [[Set the current popup position.]]
45 }
46 values {
47 x: int;
48 y: int;
49 }
50 }
51 @property align { 42 @property align {
52 set { 43 set {
53 [[ Set the popup alignment.]] 44 [[ Set the popup alignment.]]