From a52d1736f4fae348a1d96948f69764eb97bece7f Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Fri, 25 Mar 2016 20:13:20 +0900 Subject: [PATCH] rename states active -> activate inactive -> deactivate Change-Id: I797d64e8e5683378cca7b9fa92bf961a45d0f8bc --- src/include/efl/ui_base_controller.h | 30 ++++++++++++++--------------- src/include/efl/ui_base_viewmgr.h | 2 +- src/include/interface/ui_iface_controller.h | 30 ++++++++++++++--------------- src/include/interface/ui_iface_view.h | 12 ++++++------ src/include/interface/ui_iface_viewmgr.h | 4 ++-- src/lib/efl/ui_base_viewmgr.cpp | 18 ++++++++--------- src/lib/interface/ui_iface_view.cpp | 16 +++++++-------- src/lib/interface/ui_iface_viewmgr.cpp | 22 ++++++++++----------- 8 files changed, 67 insertions(+), 67 deletions(-) diff --git a/src/include/efl/ui_base_controller.h b/src/include/efl/ui_base_controller.h index dcf3d48..b732278 100644 --- a/src/include/efl/ui_base_controller.h +++ b/src/include/efl/ui_base_controller.h @@ -51,7 +51,7 @@ public: /** @brief load callback. * * @note Now, this view is moving onto the screen. Get ready for this view. If this view content is alive, load callback won't be called. - * In the most cases, this callback will be triggered with this step load -> inactive -> active. + * In the most cases, this callback will be triggered with this step load -> deactivate -> activate. */ virtual void on_load() {} @@ -60,38 +60,38 @@ public: * @note Remove resources with regards to this view for saving memory or keep the content for performance. It's up to your scenario. * Unload will be called just right before when the view is going to be deleted by popping or it's piled under the more than one view. * If the view content is not alive, the unload won't be called. - * In the most cases, this callback will be triggered with this step. inactive -> unload -> destroy + * In the most cases, this callback will be triggered with this step. deactivate -> unload -> destroy */ virtual void on_unload() {} - /** @brief active callback. + /** @brief activate callback. * - * @note View is on active state after show transition is finished. - * From whatever the state, if the view is on the screen, the active callback will be called. - * In the most cases, this callback will be triggered with this step. load -> inactive -> active + * @note View is on activate state after show transition is finished. + * From whatever the state, if the view is on the screen, the activate callback will be called. + * In the most cases, this callback will be triggered with this step. load -> deactivate -> activate */ - virtual void on_active() {} + virtual void on_activate() {} - /** @brief inactive callback. + /** @brief deactivate callback. * - * @note View is on inactive state. Get ready for unload. Hide transition may be triggered at this point. - * Inactive state is triggered on this scenario that the view is still visible but it's not interactive with users. - * In the most cases, when view is going to be popped or destroyed or pushed one more depth, the inactive state will be triggered. - * Some UI controls such as a center popup or a menu popup blocks the view, this view may be inactive but still visible in someway (with transparency) + * @note View is on deactivate state. Get ready for unload. Hide transition may be triggered at this point. + * Deactivate state is triggered on this scenario that the view is still visible but it's not interactivate with users. + * In the most cases, when view is going to be popped or destroyed or pushed one more depth, the deactivate state will be triggered. + * Some UI controls such as a center popup or a menu popup blocks the view, this view may be deactivate but still visible in someway (with transparency) */ - virtual void on_inactive() {} + virtual void on_deactivate() {} /** @brief pause callback. * * @note When the system blocks the application running in cases such as phone call, system notification, switching applications ... * When Window turns to deactivate. (@see ui_base_viewmgr_base :: deactivate()). - * If the view were inactive or unload state, the pause won't be called. + * If the view were deactivate or unload state, the pause won't be called. */ virtual void on_pause() {} /** @brief resume callback. * - * @note View is turning back to the active state again from pause. + * @note View is turning back to the activate state again from pause. * When the system allows the application turns to activate. * When the Window turns to activate. (@see ui_base_viewmgr :: activate()) */ diff --git a/src/include/efl/ui_base_viewmgr.h b/src/include/efl/ui_base_viewmgr.h index c1121fd..30afc61 100644 --- a/src/include/efl/ui_base_viewmgr.h +++ b/src/include/efl/ui_base_viewmgr.h @@ -100,7 +100,7 @@ private: */ bool set_indicator(ui_view_indicator indicator); - void active_top_view(); + void activate_top_view(); protected: ui_base_viewmgr(const char *pkg, ui_base_key_listener *key_listener); diff --git a/src/include/interface/ui_iface_controller.h b/src/include/interface/ui_iface_controller.h index 0fa7caa..ebef728 100644 --- a/src/include/interface/ui_iface_controller.h +++ b/src/include/interface/ui_iface_controller.h @@ -69,7 +69,7 @@ public: /** @brief load callback. * * @note Now, this view is moving onto the screen. Get ready for this view. If this view content is alive, load callback won't be called. - * In the most cases, this callback will be triggered with this step load -> inactive -> active. + * In the most cases, this callback will be triggered with this step load -> deactivate -> activate. */ virtual void on_load() = 0; @@ -78,38 +78,38 @@ public: * @note Remove resources with regards to this view for saving memory or keep the content for performance. It's up to your scenario. * Unload will be called just right before when the view is going to be deleted by popping or it's piled under the more than one view. * If the view content is not alive, the unload won't be called. - * In the most cases, this callback will be triggered with this step. inactive -> unload -> destroy + * In the most cases, this callback will be triggered with this step. deactivate -> unload -> destroy */ virtual void on_unload() = 0; - /** @brief active callback. + /** @brief activate callback. * - * @note View is on active state after show transition is finished. - * From whatever the state, if the view is on the screen, the active callback will be called. - * In the most cases, this callback will be triggered with this step. load -> inactive -> active + * @note View is on activate state after show transition is finished. + * From whatever the state, if the view is on the screen, the activate callback will be called. + * In the most cases, this callback will be triggered with this step. load -> deactivate -> activate */ - virtual void on_active() = 0; + virtual void on_activate() = 0; - /** @brief inactive callback. + /** @brief deactivate callback. * - * @note View is on inactive state. Get ready for unload. Hide transition may be triggered at this point. - * Inactive state is triggered on this scenario that the view is still visible but it's not interactive with users. - * In the most cases, when view is going to be popped or destroyed or pushed one more depth, the inactive state will be triggered. - * Some UI controls such as a center popup or a menu popup blocks the view, this view may be inactive but still visible in someway (with transparency) + * @note View is on deactivate state. Get ready for unload. Hide transition may be triggered at this point. + * Deactivate state is triggered on this scenario that the view is still visible but it's not interactivate with users. + * In the most cases, when view is going to be popped or destroyed or pushed one more depth, the deactivate state will be triggered. + * Some UI controls such as a center popup or a menu popup blocks the view, this view may be deactivate but still visible in someway (with transparency) */ - virtual void on_inactive() = 0; + virtual void on_deactivate() = 0; /** @brief pause callback. * * @note When the system blocks the application running in cases such as phone call, system notification, switching applications ... * When Window turns to deactivate. (@see ui_viewmgr_base :: deactivate()). - * If the view were inactive or unload state, the pause won't be called. + * If the view were deactivate or unload state, the pause won't be called. */ virtual void on_pause() = 0; /** @brief resume callback. * - * @note View is turning back to the active state again from pause. + * @note View is turning back to the activate state again from pause. * When the system allows the application turns to activate. * When the Window turns to activate. (@see ui_viewmgr_base :: activate()) */ diff --git a/src/include/interface/ui_iface_view.h b/src/include/interface/ui_iface_view.h index 74513e7..f258dbc 100644 --- a/src/include/interface/ui_iface_view.h +++ b/src/include/interface/ui_iface_view.h @@ -52,8 +52,8 @@ private: { UI_VIEW_STATE_LOAD = 0, ///< Load state UI_VIEW_STATE_UNLOAD, ///< Unload state - UI_VIEW_STATE_ACTIVE, ///< Active state - UI_VIEW_STATE_INACTIVE, ///< Inactive state + UI_VIEW_STATE_ACTIVATE, ///< Activate state + UI_VIEW_STATE_DEACTIVATE, ///< Deactivate state UI_VIEW_STATE_PAUSE, ///< Pause state UI_VIEW_STATE_LAST }; @@ -95,21 +95,21 @@ protected: */ virtual void on_unload(); - /** @brief view active state. + /** @brief view activate state. * * @note this state will be triggered by ui_iface_viewmgr. * * @see ui_iface_controller for this state in detail. */ - virtual void on_active(); + virtual void on_activate(); - /** @brief view inactive state. + /** @brief view deactivate state. * * @note this state will be triggered by ui_iface_viewmgr. * * @see ui_iface_controller for this state in detail. */ - virtual void on_inactive(); + virtual void on_deactivate(); /** @brief view pause state. * diff --git a/src/include/interface/ui_iface_viewmgr.h b/src/include/interface/ui_iface_viewmgr.h index 5d2d8d2..afdd8b4 100644 --- a/src/include/interface/ui_iface_viewmgr.h +++ b/src/include/interface/ui_iface_viewmgr.h @@ -44,7 +44,7 @@ class ui_iface_viewmgr private: static bool soft_key; //If system doesn't support HW back key, then this value is @c true. static bool event_block; //Event block on view transition. This value should be configurable by system. - list view_list; //View list. + list view_list; //View list. bool activated; //Activated status of this viewmgr. /** @@ -271,7 +271,7 @@ public: /** * @brief Return the active status of viewmgr. * - * @return @c true if viewmgr is active, @c false otherwise. + * @return @c true if viewmgr is activated, @c false otherwise. * * @see activate() * @see deactivate() diff --git a/src/lib/efl/ui_base_viewmgr.cpp b/src/lib/efl/ui_base_viewmgr.cpp index 1c84b22..530be66 100644 --- a/src/lib/efl/ui_base_viewmgr.cpp +++ b/src/lib/efl/ui_base_viewmgr.cpp @@ -100,7 +100,7 @@ Elm_Layout *ui_base_viewmgr::set_transition_layout(string transition_style) return this->layout; } -void ui_base_viewmgr::active_top_view() +void ui_base_viewmgr::activate_top_view() { elm_object_part_content_unset(this->get_base(), "content"); @@ -281,11 +281,11 @@ bool ui_base_viewmgr::activate() { if (!ui_iface_viewmgr::activate()) return false; - this->active_top_view(); + this->activate_top_view(); //FIXME: Necessary?? ui_base_view *view = this->get_last_view(); - view->on_active(); + view->on_activate(); evas_object_show(this->win); @@ -300,7 +300,7 @@ bool ui_base_viewmgr::deactivate() if (true) { ui_base_view *view = this->get_last_view(); - if (view) view->on_inactive(); + if (view) view->on_deactivate(); evas_object_lower(this->win); } else @@ -333,7 +333,7 @@ bool ui_base_viewmgr::pop_view() { this->pop_view_finished(pview); this->pop_view_finished(view); - this->active_top_view(); + this->activate_top_view(); return true; } @@ -343,7 +343,7 @@ bool ui_base_viewmgr::pop_view() LOGE("invalid effect transition style?! = %s", view->get_transition_style()); this->pop_view_finished(pview); this->pop_view_finished(view); - this->active_top_view(); + this->activate_top_view(); return true; } @@ -369,7 +369,7 @@ ui_base_view * ui_base_viewmgr::push_view(ui_base_view *view) //In case, if viewmgr has one view, we skip effect. if (this->get_view_count() == 1) { - this->active_top_view(); + this->activate_top_view(); this->push_view_finished(view); return view; } @@ -378,7 +378,7 @@ ui_base_view * ui_base_viewmgr::push_view(ui_base_view *view) //In case, if view doesn't have transition effect if (!strcmp(view->get_transition_style(), "none")) { - this->active_top_view(); + this->activate_top_view(); this->push_view_finished(pview); this->push_view_finished(view); return view; @@ -388,7 +388,7 @@ ui_base_view * ui_base_viewmgr::push_view(ui_base_view *view) Elm_Layout *effect = this->set_transition_layout(view->get_transition_style()); if (!effect) { LOGE("invalid effect transition style?! = %s", view->get_transition_style()); - this->active_top_view(); + this->activate_top_view(); this->push_view_finished(pview); this->push_view_finished(view); return view; diff --git a/src/lib/interface/ui_iface_view.cpp b/src/lib/interface/ui_iface_view.cpp index bf65eb5..e1dc7c0 100644 --- a/src/lib/interface/ui_iface_view.cpp +++ b/src/lib/interface/ui_iface_view.cpp @@ -44,32 +44,32 @@ void ui_iface_view::on_unload() this->controller->on_unload(); } -void ui_iface_view::on_active() +void ui_iface_view::on_activate() { - this->state = UI_VIEW_STATE_ACTIVE; + this->state = UI_VIEW_STATE_ACTIVATE; if (!this->controller) return; - this->controller->on_active(); + this->controller->on_activate(); } -void ui_iface_view::on_inactive() +void ui_iface_view::on_deactivate() { - this->state = UI_VIEW_STATE_INACTIVE; + this->state = UI_VIEW_STATE_DEACTIVATE; if (!this->controller) return; - this->controller->on_inactive(); + this->controller->on_deactivate(); } void ui_iface_view::on_pause() { this->state = UI_VIEW_STATE_PAUSE; if (!this->content) return; - if (state != UI_VIEW_STATE_ACTIVE) return; + if (state != UI_VIEW_STATE_ACTIVATE) return; if (!this->controller) return; this->controller->on_pause(); } void ui_iface_view::on_resume() { - this->state = UI_VIEW_STATE_ACTIVE; + this->state = UI_VIEW_STATE_ACTIVATE; if (state != UI_VIEW_STATE_PAUSE) return; if (!this->content) return; if (!this->controller) return; diff --git a/src/lib/interface/ui_iface_viewmgr.cpp b/src/lib/interface/ui_iface_viewmgr.cpp index f808004..c2dc9ef 100644 --- a/src/lib/interface/ui_iface_viewmgr.cpp +++ b/src/lib/interface/ui_iface_viewmgr.cpp @@ -67,8 +67,8 @@ bool ui_iface_viewmgr::push_view_finished(ui_iface_view *view) return true; } - //A new view has been pushed. This should be active. - view->on_active(); + //A new view has been pushed. This should be activate. + view->on_activate(); this->set_event_block(view, false); return true; @@ -87,8 +87,8 @@ bool ui_iface_viewmgr::pop_view_finished(ui_iface_view *view) return true; } - //The previous view has been popped. It should become active. - view->on_active(); + //The previous view has been popped. It should become activate. + view->on_activate(); this->set_event_block(view, false); return true; @@ -105,7 +105,7 @@ ui_iface_viewmgr::~ui_iface_viewmgr() for (typename std::list::reverse_iterator it = this->view_list.rbegin(); it != this->view_list.rend(); it++) { ui_iface_view *view = *it; - view->on_inactive(); + view->on_deactivate(); view->on_unload(); view->on_destroy(); delete (view); @@ -136,7 +136,7 @@ ui_iface_viewmgr::push_view(ui_iface_view *view) if (this->view_list.size() > 0) { pview = this->view_list.back(); - pview->on_inactive(); + pview->on_deactivate(); this->set_event_block(pview, true); } @@ -147,7 +147,7 @@ ui_iface_viewmgr::push_view(ui_iface_view *view) view->on_load(); } - view->on_inactive(); + view->on_deactivate(); //FIXME: First view has no effect? if (this->view_list.size() != 1) this->set_event_block(view, true); @@ -169,7 +169,7 @@ bool ui_iface_viewmgr::pop_view() { //destroy viewmgr? ui_iface_view *view = this->view_list.back(); - view->on_inactive(); + view->on_deactivate(); view->on_unload(); view->on_destroy(); delete(view); @@ -179,16 +179,16 @@ bool ui_iface_viewmgr::pop_view() //last page to be popped. ui_iface_view *view = this->view_list.back(); - view->on_inactive(); + view->on_deactivate(); this->set_event_block(view, true); //Below object has to be used in child class... //Make this getter method? or define instance? - //previous page to be current active. + //previous page is to be active page. auto nx = std::prev(this->view_list.end(), 2); ui_iface_view *pview = *nx; pview->on_load(); - pview->on_inactive(); + pview->on_deactivate(); this->set_event_block(pview, true); return true; -- 2.7.4