From: Hermet Park Date: Wed, 28 Sep 2016 12:02:22 +0000 (+0900) Subject: Replace Evas_Object to Eo X-Git-Tag: submit/tizen/20160930.094404^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F36%2F90136%2F2;p=platform%2Fcore%2Fuifw%2Fui-viewmgr.git Replace Evas_Object to Eo handle over the leftovers... Change-Id: I3f3be2f0633bae2632127e7252c9d08aeb44bc52 --- diff --git a/src/lib/efl/UiBaseKeyListener.cpp b/src/lib/efl/UiBaseKeyListener.cpp index 34ea818..8d0d002 100644 --- a/src/lib/efl/UiBaseKeyListener.cpp +++ b/src/lib/efl/UiBaseKeyListener.cpp @@ -29,7 +29,7 @@ class UiBaseKeyListenerImpl protected: UiBaseKeyListener *keyListener = nullptr; UiBaseViewmgr *viewmgr = nullptr; - Evas_Object *keyGrabber = nullptr; + Eo *keyGrabber = nullptr; public: UiBaseKeyListenerImpl(UiBaseKeyListener *key_listener, UiBaseViewmgr *viewmgr); @@ -39,7 +39,7 @@ public: bool term(); void eventProc(Evas_Event_Key_Down *ev); UiBaseViewmgr *getViewmgr() { return this->viewmgr; } - Evas_Object *getKeygrabObj() { return this->keyGrabber; } + Eo *getKeygrabObj() { return this->keyGrabber; } }; } @@ -93,13 +93,13 @@ bool UiBaseKeyListenerImpl::init() return false; } - Evas_Object *keyGrabRect = evas_object_rectangle_add(e); + Eo *keyGrabRect = evas_object_rectangle_add(e); if (!keyGrabRect) { LOGE("Failed to create a key grabber rectangle"); return false; } - evas_object_event_callback_add(keyGrabRect, EVAS_CALLBACK_KEY_UP, [](void *data, Evas *e, Evas_Object *obj, void *event_info) -> void + evas_object_event_callback_add(keyGrabRect, EVAS_CALLBACK_KEY_UP, [](void *data, Evas *e, Eo *obj, void *event_info) -> void { auto ev = static_cast(event_info); auto keyListener = static_cast(data); @@ -148,7 +148,7 @@ bool UiBaseKeyListener::init() return this->_impl->init(); } -Evas_Object *UiBaseKeyListener::getKeygrabObj() +Eo *UiBaseKeyListener::getKeygrabObj() { return this->_impl->getKeygrabObj(); } diff --git a/src/lib/efl/UiBaseView.cpp b/src/lib/efl/UiBaseView.cpp index 0dc38a5..356d12b 100644 --- a/src/lib/efl/UiBaseView.cpp +++ b/src/lib/efl/UiBaseView.cpp @@ -31,7 +31,7 @@ class UiBaseViewImpl; /* External class Implementation */ /***********************************************************************************************/ -static void _contentDelCb(void *data, Evas *e, Evas_Object *obj, void *event_info) +static void _contentDelCb(void *data, Evas *e, Eo *obj, void *event_info) { auto view = static_cast(data); view->unsetContent(); @@ -46,9 +46,9 @@ UiBaseView::~UiBaseView() { } -bool UiBaseView::setContent(Evas_Object *content) +bool UiBaseView::setContent(Eo *content) { - Evas_Object *pcontent = this->unsetContent(); + Eo *pcontent = this->unsetContent(); if (pcontent) { evas_object_del(pcontent); @@ -62,9 +62,9 @@ bool UiBaseView::setContent(Evas_Object *content) return true; } -Evas_Object *UiBaseView::unsetContent() +Eo *UiBaseView::unsetContent() { - Evas_Object *obj = UiIfaceView::unsetContent(); + Eo *obj = UiIfaceView::unsetContent(); if (obj) { evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL, _contentDelCb); @@ -74,7 +74,7 @@ Evas_Object *UiBaseView::unsetContent() return obj; } -Evas_Object *UiBaseView::getBase() +Eo *UiBaseView::getBase() { auto viewmgr = UI_BASE_VIEWMGR; @@ -85,7 +85,7 @@ Evas_Object *UiBaseView::getBase() return viewmgr->getBase(); } -Evas_Object *UiBaseView ::getParent() +Eo *UiBaseView ::getParent() { auto viewmgr = UI_BASE_VIEWMGR; diff --git a/src/lib/efl/UiBaseViewmgr.cpp b/src/lib/efl/UiBaseViewmgr.cpp index 9da19c3..18a01dc 100644 --- a/src/lib/efl/UiBaseViewmgr.cpp +++ b/src/lib/efl/UiBaseViewmgr.cpp @@ -63,7 +63,7 @@ public: UiBaseView *pushView(UiBaseView *view); bool popView(); - Evas_Object *getBase() { + Eo *getBase() { return this->_layout; } @@ -95,7 +95,7 @@ bool UiBaseViewmgrImpl::_createBaseLayout(Elm_Scroller *scroller, const char *st //Push Finished Event elm_layout_signal_callback_add(layout, "push,finished", "viewmgr", - [](void *data, Evas_Object *obj, const char *emission, const char *source) -> void + [](void *data, Eo *obj, const char *emission, const char *source) -> void { auto viewmgr = static_cast(data); UiBaseView *pview = viewmgr->getView(viewmgr->getViewCount() - 2); @@ -107,7 +107,7 @@ bool UiBaseViewmgrImpl::_createBaseLayout(Elm_Scroller *scroller, const char *st //Pop Finished Event elm_layout_signal_callback_add(layout, "pop,finished", "viewmgr", - [](void *data, Evas_Object *obj, const char *emission, const char *source) -> void + [](void *data, Eo *obj, const char *emission, const char *source) -> void { auto viewmgr = static_cast(data); UiBaseView *pview = viewmgr->getView(viewmgr->getViewCount() - 2); @@ -158,13 +158,13 @@ Elm_Layout *UiBaseViewmgrImpl::_setTransitionLayout(string transitionStyle) void UiBaseViewmgrImpl::_activateTopView() { - Evas_Object *pcontent = elm_object_part_content_unset(this->getBase(), "content"); + Eo *pcontent = elm_object_part_content_unset(this->getBase(), "content"); if (pcontent) evas_object_hide(pcontent); auto view = this->_viewmgr->getLastView(); //In case of UiBaseView, it doesn't have any base form. It uses viewmgr base instead. - Evas_Object *content; + Eo *content; if (view->getBase() == this->getBase()) { content = view->getContent(); } else { @@ -276,7 +276,7 @@ UiBaseViewmgrImpl::UiBaseViewmgrImpl(UiBaseViewmgr *viewmgr, const char *pkg, Ui elm_win_wm_rotation_available_rotations_set(this->_win, (const int *) (&rots), 4); } evas_object_smart_callback_add(this->_win, "wm,rotation,changed", - [](void *data, Evas_Object *obj, void *event_info) -> void + [](void *data, Eo *obj, void *event_info) -> void { int rot = elm_win_rotation_get(obj); @@ -293,7 +293,7 @@ UiBaseViewmgrImpl::UiBaseViewmgrImpl(UiBaseViewmgr *viewmgr, const char *pkg, Ui , this->_viewmgr); //Window is requested to delete. evas_object_smart_callback_add(this->_win, "delete,request", - [](void *data, Evas_Object *obj, void *event_info) -> void + [](void *data, Eo *obj, void *event_info) -> void { auto viewmgr = static_cast(data); delete(viewmgr); @@ -381,10 +381,10 @@ bool UiBaseViewmgrImpl::popView() } //Trigger Effects. - Evas_Object *prv = this->getBase() == pview->getBase() ? pview->getContent() : pview->getBase(); + Eo *prv = this->getBase() == pview->getBase() ? pview->getContent() : pview->getBase(); elm_layout_content_set(effect, "content", prv); - Evas_Object *cur = this->getBase() == view->getBase() ? view->getContent() : view->getBase(); + Eo *cur = this->getBase() == view->getBase() ? view->getContent() : view->getBase(); elm_layout_content_set(effect, "pcontent", cur); elm_layout_signal_emit(effect, "view,pop", "viewmgr"); @@ -427,10 +427,10 @@ UiBaseView * UiBaseViewmgrImpl::pushView(UiBaseView *view) } //Trigger Effects. - Evas_Object *prv = this->getBase() == pview->getBase() ? pview->getContent() : pview->getBase(); + Eo *prv = this->getBase() == pview->getBase() ? pview->getContent() : pview->getBase(); elm_layout_content_set(effect, "pcontent", prv); - Evas_Object *cur = this->getBase() == view->getBase() ? view->getContent() : view->getBase(); + Eo *cur = this->getBase() == view->getBase() ? view->getContent() : view->getBase(); elm_layout_content_set(effect, "content", cur); elm_layout_signal_emit(effect, "view,push", "viewmgr"); @@ -526,7 +526,7 @@ UiBaseView *UiBaseViewmgr::getLastView() return dynamic_cast(UiIfaceViewmgr::getLastView()); } -Evas_Object *UiBaseViewmgr::getBase() +Eo *UiBaseViewmgr::getBase() { return this->_impl->getBase(); } diff --git a/src/lib/efl/mobile/UiMenu.cpp b/src/lib/efl/mobile/UiMenu.cpp index 7adac3d..30b2af4 100644 --- a/src/lib/efl/mobile/UiMenu.cpp +++ b/src/lib/efl/mobile/UiMenu.cpp @@ -19,12 +19,12 @@ using namespace ui_viewmanager; using namespace efl_viewmanager; -static void _ctxpopupDismissedCb(void *data, Evas_Object *obj, void *event_info) +static void _ctxpopupDismissedCb(void *data, Eo *obj, void *event_info) { evas_object_hide(obj); } -static void _ctxpopupDelCb(void *data, Evas *e, Evas_Object *obj, void *event_info) +static void _ctxpopupDelCb(void *data, Evas *e, Eo *obj, void *event_info) { auto menu = static_cast(data); menu->unsetContent(); @@ -59,7 +59,7 @@ static bool _updateMenu(UiMenu *menu) return true; } -static void _winResizeCb(void *data, Evas *e, Evas_Object *obj, void *event_info) +static void _winResizeCb(void *data, Evas *e, Eo *obj, void *event_info) { auto menu = static_cast(data); if (!menu->isActivated()) return; @@ -158,7 +158,7 @@ Elm_Ctxpopup *UiMenu::unsetContent() return ctxpopup; } -Evas_Object *UiMenu::getBase() +Eo *UiMenu::getBase() { return this->getWindow(); } diff --git a/src/lib/efl/mobile/UiPopup.cpp b/src/lib/efl/mobile/UiPopup.cpp index 8c7a615..b6e7202 100644 --- a/src/lib/efl/mobile/UiPopup.cpp +++ b/src/lib/efl/mobile/UiPopup.cpp @@ -32,12 +32,12 @@ static bool _updatePopup(UiPopup *popup) return true; } -static void _popupDismissedCb(void *data, Evas_Object *obj, void *event_info) +static void _popupDismissedCb(void *data, Eo *obj, void *event_info) { evas_object_hide(obj); } -static void _popupDelCb(void *data, Evas *e, Evas_Object *obj, void *event_info) +static void _popupDelCb(void *data, Evas *e, Eo *obj, void *event_info) { auto popup = static_cast(data); popup->unsetContent(); @@ -127,7 +127,7 @@ Elm_Popup *UiPopup::unsetContent() return popup; } -Evas_Object *UiPopup::getBase() +Eo *UiPopup::getBase() { return this->getWindow(); } diff --git a/src/lib/efl/mobile/UiStandardView.cpp b/src/lib/efl/mobile/UiStandardView.cpp index a413765..f8117c3 100644 --- a/src/lib/efl/mobile/UiStandardView.cpp +++ b/src/lib/efl/mobile/UiStandardView.cpp @@ -45,7 +45,7 @@ public: explicit UiStandardViewImpl(UiStandardView *view); ~UiStandardViewImpl(); - bool setContent(Evas_Object *content); + bool setContent(Eo *content); bool setTitleBadge(const char *text); bool setSubtitle(const char *text); bool setTitleLeftBtn(Elm_Button *titleLeftBtn); @@ -57,7 +57,7 @@ public: Elm_Button *unsetTitleLeftBtn(); Elm_Button *unsetTitleRightBtn(); Elm_Toolbar *unsetToolbar(); - Evas_Object *getBase(); + Eo *getBase(); Elm_Button *getTitleLeftBtn() { return this->_titleLeftBtn; @@ -81,21 +81,21 @@ public: return false; \ } -static void _titleLeftBtnDelCb(void *data, Evas *e, Evas_Object *obj, void *event_info) +static void _titleLeftBtnDelCb(void *data, Evas *e, Eo *obj, void *event_info) { auto view = static_cast(data); view->unsetTitleLeftBtn(); } -static void _titleRightBtnDelCb(void *data, Evas *e, Evas_Object *obj, void *event_info) +static void _titleRightBtnDelCb(void *data, Evas *e, Eo *obj, void *event_info) { auto view = static_cast(data); view->unsetTitleRightBtn(); } -static void _toolbarDelCb(void *data, Evas *e, Evas_Object *obj, void *event_info) +static void _toolbarDelCb(void *data, Evas *e, Eo *obj, void *event_info) { auto view = static_cast(data); @@ -143,7 +143,7 @@ bool UiStandardViewImpl::_createLayout() if (!prevBtn) { LOGE("Failed to create a button = UiStandardView(%p)", this); } else { - evas_object_smart_callback_add(prevBtn, "clicked", [](void *data, Evas_Object *obj, void *event_info) -> void + evas_object_smart_callback_add(prevBtn, "clicked", [](void *data, Eo *obj, void *event_info) -> void { auto viewmgr = static_cast(data); viewmgr->popView(); @@ -170,7 +170,7 @@ UiStandardViewImpl::~UiStandardViewImpl() _destroyLayout(); } -bool UiStandardViewImpl::setContent(Evas_Object *content) +bool UiStandardViewImpl::setContent(Eo *content) { Elm_Layout *layout = this->getBase(); LAYOUT_VALIDATE(); @@ -385,7 +385,7 @@ Elm_Toolbar *UiStandardViewImpl::unsetToolbar() return toolbar; } -Evas_Object *UiStandardViewImpl::getBase() +Eo *UiStandardViewImpl::getBase() { if (!this->_layout) { this->_createLayout(); @@ -446,7 +446,7 @@ void UiStandardView::onUnload() evas_object_hide(layout); } -bool UiStandardView::setContent(Evas_Object *content) +bool UiStandardView::setContent(Eo *content) { UiView::setContent(content); @@ -490,9 +490,9 @@ void UiStandardView::setEventBlock(bool block) evas_object_freeze_events_set(this->getBase(), block); } -Evas_Object *UiStandardView::unsetContent() +Eo *UiStandardView::unsetContent() { - Evas_Object *pcontent = UiView::unsetContent(); + Eo *pcontent = UiView::unsetContent(); if (!pcontent) return nullptr; this->_impl->unsetContent(); @@ -515,7 +515,7 @@ Elm_Toolbar *UiStandardView::unsetToolbar() return this->_impl->unsetToolbar(); } -Evas_Object *UiStandardView::getBase() +Eo *UiStandardView::getBase() { return this->_impl->getBase(); } diff --git a/src/lib/efl/mobile/c/ui_menu.cpp b/src/lib/efl/mobile/c/ui_menu.cpp index 89db1dd..75498d6 100644 --- a/src/lib/efl/mobile/c/ui_menu.cpp +++ b/src/lib/efl/mobile/c/ui_menu.cpp @@ -52,7 +52,7 @@ EAPI bool ui_menu_get_activated(ui_menu *menu) return menu->isActivated(); } -EAPI Evas_Object *ui_menu_get_base(ui_menu *menu) +EAPI Eo *ui_menu_get_base(ui_menu *menu) { if (!validate_menu(menu)) return nullptr; return menu->getBase(); diff --git a/src/lib/efl/mobile/c/ui_popup.cpp b/src/lib/efl/mobile/c/ui_popup.cpp index a43ac50..ff2b032 100644 --- a/src/lib/efl/mobile/c/ui_popup.cpp +++ b/src/lib/efl/mobile/c/ui_popup.cpp @@ -63,7 +63,7 @@ EAPI bool ui_popup_get_activate(ui_popup *popup) return popup->isActivated(); } -EAPI Evas_Object *ui_popup_get_base(ui_popup *popup) +EAPI Eo *ui_popup_get_base(ui_popup *popup) { if (!validate_popup(popup)) return nullptr; return popup->getBase(); diff --git a/src/lib/efl/mobile/c/ui_standard_view.cpp b/src/lib/efl/mobile/c/ui_standard_view.cpp index 70e1b8b..a87fccf 100644 --- a/src/lib/efl/mobile/c/ui_standard_view.cpp +++ b/src/lib/efl/mobile/c/ui_standard_view.cpp @@ -175,7 +175,7 @@ EAPI bool ui_standard_view_set_title_badge(ui_standard_view *view, const char *b return capi_view->setTitleBadge(badge_text); } -EAPI bool ui_standard_view_set_title_right_btn(ui_standard_view *view, Evas_Object *title_right_btn) +EAPI bool ui_standard_view_set_title_right_btn(ui_standard_view *view, Eo *title_right_btn) { ui_standard_view_capi *capi_view; if (!(capi_view = validate_view(view))) return false; @@ -196,7 +196,7 @@ EAPI Elm_Button *ui_standard_view_unset_title_right_btn(ui_standard_view *view) return capi_view->unsetTitleRightBtn(); } -EAPI bool ui_standard_view_set_title_left_btn(ui_standard_view *view, Evas_Object *title_left_btn) +EAPI bool ui_standard_view_set_title_left_btn(ui_standard_view *view, Eo *title_left_btn) { ui_standard_view_capi *capi_view; if (!(capi_view = validate_view(view))) return false; diff --git a/src/lib/efl/mobile/c/ui_view.cpp b/src/lib/efl/mobile/c/ui_view.cpp index 10a9bf1..66bc07b 100644 --- a/src/lib/efl/mobile/c/ui_view.cpp +++ b/src/lib/efl/mobile/c/ui_view.cpp @@ -187,13 +187,13 @@ EAPI bool ui_view_set_event_cb(ui_view *view, ui_view_event_type_e event_type, u return true; } -EAPI Evas_Object* ui_view_get_base(ui_view *view) +EAPI Eo* ui_view_get_base(ui_view *view) { if (!validate_view(view)) return nullptr; return view->getBase(); } -EAPI Evas_Object *ui_view_unset_content(ui_view *view) +EAPI Eo *ui_view_unset_content(ui_view *view) { if (!validate_view(view)) return nullptr; return view->unsetContent(); @@ -277,7 +277,7 @@ EAPI ui_view_state ui_view_get_state(ui_view *view) return view->getState(); } -EAPI Evas_Object *ui_view_get_content(ui_view *view) +EAPI Eo *ui_view_get_content(ui_view *view) { if (!validate_view(view)) return nullptr; return view->getContent(); @@ -290,7 +290,7 @@ EAPI bool ui_view_destroy(ui_view *view) return true; } -EAPI bool ui_view_set_content(ui_view *view, Evas_Object *content) +EAPI bool ui_view_set_content(ui_view *view, Eo *content) { if (!validate_view(view)) return false; return view->setContent(content); diff --git a/src/lib/efl/mobile/c/ui_viewmgr.cpp b/src/lib/efl/mobile/c/ui_viewmgr.cpp index a00f6a5..22ef717 100644 --- a/src/lib/efl/mobile/c/ui_viewmgr.cpp +++ b/src/lib/efl/mobile/c/ui_viewmgr.cpp @@ -89,7 +89,7 @@ EAPI ui_view *ui_viewmgr_get_view_by_name(const char *name) return dynamic_cast(viewmgr->getView(name)); } -EAPI Evas_Object *ui_viewmgr_get_base(void) +EAPI Eo *ui_viewmgr_get_base(void) { ui_viewmgr*viewmgr = UI_VIEWMGR;