aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2017-10-24 18:34:36 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2017-11-21 14:01:48 +0900
commit47c306a58b7670a00b2e7cb59427a9cdbf7aa1d6 (patch)
tree1ec87c3acdd7608391ada876c2d652a3375ab3b8
parentefl_ui_popup: remove parent_window_get method (diff)
downloadefl-47c306a58b7670a00b2e7cb59427a9cdbf7aa1d6.tar.gz
efl_ui_popup: Code refactoring to replace legacy APIs
-rw-r--r--src/lib/elementary/efl_ui_popup.c139
-rw-r--r--src/lib/elementary/efl_ui_popup.eo1
-rw-r--r--src/lib/elementary/efl_ui_popup_alert.c73
-rw-r--r--src/lib/elementary/efl_ui_popup_alert.eo1
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_scroll.c87
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_scroll.eo1
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_scroll_private.h13
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_text.c31
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_text.eo1
-rw-r--r--src/lib/elementary/efl_ui_popup_alert_text_private.h6
-rw-r--r--src/lib/elementary/efl_ui_popup_anchor.c251
-rw-r--r--src/lib/elementary/efl_ui_popup_anchor.eo1
-rw-r--r--src/lib/elementary/efl_ui_popup_anchor_private.h2
-rw-r--r--src/lib/elementary/efl_ui_popup_private.h10
14 files changed, 285 insertions, 332 deletions
diff --git a/src/lib/elementary/efl_ui_popup.c b/src/lib/elementary/efl_ui_popup.c
index dc23b28b6a..6f225da034 100644
--- a/src/lib/elementary/efl_ui_popup.c
+++ b/src/lib/elementary/efl_ui_popup.c
@@ -11,16 +11,15 @@
#define MY_CLASS EFL_UI_POPUP_CLASS
#define MY_CLASS_NAME "Efl.Ui.Popup"
-#define MY_CLASS_NAME_LEGACY "elm_popup"
static void
_bg_clicked_cb(void *data,
- Evas_Object *o EINA_UNUSED,
- const char *emission EINA_UNUSED,
- const char *source EINA_UNUSED)
+ Eo *o EINA_UNUSED,
+ const char *emission EINA_UNUSED,
+ const char *source EINA_UNUSED)
{
- Evas_Object *obj = data;
- efl_event_callback_legacy_call(obj, EFL_UI_POPUP_EVENT_BG_CLICKED, NULL);
+ Eo *obj = data;
+ efl_event_callback_call(obj, EFL_UI_POPUP_EVENT_BG_CLICKED, NULL);
}
EOLIAN static void
@@ -31,41 +30,44 @@ _efl_ui_popup_efl_gfx_position_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, E
}
static void
-_calc_align(Evas_Object *obj)
+_calc_align(Eo *obj)
{
Efl_Ui_Popup_Data *pd = efl_data_scope_get(obj, MY_CLASS);
- Evas_Coord x, y, w, h;
- evas_object_geometry_get(pd->win_parent, &x, &y, &w, &h);
+ Eina_Rect p_geom = efl_gfx_geometry_get(pd->win_parent);
- x = 0;
- y = 0;
+ efl_gfx_position_set(pd->event_bg, EINA_POSITION2D(0, 0));
+ efl_gfx_size_set(pd->event_bg, EINA_SIZE2D(p_geom.w, p_geom.h));
- evas_object_move(pd->event_bg, x, y);
- evas_object_resize(pd->event_bg, w, h);
+ Eina_Rect o_geom = efl_gfx_geometry_get(obj);
Evas_Coord pw, ph;
- evas_object_geometry_get(obj, NULL, NULL, &pw, &ph);
+ pw = p_geom.w;
+ ph = p_geom.h;
+
+ Evas_Coord ow, oh;
+ ow = o_geom.w;
+ oh = o_geom.h;
switch (pd->align)
{
- case EFL_UI_POPUP_ALIGN_CENTER:
- efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw ) / 2), y + ((h - ph) / 2)));
- break;
- case EFL_UI_POPUP_ALIGN_LEFT:
- efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x, y + ((h - ph) / 2)));
- break;
- case EFL_UI_POPUP_ALIGN_RIGHT:
- efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + (w - pw), ((h - ph) / 2)));
- break;
- case EFL_UI_POPUP_ALIGN_TOP:
- efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw) / 2), y));
- break;
- case EFL_UI_POPUP_ALIGN_BOTTOM:
- efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw) / 2), y + (h - ph)));
- break;
- default:
- break;
+ case EFL_UI_POPUP_ALIGN_CENTER:
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D((pw - ow ) / 2, (ph - oh) / 2));
+ break;
+ case EFL_UI_POPUP_ALIGN_LEFT:
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(0, (ph - oh) / 2));
+ break;
+ case EFL_UI_POPUP_ALIGN_RIGHT:
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(pw - ow, (ph - oh) / 2));
+ break;
+ case EFL_UI_POPUP_ALIGN_TOP:
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D((pw - ow) / 2, 0));
+ break;
+ case EFL_UI_POPUP_ALIGN_BOTTOM:
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D((pw - ow) / 2, ph - oh));
+ break;
+ default:
+ break;
}
}
@@ -76,9 +78,8 @@ _parent_geom_cb(void *data, const Efl_Event *ev EINA_UNUSED)
}
EOLIAN static void
-_efl_ui_popup_elm_widget_widget_parent_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, Evas_Object *parent EINA_UNUSED)
+_efl_ui_popup_elm_widget_widget_parent_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, Eo *parent EINA_UNUSED)
{
- Evas_Coord x, y, w, h;
pd->win_parent = efl_provider_find(obj, EFL_UI_WIN_CLASS);
if (!pd->win_parent)
{
@@ -86,27 +87,28 @@ _efl_ui_popup_elm_widget_widget_parent_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_U
return;
}
- evas_object_geometry_get(pd->win_parent, &x, &y, &w, &h);
- evas_object_move(pd->event_bg, x, y);
- evas_object_resize(pd->event_bg, w, h);
+ Eina_Rect p_geom = efl_gfx_geometry_get(pd->win_parent);
+
+ efl_gfx_position_set(pd->event_bg, EINA_POSITION2D(p_geom.x, p_geom.y));
+ efl_gfx_size_set(pd->event_bg, EINA_SIZE2D(p_geom.w, p_geom.h));
efl_event_callback_add(pd->win_parent, EFL_GFX_EVENT_RESIZE, _parent_geom_cb, obj);
efl_event_callback_add(pd->win_parent, EFL_GFX_EVENT_MOVE, _parent_geom_cb, obj);
}
EOLIAN static Eina_Bool
-_efl_ui_popup_efl_container_content_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, Evas_Object *content)
+_efl_ui_popup_efl_container_content_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, Eo *content)
{
return efl_content_set(efl_part(obj, "elm.swallow.content"), content);
}
-EOLIAN static Evas_Object*
+EOLIAN static Eo*
_efl_ui_popup_efl_container_content_get(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED)
{
return efl_content_get(efl_part(obj, "elm.swallow.content"));
}
-EOLIAN static Evas_Object*
+EOLIAN static Eo*
_efl_ui_popup_efl_container_content_unset(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED)
{
return efl_content_unset(efl_part(obj, "elm.swallow.content"));
@@ -128,8 +130,8 @@ _efl_ui_popup_align_get(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd)
static Eina_Bool
_timer_cb(void *data)
{
- Evas_Object *popup = data;
- evas_object_del(popup);
+ Eo *popup = data;
+ efl_del(popup);
return ECORE_CALLBACK_CANCEL;
}
@@ -210,7 +212,7 @@ _efl_ui_popup_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Popup_Data *pd)
EOLIAN static void
_efl_ui_popup_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Popup_Data *pd)
{
- ELM_SAFE_FREE(pd->event_bg, evas_object_del);
+ ELM_SAFE_DEL(pd->event_bg);
efl_event_callback_del(pd->win_parent, EFL_GFX_EVENT_RESIZE, _parent_geom_cb, obj);
efl_event_callback_del(pd->win_parent, EFL_GFX_EVENT_MOVE, _parent_geom_cb, obj);
@@ -225,38 +227,35 @@ _efl_ui_popup_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED)
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
edje_object_size_min_restricted_calc
- (wd->resize_obj, &minw, &minh, minw, minh);
- evas_object_size_hint_min_set(obj, minw, minh);
-
- Evas_Coord w, h;
- evas_object_geometry_get(obj, NULL, NULL, &w, &h);
-
- if ((minw > w) && (minh < h))
- evas_object_resize(obj, minw, h);
- else if ((minw < w) && (minh > h))
- evas_object_resize(obj, w, minh);
- else if ((minw >= w) && (minh >= h))
- evas_object_resize(obj, minw, minh);
+ (wd->resize_obj, &minw, &minh, minw, minh);
+ efl_gfx_size_hint_min_set(obj, EINA_SIZE2D(minw, minh));
+
+ Eina_Size2D size = efl_gfx_size_get(obj);
+
+ Eina_Size2D new_size;
+ new_size.w = (minw > size.w ? minw : size.w);
+ new_size.h = (minh > size.h ? minh : size.h);
+ efl_gfx_size_set(obj, new_size);
}
EOLIAN static void
_efl_ui_popup_bg_set(Eo *obj, Efl_Ui_Popup_Data *pd, const char* file, const char* group)
{
- Evas_Object *prev_obj = edje_object_part_swallow_get(pd->event_bg, "elm.swallow.image");
+ Eo *prev_obj = edje_object_part_swallow_get(pd->event_bg, "elm.swallow.image");
if (prev_obj)
- {
- edje_object_part_unswallow(pd->event_bg, prev_obj);
- evas_object_del(prev_obj);
- }
+ {
+ edje_object_part_unswallow(pd->event_bg, prev_obj);
+ efl_del(prev_obj);
+ }
- Evas_Object *image = elm_image_add(obj);
+ Eo *image = elm_image_add(obj);
Eina_Bool ret = elm_image_file_set(image, file, group);
if (!ret)
- {
- edje_object_signal_emit(pd->event_bg, "elm,state,image,hidden", "elm");
- evas_object_del(image);
- return;
- }
+ {
+ edje_object_signal_emit(pd->event_bg, "elm,state,image,hidden", "elm");
+ efl_del(image);
+ return;
+ }
edje_object_part_swallow(pd->event_bg, "elm.swallow.image", image);
edje_object_signal_emit(pd->event_bg, "elm,state,image,visible", "elm");
}
@@ -266,19 +265,13 @@ _efl_ui_popup_bg_repeat_events_set(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd, E
{
pd->bg_repeat_events = repeat;
- evas_object_repeat_events_set(pd->event_bg, repeat);
+ efl_canvas_object_repeat_events_set(pd->event_bg, repeat);
}
EOLIAN static Eina_Bool
_efl_ui_popup_bg_repeat_events_get(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd)
{
- return pd->bg_repeat_events;
-}
-
-EOLIAN static void
-_efl_ui_popup_class_constructor(Efl_Class *klass)
-{
- evas_smart_legacy_type_register(MY_CLASS_NAME, klass);
+ return pd->bg_repeat_events;
}
/* Internal EO APIs and hidden overrides */
diff --git a/src/lib/elementary/efl_ui_popup.eo b/src/lib/elementary/efl_ui_popup.eo
index 7af22ae33f..cf70162e84 100644
--- a/src/lib/elementary/efl_ui_popup.eo
+++ b/src/lib/elementary/efl_ui_popup.eo
@@ -57,7 +57,6 @@ class Efl.Ui.Popup(Efl.Ui.Layout)
}
}
implements {
- class.constructor;
Efl.Gfx.position { set; }
Efl.Gfx.visible { set; }
Elm.Widget.widget_parent { set; }
diff --git a/src/lib/elementary/efl_ui_popup_alert.c b/src/lib/elementary/efl_ui_popup_alert.c
index 2b38d34ba3..64d1ff6b92 100644
--- a/src/lib/elementary/efl_ui_popup_alert.c
+++ b/src/lib/elementary/efl_ui_popup_alert.c
@@ -22,11 +22,8 @@ _efl_ui_popup_alert_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Data *pd
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
edje_object_size_min_restricted_calc
- (wd->resize_obj, &minw, &minh, minw, minh);
- evas_object_size_hint_min_set(obj, minw, minh);
-
- Evas_Coord w, h;
- evas_object_geometry_get(obj, NULL, NULL, &w, &h);
+ (wd->resize_obj, &minw, &minh, minw, minh);
+ efl_gfx_size_hint_min_set(obj, EINA_SIZE2D(minw, minh));
}
static Eina_Bool
@@ -69,33 +66,33 @@ _efl_ui_popup_alert_text_get(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Alert_Data *pd, c
}
static Eina_Bool
-_efl_ui_popup_alert_content_set(Eo *obj, Efl_Ui_Popup_Alert_Data *pd EINA_UNUSED, const char *part, Evas_Object *content)
+_efl_ui_popup_alert_content_set(Eo *obj, Efl_Ui_Popup_Alert_Data *pd EINA_UNUSED, const char *part, Eo *content)
{
return efl_content_set(efl_part(efl_super(obj, MY_CLASS), part), content);
}
-Evas_Object *
+Eo *
_efl_ui_popup_alert_content_get(Eo *obj, Efl_Ui_Popup_Alert_Data *pd EINA_UNUSED, const char *part)
{
return efl_content_get(efl_part(efl_super(obj, MY_CLASS), part));
}
-static Evas_Object *
+static Eo *
_efl_ui_popup_alert_content_unset(Eo *obj, Efl_Ui_Popup_Alert_Data *pd EINA_UNUSED, const char *part)
{
return efl_content_unset(efl_part(efl_super(obj, MY_CLASS), part));
}
static void
-_positive_button_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
+_positive_button_clicked_cb(void *data, Eo *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
- Eo *popup_obj = data;
- efl_event_callback_call(popup_obj, EFL_UI_POPUP_ALERT_EVENT_CLICKED, (void *)(uintptr_t)EFL_UI_POPUP_ALERT_BUTTON_POSITIVE);
+ Eo *popup_obj = data;
+ efl_event_callback_call(popup_obj, EFL_UI_POPUP_ALERT_EVENT_CLICKED, (void *)(uintptr_t)EFL_UI_POPUP_ALERT_BUTTON_POSITIVE);
}
static void
-_negative_button_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
+_negative_button_clicked_cb(void *data, Eo *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Eo *popup_obj = data;
@@ -103,7 +100,7 @@ _negative_button_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
}
static void
-_user_button_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED,
+_user_button_clicked_cb(void *data, Eo *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Eo *popup_obj = data;
@@ -115,7 +112,7 @@ _efl_ui_popup_alert_button_set(Eo *obj, Efl_Ui_Popup_Alert_Data *pd, Efl_Ui_Popu
{
if (pd->button[type])
{
- evas_object_del(pd->button[type]);
+ efl_del(pd->button[type]);
pd->button[type] = NULL;
}
pd->button[type] = elm_button_add(obj);
@@ -123,32 +120,32 @@ _efl_ui_popup_alert_button_set(Eo *obj, Efl_Ui_Popup_Alert_Data *pd, Efl_Ui_Popu
switch (type)
{
- case EFL_UI_POPUP_ALERT_BUTTON_POSITIVE:
- evas_object_smart_callback_add(pd->button[type], "clicked",
- _positive_button_clicked_cb,
- obj);
- break;
- case EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE:
- evas_object_smart_callback_add(pd->button[type], "clicked",
- _negative_button_clicked_cb,
- obj);
- break;
- case EFL_UI_POPUP_ALERT_BUTTON_USER:
- evas_object_smart_callback_add(pd->button[type], "clicked",
- _user_button_clicked_cb,
- obj);
- break;
- default:
- break;
+ case EFL_UI_POPUP_ALERT_BUTTON_POSITIVE:
+ evas_object_smart_callback_add(pd->button[type], "clicked",
+ _positive_button_clicked_cb,
+ obj);
+ break;
+ case EFL_UI_POPUP_ALERT_BUTTON_NEGATIVE:
+ evas_object_smart_callback_add(pd->button[type], "clicked",
+ _negative_button_clicked_cb,
+ obj);
+ break;
+ case EFL_UI_POPUP_ALERT_BUTTON_USER:
+ evas_object_smart_callback_add(pd->button[type], "clicked",
+ _user_button_clicked_cb,
+ obj);
+ break;
+ default:
+ break;
}
- Evas_Object * cur_content = efl_content_unset(efl_part(obj, "buttons"));
+ Eo *cur_content = efl_content_unset(efl_part(obj, "buttons"));
if (cur_content)
{
efl_content_unset(efl_part(cur_content, "elm.swallow.button1"));
efl_content_unset(efl_part(cur_content, "elm.swallow.button2"));
efl_content_unset(efl_part(cur_content, "elm.swallow.button3"));
- evas_object_del(cur_content);
+ efl_del(cur_content);
}
if (pd->button[EFL_UI_POPUP_ALERT_BUTTON_POSITIVE]
@@ -211,8 +208,8 @@ _efl_ui_popup_alert_button_set(Eo *obj, Efl_Ui_Popup_Alert_Data *pd, Efl_Ui_Popu
efl_content_set(efl_part(obj, "buttons"), pd->button_layout[EFL_UI_POPUP_ALERT_BUTTON_1]);
}
- elm_layout_signal_emit(obj, "elm,buttons,show", "elm");
- elm_layout_sizing_eval(obj);
+ elm_layout_signal_emit(obj, "elm,buttons,show", "elm");
+ elm_layout_sizing_eval(obj);
}
EOLIAN static void
@@ -238,12 +235,6 @@ _efl_ui_popup_alert_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Popup_Alert_Data
efl_canvas_group_del(efl_super(obj, MY_CLASS));
}
-EOLIAN static void
-_efl_ui_popup_alert_class_constructor(Efl_Class *klass)
-{
- evas_smart_legacy_type_register(MY_CLASS_NAME, klass);
-}
-
/* Efl.Part begin */
ELM_PART_OVERRIDE(efl_ui_popup_alert, EFL_UI_POPUP_ALERT, Efl_Ui_Popup_Alert_Data)
diff --git a/src/lib/elementary/efl_ui_popup_alert.eo b/src/lib/elementary/efl_ui_popup_alert.eo
index 27c9cc3828..8929e1729d 100644
--- a/src/lib/elementary/efl_ui_popup_alert.eo
+++ b/src/lib/elementary/efl_ui_popup_alert.eo
@@ -21,7 +21,6 @@ class Efl.Ui.Popup.Alert(Efl.Ui.Popup)
}
}
implements {
- class.constructor;
Efl.Part.part;
}
events {
diff --git a/src/lib/elementary/efl_ui_popup_alert_scroll.c b/src/lib/elementary/efl_ui_popup_alert_scroll.c
index 290fc0fda2..7dc388bd97 100644
--- a/src/lib/elementary/efl_ui_popup_alert_scroll.c
+++ b/src/lib/elementary/efl_ui_popup_alert_scroll.c
@@ -13,53 +13,52 @@
#define MY_CLASS_NAME "Efl.Ui.Popup.Alert.Scroll"
static void
-_scroller_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd, Evas_Coord minw, Evas_Coord minh)
+_scroller_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd, Eina_Size2D min)
{
- Evas_Coord w, h;
- evas_object_geometry_get(obj, NULL, NULL, &w, &h);
+ Eina_Rect geom = efl_gfx_geometry_get(obj);
pd->is_sizing_eval = EINA_TRUE;
if (pd->is_expandable_w && !pd->is_expandable_h)
{
- if ((pd->max_scroll_w > -1) && (minw > pd->max_scroll_w))
+ if ((pd->max_scroll.w > -1) && (min.w > pd->max_scroll.w))
{
elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
- evas_object_resize(obj, pd->max_scroll_w, h);
+ efl_gfx_size_set(obj, EINA_SIZE2D(pd->max_scroll.w, geom.h));
}
}
else if (!pd->is_expandable_w && pd->is_expandable_h)
{
- if ((pd->max_scroll_h > -1) && (minh > pd->max_scroll_h))
+ if ((pd->max_scroll.h > -1) && (min.h > pd->max_scroll.h))
{
elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
- evas_object_resize(obj, w, pd->max_scroll_h);
+ efl_gfx_size_set(obj, EINA_SIZE2D(geom.w, pd->max_scroll.h));
}
- }
+ }
else if (pd->is_expandable_w && pd->is_expandable_h)
- {
- Eina_Bool wdir, hdir;
- wdir = hdir = EINA_FALSE;
-
- if ((pd->max_scroll_w > -1) && (minw > pd->max_scroll_w))
- wdir = 1;
- if ((pd->max_scroll_h > -1) && (minh > pd->max_scroll_h))
- hdir = 1;
- if (wdir && !hdir)
- {
- elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_TRUE);
- evas_object_resize(obj, pd->max_scroll_w, h);
- }
- else if (!wdir && hdir)
- {
+ {
+ Eina_Bool wdir, hdir;
+ wdir = hdir = EINA_FALSE;
+
+ if ((pd->max_scroll.w > -1) && (min.w > pd->max_scroll.w))
+ wdir = 1;
+ if ((pd->max_scroll.h > -1) && (min.h > pd->max_scroll.h))
+ hdir = 1;
+ if (wdir && !hdir)
+ {
+ elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_TRUE);
+ efl_gfx_size_set(obj, EINA_SIZE2D(pd->max_scroll.w, geom.h));
+ }
+ else if (!wdir && hdir)
+ {
elm_scroller_content_min_limit(pd->scroller, EINA_TRUE, EINA_FALSE);
- evas_object_resize(obj, w, pd->max_scroll_h);
- }
- else if(wdir && hdir)
- {
+ efl_gfx_size_set(obj, EINA_SIZE2D(geom.w, pd->max_scroll.h));
+ }
+ else if(wdir && hdir)
+ {
elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
- evas_object_resize(obj, pd->max_scroll_w, pd->max_scroll_h);
- }
+ efl_gfx_size_set(obj, pd->max_scroll);
+ }
}
pd->is_sizing_eval = EINA_FALSE;
@@ -77,14 +76,14 @@ _efl_ui_popup_alert_scroll_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Sc
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
edje_object_size_min_restricted_calc
- (wd->resize_obj, &minw, &minh, minw, minh);
- evas_object_size_hint_min_set(obj, minw, minh);
+ (wd->resize_obj, &minw, &minh, minw, minh);
+ efl_gfx_size_hint_min_set(obj, EINA_SIZE2D(minw, minh));
- _scroller_sizing_eval(obj, pd, minw, minh);
+ _scroller_sizing_eval(obj, pd, EINA_SIZE2D(minw, minh));
}
static Eina_Bool
-_efl_ui_popup_alert_scroll_content_set(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd, const char *part, Evas_Object *content)
+_efl_ui_popup_alert_scroll_content_set(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd, const char *part, Eo *content)
{
//For efl_content_set()
if (part && !strcmp(part, "elm.swallow.content"))
@@ -92,8 +91,8 @@ _efl_ui_popup_alert_scroll_content_set(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *
pd->content = content;
//Content should have expand propeties since the scroller is not layout layer
- evas_object_size_hint_weight_set(pd->content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(pd->content, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ efl_gfx_size_hint_weight_set(pd->content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ efl_gfx_size_hint_align_set(pd->content, EVAS_HINT_FILL, EVAS_HINT_FILL);
efl_content_set(efl_part(pd->scroller, "default"), pd->content);
}
@@ -105,7 +104,7 @@ _efl_ui_popup_alert_scroll_content_set(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *
return EINA_TRUE;
}
-Evas_Object *
+Eo *
_efl_ui_popup_alert_scroll_content_get(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd, const char *part)
{
//For efl_content_set()
@@ -115,13 +114,13 @@ _efl_ui_popup_alert_scroll_content_get(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *
return efl_content_get(efl_part(efl_super(obj, MY_CLASS), part));
}
-static Evas_Object *
+static Eo *
_efl_ui_popup_alert_scroll_content_unset(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd, const char *part)
{
//For efl_content_set()
if (part && !strcmp(part, "elm.swallow.content"))
{
- Evas_Object *content = pd->content;
+ Eo *content = pd->content;
if (!content) return content;
pd->content = NULL;
@@ -179,8 +178,7 @@ static void
_efl_ui_popup_alert_scroll_efl_gfx_size_hint_hint_max_set(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd, Eina_Size2D size)
{
efl_gfx_size_hint_max_set(efl_super(obj, MY_CLASS), size);
- pd->max_scroll_w = size.w;
- pd->max_scroll_h = size.h;
+ pd->max_scroll = size;
elm_layout_sizing_eval(obj);
}
@@ -198,8 +196,7 @@ _efl_ui_popup_alert_scroll_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Popup_Aler
efl_content_set(efl_part(efl_super(obj, MY_CLASS), "elm.swallow.content"), pd->scroller);
- pd->max_scroll_w = -1;
- pd->max_scroll_h = -1;
+ pd->max_scroll = EINA_SIZE2D(-1, -1);
}
EOLIAN static void
@@ -208,12 +205,6 @@ _efl_ui_popup_alert_scroll_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Popup_Aler
efl_canvas_group_del(efl_super(obj, MY_CLASS));
}
-EOLIAN static void
-_efl_ui_popup_alert_scroll_class_constructor(Efl_Class *klass)
-{
- evas_smart_legacy_type_register(MY_CLASS_NAME, klass);
-}
-
/* Efl.Part begin */
ELM_PART_OVERRIDE(efl_ui_popup_alert_scroll, EFL_UI_POPUP_ALERT_SCROLL, Efl_Ui_Popup_Alert_Scroll_Data)
diff --git a/src/lib/elementary/efl_ui_popup_alert_scroll.eo b/src/lib/elementary/efl_ui_popup_alert_scroll.eo
index 00dadb3b54..69d3bbb9fe 100644
--- a/src/lib/elementary/efl_ui_popup_alert_scroll.eo
+++ b/src/lib/elementary/efl_ui_popup_alert_scroll.eo
@@ -17,7 +17,6 @@ class Efl.Ui.Popup.Alert.Scroll(Efl.Ui.Popup.Alert)
}
}
implements {
- class.constructor;
Efl.Gfx.Size.Hint.hint_max { set; }
Efl.Part.part;
}
diff --git a/src/lib/elementary/efl_ui_popup_alert_scroll_private.h b/src/lib/elementary/efl_ui_popup_alert_scroll_private.h
index 3eb4005b97..99a000146a 100644
--- a/src/lib/elementary/efl_ui_popup_alert_scroll_private.h
+++ b/src/lib/elementary/efl_ui_popup_alert_scroll_private.h
@@ -6,13 +6,12 @@
typedef struct _Efl_Ui_Popup_Alert_Scroll_Data Efl_Ui_Popup_Alert_Scroll_Data;
struct _Efl_Ui_Popup_Alert_Scroll_Data
{
- Evas_Object *scroller;
- Evas_Object *content;
- Evas_Coord max_scroll_w;
- Evas_Coord max_scroll_h;
- Eina_Bool is_expandable_w;
- Eina_Bool is_expandable_h;
- Eina_Bool is_sizing_eval;
+ Eo *scroller;
+ Eo *content;
+ Eina_Size2D max_scroll;
+ Eina_Bool is_expandable_w : 1;
+ Eina_Bool is_expandable_h : 1;
+ Eina_Bool is_sizing_eval : 1;
};
#endif
diff --git a/src/lib/elementary/efl_ui_popup_alert_text.c b/src/lib/elementary/efl_ui_popup_alert_text.c
index 808aa7a8cb..e3acce5fbd 100644
--- a/src/lib/elementary/efl_ui_popup_alert_text.c
+++ b/src/lib/elementary/efl_ui_popup_alert_text.c
@@ -15,16 +15,15 @@
static void
_scroller_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd, Evas_Coord minh)
{
- Evas_Coord w, h;
- evas_object_geometry_get(obj, NULL, NULL, &w, &h);
+ Eina_Rect geom = efl_gfx_geometry_get(obj);
if (pd->is_expandable_h)
{
- if ((pd->max_scroll_h > -1) && (minh > pd->max_scroll_h))
- {
- elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
- evas_object_resize(obj, w, pd->max_scroll_h);
- }
+ if ((pd->max_scroll_h > -1) && (minh > pd->max_scroll_h))
+ {
+ elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
+ efl_gfx_size_set(obj, EINA_SIZE2D(geom.w, pd->max_scroll_h));
+ }
}
}
@@ -38,24 +37,24 @@ _efl_ui_popup_alert_text_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Text
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
edje_object_size_min_restricted_calc(wd->resize_obj, &minw, &minh, minw, minh);
- evas_object_size_hint_min_set(obj, minw, minh);
+ efl_gfx_size_hint_min_set(obj, EINA_SIZE2D(minw, minh));
_scroller_sizing_eval(obj, pd, minh);
}
static Eina_Bool
-_efl_ui_popup_alert_text_content_set(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd EINA_UNUSED, const char *part, Evas_Object *content)
+_efl_ui_popup_alert_text_content_set(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd EINA_UNUSED, const char *part, Eo *content)
{
return efl_content_set(efl_part(efl_super(obj, MY_CLASS), part), content);
}
-Evas_Object *
+Eo *
_efl_ui_popup_alert_text_content_get(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd EINA_UNUSED, const char *part)
{
return efl_content_get(efl_part(efl_super(obj, MY_CLASS), part));
}
-static Evas_Object *
+static Eo *
_efl_ui_popup_alert_text_content_unset(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd EINA_UNUSED, const char *part)
{
return efl_content_unset(efl_part(efl_super(obj, MY_CLASS), part));
@@ -70,8 +69,8 @@ _efl_ui_popup_alert_text_text_set(Eo *obj, Efl_Ui_Popup_Alert_Text_Data *pd, con
{
pd->message = elm_label_add(obj);
elm_label_line_wrap_set(pd->message, ELM_WRAP_MIXED);
- evas_object_size_hint_weight_set(pd->message, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
+ efl_gfx_size_hint_weight_set(pd->message, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
efl_content_set(efl_part(pd->scroller, "default"), pd->message);
}
elm_object_text_set(pd->message, label);
@@ -155,12 +154,6 @@ _efl_ui_popup_alert_text_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Popup_Alert_
efl_canvas_group_del(efl_super(obj, MY_CLASS));
}
-EOLIAN static void
-_efl_ui_popup_alert_text_class_constructor(Efl_Class *klass)
-{
- evas_smart_legacy_type_register(MY_CLASS_NAME, klass);
-}
-
/* Efl.Part begin */
ELM_PART_OVERRIDE(efl_ui_popup_alert_text, EFL_UI_POPUP_ALERT_TEXT, Efl_Ui_Popup_Alert_Text_Data)
diff --git a/src/lib/elementary/efl_ui_popup_alert_text.eo b/src/lib/elementary/efl_ui_popup_alert_text.eo
index 5c2539f8b1..988c727680 100644
--- a/src/lib/elementary/efl_ui_popup_alert_text.eo
+++ b/src/lib/elementary/efl_ui_popup_alert_text.eo
@@ -16,7 +16,6 @@ class Efl.Ui.Popup.Alert.Text(Efl.Ui.Popup.Alert, Efl.Text)
}
}
implements {
- class.constructor;
Efl.Gfx.Size.Hint.hint_max { set;}
Efl.Text.text { get; set; }
Efl.Part.part;
diff --git a/src/lib/elementary/efl_ui_popup_alert_text_private.h b/src/lib/elementary/efl_ui_popup_alert_text_private.h
index d15f1b8e2d..b911199b5d 100644
--- a/src/lib/elementary/efl_ui_popup_alert_text_private.h
+++ b/src/lib/elementary/efl_ui_popup_alert_text_private.h
@@ -6,10 +6,10 @@
typedef struct _Efl_Ui_Popup_Alert_Text_Data Efl_Ui_Popup_Alert_Text_Data;
struct _Efl_Ui_Popup_Alert_Text_Data
{
- Evas_Object *scroller;
- Evas_Object *message;
+ Eo *scroller;
+ Eo *message;
Evas_Coord max_scroll_h;
- Eina_Bool is_expandable_h;
+ Eina_Bool is_expandable_h : 1;
};
#endif
diff --git a/src/lib/elementary/efl_ui_popup_anchor.c b/src/lib/elementary/efl_ui_popup_anchor.c
index 20ff3d80fa..e9a79b8380 100644
--- a/src/lib/elementary/efl_ui_popup_anchor.c
+++ b/src/lib/elementary/efl_ui_popup_anchor.c
@@ -14,26 +14,23 @@
#define MY_CLASS_NAME "Efl.Ui.Popup.Anchor"
static void
-_anchor_calc(Evas_Object *obj)
+_anchor_calc(Eo *obj)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
EFL_UI_POPUP_ANCHOR_DATA_GET(obj, sd);
- Evas_Coord_Rectangle anchor_geom = {0, 0, 0, 0};
- Evas_Coord_Size popup_size = {0, 0};
- Evas_Coord_Size parent_size = {0, 0};
Eina_Position2D pos = {0, 0};
- Evas_Object *parent = efl_provider_find(obj, EFL_UI_WIN_CLASS);
+ Eo *parent = efl_provider_find(obj, EFL_UI_WIN_CLASS);
if (!parent)
{
ERR("Cannot find window parent");
return;
}
- evas_object_geometry_get(sd->anchor, &anchor_geom.x, &anchor_geom.y, &anchor_geom.w, &anchor_geom.h);
- evas_object_geometry_get(obj, NULL, NULL, &popup_size.w, &popup_size.h);
- evas_object_geometry_get(parent, NULL, NULL, &parent_size.w, &parent_size.h);
+ Eina_Rect a_geom = efl_gfx_geometry_get(sd->anchor);
+ Eina_Rect o_geom = efl_gfx_geometry_get(obj);
+ Eina_Rect p_geom = efl_gfx_geometry_get(parent);
sd->used_align = EFL_UI_POPUP_ALIGN_NONE;
@@ -58,56 +55,56 @@ _anchor_calc(Evas_Object *obj)
switch(cur_align)
{
- case EFL_UI_POPUP_ALIGN_TOP:
- pos.x = anchor_geom.x + ((anchor_geom.w - popup_size.w) / 2);
- pos.y = (anchor_geom.y - popup_size.h);
-
- if ((pos.y < 0) ||
- ((pos.y + popup_size.h) > parent_size.h) ||
- (popup_size.w > parent_size.w))
- continue;
- break;
-
- case EFL_UI_POPUP_ALIGN_LEFT:
- pos.x = (anchor_geom.x - popup_size.w);
- pos.y = anchor_geom.y + ((anchor_geom.h - popup_size.h) / 2);
-
- if ((pos.x < 0) ||
- ((pos.x + popup_size.w) > parent_size.w) ||
- (popup_size.h > parent_size.h))
- continue;
- break;
-
- case EFL_UI_POPUP_ALIGN_RIGHT:
- pos.x = (anchor_geom.x + anchor_geom.w);
- pos.y = anchor_geom.y + ((anchor_geom.h - popup_size.h) / 2);
-
- if ((pos.x < 0) ||
- ((pos.x + popup_size.w) > parent_size.w) ||
- (popup_size.h > parent_size.h))
- continue;
- break;
-
- case EFL_UI_POPUP_ALIGN_BOTTOM:
- pos.x = anchor_geom.x + ((anchor_geom.w - popup_size.w) / 2);
- pos.y = (anchor_geom.y + anchor_geom.h);
-
- if ((pos.y < 0) ||
- ((pos.y + popup_size.h) > parent_size.h) ||
- (popup_size.w > parent_size.w))
- continue;
- break;
-
- case EFL_UI_POPUP_ALIGN_CENTER:
- pos.x = anchor_geom.x + ((anchor_geom.w - popup_size.w) / 2);
- pos.y = anchor_geom.y + ((anchor_geom.h - popup_size.h) / 2);
-
- if (popup_size.w > parent_size.w || popup_size.h > parent_size.h)
- continue;
- break;
-
- default:
- continue;
+ case EFL_UI_POPUP_ALIGN_TOP:
+ pos.x = a_geom.x + ((a_geom.w - o_geom.w) / 2);
+ pos.y = (a_geom.y - o_geom.h);
+
+ if ((pos.y < 0) ||
+ ((pos.y + o_geom.h) > p_geom.h) ||
+ (o_geom.w > p_geom.w))
+ continue;
+ break;
+
+ case EFL_UI_POPUP_ALIGN_LEFT:
+ pos.x = (a_geom.x - o_geom.w);
+ pos.y = a_geom.y + ((a_geom.h - o_geom.h) / 2);
+
+ if ((pos.x < 0) ||
+ ((pos.x + o_geom.w) > p_geom.w) ||
+ (o_geom.h > p_geom.h))
+ continue;
+ break;
+
+ case EFL_UI_POPUP_ALIGN_RIGHT:
+ pos.x = (a_geom.x + a_geom.w);
+ pos.y = a_geom.y + ((a_geom.h - o_geom.h) / 2);
+
+ if ((pos.x < 0) ||
+ ((pos.x + o_geom.w) > p_geom.w) ||
+ (o_geom.h > p_geom.h))
+ continue;
+ break;
+
+ case EFL_UI_POPUP_ALIGN_BOTTOM:
+ pos.x = a_geom.x + ((a_geom.w - o_geom.w) / 2);
+ pos.y = (a_geom.y + a_geom.h);
+
+ if ((pos.y < 0) ||
+ ((pos.y + o_geom.h) > p_geom.h) ||
+ (o_geom.w > p_geom.w))
+ continue;
+ break;
+
+ case EFL_UI_POPUP_ALIGN_CENTER:
+ pos.x = a_geom.x + ((a_geom.w - o_geom.w) / 2);
+ pos.y = a_geom.y + ((a_geom.h - o_geom.h) / 2);
+
+ if ((o_geom.w > p_geom.w) || (o_geom.h > p_geom.h))
+ continue;
+ break;
+
+ default:
+ continue;
}
if ((cur_align == EFL_UI_POPUP_ALIGN_TOP) ||
@@ -116,11 +113,11 @@ _anchor_calc(Evas_Object *obj)
{
if (pos.x < 0)
pos.x = 0;
- if ((pos.x + popup_size.w) > parent_size.w)
- pos.x = parent_size.w - popup_size.w;
+ if ((pos.x + o_geom.w) > p_geom.w)
+ pos.x = p_geom.w - o_geom.w;
- if ((pos.x > (anchor_geom.x + anchor_geom.w)) ||
- ((pos.x + popup_size.w) < anchor_geom.x))
+ if ((pos.x > (a_geom.x + a_geom.w)) ||
+ ((pos.x + o_geom.w) < a_geom.x))
continue;
}
@@ -130,11 +127,11 @@ _anchor_calc(Evas_Object *obj)
{
if (pos.y < 0)
pos.y = 0;
- if ((pos.y + popup_size.h) > parent_size.h)
- pos.y = parent_size.h - popup_size.h;
+ if ((pos.y + o_geom.h) > p_geom.h)
+ pos.y = p_geom.h - o_geom.h;
- if ((pos.y > (anchor_geom.y + anchor_geom.h)) ||
- ((pos.y + popup_size.h) < anchor_geom.y))
+ if ((pos.y > (a_geom.y + a_geom.h)) ||
+ ((pos.y + o_geom.h) < a_geom.y))
continue;
}
@@ -146,56 +143,56 @@ _anchor_calc(Evas_Object *obj)
for (int idx = 0; idx < 6; idx++)
{
- Efl_Ui_Popup_Align cur_align;
-
- if (idx == 0)
- cur_align = sd->align;
- else
- cur_align = sd->priority[idx - 1];
-
- if (cur_align == EFL_UI_POPUP_ALIGN_NONE)
- continue;
-
- switch(cur_align)
- {
- case EFL_UI_POPUP_ALIGN_TOP:
- pos.x = anchor_geom.x + ((anchor_geom.w - popup_size.w) / 2);
- pos.y = (anchor_geom.y - popup_size.h);
- sd->used_align = cur_align;
- goto end;
- break;
-
- case EFL_UI_POPUP_ALIGN_LEFT:
- pos.x = (anchor_geom.x - popup_size.w);
- pos.y = anchor_geom.y + ((anchor_geom.h - popup_size.h) / 2);
- sd->used_align = cur_align;
- goto end;
- break;
-
- case EFL_UI_POPUP_ALIGN_RIGHT:
- pos.x = (anchor_geom.x + anchor_geom.w);
- pos.y = anchor_geom.y + ((anchor_geom.h - popup_size.h) / 2);
- sd->used_align = cur_align;
- goto end;
- break;
-
- case EFL_UI_POPUP_ALIGN_BOTTOM:
- pos.x = anchor_geom.x + ((anchor_geom.w - popup_size.w) / 2);
- pos.y = (anchor_geom.y + anchor_geom.h);
- sd->used_align = cur_align;
- goto end;
- break;
-
- case EFL_UI_POPUP_ALIGN_CENTER:
- pos.x = anchor_geom.x + ((anchor_geom.w - popup_size.w) / 2);
- pos.y = anchor_geom.y + ((anchor_geom.h - popup_size.h) / 2);
- sd->used_align = cur_align;
- goto end;
- break;
-
- default:
- break;
- }
+ Efl_Ui_Popup_Align cur_align;
+
+ if (idx == 0)
+ cur_align = sd->align;
+ else
+ cur_align = sd->priority[idx - 1];
+
+ if (cur_align == EFL_UI_POPUP_ALIGN_NONE)
+ continue;
+
+ switch(cur_align)
+ {
+ case EFL_UI_POPUP_ALIGN_TOP:
+ pos.x = a_geom.x + ((a_geom.w - o_geom.w) / 2);
+ pos.y = (a_geom.y - o_geom.h);
+ sd->used_align = cur_align;
+ goto end;
+ break;
+
+ case EFL_UI_POPUP_ALIGN_LEFT:
+ pos.x = (a_geom.x - o_geom.w);
+ pos.y = a_geom.y + ((a_geom.h - o_geom.h) / 2);
+ sd->used_align = cur_align;
+ goto end;
+ break;
+
+ case EFL_UI_POPUP_ALIGN_RIGHT:
+ pos.x = (a_geom.x + a_geom.w);
+ pos.y = a_geom.y + ((a_geom.h - o_geom.h) / 2);
+ sd->used_align = cur_align;
+ goto end;
+ break;
+
+ case EFL_UI_POPUP_ALIGN_BOTTOM:
+ pos.x = a_geom.x + ((a_geom.w - o_geom.w) / 2);
+ pos.y = (a_geom.y + a_geom.h);
+ sd->used_align = cur_align;
+ goto end;
+ break;
+
+ case EFL_UI_POPUP_ALIGN_CENTER:
+ pos.x = a_geom.x + ((a_geom.w - o_geom.w) / 2);
+ pos.y = a_geom.y + ((a_geom.h - o_geom.h) / 2);
+ sd->used_align = cur_align;
+ goto end;
+ break;
+
+ default:
+ break;
+ }
}
end:
@@ -214,7 +211,7 @@ _anchor_del_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
EFL_UI_POPUP_ANCHOR_DATA_GET(data, sd);
- Evas_Object *parent = efl_provider_find(data, EFL_UI_WIN_CLASS);
+ Eo *parent = efl_provider_find(data, EFL_UI_WIN_CLASS);
if (!parent)
{
ERR("Cannot find window parent");
@@ -228,13 +225,13 @@ _anchor_del_cb(void *data, const Efl_Event *ev EINA_UNUSED)
}
static void
-_anchor_detach(Evas_Object *obj)
+_anchor_detach(Eo *obj)
{
EFL_UI_POPUP_ANCHOR_DATA_GET(obj, sd);
if (sd->anchor == NULL) return;
- Evas_Object *parent = efl_provider_find(obj, EFL_UI_WIN_CLASS);
+ Eo *parent = efl_provider_find(obj, EFL_UI_WIN_CLASS);
if (!parent)
{
ERR("Cannot find window parent");
@@ -248,20 +245,20 @@ _anchor_detach(Evas_Object *obj)
}
EOLIAN static void
-_efl_ui_popup_anchor_anchor_set(Eo *obj, Efl_Ui_Popup_Anchor_Data *pd, Evas_Object *anchor)
+_efl_ui_popup_anchor_anchor_set(Eo *obj, Efl_Ui_Popup_Anchor_Data *pd, Eo *anchor)
{
_anchor_detach(obj);
pd->anchor = anchor;
if (anchor == NULL)
- efl_ui_popup_align_set(efl_super(obj, MY_CLASS), pd->align);
+ efl_ui_popup_align_set(efl_super(obj, MY_CLASS), pd->align);
else
{
efl_ui_popup_align_set(efl_super(obj, MY_CLASS), EFL_UI_POPUP_ALIGN_NONE);
_anchor_calc(obj);
- Evas_Object *parent = efl_provider_find(obj, EFL_UI_WIN_CLASS);
+ Eo *parent = efl_provider_find(obj, EFL_UI_WIN_CLASS);
if (!parent)
{
ERR("Cannot find window parent");
@@ -338,9 +335,9 @@ _efl_ui_popup_anchor_efl_ui_popup_align_set(Eo *obj, Efl_Ui_Popup_Anchor_Data *p
{
pd->align = type;
if (pd->anchor == NULL)
- efl_ui_popup_align_set(efl_super(obj, MY_CLASS), type);
+ efl_ui_popup_align_set(efl_super(obj, MY_CLASS), type);
else
- _anchor_calc(obj);
+ _anchor_calc(obj);
}
EOLIAN static Efl_Ui_Popup_Align
@@ -370,12 +367,6 @@ _efl_ui_popup_anchor_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Popup_Anchor_Dat
efl_canvas_group_del(efl_super(obj, MY_CLASS));
}
-EOLIAN static void
-_efl_ui_popup_anchor_class_constructor(Efl_Class *klass)
-{
- evas_smart_legacy_type_register(MY_CLASS_NAME, klass);
-}
-
#define EFL_UI_POPUP_ANCHOR_EXTRA_OPS \
EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_popup_anchor), \
ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_popup_anchor)
diff --git a/src/lib/elementary/efl_ui_popup_anchor.eo b/src/lib/elementary/efl_ui_popup_anchor.eo
index 1dc422dba0..f3957d098c 100644
--- a/src/lib/elementary/efl_ui_popup_anchor.eo
+++ b/src/lib/elementary/efl_ui_popup_anchor.eo
@@ -33,7 +33,6 @@ class Efl.Ui.Popup.Anchor(Efl.Ui.Popup)
}
}
implements {
- class.constructor;
Efl.Gfx.position { set; }
Efl.Ui.Popup.align { set; get; }
}
diff --git a/src/lib/elementary/efl_ui_popup_anchor_private.h b/src/lib/elementary/efl_ui_popup_anchor_private.h
index e99094c591..81e0c60364 100644
--- a/src/lib/elementary/efl_ui_popup_anchor_private.h
+++ b/src/lib/elementary/efl_ui_popup_anchor_private.h
@@ -6,7 +6,7 @@
typedef struct _Efl_Ui_Popup_Anchor_Data Efl_Ui_Popup_Anchor_Data;
struct _Efl_Ui_Popup_Anchor_Data
{
- Evas_Object *anchor;
+ Eo *anchor;
Efl_Ui_Popup_Align align;
Efl_Ui_Popup_Align priority[5];
Efl_Ui_Popup_Align used_align;
diff --git a/src/lib/elementary/efl_ui_popup_private.h b/src/lib/elementary/efl_ui_popup_private.h
index 8256ec5fce..a36eea4905 100644
--- a/src/lib/elementary/efl_ui_popup_private.h
+++ b/src/lib/elementary/efl_ui_popup_private.h
@@ -4,12 +4,12 @@
typedef struct _Efl_Ui_Popup_Data Efl_Ui_Popup_Data;
struct _Efl_Ui_Popup_Data
{
- Evas_Object *win_parent;
- Evas_Object *event_bg;
+ Eo *win_parent;
+ Eo *event_bg;
Efl_Ui_Popup_Align align;
- Ecore_Timer *timer;
- double timeout;
- Eina_Bool bg_repeat_events : 1;
+ Ecore_Timer *timer;
+ double timeout;
+ Eina_Bool bg_repeat_events : 1;
};
#endif