aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaeun Choi <jaeun12.choi@samsung.com>2018-04-23 17:35:45 +0900
committerJaeun Choi <jaeun12.choi@samsung.com>2018-04-23 17:35:45 +0900
commit6428eb5f10479eba23e151398faa2921684ac472 (patch)
treedc2996e487ce0e14f0a0fc82dabaad1661630550
parentefl_ui_pager: add unpack related methods to eo file (diff)
downloadefl-devs/eunue/pager.tar.gz
efl_ui_pager: remove finalizedevs/eunue/pager
-rw-r--r--src/lib/elementary/efl_ui_pager.c59
-rw-r--r--src/lib/elementary/efl_ui_pager.eo1
2 files changed, 26 insertions, 34 deletions
diff --git a/src/lib/elementary/efl_ui_pager.c b/src/lib/elementary/efl_ui_pager.c
index 4fae16ff0e..27e6da1bf2 100644
--- a/src/lib/elementary/efl_ui_pager.c
+++ b/src/lib/elementary/efl_ui_pager.c
@@ -281,30 +281,6 @@ _event_handler_del(Eo *obj, Efl_Ui_Pager_Data *pd)
pd->event = NULL;
}
-EOLIAN static Eo *
-_efl_ui_pager_efl_object_constructor(Eo *obj,
- Efl_Ui_Pager_Data *pd)
-{
- obj = efl_constructor(efl_super(obj, MY_CLASS));
-
- elm_widget_sub_object_parent_add(obj);
-
- pd->cnt = 0;
- pd->loop = EFL_UI_PAGER_LOOP_DISABLED;
-
- pd->curr.page = 0;
- pd->curr.pos = 0.0;
-
- pd->transition = NULL;
-
- pd->page_spec.sz.w = -1;
- pd->page_spec.sz.h = -1;
-
- elm_widget_can_focus_set(obj, EINA_TRUE);
-
- return obj;
-}
-
static void
_resize_cb(void *data, const Efl_Event *ev)
{
@@ -352,26 +328,44 @@ _move_cb(void *data, const Efl_Event *ev)
}
EOLIAN static Eo *
-_efl_ui_pager_efl_object_finalize(Eo *obj,
- Efl_Ui_Pager_Data *pd)
+_efl_ui_pager_efl_object_constructor(Eo *obj,
+ Efl_Ui_Pager_Data *pd)
{
- Efl_Ui_Theme_Apply theme_apply;
+ ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
- obj = efl_finalize(efl_super(obj, MY_CLASS));
+ if (!elm_widget_theme_klass_get(obj))
+ elm_widget_theme_klass_set(obj, "pager");
- theme_apply = efl_ui_layout_theme_set(obj, "pager", "base",
- efl_ui_widget_style_get(obj));
+ obj = efl_constructor(efl_super(obj, MY_CLASS));
- if (theme_apply == EFL_UI_THEME_APPLY_FAILED)
+ if (!elm_widget_theme_object_set(obj, wd->resize_obj,
+ elm_widget_theme_klass_get(obj),
+ elm_widget_theme_element_get(obj),
+ elm_widget_theme_style_get(obj)))
CRI("Failed to set layout!");
+ elm_widget_sub_object_parent_add(obj);
+
+ pd->cnt = 0;
+ pd->loop = EFL_UI_PAGER_LOOP_DISABLED;
+
+ pd->curr.page = 0;
+ pd->curr.pos = 0.0;
+
+ pd->transition = NULL;
+ pd->indicator = NULL;
+
+ pd->page_spec.sz.w = -1;
+ pd->page_spec.sz.h = -1;
+
+ elm_widget_can_focus_set(obj, EINA_TRUE);
+
pd->page_root = efl_add(EFL_CANVAS_GROUP_CLASS, evas_object_evas_get(obj));
efl_content_set(efl_part(obj, "page_root"), pd->page_root);
efl_event_callback_add(pd->page_root, EFL_GFX_EVENT_RESIZE, _resize_cb, pd);
efl_event_callback_add(pd->page_root, EFL_GFX_EVENT_MOVE, _move_cb, pd);
- /* default setting (no transition) */
pd->page_box = efl_add(EFL_UI_BOX_CLASS, obj);
efl_canvas_group_member_add(pd->page_root, pd->page_box);
@@ -386,7 +380,6 @@ _efl_ui_pager_efl_object_finalize(Eo *obj,
efl_canvas_group_member_add(pd->page_root, pd->backclip);
evas_object_static_clip_set(pd->backclip, EINA_TRUE);
efl_gfx_visible_set(pd->backclip, EINA_FALSE);
- /* default setting end */
return obj;
}
diff --git a/src/lib/elementary/efl_ui_pager.eo b/src/lib/elementary/efl_ui_pager.eo
index a9da1243e7..75d050dc1c 100644
--- a/src/lib/elementary/efl_ui_pager.eo
+++ b/src/lib/elementary/efl_ui_pager.eo
@@ -85,7 +85,6 @@ class Efl.Ui.Pager (Efl.Ui.Layout, Efl.Pack.Linear)
}
implements {
Efl.Object.constructor;
- Efl.Object.finalize;
Efl.Container.content_count;
Efl.Pack.pack_clear; //TODO
Efl.Pack.unpack_all; //TODO