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
This commit is contained in:
JinYong Park 2017-09-06 11:09:08 +09:00 committed by Jaehyun Cho
parent 0365bf1e13
commit 2e9042fae1
3 changed files with 7 additions and 22 deletions

View File

@ -1006,7 +1006,7 @@ static void
_position_set_cb(void *data, Evas_Object *obj EINA_UNUSED, _position_set_cb(void *data, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED) void *event_info EINA_UNUSED)
{ {
efl_ui_popup_position_set(data, 0, 0); evas_object_move(data, 0, 0);
} }
void void

View File

@ -26,6 +26,7 @@ _bg_clicked_cb(void *data,
EOLIAN static void EOLIAN static void
_efl_ui_popup_efl_gfx_position_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, Eina_Position2D pos) _efl_ui_popup_efl_gfx_position_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, Eina_Position2D pos)
{ {
pd->align = EFL_UI_POPUP_ALIGN_NONE;
efl_gfx_position_set(efl_super(obj, MY_CLASS), pos); efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
} }
@ -52,19 +53,19 @@ _calc_align(Evas_Object *obj)
switch (align) switch (align)
{ {
case EFL_UI_POPUP_ALIGN_CENTER: case EFL_UI_POPUP_ALIGN_CENTER:
evas_object_move(obj, x + ((w - pw ) / 2), y + ((h - ph) / 2)); efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw ) / 2), y + ((h - ph) / 2)));
break; break;
case EFL_UI_POPUP_ALIGN_LEFT: case EFL_UI_POPUP_ALIGN_LEFT:
evas_object_move(obj, x, y + ((h - ph) / 2)); efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x, y + ((h - ph) / 2)));
break; break;
case EFL_UI_POPUP_ALIGN_RIGHT: case EFL_UI_POPUP_ALIGN_RIGHT:
evas_object_move(obj, x + (w - pw), ((h - ph) / 2)); efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + (w - pw), ((h - ph) / 2)));
break; break;
case EFL_UI_POPUP_ALIGN_TOP: case EFL_UI_POPUP_ALIGN_TOP:
evas_object_move(obj, x + ((w - pw) / 2), y); efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw) / 2), y));
break; break;
case EFL_UI_POPUP_ALIGN_BOTTOM: case EFL_UI_POPUP_ALIGN_BOTTOM:
evas_object_move(obj, x + ((w - pw) / 2), y + (h - ph)); efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw) / 2), y + (h - ph)));
break; break;
default: default:
break; break;
@ -120,13 +121,6 @@ _efl_ui_popup_parent_window_get(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd)
return pd->win_parent; return pd->win_parent;
} }
EOLIAN void
_efl_ui_popup_position_set(Eo *obj, Efl_Ui_Popup_Data *pd, int x, int y)
{
evas_object_move(obj, x, y);
pd->align = EFL_UI_POPUP_ALIGN_NONE;
}
EOLIAN static void EOLIAN static void
_efl_ui_popup_align_set(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd, Efl_Ui_Popup_Align type) _efl_ui_popup_align_set(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd, Efl_Ui_Popup_Align type)
{ {

View File

@ -39,15 +39,6 @@ class Efl.Ui.Popup(Efl.Ui.Layout)
repeat: bool; [[If $true, events are passed to lower objects.]] repeat: bool; [[If $true, events are passed to lower objects.]]
} }
} }
@property position {
set {
[[Set the current popup position.]]
}
values {
x: int;
y: int;
}
}
@property align { @property align {
set { set {
[[ Set the popup alignment.]] [[ Set the popup alignment.]]